Commit Graph

9830 Commits

Author SHA1 Message Date
Martin Pitt
10f991d6a9 rules/95-keymap.rules: fix typo
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 13:00:59 -04:00
Harald Hoyer
ca5fc30e5a udev/udev-ctrl.c:udev_ctrl_new_from_fd() enable SO_PASSCRED
Avoid "sender uid=65534, message ignored" case, where no credentials can
be read on the sender side.

Seems, the server socket does not enable credential receiving fast
enough, and the message from the client (without credential) sometimes
is queued before the credential passing was active.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 12:57:36 -04:00
Zbigniew Jędrzejewski-Szmek
786cd8191b Use initalization instead of explicit zeroing
Before, we would initialize many fields twice: first
by filling the structure with zeros, and then a second
time with the real values. We can let the compiler do
the job for us, avoiding one copy.

A downside of this patch is that text gets slightly
bigger. This is because all zero() calls are effectively
inlined:

$ size build/.libs/systemd
         text    data     bss     dec     hex filename
before 897737  107300    2560 1007597   f5fed build/.libs/systemd
after  897873  107300    2560 1007733   f6075 build/.libs/systemd

… actually less than 1‰.

A few asserts that the parameter is not null had to be removed. I
don't think this changes much, because first, it is quite unlikely
for the assert to fail, and second, an immediate SEGV is almost as
good as an assert.

NOTE by Basile: the above analysis is for all systemd.  This commit
is just a sliver of the commit for all of system and so we can't
expect size to be the same.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 12:50:56 -04:00
Zbigniew Jędrzejewski-Szmek
669bfbaead udevadm: do not free node on success
A fix for ff03aed06a422.
2013-06-02 12:47:07 -04:00
Zbigniew Jędrzejewski-Szmek
7e85521337 udev-builtin-usb_id: avoid comparison of unsigned and ssize_t
For some reason this shows up on i686 only:
src/udev/udev-builtin-usb_id.c:192:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2013-06-02 12:45:24 -04:00
Zbigniew Jędrzejewski-Szmek
c7b0400c80 udevadm-hwdb: avoid leak in error path 2013-06-02 12:39:29 -04:00
Michael Biebl
57f2c181f7 libudev: remove udev_monitor_new_from_socket() symbol
This function was removed in v183, so drop it from the symbols
versioning file.
2013-06-02 12:17:28 -04:00
Michael Biebl
e6af18333f libudev: Move -lrt to Libs.private
It's only needed for static linking.

https://bugs.freedesktop.org/show_bug.cgi?id=63309

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 12:16:15 -04:00
Anthony G. Basile
2a0f2910b1 Correct missing int to size_t change
This corrects a previously applied commit for upstream's

  acd42fae59096d84e78f1c17bfcc0d8f96486341

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 12:12:14 -04:00
Kay Sievers
adb162e7ef libude: remove special handling of "device" link and legacy respecting code
Remove special handling of device link by Sievers.
Remove legacy respecting code by Basile.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 12:02:42 -04:00
Hannes Reinecke
ebcfcd41ac libudev: implement udev_device_set_attribute_value()
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 11:42:02 -04:00
Martin Pitt
ebbcb55a2d keymap: Add Logitech USB (iTouch)
https://launchpad.net/bugs/1152377

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 11:25:06 -04:00
Pali Rohar
c4b8f8a920 keymap: Add HP EliteBook 8460p
Taken from
https://code.launchpad.net/~pali/ubuntu/raring/udev/hp-elitebook-8460p/+merge/157420

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 11:23:20 -04:00
Kay Sievers
6734988f4e hwdb: update 2013-06-02 10:50:26 -04:00
Kay Sievers
0470cf474d hwdb: update 2013-06-02 10:49:52 -04:00
Kay Sievers
00c2d89e7b hwdb: update 2013-06-02 10:49:10 -04:00
Kay Sievers
ae88f88db0 hwdb: update 2013-06-02 10:48:32 -04:00
Sami Kerola
9c00864f98 licence: remove references to old FSF address
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=57206

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02 10:30:02 -04:00
Anthony G. Basile
ed844d28c4 src/udev/Makefile.am: do not fail if sym link already exists
This fixes two issues: 1) The -r option does not exist for busybox
and we do not need relative sym linking anyhow, and 2) if the
sym link already exists, we want to overwrite it, hence -f.

