From 896352d3906c19e8519670f1a511afb01083ed5e Mon Sep 17 00:00:00 2001 From: Ondrej Oprala Date: Mon, 12 Nov 2012 13:08:00 +0100 Subject: losetup: add --list and --output option The --list --all is the default output: # losetup NAME SIZE OFFSET AUTOCLEAR RO BACK-FILE /dev/loop0 0 0 0 0 /home/fs-images/swap.img /dev/loop1 0 100 0 0 /home/fs-images/disk.img [kzak@redhat.com: - default to --all if no device specified, - cleanup column names (add BACK- prefix) - add MAJ:MIN to of the loopdev device] Signed-off-by: Ondrej Oprala Signed-off-by: Karel Zak --- sys-utils/losetup.8 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sys-utils/losetup.8') diff --git a/sys-utils/losetup.8 b/sys-utils/losetup.8 index 921e10b78..9613e46ce 100644 --- a/sys-utils/losetup.8 +++ b/sys-utils/losetup.8 @@ -9,7 +9,8 @@ Get info: .B losetup .I loopdev .sp -.B losetup -a +.B losetup -l +.RB [ \-a ] .sp .B losetup -j .I file @@ -74,7 +75,7 @@ device is shown. .IP "\fB\-a, \-\-all\fP" show status of all loop devices. Note that not all information are accessible -for non-root users. +for non-root users. See also \fB\-\-list\fP. .IP "\fB\-c, \-\-set-capacity\fP \fIloopdev\fP force loop driver to reread size of the file associated with the specified loop device .IP "\fB\-d, \-\-detach\fP \fIloopdev\fP..." @@ -90,9 +91,14 @@ print help .IP "\fB\-j, \-\-associated \fIfile\fP" show status of all loop devices associated with given .I file +.IP "\fB\-l, \-\-list" +if a loop device or the -a option is specified, print default columns for either the specified +loop device or all loop devices, default is to print info about all devices. .IP "\fB\-o, \-\-offset \fIoffset\fP" the data start is moved \fIoffset\fP bytes into the specified file or device +.IP "\fB\-O, \-\-output \fIcolumns\fP" +specify which columns are to be printed for the \fB\-\-list\fP output .IP "\fB\-\-sizelimit \fIsize\fP" the data end is set to no more than \fIsize\fP bytes after the data start .IP "\fB\-P, \-\-partscan\fP" -- cgit v1.2.3-55-g7522