summaryrefslogtreecommitdiffstats
path: root/df
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2011-10-26 17:47:34 +0100
committerRichard W.M. Jones <rjones@redhat.com>2011-10-26 17:47:34 +0100
commit163f7df8452f5d7eb47039a98cd97d498528e4d5 (patch)
treee249ae27ab5805af4405053d34ec33af7408c758 /df
parent62909197d120c01cc86095518aacca9d4ad268dd (diff)
downloadlibguestfs-163f7df8452f5d7eb47039a98cd97d498528e4d5.tar.gz
libguestfs-163f7df8452f5d7eb47039a98cd97d498528e4d5.tar.xz
libguestfs-163f7df8452f5d7eb47039a98cd97d498528e4d5.zip
libvirt: Detect if a disk has the <readonly/> flag.
This changes the private function guestfs___for_each_disk so that the <readonly/> flag on libvirt disks is detected and passed through to the callback function.
Diffstat (limited to 'df')
-rw-r--r--df/domains.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/df/domains.c b/df/domains.c
index 5bc7c42a..7a4e33c2 100644
--- a/df/domains.c
+++ b/df/domains.c
@@ -93,7 +93,7 @@ free_domain (struct domain *domain)
static void add_domains_by_id (virConnectPtr conn, int *ids, size_t n);
static void add_domains_by_name (virConnectPtr conn, char **names, size_t n);
static void add_domain (virDomainPtr dom);
-static int add_disk (guestfs_h *g, const char *filename, const char *format, void *domain_vp);
+static int add_disk (guestfs_h *g, const char *filename, const char *format, int readonly, void *domain_vp);
static void multi_df (struct domain *, size_t n);
void
@@ -287,7 +287,8 @@ add_domain (virDomainPtr dom)
}
static int
-add_disk (guestfs_h *g, const char *filename, const char *format,
+add_disk (guestfs_h *g,
+ const char *filename, const char *format, int readonly,
void *domain_vp)
{
struct domain *domain = domain_vp;