X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=cat%2Fvirt-ls.c;h=b510f9aeb8cf4c300e793148ac81482bfb77ba2a;hp=a3f043a06e1590c7689647e0b6cbdd2cad1320b6;hb=0c133cf689ba4816ba6e9283c3f9ed7f06dc0a77;hpb=f6d3d5677194ae7aaea70d43845341d91907b5ee diff --git a/cat/virt-ls.c b/cat/virt-ls.c index a3f043a..b510f9a 100644 --- a/cat/virt-ls.c +++ b/cat/virt-ls.c @@ -1,5 +1,5 @@ /* virt-ls - * 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 @@ -24,7 +24,10 @@ #include #include #include +#include #include +#include +#include #include "progname.h" @@ -35,6 +38,7 @@ guestfs_h *g; int read_only = 1; +int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -109,11 +113,9 @@ main (int argc, char *argv[]) }; struct drv *drvs = NULL; struct drv *drv; - char *p, *file = NULL; const char *format = NULL; int c; int option_index; - int next_prepared_drive = 1; char mode = 0; g = guestfs_create (); @@ -229,6 +231,7 @@ main (int argc, char *argv[]) */ assert (read_only == 1); assert (inspector == 1); + assert (live == 0); /* User must specify at least one directory name on the command line. */ if (optind >= argc || argc - optind < 1) @@ -272,7 +275,6 @@ main (int argc, char *argv[]) } else if (mode == 'l') { char *out; - size_t i; if ((out = guestfs_ll (g, dir)) == NULL) errors++;