All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] udev - fix debug info for multiple rule file config
Date: Sat, 28 Feb 2004 21:41:11 +0000	[thread overview]
Message-ID: <20040228214111.GC1193@vrfy.org> (raw)
In-Reply-To: <20040228205632.GB1193@vrfy.org>

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

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

[-- Attachment #2: 03-rules-debug.patch --]
[-- Type: text/plain, Size: 1832 bytes --]

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

  reply	other threads:[~2004-02-28 21:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-28 20:56 [PATCH] udev - fix debug info for multiple rule file config Kay Sievers
2004-02-28 21:41 ` Kay Sievers [this message]
2004-03-01 22:28 ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040228214111.GC1193@vrfy.org \
    --to=kay.sievers@vrfy.org \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.