diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-02-21 15:01:53 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:36:13 -0700 |
commit | 2a9a19245bc5ac49e9f1e1f5d073c53f611fa9e2 (patch) | |
tree | 7d26213044e76a6bf242aac227e72286b4cf7b52 /udev_utils.c | |
parent | 9ed47a9f2186b67c0127049fdb4886284bc8a33d (diff) |
[PATCH] determine device type in udev_init_device()
Diffstat (limited to 'udev_utils.c')
-rw-r--r-- | udev_utils.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/udev_utils.c b/udev_utils.c index ea4aa25c90..c1e497626e 100644 --- a/udev_utils.c +++ b/udev_utils.c @@ -60,6 +60,8 @@ int udev_init_device(struct udevice *udev, const char* devpath, const char *subs udev->type = NET; else if (strncmp(udev->devpath, "/class/", 7) == 0) udev->type = CLASS; + else if (strncmp(udev->devpath, "/devices/", 9) == 0) + udev->type = PHYSDEV; udev->mode = 0660; strcpy(udev->owner, "root"); @@ -293,8 +295,7 @@ static int name_list_add(struct list_head *name_list, const char *name, int sort } /* calls function for every file found in specified directory */ -int call_foreach_file(file_fnct_t fnct, const char *dirname, - const char *suffix, void *data) +int call_foreach_file(file_fnct_t fnct, const char *dirname, const char *suffix, void *data) { struct dirent *ent; DIR *dir; |