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

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <199811031723.SAA09664@father.ludd.luth.se>
Subject: Re: df adventures
To: eliz AT is DOT elta DOT co DOT il (Eli Zaretskii)
Date: Tue, 3 Nov 1998 18:23:08 +0100 (MET)
Cc: djgpp-workers AT delorie DOT com (DJGPP-WORKERS)
In-Reply-To: <Pine.SUN.3.91.981103104945.19001B-100000@is> from Eli Zaretskii at "Nov 3, 98 10:50:16 am"
X-Mailer: ELM [version 2.4ME+ PL15 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

According to Eli Zaretskii:
> > 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.

Ok, patch for df last in this message.

Interestingly, with this even a music CD is reported:
Filesystem         1024-blocks  Used Available Capacity Mounted on
-                     688028  688028        0    100%   r:/


Pettersson, Symphony No. 12,

							MartinS


--- filutil3.16/src/df.c~       Sat Mar  8 21:11:26 1997
+++ filutil3.16/src/df.c        Tue Nov  3 16:25:30 1998
@@ -270,7 +270,7 @@
 #ifdef __DJGPP__
   /* JOINed disks seem like a directory on another disk.
      We want to see the info about the real drive.  */
-  if (strcmp (fstype, "join") == 0)
+  if (fstype && strcmp (fstype, "join") == 0)
     {
       struct stat real_drive_stats;

- Raw text -


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