Displaying 1 result from an estimated 1 matches for "d6c8d60".
Did you mean:
26c2d60
2010 Jul 22
1
[PATCH] Revert "add_drive_ro adds readonly=on option if available." (RHBZ#617200).
...ports this option.
-
Note that this call checks for the existence of C<filename>. This
stops you from specifying other types of drive which are supported
by qemu such as C<nbd:> and C<http:> URLs. To specify those, use
diff --git a/src/guestfs.c b/src/guestfs.c
index 85a042a..d6c8d60 100644
--- a/src/guestfs.c
+++ b/src/guestfs.c
@@ -836,6 +836,9 @@ int
guestfs__add_drive_ro_with_if (guestfs_h *g, const char *filename,
const char *drive_if)
{
+ size_t len = strlen (filename) + 64;
+ char buf[len];
+
if (strchr (filename, ',') != NU...