summaryrefslogtreecommitdiff
path: root/src/udev
AgeCommit message (Collapse)Author
2013-07-11src/udev/udev-builtin-kmod.c: fix char *const declarationAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10Fix potential memleak and use-after-free errors as reported by clangIan Stakenvicius
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10src/udev/udev-builtin-kmod.c: fix const char* declarationAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10src/udev/mkdir.c: import path_startswith() from upstreamAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10src/udev/udev-ctrl.c: explicitly declare return valueAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10Bring mkdir.c, label.c and util.c in better line with upstreamAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10hwdb: allow list of lookup keys per given recordKay Sievers
This allows to specify: dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Model 231*:pvr* dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Series 12*:pvr* KEY_A=value KEY_B=value Instead of: dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Model 231*:pvr* KEY_A=value KEY_B=value dmi:bvn*:bvr*:bd*:svnVENDOR:pn:Series 12*:pvr* KEY_A=value KEY_B=value Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-10hwdb: return false if no property is foundKay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-09hwdb: add --lookup-prefix= optionKay Sievers
2013-07-07hwdb: allow to query arbitrary keysKay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07hwdb: add --device=<device-id> and --filter=<key name glob>Kay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07hwdb: remove support for (not fully implemented) conditional propertiesKay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07dev-setup: do not create a dangling /proc/kcore symlinkZbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=65382 https://bugs.gentoo.org/472060?id=472060 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07Import strxcpyx from upstreamAnthony G. Basile
This commit imports strxcpyx from upstream. This is upstream commit d5a89d7dc17a5ba5cf4fc71f82963c5c94a31c3d Note: there were also some very minor code cleanups to accelerometer.c: line 187 collect.c: lines 35, 140 libudev-device.c: line 780 libudev-hwdb.c: line 300 These are part of upstream commits: 507f22bd0172bff5e5d98145b1419bd472a2c57f 3cf7b686e6b29f78de0af5929602cae4482f6d49 67410e9f73a6cdd8453c78b966451b5151def14a Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-29src/udev/udev-ctrl.c: restore accept4_fallback codeAnthony G. Basile
This code was accidentally removed in commit 601c4e8ce69338652b3c9178386cbc05de8bae8d We restore it here. Since most modern systems have accept4() this code will seldom be triggered. You can test by configuring as follows: ac_cv_have_decl_accept4="no" ./configure Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26udev: handle network controllers in nonstandard domainsSean McGovern
Onboard network controllers are not always on PCI domain 0. [Kay: use int instead of long, add [P] to slot naming, remove sysname var] Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-26libudev: Use correct type for sizeofJan Janssen
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-06Fix ordering of params for conf_files_list_strvAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-05Remove unused functions from src/udev/{label,mkdir}Anthony G. Basile
We remove the following unused functions: label_socket_set label_socket_clear label_free label_get_create_label_from_exe label_retest_selinux label_bind mkdir_label mkdir_safe mkdir_safe_label mkdir_p_label Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-03Add printf attributes in exported headersZbigniew Jędrzejewski-Szmek
gcc (and other compilers) sometimes generate spurious warnings, and thus users of public headers must be able to disable warnings. Printf format attributes can be disabled by setting #define _sd_printf_attr_ before including the header file. Also, add similar logic for sentinel attribute: #define _sd_sentinel_attr_ before including the header file disables the attribute.
2013-06-03Standarize on one spelling of symlink error messageZbigniew Jędrzejewski-Szmek
It's polite to print the name of the link that wasn't created, and it makes little sense to print the target. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-03Move remaining _cleanup_free_ in front of typeAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02src/udev/udev-rules.c: fix a spelling errorAnatol Pomozov
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-06-02udev/udev-ctrl.c:udev_ctrl_new_from_fd() enable SO_PASSCREDHarald Hoyer
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-02Use initalization instead of explicit zeroingZbigniew Jędrzejewski-Szmek
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-02udevadm: do not free node on successZbigniew Jędrzejewski-Szmek
A fix for ff03aed06a422.
2013-06-02udev-builtin-usb_id: avoid comparison of unsigned and ssize_tZbigniew Jędrzejewski-Szmek
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-02udevadm-hwdb: avoid leak in error pathZbigniew Jędrzejewski-Szmek
2013-04-21src/udev/Makefile.am: do not fail if sym link already existsAnthony G. Basile
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-09build-sys: fix HAVE/ENABLE_FIRMWAREKay Sievers
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-07src/udev/udev-event.c: restore code to allow rule generator to workAnthony G. Basile
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-07src/udev/Makefile.am: fix symlink to udevadmAnthony G. Basile
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-04src/udev/udev-rules.c: fix bug introduced in our 601c4e8Anthony G. Basile
This error was introduced in our commit 601c4e8ce69338652b3c9178386cbc05de8bae8d 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-04Initial forward-port of rules.d inotify supportIan Stakenvicius
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-04Use LN_S instead of directly calling ln -sIan Stakenvicius
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-04Move udevadm from sbin to binIan Stakenvicius
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-02udev: updateAnthony G. Basile
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-02udev: ifdef all firmware special handlingKay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-04-02udev: make firmware loading optional and disable by defaultTom Gundersen
Distros that whish to support old kernels should set --with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware" to retain the old behaviour. Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-03-14udev: fix segfault with android rndisRob Clark
The android gadget driver for network tethering over rndis somehow has a parent device with a null subsystem. Probably this is bug in android driver, but it is easy enough to make systemd/udev behave gracefully and not segfault. And this will help for making linux distros with systemd (like fedora) work on android devices. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14udev: usb_id: parse only 'size' bytes of the 'descriptors' bufferKay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14udev: usb_id - ignore non-ASCII serial numbersKay Sievers
On Thu, Feb 7, 2013 at 3:52 PM, Robert Milasan <rmilasan@suse.com> wrote: > Hi, seems that using some strange usb devices with really bogus serial > numbers usb_id creates links with junk strings in it: > > /dev/disk/by-id/usb-TSSTcorp_BDDVDW_SE-506AB_㡒䍌䜶䉗ぁㄴ㌴†ँ-0:0 > > Initially was believed that usb_id is to blame, then the kernel, but it > turns out that really the usb cd/dvd drive has this bogus serial number: > > output from dmesg: > [ 538.200160] usb 1-2: new high-speed USB device number 5 using > ehci_hcd [ 538.335067] usb 1-2: New USB device found, idVendor=0e8d, > idProduct=1956 [ 538.335080] usb 1-2: New USB device strings: Mfr=1, > Product=2, SerialNumber=3 [ 538.335089] usb 1-2: Product: MT1956 > [ 538.335097] usb 1-2: Manufacturer: MediaTek Inc > [ 538.335105] usb 1-2: SerialNumber: > \xffffffe3\xffffffa1\xffffff92\xffffffe4\xffffff8d\xffffff8c ... > [ 538.337540] scsi6 : usb-storage 1-2:1.0 [ 539.341385] scsi 6:0:0:0: > CD-ROM TSSTcorp BDDVDW SE-506AB TS00 PQ: 0 ANSI: 0 > [ 539.354240] sr0: scsi3-mmc drive: 0x/24x writer dvd-ram cd/rw > xa/form2 cdda tray [ 539.354777] sr 6:0:0:0: Attached scsi CD-ROM sr0 > [ 539.355122] sr 6:0:0:0: Attached scsi generic sg2 type 5 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14src/udev/udev-builtin-blkid.c: expose new ISO9660 properties from libblkidZeeshan Ali (Khattak)
This is upstream commit ddb5bee15a6ad71e5b596c035c1ee4dc04d5fd2e Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14src/udev/udev-builtin-net_id.c: handle bcma busesKay Sievers
This is upstream commits: 984c4348ff14d29c526d3d372daa82e278eeb5b4 f4ddacbd4de0f159ec598f8ad690466a84787ec5 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14udev: path_id - clarify comment about the kernel ATA naming problemKay Sievers
2013-03-14src/udev/udevadm-hwdb.c: fix helpAnthony G. Basile
This follows upstream commit e32a4e1ef4c61561b08f50f73f82587bdc946b40 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-02-07udevadm: support updating hwdb from an offset rootLuca Barbato
Introduce `--root` option to make users run udevadm on rootfs not mounted as / Ease the life of distribution packagers.
2013-01-28Make blkid optionalIan Stakenvicius
Embedded systems may not want to include util-linux when they do not intend to use blkid functionality Modified from original author's commit to not install 60-persistent-storage.rules if blkid is disabled systemd commit f553b3b1074151200187df916427a1468186435e Original author: Anders Olofsson <Anders.Olofsson@axis.com> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28Set device node permissions only at "add" eventsIan Stakenvicius
New behavioural change -- has potential to fix bugs..? systemd commit 48a849ee17fb25e0001bfcc0f28a4aa633d016a1 Author: Kay Sievers <kay@vrfy.org> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28Cleanup of spacing to help with diffsIan Stakenvicius
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>