+++ This bug was initially created as a clone of Bug #211749 +++
Current losetup supports creating RO loops: the set_loop has an argument that
requests and returns the open mode, and the function also checks if the
filesystem the file resides on is mounted read-only.
But there is no way to specify the RO mode from the command line. The attached
patch adds a new -r option.
-- Additional comment from email@example.com on 2006-10-21 15:09 EST --
Created an attachment (id=139067)
patch adding -r option to losetup
-- Additional comment from firstname.lastname@example.org on 2006-11-01 09:11 EST --
FC6 seems like better target for this feature. Thanks for your patch.
The -r capability is needed by Xen to allow us to attach a read-only ISO image
from a read-write NFS share to a local loop device. Without the -r option,
losetup fails with -EACCESS. The -r flag is already supported in Fedora Core 6 /
Fedora 7 and thus we're using it in Fedora Xen block device hotplug scripts.
The patch is very small and not invasive.
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release. Since this
bugzilla is in a component that is not approved for the current
release, it has been closed with resolution deferred. You may
reopen this bugzilla for consideration in the next release.
Repopening and requesting Exception as this is a dependency for the Xen related
issue in bug 225166.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.