ubase

suckless linux base utils
git clone git://git.2f30.org/ubase
Log | Files | Refs | README | LICENSE

commit 5bbc67aa96b094c1f8edbf6e67ccf64cded7fc3d
parent 5836145a5c4518131303027a47afb42679cc0da1
Author: sin <sin@2f30.org>
Date:   Tue,  3 Jun 2014 16:04:53 +0100

Allow to specify the rtc devnode for hwclock(8)

Diffstat:
Mhwclock.c | 7++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

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