minor fixes
This commit is contained in:
parent
d05676f232
commit
984295b4a0
1 changed files with 2 additions and 2 deletions
|
|
@ -430,11 +430,11 @@ struct udev_device *udev_device_new_from_syspath(struct udev *udev, const char *
|
|||
return NULL;
|
||||
}
|
||||
|
||||
if (!realpath(syspath, path)) {
|
||||
if (stat(syspath, &st) != 0 || !S_ISDIR(st.st_mode)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (stat(path, &st) != 0 || S_ISDIR(st.st_mode) == 0) {
|
||||
if (!realpath(syspath, path)) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue