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

Re: NFSD status.



> libc/sysdeps/mach/hurd/ioctl.c is where the `ioctl' function is
> defined.  Try following its execution.

Is that a dare? ;-) This particular function is not for the faint of heart.
Each distinct ioctl request on an fd (except for FIO*, which are special
cases handled in libc/hurd/hurdioctl.c) is transmogrified into an RPC
on the io port underlying the fd.  Currently the only example of a set of
such RPCs that are actually implemented is TIOC*, see <hurd/tioctl.defs>.

To get a start on understanding, imagine for example that tcgetattr instead
of calling ioctl(,TIOCGETA,) did the equivalent thing of using the MiG stub
tioctl_tiocgeta.  

> How did I know this?  I already knew that libc/sysdeps/mach/hurd and
> libc/hurd are generally the places to look when you want to start
> understanding how a C library call is implemented on the Hurd, so I
> just looked for files named '*ioctl*' in those directories.

I cannot recommend highly enough using glimpseindex on each and every
source tree you hack on, and using glimpse as casually as you use your
eyelids (M-x grep works great with glimpse -n).  


Reply to: