aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2012-11-06 17:32:41 -0200
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2012-11-06 17:32:41 -0200
commit34e06bfb545f7a4cce6773b96b602db8329d4009 (patch)
tree83fb5b4a29ccad7b9b06a357354b4dd54a825267
parent84341fbe013bca49038174b03e95c2943a8e184c (diff)
downloadkmod-34e06bfb545f7a4cce6773b96b602db8329d4009.tar.gz
tools: make usage() messages go to stdout rather than stderr
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.
-rw-r--r--tools/depmod.c3
-rw-r--r--tools/insmod.c3
-rw-r--r--tools/modinfo.c3
-rw-r--r--tools/modprobe.c3
-rw-r--r--tools/rmmod.c3
5 files changed, 5 insertions, 10 deletions
diff --git a/tools/depmod.c b/tools/depmod.c
index 5d94c17..2107770 100644
--- a/tools/depmod.c
+++ b/tools/depmod.c
@@ -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"
diff --git a/tools/insmod.c b/tools/insmod.c
index bc7115f..c05a6fc 100644
--- a/tools/insmod.c
+++ b/tools/insmod.c
@@ -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"
diff --git a/tools/modinfo.c b/tools/modinfo.c
index c6a12ae..f770ec9 100644
--- a/tools/modinfo.c
+++ b/tools/modinfo.c
@@ -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"
diff --git a/tools/modprobe.c b/tools/modprobe.c
index 4cd6645..0dea878 100644
--- a/tools/modprobe.c
+++ b/tools/modprobe.c
@@ -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"
diff --git a/tools/rmmod.c b/tools/rmmod.c
index 9d09515..689675b 100644
--- a/tools/rmmod.c
+++ b/tools/rmmod.c
@@ -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"