From 83be97ba211c4f69e7fd9f16f57ca7210a116a7d Mon Sep 17 00:00:00 2001 From: "kay.sievers@vrfy.org" Date: Thu, 4 Dec 2003 19:21:31 -0800 Subject: [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 --- namedev.c | 2 +- test/udev-test.pl | 12 ++++++++++++ udev.rules | 1 - 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/namedev.c b/namedev.c index ea75bc5d8f..1faa253c1e 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 97f75edc94..b1757ee1bb 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 => <