diff options
author | Matt Kraai <kraai@debian.org> | 2000-07-14 23:28:47 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2000-07-14 23:28:47 +0000 |
commit | 3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217 (patch) | |
tree | 6a217bf17e7c00e98a47f657015535f21b53cedd /ps.c | |
parent | 464c5de00d3dfb5f01e866f703d95bbb2bb9443c (diff) | |
download | busybox-w32-3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217.tar.gz busybox-w32-3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217.tar.bz2 busybox-w32-3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217.zip |
Don't use strings directly in calls to usage(). This is in preparation
for their extraction to a separate file.
Diffstat (limited to 'ps.c')
-rw-r--r-- | ps.c | 19 |
1 files changed, 10 insertions, 9 deletions
@@ -114,6 +114,13 @@ static void parse_proc_status(char *S, proc_t * P) | |||
114 | 114 | ||
115 | } | 115 | } |
116 | 116 | ||
117 | const char ps_usage[] = | ||
118 | "ps\n" | ||
119 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
120 | "\nReport process status\n" | ||
121 | "\nThis version of ps accepts no options.\n" | ||
122 | #endif | ||
123 | ; | ||
117 | 124 | ||
118 | extern int ps_main(int argc, char **argv) | 125 | extern int ps_main(int argc, char **argv) |
119 | { | 126 | { |
@@ -134,14 +141,8 @@ extern int ps_main(int argc, char **argv) | |||
134 | 141 | ||
135 | 142 | ||
136 | 143 | ||
137 | if (argc > 1 && strcmp(argv[1], dash_dash_help) == 0) { | 144 | if (argc > 1 && strcmp(argv[1], dash_dash_help) == 0) |
138 | usage ("ps\n" | 145 | usage(ps_usage); |
139 | #ifndef BB_FEATURE_TRIVIAL_HELP | ||
140 | "\nReport process status\n" | ||
141 | "\nThis version of ps accepts no options.\n" | ||
142 | #endif | ||
143 | ); | ||
144 | } | ||
145 | 146 | ||
146 | dir = opendir("/proc"); | 147 | dir = opendir("/proc"); |
147 | if (!dir) | 148 | if (!dir) |
@@ -223,7 +224,7 @@ extern int ps_main(int argc, char **argv) | |||
223 | #endif | 224 | #endif |
224 | 225 | ||
225 | if (argc > 1 && **(argv + 1) == '-') | 226 | if (argc > 1 && **(argv + 1) == '-') |
226 | usage("ps-devps\n\nReport process status\n\nThis version of ps accepts no options.\n\n"); | 227 | usage(ps_usage); |
227 | 228 | ||
228 | /* open device */ | 229 | /* open device */ |
229 | fd = open(device, O_RDONLY); | 230 | fd = open(device, O_RDONLY); |