linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [ANNOUNCE] udev 016 release
@ 2004-02-03 20:13 Greg KH
  2004-02-03 21:30 ` Marco d'Itri
                   ` (9 more replies)
  0 siblings, 10 replies; 13+ messages in thread
From: Greg KH @ 2004-02-03 20:13 UTC (permalink / raw)
  To: linux-hotplug-devel, linux-kernel

I've released the 016 version of udev.  It can be found at:
 	kernel.org/pub/linux/utils/kernel/hotplug/udev-016.tar.gz

rpms built against Red Hat FC1 are available at:
	kernel.org/pub/linux/utils/kernel/hotplug/udev-016-1.i386.rpm
with the source rpm at:
	kernel.org/pub/linux/utils/kernel/hotplug/udev-016-1.src.rpm

udev allows users to have a dynamic /dev and provides the ability to
have persistent device names.  It uses sysfs and /sbin/hotplug and runs
entirely in userspace.  It requires a 2.6 kernel with CONFIG_HOTPLUG
enabled to run.  Please see the udev FAQ for any questions about it:
	kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ

For any udev vs devfs questions anyone might have, please see:
	kernel.org/pub/linux/utils/kernel/hotplug/udev_vs_devfs


Major changes from the 015 version:
	- udev is now in 3 pieces:
	    udevsend - is called by /sbin/hotplug and bundles up the
		       hotplug event and sends it off to the udevd
		       daemon.
	    udevd - receives the hotplug messages from udevsend, sorts
		    them in the proper order, and runs udev for the
		    different devices.
	    udev - still the same.  Does the actual device node creation
		   and removal.

	  This has been one of the major pieces missing for udev, and I
	  really want to thank Kay Sievers for all of his hard work on
	  this.

	  Right now, udevsend and udev are built against klibc (udevsend
	  is only 2.5Kb big), and udevd is linked dynamically against
	  glibc, due to it using pthreads.  This is ok, as udev can
	  still be placed into initramfs and run at early boot, it's
	  only after init starts up that udevsend and udevd will kick
	  in.


Thanks also to everyone who has send me patches for this release, a full
list of everyone, and their changes is below.

udev development is done in a BitKeeper repository located at:
	bk://linuxusb.bkbits.net/udev

Daily snapshots of udev from the BitKeeper tree can be found at:
	http://www.codemonkey.org.uk/projects/bitkeeper/udev/
If anyone ever wants a tarball of the current bk tree, just email me.

thanks,

greg k-h


Summary of changes from v015 to v016
======================

<elkropac:students.zcu.cz>:
  o get_dev_number() in extras/ide-devfs.sh

<rrm3:rrm3.org>:
  o FAQ udev.rules.devfs

Greg Kroah-Hartman:
  o add udevd and udevsend to the spec file
  o make /etc/hotplug.d/default/udev.hotplug symlink point to udevsend now
  o add KERNEL_DIR option so that the distros will be happy
  o make udevsend binary even smaller
  o udevsend now almost compiles with klibc, struct sockaddr_un is only problem now
  o fix up logging code so that it can be built without it being enabled
  o rework the logging code so that each program logs with the proper name in the syslog
  o remove logging.c as it's no longer needed
  o kill the last examples that contained the %D option
  o remove a __KLIBC__ tests in libsysfs, as klibc now supports getpagesize()
  o udevd - remove stupid locking error I wrote
  o update to klibc version 0.101, fixing the stdin bug
  o fix Makefile typo for USE_LSB install
  o 015_bk mark
  o allow dbus code to actually build again
  o v015 release TAG: v015

Kay Sievers:
  o let udevsend build with klibc
  o udevd - config cleanup
  o udevd - cleanup and better timeout handling
  o fix possible buffer overflow
  o udevd - next round of fixes
  o udevinfo - missing options for man page
  o udev - trivial style cleanup



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
  2004-02-03 20:13 [ANNOUNCE] udev 016 release Greg KH
@ 2004-02-03 21:30 ` Marco d'Itri
  2004-02-03 22:23 ` Eric Sandall
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Marco d'Itri @ 2004-02-03 21:30 UTC (permalink / raw)
  To: linux-hotplug

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

On Feb 03, Greg KH <greg@kroah.com> wrote:

I'm attaching a trivial patch to remove a warning.
BTW, udev still takes a long time to start when D-BUS support is
enabled.

-- 
ciao, |
Marco | [4432 piayT8BICqZQ2]

