From: kay.sievers@vrfy.org Date: Fri, 5 Dec 2003 03:21:31 +0000 (-0800) Subject: [PATCH] pattern match for label method X-Git-Tag: 009~42 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=83be97ba211c4f69e7fd9f16f57ca7210a116a7d;ds=sidebyside [PATCH] pattern match for label method switch LABEL search to pattern match add a test for pattern match in LABEL remove useless rule from udev.rules --- diff --git a/namedev.c b/namedev.c index ea75bc5d8..1faa253c1 100644 --- a/namedev.c +++ b/namedev.c @@ -412,7 +412,7 @@ label_found: *c = 0x00; dbg("compare attribute '%s' value '%s' with '%s'", dev->sysfs_file, tmpattr->value, dev->sysfs_value); - if (strcmp(dev->sysfs_value, tmpattr->value) != 0) + if (strcmp_pattern(dev->sysfs_value, tmpattr->value) != 0) continue; strfieldcpy(udev->name, dev->name); diff --git a/test/udev-test.pl b/test/udev-test.pl index 97f75edc9..b1757ee1b 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -49,6 +49,18 @@ EOF expected => "boot_disk1" , conf => < "label test of pattern match", + subsys => "block", + devpath => "block/sda/sda1", + expected => "boot_disk1" , + conf => <