From 02b064a5915109027f29ee81d74288e9e7296ea5 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Thu, 8 Dec 2022 09:56:50 -0600 Subject: [PATCH] src/swclock: make the reference file a required argument --- src/swclock/swclock.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/swclock/swclock.c b/src/swclock/swclock.c index 5fc5d395..e526bd38 100644 --- a/src/swclock/swclock.c +++ b/src/swclock/swclock.c @@ -34,7 +34,6 @@ #include "misc.h" #include "_usage.h" -#define RC_SHUTDOWNTIME RC_SVCDIR "/shutdowntime" const char *applet = NULL; const char *extraopts = "file"; @@ -54,7 +53,7 @@ const char *usagestring = NULL; int main(int argc, char **argv) { int opt, sflag = 0, wflag = 0; - const char *file = RC_SHUTDOWNTIME; + const char *file = NULL; struct stat sb; struct timeval tv; @@ -75,6 +74,8 @@ int main(int argc, char **argv) if (optind < argc) file = argv[optind++]; + else + eerrorx("swclock: Reference file was not specified"); if (sflag) { if (stat(file, &sb) == -1) {