]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
18 years ago[PATCH] v017 release 017
greg@kroah.com [Fri, 13 Feb 2004 09:01:07 +0000 (01:01 -0800)] 
[PATCH] v017 release

18 years ago[PATCH] more udev-016/extras/multipath
christophe.varoqui@free.fr [Fri, 13 Feb 2004 08:53:10 +0000 (00:53 -0800)] 
[PATCH] more udev-016/extras/multipath

incremental to udev-016/extras/multipath-0.0.16.3,

        * add a GROUP_BY_SERIAL flag. This should be useful for
          controlers that activate their spare paths on simple IO
          submition with a penalty. The StorageWorks HW defaults to
          this mode, even if the MULTIBUS mode is OK.
        * remove unused sg_err.c
        * big restructuring : split devinfo.c from main.c. Export :
                * void basename (char *, char *);
                * int get_serial (int, char *);
                * int get_lun_strings (char *, char *, char *, char *);
                * int get_evpd_wwid(char *, char *);
                * long get_disk_size (char *);
          Now we see clearly what is expected from an external package
          like scsi_id.
        * stop passing struct env as param

18 years ago[PATCH] more udev-016/extras/multipath
christophe.varoqui@free.fr [Fri, 13 Feb 2004 08:48:36 +0000 (00:48 -0800)] 
[PATCH] more udev-016/extras/multipath

> Hello,
>
> incremental to udev-016/extras/multipath,
>
> * don't rely on the linux symlink in the udev/klibc dir since
>   udev build doesn't use it anymore. This corrects build breakage
> * remove make_dm_node fn & call. Rely on udev for this.
>
> The first patch is to be applied.
> The second is conditioned by udev dealing correctly with devmap names.
>
> For this I can suggest a CALLOUT rule like this :
> KERNEL="dm-[0-9]*", PROGRAM="/tmp/name_devmap %M %m", NAME="%k",
> SYMLINK="%c"
>
> With name_devmap like :
> #!/bin/sh
> /usr/sbin/dmsetup ls|/bin/grep "$1, $2"|/usr/bin/awk '{print $1}'
>

ok I coded the suggested tool.
it works with the following rule :
KERNEL="dm-[0-9]*", PROGRAM="/sbin/devmap_name %M %m", NAME="%k", SYMLINK="%c"

I don't know if it's right to keep this tools packaged with multipath because
it's widely more general.

Maybe Joe should merge it in the device-mapper package or provide the
functionnality through dmsetup ?

18 years ago[PATCH] add udev_log to the documentation.
greg@kroah.com [Fri, 13 Feb 2004 08:35:30 +0000 (00:35 -0800)] 
[PATCH] add udev_log to the documentation.

18 years ago[PATCH] fix offsetof() define in klibc.
greg@kroah.com [Fri, 13 Feb 2004 07:43:31 +0000 (23:43 -0800)] 
[PATCH] fix offsetof() define in klibc.

18 years ago[PATCH] add some .spec file changes from Red Hat.
greg@kroah.com [Fri, 13 Feb 2004 07:40:56 +0000 (23:40 -0800)] 
[PATCH] add some .spec file changes from Red Hat.

18 years ago[PATCH] update the init.d udev script based on a patch from Red Hat.
greg@kroah.com [Fri, 13 Feb 2004 07:30:11 +0000 (23:30 -0800)] 
[PATCH] update the init.d udev script based on a patch from Red Hat.

18 years ago[PATCH] remove the .udev.tdb when installing or uninstalling to be safe.
greg@kroah.com [Fri, 13 Feb 2004 07:20:50 +0000 (23:20 -0800)] 
[PATCH] remove the .udev.tdb when installing or uninstalling to be safe.

18 years ago[PATCH] remove the database at startup.
greg@kroah.com [Fri, 13 Feb 2004 07:08:22 +0000 (23:08 -0800)] 
[PATCH] remove the database at startup.

18 years ago[PATCH] udev - keep private data out of the database?
kay.sievers@vrfy.org [Fri, 13 Feb 2004 06:51:44 +0000 (22:51 -0800)] 
[PATCH] udev - keep private data out of the database?

Shouldn't we keep the temporary strings out of the database,
or is this information useful for something?

It cuts the length of the data from 628 to 275 bytes.

18 years ago[PATCH] fix bug in permission handling.
greg@kroah.com [Fri, 13 Feb 2004 06:42:14 +0000 (22:42 -0800)] 
[PATCH] fix bug in permission handling.

18 years ago[PATCH] update klibc to version .107
greg@kroah.com [Fri, 13 Feb 2004 06:41:55 +0000 (22:41 -0800)] 
[PATCH] update klibc to version .107

18 years ago[PATCH] add udevtest program to build
greg@kroah.com [Fri, 13 Feb 2004 04:19:21 +0000 (20:19 -0800)] 
[PATCH] add udevtest program to build

Also fix up some other dependancy issues in the Makefile.
Thanks to Olaf Hering <olh@suse.de> for pointing them out.

18 years ago[PATCH] fix problem where usb devices can be either the main device or the interface
greg@kroah.com [Fri, 13 Feb 2004 03:48:07 +0000 (19:48 -0800)] 
[PATCH] fix problem where usb devices can be either the main device or the interface

This fixes the bug of a long delay for mouse devices

18 years ago[PATCH] more logging.h cleanups to be a bit more flexible.
greg@kroah.com [Fri, 13 Feb 2004 02:57:06 +0000 (18:57 -0800)] 
[PATCH] more logging.h cleanups to be a bit more flexible.

18 years ago[PATCH] stop using mode_t as different libcs define it in different ways :(
greg@kroah.com [Thu, 12 Feb 2004 09:29:40 +0000 (01:29 -0800)] 
[PATCH] stop using mode_t as different libcs define it in different ways :(

18 years ago[PATCH] udev add wild card compare for ID
patmans@us.ibm.com [Thu, 12 Feb 2004 09:25:28 +0000 (01:25 -0800)] 
[PATCH] udev add wild card compare for ID

Allow wild card comparison of the ID.

Using strcmp_pattern here also means we on longer match partial values,
for example, a scsi rule like this won't match anymore:

BUS="scsi", ID=":0", NAME="sdfoo-short-bus_id-1"

But this now works:

BUS="scsi", ID="*:0", NAME="sdfoo-bus_id-wild-card-1"

18 years ago[PATCH] udev kill extra bus_id compares in match_id
patmans@us.ibm.com [Thu, 12 Feb 2004 09:24:54 +0000 (01:24 -0800)] 
[PATCH] udev kill extra bus_id compares in match_id

Kill the extra bus_id check in match_id. This is wrong, especially since
we check for rule matches with the parent devices on a given devices path.

For example, given a device path of:

/sys/devices/pci0000:01/0000:01:0c.0/host5/5:0:2:0

With this patch, the following rule will no longer match:

BUS="scsi", ID="host5", NAME="sd-bus_id-host5"

18 years ago[PATCH] better credential patch
kay.sievers@vrfy.org [Thu, 12 Feb 2004 09:23:59 +0000 (01:23 -0800)] 
[PATCH] better credential patch

Here is a small improvement. We check for the type of message we receive
and udevsend seems not to need all the credential setup stuff, the
kernel will fill it for us.

udevd now refuses to start as non root, cause it doesn't make any sense.

18 years ago[PATCH] remove some more KLIBC fixups that are no longer needed.
greg@kroah.com [Thu, 12 Feb 2004 09:14:48 +0000 (01:14 -0800)] 
[PATCH] remove some more KLIBC fixups that are no longer needed.

18 years ago[PATCH] let udev-test.pl run an individual test if you ask it to.
greg@kroah.com [Thu, 12 Feb 2004 08:49:52 +0000 (00:49 -0800)] 
[PATCH] let udev-test.pl run an individual test if you ask it to.

just put the test number on the command line:
udev-test.pl 3
will run test number 3

If no test number is specified, all of the tests will be run, just like before.

18 years ago[PATCH] Handle the '!' character that some block devices have.
greg@kroah.com [Thu, 12 Feb 2004 07:49:04 +0000 (23:49 -0800)] 
[PATCH] Handle the '!' character that some block devices have.

18 years ago[PATCH] add a block device with a ! in the name, and a test for this.
greg@kroah.com [Thu, 12 Feb 2004 07:34:21 +0000 (23:34 -0800)] 
[PATCH] add a block device with a ! in the name, and a test for this.

18 years ago[PATCH] fix up 'make release' to use bk to build the export tree.
greg@kroah.com [Thu, 12 Feb 2004 07:23:17 +0000 (23:23 -0800)] 
[PATCH] fix up 'make release' to use bk to build the export tree.

18 years ago[PATCH] udevd - client access authorization
kay.sievers@vrfy.org [Thu, 12 Feb 2004 06:32:11 +0000 (22:32 -0800)] 
[PATCH] udevd - client access authorization

Here is the badly needed client authorization for udevd.
Since we switched to abstract namespace sockets, we are unable to
control the access of the socket by file permissions.

So here we send a ancillary credential message with every datagram,
to be able to verify the uid of the sender. The sender can't fake the
credentials, cause the kernel doesn't allow it for non root users.

udevd is still working with klibc here :)

18 years ago[PATCH] compile udevd with klibc
kay.sievers@vrfy.org [Thu, 12 Feb 2004 06:29:15 +0000 (22:29 -0800)] 
[PATCH] compile udevd with klibc

On Mon, Feb 09, 2004 at 05:41:15AM +0100, Kay Sievers wrote:
> It seems that today was just another udev-sunday for me :)
>
> Here is a working patch to compile udevd with klibc.
>
> It's sweet the static binary takes 6 kbytes and it runs
> with only 80 kbytes virtual memory.
>
> I changed a few peaces and added a siginterrupt.c file to klibc.
> We may check with hpa to get the changes upstream?

