Re: [PATCH 15/25] autofs: move ioctl32 to autofs{,4}/root.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 8 Nov 2005, Ian Kent wrote:

> >  
> > > Its been a while since I trawled through the compat ioctl code (please 
> > > point me to the right place) but with this change I think that the 
> > > AUTOFS_IOC_SETTIMEOUT32 is redundant. Consider a conditional define for 
> > > AUTOFS_IOC_SETTIMEOUT in include/linux/auto_fs.h instead. Both autofs and 
> > > autofs4 use that definition.
> > 
> > The point here is that the two are different on 64 bit platforms, since
> > sizeof (int) != sizeof (long). You also can't do
> > 
> > switch (cmd) {
> > case AUTOFS_IOC_SETTIMEOUT32:
> > case AUTOFS_IOC_SETTIMEOUT:
> > 	return do_stuff();
> > }
> > 
> > because then gcc would complain about duplicate case targets on 32 bit
> > targets.
> 
> I was thinking that if the module was compiled for 64bit then the 64bit 
> definition would prevail and visa versa.
> 
> eg. In the include file.
> 
> #ifdef COMPAT_IOCTL
> #define AUTOFS_IOC_SETTIMEOUT(..., unsigned int)
> #else
> #define AUTOFS_IOC_SETTIMEOUT(...,unsigned long)
> #endif
> 
> I think I'm going to have to investigate further following the 
> implementation.

Yes. I see now, stupid suggestion.

> 
> > 
> > If you are sure you don't need the BKL, then you should also replace
> > ".ioctl = ..." with ".unlocked_ioctl = ...".
> 
> Yep. I'll check and amend it later.
> After all it will be part of the module then.

Yep. I'll do that.

Ian

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux