From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kay Sievers Date: Sat, 28 Feb 2004 21:41:11 +0000 Subject: Re: [PATCH] udev - fix debug info for multiple rule file config Message-Id: <20040228214111.GC1193@vrfy.org> MIME-Version: 1 Content-Type: multipart/mixed; boundary="5/uDoXvLw7AC5HRs" List-Id: References: <20040228205632.GB1193@vrfy.org> In-Reply-To: <20040228205632.GB1193@vrfy.org> To: linux-hotplug@vger.kernel.org --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Feb 28, 2004 at 09:56:32PM +0100, Kay Sievers wrote: > Andrey pointed out that we don't print the right filename in the debug > output. Here is a fix for that. It applies on top of Andrey's symlink > patch, cause we are touching the same part of the code. The copy/paste devil catched me :) Here is a fixed one. Kay --5/uDoXvLw7AC5HRs Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="03-rules-debug.patch" diff -Nru a/namedev.c b/namedev.c --- a/namedev.c Sat Feb 28 21:51:04 2004 +++ b/namedev.c Sat Feb 28 21:51:04 2004 @@ -822,7 +822,7 @@ if (match_rule(dev, class_dev, udev, sysfs_device) == 0) { if (dev->name[0] == '\0' && dev->symlink[0] == '\0') { info("configured rule in '%s' at line %i applied, '%s' is ignored", - udev_rules_filename, dev->config_line, udev->kernel_name); + dev->config_file, dev->config_line, udev->kernel_name); return -1; } @@ -830,7 +830,7 @@ char temp[NAME_MAX]; info("configured rule in '%s' at line %i applied, added symlink '%s'", - udev_rules_filename, dev->config_line, dev->symlink); + dev->config_file, dev->config_line, dev->symlink); /* do not clobber dev */ strfieldcpy(temp, dev->symlink); apply_format(udev, temp, sizeof(temp), @@ -841,7 +841,7 @@ if (dev->name[0] != '\0') { info("configured rule in '%s' at line %i applied, '%s' becomes '%s'", - udev_rules_filename, dev->config_line, udev->kernel_name, dev->name); + dev->config_file, dev->config_line, udev->kernel_name, dev->name); strfieldcpy(udev->name, dev->name); goto found; } diff -Nru a/namedev.h b/namedev.h --- a/namedev.h Sat Feb 28 21:51:04 2004 +++ b/namedev.h Sat Feb 28 21:51:04 2004 @@ -72,6 +72,7 @@ char symlink[NAME_SIZE]; struct sysfs_pair sysfs_pair[MAX_SYSFS_PAIRS]; int partitions; + char config_file[NAME_SIZE]; int config_line; }; diff -Nru a/namedev_parse.c b/namedev_parse.c --- a/namedev_parse.c Sat Feb 28 21:51:04 2004 +++ b/namedev_parse.c Sat Feb 28 21:51:04 2004 @@ -260,6 +260,7 @@ } dev.config_line = lineno; + strfieldcpy(dev.config_file, filename); retval = add_config_dev(&dev); if (retval) { dbg("add_config_dev returned with error %d", retval); --5/uDoXvLw7AC5HRs-- ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ 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