diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-02-22 23:25:36 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-02-22 23:25:36 +0100 |
commit | 4d080d7798c938c3accc8555182e5ef515967bae (patch) | |
tree | fa0cd771fa1a4abe08b40d1105055d22899e1c74 /src/udev | |
parent | Merge pull request #2704 from poettering/lldp-internal-fix (diff) | |
parent | udev-rules: fix querying of attributes (diff) | |
download | systemd-4d080d7798c938c3accc8555182e5ef515967bae.tar.xz systemd-4d080d7798c938c3accc8555182e5ef515967bae.zip |
Merge pull request #2701 from keszybz/udev-rules
udev-rules cleanup fix
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udev-rules.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index 8470456d4c..475856db6f 100644 --- a/src/udev/udev-rules.c +++ b/src/udev/udev-rules.c @@ -705,10 +705,10 @@ static void attr_subst_subdir(char *attr, size_t len) { for (dent = readdir(dir); dent != NULL; dent = readdir(dir)) if (dent->d_name[0] != '.') { - char n[strlen(dent->d_name) + 1 + strlen(tail) + 1]; + char n[strlen(dent->d_name) + strlen(tail) + 1]; - strscpyl(n, sizeof n, dent->d_name, "/", tail, NULL); - if (faccessat(dirfd(dir), n, F_OK, 0)) { + strscpyl(n, sizeof n, dent->d_name, tail, NULL); + if (faccessat(dirfd(dir), n, F_OK, 0) == 0) { strscpyl(attr, len, path, n, NULL); break; } |