diff options
author | kay.sievers@vrfy.org <kay.sievers@vrfy.org> | 2005-03-05 05:35:31 +0100 |
---|---|---|
committer | Greg KH <gregkh@suse.de> | 2005-04-26 23:48:48 -0700 |
commit | e48fc108d9731f6f091742fe6588c495d1948fac (patch) | |
tree | 61ae26907421a39be1205de59b9594f0134e3d04 /udev_utils.c | |
parent | 7eb92135c61af77fff62eec5f396b9633a54b245 (diff) |
[PATCH] allow unlimitied count of symlinks
Diffstat (limited to 'udev_utils.c')
-rw-r--r-- | udev_utils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/udev_utils.c b/udev_utils.c index cfa4ab51b3..60f5ad859a 100644 --- a/udev_utils.c +++ b/udev_utils.c @@ -42,6 +42,7 @@ int udev_init_device(struct udevice *udev, const char* devpath, const char *subs char *pos; memset(udev, 0x00, sizeof(struct udevice)); + INIT_LIST_HEAD(&udev->symlink_list); if (subsystem) strfieldcpy(udev->subsystem, subsystem); @@ -89,6 +90,17 @@ int udev_init_device(struct udevice *udev, const char* devpath, const char *subs return 0; } +void udev_cleanup_device(struct udevice *udev) +{ + struct name_entry *name_loop; + struct name_entry *temp_loop; + + list_for_each_entry_safe(name_loop, temp_loop, &udev->symlink_list, node) { + list_del(&name_loop->node); + free(name_loop); + } +} + int kernel_release_satisfactory(unsigned int version, unsigned int patchlevel, unsigned int sublevel) { static unsigned int kversion = 0; |