summaryrefslogtreecommitdiff
path: root/mysys/my_getopt.c
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-11-19 21:48:08 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-11-19 21:48:08 -0200
commitecb6228c623cc2b239bf297e107225eaa4455d19 (patch)
treed21225ac09b301f317ca89093128769a5ede9fbb /mysys/my_getopt.c
parentaaf2e7a0037a529070e4721c615b87566a31f09e (diff)
parent9e27ce325013f706526c7b2240498baf4cae4735 (diff)
downloadmariadb-git-ecb6228c623cc2b239bf297e107225eaa4455d19.tar.gz
Manual merge of mysql-next-mr-runtime upstream.
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r--mysys/my_getopt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index f444e0f0c94..2e8f09f14fd 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -1222,6 +1222,14 @@ void my_print_help(const struct my_option *options)
printf("%s", comment);
}
putchar('\n');
+ if ((optp->var_type & GET_TYPE_MASK) == GET_NO_ARG ||
+ (optp->var_type & GET_TYPE_MASK) == GET_BOOL)
+ {
+ if (optp->def_value != 0)
+ {
+ printf("%*s(Defaults to on; use --skip-%s to disable.)\n", name_space, "", optp->name);
+ }
+ }
}
}