udev.h revision 3cf1a8e36ed0d9bb9b000adf36dd347e8d988478
/*
* Copyright (C) 2003 Greg Kroah-Hartman <greg@kroah.com>
* Copyright (C) 2003-2010 Kay Sievers <kay.sievers@vrfy.org>
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _UDEV_H_
#define _UDEV_H_
#include <signal.h>
#include "libudev.h"
#include "libudev-private.h"
#define UDEV_CTRL_SOCK_PATH "@/org/kernel/udev/udevd"
struct udev_event {
struct udev_device *dev;
struct udev_device *dev_parent;
struct udev_device *dev_db;
char *name;
char *tmp_node;
char *program_result;
struct udev_list_node run_list;
int exec_delay;
unsigned long long birth_usec;
unsigned long long timeout_usec;
int fd_signal;
bool sigterm;
bool inotify_watch;
bool inotify_watch_final;
bool group_final;
bool owner_final;
bool mode_set;
bool mode_final;
bool name_final;
bool devlink_final;
bool run_final;
};
struct udev_watch {
struct udev_list_node node;
int handle;
char *name;
};
/* udev-rules.c */
struct udev_rules;
int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event, const sigset_t *sigmask);
/* udev-event.c */
int udev_event_execute_rules(struct udev_event *event, struct udev_rules *rules, const sigset_t *sigset);
/* udev-watch.c */
/* udev-node.c */
/* udevadm commands */
#endif