pve-efiboot-tool: format: show real path in warning if needed

Show the real path of the partition in case when the basename couldn't
be determined and the partition given is a symlinked one like
/dev/disk/by-id/<part>/

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
This commit is contained in:
Aaron Lauterer 2020-05-19 09:59:44 +02:00 committed by Thomas Lamprecht
parent 5d733131b6
commit 78c0b9cbd1

View File

@ -98,7 +98,10 @@ format() {
part_basename=$(basename "$bdev")
if [ -z "$part_basename" ]; then
warn "E: unable to determine basename of '$part'"
if [ $part != $bdev ]; then
symlinkmsg=" -> '$bdev'"
fi
warn "E: unable to determine basename of '$part'$symlinkmsg"
exit 1
fi