summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorSimon Rettberg2024-01-30 15:39:42 +0100
committerSimon Rettberg2024-01-30 15:39:42 +0100
commit5e43645eff55a6658612ff523062fefcf2175534 (patch)
tree8836415bbf54ab4f0b09e61fbc64caa2fbe95b75 /modules
parent[dev] Fix ro path expression (diff)
downloadslx-tools-5e43645eff55a6658612ff523062fefcf2175534.tar.gz
slx-tools-5e43645eff55a6658612ff523062fefcf2175534.tar.xz
slx-tools-5e43645eff55a6658612ff523062fefcf2175534.zip
[dev] find_partitions: Limit search to /dev, no subdirs
Diffstat (limited to 'modules')
-rw-r--r--modules/dev.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/dev.inc b/modules/dev.inc
index c83e7fe..5a9619d 100644
--- a/modules/dev.inc
+++ b/modules/dev.inc
@@ -45,7 +45,7 @@ dev_find_partitions() {
fi
done
local label number mbrid uuid
- for dev in $(find $target* -type b); do
+ for dev in $(find $target* -maxdepth 0 -type b); do
[ -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