View Single Post
Old 19 July 2021, 06:07   #4
Warty
Registered User
 
Join Date: Aug 2018
Location: Minneapolis, USA
Posts: 301
<phew> got it working. Biggest help was from here:
https://forum.amiga.org/index.php?topic=73225.0

I'll post the code tomorrow after some clean-up. In essence, you go through the device list from DOSBase->dl_Root->rn_Info, look at each one with dl_Type == DLT_VOLUME to get the volume names, then pass that to another routine that goes through dvi->dvi_Type == DLT_DEVICE items, and compares dvi->dvi_Task to the dl_Task from the first function. If they match, it's the same drive/volume, and you have access to the device name (eg, DF0 and the 'driver' name (scsi.device, etc.).

I also found this little nugget, which suggests how AmigaDOS keeps them distinct:
Quote:
To distinguish disks with the same name, AmigaDOS timestamps the volume on creation and then saves the timestamp in the list structure. AmigaDOS can therefore compare the timestamps of different volumes whenever necessary.
https://wiki.amigaos.net/wiki/AmigaDOS_Data_Structures

So far my device name + volume name is adequate to keeping windows from various disks separate.
Warty is offline  
 
Page generated in 0.08125 seconds with 11 queries