From: Karel Zak <kzak@redhat.com>
To: 784709@bugs.debian.org, util-linux <util-linux@vger.kernel.org>
Subject: Re: when would blkid success but not filesystem type?
Date: Tue, 26 May 2015 11:40:40 +0200 [thread overview]
Message-ID: <20150526094040.GA11308@ws.net.home> (raw)
In-Reply-To: <1432614096.2154.33.camel@debian.org>
On Tue, May 26, 2015 at 12:21:36PM +0800, Paul Wise wrote:
> On Thu, 21 May 2015 13:07:35 +0200 Karel Zak wrote:
>
> > The option '-s' does not affect return code ... we have information
> > about all (including empty) partitions!
>
> Ok, I see. Sounds like the proposed patch is appropriate then.
>
> https://bugs.debian.org/cgi-bin/bugreport.cgi?msg=12;filename=0001-Fix-by-forcing-fs-type-to-not-detected-if-not-named.patch;att=1;bug=784709
>
> > Note that my recommendation is to use lsblk, for example:
>
> That has the same issue:
>
> $ sudo lsblk --noheading --output FSTYPE /dev/sda2 ; echo $?
>
> 0
Why do you want rely on return code? It is not error when
FS type is undefined/unknown. All you need is to check result.
FSTYPE=$(lsblk --nodeps --noheading --output FSTYPE /dev/sda2)
[ -n "$FSTYPE" ] && echo $FSTYPE
> I think for our purposes we would need --nodeps too.
Yes.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
prev parent reply other threads:[~2015-05-26 13:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20150520145904.3e4645dd@patagonia>
2015-05-21 8:24 ` when would blkid success but not filesystem type? Paul Wise
2015-05-21 11:07 ` Karel Zak
2015-05-26 4:21 ` Paul Wise
2015-05-26 4:43 ` Paul Wise
2015-05-26 4:51 ` Bug#784709: Info received (when would blkid success but not filesystem type?) Debian Bug Tracking System
2015-05-26 9:40 ` Karel Zak [this message]
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=20150526094040.GA11308@ws.net.home \
--to=kzak@redhat.com \
--cc=784709@bugs.debian.org \
--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