HEADS UP: major libc changes
Peter Avalos
pavalos at theshell.com
Sat Apr 11 01:47:42 PDT 2009
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00003.pgp
Type: application/octet-stream
Size: 197 bytes
Desc: "Description: PGP signature"
URL: <http://lists.dragonflybsd.org/pipermail/kernel/attachments/20090411/dfedd038/attachment-0020.obj>
More information about the Kernel
mailing list