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

disk/misc/Park.lha

Mirror:Random
Showing: i386-amithlon icongeneric icon
No screenshot available
Short:Park devices and loads and ejects media
Author: thomas.richter at alumni.tu-berlin.de (Thomas Richter)
Uploader:thomas richter alumni tu-berlin de (Thomas Richter)
Type:disk/misc
Version:45.2
Architecture:m68k-amigaos >= 2.0.4
Date:2026-07-28
Download:disk/misc/Park.lha - View contents
Readme:disk/misc/Park.readme
Downloads:2173

This tool ejects, parks or restarts a HD unit, either given by its DOS 
device name or the name and unit of the exec device driver. All partitions 
on the parked unit will be unaccessible to the dos afterwards. To be able to
restart the HD, "Park" can be made resident. Park 45.2 and up can also be
used to shutdown handlers.

_____________________________________________________________________________

Version 45.2:

Fast forward, 25 years later... This release adds one new command line
option, STOPHANDLER, which attempts to stop the handler given the
device name by an ACTION_DIE, the handler shutdown code. This can be
used to umount an Lha mounted archive.

_____________________________________________________________________________

Version 1.10.1:

Ooops. Forgot to include the 1.10 correctly. The 1.10 contained actually the
1.09 release of Park. Thanks to Nils Goers for detecting this fault.
_____________________________________________________________________________

Version 1.10:

Major cleanup release. Added checks for some AFAIK undocumented SCSI ASC/ASCQ
values I receive from my CD/RW which broke some commands. Added the "LOAD"
argument to load a device (mainly CD-ROMs and related). Changed the ejection/
loading/parking sequence a bit to keep care of some strange Iomega mechanisms.

_____________________________________________________________________________

Version 1.09:

Added more sanity checks to avoid MuForce hits.

_____________________________________________________________________________

Version 1.08:

If the NOCHECK option is present, Park no longer rejects to "eject"
empty drives, i.e. to open an empty CD drive or similar. 
Thanks to Nils Goers for testing.

_____________________________________________________________________________

Version 1.07:

Fixed a bug that caused an unnecessary "out of memory" failure in case no
disk to be ejected is present.

Park uses now a smarter algorithm to decide whether the given argument is
a dos device or an exec device name.

Better check for the SCSI result codes, the error code returned is now
more "AmigaDos like".
_____________________________________________________________________________

Version 1.06:

Added a workaround for a feature of the gvpscsi.device and the FFS.
_____________________________________________________________________________

Version 1.05:

Added a workaround for a bug in the AmiCFDS, added the NOCHECK option.
_____________________________________________________________________________

Version 1.04:

Internal release, unpublished.
_____________________________________________________________________________

Version 1.03:

Added the EJECT argument - *should* be used with the SCSI argument, too.
Added the EJECTDELAY, STARTDELAY and FLUSHDELAY arguments that define 
command specific delays.
_____________________________________________________________________________

Version 1.02:

Park checks now if a device is already parked (or, to be precise, if the
filing system is shut down) and fails if the user tries to park it again.
_____________________________________________________________________________

Version 1.01:

Added an explicit check whether the handler name supplied does really contain
a colon.
_____________________________________________________________________________

Synopsis:

Park 	HANDLER=DEVICE/A,UNIT/N,FLAGS/N,SCSI/S,
	ON=START/S,EJECT/S,LOAD/S,EJECTDELAY/K/N,STARTDELAY/K/N,
	FLUSHDELAY/K/N,INHIBITDELAY/K/N,NOCHECK/S,STOPHANDLER/S

HANDLER:	DOS Device name to be parked, or name of the volume. To 
		restart a unit, this must be the device name.
		This *must* be the name of the dos device driver, i.e.
		a string like "DH0:" or "SYS:".		
		Alternatively, this may be the name of the exec.device, i.e.
		"oktagon.device" or "gvpscsi.device".

UNIT:		The unit number of the exec device. Makes only sense if
		HANDLER is an exec style device name.

FLAGS:		The flags for opening the device. Defaults to zero and is
		usually not required.

SCSI:		If given, try to park the unit with direct SCSI commands.
		This should work with all scsi.device compatible device
		drivers.
		If not given, try to use the TD_EJECT, CMD_START 
		and CMD_STOP.

		Unfortunately, most device drivers do not support 
		TD_EJECT, CMD_START/STOP. The "SCSI" keyword is 
		therefore almost always required.

ON=START:	Restart the device and the partitions in question.

EJECT:		Eject the given device, if possible. In almost all
		cases the SCSI keyword IS required since there is almost
		no device which implements the - documented though -
		command TD_EJECT

LOAD:		Loads the given device, e.g. CD-ROMs. Since there is no
		exec command that is supposed to support this, the SCSI
		keyword is mandatory here.

EJECTDELAY:	The delay in 50th of seconds Park should wait after
		ejecting and before re-running the filing system. Defaults
		to 50, i.e. one second.

STARTDELAY:	The delay in 50th of seconds Park has to wait after
		having started a device until the filing system is allowed
		to touch the disk again. Thus, this should be the spin-up
		delay of the device. Defaults to 50, i.e. one second.

