From 0529e2ed2eb1ccfd28d2cd33ce759f9c7b9bc0ff Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Tue, 30 Dec 2003 01:07:57 -0800 Subject: [PATCH] [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. --- udev-add.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/udev-add.c b/udev-add.c index ba5c8641..2f72613e 100644 --- a/udev-add.c +++ b/udev-add.c @@ -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)); -- 2.39.5