mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-22 05:01:27 +00:00
- Die if /proc/scsi_tgt/version doesn't exist.
- Replace croak() with die() in the module. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1411 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2,6 +2,8 @@ Changes for 1.0.11
|
||||
|
||||
- Added -noprompt option. Use with care!
|
||||
- Added support for T10 device ID.
|
||||
- Die if /proc/scsi_tgt/version doesn't exist.
|
||||
- Replace croak() with die() in the module.
|
||||
|
||||
Changes for 1.0.10
|
||||
|
||||
|
||||
@@ -128,6 +128,9 @@ sub new {
|
||||
|
||||
my $scstVersion = $self->scstVersion();
|
||||
|
||||
die("Failed to obtain SCST version information. Is the scst module loaded?\n")
|
||||
if ($scstVersion == -1);
|
||||
|
||||
my($major, $minor, $release) = split(/\./, $scstVersion, 3);
|
||||
($release, undef) = split(/\-/, $release) if ($release =~ /\-/);
|
||||
|
||||
@@ -136,7 +139,7 @@ sub new {
|
||||
(($major == $_SCST_MIN_MAJOR_) && ($minor == $_SCST_MIN_MINOR_) &&
|
||||
($release >= $_SCST_MIN_RELEASE_)));
|
||||
|
||||
croak("This module requires at least SCST version $_SCST_MIN_MAJOR_\.$_SCST_MIN_MINOR_\.".
|
||||
die("This module requires at least SCST version $_SCST_MIN_MAJOR_\.$_SCST_MIN_MINOR_\.".
|
||||
"$_SCST_MIN_RELEASE_ and version $scstVersion was found") if ($badVersion);
|
||||
|
||||
return $self;
|
||||
@@ -146,7 +149,7 @@ sub scstVersion {
|
||||
my $self = shift;
|
||||
|
||||
my $io = new IO::File $_SCST_VERSION_IO_, O_RDONLY;
|
||||
return 1 if (!$io);
|
||||
return -1 if (!$io);
|
||||
|
||||
my $version = <$io>;
|
||||
chomp $version;
|
||||
|
||||
Reference in New Issue
Block a user