Util-Linux Archive on lore.kernel.org
 help / color / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Anatoly Pugachev <matorola@gmail.com>
Cc: "Michal Suchánek" <msuchanek@suse.de>,
	util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH] blkid: open device in nonblock mode.
Date: Tue, 12 Nov 2019 09:58:29 +0100
Message-ID: <20191112085829.jsgr3guy2tc7sudo@10.255.255.10> (raw)
In-Reply-To: <CADxRZqxToUUgwR4DqEnS84TBQ7y8hy+s0fBoZYn3_Q-Zit1Ktg@mail.gmail.com>

On Tue, Nov 12, 2019 at 11:27:28AM +0300, Anatoly Pugachev wrote:
> On Wed, Nov 6, 2019 at 11:52 AM Karel Zak <kzak@redhat.com> wrote:
> >> On Wed, Nov 06, 2019 at 09:02:56AM +0100, Michal Suchánek wrote:
> > > > First off you need to explain it to all authors of all random scripts
> > > > out there.
> >
> > That's what I'm doing for years :)
> 
> considering lsblk / findmnt , how they are supposed to replace blkid
> in the following example (taken from os-prober):
> 
>                 output="$(blkid -o device -t LABEL="$1")" || return 1
> 
> i wasn't able to find lsblk alternative to match things (label, uuid,
> partition, whatever) - maybe i just don't carefully read manual page
> for it ? Of course it is possible to use grep in pipe after lsblk, but
> anyway.

Yes, it's UN*X :-) ... grep or so

    lsblk -rpo LABEL,NAME | awk '/'$1'/ { print $2 }'


 Karel

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com


  reply index

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-04 20:23 Michal Suchanek
2019-11-05 11:41 ` Karel Zak
2019-11-05 17:13   ` Michal Suchánek
2019-11-06  8:02     ` Michal Suchánek
2019-11-06  8:48       ` Karel Zak
2019-11-06  9:45         ` Michal Suchánek
2019-11-12  8:27         ` Anatoly Pugachev
2019-11-12  8:58           ` Karel Zak [this message]
2019-11-06  9:00 ` Karel Zak

Reply instructions:

You may reply publically 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=20191112085829.jsgr3guy2tc7sudo@10.255.255.10 \
    --to=kzak@redhat.com \
    --cc=matorola@gmail.com \
    --cc=msuchanek@suse.de \
    --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

Util-Linux Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/util-linux/0 util-linux/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 util-linux util-linux/ https://lore.kernel.org/util-linux \
		util-linux@vger.kernel.org
	public-inbox-index util-linux

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.util-linux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git