[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 7.286::atarist

Title:Atari ST, TT, & Falcon
Notice:Please read note 1.0 and its replies before posting!
Moderator:FUNYET::ANDERSON
Created:Mon Apr 04 1988
Last Modified:Tue May 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:1433
Total number of notes:10312

557.0. "Volume Labels - a bit too sticky!" by MINDER::GILBERT (North UK Region Appl'n Centre @MCO) Wed Aug 02 1989 16:53

    
    I'm trying to write some non-Gem software to allow the volume label
    of a disk to be set or changed without re-formatting.
    
    Here's what I've found so far:-
    
    The volume label is held as a directory entry with a particular
    attribute/mode setting, IS_VOL in the Dlibs STAT.H definition.
    
    If you format a disk without a volume label, no directory entry is created.
    A program can simply create a file with IS_VOL mode. No problem.
    
    However, if a label already exists, I can't get rid of it prior
    to creating a new one. Deleting it results in "file not found" status.
    Changing its mode to a normal file returns the same. Renamimg it,
    same again.
    
    Creating a volume label without deleting the old one works, but
    the old one takes precedence.

    Any ideas??
    
T.RTitleUserPersonal
Name
DateLines
557.1A.B.A.C.U.S library has 2 such tools.REGENT::LOMICKARoy LomickaWed Aug 02 1989 21:3810
************************************************************************
UTILITY.002  Utilities & Tools
************************************************************************
\VOLUME\     4K Allows you to change the volume name of a disk


************************************************************************
UTILITY.010  Utilities & Tools
************************************************************************
\VOLUME\     5K Adds or changes the volume name of a disk.
557.2OK, but how...MINDER::GILBERTNorth UK Region Appl'n Centre @MCOThu Aug 03 1989 08:3612
    
    OK, so it can be done then - the question is how?
    
    I want to incorporate the functionality into my own software, but
    I'd prefer not to have to resort to hacking raw disk sectors.

    Would anybody with a copy of one of the tools in .-1 be kind enough
    to track through with a debugger to find the method used? (My ATARI
    isn't on-line, so it is a big deal for me to download the software
    myself).
    
    Brian.    
557.3Do it by hand.PRNSYS::LOMICKAJJeff LomickaThu Aug 03 1989 13:357
Use RWABS and GETBPB to search the root directory for an entry with the
volume label flag set.  If you find it, change the name.  If not, create
one in the usual way.

Be sure that you don't use RWABS immediately following a media change.
Get an MSDOS internals book to find out the exact bit locations.

557.4Incompatibility under TOS 1.4RODNEY::PETERSDon Peters, CTC2-1/F10, 287-3153Thu Aug 03 1989 17:229
There may be an unexpected bit of a problem here. I have been using one of
the volume labeling programs under TOS 1.0 (the ROM version), and while it
worked fine there, it does not seem to work properly under my new TOS 1.4.
In fact, it doesn't work at all!

I recall some USENET mailings from Atari saying they had changed something
about the way a volume label is attached to a disk, but I don't know the
details.

557.5LDP::WEAVERLaboratory Data Products/ScienceThu Aug 10 1989 17:065
I think with TOS 1.4 you can change the volume label using the SHOW INFO
pulldown menu, not positive however.  If I think of it I will try it and
report.

							-Dave
557.6Caveat !MUNCSS::BURKEJim Burke, @UFCThu Aug 10 1989 21:5610
    I've given up trying to change volume labels. I've trashed a couple of
    disks using PD 'Vol-label-changer' programs, and I'm not going to risk
    it again.
    
    I generally use DC-Format (80/10). It's probably this formatting that
    upsets the Vol-label-change programs. I benchmarked DC-F against
    several other formatters, and DC-F came out best. It's reliable and
    fast, and so my Vol-labels can stay the way they are.
    
    Jim Burke
557.7Not looking good..MINDER::GILBERTNorth UK Region Appl'n Centre @MCOFri Aug 11 1989 07:3617
    The notes on the apparent flakiness of current PD utilities suggests
    they use low-level operations to patch the label.
    
    If I can just take you back to the base note: I would like to program
    volume label changing into my own software. The volume label is
    held as a directory entry and can be created OK because the mode
    flags can be specified with the Create call. What I need is to either
    delete or rename the label. Unfortunately both the Delete and Rename
    calls assume normal file mode flags only, hence never find the current
    label.
    
    Is there any 'clean' way of doing the job?
    
    Rgds, Brian
    
    
557.8Sorry. Fixed in TOS 1.4CANDID::stephConstants aren't. Variables don't.Fri Aug 11 1989 19:476
No, there is no way to do this in TOS before 1.4, if I recall Alan
Pratt's USENET message correctly.

A change-volume label system call was added in 1.4.

Steph
557.9Fattrib()?IOWAIT::MESSENGERBe excellent to each other.Fri Aug 11 1989 21:064
    Why don't you use Fattrib() {GEMDOS function 67} to clear the
    volume-label attribute bit?
    				- hbm
    
557.10No joyMINDER::GILBERTNorth UK Region Appl'n Centre @MCOTue Aug 15 1989 14:0912
    re .9:
    
    Fattrib returns "file not found" - it looks like when GEMDOS
    does a search for a file when executing an rename, delete or
    attrib call it always ignores volume labels and directories. Not
    too surprising I suppose, the consequences of changing a data file
    into a directory could be interesting!
    
    Thanks for all replies, looks like its a case of "fixed in the next 
    release" - now where have I heard that before...?
    
    Rgds, Brian
557.11NeoDesk V2.0 has Volume Name ChangeLDP::WEAVERLaboratory Data Products/ScienceTue Aug 15 1989 22:134
NeoDesk seems to support the function, although I must admit that I haven't
actually tried it.

						-Dave
557.12Neodesk has its own conventionRODNEY::PETERSDon Peters, CTC2-1/F10, 287-3153Wed Aug 16 1989 12:5012
>NeoDesk seems to support the function, although I must admit that I haven't
>actually tried it.

Yes, but Neodesk uses its own convention for volume labels. They did this
because it looked like Atari was going to drop support for volume labels
in TOS 1.4. Atari changed their mind the last minute and decided to support
volume labels.

The Neodesk convention is to make a volume label be the text of a hidden
file. That way it is not limited to the format of a filename. Nice...but
now there are two standards for volume labels.