Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!ames!oliveb!sun!cmcmanis From: cmcmanis@sun.UUCP Newsgroups: comp.sys.amiga Subject: Re: How to tell if Volume is Mounted? Message-ID: <15624@sun.uucp> Date: Wed, 25-Mar-87 14:13:15 EST Article-I.D.: sun.15624 Posted: Wed Mar 25 14:13:15 1987 Date-Received: Fri, 27-Mar-87 05:10:39 EST References: <489@batcomputer.tn.cornell.edu> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 26 Keywords: Volume, Mounted, DeviceList Summary: Check the handler field In article <489@batcomputer.tn.cornell.edu>, Dan Green writes: < [] <---- Not needed < Does anyone know how to tell if a Volume is mounted or not? < I use my own varient of Phillip Lindsay's GetDisk, which scans < through the DeviceLists (headed by DevInfo) and reports all the < Volume names. But I can't figure out where in the DeviceList < structure the flag for mounted or not-mounted is maintained. It < must be there somewhere because the CLI's INFO command can tell. < So if I give you either a volume name, or a pointer to a < DeviceList (eg from the Volume field in a lock), how could I < determine whether the volume was mounted? Thanks very much < for any information. < -- Dan Green The simple answer is look in the code for the C version of Assign that I wrote on Fish disk fifty something. The real answer is the file handler field. It contains the address of the file handler task that is handling this volume. It will be NULL when the Volume is not mounted. This is also a quick way to check if accessing this volume will cause an 'Insert Disk' requester to appear. -- --Chuck McManis uucp: {anywhere}!sun!cmcmanis BIX: cmcmanis ARPAnet: cmcmanis@sun.com These opinions are my own and no one elses, but you knew that didn't you.