Skip to contentSkip to conversation

check for empty symlink string

udev Applied Kay Sievers 2 participants 2 messages Dec 25, 2003 – Dec 30, 2003

lore
Share & tools
lore
#0 lore raw

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.

thanks,
Kay

udev-add.c +1 -1
diff -Nru a/udev-add.c b/udev-add.c
@@ -193,7 +193,7 @@
 		symlinks = dev->symlink;
 		while (1) {
 			linkname = strsep(&symlinks, " ");
-			if (linkname == NULL)
+			if (linkname == NULL || linkname[0] == '\0')
 				break;
 
 			strncpy(filename, udev_root, sizeof(filename));
Applied
#1 lore raw
Quoted 3 lines · Kay Sievers

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.

Applied, thanks.

greg k-h

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel