commit 5bbc67aa96b094c1f8edbf6e67ccf64cded7fc3d
Author: sin <[email protected]>
Date:   Tue Jun 3 16:04:53 2014 +0100

    Allow to specify the rtc devnode for hwclock(8)

diff --git a/hwclock.c b/hwclock.c
index a259a98..b48d46c 100644
--- a/hwclock.c
+++ b/hwclock.c
@@ -21,7 +21,7 @@ static void systohc(char *);
 static void
 usage(void)
 {
-       eprintf("usage: %s [-rsw] [-u]
", argv0);
+       eprintf("usage: %s [-rsw] [-u] [dev]
", 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
");
 


Reply via email to