]> git.ipfire.org Git - thirdparty/kmod.git/commitdiff
tools: make usage() messages go to stdout rather than stderr
authorLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 6 Nov 2012 19:32:41 +0000 (17:32 -0200)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Tue, 6 Nov 2012 19:32:41 +0000 (17:32 -0200)
When user supplied --help/-h, program should output to stdout the usage,
not to stderr. It's the expected behavior, what the user asked for,
not something to log or an error.

tools/depmod.c
tools/insmod.c
tools/modinfo.c
tools/modprobe.c
tools/rmmod.c

index 5d94c17e936c9006fc5e9df254033abdf15905ba..2107770dd04e188efc5518f6fd34b06e26edb7d3 100644 (file)
@@ -89,8 +89,7 @@ static const struct option cmdopts[] = {
 
 static void help(void)
 {
-       fprintf(stderr,
-               "Usage:\n"
+       printf("Usage:\n"
                "\t%s -[aA] [options] [forced_version]\n"
                "\n"
                "If no arguments (except options) are given, \"depmod -a\" is assumed\n"
index bc7115f981be8cda1a2f288497bfee77dcc4556a..c05a6fc0d9fae94111eae54dc9cc0facc49c6f03 100644 (file)
@@ -38,8 +38,7 @@ static const struct option cmdopts[] = {
 
 static void help(void)
 {
-       fprintf(stderr,
-               "Usage:\n"
+       printf("Usage:\n"
                "\t%s [options] filename [args]\n"
                "Options:\n"
                "\t-V, --version     show version\n"
index c6a12aee81ffbaf557d01cdaa59833c98d559c7b..f770ec9b93b2a084fa5c5d6e7849c8f6efd68a80 100644 (file)
@@ -330,8 +330,7 @@ static const struct option cmdopts[] = {
 
 static void help(void)
 {
-       fprintf(stderr,
-               "Usage:\n"
+       printf("Usage:\n"
                "\t%s [options] filename [args]\n"
                "Options:\n"
                "\t-a, --author                Print only 'author'\n"
index 4cd664595ae59956b57e57862a31ae84eec9ee1e..0dea87875e31014be1a205e563dfaee3cfed9ce7 100644 (file)
@@ -93,8 +93,7 @@ static const struct option cmdopts[] = {
 
 static void help(void)
 {
-       fprintf(stderr,
-               "Usage:\n"
+       printf("Usage:\n"
                "\t%s [options] [-i] [-b] modulename\n"
                "\t%s [options] -a [-i] [-b] modulename [modulename...]\n"
                "\t%s [options] -r [-i] modulename\n"
index 9d0951579382246dff98affef6bab8b8918f7af7..689675b5efd1219593a4b5672f88c844a5435b47 100644 (file)
@@ -48,8 +48,7 @@ static const struct option cmdopts[] = {
 
 static void help(void)
 {
-       fprintf(stderr,
-               "Usage:\n"
+       printf("Usage:\n"
                "\t%s [options] modulename ...\n"
                "Options:\n"
                "\t-f, --force       forces a module unload and may crash your\n"