Thread View: comp.sys.next.programmer
1 messages
1 total messages
Started by Felix A. Lugo
Wed, 15 Apr 1992 20:32
/dev/sg0
Author: Felix A. Lugo
Date: Wed, 15 Apr 1992 20:32
Date: Wed, 15 Apr 1992 20:32
30 lines
1445 bytes
1445 bytes
Hi,
I'm using /dev/sg0 to request a SCSI inquiry of all available
devices on the bus. Here's the algorithm I'm using:
- open /dev/sg0 for read/write
- LOOP (loop:= 0 ; loop < 8; loop:=loop+1)
- set lun:=0 and target:=loop -- ioctl (SGIOCSTL)
- send inquiry command -- ioctl (SGIOCREQ)
- print results
- close /dev/sg0
The above procedure works properly, but every now and then, it fails
to detect ALL SCSI devices!
BTW, I've checked the SG(4) man page, and some SCSI examples from
the net. They all display the same behavior!
What's going on? Is it a NeXT problem, or am I missing something
in the above algorithm?
---
===========================================================================
Felix A. Lugo
E-Mail: (NeXTmail preferred) Felix_A_Lugo@ATT.COM
coco@ihcoco.att.com
AT&T NeXT User Group nug@ihcoco.att.com
HOME NeXTcube home@ihcoco.att.com
===========================================================================
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads