X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=df%2Fmain.c;h=2429c322aa7a90826250f220c844551e77b9dc89;hb=47963bc9cc0b47af0541010a4fa14260405acaa5;hp=9565464bff5d67685affe4fb869c281dab2eef01;hpb=18374b5b7d3154e0b8b8a07e3590f6eee762b58e;p=libguestfs.git diff --git a/df/main.c b/df/main.c index 9565464..2429c32 100644 --- a/df/main.c +++ b/df/main.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,10 +21,13 @@ #include #include #include +#include #include #include #include +#include #include +#include #ifdef HAVE_LIBVIRT #include @@ -41,6 +44,7 @@ guestfs_h *g; int read_only = 1; +int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -238,6 +242,7 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 0); + assert (live == 0); /* Must be no extra arguments on the command line. */ if (optind != argc) @@ -279,6 +284,10 @@ main (int argc, char *argv[]) switch (drvs->type) { case drv_a: name = strrchr (drvs->a.filename, '/'); + if (name == NULL) + name = drvs->a.filename; + else + name++; /* skip '/' character */ break; case drv_d: name = drvs->d.guest;