git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ruby: Use ALLOC_N to avoid potential memory leak (RHBZ#667610).
[libguestfs.git]
/
cat
/
virt-ls.c
diff --git
a/cat/virt-ls.c
b/cat/virt-ls.c
index
a3f043a
..
e2700d2
100644
(file)
--- a/
cat/virt-ls.c
+++ b/
cat/virt-ls.c
@@
-24,6
+24,7
@@
#include <unistd.h>
#include <getopt.h>
#include <fcntl.h>
#include <unistd.h>
#include <getopt.h>
#include <fcntl.h>
+#include <locale.h>
#include <assert.h>
#include "progname.h"
#include <assert.h>
#include "progname.h"
@@
-35,6
+36,7
@@
guestfs_h *g;
int read_only = 1;
guestfs_h *g;
int read_only = 1;
+int live = 0;
int verbose = 0;
int keys_from_stdin = 0;
int echo_keys = 0;
int verbose = 0;
int keys_from_stdin = 0;
int echo_keys = 0;
@@
-109,11
+111,9
@@
main (int argc, char *argv[])
};
struct drv *drvs = NULL;
struct drv *drv;
};
struct drv *drvs = NULL;
struct drv *drv;
- char *p, *file = NULL;
const char *format = NULL;
int c;
int option_index;
const char *format = NULL;
int c;
int option_index;
- int next_prepared_drive = 1;
char mode = 0;
g = guestfs_create ();
char mode = 0;
g = guestfs_create ();
@@
-229,6
+229,7
@@
main (int argc, char *argv[])
*/
assert (read_only == 1);
assert (inspector == 1);
*/
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)
/* User must specify at least one directory name on the command line. */
if (optind >= argc || argc - optind < 1)
@@
-272,7
+273,6
@@
main (int argc, char *argv[])
}
else if (mode == 'l') {
char *out;
}
else if (mode == 'l') {
char *out;
- size_t i;
if ((out = guestfs_ll (g, dir)) == NULL)
errors++;
if ((out = guestfs_ll (g, dir)) == NULL)
errors++;