summaryrefslogtreecommitdiff
path: root/udev/udev_db.c
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-09-13 21:09:28 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-09-13 21:09:28 +0200
commit93b0f384589fce818edb9678571a30e71930d14c (patch)
tree0a66d2d7749b97e8d5919fdf2971db43a52240c2 /udev/udev_db.c
parentb2d9e4f20075d355cd4fe091929bc336642aa50d (diff)
libudev: udev_device - add attribute cache
Diffstat (limited to 'udev/udev_db.c')
-rw-r--r--udev/udev_db.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/udev/udev_db.c b/udev/udev_db.c
index 432aa6cbb8..4f3dc606e4 100644
--- a/udev/udev_db.c
+++ b/udev/udev_db.c
@@ -292,36 +292,3 @@ int udev_db_delete_device(struct udevice *udevice)
return 0;
}
-
-int udev_db_get_all_entries(struct udev *udev, struct list_head *name_list)
-{
- char dbpath[PATH_MAX];
- DIR *dir;
-
- util_strlcpy(dbpath, udev_get_dev_path(udev), sizeof(dbpath));
- util_strlcat(dbpath, "/.udev/db", sizeof(dbpath));
- dir = opendir(dbpath);
- if (dir == NULL) {
- info(udev, "no udev_db available '%s': %s\n", dbpath, strerror(errno));
- return -1;
- }
-
- while (1) {
- struct dirent *ent;
- char device[UTIL_PATH_SIZE];
-
- ent = readdir(dir);
- if (ent == NULL || ent->d_name[0] == '\0')
- break;
- if (ent->d_name[0] == '.')
- continue;
-
- util_strlcpy(device, ent->d_name, sizeof(device));
- util_path_decode(device);
- name_list_add(udev, name_list, device, 1);
- dbg(udev, "added '%s'\n", device);
- }
-
- closedir(dir);
- return 0;
-}