Fix double /dev/ prefix bug in collect_partitions
lsblk -p returns PKNAME as a full path (/dev/sda), so stripping the basename before prepending /dev/ avoids /dev//dev/sda. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -98,7 +98,7 @@ collect_partitions() {
|
||||
[[ "$LABEL" == "$OEMDRV_LABEL" ]] && continue
|
||||
[[ -z "$PKNAME" ]] && continue
|
||||
|
||||
local disk="/dev/$PKNAME"
|
||||
local disk="/dev/${PKNAME##*/}"
|
||||
local pnum
|
||||
pnum=$(cat /sys/class/block/"${NAME##/dev/}"/partition 2>/dev/null) || continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user