]> git.ipfire.org Git - thirdparty/systemd.git/blob - udevd.h
[PATCH] udevd - cleanup and better timeout handling
[thirdparty/systemd.git] / udevd.h
1 /*
2 * udevd.h
3 *
4 * Userspace devfs
5 *
6 * Copyright (C) 2004 Ling, Xiaofeng <xiaofeng.ling@intel.com>
7 * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
8 *
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU General Public License as published by the
12 * Free Software Foundation version 2 of the License.
13 *
14 * This program is distributed in the hope that it will be useful, but
15 * WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 */
24
25 #include "list.h"
26
27 /*
28 * FIXME: udev_root is post compile configurable and may also be
29 * mounted over at any time and /var/run/ and /tmp/ is unusable,
30 * cause it's cleaned at system startup, long _after_ udevd is
31 * already running. Should we use udev_init_config()?
32 */
33
34 #define UDEV_MAGIC "udev_" UDEV_VERSION
35 #define EVENT_TIMEOUT_SEC 5
36 #define UDEVSEND_CONNECT_RETRY 20 /* x 100 millisec */
37 #define UDEVD_SOCKET UDEV_ROOT ".udevd.socket"
38 #define UDEVD_LOCK UDEV_ROOT ".udevd.pid"
39
40 struct hotplug_msg {
41 char magic[20];
42 struct list_head list;
43 pid_t pid;
44 int seqnum;
45 time_t queue_time;
46 char action[8];
47 char devpath[128];
48 char subsystem[16];
49 };