- Be less verbose with the 'enabled' attribute.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1893 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Mark Buechler
2010-07-29 16:44:32 +00:00
parent 32d9107dfd
commit 0857c68f7d

View File

@@ -2310,7 +2310,13 @@ sub setDriverAttribute {
my $attribute = shift;
my $value = shift;
print "-> Setting driver attribute '$attribute' to value '$value' for driver '$driver': ";
if ($attribute eq 'enabled') {
my $onoff = $value ? 'Enabling' : 'Disabling';
print "-> $onoff driver '$driver': ";
} else {
print "-> Setting driver attribute '$attribute' to value '$value' for driver '$driver': ";
}
my $rc = $SCST->setDriverAttribute($driver, $attribute, $value);
print "done.\n";
@@ -2432,8 +2438,14 @@ sub setTargetAttribute {
my $attribute = shift;
my $value = shift;
print "-> Setting target attribute '$attribute' to value '$value' for ".
"driver/target '$driver/$target': ";
if ($attribute eq 'enabled') {
my $onoff = $value ? 'Enabling' : 'Disabling';
print "-> $onoff driver/target '$driver/$target': ";
} else {
print "-> Setting target attribute '$attribute' to value '$value' for ".
"driver/target '$driver/$target': ";
}
my $rc = $SCST->setTargetAttribute($driver, $target, $attribute, $value);
print "done.\n";