From 259fcc57346f863e65800c8671e8c34a8f1cbd30 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 26 Nov 2007 11:13:37 +0100 Subject: losetup: add --associated option losetup -j | --associated [-o ] This new option lists all loop devices associated with given file (and optionally file offset). Examples: # losetup -a /dev/loop0: [0807]:21921808 (/foo/vfat-mbr.img) /dev/loop1: [0807]:21921808 (/foo/vfat-mbr.img), offset 100 /dev/loop2: [0807]:21921802 (/bar/ext3.img) # losetup -j /foo/vfat-mbr.img /dev/loop0: [0807]:21921808 (/foo/vfat-mbr.img) /dev/loop1: [0807]:21921808 (/foo/vfat-mbr.img), offset 100 # losetup -j /foo/vfat-mbr.img -o 100 /dev/loop1: [0807]:21921808 (/foo/vfat-mbr.img), offset 100 Signed-off-by: Karel Zak --- mount/losetup.8 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'mount/losetup.8') diff --git a/mount/losetup.8 b/mount/losetup.8 index db2929f48..400ec2cab 100644 --- a/mount/losetup.8 +++ b/mount/losetup.8 @@ -11,6 +11,8 @@ Get info: .sp .B losetup -a .sp +.B losetup -j [-o offset] +.sp .in -5 Delete loop: .sp @@ -73,14 +75,17 @@ enable data encryption with specified name or number .IP "\fB\-f, \-\-find\fP" find the first unused loop device. If a .I file -argument is present, use this device. Otherwise, print its name. +argument is present, use this device. Otherwise, print its name .IP "\fB\-h, \-\-help\fP" print help +.IP "\fB\-j, \-\-associated \fIfile\fP" +show status of all loop devices associated with given +.I file .IP "\fB\-o, \-\-offset \fIoffset\fP" -The data start is moved \fIoffset\fP bytes into the specified file or -device. +the data start is moved \fIoffset\fP bytes into the specified file or +device .IP "\fB\-p, \-\-pass-fd \fInum\fP" -Read the passphrase from file descriptor with number +read the passphrase from file descriptor with number .I num instead of from the terminal .IP "\fB\-r, \-\-read-only\fP" -- cgit v1.2.3-55-g7522