So here is the next try :)
hpa, for good reason, didn't like my changes to klibc.
He will dump signal() completely from klibc instead, so here we switch to
sigaction() and keep udevd working with klibc.

18 years ago[PATCH] udev - fix "ignore method"
kay.sievers@vrfy.org [Thu, 12 Feb 2004 06:28:51 +0000 (22:28 -0800)] 
[PATCH] udev - fix "ignore method"

On Sun, Feb 08, 2004 at 04:36:01PM +0100, Kay Sievers wrote:
> We don't handle NAME="" the right way. Thanks to Emil None <emil71se@yahoo.com>
> for pointing this out. Here is a fix for it and a trivial style cleanup.

Changed the ignore dbg() to info().

18 years ago[PATCH] udev - fix cdrom symlink rule
kay.sievers@vrfy.org [Thu, 12 Feb 2004 06:28:47 +0000 (22:28 -0800)] 
[PATCH] udev - fix cdrom symlink rule

We only need to look at the device, not at the partitions.

18 years ago[PATCH] fix log option code so that it actually works for all udev programs.
greg@kroah.com [Thu, 12 Feb 2004 06:10:26 +0000 (22:10 -0800)] 
[PATCH] fix log option code so that it actually works for all udev programs.

Also introduce boolean type for config file to use.

18 years ago[PATCH] make logging a config option
azarah@nosferatu.za.org [Thu, 12 Feb 2004 03:42:51 +0000 (19:42 -0800)] 
[PATCH] make logging a config option

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.

18 years ago[PATCH] finish syncing up with klibc
greg@kroah.com [Thu, 12 Feb 2004 02:34:28 +0000 (18:34 -0800)] 
[PATCH] finish syncing up with klibc

18 years ago[PATCH] sync with latest version of klibc (0.107)
greg@kroah.com [Thu, 12 Feb 2004 02:27:55 +0000 (18:27 -0800)] 
[PATCH] sync with latest version of klibc (0.107)

18 years ago[PATCH] convert udevsend/udevd to DGRAM and single-threaded
kay.sievers@vrfy.org [Sat, 7 Feb 2004 06:21:15 +0000 (22:21 -0800)] 
[PATCH] convert udevsend/udevd to DGRAM and single-threaded

On Fri, Feb 06, 2004 at 01:08:24AM -0500, Chris Friesen wrote:
>
> Kay, you said "unless we can get rid of _all_ the threads or at least
> getting faster, I don't want to change it."
>
> Well how about we get rid of all the threads, *and* we get faster?

Yes, we are twice as fast now on my box :)

> This patch applies to current bk trees, and does the following:
>
> 1) Switch to DGRAM sockets rather than STREAM.  This simplifies things
> as mentioned in the previous message.
>
> 2) Invalid sequence numbers are mapped to -1 rather than zero, since
> zero is a valid sequence number (I think).  Also, this allows for real
> speed tests using scripts starting at a zero sequence number, since that
> is what the initial expected sequence number is.
>
> 3) Get rid of all threading.  This is the biggie.  Some highlights:
>  a) timeout using setitimer() and SIGALRM
>  b) async child death notification via SIGCHLD
>  c) these two signal handlers do nothing but raise volatile flags,
>  all the
> work is done in the main loop
>  d) locking no longer required

I cleaned up the rest of the comments, the whitespace and a few names to match
the whole thing. Please recheck it. Test script is switched to work on subsystem
'test' to let udev ignore it.

18 years ago[PATCH] udevd - kill the lockfile
kay.sievers@vrfy.org [Fri, 6 Feb 2004 09:04:28 +0000 (01:04 -0800)] 
[PATCH] udevd - kill the lockfile

18 years ago[PATCH] update extras/multipath
christophe.varoqui@free.fr [Fri, 6 Feb 2004 08:14:51 +0000 (00:14 -0800)] 
[PATCH] update extras/multipath

incremental to udev-016/extras/multipath,

* don't rely on the linux symlink in the udev/klibc dir since
  udev build doesn't use it anymore. This corrects build breakage
* remove make_dm_node fn & call. Rely on udev for this.

The first patch is to be applied.
The second is conditioned by udev dealing correctly with devmap names.

For this I can suggest a CALLOUT rule like this :
KERNEL=3D"dm-[0-9]*", PROGRAM=3D"/tmp/name_devmap %M %m", NAME=3D"%k", SY=
MLINK=3D"%c"

With name_devmap like :
#!/bin/sh
/usr/sbin/dmsetup ls|/bin/grep "$1, $2"|/usr/bin/awk '{print $1}'

18 years ago[PATCH] udevd - fix socket path length
kay.sievers@vrfy.org [Fri, 6 Feb 2004 08:11:24 +0000 (00:11 -0800)] 
[PATCH] udevd - fix socket path length

It seems that the guys are no longer differ about the right size of the
socket address :)

The kernel simply takes all bytes until the specified length as the name,
so the real length should be enough.

18 years ago[PATCH] udevd - switch socket path to abstract namespace
kay.sievers@vrfy.org [Thu, 5 Feb 2004 09:35:15 +0000 (01:35 -0800)] 
[PATCH] udevd - switch socket path to abstract namespace

As Chris Friesen <chris_friesen@sympatico.ca> suggested, here we switch
the unix domains socket path to abstract namespace and get rid of the
socket file in the filesystem.

Hey, this was new to me today. So here a few words:
  Linux supports a abstract namespace for sockets. We don't need a
  physical file on the filesystem but only a unique string magically
  starting with the '\0' character.

  strace with real file:
    connect(3, {sa_family=AF_UNIX, path="/udev/.udevd.sock"}, 110)

  strace with abstract namespace:
    connect(3, {sa_family=AF_UNIX, path=@udevd}, 110)

