diff options
author | Lennart Poettering <lennart@poettering.net> | 2020-01-07 18:02:53 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-01-07 18:02:53 +0100 |
commit | 3ce252d0e0ccc4b21ea34baa83febb856d96f30c (patch) | |
tree | 4b3057492e9db70fd551c1cddcd1e8d71bca518e | |
parent | man: fix documentation of IBM VIO device naming (diff) | |
download | systemd-3ce252d0e0ccc4b21ea34baa83febb856d96f30c.tar.xz systemd-3ce252d0e0ccc4b21ea34baa83febb856d96f30c.zip |
udev: use dot_or_dot_dot() where appropriate
-rw-r--r-- | src/udev/udev-builtin-net_id.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c index e94fff2520..169d6ce8f7 100644 --- a/src/udev/udev-builtin-net_id.c +++ b/src/udev/udev-builtin-net_id.c @@ -330,8 +330,9 @@ static int dev_pci_slot(sd_device *dev, struct netnames *names) { char str[PATH_MAX]; _cleanup_free_ char *address = NULL; - if (dent->d_name[0] == '.') + if (dot_or_dot_dot(dent->d_name)) continue; + r = safe_atou_full(dent->d_name, 10, &i); if (r < 0 || i <= 0) continue; |