]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
hwclock: use a consistent name for --predict
authorJ William Piggott <elseifthen@gmx.com>
Thu, 20 Apr 2017 13:34:33 +0000 (09:34 -0400)
committerJ William Piggott <elseifthen@gmx.com>
Thu, 27 Apr 2017 03:19:56 +0000 (23:19 -0400)
The predict function name is documented as '--predict', but the
code uses '--predict-hc'. This works okay, except that the
'mutually exclusive' error message prints the undocumented name.

* sys-utils/hwclock.c: rename 'predict-hc' to 'predict' so that
    it matches the man-page. This should not be a problem because
    'predict-hc' was never documented.

Signed-off-by: J William Piggott <elseifthen@gmx.com>
sys-utils/hwclock.c

index e66acd22883808b8be18c07a0405a70698168eb9..e890cb8c18a44114ed949d4b54ee1bf60076154f 100644 (file)
@@ -1304,7 +1304,7 @@ int main(int argc, char **argv)
                OPT_GETEPOCH,
                OPT_LOCALTIME,
                OPT_NOADJFILE,
-               OPT_PREDICT_HC,
+               OPT_PREDICT,
                OPT_SET,
                OPT_SETEPOCH,
                OPT_SYSTZ,
@@ -1337,7 +1337,7 @@ int main(int argc, char **argv)
 #endif
                { "adjfile",      required_argument, NULL, OPT_ADJFILE    },
                { "systz",        no_argument,       NULL, OPT_SYSTZ      },
-               { "predict-hc",   no_argument,       NULL, OPT_PREDICT_HC },
+               { "predict",      no_argument,       NULL, OPT_PREDICT    },
                { "get",          no_argument,       NULL, OPT_GET        },
                { "update-drift", no_argument,       NULL, OPT_UPDATE     },
                { NULL, 0, NULL, 0 }
@@ -1345,7 +1345,7 @@ int main(int argc, char **argv)
 
        static const ul_excl_t excl[] = {       /* rows and cols in ASCII order */
                { 'a','r','s','w',
-                 OPT_GET, OPT_GETEPOCH, OPT_PREDICT_HC,
+                 OPT_GET, OPT_GETEPOCH, OPT_PREDICT,
                  OPT_SET, OPT_SETEPOCH, OPT_SYSTZ },
                { 'u', OPT_LOCALTIME},
                { OPT_ADJFILE, OPT_NOADJFILE },
@@ -1454,8 +1454,8 @@ int main(int argc, char **argv)
                        ctl.systz = 1;          /* --systz */
                        ctl.show = 0;
                        break;
-               case OPT_PREDICT_HC:
-                       ctl.predict = 1;        /* --predict-hc */
+               case OPT_PREDICT:
+                       ctl.predict = 1;        /* --predict */
                        ctl.show = 0;
                        break;
                case OPT_GET: