mrc0mmand / rpms / libguestfs

Forked from rpms/libguestfs 3 years ago
Clone

Blame SOURCES/0042-resize-make-sure-the-input-disk-is-read-only.patch

90a56e
From f1ed6a32939717d89e7bc3f9c0934b7788f2708a Mon Sep 17 00:00:00 2001
90a56e
From: Pino Toscano <ptoscano@redhat.com>
90a56e
Date: Wed, 21 Jun 2017 16:34:05 +0200
90a56e
Subject: [PATCH] resize: make sure the input disk is read-only
90a56e
90a56e
Fixes commit 8a2b0738d1b79f288b14fc35294567430d10b7ec.
90a56e
90a56e
(cherry picked from commit 1ca2a8b7ba41d7e4baf1aec5d65ace3b66f2dc37)
90a56e
---
90a56e
 resize/resize.ml | 2 +-
90a56e
 1 file changed, 1 insertion(+), 1 deletion(-)
90a56e
90a56e
diff --git a/resize/resize.ml b/resize/resize.ml
90a56e
index dc96b23..4028aa1 100644
90a56e
--- a/resize/resize.ml
90a56e
+++ b/resize/resize.ml
90a56e
@@ -348,7 +348,7 @@ read the man page virt-resize(1).
90a56e
   (* Add in and out disks to the handle and launch. *)
90a56e
   let connect_both_disks () =
90a56e
     let g = open_guestfs () in
90a56e
-    add_drive_uri g ?format (snd infile);
90a56e
+    add_drive_uri g ?format ~readonly:true (snd infile);
90a56e
     (* The output disk is being created, so use cache=unsafe here. *)
90a56e
     add_drive_uri g ?format:output_format ~readonly:false ~cachemode:"unsafe"
90a56e
       (snd outfile);
90a56e
-- 
90a56e
2.9.4
90a56e