🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #6821

Re: Finding disks

#6821
From: Hans Ridder
Date: Mon, 19 Nov 1990 18:49
38 lines
2415 bytes
In article <chris.11172988@genly.UUCP> chris@genly.UUCP (Chris Hind Genly) writes:
>I posted a message a few days ago asking how to determine what disk
>devices are on a system.  This is the kind of problem you need to
>solve if you're writing a file requester and want to put up buttons
>with disk device names on them.

>The info replacement walked through the dos device list looking for a
>device with an associated task.

>Once a device is found with a non-zero task entry, it can be tested to
>see if it is really a disk device by trying to lock it.  If you can
>lock it, its a disk.

I don't think it's a good idea to write code which depends on side
effects like this.  (Unless it's written down somewhere that only "disk
devices" know how to Lock() -- I've never seen it.)  As you pointed out,
the Info replacment depended on the perceived effect that only devices
have tasks, which later turned out to be wrong.  There's always a danger
in depending on undocumented side effects.

IMHO, requesters should list *volumes*, not *devices*.  Volume names are
(or can be) much more descriptive to users than are names like "DH0" or
"DF1".  If device names are used, the user might have to click on every
button to find a file, if the right disk is even in a drive.  Devices
(i.e. disk drives) don't have files on them, volumes do.

Notice that the Workbench uses volume names, not devices names.  It'll
be much easier for the user to find the desired file if the names shown
on the requester are consistent with the names he/she just saw on the
Workbench screen.

It's also much easier to find volumes in the device list.

-hans
------------------------------------------------------------------------
  Hans-Gabriel Ridder			Digital Equipment Corporation
  ridder@elvira.enet.dec.com		Customer Support Center
  ...decwrl!elvira.enet!ridder		Colorado Springs, CO
Technical Details
Message-ID: <2008@shodha.enet.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!decuac!bacchus.pa.dec.com!shodha.enet.dec.com!elvira!ridder
References: <chris.11172988@genly.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!wuarchive!udel!haven!decuac!bacchus.pa.dec.com!shodha.enet.dec.com!elvira!ridder
From: ridder@elvira.enet.dec.com (Hans Ridder)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Finding disks
Message-ID: <2008@shodha.enet.dec.com>
Date: 19 Nov 90 18:49:51 GMT
References: <chris.11172988@genly.UUCP>
Sender: news@shodha.enet.dec.com
Organization: Digital Equipment Corporation, Customer Support Center
Lines: 38