aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils/src/ubiformat.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-06-07 11:02:02 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-06-08 14:20:28 +0300
commitd48fb7c2a92957ec306c6bc9dfb6f13330b81cbb (patch)
treec8ecb619372bb6e577bf611b4a9a33719a86aeba /ubi-utils/src/ubiformat.c
parent74bef2b8693c7e4f78e1ef742933b7231e49c7ad (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/ubiformat.c')
-rw-r--r--ubi-utils/src/ubiformat.c6
1 files changed, 3 insertions, 3 deletions
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 ':':