[-- Attachment #2: debian.diff --]
[-- Type: text/plain, Size: 323 bytes --]

diff -ruN udev-016.orig/logging.h udev-016/logging.h
--- udev-016.orig/logging.h	2004-02-02 10:34:49.000000000 +0100
+++ udev-016/logging.h	2004-02-03 22:27:43.000000000 +0100
@@ -32,6 +32,7 @@
 #ifdef LOG
 #include <stdarg.h>
 #include <syslog.h>
+#include <unistd.h>
 
 #undef info
 #define info(format, arg...)								\

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
  2004-02-03 20:13 [ANNOUNCE] udev 016 release Greg KH
  2004-02-03 21:30 ` Marco d'Itri
@ 2004-02-03 22:23 ` Eric Sandall
  2004-02-03 22:46 ` Greg KH
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Eric Sandall @ 2004-02-03 22:23 UTC (permalink / raw)
  To: linux-hotplug

Now it fails with `make -jN` where N > 1, whereas the last two worked fine, but
then the one before that was broken as well, and off and on (though I failed to
report it, then). I'm not canny enough with Makefiles yet to fix this, but I
will look into it and see if I can gander what's going wrong.

Here's the error from using multiple make jobs:

gcc -march=athlon-xp -mmmx -mfpmath=sse -msse -m3dnow -pipe -pipe -DLOG -Os
-fomit-frame-pointer -D_GNU_SOURCE -Wall  -Wshadow -Wstrict-prototypes
-Wmissing-prototypes -Wmissing-declarations
-I/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/include -I/usr/src/udev-016/libsysfs
  -c -o udevinfo.o udevinfo.c
udevsend.c: In function `start_daemon':
udevsend.c:94: error: `UDEVD_BIN' undeclared (first use in this function)
udevsend.c:94: error: (Each undeclared identifier is reported only once
udevsend.c:94: error: for each function it appears in.)
udevsend.c: In function `main':
udevsend.c:165: error: `UDEVD_SOCK' undeclared (first use in this function)
make[1]: *** [udevsend.o] Error 1
make[1]: *** Waiting for unfinished jobs....
udevd.c: In function `sig_handler':
udevd.c:315: error: `UDEVD_LOCK' undeclared (first use in this function)
udevd.c:315: error: (Each undeclared identifier is reported only once
udevd.c:315: error: for each function it appears in.)
udevd.c: In function `one_and_only':
udevd.c:329: error: `UDEVD_LOCK' undeclared (first use in this function)
udevd.c: At top level:
udevd.c:70: warning: `msg_dump' defined but not used
make[1]: *** [udevd.o] Error 1
make[1]: Leaving directory `/usr/src/udev-016'

-sandalle

Quoting Greg KH <greg@kroah.com>:
> I've released the 016 version of udev.  It can be found at:
>  	kernel.org/pub/linux/utils/kernel/hotplug/udev-016.tar.gz
> 
> rpms built against Red Hat FC1 are available at:
> 	kernel.org/pub/linux/utils/kernel/hotplug/udev-016-1.i386.rpm
> with the source rpm at:
> 	kernel.org/pub/linux/utils/kernel/hotplug/udev-016-1.src.rpm
> 
> udev allows users to have a dynamic /dev and provides the ability to
> have persistent device names.  It uses sysfs and /sbin/hotplug and runs
> entirely in userspace.  It requires a 2.6 kernel with CONFIG_HOTPLUG
> enabled to run.  Please see the udev FAQ for any questions about it:
> 	kernel.org/pub/linux/utils/kernel/hotplug/udev-FAQ
> 
> For any udev vs devfs questions anyone might have, please see:
> 	kernel.org/pub/linux/utils/kernel/hotplug/udev_vs_devfs
> 
> 
> Major changes from the 015 version:
> 	- udev is now in 3 pieces:
> 	    udevsend - is called by /sbin/hotplug and bundles up the
> 		       hotplug event and sends it off to the udevd
> 		       daemon.
> 	    udevd - receives the hotplug messages from udevsend, sorts
> 		    them in the proper order, and runs udev for the
> 		    different devices.
> 	    udev - still the same.  Does the actual device node creation
> 		   and removal.
> 
> 	  This has been one of the major pieces missing for udev, and I
> 	  really want to thank Kay Sievers for all of his hard work on
> 	  this.
> 
> 	  Right now, udevsend and udev are built against klibc (udevsend
> 	  is only 2.5Kb big), and udevd is linked dynamically against
> 	  glibc, due to it using pthreads.  This is ok, as udev can
> 	  still be placed into initramfs and run at early boot, it's
> 	  only after init starts up that udevsend and udevd will kick
> 	  in.
> 
> 
> Thanks also to everyone who has send me patches for this release, a full
> list of everyone, and their changes is below.
> 
> udev development is done in a BitKeeper repository located at:
> 	bk://linuxusb.bkbits.net/udev
> 
> Daily snapshots of udev from the BitKeeper tree can be found at:
> 	http://www.codemonkey.org.uk/projects/bitkeeper/udev/
> If anyone ever wants a tarball of the current bk tree, just email me.
> 
> thanks,
> 
> greg k-h
> 
> 
> Summary of changes from v015 to v016
> ======================
> 
> <elkropac:students.zcu.cz>:
>   o get_dev_number() in extras/ide-devfs.sh
> 
> <rrm3:rrm3.org>:
>   o FAQ udev.rules.devfs
> 
> Greg Kroah-Hartman:
>   o add udevd and udevsend to the spec file
>   o make /etc/hotplug.d/default/udev.hotplug symlink point to udevsend now
>   o add KERNEL_DIR option so that the distros will be happy
>   o make udevsend binary even smaller
>   o udevsend now almost compiles with klibc, struct sockaddr_un is only
> problem now
>   o fix up logging code so that it can be built without it being enabled
>   o rework the logging code so that each program logs with the proper name in
> the syslog
>   o remove logging.c as it's no longer needed
>   o kill the last examples that contained the %D option
>   o remove a __KLIBC__ tests in libsysfs, as klibc now supports
> getpagesize()
>   o udevd - remove stupid locking error I wrote
>   o update to klibc version 0.101, fixing the stdin bug
>   o fix Makefile typo for USE_LSB install
>   o 015_bk mark
>   o allow dbus code to actually build again
>   o v015 release TAG: v015
> 
> Kay Sievers:
>   o let udevsend build with klibc
>   o udevd - config cleanup
>   o udevd - cleanup and better timeout handling
>   o fix possible buffer overflow
>   o udevd - next round of fixes
>   o udevinfo - missing options for man page
>   o udev - trivial style cleanup
> 
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
> Linux-hotplug-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
> 


-- 
PGP Key Fingerprint:  FCFF 26A1 BE21 08F4 BB91  FAED 1D7B 7D74 A8EF DD61
http://search.keyserver.net:11371/pks/lookup?op=get&search=0xA8EFDD61

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/E/IT$ d-- s++:+>: a-- C++(+++) BL++++VIS>$ P+(++) L+++ E-(---) W++ N+@ o?
K? w++++>-- O M-@ V-- PS+(+++) PE(-) Y++(+) PGP++(+) t+() 5++ X(+) R+(++)
tv(--)b++(+++) DI+@ D++(+++) G>+++ e>+++ h---(++) r++ y+
------END GEEK CODE BLOCK------

Eric Sandall                     |  Source Mage GNU/Linux Developer
eric@sandall.us                  |  http://www.sourcemage.org/
http://eric.sandall.us/          |  SysAdmin @ Inst. Shock Physics @ WSU
http://counter.li.org/  #196285  |  http://www.shock.wsu.edu/

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
  2004-02-03 20:13 [ANNOUNCE] udev 016 release Greg KH
  2004-02-03 21:30 ` Marco d'Itri
  2004-02-03 22:23 ` Eric Sandall
@ 2004-02-03 22:46 ` Greg KH
       [not found] ` <1075843712.7473.60.camel@nosferatu.lan>
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2004-02-03 22:46 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Feb 03, 2004 at 02:23:56PM -0800, Eric Sandall wrote:
> Now it fails with `make -jN` where N > 1, whereas the last two worked fine, but
> then the one before that was broken as well, and off and on (though I failed to
> report it, then). I'm not canny enough with Makefiles yet to fix this, but I
> will look into it and see if I can gander what's going wrong.
> 
> Here's the error from using multiple make jobs:

Ah, this patch should fix it.  Let me know if it doesn't.

Sorry about that.

greg k-h

# fix up Makefile dependancies for udev_version.h

diff -Nru a/Makefile b/Makefile
--- a/Makefile	Tue Feb  3 14:46:19 2004
+++ b/Makefile	Tue Feb  3 14:46:19 2004
@@ -259,15 +259,15 @@
 	$(LD) $(LDFLAGS) -o $@ $(CRT0) udev.o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
 	$(STRIPCMD) $@
 
-$(HELPER): udevinfo.o $(OBJS) $(HEADERS)
+$(HELPER): $(HEADERS) udevinfo.o $(OBJS)
 	$(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o udev_config.o udevdb.o $(SYSFS) $(TDB) $(LIB_OBJS) $(ARCH_LIB_OBJS)
 	$(STRIPCMD) $@
 
-$(DAEMON): udevd.h udevd.o
+$(DAEMON): udevd.h $(GEN_HEADERS) udevd.o
 	$(LD) $(LDFLAGS) -lpthread -o $@ $(CRT0) udevd.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
 	$(STRIPCMD) $@
 
-$(SENDER): udevd.h udevsend.o
+$(SENDER): udevd.h $(GEN_HEADERS) udevsend.o
 	$(LD) $(LDFLAGS) -o $@ $(CRT0) udevsend.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
 	$(STRIPCMD) $@
 


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
       [not found]   ` <1075849413.11322.6.camel@nosferatu.lan>
@ 2004-02-03 23:13     ` Greg KH
  2004-02-04  0:01       ` Kay Sievers
  0 siblings, 1 reply; 13+ messages in thread
From: Greg KH @ 2004-02-03 23:13 UTC (permalink / raw)
  To: Martin Schlemmer; +Cc: linux-hotplug-devel, Linux Kernel Mailing Lists

On Wed, Feb 04, 2004 at 01:03:33AM +0200, Martin Schlemmer wrote:
> On Tue, 2004-02-03 at 23:28, Martin Schlemmer wrote:
> > On Tue, 2004-02-03 at 22:13, Greg KH wrote:
> > 
> > Except if I miss something major, udevsend and udevd still do not
> > work:
> > 
> 
> Skip that, it does work if SEQNUM is set :P
> 
> Anyhow, is it _really_ needed for SEQNUM to be set?  What about
> the attached patch?

Yes it is necessary, as that is what the kernel spits out.  It's also
the whole reason we need udevd :)

