accidentally applied wrong (old) patch, fixing up...
[oweals/busybox.git] / miscutils / watchdog.c
index ebbab2df3cf2cc15087f506254fc7bd4ae963d2d..e342c13f3fc10d58f99f5a019a5fab7f9962e14c 100644 (file)
@@ -25,14 +25,14 @@ static void watchdog_shutdown(int ATTRIBUTE_UNUSED unused)
 
 int watchdog_main(int argc, char **argv)
 {
-       unsigned long opts;
-       unsigned long timer_duration = 30; /* Userspace timer duration, in seconds */
+       unsigned opts;
+       unsigned timer_duration = 30; /* Userspace timer duration, in seconds */
        char *t_arg;
 
-       opts = bb_getopt_ulflags(argc, argv, "Ft:", &t_arg);
+       opts = getopt32(argc, argv, "Ft:", &t_arg);
 
        if (opts & OPT_TIMER)
-               timer_duration = bb_xgetlarg(t_arg, 10, 0, INT_MAX);
+               timer_duration = xatou(t_arg);
 
        /* We're only interested in the watchdog device .. */
        if (optind < argc - 1 || argc == 1)