]> Zhao Yanbai Git Server - minix.git/commitdiff
Minor fixes
authorBen Gras <ben@minix3.org>
Fri, 5 Aug 2005 12:52:26 +0000 (12:52 +0000)
committerBen Gras <ben@minix3.org>
Fri, 5 Aug 2005 12:52:26 +0000 (12:52 +0000)
commands/ibm/readclock.c

index b756929cebf06c710a346635e72040a9dcb03068..047368bee548114cbd8423f3251910d15a2cc873 100755 (executable)
@@ -151,12 +151,14 @@ PUBLIC int main(int argc, char **argv)
 
        /* Open the CMOS device to read the system time. */
        if ((fd = open(CMOS_DEV, O_RDONLY)) < 0) {
-               fprintf(stderr, "Couldn't open CMOS device: %d.\n",s);
+               perror(CMOS_DEV);
+               fprintf(stderr, "Couldn't open CMOS device.\n");
                exit(1);
        }
         request = (y2kflag) ? CIOCGETTIME : CIOCGETTIMEY2K;
        if ((s=ioctl(fd, request, (void *) &time1)) < 0) {
-               fprintf(stderr, "Couldn't do CMOS ioctl: %d.\n",s);
+               perror("ioctl");
+               fprintf(stderr, "Couldn't do CMOS ioctl.\n");
                exit(1);
        }
        close(fd);