From 06708a1d03f44ccdd4c5fa57cf878adc3869e81a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 13 Nov 2015 16:26:09 +0000 Subject: [PATCH 1/4] scst: Fix kernel 2.6.36 build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoid that compilation fails with the following error message: include/linux/slub_def.h:246: error: conflicting types for ‘kmalloc’ include/scst/backport.h:458: error: implicit declaration of function ‘kmalloc’ git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6688 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/include/backport.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scst/include/backport.h b/scst/include/backport.h index 8bb4f4bfb..480b13e3c 100644 --- a/scst/include/backport.h +++ b/scst/include/backport.h @@ -20,7 +20,8 @@ * GNU General Public License for more details. */ -#include /* sync_page_range() */ +#include /* kmalloc() */ +#include /* sync_page_range() */ /* */ From cfe0d342014903506165f9439ca036f6000cd624 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 13 Nov 2015 19:07:10 +0000 Subject: [PATCH 2/4] scstadmin: Do not try to clear copy manager assignments This patch avoids that the following error message is displayed on the console while "/etc/init.d/scst start" is executed: scst: scst_cm_mgmt:3556:***ERROR***: Device copy_manager_tgt not found git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6689 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/scstadmin.sysfs/scstadmin | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scstadmin/scstadmin.sysfs/scstadmin b/scstadmin/scstadmin.sysfs/scstadmin index 7c7a7939e..6dca8a234 100755 --- a/scstadmin/scstadmin.sysfs/scstadmin +++ b/scstadmin/scstadmin.sysfs/scstadmin @@ -2199,6 +2199,8 @@ sub applyConfigAssignments { $assignments = $$config{'TARGET_DRIVER'}; foreach my $driver (sort keys %{$assignments}) { + next if $driver eq 'copy_manager'; + if (!defined($CURRENT{'assign'}->{$driver})) { condExit("Target driver '$driver' is not loaded or available."); } @@ -2697,6 +2699,8 @@ sub clearConfiguration { } foreach my $driver (sort keys %{$assignments}) { + next if $driver eq 'copy_manager'; + foreach my $target (sort keys %{$$assignments{$driver}}) { foreach my $group (sort keys %{$$assignments{$driver}->{$target}->{'GROUP'}}) { clearInitiators($driver, $target, $group); From 7588498c4a7d60ed2b00f079305c31a5ee03870e Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Fri, 13 Nov 2015 21:07:50 +0000 Subject: [PATCH 3/4] scstadmin: Leave out the copy manager from the driver list git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6690 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/scstadmin.sysfs/scst-0.9.10/lib/SCST/SCST.pm | 3 ++- scstadmin/scstadmin.sysfs/scstadmin | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/scstadmin/scstadmin.sysfs/scst-0.9.10/lib/SCST/SCST.pm b/scstadmin/scstadmin.sysfs/scst-0.9.10/lib/SCST/SCST.pm index 9b9e5db2f..4aa497f98 100644 --- a/scstadmin/scstadmin.sysfs/scst-0.9.10/lib/SCST/SCST.pm +++ b/scstadmin/scstadmin.sysfs/scst-0.9.10/lib/SCST/SCST.pm @@ -550,7 +550,8 @@ sub drivers { if (opendir($dHandle, $_path)) { foreach my $driver (readdir($dHandle)) { - next if (($driver eq '.') || ($driver eq '..')); + next if ($driver eq '.' || $driver eq '..' || + $driver eq 'copy_manager'); if (-d make_path(SCST_TARGETS_DIR(), $driver)) { push @drivers, $driver; diff --git a/scstadmin/scstadmin.sysfs/scstadmin b/scstadmin/scstadmin.sysfs/scstadmin index 6dca8a234..60d609717 100755 --- a/scstadmin/scstadmin.sysfs/scstadmin +++ b/scstadmin/scstadmin.sysfs/scstadmin @@ -1423,8 +1423,6 @@ sub writeConfiguration { } foreach my $driver (sort keys %{$CURRENT{'assign'}}) { - next if $driver eq 'copy_manager'; - my $driver_buff; my ($drv_attrs, $errorString) = $SCST->driverAttributes($driver); @@ -2199,8 +2197,6 @@ sub applyConfigAssignments { $assignments = $$config{'TARGET_DRIVER'}; foreach my $driver (sort keys %{$assignments}) { - next if $driver eq 'copy_manager'; - if (!defined($CURRENT{'assign'}->{$driver})) { condExit("Target driver '$driver' is not loaded or available."); } @@ -2699,8 +2695,6 @@ sub clearConfiguration { } foreach my $driver (sort keys %{$assignments}) { - next if $driver eq 'copy_manager'; - foreach my $target (sort keys %{$$assignments{$driver}}) { foreach my $group (sort keys %{$$assignments{$driver}->{$target}->{'GROUP'}}) { clearInitiators($driver, $target, $group); From 10a3374bc077f7d98fb9b545d5d03e8e72c1feca Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 14 Nov 2015 01:07:27 +0000 Subject: [PATCH 4/4] scstadmin: Pass $PREFIX to Makefile.PL Signed-off-by: Alexey Mochkin git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6691 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scstadmin/scstadmin.sysfs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scstadmin/scstadmin.sysfs/Makefile b/scstadmin/scstadmin.sysfs/Makefile index d6e9ee34c..3a41eeb89 100644 --- a/scstadmin/scstadmin.sysfs/Makefile +++ b/scstadmin/scstadmin.sysfs/Makefile @@ -20,7 +20,7 @@ uninstall: perl-module: @cd ./scst-$(MODULE_VERSION); \ - perl Makefile.PL; + perl Makefile.PL PREFIX=$(PREFIX); $(MAKE) -C scst-$(MODULE_VERSION) test: