Commit Graph

539 Commits

Author SHA1 Message Date
greg@kroah.com
e68582be4a [PATCH] update the udev.spec to add udevtest and make some more Red Hat suggested changes. 2005-04-26 21:32:28 -07:00
greg@kroah.com
aa3400ae6d [PATCH] add ability to install udevtest to Makefile 2005-04-26 21:32:28 -07:00
greg@kroah.com
58b030657a [PATCH] 017_bk mark 2005-04-26 21:32:27 -07:00
greg@kroah.com
b9fc973b9a [PATCH] Add another test to udev-test.pl and fix a bug when only running 1 test. 2005-04-26 21:32:27 -07:00
greg@kroah.com
7a4877bf6f [PATCH] Fix bug where we did not use the "converted" kernel name if we had no rule.
This fixes the bug with names that have a ! in them and no rule to match.
2005-04-26 21:32:27 -07:00
greg@kroah.com
44a523e30d [PATCH] v017 release 2005-04-26 21:32:27 -07:00
christophe.varoqui@free.fr
09b7985cf6 [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
2005-04-26 21:32:27 -07:00
christophe.varoqui@free.fr
cbb576b91d [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 ?
2005-04-26 21:32:27 -07:00
greg@kroah.com
0c040e8d7c [PATCH] add udev_log to the documentation. 2005-04-26 21:32:27 -07:00
greg@kroah.com
89c941084f [PATCH] fix offsetof() define in klibc. 2005-04-26 21:32:27 -07:00
greg@kroah.com
1659326d72 [PATCH] add some .spec file changes from Red Hat. 2005-04-26 21:32:27 -07:00
greg@kroah.com
1a3b802ff2 [PATCH] update the init.d udev script based on a patch from Red Hat. 2005-04-26 21:32:27 -07:00
greg@kroah.com
552a4d426f [PATCH] remove the .udev.tdb when installing or uninstalling to be safe. 2005-04-26 21:32:27 -07:00
greg@kroah.com
66a9021760 [PATCH] remove the database at startup. 2005-04-26 21:32:27 -07:00
kay.sievers@vrfy.org
00866ed2a1 [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.
2005-04-26 21:32:27 -07:00
greg@kroah.com
ba053b91e1 [PATCH] fix bug in permission handling. 2005-04-26 21:32:27 -07:00
greg@kroah.com
5a98bc58e4 [PATCH] update klibc to version .107 2005-04-26 21:32:27 -07:00
greg@kroah.com
eb10f97f28 [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.
2005-04-26 21:32:27 -07:00
greg@kroah.com
bb051f6657 [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
2005-04-26 21:32:27 -07:00
greg@kroah.com
d026a35d74 [PATCH] more logging.h cleanups to be a bit more flexible. 2005-04-26 21:32:27 -07:00
greg@kroah.com
d45ea2b70c [PATCH] stop using mode_t as different libcs define it in different ways :( 2005-04-26 21:32:27 -07:00
patmans@us.ibm.com
3a8c51a771 [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"
2005-04-26 21:32:26 -07:00
patmans@us.ibm.com
5a42932b9a [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"
2005-04-26 21:32:26 -07:00
kay.sievers@vrfy.org
7b1cbec91a [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.
2005-04-26 21:32:26 -07:00
greg@kroah.com
ede4308a80 [PATCH] remove some more KLIBC fixups that are no longer needed. 2005-04-26 21:32:26 -07:00
greg@kroah.com
2e31718495 [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.
2005-04-26 21:32:26 -07:00
greg@kroah.com
1b9410278e [PATCH] Handle the '!' character that some block devices have. 2005-04-26 21:32:26 -07:00
greg@kroah.com
f0142622b8 [PATCH] add a block device with a ! in the name, and a test for this. 2005-04-26 21:32:26 -07:00
greg@kroah.com
e9b2679f42 [PATCH] fix up 'make release' to use bk to build the export tree. 2005-04-26 21:32:26 -07:00
kay.sievers@vrfy.org
0028653cdf [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 :)
2005-04-26 21:32:26 -07:00
kay.sievers@vrfy.org
f8911dbb04 [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.
2005-04-26 21:32:26 -07:00
kay.sievers@vrfy.org
c5118442a1 [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().
2005-04-26 21:32:26 -07:00
kay.sievers@vrfy.org
0c25b2066d [PATCH] udev - fix cdrom symlink rule
We only need to look at the device, not at the partitions.
2005-04-26 21:32:26 -07:00
greg@kroah.com
51a8bb2f36 [PATCH] fix log option code so that it actually works for all udev programs.
Also introduce boolean type for config file to use.
2005-04-26 21:32:26 -07:00
azarah@nosferatu.za.org
4d803d8d04 [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.
2005-04-26 21:32:26 -07:00
greg@kroah.com
da92f46b9e [PATCH] finish syncing up with klibc 2005-04-26 21:32:26 -07:00
greg@kroah.com
01504bd96b [PATCH] sync with latest version of klibc (0.107) 2005-04-26 21:32:26 -07:00
kay.sievers@vrfy.org
2f6cbd1911 [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.
2005-04-26 21:32:26 -07:00
kay.sievers@vrfy.org
d2cf99df7d [PATCH] udevd - kill the lockfile 2005-04-26 21:32:26 -07:00
christophe.varoqui@free.fr
aca29aa51f [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}'
2005-04-26 21:32:25 -07:00
kay.sievers@vrfy.org
1dadabd79b [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.
2005-04-26 21:32:25 -07:00
kay.sievers@vrfy.org
872344c410 [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)
2005-04-26 21:32:25 -07:00
kay.sievers@vrfy.org
86590cd590 [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.
2005-04-26 21:32:25 -07:00
greg@kroah.com
16be132889 [PATCH] 016_bk mark 2005-04-26 21:32:25 -07:00
kay.sievers@vrfy.org
e5369f0a3a [PATCH] include used function
This includes the missing header for the use of getpid in logging.h.
2005-04-26 21:32:25 -07:00
greg@kroah.com
1dc10a94d8 [PATCH] fix up Makefile dependancies for udev_version.h 2005-04-26 21:32:25 -07:00
greg@kroah.com
3368981236 [PATCH] v016 release 2005-04-26 21:32:25 -07:00
greg@kroah.com
d83a9b89e7 [PATCH] add udevd and udevsend to the spec file. 2005-04-26 21:32:25 -07:00
greg@kroah.com
db8f5cf28c [PATCH] make /etc/hotplug.d/default/udev.hotplug symlink point to udevsend now. 2005-04-26 21:32:25 -07:00
greg@kroah.com
977083c253 [PATCH] add KERNEL_DIR option so that the distros will be happy
Based on a patch from Svetoslav Slavtchev <svetljo@gmx.de>
2005-04-26 21:32:25 -07:00