All of lore.kernel.org
 help / color / mirror / Atom feed
* main - fsadm: handle error from blkid
@ 2021-03-24 15:41 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2021-03-24 15:41 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=28865f971e0b23f4d1a4117e0e0fdb61bd21d836
Commit:        28865f971e0b23f4d1a4117e0e0fdb61bd21d836
Parent:        63c58d2a5d935cd78c77f3db13a655e68fb36367
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Wed Mar 24 16:26:17 2021 +0100
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Wed Mar 24 16:37:09 2021 +0100

fsadm: handle error from blkid

Fsadm wants to print its own error message when it can't detect
type of the filesystem on a block device.
Otherwise fsadm exits with no message on an unused block device.
---
 scripts/fsadm.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh
index 20ae57462..3e1f3d405 100755
--- a/scripts/fsadm.sh
+++ b/scripts/fsadm.sh
@@ -230,7 +230,7 @@ detect_fs() {
 	esac
 	# use null device as cache file to be sure about the result
 	# not using option '-o value' to be compatible with older version of blkid
-	FSTYPE=$("$BLKID" -c "$NULL" -s TYPE "$VOLUME")
+	FSTYPE=$("$BLKID" -c "$NULL" -s TYPE "$VOLUME" || true)
 	test -n "$FSTYPE" || error "Cannot get FSTYPE of \"$VOLUME\"."
 	FSTYPE=${FSTYPE##*TYPE=\"} # cut quotation marks
 	FSTYPE=${FSTYPE%%\"*}



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-03-24 15:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 15:41 main - fsadm: handle error from blkid Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.