aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2022-12-08 09:56:50 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2022-12-08 09:56:50 -0600
commit02b064a5915109027f29ee81d74288e9e7296ea5 (patch)
tree6380cb113039f6e3f4dae1aa76f8df725dd116c2
parent839083bb523b82cca28d3f0ecc8d4c3469a0853d (diff)
src/swclock: make the reference file a required argument
-rw-r--r--src/swclock/swclock.c5
1 files 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) {