This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-unstable] Pass the -r flag to losetup for read-only

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Pass the -r flag to losetup for read-only devices.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 06 Feb 2007 09:50:12 -0800
Delivery-date: Tue, 06 Feb 2007 09:50:19 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Ewan Mellor <ewan@xxxxxxxxxxxxx>
# Date 1170776118 0
# Node ID 0c17f16f9f0309c3ca452e3d35df006fccf96dea
# Parent  ffe95edc5266f1b05d34a8f45ec03d3b5302abe1
Pass the -r flag to losetup for read-only devices.

Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
 tools/examples/block |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

diff -r ffe95edc5266 -r 0c17f16f9f03 tools/examples/block
--- a/tools/examples/block      Wed Jan 31 11:05:36 2007 -0800
+++ b/tools/examples/block      Tue Feb 06 15:35:18 2007 +0000
@@ -367,7 +367,13 @@ mount it read-write in a guest domain."
           fatal 'Failed to find an unused loop device'
-        do_or_die losetup "$loopdev" "$file"
+        cmode=`canonicalise_mode $mode`
+        if [ "$cmode" == 'r' ]
+        then
+          do_or_die losetup -r "$loopdev" "$file"
+        else
+          do_or_die losetup "$loopdev" "$file"
+        fi
         xenstore_write "$XENBUS_PATH/node" "$loopdev"
         write_dev "$loopdev"
         release_lock "block"

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Pass the -r flag to losetup for read-only devices., Xen patchbot-unstable <=