Re: [PATCH] udev: udevd shall inform us abot trouble

From: Greg KH
Date: Fri Sep 10 2004 - 15:41:39 EST


On Wed, Sep 08, 2004 at 10:18:43AM +0300, Denis Vlasenko wrote:
> Hi Greg,
>
> I found out why udev didn't work for me.
> At first I compiled it with wrong install path ($DESTDIR).
> On subsequent recompiles with corrected DESTDIR binaries
> were still compiled with old DESTDIR hardcoded into them.
>
> I think this Make rule is generating a udev_version.h:
>
> # Rules on how to create the generated header files
> udev_version.h:
> @echo \#define UDEV_VERSION \"$(VERSION)\" > $@
> @echo \#define UDEV_ROOT \"$(udevdir)/\" >> $@
> @echo \#define UDEV_DB \"$(udevdir)/.udev.tdb\" >> $@
> @echo \#define UDEV_CONFIG_DIR \"$(configdir)\" >> $@
> @echo \#define UDEV_CONFIG_FILE \"$(configdir)/udev.conf\" >> $@
> @echo \#define UDEV_RULES_FILE \"$(configdir)/rules.d\" >> $@
> @echo \#define UDEV_PERMISSION_FILE \"$(configdir)/permissions.d\" >> $@
> @echo \#define UDEV_LOG_DEFAULT \"yes\" >> $@
> @echo \#define UDEV_BIN \"$(DESTDIR)$(sbindir)/udev\" >> $@
> @echo \#define UDEVD_BIN \"$(DESTDIR)$(sbindir)/udevd\" >> $@
>
> which is not re-created even if DESTDIR has changed.
>
> As a result, udevd was trying to exec udev with wrong path.

Ick, not nice.

> I built udev with:
>
> USE_LOG = true
> DEBUG = false
>
> but udevd does not log anything under such setting (all
> udevd messages are coded as debug messages).
>
> This patch improves situation by changing some dbg()'s
> into info()'s.

No, I don't like this change, as it increases the size of udevd pretty
unnecessarily (errors like what happened to you are very rare, and we
could blame them on pilot error...)

thanks,

greg k-h
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/