4 * Copyright (C) 2004 Ling, Xiaofeng <xiaofeng.ling@intel.com>
5 * Copyright (C) 2004-2005 Kay Sievers <kay.sievers@vrfy.org>
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation version 2 of the License.
11 * This program is distributed in the hope that it will be useful, but
12 * WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 675 Mass Ave, Cambridge, MA 02139, USA.
24 #define UDEV_MAGIC "udevd_" UDEV_VERSION
25 #define UDEVD_SOCK_PATH "/org/kernel/udev/udevd"
26 #define UDEVSEND_WAIT_MAX_SECONDS 3
27 #define UDEVSEND_WAIT_LOOP_PER_SECOND 10
29 #define UDEVD_PRIORITY -4
30 #define UDEV_PRIORITY -2
32 /* duration of initialization phase with shorter timeout */
33 #define UDEVD_INIT_TIME 5
34 #define UDEVD_INIT_EVENT_TIMEOUT 2
36 /* timeout to wait for missing events */
37 #define UDEVD_EVENT_TIMEOUT 5
39 /* maximum limit of runnig childs */
40 #define UDEVD_MAX_CHILDS 64
41 /* start to throttle forking if maximum number of running childs in our session is reached */
42 #define UDEVD_MAX_CHILDS_RUNNING 8
44 /* environment buffer, should match the kernel's size in lib/kobject_uevent.h */
45 #define UEVENT_BUFFER_SIZE 1024
46 #define UEVENT_NUM_ENVP 32
50 UDEVD_UEVENT_UDEVSEND,
51 UDEVD_UEVENT_INITSEND,
53 UDEVD_STOP_EXEC_QUEUE,
54 UDEVD_START_EXEC_QUEUE,
62 enum udevd_msg_type type;
63 char envbuf[UEVENT_BUFFER_SIZE+512];
67 enum udevd_msg_type type;
68 struct list_head node;
75 unsigned long long seqnum;
78 char *envp[UEVENT_NUM_ENVP+1];