summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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-14udev: Fix device matching in the accelerometerBastien Nocera
As we were searching by ID_PATH, it would have been possible for us to find a sibling device instead of the device we were looking for. This fixes device matching on the WeTab with the upstream kernel, as it was trying to use the "Asus Laptop extra buttons" device instead of the accelerometer. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-03-14Fix whitespace in various filesAnthony G. Basile
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-14cdrom_id: add data track count for bad virtual drive implementationsHarald Hoyer
/# /lib/udev/cdrom_id --debug /dev/sr0 probing: '/dev/sr0' INQUIRY: [AMI ][Virtual CDROM ][1.00] GET CONFIGURATION failed with SK=5h/ASC=20h/ACQ=00h drive is pre-MMC2 and does not support 46h get configuration command trying to work around the problem READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h no current profile, but disc is present; assuming CD-ROM READ TOC: len: 12, start track: 1, end track: 1 last track 1 starts at block 0 READ DISC INFORMATION failed with SK=5h/ASC=20h/ACQ=00h ID_CDROM=1 ID_CDROM_MEDIA=1 ID_CDROM_MEDIA_CD=1 What is missing here is ID_CDROM_MEDIA_TRACK_COUNT_DATA to trigger blkid in /lib/udev/rules.d/60-persistent-storage.rules KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \ IMPORT{builtin}="blkid --noraid"
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>
2013-01-28Add missing ':' to getopt_long 'e'Ian Stakenvicius
Parameter -e is set without additional argument in getopt and this leads to segfault when calling 'udevd -e'. systemd commit 5bbbe461fd4d133eac49f41210e2fd4846f577d8 Author: Lukas Nykryn <lnykryn@redhat.com> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28Handle scsi Hyper-V devices properlyIan Stakenvicius
Hyper-V has an abstract bus, which gets renumbered on guest startup. So instead of the bus numbers we should be using the device GUIDs, which can be retrieved from the 'device_id' sysfs attribute. systemd commit a24d03b8ee2ca62cd1273e27cf4e79ddcc0fbb1c Author: Hannes Reinecke <hare@suse.de> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28Port new net_id capabilities from systemd-udev-197Ian Stakenvicius
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28Honor DEVUID, DEVGID in addition to DEVMODEIan Stakenvicius
New behaviour in udev-197 systemd commit 1edefa4f1d7bae6cc19aa4a97238400c5a04f7a4 Author: Kay Sievers <kay@vrfy.org> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28Fix missing endian wrappersIan Stakenvicius
https://bugs.freedesktop.org/show_bug.cgi?id=58067 systemd commit f4443fa5976eca51661947dd4df60847213f27fa Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28save a line of codeIan Stakenvicius
This mainly just helps keep diff's between eudev and systemd a little more clean, but it does drop one line of duplicate code. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28Abort udev_enumerate_new if udev obj is nullIan Stakenvicius
https://bugs.freedesktop.org/show_bug.cgi?id=58289 systemd commit e68893075083a7461b1572233d23fdb23541d630 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-28Add missing selinux code to udev core (convenience lib)Ian Stakenvicius
Original Author: Alexey D. (TZ86) Signed-off-by: Ian Stakenvicius <axs@gentoo.org> Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>
2013-01-23src/libudev/util.c: fix typo introduce at commit 1ebf647Anthony G. Basile
The first argument of fcntl should be 'fd', the file descriptor. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-21Fall back on POSIX mkstemp() for systems lacking mkostemp()Anthony G. Basile
We add an autotools check to use mkstemp() and fcntl() when mkostemp() is missing. This is not strictly equivalent because we have no way of setting the file access mode O_WRONLY flag, but that should produce no functional difference. Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-21Forward-port of libudev.so.0 code from libudev-171Ian Stakenvicius
Add --enable-legacylib option to configure, allowing for build and installation of libudev.so.0 shared library for supporting pre-udev-183 software. Library is installed to rootlibdir. Note that this legacy library will not be maintained, and should not be used for anything other than supporting a working system until all software on the system is migrated to use libudev.so.1 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-21Remove the remaining systemd code since it is not needed anymoreIan Stakenvicius
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-21Make all udev tools dynamically link to libudev.soIan Stakenvicius
Move libudev.so back to $(rootlibdir) for lvm2 support, and have all udev tools dynamically link to it. The symbol versioning and hidden-visibility on libudev were modified accordingly: we rebase against the public LIBUDEV_196 symbol versioning, and marked all other symbols (which used to be local) as LIBUDEV_internal. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-20Comment out sd_is_mq()Richard Yao
sd_is_mq() calls mq_getattr, which requires -lrt on systems using uclibc. Ordinarily, I would write an autotools check to handle this, but we do not use this code for anything, so I am commenting it out until a decision on the fate of this code is made. Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Anthony G. Basile <blueness@gentoo.org> temp
2013-01-20Switch to dup2 from dup3Richard Yao
dup3() was being used in a situation where dup2() would suffice. uclibc does not support dup3(), so we switch to dup2(). Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-14Make binaries report udev version compatibility version instead of eudev versionRichard Yao
Software such as dracut performs a sanity check on udev by querying the udev tools for the version. Reporting the eudev version causes this check to fail, so we resort to reporting the udev compatibility versionj. Signed-off-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-01-07The only functional changes in systemd-udev-196Ian Stakenvicius
As far as I can tell these are the only functional changes between the current eudev codebase and the codebase of systemd-196, in relation to udev hwdb code. There are some code style differences, and a number of error-trap-and-log lines that are not present, but that's about it Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-07Added LIBUDEV_196 symbol versioningIan Stakenvicius
systemd-udev-196 added four more functions to their libudev.sym under the LIBUDEV_196 version; consumers such as udisks use the symbol versions at link time and so it is absolutely necessary for us to provide the same symbol versioning and functions in order to provide compatibility. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-01-04Fix bugs in execv() calls to modprobeIan Stakenvicius
Change the execv() call to an execvp() call so that --with-modprobe="modprobe" is supported; also added the command as argv[0] in the call to execvp(), which fixes the failures when 'modprobe' is a symlink to kmod Signed off by ryao
2012-12-27cgroup: factorize pathLuca Barbato
Spare few bytes and make typos less likely.
2012-12-17Fixed some cosmetic naming in log entriesIan Stakenvicius
2012-12-12Changed --enable-split-usr to add hard-coded paths for rules etc in both / ↵Ian Stakenvicius
and /usr This is necessary because the code originally defined paths assuming UDEV_LIBEXECDIR was /usr prefixed, and also that udevrulesdir was located in /etc. Since (1) both of these defaults have changed, and (2) they could be set to more or less anything, we want to ensure that there is support for the standard paths as well, irrespective of what UDEV_LIBEXECDIR and UDEV_RULES_DIR are set to. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-12-08Add fallback path when accept4() is not available.Richard Yao
Commit ff2c503df091e6e4e9ab48cdb6df6ec8b7b525d0 introduced accept4() into udev, which broke compatibility with kernels older than Linux 2.6.32 (or Linux 2.6.36 on ARM). The purpose of accept4() is to permit O_NONBLOCK and O_CLOEXEC to be specified at the accept() call site while previously, they had to be set using fcntl() because Linux does not inherit them. Since accept4() increases the minimum kernel version, we add a fallback path for situations in which it is unavailable. Reported-by: Stephen Klimaszewski <steev@gentoo.org> Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-12-02Use udev version instead of eudev version for compatibilityRichard Yao
The use of the eudev version in pkgconfig files caused build failures, so we switch to the udev version for compatibility purposes. Resolves gentoo/eudev#22 Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-12-01Add & Update include paths to gudev/Makefile.amNick Vinson
libgudev-1.0.la and gudev-1.0.gir fail to build because GCC cannot find the needed header files (e.g. gudevenumtypes.h). To fix this, the include path $(top_buildir)/src was added and 'gdev' was replaced with 'gudev' in all relevant include paths.
2012-12-01Include config.h in src/libudev/Makefile.am to provide needed #define'sAnthony G. Basile
This commit provides needed #define's that provide structures that are found at configure time. It also reverts commit 91ce21b2d7978837b233e152ac63863a910eaf21 to avoid redefinitions of _GNU_SOURCE. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-12-01Put libudev.so under ${prefix} so tools in rootprefix don't link to itIan Stakenvicius
This is a combination of commits: bc7e89950323f635196c3c8eeebbe77af4307967 cde38f304f1cba616dfad4eb2608e8ec1a163f61 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-12-01Put symbol versioning back, ensured libudev.sym is distributedIan Stakenvicius
This is a combination of commits 67fd630e5fadeed8e0e96d396a9ebdc5f677fe98 f3666f76d5bf08572e001d1cee37e142b1a1be8f Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-12-01Fix glibc-isms with #define _GNU_SOURCEIan Stakenvicius
This is a combination of commits c9485bf12eafad22dbe316ccbf3a9506d4cace66 abd4a3a3bf5851f07cac6665f35c8b92279c4a47 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-12-01Moved files to libudev that once were in upstream libsystemd-sharedIan Stakenvicius
2012-12-01drop ACL support, udev-acl is in consolekit upstreamIan Stakenvicius
2012-11-26Add $(BUILT_SOURCES) to src/keymap/Makefile.am's CLEANFILES variable.Nick Vinson
When run, 'make distcheck' verifies that no files remain in the build directory. However, 'make distcheck' does not automatically delete $(BUILT_SOURCES) by default which causes this check to fail. Adding $(BUILT_SOURCS) to CLEANFILES corrects this behavior. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-11-26adjusted libudev.pc.in to use the correct libdir (rootlibdir)Ian Stakenvicius
2012-11-26changed install path for libudev to 'rootlibdir' instead of 'libdir'Ian Stakenvicius
2012-11-25Fix up building gudev and introspection under make distcheckAnthony G. Basile
This commit makes sure that src/gudev/gudevprivate.h is included in the distribution, fixing a failure in building gudev with `make distcheck`. There's also some code cleanup and migration of all configurable paths to the main configure.ac file. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-11-25Fix compilation of gudev and introspectionAnthony G. Basile
This commit the related issues of building gudev with/out introspection. It draws on suggestions from nvinson in https://github.com/gentoo/eudev/pull/20 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>