AminetAminet
Search:
84512 packages online
About
Recent
Browse
Search
Upload
Setup
Services

disk/misc/ExistsSCSIDEV.lha

Mirror:Random
Showing:ppc-morphosgeneric
No screenshot available
Short:Exists check for SCSI device.
Author:lars at rotebo.nl (Lars Van Jeurissen)
Uploader:lars rotebo nl (Lars Van Jeurissen)
Type:disk/misc
Version:1.0
Requires:AmigaDOS 2.04+
Architecture:m68k-amigaos
Distribution:freely distributable
Date:2001-09-23
Download:http://aminet.net/disk/misc/ExistsSCSIDEV.lha - View contents
Readme:http://aminet.net/disk/misc/ExistsSCSIDEV.readme
Downloads:657

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 at 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


Contents of disk/misc/ExistsSCSIDEV.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO     CRC       STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[generic]                   40      40 100.0% -lh0- d30e Sep  7  2001 .info
[generic]                12785   23820  53.7% -lh5- a899 Sep 21  2001 ExistsSCSIDEV
[generic]                 4611   14028  32.9% -lh5- 67b9 Sep 21  2001 ExistsSCSIDEV.c
[generic]                 2290    5821  39.3% -lh5- ce09 Sep 21  2001 ExistsSCSIDEV.guide
[generic]                  263     503  52.3% -lh5- 4880 Mar  8  2000 ExistsSCSIDEV.guide.info
[generic]                 1819    3962  45.9% -lh5- 03a8 Sep 15  2001 ExistsSCSIDEV.readme
[generic]                  158     338  46.7% -lh5- 68eb Sep 21  2001 ExistsSCSIDEV.testscript
[generic]                  273     624  43.8% -lh5- 149f Sep 21  2001 lmkfile
[generic]                   46      54  85.2% -lh5- bd37 Sep 15  2001 sascopts
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         9 files   22285   49190  45.3%            Sep 23  2001

Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>