18 years ago[PATCH] udevd - allow to bypass sequence number
kay.sievers@vrfy.org [Thu, 5 Feb 2004 09:35:08 +0000 (01:35 -0800)] 
[PATCH] udevd - allow to bypass sequence number

This patch allows udevsend to be called by the user and not only by the
kernel with its SEQNUM. If no SEQNUM is given, we move the event straight
to the exec queue and don't look if something is missing.

I don't know if this is really needed, but some people seem trying to
send events trough udevd instead of calling udev directly with their
scripts and confuse the reorder logic with that.

So at least, we may remove this source of confusion and udevsend is much
much faster back than udev itself and it will also block concurrent events
for the same devpath.

18 years ago[PATCH] 016_bk mark
greg@kroah.com [Wed, 4 Feb 2004 08:56:10 +0000 (00:56 -0800)] 
[PATCH] 016_bk mark

18 years ago[PATCH] include used function
kay.sievers@vrfy.org [Wed, 4 Feb 2004 08:55:24 +0000 (00:55 -0800)] 
[PATCH] include used function

This includes the missing header for the use of getpid in logging.h.

18 years ago[PATCH] fix up Makefile dependancies for udev_version.h
greg@kroah.com [Wed, 4 Feb 2004 06:45:49 +0000 (22:45 -0800)] 
[PATCH] fix up Makefile dependancies for udev_version.h

18 years ago[PATCH] v016 release 016
greg@kroah.com [Wed, 4 Feb 2004 02:23:13 +0000 (18:23 -0800)] 
[PATCH] v016 release

18 years ago[PATCH] add udevd and udevsend to the spec file.
greg@kroah.com [Tue, 3 Feb 2004 09:29:45 +0000 (01:29 -0800)] 
[PATCH] add udevd and udevsend to the spec file.

18 years ago[PATCH] make /etc/hotplug.d/default/udev.hotplug symlink point to udevsend now.
greg@kroah.com [Tue, 3 Feb 2004 09:29:20 +0000 (01:29 -0800)] 
[PATCH] make /etc/hotplug.d/default/udev.hotplug symlink point to udevsend now.

18 years ago[PATCH] add KERNEL_DIR option so that the distros will be happy
greg@kroah.com [Tue, 3 Feb 2004 08:51:51 +0000 (00:51 -0800)] 
[PATCH] add KERNEL_DIR option so that the distros will be happy

Based on a patch from Svetoslav Slavtchev <svetljo@gmx.de>

18 years ago[PATCH] get_dev_number() in extras/ide-devfs.sh
elkropac@students.zcu.cz [Tue, 3 Feb 2004 08:20:31 +0000 (00:20 -0800)] 
[PATCH] get_dev_number() in extras/ide-devfs.sh

this patch corrects ide devices with number greater than 9 being linked
into wrong discs/discX directories (my hda10 device was in discs/disc1
directory)
it adds % into pattern for $DRIVE, so for example, hda10 is not eaten
to hda1, but to hda, and break in for cycle works for it

18 years ago[PATCH] FAQ udev.rules.devfs
rrm3@rrm3.org [Tue, 3 Feb 2004 08:20:27 +0000 (00:20 -0800)] 
[PATCH] FAQ udev.rules.devfs

I have a very small patch for the udev FAQ.  :-)

18 years ago[PATCH] make udevsend binary even smaller
greg@kroah.com [Tue, 3 Feb 2004 02:42:42 +0000 (18:42 -0800)] 
[PATCH] make udevsend binary even smaller

18 years ago[PATCH] let udevsend build with klibc
kay.sievers@vrfy.org [Tue, 3 Feb 2004 02:10:29 +0000 (18:10 -0800)] 
[PATCH] let udevsend build with klibc

> I don't mind udevd using glibc, I just want the programs that get run a
> lot of different times (udev and udevsend) to be as small as possible to
> get the best cache results.  As udevd sticks around all the time, it's
> not as important.  Sound sane to you?

Oh, nice. Good idea.

18 years ago[PATCH] udevsend now almost compiles with klibc, struct sockaddr_un is only problem...
greg@kroah.com [Mon, 2 Feb 2004 16:29:04 +0000 (08:29 -0800)] 
[PATCH] udevsend now almost compiles with klibc, struct sockaddr_un is only problem now.

18 years ago[PATCH] fix up logging code so that it can be built without it being enabled
greg@kroah.com [Mon, 2 Feb 2004 16:22:01 +0000 (08:22 -0800)] 
[PATCH] fix up logging code so that it can be built without it being enabled

18 years ago[PATCH] rework the logging code so that each program logs with the proper name in...
greg@kroah.com [Mon, 2 Feb 2004 16:19:41 +0000 (08:19 -0800)] 
[PATCH] rework the logging code so that each program logs with the proper name in the syslog.

18 years ago[PATCH] remove logging.c as it's no longer needed.
greg@kroah.com [Mon, 2 Feb 2004 16:19:13 +0000 (08:19 -0800)] 
[PATCH] remove logging.c as it's no longer needed.

18 years ago[PATCH] udevd - config cleanup
kay.sievers@vrfy.org [Mon, 2 Feb 2004 16:00:07 +0000 (08:00 -0800)] 
[PATCH] udevd - config cleanup

> Here is a small cleanup and better Makefile integration.
> udevd and udevsender are now installed. Just switch HOTPLUG_EXEC from ROOT
> to SENDER before install and udevsend will be called.
>
> We may add the location of the socket and lock file to the config,
> if this is needed.

Same patch with a fix for the stack size setting.

18 years ago[PATCH] udevd - cleanup and better timeout handling
kay.sievers@vrfy.org [Sun, 1 Feb 2004 17:12:36 +0000 (09:12 -0800)] 
[PATCH] udevd - cleanup and better timeout handling

On Thu, Jan 29, 2004 at 04:55:11PM +0100, Kay Sievers wrote:
> On Thu, Jan 29, 2004 at 02:56:25AM +0100, Kay Sievers wrote:
> > On Wed, Jan 28, 2004 at 10:47:36PM +0100, Kay Sievers wrote:
> > > Oh, couldn't resist to try threads.
> > > It's a multithreaded udevd that communicates through a localhost socket.
> > > The message includes a magic with the udev version, so we don't accept
> > > older udevsend's.
> > >
> > > No need for locking, cause we can't bind two sockets on the same address.
> > > The daemon tries to connect and if it fails it starts the daemon.
> > >
> > > We create a thread for every incoming connection, handle over the socket,
> > > sort the messages in the global message queue and exit the thread.
> > > Huh, that was easy with threads :)
> > >
> > > With the addition of a message we wakeup the queue manager thread and
> > > handle timeouts or move the message to the global exec list. This wakes
> > > up the exec list manager who looks if a process is already running for this
> > > device path.
> > > If yes, the exec is delayed otherwise we create a thread that execs udev.
> > > n the background. With the return of udev we free the message and wakeup
> > > the exec list manager to look if something is pending.
> > >
> > > It is just a quick shot, cause I couldn't solve the problems with fork an
> > > scheduling and I wanted to see if I'm to stupid  :)
> > > But if anybody with a better idea or more experience with I/O scheduling
> > > we may go another way. The remaining problem is that klibc doesn't support
> > > threads.
> > >
> > > By now, we don't exec anything, it's just a sleep 3 for every exec,
> > > but you can see the queue management by watching syslog and do:
> > >
> > >   DEVPATH=/abc ACTION=add SEQNUM=0 ./udevsend /abc
>
> Next version, switched to unix domain sockets.

