- strfieldcpy(result, udev_root);
- strfieldcat(result, dev.name);
- break;
-
- case SYMLINK:
- strfieldcpy(result, dev.symlink);
- break;
-
- case MODE:
- sprintf(result, "%#o", dev.mode);
- break;
-
- case GROUP:
- strfieldcpy(result, dev.group);
- break;
-
- case OWNER:
- strfieldcpy(result, dev.owner);
- break;
-
- case PATH:
- strfieldcpy(result, path);
- break;
-
- default:
+ printf("%s/%s\n", udev_root, udev.name);
+ else
+ printf("%s\n", udev.name);
+ goto exit;
+ case QUERY_SYMLINK:
+ 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;
+ case QUERY_PATH:
+ printf("%s\n", udev.devpath);
+ goto exit;
+ case QUERY_ENV:
+ list_for_each_entry(name_loop, &udev.env_list, node)
+ printf("%s\n", name_loop->name);