linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Erik Søe Sørensen" <eriksoe@daimi.au.dk>
To: linux-hotplug@vger.kernel.org
Subject: udev  silently ignores bad config file names
Date: Sat, 22 May 2004 21:16:45 +0000	[thread overview]
Message-ID: <40AFC33D.4040203@daimi.au.dk> (raw)

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

Hi there.

In udev-025, bad config file names for rules and permissions are 
silently ignored.  Worse yet: even if the permission config file name is 
correct, the file won't be loaded if the rules file name is incorrect 
(e.g., doesn't exist).

A crude fix is attached. It just reports that there are problems with 
reading a certain config file; this could of course be improved a lot.
- The nature of the error should be written.
- I don't know if the error report should go to stderr, the log, or 
both. It would probably be a good thing if the error message is shown 
when udev is run; on the other hand, udev is usually run from a script 
which executes it many (~100) times in a row, and I guess that's too 
many repeated error messages for anyone.
One solutionish thing is to have the script first run udev with 
ACTION=check, causing udev to report problems with config files, while 
being silent the rest of the time (but that's not so appropriate for 
single udev runs). Another is to let the script collect the error 
messages and write out a summary when it's done.

- Finally, I'm not sure how much sense it makes that the permissions 
file is not attempted read if reading the rules file failed..?

Erik Søe Sørensen

[-- Attachment #2: namedev.c.diff --]
[-- Type: text/plain, Size: 486 bytes --]

--- namedev.c.org	2004-05-22 22:37:21.270829461 +0200
+++ namedev.c	2004-05-22 22:35:50.461506659 +0200
@@ -891,12 +891,16 @@
 	int retval;
 
 	retval = namedev_init_rules();
-	if (retval)
+	if (retval) {
+		info("Couldn't read rules"); /* TODO: Tell more */
 		return retval;
+	}
 
 	retval = namedev_init_permissions();
-	if (retval)
+	if (retval) {
+		info("Couldn't read permissions"); /* TODO: Tell more */
 		return retval;
+	}
 
 	dump_config_dev_list();
 	dump_perm_dev_list();

             reply	other threads:[~2004-05-22 21:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-22 21:16 Erik Søe Sørensen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-06-04 21:17 udev silently ignores bad config file names 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=40AFC33D.4040203@daimi.au.dk \
    --to=eriksoe@daimi.au.dk \
    --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 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).