- if (root) {
- int slen;
- char *spos;
- char slink[NAME_SIZE];
-
- pos = result;
- foreach_strpart(udev.symlink, " \n\r", spos, slen) {
- strncpy(slink, spos, slen);
- slink[slen] = '\0';
- pos += sprintf(pos, "%s/%s ", udev_root, slink);
- }
- } else {
- strfieldcpy(result, udev.symlink);
- }
- break;
-
+ if (list_empty(&udev.symlink_list))
+ break;
+ if (root)
+ list_for_each_entry(name_loop, &udev.symlink_list, node)
+ printf("%s/%s ", udev_root, name_loop->name);
+ else
+ list_for_each_entry(name_loop, &udev.symlink_list, node)
+ printf("%s ", name_loop->name);
+ printf("\n");
+ goto exit;