The Purpose of this program is that you can check if you have your
cdrom/scanner or other scsi device turned on. This program give a
standard RETURN_OK or RETURN_FAIL/RETURN_WARN return value. Based on
that you can perform some conditional actions, like mounting when the
device is available, etc. I mount my devices from DEVS:DosDrivers, but
when I forgot to turn my CDROM on I always got a lot of problems. So
when I didn't want my CDROM to be mounted, I had to move the MountFile
CD0 to SYS:Storage/DosDrivers. See the next snippet of my startup-sequence
to get the general Idea of this program
snippet of my startup-sequence!
ExistsSCSIDEV DEVICE scsi.device UNIT 2 TYPE CDROM
IF NOT WARN
  Copy SYS1:Storage/DosDrivers/CD0 devs:DosDrivers QUIET
  Copy SYS1:Storage/DosDrivers/CD0.info devs:DosDrivers QUIET
EndIf
IF EXISTS SYS:Devs/DOSDrivers
	  Mount >NIL: SYS:Devs/DosDrivers/~(#?.info)
EndIF
IF EXISTS Devs:DosDrivers/CD0
  Delete Devs:DosDrivers/CD0 Devs:DosDrivers/CD0.info QUIET
EndIf
Change Moumtfile name to the one you use, or if you mount directly
from Mountlist you have to do the mounting where I do the copying.
Usage:
ExistsSCSIDEV DEVICE/K,UNIT/K/N,TYPE/K,VERBOSE/S,HELP/S
Example:
ExistsSCSIDEV DEVICE scsi.device UNIT 2 TYPE CDROM VERBOSE HELP
valid TYPEs are:
     DIRECT, SEQUENTIAL,    PRINTER,        CPU,  WRITEONCE,      CDROM,
    SCANNER, OPTICALMEM, MEDIUMCHGR,       COMM,    ASC1IT8,    ASC2IT8,
  RESERVED1,  RESERVED2,  RESERVED3,  RESERVED4,  RESERVED5,  RESERVED6,
  RESERVED7,  RESERVED8,  RESERVED9, RESERVED10, RESERVED11, RESERVED12,
 RESERVED13, RESERVED14, RESERVED15, RESERVED16, RESERVED17, RESERVED18,
 RESERVED19,    UNKNOWN,
VERBOSE gives out extra information. If you don't know what type your
device is, you will get information about the type which was found.
SCSI-2 Compiliant Device           <-- SCSI-1 or SCSI-2 device type
Wanted Device: CD-ROM device       <-- Description of the wanted device type
Parsed Type Argument: CDROM        <-- Here you find the wanted device type
Actual Device Found: CD-ROM device <-- Description of the found device type
Required Type Argument: CDROM      <-- Here you find the found device type
SANYO   CRD-250S        Rev:1.19   <-- Inquiry Data from found device
I didn't do any programming on the Amiga for several years. I started
looking at my Amiga a week ago. And I'm pleased with the ease of use and
the clear way to program for the Amiga.
I programmed almost a decade for the Windows environment, which is a very
closed system. It is a shame that the Amiga didn't do better than it.
This example is provided "as-is" and is subject to change; no
warranties are made.  All use is at your own risk. No liability or
responsibility is assumed.
Lars Van Jeurissen		09-16-2001
De Wetstraat 13
6814 AN
Arnhem
The Netherlands
lars@rotebo.nl
============================= Archive contents =============================
Original  Packed Ratio    Date     Time    Name
-------- ------- ----- --------- --------  -------------
      40      40  0.0% 07-Sep-01 23:56:48  .info
   24772   13218 46.6% 15-Sep-01 22:37:10  ExistsSCSIDEV
   13810    4544 67.0% 15-Sep-01 22:34:22  ExistsSCSIDEV.c
     835     394 52.8% 15-Sep-01 22:37:10  ExistsSCSIDEV.info
   17586    3382 80.7% 15-Sep-01 22:37:14  ExistsSCSIDEV.map
     837     316 62.2% 13-Sep-01 01:46:26  ExistsSCSIDEV.map.info
     164     120 26.8% 15-Sep-01 23:20:26  ExistsSCSIDEV.readme
     782     224 71.3% 11-Sep-01 03:43:28  ExistsSCSIDEV.testscript
     513     250 51.2% 15-Sep-01 20:23:28  LMKFILE
      54      46 14.8% 15-Sep-01 20:03:32  SASCOPTS
-------- ------- ----- --------- --------
   59393   22534 62.0% 15-Sep-101 23:22:06   10 files
 |