If you don't want to give a SEQNUM, just call udev directly.

> Then, order I have not really checked yet, but there are two things
> that bother me:
> 
> 1) latency is even higher than before (btw Greg, is there going to be
> more sysfs/whatever fixes to get udev even faster, or is this the
> limit?)

Care to measure the latency somehow?  The first event is a bit slow, but
everything after that is as fast as I ever remember it being.

> 2) events gets missing.  If you for example use udevsend in the
> initscript that populate /dev (/udev), the amount of nodes/links
> created is off with about 10-50 (once about 250) entries.

Hm, that's not good.  I'll go test that and see what's happening.

thanks,

greg k-h


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
       [not found] ` <1075841390.7473.57.camel@nosferatu.lan>
@ 2004-02-03 23:14   ` Greg KH
  0 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2004-02-03 23:14 UTC (permalink / raw)
  To: Martin Schlemmer; +Cc: linux-hotplug-devel, Linux Kernel Mailing Lists

On Tue, Feb 03, 2004 at 10:49:51PM +0200, Martin Schlemmer wrote:
> On Tue, 2004-02-03 at 22:13, Greg KH wrote:
> 
> > 
> > 	  Right now, udevsend and udev are built against klibc (udevsend
> > 	  is only 2.5Kb big), and udevd is linked dynamically against
> > 	  glibc, due to it using pthreads.  This is ok, as udev can
> > 	  still be placed into initramfs and run at early boot, it's
> > 	  only after init starts up that udevsend and udevd will kick
> > 	  in.
> > 
> 
> I am guessing this breaks group names (and not gid's) in
> udev.permissions?  Or was support added to klibc?

Sorry, that should have read something to the effect that the .rpm is
built using klibc, and that udevd can't be build against it yet due to
pthreads being used.

It's entirely possible to build everything against glibc, and then you
get back the group name stuff for the udev.permission file.

thanks,

greg k-h


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
  2004-02-03 20:13 [ANNOUNCE] udev 016 release Greg KH
                   ` (4 preceding siblings ...)
       [not found] ` <1075841390.7473.57.camel@nosferatu.lan>
@ 2004-02-03 23:33 ` Eric Sandall
  2004-02-03 23:53 ` Greg KH
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Eric Sandall @ 2004-02-03 23:33 UTC (permalink / raw)
  To: linux-hotplug

Quoting Greg KH <greg@kroah.com>:
> Ah, this patch should fix it.  Let me know if it doesn't.
> 
> Sorry about that.
> 
> greg k-h
> 
> # fix up Makefile dependancies for udev_version.h
> 
> diff -Nru a/Makefile b/Makefile
> --- a/Makefile	Tue Feb  3 14:46:19 2004
> +++ b/Makefile	Tue Feb  3 14:46:19 2004
> @@ -259,15 +259,15 @@
>  	$(LD) $(LDFLAGS) -o $@ $(CRT0) udev.o $(OBJS) $(LIB_OBJS) $(ARCH_LIB_OBJS)
>  	$(STRIPCMD) $@
>  
> -$(HELPER): udevinfo.o $(OBJS) $(HEADERS)
> +$(HELPER): $(HEADERS) udevinfo.o $(OBJS)
>  	$(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o udev_config.o udevdb.o $(SYSFS)
> $(TDB) $(LIB_OBJS) $(ARCH_LIB_OBJS)
>  	$(STRIPCMD) $@
>  
> -$(DAEMON): udevd.h udevd.o
> +$(DAEMON): udevd.h $(GEN_HEADERS) udevd.o
>  	$(LD) $(LDFLAGS) -lpthread -o $@ $(CRT0) udevd.o $(LIB_OBJS)
> $(ARCH_LIB_OBJS)
>  	$(STRIPCMD) $@
>  
> -$(SENDER): udevd.h udevsend.o
> +$(SENDER): udevd.h $(GEN_HEADERS) udevsend.o
>  	$(LD) $(LDFLAGS) -o $@ $(CRT0) udevsend.o $(LIB_OBJS) $(ARCH_LIB_OBJS)
>  	$(STRIPCMD) $@

Fails with `patch -p1 < Makefile.patch` in udev-016 source directory:
# patch -p1 < /tmp/makefile.patch
sh: line 1: get: command not found
warning: Patching file Makefile, which does not match default SCCS version
patching file Makefile
Hunk #1 FAILED at 259.
1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej

# cat Makefile.rej
***************
*** 259,273 ****
          $(LD) $(LDFLAGS) -o $@ $(CRT0) udev.o $(OBJS) $(LIB_OBJS)
$(ARCH_LIB_OBJS)
          $(STRIPCMD) $@

- $(HELPER): udevinfo.o $(OBJS) $(HEADERS)
          $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o udev_config.o udevdb.o
$(SYSFS) $(TDB) $(LIB_OBJS) $(ARCH_LIB_OBJS)
          $(STRIPCMD) $@

- $(DAEMON): udevd.h udevd.o
          $(LD) $(LDFLAGS) -lpthread -o $@ $(CRT0) udevd.o $(LIB_OBJS)
$(ARCH_LIB_OBJS)
          $(STRIPCMD) $@

- $(SENDER): udevd.h udevsend.o
          $(LD) $(LDFLAGS) -o $@ $(CRT0) udevsend.o $(LIB_OBJS)
$(ARCH_LIB_OBJS)
          $(STRIPCMD) $@

--- 259,273 ----
          $(LD) $(LDFLAGS) -o $@ $(CRT0) udev.o $(OBJS) $(LIB_OBJS)
$(ARCH_LIB_OBJS)
          $(STRIPCMD) $@

+ $(HELPER): $(HEADERS) udevinfo.o $(OBJS)
          $(LD) $(LDFLAGS) -o $@ $(CRT0) udevinfo.o udev_config.o udevdb.o
$(SYSFS) $(TDB) $(LIB_OBJS) $(ARCH_LIB_OBJS)
          $(STRIPCMD) $@

+ $(DAEMON): udevd.h $(GEN_HEADERS) udevd.o
          $(LD) $(LDFLAGS) -lpthread -o $@ $(CRT0) udevd.o $(LIB_OBJS)
$(ARCH_LIB_OBJS)
          $(STRIPCMD) $@

+ $(SENDER): udevd.h $(GEN_HEADERS) udevsend.o
          $(LD) $(LDFLAGS) -o $@ $(CRT0) udevsend.o $(LIB_OBJS)
$(ARCH_LIB_OBJS)
          $(STRIPCMD) $@


-- 
PGP Key Fingerprint:  FCFF 26A1 BE21 08F4 BB91  FAED 1D7B 7D74 A8EF DD61
http://search.keyserver.net:11371/pks/lookup?op=get&search=0xA8EFDD61

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/E/IT$ d-- s++:+>: a-- C++(+++) BL++++VIS>$ P+(++) L+++ E-(---) W++ N+@ o?
K? w++++>-- O M-@ V-- PS+(+++) PE(-) Y++(+) PGP++(+) t+() 5++ X(+) R+(++)
tv(--)b++(+++) DI+@ D++(+++) G>+++ e>+++ h---(++) r++ y+
------END GEEK CODE BLOCK------

Eric Sandall                     |  Source Mage GNU/Linux Developer
eric@sandall.us                  |  http://www.sourcemage.org/
http://eric.sandall.us/          |  SysAdmin @ Inst. Shock Physics @ WSU
http://counter.li.org/  #196285  |  http://www.shock.wsu.edu/

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
  2004-02-03 20:13 [ANNOUNCE] udev 016 release Greg KH
                   ` (5 preceding siblings ...)
  2004-02-03 23:33 ` Eric Sandall
@ 2004-02-03 23:53 ` Greg KH
  2004-02-04  0:35 ` Eric Sandall
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2004-02-03 23:53 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Feb 03, 2004 at 03:33:15PM -0800, Eric Sandall wrote:
> 
> Fails with `patch -p1 < Makefile.patch` in udev-016 source directory:
> # patch -p1 < /tmp/makefile.patch
> sh: line 1: get: command not found
> warning: Patching file Makefile, which does not match default SCCS version
> patching file Makefile
> Hunk #1 FAILED at 259.
> 1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej

That's wierd, it works for me:

[tmp]$ tar -zxf udev-016.tar.gz 
[tmp]$ cd udev-016
[udev-016]$ patch -p1 -g1 < ../udev-makefile.patch 
Makefile 1.100: 388 lines
patching file Makefile
[udev-016]$


Did you somehow strip out the tabs in the patch?

thanks,

greg k-h


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
  2004-02-03 23:13     ` Greg KH
@ 2004-02-04  0:01       ` Kay Sievers
  0 siblings, 0 replies; 13+ messages in thread
From: Kay Sievers @ 2004-02-04  0:01 UTC (permalink / raw)
  To: Greg KH; +Cc: Martin Schlemmer, linux-hotplug-devel, Linux Kernel Mailing Lists

On Tue, Feb 03, 2004 at 03:13:41PM -0800, Greg KH wrote:
> On Wed, Feb 04, 2004 at 01:03:33AM +0200, Martin Schlemmer wrote:
> > On Tue, 2004-02-03 at 23:28, Martin Schlemmer wrote:
> > > On Tue, 2004-02-03 at 22:13, Greg KH wrote:
> > > 
> > > Except if I miss something major, udevsend and udevd still do not
> > > work:
> > > 
> > 
> > Skip that, it does work if SEQNUM is set :P
> > 
> > Anyhow, is it _really_ needed for SEQNUM to be set?  What about
> > the attached patch?
> 
> Yes it is necessary, as that is what the kernel spits out.  It's also
> the whole reason we need udevd :)
> 
> If you don't want to give a SEQNUM, just call udev directly.

Oh, never use this udevsend in any script. It expects the SEQNUM from
the kernel, not a random one from you! You will always get timeouts
everytime you use your own SEQNUM, like the timeout after the start of udevd.

If you really need udevsend, I can't imagine for what case, we need to
add some logic to it, to bypass the event ordering and waiting to put
the event straight to the exec_queue.


> > 2) events gets missing.  If you for example use udevsend in the
> > initscript that populate /dev (/udev), the amount of nodes/links
> > created is off with about 10-50 (once about 250) entries.

