aboutsummaryrefslogtreecommitdiff
path: root/util-linux/dmesg.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-02-14 21:23:06 +0000
committerEric Andersen <andersen@codepoet.org>2001-02-14 21:23:06 +0000
commit67991cf824f8df27e74c92d754fb507681c69ce6 (patch)
treea0b652f3dc794d1050c1a8de3afb014a621238fa /util-linux/dmesg.c
parent68be2ab914e1e20fe666bbd22a89a18714be2789 (diff)
downloadbusybox-w32-67991cf824f8df27e74c92d754fb507681c69ce6.tar.gz
busybox-w32-67991cf824f8df27e74c92d754fb507681c69ce6.tar.bz2
busybox-w32-67991cf824f8df27e74c92d754fb507681c69ce6.zip
This patch, put together by Manuel Novoa III, is a merge of work
done by Evin Robertson (bug#1105) and work from Manuel to make usage messages occupy less space and simplify how usage messages are displayed.
Diffstat (limited to 'util-linux/dmesg.c')
-rw-r--r--util-linux/dmesg.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index c21f84c9a..47f9f4474 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -53,21 +53,21 @@ int dmesg_main(int argc, char **argv)
53 case 'n': 53 case 'n':
54 cmd = 8; 54 cmd = 8;
55 if (optarg == NULL) 55 if (optarg == NULL)
56 usage(dmesg_usage); 56 show_usage();
57 level = atoi(optarg); 57 level = atoi(optarg);
58 break; 58 break;
59 case 's': 59 case 's':
60 if (optarg == NULL) 60 if (optarg == NULL)
61 usage(dmesg_usage); 61 show_usage();
62 bufsize = atoi(optarg); 62 bufsize = atoi(optarg);
63 break; 63 break;
64 default: 64 default:
65 usage(dmesg_usage); 65 show_usage();
66 } 66 }
67 } 67 }
68 68
69 if (optind < argc) { 69 if (optind < argc) {
70 goto end; 70 show_usage();
71 } 71 }
72 72
73 if (cmd == 8) { 73 if (cmd == 8) {
@@ -97,7 +97,4 @@ int dmesg_main(int argc, char **argv)
97 if (lastc != '\n') 97 if (lastc != '\n')
98 putchar('\n'); 98 putchar('\n');
99 return EXIT_SUCCESS; 99 return EXIT_SUCCESS;
100 end:
101 usage(dmesg_usage);
102 return EXIT_FAILURE;
103} 100}