]> git.ipfire.org Git - thirdparty/util-linux.git/commit
blkid: make PART_ENTRY_* tags optional (add --no-part-details)
authorKarel Zak <kzak@redhat.com>
Thu, 29 Nov 2018 12:21:36 +0000 (13:21 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 29 Nov 2018 12:21:36 +0000 (13:21 +0100)
commit5e91d5dd716ebc6144bcb0cabb0ec847a678be9e
tree44a9b4caf14d75fce5a3c4b727e33969237a8abb
parent4850e972572179cef74143a09a03fbe7d745c6d8
blkid: make PART_ENTRY_* tags optional (add --no-part-details)

blkid(8) returns information from partition table also for empty
partitions. This is necessary for example for udev, but it could be
confusing if you care about on-device content only.

Default:
 # blkid -p /dev/md0p1; echo $?
 /dev/md0p1: PART_ENTRY_SCHEME="dos" PART_ENTRY_UUID="6d8796b1-01" PART_ENTRY_TYPE="0x83" PART_ENTRY_NUMBER="1" PART_ENTRY_OFFSET="2048" PART_ENTRY_SIZE="204800" PART_ENTRY_DISK="9:0"
 0

With --no-part-details:
 # blkid -p /dev/md0p1 --no-part-details; echo $?
 2

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1653413
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/blkid.8
misc-utils/blkid.c