X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=cat%2Fvirt-ls.c;h=64e44353419b58d72e086601023ac3dc6635299b;hb=7177340a6f0e3ac1f238c69b0ad5267e18252fe2;hp=3e789b8232d982df289cfaf86e2f238ab3216d61;hpb=ff99f399f09025eb4c880da8f13d666146dfac7f;p=libguestfs.git diff --git a/cat/virt-ls.c b/cat/virt-ls.c index 3e789b8..64e4435 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; @@ -58,7 +62,7 @@ usage (int status) _("%s: list files in a virtual machine\n" "Copyright (C) 2010 Red Hat Inc.\n" "Usage:\n" - " %s [--options] -d domname file [dir ...]\n" + " %s [--options] -d domname dir [dir ...]\n" " %s [--options] -a disk.img [-a disk.img ...] dir [dir ...]\n" "Options:\n" " -a|--add image Add image\n" @@ -227,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) @@ -270,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++;