diff --git a/scst/README b/scst/README index 7f35d0eca..6c1413fcf 100644 --- a/scst/README +++ b/scst/README @@ -1237,32 +1237,32 @@ other_tgt_id=2 cd /sys/kernel/scst_tgt/device_groups echo del dgroup1 >mgmt echo del dgroup2 >mgmt -echo add dgroup1 >mgmt +echo create dgroup1 >mgmt echo add disk01 >dgroup1/devices/mgmt -echo add tgroup1 >dgroup1/target_groups/mgmt +echo create tgroup1 >dgroup1/target_groups/mgmt echo ${own_tgt_id} >dgroup1/target_groups/tgroup1/group_id echo add ib_srpt_0 >dgroup1/target_groups/tgroup1/mgmt echo ${own_tgt_id} >dgroup1/target_groups/tgroup1/ib_srpt_0/rel_tgt_id if [ ${own_tgt_id} = 1 ]; then echo 1 >dgroup1/target_groups/tgroup1/preferred fi -echo add tgroup2 >dgroup1/target_groups/mgmt +echo create tgroup2 >dgroup1/target_groups/mgmt echo ${other_tgt_id} >dgroup1/target_groups/tgroup2/group_id echo add ib_srpt_0-other >dgroup1/target_groups/tgroup2/mgmt echo ${other_tgt_id} >dgroup1/target_groups/tgroup2/ib_srpt_0-other/rel_tgt_id if [ ${other_tgt_id} = 1 ]; then echo 1 >dgroup1/target_groups/tgroup1/preferred fi -echo add dgroup2 >mgmt +echo create dgroup2 >mgmt echo add disk02 >dgroup2/devices/mgmt -echo add tgroup1 >dgroup2/target_groups/mgmt +echo create tgroup1 >dgroup2/target_groups/mgmt echo ${own_tgt_id} >dgroup2/target_groups/tgroup1/group_id echo add ib_srpt_0 >dgroup2/target_groups/tgroup1/mgmt echo ${own_tgt_id} >dgroup2/target_groups/tgroup1/ib_srpt_0/rel_tgt_id if [ ${own_tgt_id} = 2 ]; then echo 1 >dgroup2/target_groups/tgroup1/preferred fi -echo add tgroup2 >dgroup2/target_groups/mgmt +echo create tgroup2 >dgroup2/target_groups/mgmt echo ${other_tgt_id} >dgroup2/target_groups/tgroup2/group_id echo add ib_srpt_0-other >dgroup2/target_groups/tgroup2/mgmt echo ${other_tgt_id} >dgroup2/target_groups/tgroup2/ib_srpt_0-other/rel_tgt_id diff --git a/scst/src/scst_sysfs.c b/scst/src/scst_sysfs.c index 4c33412e7..57b086e82 100644 --- a/scst/src/scst_sysfs.c +++ b/scst/src/scst_sysfs.c @@ -5388,7 +5388,7 @@ static ssize_t scst_dg_tgs_mgmt_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) { static const char help[] = - "Usage: echo \"add group_name\" >mgmt\n" + "Usage: echo \"create group_name\" >mgmt\n" " echo \"del group_name\" >mgmt\n"; return scnprintf(buf, PAGE_SIZE, help); @@ -5413,7 +5413,7 @@ static int scst_dg_tgs_mgmt_store_work_fn(struct scst_sysfs_work_item *w) res = -EINVAL; pp = cmd; p = scst_get_next_lexem(&pp); - if (strcasecmp(p, "add") == 0) { + if (strcasecmp(p, "create") == 0 || strcasecmp(p, "add") == 0) { dev_name = scst_get_next_lexem(&pp); if (!*dev_name) goto out; @@ -5526,7 +5526,7 @@ static ssize_t scst_device_groups_mgmt_show(struct kobject *kobj, char *buf) { static const char help[] = - "Usage: echo \"add group_name\" >mgmt\n" + "Usage: echo \"create group_name\" >mgmt\n" " echo \"del group_name\" >mgmt\n"; return scnprintf(buf, PAGE_SIZE, help); @@ -5549,7 +5549,7 @@ static ssize_t scst_device_groups_mgmt_store(struct kobject *kobj, res = -EINVAL; p = scst_get_next_lexem(&pp); - if (strcasecmp(p, "add") == 0) { + if (strcasecmp(p, "create") == 0 || strcasecmp(p, "add") == 0) { group_name = scst_get_next_lexem(&pp); if (!*group_name) goto out;