From: Ben Gras Date: Fri, 5 Aug 2005 12:52:26 +0000 (+0000) Subject: Minor fixes X-Git-Tag: v3.1.0~435 X-Git-Url: http://zhaoyanbai.com/repos/README?a=commitdiff_plain;h=823a8b91605e0737bea50db56a46a85dbf90a2be;p=minix.git Minor fixes --- diff --git a/commands/ibm/readclock.c b/commands/ibm/readclock.c index b756929ce..047368bee 100755 --- a/commands/ibm/readclock.c +++ b/commands/ibm/readclock.c @@ -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);