[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:
kay.sievers@vrfy.org 2003-12-30 01:07:57 -08:00 committed by Greg KH
parent 2441c20743
commit 0529e2ed2e
1 changed files with 1 additions and 1 deletions

View File

@ -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));