]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfsprogs: xfs_quota: improve calculation for percentage display
authorAlex Elder <aelder@sgi.com>
Wed, 24 Aug 2011 21:53:43 +0000 (21:53 +0000)
committerAlex Elder <aelder@sgi.com>
Fri, 26 Aug 2011 01:40:38 +0000 (20:40 -0500)
commit481d1f83a1e32ee44a3abae75c55b7bdc1136392
tree642e8c06f0a6dae0889e504581e2d0f423d4340d
parent7cb2d41b091468e197d3694e9cec5a1140122a05
xfsprogs: xfs_quota: improve calculation for percentage display

The pct_to_string() function determines the percentage it produces
in a strange way.  Simplify the function, and make it return the
simple rounded percentage value.  Handle the case of an error
return from snprintf() as well.

Signed-off-by: Alex Elder <aelder@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
quota/util.c