From 5075d638e55e1f696c325892d139296b8b66dbbe Mon Sep 17 00:00:00 2001 From: HummyPkg Date: Fri, 2 Jun 2017 20:03:28 +0100 Subject: [PATCH] replace {system diskdev} with better version --- webif/lib/system.class | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/webif/lib/system.class b/webif/lib/system.class index ce93d3b..25fafe5 100644 --- a/webif/lib/system.class +++ b/webif/lib/system.class @@ -365,15 +365,8 @@ proc {system diskpart} {} { } proc {system diskdev} {} { - set part [system diskpart] - foreach line [split [\ - exec /mod/bin/busybox/df $part 2>>/dev/null] "\n\r"] { - if {[string match "/*" $line]} { - lassign [split $line] dev - break - } - } - return $dev + return [lindex [lsearch -regexp -inline \ + [split [file read /proc/mounts] "\n\r"] " [system diskpart] "] 0] } proc {system disk} {} {