Q: EINVAL set by read from device driver

Q: EINVAL set by read from device driver

Post by SAMUEL BLA » Sat, 20 Aug 1994 23:50:52


I have been working on a device driver for Solaris, and
an odd error keeps occurring.

Sometimes a read or write of the device driver fails.
But the device driver reports no attempt to read or
write.  When I check the errno after the read or
write it contains EIVAL.  The man page states:

EINVAL  An attempt is made to write to a stream
        linked below a multiplexor.

Does anybody know what this means??

Can I claim that it's not device drivers fault?? (I hope)



1. aio_write or aio_write64 on raw device fail with errno EINVAL?

I want to use aio_write64 on raw device , eg. /dev/rtestlv. the code

s_aiocb64.aio_whence = SEEK_SET;
s_aiocb64.aio_offset = ul_offset;
s_aiocb64.aio_buf = char_buffer;
s_aiocb64.aio_nbytes = ul_nbytes;

if(aio_write64(fid, &s_aiocb64) < 0)
        fprintf(stderr,"aio_write64 errno:%d\n",errno);

but the aio_write64 always returns EINVAL: Indicates that the
aio_whence field does not have a valid value or that the resulting
pointer is not valid.

but the same code works well with block device, eg. /dev/testlv and
jfs file.

can anyone tell me how to use aio_write64 with raw device? many

2. Bridge-nf iptables frustration

3. Help! pty's, read(), and EINVAL

4. Dual Monitors in Linux.

5. gethostbyname_r sets errno to EINVAL?

6. PROBLEM : kernel BUG at page_alloc.c:131

7. Device driver calling another device driver.

8. replacement for hyperterminal?

9. Device driver question (generic device driver)

10. How to set/read serial device pins directly

11. trn: where do you set default newsfeed and other Qs

12. Qs Redhat startup scripts for setting routes