DragonFly kernel List (threaded) for 2009-04
DragonFly BSD
DragonFly kernel List (threaded) for 2009-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: HEADS UP: major libc changes


From: Peter Avalos <pavalos@xxxxxxxxxxxx>
Date: Fri, 10 Apr 2009 22:39:59 -1000
Mail-followup-to: kernel@crater.dragonflybsd.org

On Fri, Apr 10, 2009 at 07:13:21AM +0900, YONETANI Tomokazu wrote:
> 
> After upgrading to recent HEAD (with standard buildworld and buildkernel),
> I'm seeing two problems:
> - df(1) produces weird output on a partition:
>   Filesystem  1K-blocks Used  Avail Capacity  Mounted on
>   /dev/ad0s1h   1032142 2242 947330    0.%    /tmp
> 

Can you try the attached patch please?  It's a hack, but I'm working on
some other changes to stdio stuff that will be more complete.

--Peter
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index f8ba337..29b913f 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -1546,7 +1546,7 @@ cvt(double value, int ndigits, int flags, char *sign, int *decpt,
 		/* print trailing zeros */
 		bp = digits + ndigits;
 		if (ch == 'f') {
-			if (*digits == '0' && value)
+			if ((*digits == '0' || *digits == '\0') && value)
 				*decpt = -ndigits + 1;
 			bp += *decpt;
 		}

Attachment: pgp00003.pgp
Description: PGP signature



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]