1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-31 14:50:15 +03:00

better log test and comments

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
This commit is contained in:
Kay Sievers 2006-01-13 13:17:10 +01:00
parent afe9f2fb5f
commit d548032795
3 changed files with 8 additions and 6 deletions

10
udev.h
View File

@ -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 */

View File

@ -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;
}

View File

@ -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);