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