},
.show = bonding_show_bonds,
.store = bonding_store_bonds,
- .namespace = bonding_namespace,
};
- int bond_create_slave_symlinks(struct net_device *master,
- struct net_device *slave)
- {
- char linkname[IFNAMSIZ+7];
- int ret = 0;
-
- /* first, create a link from the slave back to the master */
- ret = sysfs_create_link(&(slave->dev.kobj), &(master->dev.kobj),
- "master");
- if (ret)
- return ret;
- /* next, create a link from the master to the slave */
- sprintf(linkname, "slave_%s", slave->name);
- ret = sysfs_create_link(&(master->dev.kobj), &(slave->dev.kobj),
- linkname);
-
- /* free the master link created earlier in case of error */
- if (ret)
- sysfs_remove_link(&(slave->dev.kobj), "master");
-
- return ret;
-
- }
-
- void bond_destroy_slave_symlinks(struct net_device *master,
- struct net_device *slave)
- {
- char linkname[IFNAMSIZ+7];
-
- sysfs_remove_link(&(slave->dev.kobj), "master");
- sprintf(linkname, "slave_%s", slave->name);
- sysfs_remove_link(&(master->dev.kobj), linkname);
- }
-
-
/*
* Show the slaves in the current bond.
*/
#define dev_proc_init() 0
#endif
- extern int netdev_class_create_file_ns(struct class_attribute *class_attr,
- const void *ns);
- extern void netdev_class_remove_file_ns(struct class_attribute *class_attr,
- const void *ns);
-int netdev_class_create_file(struct class_attribute *class_attr);
-void netdev_class_remove_file(struct class_attribute *class_attr);
++int netdev_class_create_file_ns(struct class_attribute *class_attr,
++ const void *ns);
++void netdev_class_remove_file_ns(struct class_attribute *class_attr,
++ const void *ns);
+
+static inline int netdev_class_create_file(struct class_attribute *class_attr)
+{
+ return netdev_class_create_file_ns(class_attr, NULL);
+}
+
+static inline void netdev_class_remove_file(struct class_attribute *class_attr)
+{
+ netdev_class_remove_file_ns(class_attr, NULL);
+}
extern struct kobj_ns_type_operations net_ns_type_operations;