]> git.pld-linux.org Git - packages/SysVinit.git/blobdiff - time-parsing.patch
- up to 2.98
[packages/SysVinit.git] / time-parsing.patch
diff --git a/time-parsing.patch b/time-parsing.patch
deleted file mode 100644 (file)
index 1871646..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
---- sysvinit-2.96/src/shutdown.c.org   2020-02-24 14:20:54.265362805 +0100
-+++ sysvinit-2.96/src/shutdown.c       2020-02-27 10:24:16.865892277 +0100
-@@ -778,16 +778,18 @@ int main(int argc, char **argv)
-       if (!strcmp(when, "now")) strcpy(when, "0");
-         sp = when;
--      if (when[0] == '+') sp++;
--      /* Decode shutdown time. */
-+      /* Validate time argument. */
-       for ( ; *sp; sp++) {
--              if (*sp != ':' && (*sp < '0' || *sp > '9'))
-+              if (*sp != '+' && *sp != ':' && (*sp < '0' || *sp > '9'))
-                       usage();
-       }
-+      sp = when;
-+      /* Decode shutdown time. */
-+      if (when[0] == '+') sp++;
-       if (strchr(when, ':') == NULL) {
-               /* Time in minutes. */
--              wt = atoi(when);
--              if (wt == 0 && when[0] != '0') usage();
-+              wt = atoi(sp);
-+              if (wt == 0 && sp[0] != '0') usage();
-       } else {
-               /* Time in hh:mm format. */
-               if (sscanf(when, "%d:%2d", &hours, &mins) != 2) usage();
This page took 0.180163 seconds and 4 git commands to generate.