From 05b8383fb3452c1ca3e3e496bd4d1855a03c4ecc Mon Sep 17 00:00:00 2001 From: hummypkg Date: Thu, 5 Feb 2015 23:14:52 +0000 Subject: [PATCH] update for 0.76 glob fix git-svn-id: file:///root/webif/svn/pkg/webif/trunk@2310 2a923420-c742-0410-a762-8d5b09965624 --- webif/lib/system.class | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/webif/lib/system.class b/webif/lib/system.class index 05b326e9..6017aec0 100644 --- a/webif/lib/system.class +++ b/webif/lib/system.class @@ -387,8 +387,6 @@ proc {system connectivity} {{site "hpkg.tv"} {port 80} {ret "0"}} { return 0 } } - set err UNKNOWN - return 0 } proc {system strip} {str} { @@ -402,8 +400,10 @@ proc {system strip} {str} { } proc {system usbdisks} {{full 0}} { - set disks [glob -nocomplain \ - -directory /sys/bus/usb/drivers/usb-storage *:*] + set disks [lmap i [glob -nocomplain \ + -directory /sys/bus/usb/drivers/usb-storage *:*] { + file tail $i + }] if {!$full} { return [llength $disks] } @@ -412,7 +412,7 @@ proc {system usbdisks} {{full 0}} { # Build list of device to device ID set map {} foreach block [glob -nocomplain -directory /sys/block sd?] { - set link [file readlink /sys/block/$block/device] + set link [file readlink $block/device] foreach disk $disks { if {[string first "/$disk/" $link] >= 0} { set map($block) $disk