diff options
Diffstat (limited to 'util-linux/dmesg.c')
-rw-r--r-- | util-linux/dmesg.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c index aa8eb95c9..fb1639ace 100644 --- a/util-linux/dmesg.c +++ b/util-linux/dmesg.c | |||
@@ -42,7 +42,7 @@ int dmesg_main(int argc, char **argv) | |||
42 | int lastc; | 42 | int lastc; |
43 | int cmd = 3; | 43 | int cmd = 3; |
44 | 44 | ||
45 | while ((i = getopt(argc, argv, "cn:s:")) != EOF) { | 45 | while ((i = getopt(argc, argv, "cn:s:")) > 0) { |
46 | switch (i) { | 46 | switch (i) { |
47 | case 'c': | 47 | case 'c': |
48 | cmd = 4; | 48 | cmd = 4; |
@@ -58,12 +58,12 @@ int dmesg_main(int argc, char **argv) | |||
58 | bufsize = bb_xgetlarg(optarg, 10, 4096, 512*1024); | 58 | bufsize = bb_xgetlarg(optarg, 10, 4096, 512*1024); |
59 | break; | 59 | break; |
60 | default: | 60 | default: |
61 | show_usage(); | 61 | bb_show_usage(); |
62 | } | 62 | } |
63 | } | 63 | } |
64 | 64 | ||
65 | if (optind < argc) { | 65 | if (optind < argc) { |
66 | show_usage(); | 66 | bb_show_usage(); |
67 | } | 67 | } |
68 | 68 | ||
69 | if (cmd == 8) { | 69 | if (cmd == 8) { |
@@ -98,5 +98,5 @@ all_done: | |||
98 | #endif | 98 | #endif |
99 | return EXIT_SUCCESS; | 99 | return EXIT_SUCCESS; |
100 | die_the_death: | 100 | die_the_death: |
101 | perror_msg_and_die(NULL); | 101 | bb_perror_nomsg_and_die(); |
102 | } | 102 | } |