Mail Archives: djgpp/2000/11/09/10:15:22
"Eli Zaretskii" (eliz AT is DOT elta DOT co DOT il) writes:
>> From: ad354 AT FreeNet DOT Carleton DOT CA (James Owens)
>> I compiled the unmodified source under Win98 and I get different
>> behaviour. It will label the diskette without truncating, but only if the
>> diskette is not already labelled (that gets "error setting volume label".)
>
> This is a different problem, it comes out of the code that actually
> puts the label on the floppy. I suggest to solve one problem at a
> time; if you want to solve this one first, post here the code which
> labels the disk.
Here are what seem to be the relevant bits of volumelabel():
/*---------------------------------------------------------------------------
If not previously labelled, write a new label. Otherwise just rename,
since MS-DOS 2.x has a bug that damages the FAT when the old label is
deleted.
---------------------------------------------------------------------------*/
regs.h.ah = 0x17; /* FCB rename */
F_intdosx(®s, ®s, &sregs);
if (regs.h.al) {
Trace((stderr, "Unable to change volume name (AL = %x)\n",
regs.h.al));
retv = 1;
F_intdosx is defined thus (for non-Watcom compilers):
# define F_intdosx(ir,or,sr) intdosx(ir, or, sr)
--
James Owens ad354 AT Freenet DOT carleton DOT ca
Ottawa, Ontario, Canada
- Raw text -