mirror of
https://github.com/systemd/systemd.git
synced 2025-02-03 17:47:28 +03:00
[PATCH] check for empty symlink string
Attached is a patch for udev-add.c to ignore empty symlink string parts. Issue was brought up by ide-devfs.sh with only one symlink returned, while two are expected.
This commit is contained in:
parent
2441c20743
commit
0529e2ed2e
@ -193,7 +193,7 @@ static int create_node(struct udevice *dev)
|
||||
symlinks = dev->symlink;
|
||||
while (1) {
|
||||
linkname = strsep(&symlinks, " ");
|
||||
if (linkname == NULL)
|
||||
if (linkname == NULL || linkname[0] == '\0')
|
||||
break;
|
||||
|
||||
strncpy(filename, udev_root, sizeof(filename));
|
||||
|
Loading…
x
Reference in New Issue
Block a user