[BusyBox] Re: [BusyBox-cvs] busybox/util-linux hwclock.c,1.3,1.4
Robert Griebl
sandman at handhelds.org
Thu Jan 2 09:03:04 UTC 2003
On Thursday 02 January 2003 08:33, Erik Andersen wrote:
> On Thu Jan 02, 2003 at 12:16:57AM -0700, Robert Griebl wrote:
> > Doing this wrong should be punished even harder :)
> > - Robert
> >
> >
> > +#define RTC_SET_TIME _IOW('p', 0x0a, struct linux_rtc_time) /* Set RTC
> > time */ +#define RTC_RD_TIME _IOR('p', 0x09, struct linux_rtc_time)
> > /* Read RTC time */
>
> Interesting. The structs are identical up to the sizeof(struct
> linux_rtc_time). At least for x86, the kernel copy_from_user and
> copy_to_user simply ignore the surplus tm_gmtoff, tm_zone, etc
> fields. I guess the powerpc version tries to worry about the
> extra fields and complains. I had initially added that struct
> but decided it was unnecessary. Guess I was wrong...
>
#define _IOR(type,nr,size) _IOC(_IOC_READ,(type),(nr),sizeof(size))
I think the problem is that the size of the argument is coded into the ioctl
number.
cu
Robert
--
_____________________________________________
Robert 'sandman' Griebl
core member
Project OPIE - the Open Palmtop Integrated Environment
http://opie.handhelds.org | http://www.opie.info (german)
IRC: irc.freenode.net #opie #opie.de
More information about the busybox
mailing list