Commit add9774a authored by Yathindra Naik's avatar Yathindra Naik
Browse files

Check for unnamed args before actually checking for named args

parent 945364f2
......@@ -708,14 +708,16 @@ Node instproc program-agent {args} {
Node instproc disk-agent {args} {
set curdisk [new Disk [$self set sim]]
if {$(-name) == {} && $(-type) == {} && $(-mountpoint) == {} && $(-params) == {}} {
return $curdisk
}
::GLOBALS::named-args $args {
-name {} -type {} -mountpoint {} -params {}
}
if {$(-name) == {} && $(-type) == {} && $(-mountpoint) == {} && $(-params) == {}} {
return $curdisk
}
set curdisk [new Disk [$self set sim]]
$curdisk set node $self
$curdisk set name $(-name)
$curdisk set type $(-type)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment