qeth: display "undefined" value of sysfs-attribute "layer2"
authorUrsula Braun <ursula.braun@de.ibm.com>
Wed, 26 Aug 2009 02:01:10 +0000 (02:01 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 27 Aug 2009 00:34:22 +0000 (17:34 -0700)
If nothing has been written into the qeth sysfs-attribute layer2,
its value is "-1" meaning "not yet defined". But the value is
displayed as "1" meaning "layer2 selected". The patch changes the
reading of this "-1"-value to "-1" to make clear the layer2-attribute
has not yet been defined.

Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_sys.c

index 568465d7517fea77fde3a1c3562cd896ae31cb13..33505c2a0e3a57f6b01d2533a00e64c463ae3c83 100644 (file)
@@ -364,7 +364,7 @@ static ssize_t qeth_dev_layer2_show(struct device *dev,
        if (!card)
                return -EINVAL;
 
-       return sprintf(buf, "%i\n", card->options.layer2 ? 1:0);
+       return sprintf(buf, "%i\n", card->options.layer2);
 }
 
 static ssize_t qeth_dev_layer2_store(struct device *dev,