aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* udev: timeout - increase timeoutv1.XTom Gundersen2014-09-101-1/+1
| | | | | | | | Some kernel modules still take more than one minute to insmod, we no longer rely on the timeout killing insmod within a given period of time, so just bump this to a much higher value. Its only purpose is to make sure that nothing stays aronud forever. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev: fix copy-paste error in log messageTom Gundersen2014-09-101-1/+1
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev: import the full db on MOVE events for devices without dev_tTom Gundersen2014-09-102-2/+16
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev - drop print_kmsgTom Gundersen2014-09-104-30/+4
| | | | | | | | The only remaining user was 'starting version XXX', which is now logged using log_info(). Basile: There were also print_kmsg in udev-event.c which I switched to log_info(). Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* libudev: fix symbol version for udev_queue_flush() and udev_queue_get_fd()Michael Biebl2014-09-101-2/+6
| | | | | | | Those symbols were introduced in commit 14cb733684d3c3f50d088a3a370ddf8e8894dfa4 and released in v215. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: net-setup-link - remove stray linebreakMantas Mikulėnas2014-09-101-2/+1
| | | | | | If not backslash-escaped, it splits the rule in two. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: net-setup-link - preserve ID_NET_LINK_FILE and ID_NET_NAME after MOVETom Gundersen2014-09-101-1/+2
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* hwdb: updateMarcel Holtmann2014-09-103-39/+2199
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* hwdb: Update database of Bluetooth company identifiersMarcel Holtmann2014-09-081-1/+76
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/libudev/Makefile.am: link libudev against selinuxAmadeusz Sławiński2014-09-031-1/+2
| | | | | Signed-off-by: Amadeusz Sławiński <amade@asmblr.net> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/shared/label.c: include selinux headersAmadeusz Sławiński2014-09-021-0/+5
| | | | Signed-off-by: Amadeusz Sławiński <amade@asmblr.net>
* udev: bump event timeout to 60 secondsKay Sievers2014-09-012-2/+2
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* shared: make container_of() use unique variable namesDavid Herrmann2014-08-271-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If you stack container_of() macros, you will get warnings due to shadowing variables of the parent context. To avoid this, use unique names for variables. Two new helpers are added: UNIQ: This evaluates to a truly unique value never returned by any evaluation of this macro. It's a shortcut for __COUNTER__. UNIQ_T: Takes two arguments and concatenates them. It is a shortcut for CONCATENATE, but meant to defined typed local variables. As you usually want to use variables that you just defined, you need to reference the same unique value at least two times. However, UNIQ returns a new value on each evaluation, therefore, you have to pass the unique values into the macro like this: #define my_macro(a, b) __max_macro(UNIQ, UNIQ, (a), (b)) #define __my_macro(uniqa, uniqb, a, b) ({ typeof(a) UNIQ_T(A, uniqa) = (a); typeof(b) UNIQ_T(B, uniqb) = (b); MY_UNSAFE_MACRO(UNIQ_T(A, uniqa), UNIQ_T(B, uniqb)); }) This way, MY_UNSAFE_MACRO() can safely evaluate it's arguments multiple times as they are local variables. But you can also stack invocations to the macro my_macro() without clashing names. This is the same as if you did: #define my_macro(a, b) __max_macro(__COUNTER__, __COUNTER__, (a), (b)) #define __my_macro(prefixa, prefixb, a, b) ({ typeof(a) CONCATENATE(A, prefixa) = (a); typeof(b) CONCATENATE(B, prefixb) = (b); MY_UNSAFE_MACRO(CONCATENATE(A, prefixa), CONCATENATE(B, prefixb)); }) ...but in my opinion, the first macro is easier to write and read. This patch starts by converting container_of() to use this new helper. Other macros may follow (like MIN, MAX, CLAMP, ...). Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev: add missing new-line in udevadm errorDavid Herrmann2014-08-271-1/+1
| | | | | | | | | fprintf() does not add new-lines automatically like log_*() does. Add the missing \n specified so "udevadm" invoked without arguments adds a newline to: udevadm: missing or unknown command Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev: hwdb - do not look at "usb_device" parentsKay Sievers2014-08-271-8/+14
| | | | | | | | Based on a patch from Simon McVittie <simon.mcvittie@collabora.co.uk>. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758050 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* keymap: Adjust for more Samsung 900X4 seriesMartin Pitt2014-08-271-1/+1
| | | | | | | | | Reportedly also applies to NP900X4B, so relax the match to apply to all models of this series. https://launchpad.net/bugs/902332 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Document "...|..." udev match syntaxAndrei Borzenkov2014-08-271-2/+11
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* util: change return value of startswith() to non-constv1.10Lennart Poettering2014-08-221-3/+7
| | | | | | | | | | This way we can use it on non-const strings, and don't end up with a const'ified result. This is similar to libc's strstr() which also takes a const string but returns a non-const one. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* util: change return value of startswith() to non-constLennart Poettering2014-08-221-17/+16
| | | | | | | | | | This way we can use it on non-const strings, and don't end up with a const'ified result. This is similar to libc's strstr() which also takes a const string but returns a non-const one. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* configure.ac and src/libudev/Makefile.am: bump to 1.10 = upstream 216Anthony G. Basile2014-08-222-4/+4
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* update hwdbLennart Poettering2014-08-213-5/+776
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/scsi_id/Makefile.am,test/Makefile.am: fix build on debian jessie, issue #97Anthony G. Basile2014-08-182-2/+4
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/shared/mkdir.h: add missing func prototypeAnthony G. Basile2014-08-171-0/+5
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/shared/path-util.c: revert change from realpath to canonicalize_file_nameAnthony G. Basile2014-08-141-1/+1
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/shared: some stylistic changesAnthony G. Basile2014-08-1437-134/+67
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/shared: import more code cleanups from upstreamAnthony G. Basile2014-08-1423-471/+471
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/shared: import many code cleanups from upstreamAnthony G. Basile2014-08-1416-224/+710
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/shared/cgroup-util.c: code cleanup following upstreamAnthony G. Basile2014-08-131-7/+4
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev: modernize net_id builtin a bitLennart Poettering2014-08-122-12/+22
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev: never bypass our own logging framework and call vsyslog() directly ↵Lennart Poettering2014-08-1212-35/+20
| | | | | | from udev tools Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* hwdb: update format description and document reloadingZbigniew Jędrzejewski-Szmek2014-08-111-9/+23
| | | | | | https://bugs.freedesktop.org/show_bug.cgi?id=82311 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/libudev/libudev.sym: mark most symbols as hiddenAnthony G. Basile2014-08-063-8/+16
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Merge pull request #96 from gentoo/refactor-sharedblueness2014-08-0661-75/+106
|\ | | | | src/shared: refactor shared code
| * src/shared: refactor shared codeAnthony G. Basile2014-08-0561-75/+106
|/ | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/{libudev,udev}: minor renamings from upstreamAnthony G. Basile2014-08-0513-54/+63
|
* test: use _cleanup_ attributeAnthony G. Basile2014-08-052-13/+11
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* m4/gtk-doc.m4: update to serial 2Anthony G. Basile2014-08-051-15/+36
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* docs/gudev/gudev-sections.txt: add two missing functionsAnthony G. Basile2014-08-051-0/+2
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* rules: bring up to dateAnthony G. Basile2014-08-053-8/+12
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/libudev/missing.h: clean up unused BTRFS_* declsAnthony G. Basile2014-08-052-49/+0
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* src/collect/collect.c: remove excessive error reportingAnthony G. Basile2014-08-051-21/+12
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* keymap: Fix HP Pavillon DV7Martin Pitt2014-08-051-1/+1
| | | | | | | | Properly disable scan code 94 instead of producing KEY_0. https://launchpad.net/bugs/1322770 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev-builtin-keyboard: Allow numeric key codesMartin Pitt2014-08-051-5/+11
| | | | | | | | | Like with the old udev rules, allow hwdb entries to specify numeric key codes. Based on a patch from Mircea Miron. https://launchpad.net/bugs/1247584 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* udev: path_id - suppress ID_PATH for devices with an unknown parent device typeKay Sievers2014-08-051-11/+27
| | | | | | https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1321816 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Unify parse_argv styleZbigniew Jędrzejewski-Szmek2014-08-052-21/+24
| | | | | | | | | | | | | | | | | | getopt is usually good at printing out a nice error message when commandline options are invalid. It distinguishes between an unknown option and a known option with a missing arg. It is better to let it do its job and not use opterr=0 unless we actually want to suppress messages. So remove opterr=0 in the few places where it wasn't really useful. When an error in options is encountered, we should not print a lengthy help() and overwhelm the user, when we know precisely what is wrong with the commandline. In addition, since help() prints to stdout, it should not be used except when requested with -h or --help. Also, simplify things here and there. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Include missing.h in udev-builtin-btrfs.c, and move BTRFS_IOC_DEVICES_READY ↵Anthony G. Basile2014-08-054-26/+92
| | | | | | | | | | | | | | | | to missing.h This is a combination of upstream commits dced15575f7bf172e3c9d798c43477539525558c 7bed7f0e3b1f9596aedb64657e432e5b267adebb by Simon McVittie <simon.mcvittie@collabora.co.uk> 7bed7f0e3b1f9596aedb64657e432e5b267adebb Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* man: add udev.conf(5)Zbigniew Jędrzejewski-Szmek2014-08-046-31/+110
| | | | | | | | | We generally have separate man pages for all configuration files. In this case udev.conf was already described in systemd-udevd.service(8), but it was hard to find. Docbook makes it hard to add a .so link from a different section, so describe udev.conf in its own page. Signedaoff-by: Anthony G. Basile <blueness@gentoo.org>
* Reject invalid quoted stringsZbigniew Jędrzejewski-Szmek2014-08-043-64/+50
| | | | | | | | | | | | | | | | | | | | | | | | String which ended in an unfinished quote were accepted, potentially with bad memory accesses. Reject anything which ends in a unfished quote, or contains non-whitespace characters right after the closing quote. _FOREACH_WORD now returns the invalid character in *state. But this return value is not checked anywhere yet. Also, make 'word' and 'state' variables const pointers, and rename 'w' to 'word' in various places. Things are easier to read if the same name is used consistently. mbiebl_> am I correct that something like this doesn't work mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"' mbiebl_> systemd seems to strip of the quotes mbiebl_> systemctl status shows mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint mbiebl_> which is pretty weird Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* Fix misuse of uint64_t as size_tZbigniew Jędrzejewski-Szmek2014-08-041-1/+1
| | | | | | They have different size on 32 bit, so they are really not interchangable. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
* libudev: set errno when udev_device_new_from_* or udev_device_get_parent_* failTom Gundersen2014-08-041-11/+45
| | | | Signed-off-by: Anthony G. Basile <blueness@gentoo.org>