Fix __retval vs. retval confusion: retval is meant to store the (userland)

pointer where data is to be returned by ibask() (currently unimplemented),
while __retval holds the value returned by the libgpib ibfoo() functions.

The confusion resulted in the ibfoo() functions returning an uninitialized
value except in situations where the GPIB activity has been terminated
abnormally.

MFC after:	3 days
This commit is contained in:
Joerg Wunsch 2010-12-10 14:04:41 +00:00
parent b0032ab5f8
commit 933be1f00c

View File

@ -1019,7 +1019,7 @@ gpib_ib_ioctl(struct cdev *dev, u_long cmd, caddr_t data, int fflag, struct thre
ap->__iberr = 0;
ap->__ibsta = 0;
ap->__ibcnt = 0;
ap->retval = 0;
ap->__retval = 0;
if (ap->__field & __F_TMO) {
if (ap->tmo < 0 || ap->tmo >= max_timeouts)