From 3e8fa6ba6b1c69d17d49e70162afa1c5ff798bc0 Mon Sep 17 00:00:00 2001 From: Vince Darley Date: Mon, 17 Feb 2003 12:02:37 +0000 Subject: [PATCH] filesystem configuration first cut --- library/vfsUtils.tcl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/library/vfsUtils.tcl b/library/vfsUtils.tcl index 330f687..8807283 100644 --- a/library/vfsUtils.tcl +++ b/library/vfsUtils.tcl @@ -94,12 +94,14 @@ proc ::vfs::attributes {mountpoint args} { return -code error "filesystem not known or not configurable" } - while {1} { - foreach {attr val} $args { - set args [lrange $args 2 end] - break - } + while {[llength $args] > 1} { + set attr [string range [lindex $args 0] 1 end] + set val [lindex $args 1] + set args [lrange $args 2 end] if {[info commands ::vfs::${ns}::$attr] != ""} { + if {![llength [info args ::vfs::${ns}::$attr]]} { + return -code error "filesystem attribute \"$attr\" is read-only" + } if {[catch {::vfs::${ns}::$attr $val} err]} { return -code error "error setting filesystem attribute\ \"$attr\": $err" -- 2.23.0