From 823a8b91605e0737bea50db56a46a85dbf90a2be Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Fri, 5 Aug 2005 12:52:26 +0000 Subject: [PATCH] Minor fixes --- commands/ibm/readclock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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); -- 2.44.0