Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Mar 2011 22:10:03 GMT
From:      Alexander Best <arundel@freebsd.org>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/146205: df(1) fails to display total space on a 100PB filesystem correctly
Message-ID:  <201103202210.p2KMA3dS053483@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/146205; it has been noted by GNATS.

From: Alexander Best <arundel@freebsd.org>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/146205: df(1) fails to display total space on a 100PB filesystem correctly
Date: Sun, 20 Mar 2011 22:07:22 +0000

 --LZvS9be/3tNcYl/X
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 verified!
 
 defenately a problem with humanize_number(3). here's a testcase.
 
 cheers.
 alex
 
 -- 
 a13x
 
 --LZvS9be/3tNcYl/X
 Content-Type: text/x-csrc; charset=us-ascii
 Content-Disposition: attachment; filename="humanize_number.c"
 
 #include <libutil.h>
 #include <stdio.h>      
 
 int
 main(int argc, char** argv)
 {
 char buf[6];
 int flags;
 int64_t bytes = 107692009979824 * 1024;
 
 flags = HN_B | HN_NOSPACE | HN_DECIMAL;
 
 humanize_number(buf, sizeof(buf) - (bytes < 0 ? 0 : 1), bytes, "", HN_AUTOSCALE, flags);
 
 (void)printf("  %6s\n", buf);
 
 return 0;
 }
 
 --LZvS9be/3tNcYl/X--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103202210.p2KMA3dS053483>