Hangar.La tienda de software del Amiga

HasDevice 1.0

Checks for the existence of a device

Short:        Checks for the existence of a device
Author:       Brielle Harrison
Uploader:     nyteshade gmail com (Brielle Harrison)
Type:         util/cli
Version:      1.0
Architecture: m68k-amigaos
Distribution: Aminet

When writing shell scripts for myself, I often found the need
to fork based on whether or not I was working in an emulated
environment like WinUAE or on a real Amiga. One way of doing
this was to check for the existence of uaehf.device vs.
scsi.device or something along those lines.

This is the work of an hour or two to solve that problem. It
accomplishes the task I needed which is to do the following:

1. Allow me to specify any device name
2. Return 5 (WARN) if the device could not be opened
3. Specify a unit number or default to 0
4. Optionally quiet output for scripts
5. Have helpful usage information

The source is included. The software license is do whatever you
want with it.


**Compiled with SAS/C 6.58 using "sc link HasDevice.c"**
**A version shrunken with Shrinkler is included; HasDevice.s**
**Shrinkler version has no version information**

Enjoy!

- Brie

Gratis

Descargar 15 KB

Desde el Amiga: abre Hangar y busca HasDevice.

AutorBrielle Harrison
Categoríautil/cli
Tamaño15 KB
Fecha2025-12-29
Param68k-amigaos
OrigenAminet