devfs
[Top] [All Lists]

patch for annoying symlink warnings

To: devfs@xxxxxxxxxxx
Subject: patch for annoying symlink warnings
From: Russell Coker <russell@xxxxxxxxxxxx>
Date: Wed, 24 Oct 2001 21:57:46 +0200
Reply-to: Russell Coker <russell@xxxxxxxxxxxx>
Sender: owner-devfs@xxxxxxxxxxx
error calling: "symlink" in "GLOBAL"
error calling: "symlink" in "GLOBAL"
error calling: "symlink" in "GLOBAL"

When you do "killall -1 devfsd" to reload the config you often see errors 
such as the above.  These are because of "CFUNCTION GLOBAL symlink" events 
trying to create the link a second time.

I have attached a patch that fixes this issue.  It has special case code for 
"GLOBAL symlink" which calls an internal function instead of the libc 
function (to preserve config file compatibility).  This function does the 
usual symlink operation but gives no error message when the link as desired 
is already there (if you ask for "symlink $devname modem" and there is 
already a symlink /dev/modem pointing at /dev/$devname then it's not an error 
IMHO).  When there is a real error it gives slightly more information.

Richard, please consider this for inclusion in the main tree.

-- 
http://www.coker.com.au/bonnie++/     Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/       Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/     My home page

Attachment: diff-annoying-errs
Description: Text Data

<Prev in Thread] Current Thread [Next in Thread>