rework device hotplug handling some more, add device_lock/device_unlock to prevent...
[project/netifd.git] / device.h
index f7718cc..3d233d7 100644 (file)
--- a/device.h
+++ b/device.h
@@ -100,6 +100,8 @@ struct device_user {
        struct list_head list;
 
        bool claimed;
+       bool hotplug;
+
        struct device *dev;
        void (*cb)(struct device_user *, enum device_event);
 };
@@ -113,6 +115,9 @@ extern const struct config_param_list device_attr_list;
 extern const struct device_type simple_device_type;
 extern const struct device_type bridge_device_type;
 
+void device_lock(void);
+void device_unlock(void);
+
 struct device *device_create(const char *name, const struct device_type *type,
                             struct blob_attr *config);
 void device_init_settings(struct device *dev, struct blob_attr **tb);