]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
config: can use '-' as a config option
authorYehuda Sadeh <yehuda@hq.newdream.net>
Wed, 7 Jul 2010 21:59:44 +0000 (14:59 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Wed, 7 Jul 2010 22:00:35 +0000 (15:00 -0700)
src/config.h

index 0b9812a733ce6c9c54a9e7d3da32054d8d52a3fa..1b6f9ecab2e31d359cf9196987b9abf5260776c9 100644 (file)
@@ -461,7 +461,9 @@ ExportControl *conf_get_export_control();
 #define CONF_SAFE_SET_ARG_VAL_USAGE(dest, type, show_usage) \
        do { \
           __isarg = i+1 < args.size(); \
-          if (__isarg && !val_pos && args[i+1][0] == '-') __isarg = false; \
+          if (__isarg && !val_pos && \
+              args[i+1][0] == '-' && args[i+1][1] != '\0') \
+              __isarg = false; \
           if (type == OPT_BOOL) { \
                if (val_pos) { \
                        CONF_SET_ARG_VAL(dest, type); \