Russell Coker writes:
> 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.
Sorry, but I hate it. The worst offence is to put special-case hacks
into the parser. That's just too ugly for words. I'm also uneasy about
wrapping C-library functions.
My preferred solution to this (something I've been thinking about
for a while because it's generally useful) is to allow options to be
specified for actions. So you would have something like this:
REGISTER ^cdrom/cdrom0$ CFUNCTION,nowarn GLOBAL symlink cdroms/cdrom0 cdrom
Comments? Yes, I know it requires a config file change, but tough.
Even if I were to allow a symlink wrapper, I'd still force a config
file change. Magic re-interpretation of libc is not an option.
Regards,
Richard....
Permanent: rgooch@xxxxxxxxxxxxx
Current: rgooch@xxxxxxxxxxxxxxx
|