diff options
author | Kay Sievers <kay.sievers@suse.de> | 2006-01-13 13:17:10 +0100 |
---|---|---|
committer | Kay Sievers <kay.sievers@suse.de> | 2006-01-13 13:17:10 +0100 |
commit | d548032795b3c02aad606537a35ff63d954f1613 (patch) | |
tree | 2681108fec568ebfe3c9d1bddfee584ec7b5dd40 | |
parent | afe9f2fb5fe97281e2e84c12e1451a8e9bab6edb (diff) |
better log test and comments
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
-rw-r--r-- | udev.h | 10 | ||||
-rw-r--r-- | udev_config.c | 2 | ||||
-rw-r--r-- | udev_rules.c | 2 |
3 files changed, 8 insertions, 6 deletions
@@ -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 a7e19fe864..204827407d 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 8693b71c08..fc1f3c9c3d 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); |