barrett@ektools.UUCP (Chris Barrett) (04/20/88)
Once a device is mounted, how do you get information in a C program about the device if I know the mounted name? For example, how many tracks it has, number of cylinders, the device driver it using, flags value etc. without reading the devs:mountlist file? Is any of this mentioned in the Technical Reference manuals? Any public domain programs (with source) around? Anyone have examples they could share? Thanks. Chris ...rochester!kodak!ektools!barrett
cmcmanis%pepper@Sun.COM (Chuck McManis) (04/21/88)
Reference -- DOS Technical Reference or Bantam AmigaDOS book. First map the 'mounted' name to a device name such as DH0: The data you want is in the 'Environment' vector off of the disk startup message. Look for the device node on the DevInfo list, get the pointer to the FileSystemStartup message, pull off the environment vector, and print out the results. A copy of my info.c program may be useful in seeing how one traverses the DevInfo list. --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.
doug@eris (Doug Merritt) (04/21/88)
In article <50261@sun.uucp> cmcmanis@sun.UUCP (Chuck McManis) writes: >A copy of my info.c program may be useful in seeing how one >traverses the DevInfo list. That, and your assign program, too, have both been very helpful to me as examples several times to date. Thanks for writing them! Doug Merritt doug@mica.berkeley.edu (ucbvax!mica!doug) or ucbvax!unisoft!certes!doug or sun.com!cup.portal.com!doug-merritt
cmcmanis%pepper@Sun.COM (Chuck McManis) (04/22/88)
In article <9027@agate.BERKELEY.EDU> doug@eris.UUCP (Doug Merritt) writes: >That, and your assign program, too, have both been very helpful >to me as examples several times to date. Thanks for writing them! > Doug Merritt doug@mica.berkeley.edu (ucbvax!mica!doug) Thanks for the kudos, but everyone should be aware that when I wrote the original assign program I didn't know about the way dos allocated memory. I had rewritten it, and ARP came out with C. Heaths assembler version of my code. So if you want to use the C Assign as a replacement for Assisn then be aware that the DeviceList and dl_Name data should be allocated DOS style. [(ULONG *)ptr - 1 == length] --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.