bin/146205: df(1) fails to display total space on a 100PB filesystem correctly

Alexander Best arundel at freebsd.org
Sun Mar 20 22:10:03 UTC 2011


The following reply was made to PR bin/146205; it has been noted by GNATS.

From: Alexander Best <arundel at freebsd.org>
To: bug-followup at 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--


More information about the freebsd-bugs mailing list