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

Re: Analysis of build failures in Debian GNU/Hurd



Dani Doni, le Mon 02 Jul 2007 08:47:49 +0200, a écrit :
> I was trying to fix some of this but I don't know how to use _IOT's.
> Someone knows where to find samples or guides or something to learn
> how to use that macros?

See example in termios.h:

#define _IOT_termios /* Hurd ioctl type field.  */ \
  _IOT (_IOTS (tcflag_t), 4, _IOTS (cc_t), NCCS, _IOTS (speed_t), 2)

because struct termios holds 4 members of type tcflag_ts, then NCCS
members of type cc_ts and finaly 2 members of type speed_ts.

As you can see, this limits the number of kinds of members to 3, and in
addition to that (see the bitfield described in ioctls.h), the third
kind of member is limited to 3 members.  However, since at the API
compatibility layer you are generally allowed to reorder fields in
structures, you can usually manage to fit into these limits.

Note: if a field member is a pointer, then the ioctl can't be expressed
this way, and that makes sense, since the server you're talking to
doesn't have direct access to your memory. Others way than ioctls must
then be found.

Samuel



Reply to: