X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fprocd.git;a=blobdiff_plain;f=udevtrigger.c;h=af620c24db0ac00f63113d6443a2a459a129ba88;hp=c5628bdce03147b2420010f6320028ce258433bc;hb=e6021a8a34e39328ffc867141da03c19da9b2aec;hpb=070bb98651b7e38d953eeffc5b0435e909e603b9 diff --git a/udevtrigger.c b/udevtrigger.c index c5628bd..af620c2 100644 --- a/udevtrigger.c +++ b/udevtrigger.c @@ -161,8 +161,9 @@ static int device_list_insert(const char *path) dbg("add '%s'" , path); - /* we only have a device, if we have an uevent file */ - if (!device_has_attribute(path, "/uevent", S_IWUSR)) + /* we only have a device, if we have a dev and an uevent file */ + if (!device_has_attribute(path, "/dev", S_IRUSR) || + !device_has_attribute(path, "/uevent", S_IWUSR)) return -1; strlcpy(devpath, &path[4], sizeof(devpath));