scstadmin: Fix saving groups without LUNs

Reported-by: Aayush Kasurde <aayush.kasurde@gmail.com>


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6150 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2015-03-25 19:43:30 +00:00
parent 2090b6811a
commit 9c037ae577
3 changed files with 17 additions and 6 deletions
@@ -27,6 +27,11 @@ TARGET_DRIVER scst_local {
INITIATOR ini3
}
GROUP group_without_luns_with_attrs {
addr_method FLAT
}
}
}
@@ -33,6 +33,11 @@ TARGET_DRIVER scst_local {
INITIATOR ini3
}
GROUP group_without_luns_with_attrs {
addr_method FLAT
}
}
}
+7 -6
View File
@@ -1566,12 +1566,6 @@ sub writeConfiguration {
}
}
if ($lun_buff || $init_buff) {
$group_buff .= " {\n";
$group_buff .= $lun_buff;
$group_buff .= $init_buff;
}
my ($grp_attributes, $errorString) = $SCST->groupAttributes($driver, $target, $group);
my $g_attribute_buff
= serializeKeyAttr("\t\t\t",
@@ -1581,6 +1575,13 @@ sub writeConfiguration {
$grp_attributes)
if ($nonkey);
if ($lun_buff || $init_buff ||
$g_attribute_buff || $g_attribute_buff_nk) {
$group_buff .= " {\n";
$group_buff .= $lun_buff;
$group_buff .= $init_buff;
}
if ($g_attribute_buff_nk) {
$g_attribute_buff .= "\n" if ($g_attribute_buff);
$g_attribute_buff .= "\t\t\t# Non-key attributes\n";