Simpler Navigation for Servers and Operating Systems - Please Update Your Bookmarks
Completed: a much simpler Servers and Operating Systems section of the Community. We combined many of the older boards, so you won't have to click through so many levels to get at the information you need. Check the consolidated boards here as many sub-forums are now single boards.
If you have bookmarked forums or discussion boards in Servers and Operating Systems, we suggest you check and update them as needed.
Showing results for 
Search instead for 
Did you mean: 

altering read() system call behavior

Occasional Contributor

altering read() system call behavior



I've been tasked with porting existing Linux functionality to our HP-UX client.  A previous question, passthru devices, was answered quickly so I thought I'd ask another.


I've been pouring over the web and HP-UX documentation, but have been unable to determine if what the Linux client is doing is possible on HP-UX.  Scenario:


Multiple scsi commands can be issued to read from the SCSI attached device, and I need to guarantee that the read order of the packets returned is sequential, regardless of order returned.


On Linux, there is an ioctl() call


ioctl(fd, SG_SET_FORCE_PACK_ID, &one)


that according to /usr/include/scsi/sg.h file does:


"When SG_SET_FORCE_PACK_ID set to 1, pack_id is input to read() which tries to fetch a packet with a matching

 pack_id, waits, or returns EAGAIN.  If pack_id is -1 then read oldest waiting.  When ...FORCE_PACK_ID set to 0 then

 pack_id ignored by read() and oldest readable fetched."


Is there something similar within HP-UX?