fix interrupted read checks in log collection
[project/netifd.git] / device.h
index 176d1ef..8d610c9 100644 (file)
--- a/device.h
+++ b/device.h
@@ -11,7 +11,6 @@ typedef int (*device_state_cb)(struct device *, bool up);
 
 enum {
        DEV_ATTR_TYPE,
-       DEV_ATTR_NAME,
        DEV_ATTR_IFNAME,
        DEV_ATTR_MTU,
        DEV_ATTR_MACADDR,
@@ -31,10 +30,11 @@ struct device_type {
 
        const struct config_param_list *config_params;
 
-       struct device *(*create)(struct blob_attr *attr);
+       struct device *(*create)(const char *name, struct blob_attr *attr);
        void (*config_init)(struct device *);
        enum dev_change_type (*reload)(struct device *, struct blob_attr *);
-       void (*dump_status)(struct device *, struct blob_buf *buf);
+       void (*dump_info)(struct device *, struct blob_buf *buf);
+       void (*dump_stats)(struct device *, struct blob_buf *buf);
        int (*check_state)(struct device *);
        void (*free)(struct device *);
 };
@@ -132,6 +132,7 @@ void device_set_present(struct device *dev, bool state);
 int device_claim(struct device_user *dep);
 void device_release(struct device_user *dep);
 int device_check_state(struct device *dev);
+void device_dump_status(struct blob_buf *b, struct device *dev);
 
 static inline void
 device_free(struct device *dev)