Path: utzoo!attcan!uunet!aplcen!samsung!rex!ukma!kherron From: kherron@ms.uky.edu (Kenneth Herron) Newsgroups: comp.sys.amiga.tech Subject: Device driver from device name? Message-ID: <16014@s.ms.uky.edu> Date: 16 Sep 90 01:26:03 GMT Reply-To: kherron@ms.uky.edu (Kenneth Herron) Distribution: na Organization: U of Kentucky, Mathematical Sciences Lines: 34 I hope somebody out there can help me with a problem that's driving me crazy. I'm trying to write a program that operates on units managed by trackdisk.device (ie, floppy disks). Part of the command line would specify which drive(s) to operate on. For the user's convenience I want to allow names like DF0:, WorkBench:, SYS:, etc. In other words, the user may specify an actual drive name, a volume that's in a disk drive, or even an assign to a directory on a floppy, and my program should correctly determine which drive to act on. SOOO...I have to make sure, once I've "dereferenced" the given name to an actual device like DF0:, RAM:, or whatever, that the referenced drive is actually controlled by trackdisk.device, without hard-coding names like DF0: into the program--for instance, if the user mounted DF0: and DF1: as A: and B:. My problem is that for one solid week now I've been unable to find one shred of a way to see what driver is controlling what device. I can follow the exec list of devices to find trackdisk.device, no problem. I can follow the device list (SER:, PRT:, et al) to find DFx:, no problem. But no way to determine "trackdisk.device controls these devices" or "this device is controlled by trackdisk.device". My last good idea was to open trackdisk.device and extract the MsgPortPtr from the initialized ioRequest structure, with the intent of comparing it to the MsgPortPtr in the device entry for DF0:. But The MsgPortPtr from trackdisk.device was null, a value deliberately written there by opendevice(). (How can this be right? Once you open a device you're supposed to be able to send it messages, no?) Any help would be appreciated... Kenneth Herron