1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-06 08:26:52 +03:00
Commit Graph

823 Commits

Author SHA1 Message Date
kay.sievers@vrfy.org
cb7c281b8d [PATCH] let /sbin/hotplug execute udev earlier
We ran into problems with all the /etc/hotplug.d/ scripts that sleep for
the sysfs files or for other reasons. Anyway, it takes much too much time
before udev is executed.
HAL has its own notifier in /etc/hotplug.d/ and also waits for the
dev.d/events with the same SEQNUM. Sometimes it take 25 seconds between
these two events, cause the other scripts are sleeping too much :)

Attached is a patch that installs the udevsend symlink as
10-udev.hotplug instead of udev.hotplug, to be executed earlier.

[kay@pim udev.kay]$ tree /etc/hotplug.d/
/etc/hotplug.d/
`-- default
    |-- 10-udev.hotplug -> /sbin/udevsend
    |-- 20-hal.hotplug -> /usr/libexec/hal.hotplug
    `-- default.hotplug
2005-04-26 21:37:00 -07:00
kay.sievers@vrfy.org
3169e8d1ee [PATCH] pass SEQNUM trough udevd
here we change udevd to pass the SEQNUM from the hotplug environment
to udev and the dev.d/ scripts. We need this for HAL to match the
hotplug event with the dev.d/ events.

It also changes the type from int to long to match the kernel.
2005-04-26 21:37:00 -07:00
greg@kroah.com
00d063985a [PATCH] Fix old-style pty breakage in rules file for tty device.
Thanks to Martin Schlemmer <azarah@nosferatu.za.org> for the fix.
2005-04-26 21:37:00 -07:00
greg@kroah.com
c449ee6f7f [PATCH] add rules for i386 cpu devices. 2005-04-26 21:37:00 -07:00
greg@kroah.com
bf9c357633 [PATCH] add permission for legotower usb devices. 2005-04-26 21:36:59 -07:00
kay.sievers@vrfy.org
9d00984375 [PATCH] fix manpages based on esr's spambot
On Mon, Jul 12, 2004 at 11:14:28AM -0400, esr@thyrsus.com wrote:
> This is automatically generated email about problems in a man page for which
> you appear to be responsible.  If you are not the right person or list, tell
> me and I will attempt to correct my database.
>
> See http://catb.org/~esr/doclifter/problems.html for details on how and
> why these patches were generated.  Feel free to email me with any questions.
>
> Note: This patch does not change the mod date of the manual page.  You
> may wish to do that by hand.
>
> Problems with udevd.8:
>
> 1. There are multiple name lines.  This makes it impossible to translate
> the page to DocBook.  It may also confuse some implementations
> of man -k.
>
> --- udevd.8-orig	2004-07-10 06:35:12.032545856 -0400
> +++ udevd.8	2004-07-10 06:36:19.301319448 -0400
> @@ -1,8 +1,6 @@
>  .TH UDEVD 8 "February 2004" "" "Linux Administrator's Manual"
>  .SH NAME
> -udevd \- udev event serializer daemon
> -.br
> -udevsend \- sends the event to udevd
> +udevd, udevdsend \- udev event serializer daemon and udev event sender
>  .SH SYNOPSIS
> --
>                              Eric S. Raymond
>

Thanks Eric, udevsend.8 is only a symlink to udevd.8, so I attached a
stripped down patch to this mail.
2005-04-26 21:36:59 -07:00
tao@kernel.org
b9e3301c3b [PATCH] Minor POSIX-fixes for udev
The attached patch contains a few patches against udev, to remove
use of various XSI:isms and bash:isms, and to change two scripts form
/bin/bash to /bin/sh.  None of the bash-scripts in test/ uses any
bash-specific functions as far as I know, but I didn't touch them since
they aren't used runtime.

Rationale:
* Both of the /bin/bash-scripts are totally free from bashisms, hence they
  don't need to be /bin/bash; using /bin/sh instead helps (mainly)
  embedded-people

