From: Karel Zak <kzak@redhat.com>
To: util-linux@vger.kernel.org
Cc: Ondrej Oprala <ooprala@redhat.com>
Subject: losetup --list
Date: Mon, 12 Nov 2012 14:39:41 +0100 [thread overview]
Message-ID: <20121112133941.GE26857@x2.net.home> (raw)
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
reply other threads:[~2012-11-12 13:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121112133941.GE26857@x2.net.home \
--to=kzak@redhat.com \
--cc=ooprala@redhat.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).