diff options
author | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-05-11 18:51:02 -0300 |
---|---|---|
committer | Kelvin M. Klann <kmk3.code@protonmail.com> | 2023-05-14 16:52:49 -0300 |
commit | 15ad8696c7cf95059f163b4f7ed86ca697e8fe1e (patch) | |
tree | 7d61eb67b0ee8118d653917fb50f446d8e6c4f9d /src/etc-cleanup | |
parent | Standardize usage string var declarations (diff) | |
download | firejail-15ad8696c7cf95059f163b4f7ed86ca697e8fe1e.tar.gz firejail-15ad8696c7cf95059f163b4f7ed86ca697e8fe1e.tar.zst firejail-15ad8696c7cf95059f163b4f7ed86ca697e8fe1e.zip |
Move usage text into usage_str var
For consistency and readability.
Note: This also makes exactly one extra blank line be printed at the end
of every usage text, which is currently only done in the following
files:
* src/fcopy/main.c
* src/fnettrace-dns/main.c
* src/fnettrace-icmp/main.c
* src/fnettrace-sni/main.c
* src/fnettrace/main.c
* src/profstats/main.c
Diffstat (limited to 'src/etc-cleanup')
-rw-r--r-- | src/etc-cleanup/main.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/etc-cleanup/main.c b/src/etc-cleanup/main.c index 6c7bea6d6..f15ba53cd 100644 --- a/src/etc-cleanup/main.c +++ b/src/etc-cleanup/main.c | |||
@@ -212,13 +212,16 @@ static void process_file(const char *fname) { | |||
212 | } | 212 | } |
213 | } | 213 | } |
214 | 214 | ||
215 | static const char *const usage_str = | ||
216 | "usage: cleanup-etc [options] file.profile [file.profile]\n" | ||
217 | "Group and clean private-etc entries in one or more profile files.\n" | ||
218 | "Options:\n" | ||
219 | " --debug - print debug messages\n" | ||
220 | " -h, -?, --help - this help screen\n" | ||
221 | " --replace - replace profile file\n"; | ||
222 | |||
215 | static void usage(void) { | 223 | static void usage(void) { |
216 | printf("usage: cleanup-etc [options] file.profile [file.profile]\n"); | 224 | puts(usage_str); |
217 | printf("Group and clean private-etc entries in one or more profile files.\n"); | ||
218 | printf("Options:\n"); | ||
219 | printf(" --debug - print debug messages\n"); | ||
220 | printf(" -h, -?, --help - this help screen\n"); | ||
221 | printf(" --replace - replace profile file\n"); | ||
222 | } | 225 | } |
223 | 226 | ||
224 | int main(int argc, char **argv) { | 227 | int main(int argc, char **argv) { |