diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-07-02 12:46:14 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-07-06 17:36:30 +0100 |
commit | 25f20c98bf000a46c424f792e04fd04c7b17bcad (patch) | |
tree | 90043511078890641598417a3ab0440984f46f23 | |
parent | 599359aa31d0c40208f700e199d25a8e3ceaa184 (diff) | |
download | libguestfs-25f20c98bf000a46c424f792e04fd04c7b17bcad.tar.gz libguestfs-25f20c98bf000a46c424f792e04fd04c7b17bcad.tar.xz libguestfs-25f20c98bf000a46c424f792e04fd04c7b17bcad.zip |
Rename qemu option cache=off to cache=none.
Note that qemu treats these identically, so this change has
no functional effect.
(cherry picked from commit 1608ca182b094a1dbe22094f39a5e86f18f728b7)
-rw-r--r-- | src/guestfs-internal.h | 2 | ||||
-rw-r--r-- | src/launch.c | 18 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/guestfs-internal.h b/src/guestfs-internal.h index c8a3e664..1f465ceb 100644 --- a/src/guestfs-internal.h +++ b/src/guestfs-internal.h @@ -144,7 +144,7 @@ struct drive { char *format; char *iface; char *name; - int use_cache_off; + int use_cache_none; }; struct guestfs_h diff --git a/src/launch.c b/src/launch.c index f1907fa0..66b77d2a 100644 --- a/src/launch.c +++ b/src/launch.c @@ -287,19 +287,19 @@ guestfs__config (guestfs_h *g, return 0; } -/* cache=off improves reliability in the event of a host crash. +/* cache=none improves reliability in the event of a host crash. * * However this option causes qemu to try to open the file with * O_DIRECT. This fails on some filesystem types (notably tmpfs). * So we check if we can open the file with or without O_DIRECT, - * and use cache=off (or not) accordingly. + * and use cache=none (or not) accordingly. * * NB: This function is only called on the !readonly path. We must * try to open with O_RDWR to test that the file is readable and * writable here. */ static int -test_cache_off (guestfs_h *g, const char *filename) +test_cache_none (guestfs_h *g, const char *filename) { int fd = open (filename, O_RDWR|O_DIRECT); if (fd >= 0) { @@ -343,7 +343,7 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename, char *format; char *iface; char *name; - int use_cache_off; + int use_cache_none; if (strchr (filename, ':') != NULL) { error (g, _("filename cannot contain ':' (colon) character. " @@ -371,12 +371,12 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename, goto err_out; } - /* For writable files, see if we can use cache=off. This also + /* For writable files, see if we can use cache=none. This also * checks for the existence of the file. For readonly we have * to do the check explicitly. */ - use_cache_off = readonly ? 0 : test_cache_off (g, filename); - if (use_cache_off == -1) + use_cache_none = readonly ? 0 : test_cache_none (g, filename); + if (use_cache_none == -1) goto err_out; if (readonly) { @@ -396,7 +396,7 @@ guestfs__add_drive_opts (guestfs_h *g, const char *filename, (*i)->format = format; (*i)->iface = iface; (*i)->name = name; - (*i)->use_cache_off = use_cache_off; + (*i)->use_cache_none = use_cache_none; return 0; @@ -1492,7 +1492,7 @@ qemu_drive_param (guestfs_h *g, const struct drive *drv) snprintf (&r[i], len-i, "%s%s%s%s,if=%s", drv->readonly ? ",snapshot=on" : "", - drv->use_cache_off ? ",cache=off" : "", + drv->use_cache_none ? ",cache=none" : "", drv->format ? ",format=" : "", drv->format ? drv->format : "", drv->iface); |