Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Dec 2010 16:50:06 GMT
From:      Jaakko Heinonen <jh@FreeBSD.org>
To:        freebsd-rc@FreeBSD.org
Subject:   Re: conf/91342: [devfs] Errors in devfs.rules files don't get logged
Message-ID:  <201012211650.oBLGo6UC075758@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR conf/91342; it has been noted by GNATS.

From: Jaakko Heinonen <jh@FreeBSD.org>
To: bug-followup@FreeBSD.org, guy@alum.mit.edu
Cc:  
Subject: Re: conf/91342: [devfs] Errors in devfs.rules files don't get logged
Date: Tue, 21 Dec 2010 18:45:15 +0200

 Guy Harris wrote:
 > If there's an error in /etc/defaults/devfs.rules or /etc/devfs.rules,
 > no error message about the error appears in, for example,
 > /var/log/messages.
 
 How about this patch?
 
 %%%
 Index: etc/rc.subr
 ===================================================================
 --- etc/rc.subr	(revision 216581)
 +++ etc/rc.subr	(working copy)
 @@ -1349,7 +1349,10 @@ devfs_init_rulesets()
  		return
  	fi
  	for file in $devfs_rulesets; do
 -		devfs_rulesets_from_file $file || return 1
 +		if ! devfs_rulesets_from_file $file; then
 +			warn "$_me: could not read rules from $file"
 +			return 1
 +		fi
  	done
  	devfs_rulesets_init=1
  	debug "$_me: devfs rulesets initialized"
 %%%
 
 -- 
 Jaakko



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012211650.oBLGo6UC075758>