From d548032795b3c02aad606537a35ff63d954f1613 Mon Sep 17 00:00:00 2001 From: Kay Sievers Date: Fri, 13 Jan 2006 13:17:10 +0100 Subject: [PATCH] better log test and comments Signed-off-by: Kay Sievers --- udev.h | 10 ++++++---- udev_config.c | 2 +- udev_rules.c | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/udev.h b/udev.h index c060b8d6f..6dc0c9e35 100644 --- a/udev.h +++ b/udev.h @@ -55,7 +55,7 @@ struct udev_rules; struct sysfs_device { struct list_head node; /* for device cache */ char devpath[PATH_SIZE]; - char subsystem[NAME_SIZE]; /* $class/$bus/"drivers */ + char subsystem[NAME_SIZE]; /* $class/$bus/"drivers" */ char kernel_name[NAME_SIZE]; /* device instance name */ char kernel_number[NAME_SIZE]; char driver[NAME_SIZE]; /* device driver name */ @@ -63,7 +63,7 @@ struct sysfs_device { struct udevice { /* device event */ - struct sysfs_device *dev; + struct sysfs_device *dev; /* points to dev_local by default */ struct sysfs_device dev_local; char action[NAME_SIZE]; @@ -114,9 +114,11 @@ extern struct sysfs_device *sysfs_device_get(const char *devpath); extern struct sysfs_device *sysfs_device_get_parent(struct sysfs_device *dev); extern char *sysfs_attr_get_value(const char *devpath, const char *attr_name); -/* udev_add.c / udev_remove.c */ -extern int udev_add_device(struct udevice *udev); +/* udev_add.c */ extern int udev_make_node(struct udevice *udev, const char *file, dev_t devt, mode_t mode, uid_t uid, gid_t gid); +extern int udev_add_device(struct udevice *udev); + +/* udev_remove.c */ extern int udev_remove_device(struct udevice *udev); /* udev_db.c */ diff --git a/udev_config.c b/udev_config.c index a7e19fe86..204827407 100644 --- a/udev_config.c +++ b/udev_config.c @@ -136,7 +136,7 @@ static int parse_config_file(void) linepos = line; retval = get_key(&linepos, &variable, &value); if (retval != 0) { - err("error parsing %s, line %d:%d", udev_config_filename, lineno, (int) (linepos-line)); + err("error parsing %s, line %d:%d", udev_config_filename, lineno, (int)(linepos-line)); continue; } diff --git a/udev_rules.c b/udev_rules.c index 8693b71c0..fc1f3c9c3 100644 --- a/udev_rules.c +++ b/udev_rules.c @@ -352,7 +352,7 @@ static int wait_for_sysfs(struct udevice *udev, const char *file, int timeout) while (--loop) { if (stat(filename, &stats) == 0) { - info("file appeared after %i loops", (timeout * WAIT_LOOP_PER_SECOND) - loop-1); + info("file '%s' appeared after %i loops", filename, (timeout * WAIT_LOOP_PER_SECOND) - loop-1); return 0; } info("wait for %i mseconds", 1000 / WAIT_LOOP_PER_SECOND); -- 2.30.2