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

* Re: [udev] check for empty symlink string
  2003-12-25 20:15 [udev] check for empty symlink string Kay Sievers
@ 2003-12-30  1:04 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2003-12-30  1:04 UTC (permalink / raw)
  To: linux-hotplug

On Thu, Dec 25, 2003 at 09:15:19PM +0100, Kay Sievers wrote:
> 
> 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_id\x1278&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ 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).