浏览代码

[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: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Peter Oberparleiter 18 年之前
父节点
当前提交
d120b2a4e6
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/s390/cio/chsc.c

+ 2 - 2
drivers/s390/cio/chsc.c

@@ -1169,9 +1169,9 @@ chp_status_write(struct device *dev, struct device_attribute *attr, const char *
 	if (!num_args)
 	if (!num_args)
 		return count;
 		return count;
 
 
-	if (!strnicmp(cmd, "on", 2))
+	if (!strnicmp(cmd, "on", 2) || !strcmp(cmd, "1"))
 		error = s390_vary_chpid(cp->chpid, 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);
 		error = s390_vary_chpid(cp->chpid, 0);
 	else
 	else
 		error = -EINVAL;
 		error = -EINVAL;