X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=df%2Foutput.c;h=2950fff26e1c9a2d47297ba91af70c1b652cebd0;hb=be1419a442d9936e737fb2ca6f0fdba36a048964;hp=b60d285c26fea5901344f19e7e45873001fd989b;hpb=d72815578f7b8fea9702902d8562430e8a007a46;p=libguestfs.git diff --git a/df/output.c b/df/output.c index b60d285..2950fff 100644 --- a/df/output.c +++ b/df/output.c @@ -1,5 +1,5 @@ /* virt-df - * Copyright (C) 2010 Red Hat Inc. + * Copyright (C) 2010-2011 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -13,7 +13,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -156,7 +157,7 @@ print_stat (const char *name, const char *uuid_param, /* Use 'ceil' on the percentage in order to emulate what df itself does. */ snprintf (buf[3], MAX_LEN, "%3.0f%%", ceil (percent)); else - snprintf (buf[3], MAX_LEN, "%.1f", percent); + snprintf (buf[3], MAX_LEN, "%.1f", (double) percent); cols[3] = buf[3]; #undef MAX_LEN