* losetup --list
@ 2012-11-12 13:39 Karel Zak
0 siblings, 0 replies; only message in thread
From: Karel Zak @ 2012-11-12 13:39 UTC (permalink / raw)
To: util-linux; +Cc: Ondrej Oprala
Hi,
I have applied Ondrej's patch to support a new losetup output format.
The output uses tt.c, so it's compatible with our others utils
(lscpu, lsblk, prlimit, ...).
Now losetup prints all loopdevs in the new format if no other option
is specified.
$ losetup
NAME SIZELIMIT 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
$ losetup -O +MAJ:MIN
NAME SIZELIMIT OFFSET AUTOCLEAR RO BACK-FILE MAJ:MIN
/dev/loop0 0 0 0 0 /home/fs-images/swap.img 7:0
/dev/loop1 0 100 0 0 /home/fs-images/disk.img 7:1
(we read all important information from /sys, so it's usable for
non-root users too.)
The change is backwardly compatible, -j or -a without --list returns
the original format. The old format is marked as deprecated now.
Thanks to Ondrej!
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-12 13:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-12 13:39 losetup --list Karel Zak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).