Displaying 5 results from an estimated 5 matches for "drive_if".
2010 Jul 22
1
[PATCH] Revert "add_drive_ro adds readonly=on option if available." (RHBZ#617200).
...t; 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, ',') != NULL) {
error (g, _("filename cannot contain ',' (comma) character"));
return -1;
@@ -846,24 +849,7 @@ guestfs__add_drive_ro_with_if (guestfs_h *g, const char *filena...
2009 Aug 12
2
[PATCH] Don't use cache=off if device is on tmpfs
...cache=off (or not) accordingly.
+ *
+ * This test also checks for the presence of the file, which
+ * is a documented semantic of this interface.
+ */
+ fd = open (filename, O_RDONLY|O_DIRECT);
+ if (fd >= 0) {
+ close (fd);
+ snprintf (buf, len, "file=%s,cache=off,if=" DRIVE_IF, filename);
+ } else {
+ fd = open (filename, O_RDONLY);
+ if (fd >= 0) {
+ close (fd);
+ snprintf (buf, len, "file=%s,if=" DRIVE_IF, filename);
+ } else {
+ perrorf (g, "%s", filename);
+ return -1;
+ }
}
- /* cache=off improves reliabi...
2012 Jun 12
5
[PATCH 0/5] Assorted patches to add virtio-scsi support.
These assorted patches end up with adding virtio-scsi support to
libguestfs.
It passes libguestfs-test-tool, but I haven't yet tried to run the
full set of tests.
In theory > 26 devices can be added, but it's likely that certain
parts of the daemon will break if you actually try this. This of
course needs to be fixed.
Thanks Paolo Bonzini for invaluable help.
Rich.
2012 Jun 12
9
[PATCH v2 0/9]
More comprehensive support for virtio-scsi. Passes all the tests.
Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...-132,37 +132,37 @@ dnl
dnl NB. We will change the default in future to virtio, but at the
dnl moment this causes a performance problem, RHBZ#509383.
AC_ARG_WITH([drive-if],
- [AS_HELP_STRING([--with-drive-if],
- [set default driver (ide|scsi|virtio) @<:@default=ide@:>@])],
- [],
- [with_drive_if=ide])
+ [AS_HELP_STRING([--with-drive-if],
+ [set default driver (ide|scsi|virtio) @<:@default=ide@:>@])],
+ [],
+ [with_drive_if=ide])
AC_DEFINE_UNQUOTED([DRIVE_IF],["$with_drive_if"],[Default drive interface.])
dnl Check for febootstrap etc.
AC_CH...