summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/dev.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/dev.inc b/modules/dev.inc
index c054b63..c83e7fe 100644
--- a/modules/dev.inc
+++ b/modules/dev.inc
@@ -46,7 +46,7 @@ dev_find_partitions() {
done
local label number mbrid uuid
for dev in $(find $target* -type b); do
- [ -n "$rw" ] && [ "$( cat "/sys/class/block/$dev/ro" )" = "1" ] && continue
+ [ -n "$rw" ] && [ "$( cat "/sys/class/block/${dev##*/}/ro" )" = "1" ] && continue
dev_get_type "$dev" || continue
echo "$dev is $number - MBR=$mbrid, UUID=$uuid, label=$label" >&2
if regex_imatch "$mbrid" "^($want_type)$" || regex_imatch "$uuid" "^($want_uuid)$" \