Next cleaned up version. Hey, nobody wants to try it :)

Works for me, It's funny if I connect/disconnect my 4in1-usb-flash-reader
every two seconds. The 2.6 usb rocks! I can connect/diconnect a hub with 3
devices plugged in every second and don't run into any problem but a _very_
big udevd queue.

18 years ago[PATCH] kill the last examples that contained the %D option.
greg@kroah.com [Fri, 30 Jan 2004 05:54:38 +0000 (21:54 -0800)] 
[PATCH] kill the last examples that contained the %D option.

18 years ago[PATCH] fix possible buffer overflow
kay.sievers@vrfy.org [Thu, 29 Jan 2004 03:00:51 +0000 (19:00 -0800)] 
[PATCH] fix possible buffer overflow

On Tue, Jan 27, 2004 at 11:02:25AM -0800, Greg KH wrote:
> On Mon, Jan 26, 2004 at 07:28:03PM -0500, Adrian Drzewiecki wrote:
> > Looking over the code, I noticed something odd in
> > namedev.c:strcmp_pattern() --
> >
> >  while (*p && (*p != ']'))
> >  p ++;
> >  return strcmp_pattern(p+1, s+1);
> >
> > If the pattern string is invalid, and is not terminated by a ']', then 'p'
> > will point at \0 and p+1 will be beyond the string.
>
> Yes, I think you are correct.
>
> Hm, Kay, any idea of the proper way to fix this?  I've attached a patch
> below, but I don't think it is correct.
>
>   while (*p && (*p != ']'))
>   p++;
> - return strcmp_pattern(p+1, s+1);
> + if (*p)
> + return strcmp_pattern(p+1, s+1);
> + else
> + return 1;
>   }
>   }

Sure, it's perfectly correct. I'm wondering how Adrian found this.

We can use the return 1 at the end of the whole function, and asking
for the closing ']' is more descriptive, but it does the same.

- return strcmp_pattern(p+1, s+1);
+ if (*p == ']')
+ return strcmp_pattern(p+1, s+1);

Patch is attached, that also replaces all the *s with s[0].

18 years ago[PATCH] remove a __KLIBC__ tests in libsysfs, as klibc now supports getpagesize()
greg@kroah.com [Thu, 29 Jan 2004 02:53:12 +0000 (18:53 -0800)] 
[PATCH] remove a __KLIBC__ tests in libsysfs, as klibc now supports getpagesize()

18 years ago[PATCH] udevd - remove stupid locking error I wrote.
greg@kroah.com [Thu, 29 Jan 2004 02:52:45 +0000 (18:52 -0800)] 
[PATCH] udevd - remove stupid locking error I wrote.

18 years ago[PATCH] update to klibc version 0.101, fixing the stdin bug.
greg@kroah.com [Thu, 29 Jan 2004 02:35:47 +0000 (18:35 -0800)] 
[PATCH] update to klibc version 0.101, fixing the stdin bug.

18 years ago[PATCH] udevd - next round of fixes
kay.sievers@vrfy.org [Wed, 28 Jan 2004 02:57:36 +0000 (18:57 -0800)] 
[PATCH] udevd - next round of fixes

Here is the next round. We have three queues now. All incoming messages
are queued in msg_list and if nothing is missing we move it to the
running_list and exec in the background.
If the exec comes back, it removes the message from the running_list and
frees the message.

Before we exec, we check the running_list if there is a udev running on
the same device path. If yes, we move the message to the delay_list. If
the former exec comes back, we move the message to the running_list and
exec it.

The very first event is delayed now to catch possible earlier sequences,
every following event is executed without delay if no sequence is missing.

The daemon doesn't exit by itself any longer, cause we don't want to
delay every first exec.

I've put a $(PWD) for now in the Makefile for testing this beast. Only
the local binaries are executed, not the /sbin/udev. We can change it
if we are ready for real testing.

And SIGKILL can't be cought, so I removed it from the handler :)