X-Eudev-Bug: 58
X-Eudev-Bug-URL: https://github.com/gentoo/eudev/issues/58
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-21 18:24:39 -04:00
Anthony G. Basile
1fcf167f65 Version bump to eudev-1_beta4
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-10 22:11:37 -04:00
Kay Sievers
faed3b5ff1 build-sys: fix HAVE/ENABLE_FIRMWARE
This fixes:

    https://github.com/gentoo/eudev/issues/55
    https://bugs.freedesktop.org/show_bug.cgi?id=62864

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-09 17:47:19 -04:00
Anthony G. Basile
ab0a37ddcf rules/Makefile.am: conditionally install 80-net-name-slot.rules
We do not want to install 80-net-name-slot.rules if we
--enable-rule-generator.  In fact doing so will switch to
the predictable network interface names.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-09 12:22:42 -04:00
Anthony G. Basile
215c4a0faa rules/40-mem-null.rules: coalesce with rules/50-udev-default.rules
There is no reason to keep this rule separate and it works fine
when incuded in 50-udev-default.rules.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-07 22:52:39 -04:00
Anthony G. Basile
df016d6d7a src/udev/udev-event.c: restore code to allow rule generator to work
This code was dropped while importing from upstream.  It is needed
to allow the legacy renaming of interfaces like eth* or wlan*.

X-Eudev-Bug: 56
X-Eudev-Bug-URL: https://github.com/gentoo/eudev/issues/56
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-07 22:19:54 -04:00
Anthony G. Basile
f8209e1f44 src/udev/Makefile.am: fix symlink to udevadm
The installation was overwriting udevadm when building with
--sbindir=/usr/bin and ignoring $bindir.  Both situations lead
to a symlink which points to nowhere.

Thanks TZ86.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-07 20:56:21 -04:00
Ian Stakenvicius
060ec6fee0 bump versions to eudev-1_beta3 and udev-200 2013-04-05 10:57:04 -04:00
Ian Stakenvicius
8083286957 adjust symbol versioning for libudev
Libudev has a symbol version for 199 now, so the libudev_internal
version (which is used to essentially hide symbols that are not
part of the external API) needs to use 199 as its baseline instead
of 196

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-05 10:55:36 -04:00
Anthony G. Basile
b8c77fcd07 src/udev/udev-rules.c: fix bug introduced in our 601c4e8
This error was introduced in our commit

    601c4e8ce6

when importing from upstream.  The revert line works only
in the context of all of upstream's commit

    7850b3b83791ba0e2377ba40383c5abc258b839d

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-04 20:49:21 -04:00
Ian Stakenvicius
1d70a98af4 Set rootprefix to be '${prefix}' if unset
Previously, rootprefix was set to the actual value of the default prefix,
which caused issues when running 'make distcheck' since prefix is set
to a non-standard value but rootprefix is unset.  By assigning the variable
rather than its contents, this should now be avoided.
2013-04-04 12:59:24 -04:00
Ian Stakenvicius
c4657beb83 set default prefix to /usr for necessary rootprefix default operation 2013-04-04 12:06:05 -04:00
Ian Stakenvicius
9e98de5d50 Remove 75-persistent-net-generator.rules reintroduced in commit ef0ac643
75-persistent-net-generator.rules is in the rule_generator subdir, do
not try and install from here.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 10:28:34 -04:00
Ian Stakenvicius
85c2dfdb18 Initial forward-port of rules.d inotify support
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 10:28:09 -04:00
Ian Stakenvicius
d71bb748b2 Removed hard-coded paths in rule-writer scripts
Both scripts had hard-coded paths to 'rule_generator.functions'; these were changed
to be substituted in by configure so the paths will match where files are
installed.øy

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 10:26:47 -04:00
Ian Stakenvicius
85085621ba Restored the rule generator bits from udev-171
This restores the rule generator scripts for the persistent
network and optical device rule generator scripts that were
removed after udev-171, and re-introduces their installation
to the build system.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 10:19:35 -04:00
Ian Stakenvicius
9315b3d16f Add support for legacy behaviour in udev_device_get_sysattr_value()
Wraps the changes made in systemd commits 5ae18ddc and 53726349
with a #if's on LIBUDEV_LEGACY_VERSION so that old behaviour
can be chosen at build-time if users find it necessary to support
legacy software dependent on the original behaviour

Original Authors:
	Kay Sievers

