Lines Matching refs:dir
320 static bool match_sysfs_device(int dev_id, const char *workdir, struct dirent *dir) in match_sysfs_device() argument
329 if (fnmatch(target, dir->d_name, 0)) in match_sysfs_device()
333 sprintf(uevent, "%s/%s/uevent", workdir, dir->d_name); in match_sysfs_device()
355 struct dirent *dir; in get_hid_id() local
364 while ((dir = readdir(d)) != NULL) { in get_hid_id()
365 if (!match_sysfs_device(dev_id, workdir, dir)) in get_hid_id()
368 str_id = dir->d_name + sizeof("0003:0001:0A37."); in get_hid_id()
387 struct dirent *dir, *subdir; in get_hidraw() local
398 while ((dir = readdir(d)) != NULL) { in get_hidraw()
399 if (!match_sysfs_device(dev_id, workdir, dir)) in get_hidraw()
402 sprintf(sysfs, "%s/%s/hidraw", workdir, dir->d_name); in get_hidraw()