| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Volume labels |
Hi, Frank.
FA> FA> if(f.ff_attrib == FA_LABEL) printf("Label : %s",f.ff_name);
FA> FM> There is also a DOS call to do that, int $21 function $69 minor $00.
FA> FM> But beware that it gets the VolId from the *boot sector*, not the
FA> FM> directory entry with the VolId attribute set. Some older non-DOS
FA> FM> utilities may set the directory entry but not the boot sector VolId.
FA> Yep, i found it in Ralph Brown's interrupt list, good idea to get it
FA> from there, it's only DOS4+ but i suppose older ones shouldn't be around
FA> now.
You could check the DOS version, if it's less than 4 do a FindFirst/Next
to get it from the root directory, if not do the $6900 call. Or do both,
but then what do you do if the one in the root directory is different
from the one in the boot sector? :-)
FA> FM> (That call also gets the disk serial number. If you want details I'll
FA> FM> post the function from my 'useful' library. In Pascal, OF COURSE. :-))
FA> It's ok, i've made one just to test it, and i also found a copy in
FA> Snippets. It does bother me that said function has no critical error
FA> checking though if the drive is not ready it just hangs the machine.
FA> Of course i could've done something previously that left the machine in a
FA> bad state, but unlikely.
Sure, I never do that either. :-)
FA> Who ever heard of playing with interrupts can crash a PC ? ;-)
:-)
FA> Must be a way around that error checking, but i don't really want to
FA> install a harderr routine just for this function, i'm yet to look at
FA> the one in Snips see if that does better.
I suspect you'll have to do that, probably should do anyway if you're
accessing a floppy which might not be present.
BTW, you may not need to actually install an interrupt handler, just use
FindFirst. If the floppy is not there you don't hang but get DosError =
152. Sorry, that's in Pascal, don't know what the equivalent is in C,
presumably the function returns an error code.
Regards, fIM.
* * And they said unto Jesus, How the Hell did you do that?
@EOT:
---
* Origin: Pedants Inc. (3:711/934.24)SEEN-BY: 711/808 934 @PATH: 711/934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.