Your are calling udevsend with your script?

> Hm, that's not good.  I'll go test that and see what's happening.


thanks,
Kay


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
  2004-02-03 20:13 [ANNOUNCE] udev 016 release Greg KH
                   ` (6 preceding siblings ...)
  2004-02-03 23:53 ` Greg KH
@ 2004-02-04  0:35 ` Eric Sandall
  2004-02-04 22:31 ` Greg KH
       [not found] ` <1075844602.7473.75.camel@nosferatu.lan>
  9 siblings, 0 replies; 13+ messages in thread
From: Eric Sandall @ 2004-02-04  0:35 UTC (permalink / raw)
  To: linux-hotplug

Quoting Greg KH <greg@kroah.com>:
> That's wierd, it works for me:
> 
> [tmp]$ tar -zxf udev-016.tar.gz 
> [tmp]$ cd udev-016
> [udev-016]$ patch -p1 -g1 < ../udev-makefile.patch 
> Makefile 1.100: 388 lines
> patching file Makefile
> [udev-016]$
> 
> 
> Did you somehow strip out the tabs in the patch?
> 
> thanks,
> 
> greg k-h

<sigh>

Yeah, just copy&paste from Firebird put in spaces. I fixed the tabs and it now
works with -j2, thanks. :)

-sandalle

-- 
PGP Key Fingerprint:  FCFF 26A1 BE21 08F4 BB91  FAED 1D7B 7D74 A8EF DD61
http://search.keyserver.net:11371/pks/lookup?op=get&search=0xA8EFDD61

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS/E/IT$ d-- s++:+>: a-- C++(+++) BL++++VIS>$ P+(++) L+++ E-(---) W++ N+@ o?
K? w++++>-- O M-@ V-- PS+(+++) PE(-) Y++(+) PGP++(+) t+() 5++ X(+) R+(++)
tv(--)b++(+++) DI+@ D++(+++) G>+++ e>+++ h---(++) r++ y+
------END GEEK CODE BLOCK------

Eric Sandall                     |  Source Mage GNU/Linux Developer
eric@sandall.us                  |  http://www.sourcemage.org/
http://eric.sandall.us/          |  SysAdmin @ Inst. Shock Physics @ WSU
http://counter.li.org/  #196285  |  http://www.shock.wsu.edu/

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
  2004-02-03 20:13 [ANNOUNCE] udev 016 release Greg KH
                   ` (7 preceding siblings ...)
  2004-02-04  0:35 ` Eric Sandall
@ 2004-02-04 22:31 ` Greg KH
       [not found] ` <1075844602.7473.75.camel@nosferatu.lan>
  9 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2004-02-04 22:31 UTC (permalink / raw)
  To: linux-hotplug

On Tue, Feb 03, 2004 at 10:30:01PM +0100, Marco d'Itri wrote:
> On Feb 03, Greg KH <greg@kroah.com> wrote:
> 
> I'm attaching a trivial patch to remove a warning.

Thanks, Kay already sent me that.

> BTW, udev still takes a long time to start when D-BUS support is
> enabled.

That's a D-BUS issue, not a udev issue :)

thanks,

greg k-h


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
       [not found] ` <1075844602.7473.75.camel@nosferatu.lan>