06:58:36 sig_handler: caught signal 15
06:58:36 main: using ipc queue 0x2d548
06:58:37 message is still in the ipc queue, starting daemon...
06:58:37 work: received sequence 3, expected sequence 0
06:58:37 msg_dump_queue: sequence 3 in queue
06:58:37 set_timeout: set timeout in 1 seconds
06:58:37 main: using ipc queue 0x2d548
06:58:37 main: using ipc queue 0x2d548
06:58:37 work: received sequence 1, expected sequence 1
06:58:37 msg_dump_queue: sequence 1 in queue
06:58:37 msg_dump_queue: sequence 3 in queue
06:58:37 msg_dump: sequence 1, 'add', '/block/sda', 'block'
06:58:37 msg_exec: child [8038] created
06:58:37 running_moveto_queue: move sequence 1 [8038] to running queue '/block/sda'
06:58:37 set_timeout: set timeout in 5 seconds
06:58:37 work: received sequence 2, expected sequence 2
06:58:37 msg_dump_queue: sequence 2 in queue
06:58:37 msg_dump_queue: sequence 3 in queue
06:58:37 msg_dump: sequence 2, 'add', '/block/sdb', 'block'
06:58:37 msg_exec: child [8039] created
06:58:37 running_moveto_queue: move sequence 2 [8039] to running queue '/block/sdb'
06:58:37 msg_dump: sequence 3, 'add', '/block/sdc', 'block'
06:58:37 msg_exec: child [8040] created
06:58:37 running_moveto_queue: move sequence 3 [8040] to running queue '/block/sdc'
06:58:37 main: using ipc queue 0x2d548
06:58:37 main: using ipc queue 0x2d548
06:58:37 work: received sequence 4, expected sequence 4
06:58:37 msg_dump_queue: sequence 4 in queue
06:58:37 msg_dump: sequence 4, 'remove', '/block/sdc', 'block'
06:58:37 msg_exec: delay exec of sequence 4, [8040] already working on '/block/sdc'
06:58:37 delayed_moveto_queue: move event to delayed queue '/block/sdc'
06:58:37 msg_exec: child [8043] created
06:58:37 running_moveto_queue: move sequence 4 [8043] to running queue '/block/sdc'
06:58:37 work: received sequence 5, expected sequence 5
06:58:37 msg_dump_queue: sequence 5 in queue
06:58:37 msg_dump: sequence 5, 'remove', '/block/sdb', 'block'
06:58:37 msg_exec: delay exec of sequence 5, [8039] already working on '/block/sdb'
06:58:37 delayed_moveto_queue: move event to delayed queue '/block/sdb'
06:58:37 msg_exec: child [8044] created
06:58:37 running_moveto_queue: move sequence 5 [8044] to running queue '/block/sdb'
06:58:37 main: using ipc queue 0x2d548
06:58:37 main: using ipc queue 0x2d548
06:58:37 work: received sequence 8, expected sequence 6
06:58:37 msg_dump_queue: sequence 8 in queue
06:58:37 set_timeout: set timeout in 5 seconds
06:58:37 work: received sequence 6, expected sequence 6
06:58:37 msg_dump_queue: sequence 6 in queue
06:58:37 msg_dump_queue: sequence 8 in queue
06:58:37 msg_dump: sequence 6, 'remove', '/block/sda', 'block'
06:58:37 msg_exec: delay exec of sequence 6, [8038] already working on '/block/sda'
06:58:37 delayed_moveto_queue: move event to delayed queue '/block/sda'
06:58:37 msg_exec: child [8047] created
06:58:37 running_moveto_queue: move sequence 6 [8047] to running queue '/block/sda'
06:58:37 set_timeout: set timeout in 5 seconds
06:58:38 sig_handler: caught signal 17
06:58:38 sig_handler: exec finished, pid 8038
06:58:38 set_timeout: set timeout in 4 seconds
06:58:38 msg_dump_queue: sequence 8 in queue
06:58:38 sig_handler: caught signal 17
06:58:38 sig_handler: exec finished, pid 8039
06:58:38 set_timeout: set timeout in 4 seconds
06:58:38 msg_dump_queue: sequence 8 in queue
06:58:38 sig_handler: caught signal 17
06:58:38 sig_handler: exec finished, pid 8040
06:58:38 set_timeout: set timeout in 4 seconds
06:58:38 msg_dump_queue: sequence 8 in queue
06:58:38 sig_handler: caught signal 17
06:58:38 sig_handler: exec finished, pid 8043
06:58:38 set_timeout: set timeout in 4 seconds
06:58:38 msg_dump_queue: sequence 8 in queue
06:58:38 sig_handler: caught signal 17
06:58:38 sig_handler: exec finished, pid 8044
06:58:38 set_timeout: set timeout in 4 seconds
06:58:38 msg_dump_queue: sequence 8 in queue
06:58:38 sig_handler: caught signal 17
06:58:38 sig_handler: exec finished, pid 8047
06:58:38 set_timeout: set timeout in 4 seconds
06:58:38 msg_dump_queue: sequence 8 in queue
06:58:39 main: using ipc queue 0x2d548
06:58:39 main: using ipc queue 0x2d548
06:58:39 work: received sequence 9, expected sequence 7
06:58:39 msg_dump_queue: sequence 8 in queue
06:58:39 msg_dump_queue: sequence 9 in queue
06:58:39 set_timeout: set timeout in 3 seconds
06:58:39 work: received sequence 11, expected sequence 7
06:58:39 msg_dump_queue: sequence 8 in queue
06:58:39 msg_dump_queue: sequence 9 in queue
06:58:39 msg_dump_queue: sequence 11 in queue
06:58:39 set_timeout: set timeout in 3 seconds
06:58:39 main: using ipc queue 0x2d548
06:58:39 work: received sequence 10, expected sequence 7
06:58:39 msg_dump_queue: sequence 8 in queue
06:58:39 msg_dump_queue: sequence 9 in queue
06:58:39 msg_dump_queue: sequence 10 in queue
06:58:39 msg_dump_queue: sequence 11 in queue
06:58:39 set_timeout: set timeout in 3 seconds
06:58:39 main: using ipc queue 0x2d548
06:58:39 work: received sequence 13, expected sequence 7
06:58:39 msg_dump_queue: sequence 8 in queue
06:58:39 msg_dump_queue: sequence 9 in queue
06:58:39 msg_dump_queue: sequence 10 in queue
06:58:39 msg_dump_queue: sequence 11 in queue
06:58:39 msg_dump_queue: sequence 13 in queue
06:58:39 set_timeout: set timeout in 3 seconds
06:58:39 main: using ipc queue 0x2d548
06:58:39 work: received sequence 14, expected sequence 7
06:58:39 msg_dump_queue: sequence 8 in queue
06:58:39 msg_dump_queue: sequence 9 in queue
06:58:39 msg_dump_queue: sequence 10 in queue
06:58:39 msg_dump_queue: sequence 11 in queue
06:58:39 msg_dump_queue: sequence 13 in queue
06:58:39 msg_dump_queue: sequence 14 in queue
06:58:39 set_timeout: set timeout in 3 seconds
06:58:39 main: using ipc queue 0x2d548
06:58:39 work: received sequence 15, expected sequence 7
06:58:39 msg_dump_queue: sequence 8 in queue
06:58:39 msg_dump_queue: sequence 9 in queue
06:58:39 msg_dump_queue: sequence 10 in queue
06:58:39 msg_dump_queue: sequence 11 in queue
06:58:39 msg_dump_queue: sequence 13 in queue
06:58:39 msg_dump_queue: sequence 14 in queue
06:58:39 msg_dump_queue: sequence 15 in queue
06:58:39 set_timeout: set timeout in 3 seconds
06:58:41 main: using ipc queue 0x2d548
06:58:41 work: received sequence 12, expected sequence 7
06:58:41 msg_dump_queue: sequence 8 in queue
06:58:41 msg_dump_queue: sequence 9 in queue
06:58:41 msg_dump_queue: sequence 10 in queue
06:58:41 msg_dump_queue: sequence 11 in queue
06:58:41 msg_dump_queue: sequence 12 in queue
06:58:41 msg_dump_queue: sequence 13 in queue
06:58:41 msg_dump_queue: sequence 14 in queue
06:58:41 msg_dump_queue: sequence 15 in queue
06:58:41 set_timeout: set timeout in 1 seconds
06:58:42 sig_handler: caught signal 14
06:58:42 sig_handler: event timeout reached
06:58:42 event 8, age 5 seconds, skip event 7-7
06:58:42 msg_dump: sequence 8, 'add', '/block/sdb', 'block'
06:58:42 msg_exec: child [8057] created
06:58:42 running_moveto_queue: move sequence 8 [8057] to running queue '/block/sdb'
06:58:42 msg_dump: sequence 9, 'add', '/block/sdc', 'block'
06:58:42 msg_exec: child [8058] created
06:58:42 running_moveto_queue: move sequence 9 [8058] to running queue '/block/sdc'
06:58:42 msg_dump: sequence 10, 'remove', '/block/sdc', 'block'
06:58:42 msg_exec: delay exec of sequence 10, [8058] already working on '/block/sdc'
06:58:42 delayed_moveto_queue: move event to delayed queue '/block/sdc'
06:58:42 msg_exec: child [8059] created
06:58:42 running_moveto_queue: move sequence 10 [8059] to running queue '/block/sdc'
06:58:42 msg_dump: sequence 11, 'remove', '/block/sdb', 'block'
06:58:42 msg_exec: delay exec of sequence 11, [8057] already working on '/block/sdb'
06:58:42 delayed_moveto_queue: move event to delayed queue '/block/sdb'
06:58:42 msg_exec: child [8060] created
06:58:42 running_moveto_queue: move sequence 11 [8060] to running queue '/block/sdb'
06:58:42 msg_dump: sequence 12, 'remove', '/block/sda', 'block'
06:58:42 msg_exec: child [8061] created
06:58:42 running_moveto_queue: move sequence 12 [8061] to running queue '/block/sda'
06:58:42 msg_dump: sequence 13, 'add', '/block/sda', 'block'
06:58:42 msg_exec: delay exec of sequence 13, [8061] already working on '/block/sda'
06:58:42 delayed_moveto_queue: move event to delayed queue '/block/sda'
06:58:42 msg_exec: child [8062] created
06:58:42 running_moveto_queue: move sequence 13 [8062] to running queue '/block/sda'
06:58:42 msg_dump: sequence 14, 'add', '/block/sdb', 'block'
06:58:42 msg_exec: delay exec of sequence 14, [8057] already working on '/block/sdb'
06:58:42 delayed_moveto_queue: move event to delayed queue '/block/sdb'
06:58:42 msg_exec: child [8063] created
06:58:42 running_moveto_queue: move sequence 14 [8063] to running queue '/block/sdb'
06:58:42 msg_dump: sequence 15, 'add', '/block/sdc', 'block'
06:58:42 msg_exec: delay exec of sequence 15, [8058] already working on '/block/sdc'
06:58:42 delayed_moveto_queue: move event to delayed queue '/block/sdc'
06:58:42 msg_exec: child [8064] created
06:58:42 running_moveto_queue: move sequence 15 [8064] to running queue '/block/sdc'
06:58:43 sig_handler: caught signal 17
06:58:43 sig_handler: exec finished, pid 8057
06:58:43 sig_handler: exec finished, pid 8058
06:58:43 sig_handler: caught signal 17
06:58:43 sig_handler: exec finished, pid 8059
06:58:43 sig_handler: caught signal 17
06:58:43 sig_handler: exec finished, pid 8060
06:58:43 sig_handler: exec finished, pid 8061
06:58:43 sig_handler: caught signal 17
06:58:43 sig_handler: exec finished, pid 8062
06:58:43 sig_handler: caught signal 17
06:58:43 sig_handler: exec finished, pid 8063
06:58:43 sig_handler: caught signal 17
06:58:43 sig_handler: exec finished, pid 8064

