提交 d120b2a4 编写于 作者: P Peter Oberparleiter 提交者: Martin Schwidefsky

[S390] cio: Allow 0 and 1 as input for channel path status attribute.

Channel path status can now be modified by writing '0' and '1'
to the sysfs status attribute in addition to 'offline' and
'online' respectively.
Signed-off-by: NPeter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
上级 f86635fa
......@@ -1169,9 +1169,9 @@ chp_status_write(struct device *dev, struct device_attribute *attr, const char *
if (!num_args)
return count;
if (!strnicmp(cmd, "on", 2))
if (!strnicmp(cmd, "on", 2) || !strcmp(cmd, "1"))
error = s390_vary_chpid(cp->chpid, 1);
else if (!strnicmp(cmd, "off", 3))
else if (!strnicmp(cmd, "off", 3) || !strcmp(cmd, "0"))
error = s390_vary_chpid(cp->chpid, 0);
else
error = -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册