linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [udev] check for empty symlink string
@ 2003-12-25 20:15 Kay Sievers
  2003-12-30  1:04 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Kay Sievers @ 2003-12-25 20:15 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 181 bytes --]


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


[-- Attachment #2: 04-check-for-empty-symlink-string.diff --]
[-- Type: text/plain, Size: 363 bytes --]

diff -Nru a/udev-add.c b/udev-add.c
--- a/udev-add.c	Thu Dec 25 21:08:52 2003
+++ b/udev-add.c	Thu Dec 25 21:08:52 2003
@@ -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));

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-12-30  1:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-25 20:15 [udev] check for empty symlink string Kay Sievers
2003-12-30  1:04 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).