Commit graph

20 commits

Author SHA1 Message Date
Kay Sievers 27f877e60f allow logging of all output from executed tools
If USE_DEBUG=true and udev_log="debug", all output of the forked
programs to stdout and stderr is send to syslog.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-11 17:32:59 +02:00
Kay Sievers d455b0085d allow RUN to send the environment to a local socket
RUN="socket:<name>" will send the environment in the kernel uevent
format to the named destination. Using the socket instead of the program
to pass the hotplug events to the HAL daemon, cuts down the running
time of udevstart from 0.8 to 0.4 seconds on my box.

  env -i ACTION=add DEVPATH=/block/hda/hda1 strace -s10000 ./udev block
  sendto(3, "add@/block/hda/hda1\0
    ACTION=add\0DEVPATH=/block/hda/hda1\0UDEV_LOG=3\0
    ID_TYPE=disk\0ID_MODEL=HTS726060M9AT00\0ID_SERIAL=MRH401M4G6UM9B\0
    ID_REVISION=MH4OA6BA\0ID_BUS=ata\0ID_PATH=pci-0000:00:1f.1-ide-0:0\0
    ID_FS_USAGE=other\0ID_FS_TYPE=swap\0ID_FS_VERSION=2\0
    ID_FS_UUID=9352cfef-7687-47bc-a2a3-34cf136f72e1\0
    ID_FS_LABEL=ThisIsSwap\0ID_FS_LABEL_SAFE=ThisIsSwap\0
    DEVNAME=/dev/hda1\0"

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-01 05:07:19 +02:00
Kay Sievers e8d569b414 move code to its own files
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-22 12:35:58 -04:00
Kay Sievers b8476286d6 store the imported device information in the udevdb
Any program can query with udevinfo for persistent device
attributes evaluated on device discovery now.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-26 18:55:24 +02:00
Kay Sievers be4bedd16b unify execute_command() and execute_program()
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-25 15:35:14 +02:00
Kay Sievers 6bf0ffe8fd allow rules to be compiled to one binary file
All the rule files can be compiled into a single file,
which can be mapped into the udev process to avoid parsing
the rules with every event.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-24 18:05:32 +02:00
Kay Sievers 6a522681e1 udev: move dev.d/ handling to external helper
Modern rules are expected to call notification and postprocessing with    
the RUN key. For compatibility the current behavior can be emulated
with an external helper.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05 05:11:29 +02:00
kay.sievers@vrfy.org fb39f0566e [PATCH] move execute_program to utils + add action to init_device 2005-04-26 23:55:00 -07:00
kay.sievers@vrfy.org 18614ab25d [PATCH] remove untrusted chars read from sysfs-values or returned by PROGRAM
Better remove characters that are useless in a device node name.
It may be a security risk to pass any character read from e.g. a
sysfs attribute to a shell script we execute later.
  
Prevent the modification of the libsysfs attribute value
cache.

Clear PROGRAM result if the execution encountered an error.
2005-04-26 23:54:59 -07:00
kay.sievers@vrfy.org 67747e1de3 [PATCH] change call_foreach_file to return a list 2005-04-26 23:53:53 -07:00
kay.sievers@vrfy.org 63f61c5cf6 [PATCH] replace strncpy()/strncat() by strlcpy()/strlcat() 2005-04-26 23:51:00 -07:00
kay.sievers@vrfy.org 03fd7a3ad3 [PATCH] replace weird defines by real code 2005-04-26 23:48:48 -07:00
kay.sievers@vrfy.org e48fc108d9 [PATCH] allow unlimitied count of symlinks 2005-04-26 23:48:48 -07:00
kay.sievers@vrfy.org f0308095c7 [PATCH] remove typedef for call_foreach_file() handler function 2005-04-26 23:39:48 -07:00
kay.sievers@vrfy.org 9ed47a9f21 [PATCH] move kernel name/number evaluation into udev_init_device() 2005-04-26 23:36:13 -07:00
kay.sievers@vrfy.org c1ab046124 [PATCH] provide temporary device node for callouts to access the device
%N will create a temporary node for a callout a be sustituted with the
name of the node.
2005-04-26 23:27:32 -07:00
mbuesch@freenet.de 85925517e6 [PATCH] trivial: fix signedness
We are already using %u in the sscanf() format string.
The patch replaces the int for the kernel release number with
unsigned int, as we can never have negative release numbers.
2005-04-26 23:24:20 -07:00
kay.sievers@vrfy.org 9f8dfa19cf [PATCH] allow multiline rules by backslash at the end of the line
On Sun, 2004-12-19 at 18:31 +0100, Marco d'Itri wrote:
> > On Dec 19, Kay Sievers <kay.sievers@vrfy.org> wrote:
> 
> > (Feature request: would it be possible to extend the rules files parser
> > to support continuation lines? I'd like it to consider lines starting
> > with white space as part of the previous line.)
> 
> How about the usual backslash at the end of the line. Here is a simple
> patch.
2005-04-26 23:19:09 -07:00
kay.sievers@vrfy.org 45a7b668ec [PATCH] remove unused variables
Remove udev.bus, cause it's currently unused and newer kernels will pass
it in the hotplug environment as PHYSDEVBUS.

Remove udev.action, cause it's unused.

Rename udev_set_values() to udev_init_device().
2005-04-26 23:00:29 -07:00
kay.sievers@vrfy.org 9af5bb2f8f [PATCH] rename udev_lib to udev_utils and dev_d to udev_multiplex 2005-04-26 22:44:02 -07:00
Renamed from udev_lib.h (Browse further)