CompuServe Thread

Forum unknown · Programming

#Help!

13 messages in this thread
#33225From: Severin ShoresSep 15, 1986 7:18 PM
Any Amiga experts out there? How can I get the volumn name of a disk? How can I detect a disk change? Any help would be appreciated.
#33285From: Don Curtis/SYSOPSep 16, 1986 1:00 AM
Sev, For diskchange…read section 3.4 of RKM #1 thru to 3.11. For the volumn name, try reading the root block…it's there as a BCPL string, it's in the beginning of the DOS tech users manual. Don
#33314From: Severin ShoresSep 16, 1986 3:03 AM
Thanks for the info about diskchange — guess I overlooked it in the RKM. However, on the volume name — there's got to be a better way — the warning is "All internal AmigaDOS calls use the Shared Global Vector, which is a jump table. You should not normally use it, except through the supplied interface calls, as it is liable to change without warning". Do you know if there are any supplied interface calls for reading the volume name?
#33314From: Severin ShoresSep 16, 1986 3:03 AM
Thanks for the info about diskchange — guess I overlooked it in the RKM. However, on the volume name — there's got to be a better way — the warning is "All internal AmigaDOS calls use the Shared Global Vector, which is a jump table. You should not normally use it, except through the supplied interface calls, as it is liable to change without warning". Do you know if there are any supplied interface calls for reading the volume name?
#33285From: Don Curtis/SYSOPSep 16, 1986 1:00 AM
Sev, For diskchange…read section 3.4 of RKM #1 thru to 3.11. For the volumn name, try reading the root block…it's there as a BCPL string, it's in the beginning of the DOS tech users manual. Don
#33288From: Mowgli AssorSep 16, 1986 1:09 AM
I don't know if you mean from within a program, but if you mean from the CLI, use the info command. If you have the appropriate manuals, (Rom Kernal, etc.), it would explain library calls to do the same sort of thing. Later, <MOWGLI>
#33288From: Mowgli AssorSep 16, 1986 1:09 AM
I don't know if you mean from within a program, but if you mean from the CLI, use the info command. If you have the appropriate manuals, (Rom Kernal, etc.), it would explain library calls to do the same sort of thing. Later, <MOWGLI>
#33337From: Steve AhlstromSep 16, 1986 5:39 PM
The easiest way to get to the volume name is to grab a structure off of your Lock() statement. Lock() returns a structure pointer (BPTR — not doc'ed in the manual). lock->fl_Volume points to a DevInfo structure. Grab the volume name from it's Name element. It's a pointer to a BSTR. See pages 3-5 thru 3-8 of the AmigaDOS Technical Reference manual. Once you get that figured out getting to finding out about disk changes should be 'INTUITive'ly obvious.
#33516From: Bela LubkinSep 18, 1986 8:46 AM
"finding out about disk changes should be 'INTUITive'ly obvious." — do you mean that you can detect a disk change by watching the volume name? Watch out: AmigaDOS distinguishes between different disks with the same volume name, by looking at an additional "unique" field. I'm not sure if that's simply the time/date stamp of volume creation, or if it's an entirely seperate field. In any case, your code had better recognize a disk change IFF AmigaDOS would have (or did), or you are going to have situations that will really confuse your users. – Bela
#33523From: Steve AhlstromSep 18, 1986 10:39 AM
Go back and reread the AmigaDOS Tech manual (and the structure defs in RKM 2). Between the 'magic' number and the volume name everything you need is available in the linked structures.
#33523From: Steve AhlstromSep 18, 1986 10:39 AM
Go back and reread the AmigaDOS Tech manual (and the structure defs in RKM 2). Between the 'magic' number and the volume name everything you need is available in the linked structures.
#33516From: Bela LubkinSep 18, 1986 8:46 AM
"finding out about disk changes should be 'INTUITive'ly obvious." — do you mean that you can detect a disk change by watching the volume name? Watch out: AmigaDOS distinguishes between different disks with the same volume name, by looking at an additional "unique" field. I'm not sure if that's simply the time/date stamp of volume creation, or if it's an entirely seperate field. In any case, your code had better recognize a disk change IFF AmigaDOS would have (or did), or you are going to have situations that will really confuse your users. – Bela
#33337From: Steve AhlstromSep 16, 1986 5:39 PM
The easiest way to get to the volume name is to grab a structure off of your Lock() statement. Lock() returns a structure pointer (BPTR — not doc'ed in the manual). lock->fl_Volume points to a DevInfo structure. Grab the volume name from it's Name element. It's a pointer to a BSTR. See pages 3-5 thru 3-8 of the AmigaDOS Technical Reference manual. Once you get that figured out getting to finding out about disk changes should be 'INTUITive'ly obvious.