git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use Python distutils to determine include and site-packages directories.
[libguestfs.git]
/
examples
/
inspect_vm.c
diff --git
a/examples/inspect_vm.c
b/examples/inspect_vm.c
index
4019a01
..
6c45aac
100644
(file)
--- a/
examples/inspect_vm.c
+++ b/
examples/inspect_vm.c
@@
-11,10
+11,10
@@
compare_keys_len (const void *p1, const void *p2)
return strlen (key1) - strlen (key2);
}
return strlen (key1) - strlen (key2);
}
-static
in
t
+static
size_
t
count_strings (char *const *argv)
{
count_strings (char *const *argv)
{
-
in
t c;
+
size_
t c;
for (c = 0; argv[c]; ++c)
;
for (c = 0; argv[c]; ++c)
;
@@
-98,8
+98,10
@@
main (int argc, char *argv[])
qsort (mountpoints, count_strings (mountpoints) / 2, 2 * sizeof (char *),
compare_keys_len);
for (i = 0; mountpoints[i] != NULL; i += 2) {
qsort (mountpoints, count_strings (mountpoints) / 2, 2 * sizeof (char *),
compare_keys_len);
for (i = 0; mountpoints[i] != NULL; i += 2) {
- if (guestfs_mount_ro (g, mountpoints[i+1], mountpoints[i]) == -1)
- exit (EXIT_FAILURE);
+ /* Ignore failures from this call, since bogus entries can
+ * appear in the guest's /etc/fstab.
+ */
+ guestfs_mount_ro (g, mountpoints[i+1], mountpoints[i]);
free (mountpoints[i]);
free (mountpoints[i+1]);
}
free (mountpoints[i]);
free (mountpoints[i+1]);
}