From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Thu, 25 Dec 2003 20:15:19 +0000 Subject: [udev] check for empty symlink string MIME-Version: 1 Content-Type: multipart/mixed; boundary="tjCHc7DPkfUGtrlw" Message-Id: List-Id: To: linux-hotplug@vger.kernel.org --tjCHc7DPkfUGtrlw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --tjCHc7DPkfUGtrlw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="04-check-for-empty-symlink-string.diff" 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)); --tjCHc7DPkfUGtrlw-- ------------------------------------------------------- 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=1278&alloc_id=3371&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