Skip to contentSkip to conversation

cio: allow 0 and 1 as input for channel path status attribute

S390 Martin Schwidefsky 1 participant 1 message Mar 19, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

From: Peter Oberparleiter <[email protected]>

[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.

---

 drivers/s390/cio/chsc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/s390/cio/chsc.c +2 -2
diff -urpN linux-2.6/drivers/s390/cio/chsc.c linux-2.6-patched/drivers/s390/cio/chsc.c
@@ -1169,9 +1169,9 @@ chp_status_write(struct device *dev, str
 	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;