Forum unknown
· Programming
#Help!
13 messages in this thread
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.
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
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?
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?
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
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>
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>
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.
"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
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.
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.
"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
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.