diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-06-17 01:35:52 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-06-17 01:35:52 +0000 |
commit | d0615ae73a42016fe573073fac9da0d3fb865d80 (patch) | |
tree | 767357e7f70de7de874e0744f477fcc4b6da1484 | |
parent | d5826903c171981d967dc6a8c430dfaaed05c53a (diff) | |
download | busybox-w32-d0615ae73a42016fe573073fac9da0d3fb865d80.tar.gz busybox-w32-d0615ae73a42016fe573073fac9da0d3fb865d80.tar.bz2 busybox-w32-d0615ae73a42016fe573073fac9da0d3fb865d80.zip |
Tito says: strip unused program_name
Vladimir N. Oleynik says: uname() can be replaced with get_kernel_revision()
-rw-r--r-- | e2fsprogs/mke2fs.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/e2fsprogs/mke2fs.c b/e2fsprogs/mke2fs.c index f77cfbcde..88b469a25 100644 --- a/e2fsprogs/mke2fs.c +++ b/e2fsprogs/mke2fs.c | |||
@@ -21,9 +21,6 @@ | |||
21 | #include <fcntl.h> | 21 | #include <fcntl.h> |
22 | #include <ctype.h> | 22 | #include <ctype.h> |
23 | #include <time.h> | 23 | #include <time.h> |
24 | #ifdef __linux__ | ||
25 | #include <sys/utsname.h> | ||
26 | #endif | ||
27 | #include <getopt.h> | 24 | #include <getopt.h> |
28 | #include <unistd.h> | 25 | #include <unistd.h> |
29 | #include <stdlib.h> | 26 | #include <stdlib.h> |
@@ -45,7 +42,6 @@ | |||
45 | #define ZAP_BOOTBLOCK | 42 | #define ZAP_BOOTBLOCK |
46 | #endif | 43 | #endif |
47 | 44 | ||
48 | static const char * program_name = "mke2fs"; | ||
49 | static const char * device_name /* = NULL */; | 45 | static const char * device_name /* = NULL */; |
50 | 46 | ||
51 | /* Command line options */ | 47 | /* Command line options */ |
@@ -824,9 +820,6 @@ static void PRS(int argc, char *argv[]) | |||
824 | char * extended_opts = 0; | 820 | char * extended_opts = 0; |
825 | const char * fs_type = 0; | 821 | const char * fs_type = 0; |
826 | blk_t dev_size; | 822 | blk_t dev_size; |
827 | #ifdef __linux__ | ||
828 | struct utsname ut; | ||
829 | #endif | ||
830 | long sysval; | 823 | long sysval; |
831 | 824 | ||
832 | /* Update our PATH to include /sbin */ | 825 | /* Update our PATH to include /sbin */ |
@@ -866,10 +859,7 @@ static void PRS(int argc, char *argv[]) | |||
866 | #endif | 859 | #endif |
867 | 860 | ||
868 | #ifdef __linux__ | 861 | #ifdef __linux__ |
869 | if (uname(&ut)) { | 862 | linux_version_code = get_kernel_revision(); |
870 | bb_perror_msg_and_die("uname"); | ||
871 | } | ||
872 | linux_version_code = parse_version_number(ut.release); | ||
873 | if (linux_version_code && linux_version_code < (2*65536 + 2*256)) { | 863 | if (linux_version_code && linux_version_code < (2*65536 + 2*256)) { |
874 | param.s_rev_level = 0; | 864 | param.s_rev_level = 0; |
875 | param.s_feature_incompat = 0; | 865 | param.s_feature_incompat = 0; |
@@ -879,8 +869,6 @@ static void PRS(int argc, char *argv[]) | |||
879 | #endif | 869 | #endif |
880 | 870 | ||
881 | if (argc && *argv) { | 871 | if (argc && *argv) { |
882 | program_name = basename(*argv); | ||
883 | |||
884 | /* If called as mkfs.ext3, create a journal inode */ | 872 | /* If called as mkfs.ext3, create a journal inode */ |
885 | if (!strcmp(*argv + strlen(*argv) - 9, "mkfs.ext3")) | 873 | if (!strcmp(*argv + strlen(*argv) - 9, "mkfs.ext3")) |
886 | journal_size = -1; | 874 | journal_size = -1; |