delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1998/11/03/03:50:33

Date: Tue, 3 Nov 1998 10:50:16 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Martin Str|mberg <ams AT ludd DOT luth DOT se>
cc: DJGPP-WORKERS <djgpp-workers AT delorie DOT com>
Subject: Re: df adventures
In-Reply-To: <199811021736.SAA17007@father.ludd.luth.se>
Message-ID: <Pine.SUN.3.91.981103104945.19001B-100000@is>
MIME-Version: 1.0
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;

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019