From: Martin Str|mberg 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: from Eli Zaretskii at "Nov 3, 98 10:50:16 am" X-Mailer: ELM [version 2.4ME+ PL15 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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;