summaryrefslogtreecommitdiffstats
path: root/hotplug.h
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-03-08 23:49:24 +0100
committerJohn Crispin <blogic@openwrt.org>2013-03-13 18:58:13 +0100
commit54108c71df643b35a5684e9bce4551543f63ddc4 (patch)
tree55c547552b7a4e86b854d387cd2c01446ef1ee65 /hotplug.h
parentf708f887cf30e94288670b2bfe6d7dc561fa4eea (diff)
downloadunitd-54108c71df643b35a5684e9bce4551543f63ddc4.tar
unitd-54108c71df643b35a5684e9bce4551543f63ddc4.zip
fix hotplug
Diffstat (limited to 'hotplug.h')
-rw-r--r--hotplug.h36
1 files changed, 17 insertions, 19 deletions
diff --git a/hotplug.h b/hotplug.h
index 2fa9cfe..7018d23 100644
--- a/hotplug.h
+++ b/hotplug.h
@@ -1,25 +1,23 @@
+/*
+ * Copyright (C) 2013 Felix Fietkau <nbd@openwrt.org>
+ * Copyright (C) 2013 John Crispin <blogic@openwrt.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 2.1
+ * as published by the Free Software Foundation
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
#ifndef __PROCD_HOTPLUG_H
#define __PROCD_HOTPLUG_H
-#include <libubox/avl.h>
-#include <libubox/blob.h>
-#include <libubox/blobmsg.h>
-#include <libubox/utils.h>
-
-struct rule_file {
- struct avl_node avl;
- struct blob_attr data[];
-};
-
-struct rule_handler {
- const char *name;
- int (*handler)(struct blob_attr *cur, struct blob_attr *msg);
-};
+#include <libubox/uloop.h>
-struct rule_file *rule_file_get(const char *filename);
-void rule_file_free_all(void);
-void rule_error(struct blob_attr *cur, const char *msg);
-void rule_process_msg(struct rule_file *f, struct blob_attr *msg);
-void rule_handle_command(const char *name, struct blob_attr *data);
+void hotplug(char *rules);
+void hotplug_last_event(uloop_timeout_handler handler);
#endif