@ 2004-02-11 22:13   ` Greg KH
       [not found]     ` <1076538429.22542.12.camel@nosferatu.lan>
  0 siblings, 1 reply; 13+ messages in thread
From: Greg KH @ 2004-02-11 22:13 UTC (permalink / raw)
  To: Martin Schlemmer; +Cc: linux-hotplug-devel, Linux Kernel Mailing Lists

On Tue, Feb 03, 2004 at 11:43:22PM +0200, Martin Schlemmer wrote:
> On Tue, 2004-02-03 at 22:13, Greg KH wrote:
> 
> Once again, patch to make logging a config option.
> 
> Reason for this (since you asked for it =):
> - In our setup it is easy (although still annoying) .. just
> edit the ebuild, add logging support (or remove it) and rebuild.
> For say a binary distro, having the logging is useful for debugging
> some times, but its more a once of, or rare thing, as you do not
> add or change config files every day.  Sure, we can have logging
> by default, but many do not want ~300 lines of extra debugging in
> their logs is not pleasant, and they will complain.  Rebuilding
> the package for that binary package (given the users it is targeted
> to) is usually not within most users grasp.

Ok, I applied this patch.

And then I went back and fixed it so it actually would work :(

Here's the changes I had to make to get everything to build properly,
and to let us have a boolean type for the config files.

thanks,

greg k-h

# fix log option code so that it actually works for all udev programs.
# Also introduce boolean type for config file to use.

diff -Nru a/logging.h b/logging.h
--- a/logging.h	Wed Feb 11 14:10:36 2004
+++ b/logging.h	Wed Feb 11 14:10:36 2004
@@ -34,9 +34,6 @@
 #include <unistd.h>
 #include <syslog.h>
 
-#include "udev.h"
-#include "udev_version.h"
-
 #undef info
 #define info(format, arg...)								\
 	do {										\
@@ -60,22 +57,23 @@
 	} while (0)
 #endif
 
+/* each program must declare this variable and function somewhere */
+extern unsigned char logname[42];
+extern int log_ok(void);
+
 static void log_message (int level, const char *format, ...)
 	__attribute__ ((format (printf, 2, 3)));
 static inline void log_message (int level, const char *format, ...)
 {
 	va_list	args;
 
-	if (0 != strncmp(udev_log_str, UDEV_LOG_DEFAULT, BOOL_SIZE))
+	if (!log_ok())
 		return;
 
 	va_start(args, format);
 	vsyslog(level, format, args);
 	va_end(args);
 }
-
-/* each program must declare this variable somewhere */
-extern unsigned char logname[42];
 
 #undef init_logging
 static inline void init_logging(char *program_name)
diff -Nru a/test/ignore_test b/test/ignore_test
--- a/test/ignore_test	Wed Feb 11 14:10:36 2004
+++ b/test/ignore_test	Wed Feb 11 14:10:36 2004
@@ -16,6 +16,7 @@
 udev_db="$PWD/udev/.udev.tdb"
 udev_rules="$PWD/$RULES"
 udev_permissions="$PWD/udev.permissions"
+udev_log="true"
 EOF
 
 mkdir udev
diff -Nru a/udev.c b/udev.c
--- a/udev.c	Wed Feb 11 14:10:36 2004
+++ b/udev.c	Wed Feb 11 14:10:36 2004
@@ -40,6 +40,11 @@
 char **main_envp;
 unsigned char logname[42];
 
+int log_ok(void)
+{
+	return udev_log;
+}
+
 static void sig_handler(int signum)
 {
 	dbg("caught signal %d", signum);
diff -Nru a/udev.h b/udev.h
--- a/udev.h	Wed Feb 11 14:10:36 2004
+++ b/udev.h	Wed Feb 11 14:10:36 2004
@@ -32,8 +32,6 @@
 #define OWNER_SIZE	30
 #define GROUP_SIZE	30
 #define MODE_SIZE	8
-#define BOOL_SIZE	5	/* 'yes', 'no' and possibly 'true' or 'false'
-				   in future */
 
 struct udevice {
 	char name[NAME_SIZE];
@@ -74,6 +72,6 @@
 extern char default_mode_str[MODE_SIZE];
 extern char default_owner_str[OWNER_SIZE];
 extern char default_group_str[GROUP_SIZE];
-extern char udev_log_str[BOOL_SIZE];
+extern int udev_log;
 
 #endif
diff -Nru a/udev_config.c b/udev_config.c
--- a/udev_config.c	Wed Feb 11 14:10:36 2004
+++ b/udev_config.c	Wed Feb 11 14:10:36 2004
@@ -48,9 +48,18 @@
 char default_mode_str[MODE_SIZE];
 char default_owner_str[OWNER_SIZE];
 char default_group_str[GROUP_SIZE];
-char udev_log_str[BOOL_SIZE];
+int udev_log;
 
 
+static int string_is_true(char *str)
+{
+	if (strcasecmp(str, "true") = 0)
+		return 1;
+	if (strcasecmp(str, "yes") = 0)
+		return 1;
+	return 0;
+}
+
 static void init_variables(void)
 {
 	/* fill up the defaults.  
@@ -61,7 +70,7 @@
 	strfieldcpy(udev_config_filename, UDEV_CONFIG_FILE);
 	strfieldcpy(udev_rules_filename, UDEV_RULES_FILE);
 	strfieldcpy(udev_permissions_filename, UDEV_PERMISSION_FILE);
-	strfieldcpy(udev_log_str, UDEV_LOG_DEFAULT);
+	udev_log = string_is_true(UDEV_LOG_DEFAULT);
 }
 
 #define set_var(_name, _var)				\
@@ -70,6 +79,12 @@
 		strncpy(_var, value, sizeof(_var));	\
 	}
 
+#define set_bool(_name, _var)				\
+	if (strcasecmp(variable, _name) = 0) {		\
+		dbg_parse("%s = '%s'", _name, value);	\
+		_var = string_is_true(value);		\
+	}
+
 int parse_get_pair(char **orig_string, char **left, char **right)
 {
 	char *temp;
@@ -158,7 +173,7 @@
 		set_var("default_mode", default_mode_str);
 		set_var("default_owner", default_owner_str);
 		set_var("default_group", default_group_str);
-		set_var("udev_log", udev_log_str);
+		set_bool("udev_log", udev_log);
 	}
 	dbg_parse("%s:%d:%Zd: error parsing '%s'", udev_config_filename,
 		  lineno, temp - line, temp);
@@ -194,7 +209,7 @@
 	dbg_parse("udev_db_filename = %s", udev_db_filename);
 	dbg_parse("udev_rules_filename = %s", udev_rules_filename);
 	dbg_parse("udev_permissions_filename = %s", udev_permissions_filename);
-	dbg_parse("udev_log_str = %s", udev_log_str);
+	dbg_parse("udev_log = %d", udev_log);
 	parse_config_file();
 
 	dbg_parse("udev_root = %s", udev_root);
@@ -202,7 +217,7 @@
 	dbg_parse("udev_db_filename = %s", udev_db_filename);
 	dbg_parse("udev_rules_filename = %s", udev_rules_filename);
 	dbg_parse("udev_permissions_filename = %s", udev_permissions_filename);
-	dbg_parse("udev_log_str = %s", udev_log_str);
+	dbg_parse("udev_log_str = %d", udev_log);
 }
 
 void udev_init_config(void)
diff -Nru a/udevd.c b/udevd.c
--- a/udevd.c	Wed Feb 11 14:10:36 2004
+++ b/udevd.c	Wed Feb 11 14:10:36 2004
@@ -40,7 +40,6 @@
 #include "udevd.h"
 #include "logging.h"
 
-unsigned char logname[42];
 static int expected_seqnum = 0;
 volatile static int children_waiting;
 volatile static int msg_q_timeout;
@@ -51,6 +50,13 @@
 
 static void exec_queue_manager(void);
 static void msg_queue_manager(void);
+
+unsigned char logname[42];
+
+int log_ok(void)
+{
+	return 1;
+}
 
 static void msg_dump_queue(void)
 {
diff -Nru a/udevinfo.c b/udevinfo.c
--- a/udevinfo.c	Wed Feb 11 14:10:36 2004
+++ b/udevinfo.c	Wed Feb 11 14:10:36 2004
@@ -40,6 +40,11 @@
 int main_argc;
 unsigned char logname[42];
 
+int log_ok(void)
+{
+	return 1;
+}
+
 static int print_all_attributes(const char *path)
 {
 	struct dlist *attributes;
diff -Nru a/udevsend.c b/udevsend.c
--- a/udevsend.c	Wed Feb 11 14:10:36 2004
+++ b/udevsend.c	Wed Feb 11 14:10:36 2004
@@ -42,6 +42,11 @@
 
 unsigned char logname[42];
 
+int log_ok(void)
+{
+	return 1;
+}
+
 static inline char *get_action(void)
 {
 	char *action;


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANNOUNCE] udev 016 release
       [not found]     ` <1076538429.22542.12.camel@nosferatu.lan>
@ 2004-02-12  1:19       ` Greg KH
  0 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2004-02-12  1:19 UTC (permalink / raw)
  To: Martin Schlemmer; +Cc: linux-hotplug-devel, Linux Kernel Mailing Lists

On Thu, Feb 12, 2004 at 12:27:09AM +0200, Martin Schlemmer wrote:
> On Thu, 2004-02-12 at 00:13, Greg KH wrote:
> > On Tue, Feb 03, 2004 at 11:43:22PM +0200, Martin Schlemmer wrote:
> > > On Tue, 2004-02-03 at 22:13, Greg KH wrote:
> > > 
> > > Once again, patch to make logging a config option.
> > > 
> > > Reason for this (since you asked for it =):
> > > - In our setup it is easy (although still annoying) .. just
> > > edit the ebuild, add logging support (or remove it) and rebuild.
> > > For say a binary distro, having the logging is useful for debugging
> > > some times, but its more a once of, or rare thing, as you do not
> > > add or change config files every day.  Sure, we can have logging
> > > by default, but many do not want ~300 lines of extra debugging in
> > > their logs is not pleasant, and they will complain.  Rebuilding
> > > the package for that binary package (given the users it is targeted
> > > to) is usually not within most users grasp.
> > 
> > Ok, I applied this patch.
> > 
> > And then I went back and fixed it so it actually would work :(
> > 
> > Here's the changes I had to make to get everything to build properly,
> > and to let us have a boolean type for the config files.
> > 
> 
> Interest sake ... when did it actually fail?  (When linking with
> klibc maybe?  Been using here without problems).

Did you build udevinfo?  udevsend?  udevd?  None of those files ended up
including the udev_log_* variable.

Anyway, it's cleaner this way :)

thanks,

greg k-h


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id\x1356&alloc_id438&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-02-12  1:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-03 20:13 [ANNOUNCE] udev 016 release Greg KH
2004-02-03 21:30 ` Marco d'Itri
2004-02-03 22:23 ` Eric Sandall
2004-02-03 22:46 ` Greg KH
     [not found] ` <1075843712.7473.60.camel@nosferatu.lan>
     [not found]   ` <1075849413.11322.6.camel@nosferatu.lan>
2004-02-03 23:13     ` Greg KH
2004-02-04  0:01       ` Kay Sievers
     [not found] ` <1075841390.7473.57.camel@nosferatu.lan>
2004-02-03 23:14   ` Greg KH
2004-02-03 23:33 ` Eric Sandall
2004-02-03 23:53 ` Greg KH
2004-02-04  0:35 ` Eric Sandall
2004-02-04 22:31 ` Greg KH
     [not found] ` <1075844602.7473.75.camel@nosferatu.lan>
2004-02-11 22:13   ` Greg KH
     [not found]     ` <1076538429.22542.12.camel@nosferatu.lan>
2004-02-12  1:19       ` Greg KH

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).