aboutsummaryrefslogtreecommitdiffstats
path: root/src/fcopy/main.c
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-05-11 18:51:02 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-05-14 16:52:49 -0300
commit15ad8696c7cf95059f163b4f7ed86ca697e8fe1e (patch)
tree7d61eb67b0ee8118d653917fb50f446d8e6c4f9d /src/fcopy/main.c
parentStandardize usage string var declarations (diff)
downloadfirejail-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/fcopy/main.c')
-rw-r--r--src/fcopy/main.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/fcopy/main.c b/src/fcopy/main.c
index ce2efb295..a56e8a91b 100644
--- a/src/fcopy/main.c
+++ b/src/fcopy/main.c
@@ -416,18 +416,19 @@ static void duplicate_link(const char *src, const char *dest, struct stat *s) {
416 free(rdest); 416 free(rdest);
417} 417}
418 418
419static const char *const usage_str =
420 "Usage: fcopy [--follow-link] src dest\n"
421 "\n"
422 "Copy SRC to DEST/SRC. SRC may be a file, directory, or symbolic link.\n"
423 "If SRC is a directory it is copied recursively. If it is a symlink,\n"
424 "the link itself is duplicated, unless --follow-link is given,\n"
425 "in which case the destination of the link is copied.\n"
426 "DEST must already exist and must be a directory.\n";
419 427
420static void usage(void) { 428static void usage(void) {
421 fputs("Usage: fcopy [--follow-link] src dest\n" 429 fputs(usage_str, stderr);
422 "\n"
423 "Copy SRC to DEST/SRC. SRC may be a file, directory, or symbolic link.\n"
424 "If SRC is a directory it is copied recursively. If it is a symlink,\n"
425 "the link itself is duplicated, unless --follow-link is given,\n"
426 "in which case the destination of the link is copied.\n"
427 "DEST must already exist and must be a directory.\n", stderr);
428} 430}
429 431
430
431int main(int argc, char **argv) { 432int main(int argc, char **argv) {
432#if 0 433#if 0
433 { 434 {