From 6867b0a3fb6491e1d26c747100dad364dbf20c70 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sat, 6 Oct 2012 18:44:05 +0100 Subject: launch: add_null_drive: Force null drive to be writable. Because we create a special file, there is no point forcing qemu to create an overlay as well. Save time by setting readonly = 0. --- src/launch.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/launch.c b/src/launch.c index f325d9f2..4b5ed347 100644 --- a/src/launch.c +++ b/src/launch.c @@ -190,6 +190,11 @@ add_null_drive (guestfs_h *g, int readonly, const char *format, if (guestfs___lazy_make_tmpdir (g) == -1) return -1; + /* Because we create a special file, there is no point forcing qemu + * to create an overlay as well. Save time by setting readonly = 0. + */ + readonly = 0; + tmpfile = safe_asprintf (g, "%s/devnull%d", g->tmpdir, ++g->unique); fd = open (tmpfile, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0600); if (fd == -1) { -- cgit