mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-20 14:16:31 +00:00
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:
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user