Don't complain when setting STP sysfs values to the default one.
authorJustin Pettit <jpettit@nicira.com>
Thu, 2 Apr 2009 21:05:45 +0000 (14:05 -0700)
committerJustin Pettit <jpettit@nicira.com>
Thu, 2 Apr 2009 21:05:45 +0000 (14:05 -0700)
We don't support configuring STP through sysfs.  However, Xen tries to
disable STP by writing a zero value to some fields, which is our
default.  This change suppresses the warning that we don't support
setting STP sysfs values in those circumstances.

datapath/brc_sysfs_dp.c

index a1b3c8e33239badfa2b2df17af5ff95167f61cfa..8743938c2bd9be556ec0b866799879f3cdc14b65 100644 (file)
@@ -56,8 +56,14 @@ static ssize_t store_bridge_parm(struct class_device *d,
        (*set)(br, val);
        spin_unlock_bh(&br->lock);
 #else
-       printk("%s: xxx writing dp parms not supported yet!\n", 
-                       dp->netdev->name);
+       /* xxx We use a default value of 0 for all fields.  If the caller is
+        * xxx attempting to set the value to our default, just silently
+        * xxx ignore the request. 
+        */
+       if (val != 0) {
+               printk("%s: xxx writing dp parms not supported yet!\n", 
+                               dp->netdev->name);
+       }
 #endif
        return len;
 }