Date: Tue, 3 Nov 1998 10:50:16 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Martin Str|mberg cc: DJGPP-WORKERS Subject: Re: df adventures In-Reply-To: <199811021736.SAA17007@father.ludd.luth.se> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp-workers AT delorie DOT com On Mon, 2 Nov 1998, Martin Str|mberg wrote: > This patch makes "df" work, i. e. R: is seen under condition that > there is a CDROM with data in the drive. "df r:" works fine too in > this case. Thanks for testing. DJ, would you please apply this patch (attached below)? > So one solution would be changing the first line to "show_dev (0, mp, > "");" Another one would be changing the second one to "if (fstype && > strcmp (fstype, "join") == 0)". There's perhaps more of them. But I > don't know what is the Right Way(tm) to do it. Perhaps Eli has the > right answer? The second solution seems like the right one, since the bug is in the DJGPP-specific code I added there. It would be interesting to see whether it will crash further down the road, after you fix this one, since the logic that winds up running this code is entirely alien to DOS and Windows. *** src/libc/compat/mntent/mntent.c~5 Mon Oct 12 23:22:50 1998 --- src/libc/compat/mntent/mntent.c Mon Nov 2 09:27:10 1998 *************** getmntent(FILE *filep) *** 787,796 **** /* Floppies and other disks written by Windows 9X include entries that have volume label bit set, but they are actually parts of some LFN entry. We only accept volume ! labels which have all their RHS bits reset; otherwise ! we pretend we never saw that label. */ while (volume_found && ! (mnt_ff.ff_attrib & (FA_RDONLY|FA_HIDDEN|FA_SYSTEM)) != 0) { volume_found = 0; errno = ENMFILE; --- 787,796 ---- /* Floppies and other disks written by Windows 9X include entries that have volume label bit set, but they are actually parts of some LFN entry. We only accept volume ! labels which have their HS bits reset; otherwise we ! pretend we never saw that label. */ while (volume_found && ! (mnt_ff.ff_attrib & (FA_HIDDEN|FA_SYSTEM)) != 0) { volume_found = 0; errno = ENMFILE;