Subject: README: EPASSTHROUGH (was ENOIOCTL) -- kernel version bumped
To: None <current-users@netbsd.org>
From: Andrew Brown <atatat@atatdot.net>
List: current-users
Date: 03/17/2002 15:05:24
EPASSTHROUGH (formerly known as ENOIOCTL, but since that name has
certain connotations hindering easy reuse) has just been committed to
-current.  this means that ioctl() calls are now properly restartable,
and some long-standing and annoying bugs should be gone.  note that
EPASSTHROUGH, along with ERESTART and EJUSTRETURN, are "pseudo-errors
returned inside kernel" so they are never actually seen in any user
programs.

the original problem was the overlap of the legitimate ERESTART error
code and of -1 being used an error code to indicate that a given ioctl
"command" was unhandled.  ERESTART has been moved from -1 to -3,
giving the reason for the kernel bump, so that any more instances of
-1 being returned can be more easily weeded out.

code that used to return -1 (and in a lot of cases EINVAL or ENOTTY)
in the ioctl path has now been converted to use EPASSTHROUGH to
indicate properly that a "command" was unhandled and that another
"layer" should be called.  any function that still manages to return a
-1 will generate a kernel message to that effect to aid in tracking
down the offending code.

while i certainly don't expect that there will be any problems with
this, please report any that you find via send-pr.

enjoy.  :)

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."