18 years ago[PATCH] fix Makefile typo for USE_LSB install.
greg@kroah.com [Wed, 28 Jan 2004 02:54:24 +0000 (18:54 -0800)] 
[PATCH] fix Makefile typo for USE_LSB install.

Thanks to Martin Schwenke <martin@meltin.net> for pointing this out.

18 years ago[PATCH] udevinfo - missing options for man page
kay.sievers@vrfy.org [Tue, 27 Jan 2004 08:40:14 +0000 (00:40 -0800)] 
[PATCH] udevinfo - missing options for man page

Here are the missing udevinfo options for the new man page.

18 years ago[PATCH] udev - trivial style cleanup
kay.sievers@vrfy.org [Tue, 27 Jan 2004 08:40:12 +0000 (00:40 -0800)] 
[PATCH] udev - trivial style cleanup

Trivial style cleanup, to be consistent.

And add chdir("/") to the daemon so one can umout its filesystem,
while we are running :)

18 years ago[PATCH] 015_bk mark
greg@kroah.com [Tue, 27 Jan 2004 08:40:06 +0000 (00:40 -0800)] 
[PATCH] 015_bk mark

18 years ago[PATCH] allow dbus code to actually build again.
greg@kroah.com [Tue, 27 Jan 2004 07:54:46 +0000 (23:54 -0800)] 
[PATCH] allow dbus code to actually build again.

18 years ago[PATCH] v015 release 015
greg@kroah.com [Tue, 27 Jan 2004 04:23:55 +0000 (20:23 -0800)] 
[PATCH] v015 release

18 years ago[PATCH] update klibc to version 0.98
greg@kroah.com [Tue, 27 Jan 2004 04:17:10 +0000 (20:17 -0800)] 
[PATCH] update klibc to version 0.98

18 years ago[PATCH] clean up udevinfo on 'make clean'
greg@kroah.com [Tue, 27 Jan 2004 04:04:26 +0000 (20:04 -0800)] 
[PATCH] clean up udevinfo on 'make clean'

18 years ago[PATCH] add udevinfo man page to spec file.
greg@kroah.com [Tue, 27 Jan 2004 03:56:59 +0000 (19:56 -0800)] 
[PATCH] add udevinfo man page to spec file.

18 years ago[PATCH] remove command line documentation from udev man page
greg@kroah.com [Tue, 27 Jan 2004 03:56:43 +0000 (19:56 -0800)] 
[PATCH] remove command line documentation from udev man page

18 years ago[PATCH] create initial version of udevinfo man page.
greg@kroah.com [Tue, 27 Jan 2004 03:56:19 +0000 (19:56 -0800)] 
[PATCH] create initial version of udevinfo man page.

18 years ago[PATCH] added URL to spec file.
greg@kroah.com [Tue, 27 Jan 2004 03:41:00 +0000 (19:41 -0800)] 
[PATCH] added URL to spec file.

18 years ago[PATCH] add udevinfo to udev.spec file.
greg@kroah.com [Tue, 27 Jan 2004 03:32:57 +0000 (19:32 -0800)] 
[PATCH] add udevinfo to udev.spec file.

18 years ago[PATCH] add udevinfo to install target of Makefile
greg@kroah.com [Tue, 27 Jan 2004 03:32:01 +0000 (19:32 -0800)] 
[PATCH] add udevinfo to install target of Makefile

18 years ago[PATCH] rip out command line code from udev, now that we have udevinfo.
greg@kroah.com [Tue, 27 Jan 2004 03:23:11 +0000 (19:23 -0800)] 
[PATCH] rip out command line code from udev, now that we have udevinfo.

18 years ago[PATCH] udevinfo doesn't need to declare main_envp
greg@kroah.com [Tue, 27 Jan 2004 03:22:31 +0000 (19:22 -0800)] 
[PATCH] udevinfo doesn't need to declare main_envp

18 years ago[PATCH] move get_pair to udev_config.c because udevinfo doesn't need all of namedev.o
greg@kroah.com [Tue, 27 Jan 2004 03:21:58 +0000 (19:21 -0800)] 
[PATCH] move get_pair to udev_config.c because udevinfo doesn't need all of namedev.o

18 years ago[PATCH] more makefile cleanups
greg@kroah.com [Tue, 27 Jan 2004 03:21:12 +0000 (19:21 -0800)] 
[PATCH] more makefile cleanups

18 years ago[PATCH] move udevinfo into the main build and clean up the main Makefile a bit.
greg@kroah.com [Tue, 27 Jan 2004 02:55:37 +0000 (18:55 -0800)] 
[PATCH] move udevinfo into the main build and clean up the main Makefile a bit.

18 years ago[PATCH] udevinfo - now a real program :)
kay.sievers@vrfy.org [Tue, 27 Jan 2004 02:20:12 +0000 (18:20 -0800)] 
[PATCH] udevinfo - now a real program :)

I want to make udevinfo the standard query interface, so all the user
features of the main udev are copied in here. It is now capable to:

  o query the database for a given value
  o dump the whole database
  o extract all possible device attributes for a sysfs_device

In addition to the known options of udev it supports the query for the
mode of the device node, and it includes the mode in the database dump:

  udevinfo -d
  P: /class/video4linux/video0
  N: video/webcam0
  M: 0666
  S: camera0 kamera0
  O: 500
  G: 500

It is also a bit more friendly with the pathnames specified for devices or nodes.
We remove the absolute path or add it if neccessary:

  udevinfo -q mode -n video/webcam0
  udevinfo -q mode -n /udev/video/webcam0
  0666

  udevinfo -q mode -p /sys/class/video4linux/video0
  udevinfo -q mode -p /class/video4linux/video0
  udevinfo -q mode -p class/video4linux/video0
  0666

18 years ago[PATCH] udevd - cleanup and better timeout handling
kay.sievers@vrfy.org [Tue, 27 Jan 2004 02:19:33 +0000 (18:19 -0800)] 
[PATCH] udevd - cleanup and better timeout handling

Here is the next revision for udevd:
  o Small cleanups all over the place.
  o Swich to the usual linked list format "list.h".
  o Better timeout handling.
      We store a timestamp in in every queued event, so we don't wait longer
      than the timeout specified, if the hole in the list is not shrinking.
  o ignore udevd target if klibc is used

18 years ago[PATCH] clean up compiler warnings if building using klibc.
greg@kroah.com [Tue, 27 Jan 2004 02:10:53 +0000 (18:10 -0800)] 
[PATCH] clean up compiler warnings if building using klibc.

18 years ago[PATCH] LFS init script update
mbuesch@freenet.de [Sat, 24 Jan 2004 06:54:55 +0000 (22:54 -0800)] 
[PATCH] LFS init script update

18 years ago[PATCH] make udevd only have one instance running at a time
greg@kroah.com [Sat, 24 Jan 2004 06:26:19 +0000 (22:26 -0800)] 
[PATCH] make udevd only have one instance running at a time

it used a file lock right now.  need to put that lock in the udev directory,
it's in the current directory, which isn't a good thing...

