Skip to content

[Feature Request] Show partition label if available #28

@wedebe

Description

@wedebe

Problem:
Currently only the partition number as it is found in sequence on the device is shown

Suggestion:
Use partition's LABEL value if it has one

Also:
If there is more than 1 partition on a device, and it doesn't have a LABEL, show it as (Partition 1)

partition20231111133418

Sample setup:

blkid:

/dev/sdb1: UUID="uuid" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI system partition" PARTUUID="uuid"
/dev/sda1: LABEL_FATBOOT="EFI" LABEL="EFI" UUID="uuid" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="uuid"
/dev/sdb3: LABEL="Win10 OS" BLOCK_SIZE="512" UUID="uuid" TYPE="ntfs" PARTLABEL="Basic data partition" PARTUUID="uuid"
/dev/sdb5: UUID="uuid" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="uuid"
/dev/sdb6: LABEL="Data" UUID="uuid" BLOCK_SIZE="512" TYPE="exfat" PARTLABEL="Basic data partition" PARTUUID="uuid"
/dev/sdb4: BLOCK_SIZE="512" UUID="uuid" TYPE="ntfs" PARTUUID="uuid"
/dev/sda2: LABEL="MBP17" UUID="uuid" BLOCK_SIZE="512" TYPE="exfat" PARTUUID="uuid"
/dev/sdc1: LABEL_FATBOOT="1GB FAT32" LABEL="1GB FAT32" UUID="uuid" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="uuid"
/dev/sdc2: LABEL="4GB ext4" UUID="uuid" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="uuid"
/dev/sdc3: LABEL="24GB exFAT" UUID="uuid" BLOCK_SIZE="512" TYPE="exfat" PARTUUID="uuid"
/dev/sdb2: PARTLABEL="Microsoft reserved partition" PARTUUID="uuid"

df:

/dev/sda1               201633     83680    117954  42% /media/hdd2
/dev/sdb3             48748560  23381744  25366816  48% /media/sdd2
/dev/sdb5             19593168  17882864    645348  97% /media/sdd3
/dev/sdc1              1046516    758644    287872  72% /media/mmc
/dev/sdc2              4046560   2913500    906964  76% /media/usb2
/dev/sdb4               549884    459792     90092  84% /media/sdd4
/dev/sdb1                98304     30954     67350  31% /media/sdd5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions