Article View: comp.sys.next.programmer
Article #708/dev/sg0
From: 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
===========================================================================
Technical Details
Message-ID:
<1992Apr15.203248.26982@cbnewsl.cb.att.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!wupost!uwm.edu!linac!att!cbnews!cbnewsl!ihcoco!cocoShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!wupost!uwm.edu!linac!att!cbnews!cbnewsl!ihcoco!coco From: coco@ihcoco.att.com (Felix A. Lugo) Subject: /dev/sg0 Organization: AT&T Bell Laboratories, Naperville, IL Date: Wed, 15 Apr 1992 20:32:48 GMT Message-ID: <1992Apr15.203248.26982@cbnewsl.cb.att.com> Sender: news@cbnewsl.cb.att.com (NetNews Administrator) Nntp-Posting-Host: ihcoco.ih.att.com Lines: 30