From 54108c71df643b35a5684e9bce4551543f63ddc4 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 8 Mar 2013 23:49:24 +0100 Subject: fix hotplug --- hotplug.h | 36 +++++++++++++++++------------------- 1 file changed, 17 insertions(+), 19 deletions(-) (limited to 'hotplug.h') 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 -- cgit v1.2.3