chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
shutdown: accept minutes argument without '+'
[elogind.git]
/
src
/
systemctl.c
diff --git
a/src/systemctl.c
b/src/systemctl.c
index f6dca5b37428da201263ac772866971c25f12d03..b584e7032b9558672b5424d854096ffdaf974a6e 100644
(file)
--- a/
src/systemctl.c
+++ b/
src/systemctl.c
@@
-4815,10
+4815,10
@@
static int parse_time_spec(const char *t, usec_t *_u) {
if (streq(t, "now"))
*_u = 0;
- else if (
t[0] == '+'
) {
+ else if (
!strchr(t, ':')
) {
uint64_t u;
- if (safe_atou64(t
+ 1
, &u) < 0)
+ if (safe_atou64(t, &u) < 0)
return -EINVAL;
*_u = now(CLOCK_REALTIME) + USEC_PER_MINUTE * u;