From: Kay Sievers Date: Thu, 7 Jul 2005 21:43:13 +0000 (+0200) Subject: fix symlink values separated by multiple spaces X-Git-Tag: 062~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b2bdb4b1bd9e273ea67e4538be3f7d3545331fa;p=systemd fix symlink values separated by multiple spaces Signed-off-by: Kay Sievers --- diff --git a/test/udev-test.pl b/test/udev-test.pl index 6fbc23e5..873780d7 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -799,6 +799,17 @@ EOF exp_target => "ttyUSB0", rules => < "multiple symlinks with a lot of s p a c e s", + subsys => "tty", + devpath => "/class/tty/ttyUSB0", + exp_name => "one", + not_exp_name => " ", + exp_target => "ttyUSB0", + rules => <symlink_list, pos, 0); + while (isspace(next[1])) + next++; pos = &next[1]; next = strchr(pos, ' '); } - info("add symlink '%s'", pos); - name_list_add(&udev->symlink_list, pos, 0); + if (pos[0] != '\0') { + info("add symlink '%s'", pos); + name_list_add(&udev->symlink_list, pos, 0); + } } /* set name, later rules with name set will be ignored */