From: Peter Oberparleiter Date: Fri, 27 Apr 2007 14:01:27 +0000 (+0200) Subject: [S390] cio: Allow 0 and 1 as input for channel path status attribute. X-Git-Tag: v2.6.22-rc1~1130^2~34 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d120b2a4e60cc9e62e7cc5dcf049100af3745cc4;p=linux-2.6 [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 Signed-off-by: Martin Schwidefsky Signed-off-by: Heiko Carstens --- diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c index bb6f876e53..b329851f7b 100644 --- a/drivers/s390/cio/chsc.c +++ b/drivers/s390/cio/chsc.c @@ -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;