* local and source are bash:isms (well, they exist in several other
  shells as well, but they aren't part of POSIX or any of its extensions)

* -a in tests is an XSI-extension, not part of strict POSIX, and is
  easily replaced by &&
  | http://www.opengroup.org/onlinepubs/009695399/utilities/test.html

* Use of fgrep is deprecated in POSIX in favour of grep -F (though fgrep
  will remain in use for a long time...)
  | http://www.opengroup.org/onlinepubs/009695399/utilities/grep.html

The fgrep-change isn't really necessary, since fgrep can always be
implemented as a shell-script, but the rest of the changes would really
be appreciated.
2005-04-26 21:36:59 -07:00
trini@kernel.crashing.org
2410242aa4 [PATCH] fix UDEV_NO_SLEEP
Move setting UDEV_NO_SLEEP into main().  I thought about moving
udev_init_config() around, but it still must be invoked in both udev and
udevstart cases, and before udev_hotplug() is called.  An alternative
would be to have main() do:
if (is_udevstart) {
	... current ...
} else {
	udev_init_config();
	return udev_hotplug();
}

And move setting UDEV_NO_SLEEP into udev_start().  I can redo it that
way, if you prefer.

Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2005-04-26 21:36:59 -07:00
trini@kernel.crashing.org
a4f5eb034b [PATCH] clean up start_udev a bit
First, update extras/start_udev.  udevstart always internally set
UDEV_NO_SLEEP as well as setting the ACTION variable, so that only needs
to be done in the run_udev script case.

Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2005-04-26 21:36:59 -07:00
azarah@gentoo.org
41ffb32e8d [PATCH] add microcode rule to permissions.gentoo file
Add microcode rule, remove duplicate rtc and psaux rules,
  and order alphabetically.
2005-04-26 21:36:59 -07:00
trini@kernel.crashing.org
eb6c7cd036 [PATCH] Make udev/udevstart be one binary
Hi,

The following patch makes udev/udevstart be a common binary.  First,
doing this grows udev by a total of 1.8kB (ppc32, stripped) whereas
udevstart by itself is 6.4kB.  I know you mentioned being able to
replace udevstart with a script, but at 1.8kB I don't think it'll be
easy to beat this with size there.  Next, the following are by-eye
timings of before, after, and with devfs on a slow, but still usable
embedded platform (config stripped down to more-or-less bare for
ramdisk):
-- Embedded Planet RPX LITE, 64Mhz MPC 823e --
devfs         : 15.333s, 15.253s, 14.988s (15.191s avg)
udev-pristine : 18.675s, 18.079s, 18.418s (18.390s avg)
udev-multi    : 14.587s, 14.747s, 14.868s (14.734s avg)

The patch ends up being rather large to add this, as in doing so I ended
up making all refs (that I hit..) to devpath/subsystem be marked as
'const'.


Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2005-04-26 21:36:59 -07:00
trini@kernel.crashing.org
807755776d [PATCH] Add 'asmlinkage' to udev-030
The following patch adds 'asmlinkage' defines to udev, to kill off 2
warnings on !i386.

Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
2005-04-26 21:36:59 -07:00
Ballarin.Marc@gmx.de
4723bf98c0 [PATCH] Update the FAQ with info about hardlink security 2005-04-26 21:36:59 -07:00
mbuesch@freenet.de
e2eef6d4dc [PATCH] Try to provide a bit of security for hardlinks to /dev entries. 2005-04-26 21:36:59 -07:00
greg@kroah.com
16ddbbe10a [PATCH] 030 release 2005-04-26 21:36:59 -07:00
greg@kroah.com
462be028f1 [PATCH] fix stupid off-by-one bug that caused udevstart to die on x86-64 boxes. 2005-04-26 21:36:59 -07:00
greg@kroah.com
bf21ea08b3 [PATCH] 029 release 2005-04-26 21:36:59 -07:00
olh@suse.de
cf9ffc8d9c [PATCH] allow NAME_SIZE > SYSFS_PATH_MAX
NAME_SIZE is too small for some configurations. This patch allows more
or longer names, it just keeps the stack in a sane state.
2005-04-26 21:36:59 -07:00
greg@kroah.com
ea08d6fc3e [PATCH] add permission rule for jogdial device. 2005-04-26 21:36:59 -07:00
greg@kroah.com
fd87429578 [PATCH] fix dumb bug I added to udevstart 2005-04-26 21:36:59 -07:00
greg@kroah.com
0e306d087d [PATCH] make a "last list" of devices for udevstart to operate on last.
Should fix the dm startup issues, hopefully...
2005-04-26 21:36:59 -07:00
greg@kroah.com
58ecc5d77f [PATCH] fix permission problem with input event and ts nodes for gentoo 2005-04-26 21:36:58 -07:00
greg@kroah.com
099602aaad [PATCH] 028 release 2005-04-26 21:36:21 -07:00
greg@kroah.com
fcf3ce3417 [PATCH] clean up block whitelist search logic a bit. 2005-04-26 21:36:21 -07:00
ogasawara@osdl.org
9a52390cfe [PATCH] udevstart performance increase
I noticed a comment in namedev.c which stated

"Figure out where the device symlink is at.  For char devices this will
always be in the class_dev->path.  But for block devices, it's
different.  The main block device will have the device symlink in it's
path, but all partitions have the symlink in its parent directory.  But
we need to watch out for block devices that do not have parents, yet
look like a partition (fd0, loop0, etc.).  They all do not have a device
symlink yet.  We do a sit and spin on waiting for them right now, we
should possibly have a whitelist for these devices here..."

I went ahead and created a whitelist for the block devices that look
like partitions (mainly by using devices.txt) and tested for any
performance increase that we would see.  The whitelist only impacts
udevstart time depending on the state of UDEV_NO_SLEEP.  Since the list
was short, I just did a sequential search and ordered the list in such a
way that those block devices which have more /dev entires (ex. loop0,
loop1, loop2, etc) appear sooner in the list and will thus be found
quicker.  I've enclosed the patch and some of the performance results I
saw below.  Basically, as the number of block devices without device
symlinks increased, the use of the whitelist improved udevstart
performance compared to just sitting and spinning.  I just thought it
was interesting and thought I'd share.  If you feel the patch is
beneficial please consider for merging.  Also, if you'd be interested in
expanding the whitelist for other devices which are missing device
symlinks and seeing if there are added performance increases let me know
and I'll do what I can.  Thanks,

Leann

Note: ex. loop represents all the loop devices (i.e. loop0, loop1,
loop2, etc)

block devices present		with whitelist	time
2005-04-26 21:36:21 -07:00
kay.sievers@vrfy.org
b99f344fde [PATCH] update udev_volume_id
volume_id is now able to read NTFS labels. Not very exciting, but we
keep up to date with the version in HAL. Also __packed__ was needed for
the structs, cause the gcc 3.4 compiled version was no longer working
properly.
2005-04-26 21:36:21 -07:00
patmans@us.ibm.com
062db23d5e [PATCH] update udev scsi_id to scsi_id 0.5
This patch syncs the scsi_id in the udev tree to version 0.5.
2005-04-26 21:36:21 -07:00
dsd@gentoo.org
c59a72105d [PATCH] Writing udev rules doc update
Here's an update to the documentation. It makes a few minor corrections and
adds info about multiple-symlinks.

It also seems that the patch I sent on April 27th (patching v0.53 to 0.54) was
not applied, so this patch includes that update too, which was also just some
small corrections plus added info on renaming network devices.
2005-04-26 21:36:21 -07:00
atul.sabharwal@intel.com
c5d046b6c7 [PATCH] Patch for chassis_id exras module 2005-04-26 21:36:21 -07:00
greg@kroah.com
57218a0873 [PATCH] reverse order of scanning of udevstart to look at class before block.
this should fix the startup issue for lvm, hopefully...
2005-04-26 21:36:21 -07:00
greg@kroah.com
8108813b5f [PATCH] 027 release 2005-04-26 21:36:21 -07:00
greg@kroah.com
ff0977b12e [PATCH] change default perms of misc/rtc to be readable by anyone. 2005-04-26 21:36:21 -07:00
greg@kroah.com
e978da492b [PATCH] tweak the gentoo default permission rules as they are wrong for tty and misc devices. 2005-04-26 21:35:47 -07:00
fork0@users.sf.net
686cecf242 [PATCH] fix handle leak in udev_lib.c
There is a handle leak in failure path in file_map, and the result of
file_map (or the result of the caller of the file_map) is not always
checked.
2005-04-26 21:35:47 -07:00
greg@kroah.com
e3496f5932 [PATCH] 026 release 2005-04-26 21:35:47 -07:00
kay.sievers@vrfy.org
47bf9196c6 [PATCH] fix udevd zombies
The recent version of klibc switched to -mregparm=3. This broke the
signal handlers parameter, cause it is called directly from the kernel
with the parameter on the stack not in a register.
2005-04-26 21:35:47 -07:00
greg@kroah.com
0f36e68e8a [PATCH] add test for ! in partition name 2005-04-26 21:35:47 -07:00
kay.sievers@vrfy.org
84df02dd63 [PATCH] catchup with recent klibc
Our own implementation of the sysinfo system call is no longer
needed, cause it's merged it into klibc now.
2005-04-26 21:35:47 -07:00
greg@kroah.com
9e86e12e10 [PATCH] 025_bk mark
because kernel.org is down, no release just yet...
2005-04-26 21:35:47 -07:00
greg@kroah.com
73028bc332 [PATCH] Update to version 117 of klibc (from version 108) 2005-04-26 21:35:47 -07:00
arnd@arndb.de
3c60abb55a [PATCH] udev rpm fix
Some file locations have changed since the spec file was last updated.
Also a failed build might leave behind a stale buildroot directory.
This patch should fix both problems.
2005-04-26 21:35:47 -07:00
ogasawara@osdl.org
c33359307b [PATCH] evaluate getenv() return value for udev_config.c
Small patch to fix the evaluation logic for the return value of getenv()
in udev_config.c file.  Basically, the actual values for the environment
variables "UDEV_NO_SLEEP" and "UDEV_NO_DEVD" were not being checked.
For example UDEV_NO_SLEEP could have been set to false but the line:

if (getenv("UDEV_NO_SLEEP") != NULL)

in this case would always evaluate to true, since getenv() returns
char*, thus the "udev_sleep" variable would be set incorrectly.  The
patch makes sure to check the value returned by getenv() not just if
getenv() returned a value.  Hope this made sense.  Thanks,
2005-04-26 21:35:47 -07:00
kay.sievers@vrfy.org
28e169f067 [PATCH] udevsend fallback
On Tue, May 11, 2004 at 04:54:44PM -0700, Greg KH wrote:
> On Tue, May 11, 2004 at 01:16:41PM +0200, Kay Sievers wrote:
> > Hi,
> > the execution of udev depends on the proper fuction of udevd, the
> > serializing daemon. If we can't connect to udevd within a 20 second we
> > give up and the request to create a node is lost. Hope this never happens,
> > but a broken udevd may prevent udev from working.
> >
> > What do you think? Should we call the udev binary directly from udevsend
> > instead of discarding the event? This way we would create the node, regardless
> > of the state of udevd. It would be 20 seconds later and maybe not in the right
> > sequence order - but the node will propably be there.
> >
> > Does it sound sane? What do you think?
>
> That sounds like a good "failsafe" thing to do.

Here we go:

Add a fallback udev call to udevsend. If udevsend is unable to send the
event to udevd, we call the udev binary instead of doing nothing and exiting.
2005-04-26 21:35:18 -07:00
greg@kroah.com
1eae2f3f71 [PATCH] add volume_id support to the udev.spec file 2005-04-26 21:35:17 -07:00
greg@kroah.com
91cb262895 [PATCH] remove dbus and selinux stuff from the udev.spec file. 2005-04-26 21:35:17 -07:00
greg@kroah.com
bd2598afb6 [PATCH] delete udev_selinux as it doesn't work properly and is the wrong way to do it... 2005-04-26 21:35:17 -07:00
greg@kroah.com
d7a4f62d3d [PATCH] Deleted the udev_dbus extra as it didn't really work properly and HAL has a real solution now. 2005-04-26 21:35:17 -07:00
kay.sievers@vrfy.org
cde5a756ce [PATCH] udev_volume_id update
Here is a update to extras/volume_id/*

o The device is now specified by the DEVPATH in the environment,
  it's no longer needed to pass the major/minor to the callout.

o leading spaces and slashes are now removed from the returned string
  and spaces are replaced by underscore, to not to confuse udev.

o Arnd Bergmann <arnd@arndb.de> provided the code to recognize s390
  dasd disk labels. The -d switch tries to read the main block device
  instead of the partition.
2005-04-26 21:35:17 -07:00
greg@kroah.com
7f639ff99e [PATCH] add udev.permissions.slackware file.
From Lucas de Souza Santos <lucasdss@yahoo.com.br>
2005-04-26 21:35:17 -07:00
kay.sievers@vrfy.org
599b626127 [PATCH] udev callout for reading filesystem labels
On Fri, Apr 30, 2004 at 03:29:54PM -0700, Greg KH wrote:
> On Thu, Apr 29, 2004 at 11:04:46PM +0200, Kay Sievers wrote:
> > Hi,
> > here is a small udev toy, which enables udev to name partitions by
> > its filesystem label or uuid's.
> >
> > The following udev rule:
> >
> >   KERNEL="sd*", PROGRAM="/sbin/udev_volume_id -M%M -m%m -u", SYMLINK="%c"
> >
> > creates a symlink with the uuid read from the filesystem. If no label or
> > uuid is found the program exits with nonzero and the rule will fail.
> >
> > ext2, ext3, reiserfs, xfs, jfs, vfat, msdos volume labels are supported,
> > ntfs and swap partitions can be recognized.
> >
> > It's possible to compile with klibc and the static binary takes 13kb.
>
> Very nice, I was wondering who was going to use that library to make
> such a tool.  This is even better as we can use klibc for it.

Here is a update, which supports iso9660 and udf labels.
Not very useful in the udev case, but I've added it for hal,
so we just catch up with the latest version.
2005-04-26 21:35:17 -07:00