18 years ago[PATCH] new testd.block script for debugging.
greg@kroah.com [Sat, 24 Jan 2004 06:25:24 +0000 (22:25 -0800)] 
[PATCH] new testd.block script for debugging.

18 years ago[PATCH] udevsnd : clean up message creation logic a bit.
greg@kroah.com [Sat, 24 Jan 2004 05:43:37 +0000 (21:43 -0800)] 
[PATCH] udevsnd : clean up message creation logic a bit.

18 years ago[PATCH] udev - next round of udev event order daemon
kay.sievers@vrfy.org [Sat, 24 Jan 2004 05:25:17 +0000 (21:25 -0800)] 
[PATCH] udev - next round of udev event order daemon

Here is the next round of udevd/udevsend:

udevsend - If the IPC message we send is not catched by a receiver we fork
           the udevd daemon to process this and the following events

udevd    - We reorder the events we receive and execute our current udev for
           every event. If one or more events are missing, we wait
           10 seconds and then go ahead in the queue.
           If the queue is empty and we don't receive any event for the next
           30 seconds, the daemon exits.
           The next incoming event will fork the daemon again.

config   - The path's to the executable are specified in udevd.h
           Now they are pointing to the current directory only.

I don't like daemons hiding secrets (and mem leaks :)) inside,
so I want to try this model. It should be enough logic to get all possible
hotplug events executed in the right order.

If no event, then no daemon! So everybody should be happy :)

Here we see:
  1. the daemon fork,
  2. the udev work,
  3. the 10 sec timeout and the skipped events,
  4. the udev work,
     ...,
  5. and the 30 sec timeout and exit.

EVENTS:
  pim:/home/kay/src/udev.kay# test/udevd_test.sh
  pim:/home/kay/src/udev.kay# SEQNUM=15 ./udevsend block
  pim:/home/kay/src/udev.kay# SEQNUM=16 ./udevsend block
  pim:/home/kay/src/udev.kay# SEQNUM=17 ./udevsend block
  pim:/home/kay/src/udev.kay# SEQNUM=18 ./udevsend block
  pim:/home/kay/src/udev.kay# SEQNUM=20 ./udevsend block
  pim:/home/kay/src/udev.kay# SEQNUM=21 ./udevsend block

LOG:
  Jan 23 15:35:35 pim udev[11795]: message is still in the ipc queue, starting daemon...
  Jan 23 15:35:35 pim udev[11799]: configured rule in '/etc/udev/udev.rules' at line 19 applied, 'sda' becomes '%k-flash'
  Jan 23 15:35:35 pim udev[11799]: creating device node '/udev/sda-flash'
  Jan 23 15:35:35 pim udev[11800]: creating device node '/udev/sdb'
  Jan 23 15:35:35 pim udev[11804]: creating device node '/udev/sdc'
  Jan 23 15:35:35 pim udev[11805]: removing device node '/udev/sda-flash'
  Jan 23 15:35:35 pim udev[11808]: removing device node '/udev/sdb'
  Jan 23 15:35:35 pim udev[11809]: removing device node '/udev/sdc'
  Jan 23 15:35:45 pim udev[11797]: timeout reached, skip events 7 - 7
  Jan 23 15:35:45 pim udev[11811]: creating device node '/udev/sdb'
  Jan 23 15:35:45 pim udev[11812]: creating device node '/udev/sdc'
  Jan 23 15:36:01 pim udev[11797]: timeout reached, skip events 10 - 14
  Jan 23 15:36:01 pim udev[11814]: creating device node '/udev/sdc'
  Jan 23 15:36:04 pim udev[11816]: creating device node '/udev/sdc'
  Jan 23 15:36:12 pim udev[11818]: creating device node '/udev/sdc'
  Jan 23 15:36:16 pim udev[11820]: creating device node '/udev/sdc'
  Jan 23 15:36:38 pim udev[11797]: timeout reached, skip events 19 - 19
  Jan 23 15:36:38 pim udev[11823]: creating device node '/udev/sdc'
  Jan 23 15:36:38 pim udev[11824]: creating device node '/udev/sdc'
  Jan 23 15:37:08 pim udev[11797]: we have nothing to do, so daemon exits...

18 years ago[PATCH] fix udevd exec
kay.sievers@vrfy.org [Fri, 23 Jan 2004 12:01:09 +0000 (04:01 -0800)] 
[PATCH] fix udevd exec

Sorry, some code is missing.
Here is a fix to make the exec functional.

18 years ago[PATCH] udev - udevinfo with device chain walk
kay.sievers@vrfy.org [Fri, 23 Jan 2004 11:01:02 +0000 (03:01 -0800)] 
[PATCH] udev - udevinfo with device chain walk

udevinfo is now capable to print "all" attributes along the device chain
of a sysfs device. Just like udev itself it walks the chain upwards and
prints all usable attributes in the udev key format.
So it should be easy to find unique attributes to compose a rule.

All multiline attribute values and values containing non printable
characters are skipped now. I hope nothing useful gets lost with this :)

NOTE:
  The BUS value corresponding with the attributes is printed for every
  device. Don't specify BUS= in a rule and mix SYSFS_attributes from
  different busses, the rule can't match.

./udevinfo /sys/block/sda/sda1

device '/sys/block/sda/sda1' has major:minor 8:1
  looking at class device '/sys/block/sda/sda1':
    SYSFS_dev="8:1"
    SYSFS_start="32"
    SYSFS_size="160"
    SYSFS_stat="       0        0        0        0"

follow the class device's "device"
  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.3/1-1.3:1.0/host32/32:0:0:0':
    BUS="scsi"
    ID="32:0:0:0"
    SYSFS_detach_state="0"
    SYSFS_type="0"
    SYSFS_model="USB 2 HS-CF"
    SYSFS_vendor="SMSC    "
    SYSFS_max_sectors="240"
    SYSFS_device_blocked="0"
    SYSFS_queue_depth="1"
    SYSFS_scsi_level="3"
    SYSFS_rev="1.25"
    SYSFS_online="1"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.3/1-1.3:1.0/host32':
    BUS=""
    ID="host32"
    SYSFS_detach_state="0"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.3/1-1.3:1.0':
    BUS="usb"
    ID="1-1.3:1.0"
    SYSFS_detach_state="0"
    SYSFS_bInterfaceNumber="00"
    SYSFS_bAlternateSetting=" 0"
    SYSFS_bNumEndpoints="02"
    SYSFS_bInterfaceClass="08"
    SYSFS_bInterfaceSubClass="06"
    SYSFS_bInterfaceProtocol="50"
    SYSFS_iInterface="00"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1/1-1.3':
    BUS="usb"
    ID="1-1.3"
    SYSFS_detach_state="0"
    SYSFS_bNumConfigurations="1"
    SYSFS_bNumInterfaces=" 1"
    SYSFS_bConfigurationValue="1"
    SYSFS_bmAttributes="80"
    SYSFS_bMaxPower=" 96mA"
    SYSFS_idVendor="0424"
    SYSFS_idProduct="20fc"
    SYSFS_bcdDevice="0125"
    SYSFS_bDeviceClass="00"
    SYSFS_bDeviceSubClass="00"
    SYSFS_bDeviceProtocol="00"
    SYSFS_speed="12"
    SYSFS_manufacturer="SMSC"
    SYSFS_product="USB 2 Flash Media Device"
    SYSFS_serial="0305037000C2"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1/1-1':
    BUS="usb"
    ID="1-1"
    SYSFS_detach_state="0"
    SYSFS_bNumConfigurations="1"
    SYSFS_bNumInterfaces=" 1"
    SYSFS_bConfigurationValue="1"
    SYSFS_bmAttributes="e0"
    SYSFS_bMaxPower=" 64mA"
    SYSFS_idVendor="03eb"
    SYSFS_idProduct="3301"
    SYSFS_bcdDevice="0300"
    SYSFS_bDeviceClass="09"
    SYSFS_bDeviceSubClass="00"
    SYSFS_bDeviceProtocol="00"
    SYSFS_speed="12"
    SYSFS_product="Standard USB Hub"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0/usb1':
    BUS="usb"
    ID="usb1"
    SYSFS_detach_state="0"
    SYSFS_bNumConfigurations="1"
    SYSFS_bNumInterfaces=" 1"
    SYSFS_bConfigurationValue="1"
    SYSFS_bmAttributes="40"
    SYSFS_bMaxPower="  0mA"
    SYSFS_idVendor="0000"
    SYSFS_idProduct="0000"
    SYSFS_bcdDevice="0206"
    SYSFS_bDeviceClass="09"
    SYSFS_bDeviceSubClass="00"
    SYSFS_bDeviceProtocol="00"
    SYSFS_speed="12"
    SYSFS_manufacturer="Linux 2.6.2-rc1-p4 uhci_hcd"
    SYSFS_product="UHCI Host Controller"
    SYSFS_serial="0000:00:1d.0"

  looking at the device chain at '/sys/devices/pci0000:00/0000:00:1d.0':
    BUS="pci"
    ID="0000:00:1d.0"
    SYSFS_detach_state="0"
    SYSFS_vendor="0x8086"
    SYSFS_device="0x2482"
    SYSFS_subsystem_vendor="0x1014"
    SYSFS_subsystem_device="0x0220"
    SYSFS_class="0x0c0300"
    SYSFS_irq="9"

  looking at the device chain at '/sys/devices/pci0000:00':
    BUS=""
    ID="pci0000:00"
    SYSFS_detach_state="0"

