Util-Linux package development
 help / color / mirror / Atom feed
From: Bernhard Voelker <mail@bernhard-voelker.de>
To: Karel Zak <kzak@redhat.com>
Cc: Marcos Felipe Rasia de Mello <marcosfrm@gmail.com>,
	util-linux@vger.kernel.org
Subject: Re: lsblk "include" option?
Date: Tue, 19 Jun 2012 16:46:52 +0200	[thread overview]
Message-ID: <4FE090DC.80304@bernhard-voelker.de> (raw)
In-Reply-To: <20120619142627.GA14727@x2.net.home>



On 06/19/2012 04:26 PM, Karel Zak wrote:
> On Fri, Jun 15, 2012 at 10:09:16AM -0300, Marcos Felipe Rasia de Mello wrote:
>> lsblk has an "exclude" (-e, --exclude) option. I wonder if would be
>> possible to add an "include" option to tell it to show *only*
>> specified major number devices. Like
>>
>> lsblk -i 8
> 
>  Implemented (--include, -I)


> diff --git a/misc-utils/lsblk.c b/misc-utils/lsblk.c
> index f635a4a..0bcdbfc 100644
> --- a/misc-utils/lsblk.c
> +++ b/misc-utils/lsblk.c
> @@ -142,7 +142,7 @@ static struct colinfo infos[] = {
>  
>  struct lsblk {
>         struct tt *tt;                  /* output table */
> -       unsigned int all_devices:1;     /* print all devices */
> +       unsigned int all_devices:1;     /* print all devices, icluding empty */

s/icluding/including/

> @@ -1116,6 +1159,7 @@ static void __attribute__((__noreturn__)) help(FILE *out)
>                 " -d, --nodeps         don't print slaves or holders\n"
>                 " -D, --discard        print discard capabilities\n"
>                 " -e, --exclude <list> exclude devices by major number (default: RAM disks)\n"
> +               " -i, --include <list> show only devices with specified major numbers\n"

s/-i/-I/


BTW: the <list> does not necessarily have to be comma separated;
e.g. a dot also works: "lsblk -I 8.11". The same applies to "-e",
of course.

Have a nice day,
Berny

  reply	other threads:[~2012-06-19 14:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15 13:09 lsblk "include" option? Marcos Felipe Rasia de Mello
2012-06-19 14:26 ` Karel Zak
2012-06-19 14:46   ` Bernhard Voelker [this message]
2012-06-19 15:43     ` Karel Zak
2012-06-19 20:48       ` Marcos Felipe Rasia de Mello

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=4FE090DC.80304@bernhard-voelker.de \
    --to=mail@bernhard-voelker.de \
    --cc=kzak@redhat.com \
    --cc=marcosfrm@gmail.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