FLUSHDELAY:	The delay in 50th of seconds Park waits for the filing 
		system to execute ACTION_FLUSH, i.e. to flush its buffers
		to the disk. Unfortunately, this packet is broken - which
		requires this ugly, and unsafe(!) workaround.

INHIBITDELAY:	The delay in 50th of a second park waits after stopping
		the filing system and before parking the device. This is
		required by the gvpscsi.device since this device fiddles
		on its own in the device list of the DOS (Bah!) and may
		lead to enforcer hits of the FFS. Defaults to one second. 

NOCHECK:	Bypasses the test if the filing system of the drive(s) to
		be parked is up and working. If you see a message like
		"Drive xyz is already stopped", but the handler is just
		disabled for whatever reason, insert this argument.

STOPHANDLER:	Attempts to shutdown the handler addressed by the
		HANDLER argument by sending an ACTION_DIE to it. This
		is most useful to unmount temporarily mounted volumes
		such as those created by Lha.

_____________________________________________________________________________

Examples:

Park all partitions on the oktagon.device, unit 2: 
(The oktagon knowns CMD_STOP, SCSI is not required)

	Park oktagon.device unit 2


Park all partitions on the gvpscsi.device, unit 6:
(The gvpscsi.device does NOT know the CMD_STOP, SCSI is required)

	Park gvpscsi.device unit 6 scsi

The "device" keyword is very important in both cases.


Park the partition DH0: and all other partitions on the same device:

	Park DH0: scsi


Restart DH0: and all other partitions on that device:

	Park DH0: on scsi


Eject a ZIP drive, named ZIP:

	Park ZIP: scsi eject


Eject a SCSI CD, named CD0:

	Park CD0: scsi eject nocheck flushdelay=0 ejectdelay=0

A flush delay isn't needed here because a CD file system can't write
anything to a CD.


Unmount an Lha mounted volume from "Install.lha", named Install:

	Park Install: STOPHANDLER

_____________________________________________________________________________

                     The THOR-Software Licence (v3, January 2nd 2021)


This License applies to the computer programs known as the "Park". The
"Program", below, refers to such program. The "Archive" refers to the
package of distribution, as prepared by the author of the Program,
Thomas Richter. Each licensee is addressed as "you".


The Program and the data in the archive are freely distributable
under the restrictions stated below, but are also Copyright (c)
Thomas Richter.

Distribution of the Program, the Archive and the data in the Archive by a
commercial organization without written permission from the author to any
third party is prohibited if any payment is made in connection with such
distribution, whether directly (as in payment for a copy of the Program) or
indirectly (as in payment for some service related to the Program, or
payment for some product or service that includes a copy of the Program
"without charge"; these are only examples, and not an exhaustive
enumeration of prohibited activities).


However, the following methods of distribution involving payment shall not
in and of themselves be a violation of this restriction:

(i) Distributing the Program on a physical data carrier (e.g. CD-ROM,
    DVD, USB-Stick, Disk...) provided that:

a) the Archive is reproduced entirely and verbatim on such data carrier,
   including especially this licence agreement;

b) the data carrier is made available to the public for a nominal
   fee only, i.e. for a fee that covers the costs of the data carrier,
   and shipment of the data carrier;

c) a data carrier with the Program installed is made available to the
   author for free except for shipment costs, and

d) provided further that all information on said data carrier is
   redistributable for non-commercial purposes without charge.


Redistribution of a modified version of the Archive, the Program or the
contents of the Archive is prohibited in any way, by any organization,
regardless whether commercial or non-commercial. Everything must be kept
together, in original and unmodified form.



Limitations.


THE PROGRAM IS PROVIDED TO YOU "AS IS", WITHOUT WARRANTY. THERE IS NO
WARRANTY FOR THE PROGRAM, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. THE ENTIRE
RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD
THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
SERVICING, REPAIR OR CORRECTION.


IF YOU DO NOT ACCEPT THIS LICENCE, YOU MUST DELETE THE PROGRAM, THE ARCHIVE
AND ALL DATA OF THIS ARCHIVE FROM YOUR STORAGE SYSTEM. YOU ACCEPT THIS
LICENCE BY USING OR REDISTRIBUTING THE PROGRAM.


                                                        Thomas Richter

-----------------------------------------------------------------------------

So long,
	Thomas			June 2026



Contents of disk/misc/Park.lha
 PERMSSN    UID  GID    PACKED    SIZE  RATIO METHOD CRC     STAMP          NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
[Amiga]                   2636    4248  62.1% -lh5- bec3 Jul 28 19:26 Park
[Amiga]                   4050   10363  39.1% -lh5- cefc Jul 28 19:24 Park.readme
---------- ----------- ------- ------- ------ ---------- ------------ -------------
 Total         2 files    6686   14611  45.8%            Jul 28 23:26
Page generated in 0.03 seconds
Aminet © 1992-2024 Urban Müller and the Aminet team. Aminet contact address: <aminetaminet net>