From: kay.sievers@vrfy.org Date: Tue, 30 Dec 2003 09:07:57 +0000 (-0800) Subject: [PATCH] check for empty symlink string X-Git-Tag: 012~22 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0529e2ed2eb1ccfd28d2cd33ce759f9c7b9bc0ff;p=systemd [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. --- 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));