mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-24 06:01:28 +00:00
scst_sysfs: Save the value of the 'preferred' attribute only if it has been set
The default value of the 'preferred' attribute is 0 (disabled). Hence it is only necessary that scstadmin saves the value of that attribute if it is not zero. Signed-off-by: Bart Van Assche <bvanassche@acm.org> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5502 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -5414,8 +5414,8 @@ static ssize_t scst_tg_preferred_show(struct kobject *kobj,
|
||||
struct scst_target_group *tg;
|
||||
|
||||
tg = container_of(kobj, struct scst_target_group, kobj);
|
||||
return scnprintf(buf, PAGE_SIZE, "%u\n%s",
|
||||
tg->preferred, SCST_SYSFS_KEY_MARK "\n");
|
||||
return scnprintf(buf, PAGE_SIZE, "%u\n%s", tg->preferred,
|
||||
tg->preferred ? SCST_SYSFS_KEY_MARK "\n" : "");
|
||||
}
|
||||
|
||||
static int scst_tg_preferred_store_work_fn(struct scst_sysfs_work_item *w)
|
||||
|
||||
Reference in New Issue
Block a user