mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-17 02:31:27 +00:00
- Disable targets on -clear_config.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2255 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2166,6 +2166,8 @@ sub clearConfiguration {
|
||||
foreach my $target (@{$targets}) {
|
||||
disableTarget($driver, $target);
|
||||
}
|
||||
|
||||
disableDriver($driver);
|
||||
}
|
||||
|
||||
print "\t-> Configuration cleared.\n";
|
||||
@@ -3869,6 +3871,28 @@ sub disableTarget {
|
||||
setTargetAttributes($driver, $target, \%attributes);
|
||||
}
|
||||
|
||||
sub enableDriver {
|
||||
my $driver = shift;
|
||||
my %attributes = ('enabled', 1);
|
||||
|
||||
my $attrs = $SCST->driverAttributes($driver);
|
||||
use Data::Dumper;
|
||||
print Dumper($attrs);
|
||||
return if (!defined($$attrs{'enabled'}));
|
||||
|
||||
setDriverAttributes($driver, \%attributes);
|
||||
}
|
||||
|
||||
sub disableDriver {
|
||||
my $driver = shift;
|
||||
my %attributes = ('enabled', 0);
|
||||
|
||||
my $attrs = $SCST->driverAttributes($driver);
|
||||
return if (!defined($$attrs{'enabled'}));
|
||||
|
||||
setDriverAttributes($driver, \%attributes);
|
||||
}
|
||||
|
||||
sub issueLip {
|
||||
my $driver = shift;
|
||||
my $target = shift;
|
||||
|
||||
Reference in New Issue
Block a user