Bug#4265: util-linux_2.5-5.deb: /sbin/clock Seg. faults
Guy Maor wrote:
> On Sun, 25 Aug 1996, Erik B Andersen wrote:
> > Package: util-linux
> > Version: 2.5-5
> >
> > /sbin/clock seg. faults. The following illustrates this problem:
>
> I can't duplicate this. I'm running 2.0.15, libc5.2.18-10. I skipped
> 2.0.14 but doubt that that's the problem. Are you on a m68k perhaps?
> There were some changes made to clock for that system.
I just ran into this problem myself. There are at least two serious
problems with clock when the real-time clock device is enabled in the
kernel. The following patch fixes them for me.
David
--
David Engel Optical Data Systems, Inc.
david@ods.com 1101 E. Arapaho Road
(214) 234-6400 Richardson, TX 75081
--- clock.c.orig Mon Aug 26 10:26:53 1996
+++ clock.c Mon Aug 26 10:31:38 1996
@@ -365,7 +365,7 @@
}
/* Read the RTC time/date */
- retval = ioctl(cmos_fd, RTC_RD_TIME, &tm);
+ retval = ioctl(cmos_fd, RTC_RD_TIME, tm);
if (retval == -1) {
perror("ioctl");
exit(errno);
@@ -463,7 +463,7 @@
int retval;
- retval = ioctl(cmos_fd, RTC_SET_TIME, tmp);
+ retval = ioctl(cmos_fd, RTC_SET_TIME, tm);
if (retval == -1) {
perror("ioctl");
exit(errno);
Reply to: