Article View: comp.sys.amiga.tech
Article #13446Re: Determining disk devices
From: Chuck McManis
Date: Fri, 12 Jan 1990 23:53
Date: Fri, 12 Jan 1990 23:53
34 lines
2525 bytes
2525 bytes
In article <901@mindlink.UUCP> a464@mindlink.UUCP (Bruce Dawson) writes:
> What do you mean 'check for an environment vector'? There seem to be so
>many different ways of finding out whether a device is a disk or not (I've seen
>three in the last few days), I wonder which is the best.
The environment vector describes the disk attached to the device, this is
essentially the stuff that the Mountlist entries contain. For disk devices,
the structure DevInfo (defined in <libraries/dosextens.h>) has a pointer
to a FileSystemStartup message in DevInfo->dvi_Startup. Since only things
with filesystems have this "message" you get only "disks". The filesystem
startup message is defined in <libraries/filehandler.h> and has a pointer
to an "environment vector" (now a structure in 1.3) and that vector has
things like "Blocks/Track", "Heads", etc, etc.
> Of course this also brings up the issue of what actually should be
>displayed in a file requester device list. Should assigns be displayed (it can
>be really handy if they are). Should the drive name or the volume name be
>displayed, or both?
>.Bruce.
The question might be more accurately phrased as "What does one display
as the top level for a multirooted tree structure browser?" And the
answer of course varies to taste. One can think of the "Assigns" as
the level above the roots of the the various file systems and the
devices as being the roots above those. My "Life" file requester
displays Volume names when you click "Parent" and you are at the root
of the current filesystem. At the right hand column you can see which
devices those volumes are currently mounted in (if you don't care to
pop the disk out of DF1: to see what the volume name on it is).
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@Eng.Sun.COM
These opinions are my own and no one elses, but you knew that didn't you.
"If it didn't have bones in it, it wouldn't be crunchy now would it?!"
Technical Details
Message-ID:
<130201@sun.Eng.Sun.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!apple!sun-barr!newstop!sun!stpeter!cmcmanisReferences:
<901@mindlink.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!usc!apple!sun-barr!newstop!sun!stpeter!cmcmanis From: cmcmanis@stpeter.Sun.COM (Chuck McManis) Newsgroups: comp.sys.amiga.tech Subject: Re: Determining disk devices Message-ID: <130201@sun.Eng.Sun.COM> Date: 12 Jan 90 23:53:11 GMT References: <901@mindlink.UUCP> Sender: news@sun.Eng.Sun.COM Reply-To: cmcmanis@sun.UUCP (Chuck McManis) Organization: Sun Microsystems, Mountain View Lines: 34