]> git.ipfire.org Git - thirdparty/systemd.git/blob - udev_sysfs.h
[PATCH] don't wait for sysfs if the kernel(2.6.10-rc2) tells us what not to expect
[thirdparty/systemd.git] / udev_sysfs.h
1 /*
2 * udev_sysfs.h
3 *
4 * Copyright (C) 2004 Kay Sievers <kay.sievers@vrfy.org>
5 * Copyright (C) 2004 Greg Kroah-Hartman <greg@kroah.com>
6 *
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.
10 *
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.
15 *
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.
19 *
20 */
21
22 #ifndef _UDEV_SYSFS_H_
23 #define _UDEV_SYSFS_H_
24
25 #include "libsysfs/sysfs/libsysfs.h"
26
27 #define WAIT_MAX_SECONDS 5
28 #define WAIT_LOOP_PER_SECOND 20
29
30 extern int subsystem_expect_no_dev(const char *subsystem);
31
32 /* /sys/class /sys/block devices */
33 extern struct sysfs_class_device *wait_class_device_open(const char *path);
34 extern int wait_for_class_device(struct sysfs_class_device *class_dev, const char **error);
35
36 /* /sys/devices devices */
37 extern struct sysfs_device *wait_devices_device_open(const char *path);
38 extern int wait_for_devices_device(struct sysfs_device *devices_dev, const char **error);
39
40 #endif /* _UDEV_SYSFS_H_ */