Allow to specify the rtc devnode for hwclock(8)

This commit is contained in:
sin 2014-06-03 16:04:53 +01:00
parent 5836145a5c
commit 5bbc67aa96
1 changed files with 6 additions and 1 deletions

View File

@ -21,7 +21,7 @@ static void systohc(char *);
static void static void
usage(void) usage(void)
{ {
eprintf("usage: %s [-rsw] [-u]\n", argv0); eprintf("usage: %s [-rsw] [-u] [dev]\n", argv0);
} }
int int
@ -48,6 +48,11 @@ main(int argc, char *argv[])
usage(); usage();
} ARGEND; } ARGEND;
if (argc > 1)
usage();
else if (argc == 1)
dev = argv[0];
if ((rflag ^ sflag ^ wflag) == 0) if ((rflag ^ sflag ^ wflag) == 0)
eprintf("missing or incompatible function\n"); eprintf("missing or incompatible function\n");