linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Bug: NAME="" not working (patch included)
@ 2004-02-08 12:55 Emil None
  2004-02-08 15:18 ` Kay Sievers
  0 siblings, 1 reply; 2+ messages in thread
From: Emil None @ 2004-02-08 12:55 UTC (permalink / raw)
  To: linux-hotplug

Hello,

Do ignore a device by setting NAME="" does not work.
The problem is in namedev.c, see the patch below
(for udev-016). A "return" is also missing in
match_rule() (also in the patch).

Best Regards,
Lars Ekman

--- udev-016.org/namedev.c      2004-01-31
16:36:18.000000000 +0100
+++ udev-016/namedev.c  2004-02-08 13:33:54.000000000
+0100
@@ -671,8 +671,8 @@
 
                /* check if we are instructed to
ignore this device */
                if (dev->name[0] = '\0') {
-                       dbg("instructed to ignore this
device");
-                       return -1;
+                       info("instructed to ignore
'%s'", class_dev->name);
+                       return 1;
                }
 
                /* Yeah, we matched! */
@@ -686,7 +686,7 @@
                dbg("sysfs_device->bus_id='%s'",
sysfs_device->bus_id);
                dbg("sysfs_device->bus='%s'",
sysfs_device->bus);
        }
-
+       return -1;
 }
 
 int namedev_name_device(struct sysfs_class_device
*class_dev, struct udevice *udev)
@@ -723,8 +723,9 @@
        list_for_each_entry(dev, &config_device_list,
node) {
                dbg("process rule");
 
-               if (match_rule(dev, class_dev, udev,
sysfs_device) = 0) {
+               if (match_rule(dev, class_dev, udev,
sysfs_device) >= 0) {
                        /* Yup, this rule belongs to
us! */
+                       if (dev->name[0] = '\0')
return 1;
                        info("configured rule in '%s'
at line %i applied, '%s' becomes '%s'",
                            udev_rules_filename,
dev->config_line, udev->kernel_name, dev->name);
                        strfieldcpy(udev->name,
dev->name);


__________________________________
Do you Yahoo!?
Yahoo! Finance: Get your refund fast by filing online.
http://taxes.yahoo.com/filing.html


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug: NAME="" not working (patch included)
  2004-02-08 12:55 Bug: NAME="" not working (patch included) Emil None
@ 2004-02-08 15:18 ` Kay Sievers
  0 siblings, 0 replies; 2+ messages in thread
From: Kay Sievers @ 2004-02-08 15:18 UTC (permalink / raw)
  To: linux-hotplug

On Sun, Feb 08, 2004 at 04:55:25AM -0800, Emil None wrote:
> Hello,
> 
> Do ignore a device by setting NAME="" does not work.

Good catch, it creates the kernel name.

> The problem is in namedev.c, see the patch below
> (for udev-016). A "return" is also missing in
> match_rule() (also in the patch).

We never break the while(1) loop, so we never reach there, right?


> --- udev-016.org/namedev.c      2004-01-31
> 16:36:18.000000000 +0100
> +++ udev-016/namedev.c  2004-02-08 13:33:54.000000000
> +0100
> @@ -671,8 +671,8 @@
>  
>                 /* check if we are instructed to
> ignore this device */

Your mail client made the patch unusable!


I will fix it a bit different in the next minutes.

thanks,
Kay


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-08 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-08 12:55 Bug: NAME="" not working (patch included) Emil None
2004-02-08 15:18 ` Kay Sievers

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).