diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-06-07 11:02:02 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-06-08 14:20:28 +0300 |
commit | d48fb7c2a92957ec306c6bc9dfb6f13330b81cbb (patch) | |
tree | c8ecb619372bb6e577bf611b4a9a33719a86aeba /ubi-utils/src | |
parent | 74bef2b8693c7e4f78e1ef742933b7231e49c7ad (diff) |
ubi-utils: send help/version info to stdout
Usage/version information should go to stdout when it is expected behavior
(i.e. the user requested it explicitly). This info should go to stderr
only when the usage info is being shown as a result of incorrect options.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils/src')
-rw-r--r-- | ubi-utils/src/mtdinfo.c | 8 | ||||
-rw-r--r-- | ubi-utils/src/ubiattach.c | 6 | ||||
-rw-r--r-- | ubi-utils/src/ubicrc32.c | 6 | ||||
-rw-r--r-- | ubi-utils/src/ubidetach.c | 6 | ||||
-rw-r--r-- | ubi-utils/src/ubiformat.c | 6 | ||||
-rw-r--r-- | ubi-utils/src/ubimkvol.c | 6 | ||||
-rw-r--r-- | ubi-utils/src/ubinfo.c | 6 | ||||
-rw-r--r-- | ubi-utils/src/ubinize.c | 8 | ||||
-rw-r--r-- | ubi-utils/src/ubirmvol.c | 6 | ||||
-rw-r--r-- | ubi-utils/src/ubirsvol.c | 6 | ||||
-rw-r--r-- | ubi-utils/src/ubiupdatevol.c | 6 |
11 files changed, 35 insertions, 35 deletions
diff --git a/ubi-utils/src/mtdinfo.c b/ubi-utils/src/mtdinfo.c index 820c16d..666d739 100644 --- a/ubi-utils/src/mtdinfo.c +++ b/ubi-utils/src/mtdinfo.c @@ -111,13 +111,13 @@ static int parse_opt(int argc, char * const argv[]) break; case 'h': - fprintf(stderr, "%s\n\n", doc); - fprintf(stderr, "%s\n\n", usage); - fprintf(stderr, "%s\n", optionsstr); + printf("%s\n\n", doc); + printf("%s\n\n", usage); + printf("%s\n", optionsstr); exit(EXIT_SUCCESS); case 'V': - fprintf(stderr, "%s\n", PROGRAM_VERSION); + printf("%s\n", PROGRAM_VERSION); exit(EXIT_SUCCESS); case ':': diff --git a/ubi-utils/src/ubiattach.c b/ubi-utils/src/ubiattach.c index 9297b56..4f18e99 100644 --- a/ubi-utils/src/ubiattach.c +++ b/ubi-utils/src/ubiattach.c @@ -123,9 +123,9 @@ static int parse_opt(int argc, char * const argv[]) break; case 'h': - fprintf(stderr, "%s\n\n", doc); - fprintf(stderr, "%s\n\n", usage); - fprintf(stderr, "%s\n", optionsstr); + printf("%s\n\n", doc); + printf("%s\n\n", usage); + printf("%s\n", optionsstr); exit(EXIT_SUCCESS); case 'V': diff --git a/ubi-utils/src/ubicrc32.c b/ubi-utils/src/ubicrc32.c index a09f053..73ec595 100644 --- a/ubi-utils/src/ubicrc32.c +++ b/ubi-utils/src/ubicrc32.c @@ -64,9 +64,9 @@ static int parse_opt(int argc, char * const argv[]) switch (key) { case 'h': - fprintf(stderr, "%s\n\n", doc); - fprintf(stderr, "%s\n\n", usage); - fprintf(stderr, "%s\n", optionsstr); + printf("%s\n\n", doc); + printf("%s\n\n", usage); + printf("%s\n", optionsstr); exit(EXIT_SUCCESS); case 'V': diff --git a/ubi-utils/src/ubidetach.c b/ubi-utils/src/ubidetach.c index 5ee55f1..668f1bd 100644 --- a/ubi-utils/src/ubidetach.c +++ b/ubi-utils/src/ubidetach.c @@ -107,9 +107,9 @@ static int parse_opt(int argc, char * const argv[]) break; case 'h': - fprintf(stderr, "%s\n\n", doc); - fprintf(stderr, "%s\n\n", usage); - fprintf(stderr, "%s\n", optionsstr); + printf("%s\n\n", doc); + printf("%s\n\n", usage); + printf("%s\n", optionsstr); exit(EXIT_SUCCESS); case 'V': diff --git a/ubi-utils/src/ubiformat.c b/ubi-utils/src/ubiformat.c index 6e5cdb8..c4b944a 100644 --- a/ubi-utils/src/ubiformat.c +++ b/ubi-utils/src/ubiformat.c @@ -211,9 +211,9 @@ static int parse_opt(int argc, char * const argv[]) case 'h': case '?': - fprintf(stderr, "%s\n\n", doc); - fprintf(stderr, "%s\n\n", usage); - fprintf(stderr, "%s\n", optionsstr); + printf("%s\n\n", doc); + printf("%s\n\n", usage); + printf("%s\n", optionsstr); exit(EXIT_SUCCESS); case ':': diff --git a/ubi-utils/src/ubimkvol.c b/ubi-utils/src/ubimkvol.c index 935f068..25065e3 100644 --- a/ubi-utils/src/ubimkvol.c +++ b/ubi-utils/src/ubimkvol.c @@ -167,9 +167,9 @@ static int parse_opt(int argc, char * const argv[]) case 'h': case '?': - fprintf(stderr, "%s\n\n", doc); - fprintf(stderr, "%s\n\n", usage); - fprintf(stderr, "%s\n", optionsstr); + printf("%s\n\n", doc); + printf("%s\n\n", usage); + printf("%s\n", optionsstr); exit(EXIT_SUCCESS); case 'V': diff --git a/ubi-utils/src/ubinfo.c b/ubi-utils/src/ubinfo.c index 2bfee16..8e14e6e 100644 --- a/ubi-utils/src/ubinfo.c +++ b/ubi-utils/src/ubinfo.c @@ -118,9 +118,9 @@ static int parse_opt(int argc, char * const argv[]) break; case 'h': - fprintf(stderr, "%s\n\n", doc); - fprintf(stderr, "%s\n\n", usage); - fprintf(stderr, "%s\n", optionsstr); + printf("%s\n\n", doc); + printf("%s\n\n", usage); + printf("%s\n", optionsstr); exit(EXIT_SUCCESS); case 'V': diff --git a/ubi-utils/src/ubinize.c b/ubi-utils/src/ubinize.c index 52a193f..3085b66 100644 --- a/ubi-utils/src/ubinize.c +++ b/ubi-utils/src/ubinize.c @@ -227,10 +227,10 @@ static int parse_opt(int argc, char * const argv[]) break; case 'h': - ubiutils_print_text(stderr, doc, 80); - fprintf(stderr, "\n%s\n\n", ini_doc); - fprintf(stderr, "%s\n", usage); - fprintf(stderr, "%s\n", optionsstr); + ubiutils_print_text(stdout, doc, 80); + printf("\n%s\n\n", ini_doc); + printf("%s\n\n", usage); + printf("%s\n", optionsstr); exit(EXIT_SUCCESS); case 'V': diff --git a/ubi-utils/src/ubirmvol.c b/ubi-utils/src/ubirmvol.c index 5a7217a..5725d90 100644 --- a/ubi-utils/src/ubirmvol.c +++ b/ubi-utils/src/ubirmvol.c @@ -111,9 +111,9 @@ static int parse_opt(int argc, char * const argv[]) case 'h': case '?': - fprintf(stderr, "%s\n\n", doc); - fprintf(stderr, "%s\n\n", usage); - fprintf(stderr, "%s\n", optionsstr); + printf("%s\n\n", doc); + printf("%s\n\n", usage); + printf("%s\n", optionsstr); exit(EXIT_SUCCESS); case 'V': diff --git a/ubi-utils/src/ubirsvol.c b/ubi-utils/src/ubirsvol.c index 34321b8..65f579c 100644 --- a/ubi-utils/src/ubirsvol.c +++ b/ubi-utils/src/ubirsvol.c @@ -140,9 +140,9 @@ static int parse_opt(int argc, char * const argv[]) case 'h': case '?': - fprintf(stderr, "%s\n\n", doc); - fprintf(stderr, "%s\n\n", usage); - fprintf(stderr, "%s\n", optionsstr); + printf("%s\n\n", doc); + printf("%s\n\n", usage); + printf("%s\n", optionsstr); exit(EXIT_SUCCESS); case 'V': diff --git a/ubi-utils/src/ubiupdatevol.c b/ubi-utils/src/ubiupdatevol.c index 62f140b..24f38fe 100644 --- a/ubi-utils/src/ubiupdatevol.c +++ b/ubi-utils/src/ubiupdatevol.c @@ -97,9 +97,9 @@ static int parse_opt(int argc, char * const argv[]) case 'h': case '?': - fprintf(stderr, "%s\n\n", doc); - fprintf(stderr, "%s\n\n", usage); - fprintf(stderr, "%s\n", optionsstr); + printf("%s\n\n", doc); + printf("%s\n\n", usage); + printf("%s\n", optionsstr); exit(EXIT_SUCCESS); case 'V': |