util-linux/util-linux-2.13-losetup-rdonly.patch
kzak 894b42f522 - use ncurses only
- fix #218915 - fdisk -b 4K
- upgrade to -pre7 release
- fix building problem with raw0 patch
- fix #217186 - /bin/sh: @MKINSTALLDIRS@: No such file or directory (port
    po/Makefile.in.in from gettext-0.16)
- sync with FC6 and RHEL5:
- fix #216489 - SCHED_BATCH option missing in chrt
- fix #216712 - issues with raw device support ("raw0" is wrong device
    name)
- fix #216760 - mount with context or fscontext option fails (temporarily
    disabled the support for additional contexts -- not supported by kernel
    yet)
- fix #211827 - Can't mount with additional contexts
- fix #213127 - mount --make-unbindable does not work
- fix #211749 - add -r option to losetup to create a read-only loop
- Resolves: rhbz#218915 rhbz#217186 rhbz#216489 rhbz#216712 rhbz#216760
    rhbz#211827 rhbz#213127 rhbz#211749
2006-12-14 12:42:01 +00:00

48 lines
1.5 KiB
Diff

--- util-linux-2.13-pre6/mount/lomount.c.ronly 2006-11-01 14:14:14.000000000 +0100
+++ util-linux-2.13-pre6/mount/lomount.c 2006-11-01 15:01:52.000000000 +0100
@@ -444,7 +444,8 @@
" %1$s -d loop_device # delete\n"
" %1$s -f # find unused\n"
" %1$s -a # list all used\n"
- " %1$s [-e encryption] [-o offset] {-f|loop_device} file # setup\n"),
+ " %1$s -r # read-only loop\n"
+ " %1$s [-e encryption] [-o offset] [-r] {-f|loop_device} file # setup\n"),
progname);
exit(1);
}
@@ -497,11 +498,14 @@
if ((p = strrchr(progname, '/')) != NULL)
progname = p+1;
- while ((c = getopt(argc, argv, "ade:E:fo:p:v")) != -1) {
+ while ((c = getopt(argc, argv, "ade:E:fo:p:vr")) != -1) {
switch (c) {
case 'a':
all = 1;
break;
+ case 'r':
+ ro = 1;
+ break;
case 'd':
delete = 1;
break;
--- util-linux-2.13-pre6/mount/losetup.8.ronly 2006-11-01 14:49:14.000000000 +0100
+++ util-linux-2.13-pre6/mount/losetup.8 2006-11-01 15:06:21.000000000 +0100
@@ -35,6 +35,7 @@
.IR offset ]
.RB [ \-p
.IR pfd ]
+.RB [ \-r ]
.in +8
.RB { \-f | \fIloop_device\fP }
.I file
@@ -87,6 +88,8 @@
Read the passphrase from file descriptor with number
.I num
instead of from the terminal.
+.IP \fB\-r\fP
+Setup read-only loop device.
.SH RETURN VALUE
.B losetup
returns 0 on success, nonzero on failure. When