18 years ago[PATCH] whitespace cleanups
greg@kroah.com [Fri, 23 Jan 2004 09:51:06 +0000 (01:51 -0800)] 
[PATCH] whitespace cleanups

18 years ago[PATCH] spilt udev into pieces
kay.sievers@vrfy.org [Fri, 23 Jan 2004 08:28:57 +0000 (00:28 -0800)] 
[PATCH] spilt udev into pieces

On Thu, Jan 22, 2004 at 01:27:45AM +0100, Kay Sievers wrote:
> On Wed, Jan 21, 2004 at 02:38:25PM +0100, Kay Sievers wrote:
> > On Thu, Jan 15, 2004 at 01:45:10PM -0800, Greg KH wrote:
> > > On Thu, Jan 15, 2004 at 10:36:25PM +0800, Ling, Xiaofeng wrote:
> > > > Hi, Greg
> > > >    I wrote a simple implementation for the two pieces
> > > > of send and receive hotplug event,
> > > > use a message queue and a list for the out of order
> > > >  hotplug event. It also has a timeout timer of 3 seconds.
> > > >  They are now separate program. the file nseq is the test script.
> > > >  Could you have a look to see wether it is feasible?
> > > > If so, I'll continue to merge with udev.
> > >
> > > Yes, very nice start.  Please continue on.
> > >
> > > One minor comment, please stick with the kernel coding style when you
> > > are writing new code for udev.
> >
> > I took the code from Xiaofeng, cleaned the whitespace, renamed some bits,
> > tweaked the debugging, added the udev exec and created a patch for the current tree.
> >
> > It seems functional now, by simply executing our current udev (dirty hack).
> > It reorders the incoming events and if one is missing it delays the
> > execution of the following ones up to a maximum of 10 seconds.
> >
> > Test script is included, but you can't mix hotplug sequence numbers and
> > test script numbers, it will result in waiting for the missing numbers :)
>
> Hey, nobody want's to play with me?
> So here I'm chatting with myself :)
>
> This is the next version with signal handling for resetting the expected
> signal number. I changed the behaviour of the timeout to skip all
> missing events at once and to proceed with the next event in the queue.
>
> So it's now possible to use the test script at any time, cause it resets
> the daemon, if real hotplug event coming in later all missing nimbers will
> be skipped after a timeout of 10 seconds and the queued events are applied.

Here is the next updated updated version to apply to the lastet udev.
I've added infrastructure for getting the state of the IPC queue in the
sender and set the program to exec by the daemon. Also the magic key id
is replaced by the usual key generation by path/nr.

It looks promising, I use it on my machine and my 4in1 USB-flash-reader
connect/disconnect emits the events "randomly" but udevd is able to
reorder it and calls our normal udev in the right order.

18 years ago[PATCH] remove TODO item about BUS value, as it is now done.
greg@kroah.com [Fri, 23 Jan 2004 08:22:17 +0000 (00:22 -0800)] 
[PATCH] remove TODO item about BUS value, as it is now done.

18 years ago[PATCH] add support for figuring out which device on the sysfs "chain" the rule appli...
greg@kroah.com [Fri, 23 Jan 2004 08:21:13 +0000 (00:21 -0800)] 
[PATCH] add support for figuring out which device on the sysfs "chain" the rule applies to.

This should fix one of the more annoying things to me about udev, and
gets rid of a TODO item.

18 years ago[PATCH] 014_bk mark
greg@kroah.com [Fri, 23 Jan 2004 05:04:54 +0000 (21:04 -0800)] 
[PATCH] 014_bk mark

18 years ago[PATCH] 014 release 014
greg@kroah.com [Thu, 22 Jan 2004 09:06:18 +0000 (01:06 -0800)] 
[PATCH] 014 release

18 years ago[PATCH] misc code cleanups.
greg@kroah.com [Thu, 22 Jan 2004 08:54:52 +0000 (00:54 -0800)] 
[PATCH] misc code cleanups.

18 years ago[PATCH] udev-013/extras/multipath update
christophe.varoqui@free.fr [Thu, 22 Jan 2004 08:16:28 +0000 (00:16 -0800)] 
[PATCH] udev-013/extras/multipath update

incremental to 0.0.13,

* update the DM target synthax to the 2.6.0-udm5 style
* update the changelog and the doc to reflect minimal requirements

18 years ago[PATCH] fixup logging.h to handle different logging options properly.
greg@kroah.com [Tue, 20 Jan 2004 04:41:14 +0000 (20:41 -0800)] 
[PATCH] fixup logging.h to handle different logging options properly.

Thanks to Olaf Hering <olh@suse.de> for the error message.

18 years ago[PATCH] udev - program to query all device attributes to build a rule
kay.sievers@vrfy.org [Tue, 20 Jan 2004 03:46:26 +0000 (19:46 -0800)] 
[PATCH] udev - program to query all device attributes to build a rule

On Sun, Jan 18, 2004 at 07:30:50AM +0100, Kay Sievers wrote:
> Hi,
> here is a small program to query all attributes of a device and
> print these in the udev key format. It may help to get the keys to
> define a rule.

Fixed a typo - the sysfs_device is right now.

USB FLash Reader:
    kay@pim:~/src/udev.kay$ extras/udevinfo/udevinfo /sys/block/sda/sda1

    device '/sys/block/sda/sda1' has major:minor 8:1

    looking at class device '/sys/block/sda/sda1':
      SYSFS_dev="8:1"
      SYSFS_start="32"
      SYSFS_size="160"
      SYSFS_stat="       0        0        0        0"

    follow class device's "device" link '/sys/block/sda':
      BUS="scsi"
      ID="57:0:0:0"
      SYSFS_detach_state="0"
      SYSFS_type="0"
      SYSFS_device_blocked="0"
      SYSFS_queue_depth="1"
      SYSFS_scsi_level="3"
      SYSFS_vendor="SMSC    "
      SYSFS_model="USB 2 HS-CF"
      SYSFS_rev="1.25"
      SYSFS_online="1"