X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=hotplug.h;h=7018d2397f49a2c7f34537fa2fb72b8f03632bc2;hp=2fa9cfecaf5454d88c78595ee36bc1f25ed916ff;hb=54108c71df643b35a5684e9bce4551543f63ddc4;hpb=f708f887cf30e94288670b2bfe6d7dc561fa4eea 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 + * Copyright (C) 2013 John Crispin + * + * 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 -#include -#include -#include - -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 -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