summaryrefslogtreecommitdiffhomepage
path: root/device.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-10-06 01:51:31 +0200
committerFelix Fietkau <nbd@openwrt.org>2011-10-06 01:51:38 +0200
commit37441269fbc27fc9af0562c6a4af50c1d6d353dd (patch)
tree3ebdd11040e73c780cea3030987911677488d1b8 /device.h
parent9ce15904743529fc38d1bb2fc78bf559db98fe3b (diff)
prevent deletion devices that are part of the current configuration
Diffstat (limited to 'device.h')
-rw-r--r--device.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/device.h b/device.h
index 45af150..176d1ef 100644
--- a/device.h
+++ b/device.h
@@ -63,6 +63,9 @@ struct device {
bool present;
int active;
+ bool current_config;
+ bool default_config;
+
/* set interface up or down */
device_state_cb set_state;
@@ -115,6 +118,9 @@ struct device *device_create(const char *name, const struct device_type *type,
void device_init_settings(struct device *dev, struct blob_attr **tb);
void device_init_pending(void);
+void device_reset_config(void);
+void device_reset_old(void);
+
void device_init_virtual(struct device *dev, const struct device_type *type, const char *name);
int device_init(struct device *iface, const struct device_type *type, const char *ifname);
void device_cleanup(struct device *iface);