Signed-off-by:  Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 10:14:46 -04:00
Ian Stakenvicius
45f9def272 Use LN_S instead of directly calling ln -s
configure.ac has AC_PROG_LN_S already so we should use it.
upstream did this in commit 783162123dbac43d5b7a3fab9d4f11dcf86d06e1

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 09:24:18 -04:00
Ian Stakenvicius
dd91c2dbcf Move udevadm from sbin to bin
Follow upstream commit f432bb914499e2c28b43f592bb273f0a8664f352
but refactor the patch for eudev build system.  Provide a
compatibility symlink in sbindir for anything that hard-codes
the path to udevadm

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04 09:23:53 -04:00
klondike
95c60af90b Respect the MIT license
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-03 14:22:40 -04:00
klondike
50758bdd96 Fix buffer overflow
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-03 14:22:40 -04:00
klondike
d8d626c7df Clean up the string functions
Avoid two evaluations of src in util_strpcpy clean the code in the ones
where the pointer passed is not modified and merge the main loop of
util_strpcpyl and util_strscpyl into util_strpcpyv.  Also make strpcpy
more compact by removing some unnecessary arithmetic.

Cleanup util_strpcpyv by shortcutting size == 0 case

Do some style fixups

Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-03 14:22:40 -04:00
Anthony G. Basile
cdd665a921 man: updates from upstream
Added upstream systemd-udevd.service(8) as udevd(8)

Authors include

	Tom Gundersen
	Zbigniew Jędrzejewski-Szmek
	Thomas Hindoe Paaboel Andersen
	Kay Sievers
	Lennart Poettering

See http://cgit.freedesktop.org/systemd/systemd/log/man/udev.xml
and http://cgit.freedesktop.org/systemd/systemd/log/man/systemd-udevd.service.xml
and http://cgit.freedesktop.org/systemd/systemd/log/man/udevadm.xml

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:22:47 -04:00
Anthony G. Basile
601c4e8ce6 udev: update
This updates the daemon codebase to upstream.

Authors:
	Zbigniew Jędrzejewski-Szmek
	Lennart Poettering
	Václav Pavlín
	Kay Sievers
	Harald Hoyer
	Rob Clark
	Zeeshan Ali (Khattak)

See http://cgit.freedesktop.org/systemd/systemd/log/src/udev

Ian is signing off but has some concerns on a few of the changes
that he may fix in future commits.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:02:48 -04:00
Lennart Poettering
20d47ae5b5 udev: extern on functions is pointless
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:02:35 -04:00
Zbigniew Jędrzejewski-Szmek
35471e6e86 accelerometer: remove dead if and modernize
Based on a coverity warning.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:02:35 -04:00
Kay Sievers
76c3ff748a hwdb: update
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:02:35 -04:00
Anthony G. Basile
d5920a7a40 docs/libudev/libudev-sections.txt: add missing symbol
Add udev_device_set_sysattr_value which is defined in
libudev/libudev-device.c.

Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:02:35 -04:00
Anthony G. Basile
18cafe9973 Correct permissions on /dev/null and friends for 2.6.32
This sets the permissions on null, zero, full, random and urandom
to 666 which is needed for older kernels.  This is part of Gentoo's
40-gentoo.rules which can now be dropped from Gentoo's ebuild.

X-gentoo-Bug: 457868
X-gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=457868
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:02:35 -04:00
Anthony G. Basile
7378b89a14 hwdb: remove uneeded *-vendor-product.hwdb
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 15:02:35 -04:00
Ian Stakenvicius
c7c0dad3bd libudev: update to 199
This updates the library codebase to upstream version 199.
(originally merged by Anthony G. Basile <blueness@gentoo.org>)

Upstream commits 5ae18ddc0d and 53726349e1 are not applied,
code will be excluded via #if...#endif in a future commit

Authors:
	Kay Sievers
	Thomas Hindoe Paaboel Andersen
	Hannes Reinecke
	Jan Engelhardt

See http://cgit.freedesktop.org/systemd/systemd/log/src/libudev

    Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
    Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 14:36:31 -04:00
Ozan Çağlayan
dfdffb7041 keymap: Remap microphone mute and touchpad toggle for Lenovo U300s
Separate out Ideapad U300s to its own line and add Microphone mute key.

Signed-off-by: Martin Pitt <martinpitt@gnome.org>
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02 13:54:37 -04:00