# HG changeset patch # User Pascal Bellard # Date 1427305681 -3600 # Node ID d6586247420affd25d8f678c72ebeafa214b5856 # Parent 49a4b40f7d731635872f4b737e3f28d402c32dc0 hardware.cgi: add cloop support diff -r 49a4b40f7d73 -r d6586247420a hardware.cgi --- a/hardware.cgi Wed Mar 25 15:08:09 2015 +0000 +++ b/hardware.cgi Wed Mar 25 18:48:01 2015 +0100 @@ -329,7 +329,7 @@ device=$(GET loopdev) lib crypto $device case "$device" in - /dev/loop*) + /dev/*loop*) set -- $(losetup | grep ^$device:) [ -n "$3" ] && losetup -d $device ro="" @@ -499,7 +499,7 @@ EOT -for devloop in $(ls /dev/loop[0-9]*); do +for devloop in $(ls /dev/*loop[0-9]*); do loop="${devloop#/dev/}" case "$(cat /sys/block/$loop/ro 2>/dev/null)" in 0) ro="$(gettext "read/write")" ;;