linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: [udev] check for empty symlink string
Date: Thu, 25 Dec 2003 20:15:19 +0000	[thread overview]
Message-ID: <marc-linux-hotplug-107238337211654@msgid-missing> (raw)

[-- 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));

             reply	other threads:[~2003-12-25 20:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-25 20:15 Kay Sievers [this message]
2003-12-30  1:04 ` [udev] check for empty symlink string Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=marc-linux-hotplug-107238337211654@msgid-missing \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).