summaryrefslogtreecommitdiff
path: root/src/libudev
AgeCommit message (Collapse)Author
2014-02-13everywhere: make use of new0() and macro() macros, and stop using perror()Lennart Poettering
2014-01-31use memzero(foo, length); for all memset(foo, 0, length); callsGreg KH
In trying to track down a stupid linker bug, I noticed a bunch of memset() calls that should be using memzero() to make it more "obvious" that the options are correct (i.e. 0 is not the length, but the data to set). So fix up all current calls to memset(foo, 0, length) to memzero(foo, length).
2013-12-23libudev: ship the original MurmurHash2.[ch] fileKay Sievers
2013-12-19remove unused variableThomas Hindoe Paaboel Andersen
2013-12-18libudev: monitor - only disallow "udev" type eventsKay Sievers
2013-12-18libudev: disable monitor inside a containerKay Sievers
Uevents are events of the host, which should not leak into a container. Containers do not support hotplug at the moment, and devices and uevents are not namespace aware.
2013-12-18bus: catch up with kdbus changesKay Sievers
2013-12-18libudev: devices received from udev are always initializedKay Sievers
2013-12-14Add more _printf_'s for format-nonliteralsThomas Hindoe Paaboel Andersen
Clang is a bit more strict wrt format-nonliterals: http://clang.llvm.org/docs/LanguageExtensions.html#format-string-checking Adding these extra printf attributes also makes gcc able to find more problems. E.g. this patch uncovers a format issue in udev-builtin-path_id.c Some parts looked intetional about breaking the format-nonliteral check. I added some supression for warnings there.
2013-12-10libudev: hwdb - use libudev not systemd loggingKay Sievers
2013-11-30docs: remove unneeded the's in gudev docsZbigniew Jędrzejewski-Szmek
https://bugs.freedesktop.org/show_bug.cgi?id=72164
2013-11-20libudev: always return NULL in _unref() APIsLennart Poettering
Returning anything else but NULL would suggest the caller's reference might still be valid, but it isn't, because the caller just invoked _unref() after all. This turns the return value into a typesafe shortcut that allows unreffing and resetting a reference in one line. In contrast to solutions for this which take a pointer to a pointer to accomplish the same this solution is just syntactic sugar the developer can make use of but doesn't have to, and this is particularly useful when immediately unreffing objects returned by function calls.
2013-11-20libudev: always return valid negative error codes on API functionsLennart Poettering
2013-11-18Remove duplicate includesKarel Zak
2013-11-13udev: declare some symbols staticKay Sievers
2013-11-12udev: declare some symbols staticKay Sievers
2013-10-30libudev: default log_priority to INFOTom Gundersen
This brings it in sync with the default config file.
2013-10-16macro: clean up usage of gcc attributesLennart Poettering
Always use our own macros, and name all our own macros the same style.
2013-10-15build-sys: libudev - get rid of the needless selinux linking (again)Kay Sievers
2013-10-13Never call qsort on potentially NULL arraysZbigniew Jędrzejewski-Szmek
This extends 62678ded 'efi: never call qsort on potentially NULL arrays' to all other places where qsort is used and it is not obvious that the count is non-zero.
2013-09-19device-nodes: move device node specific code to own fileDave Reisner
In the process, rename udev_encode_string which is poorly named for what it does. It deals specifically with encoding names that udev creates and has its own rules: utf8 is valid but some ascii is not (e.g. path separators), and everything else is simply escaped. Rename it to encode_devnode_name.
2013-09-17libudev: add missing 'global' to symbol exportKay Sievers
2013-09-17move utf8 functions from libudev-private.h to utf8.hDave Reisner
There's now some more obvious overlap amongst the two utf8 validation functions, but no more than there already was previously. This also adds some menial tests for anyone who wants to do more merging of these two in the future.
2013-09-13libudev: fix move_later comparisonLukas Nykryn
At the beginning move_later is set to -1, but it is set to different value only if expression !move_later is true.
2013-09-04libudev: enumerate - do not try to match against an empty subsystemKay Sievers
2013-09-04libudev: enumerate: fix NULL-deref for subsystem-matchesDavid Herrmann
udev_device_get_subsystem() may return NULL if no subsystem could be figured out by libudev. This might be due to OOM or if the device disconnected between the udev_device_new() call and udev_device_get_subsystem(). Therefore, we need to handle subsystem==NULL safely. Instead of testing for it in each helper, we treat subsystem==NULL as empty subsystem in match_subsystem(). Backtrace of udev_enumerate with an input-device disconnecting in exactly this time-frame: (gdb) bt #0 0x00007ffff569dc24 in strnlen () from /usr/lib/libc.so.6 #1 0x00007ffff56d9e04 in fnmatch@@GLIBC_2.2.5 () from /usr/lib/libc.so.6 #2 0x00007ffff5beb83d in match_subsystem (udev_enumerate=0x7a05f0, subsystem=0x0) at src/libudev/libudev-enumerate.c:727 #3 0x00007ffff5bebb30 in parent_add_child (enumerate=enumerate@entry=0x7a05f0, path=<optimized out>) at src/libudev/libudev-enumerate.c:834 #4 0x00007ffff5bebc3f in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=0x7a56b0 "/sys/devices/<shortened>/input/input97", maxdepth=maxdepth@entry=254) at src/libudev/libudev-enumerate.c:866 #5 0x00007ffff5bebc54 in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=0x79e8c0 "/sys/devices/<shortened>/input", maxdepth=maxdepth@entry=255) at src/libudev/libudev-enumerate.c:868 #6 0x00007ffff5bebc54 in parent_crawl_children (enumerate=enumerate@entry=0x7a05f0, path=path@entry=0x753190 "/sys/devices/<shortened>", maxdepth=maxdepth@entry=256) at src/libudev/libudev-enumerate.c:868 #7 0x00007ffff5bec7df in scan_devices_children (enumerate=0x7a05f0) at src/libudev/libudev-enumerate.c:882 #8 udev_enumerate_scan_devices (udev_enumerate=udev_enumerate@entry=0x7a05f0) at src/libudev/libudev-enumerate.c:919 #9 0x00007ffff5df8777 in <random_caller> () at some/file.c:181
2013-09-04libudev: fix memleak when enumerating childsDavid Herrmann
We need to free udev-devices again if they don't match. Funny that no-one noticed it yet since valgrind is quite verbose about it. Fix it and free non-matching devices.
2013-08-19libudev-enumerate.c:udev_enumerate_get_list_entry() fixed possible stale pointerHarald Hoyer
If a realloc() happens in syspath_add(), the move_later pointer could point to an invalid memory region. Let move_later store the array index, instead of the pointer to the entry.
2013-08-15typo fixes in man and commentsThomas Hindoe Paaboel Andersen
2013-08-15libudev: fix hwdb validation to look for the *new* fileKay Sievers
2013-07-01hwdb: add --device=<device-id> and --filter=<key name glob>Kay Sievers
2013-07-01hwdb: remove support for (not fully implemented) conditional propertiesKay Sievers
2013-06-10Use stdint.h macros instead of casts to print uint64_t valuesZbigniew Jędrzejewski-Szmek
Casts are visually heavy, and can obscure unwanted truncations.
2013-04-16libudev: remove udev_monitor_new_from_socket() symbolMichael Biebl
This function was removed in v183, so drop it from the symbols versioning file.
2013-04-09libudev: Move -lrt to Libs.privateMichael Biebl
It's only needed for static linking. https://bugs.freedesktop.org/show_bug.cgi?id=63309
2013-03-31Remove some dead codeZbigniew Jędrzejewski-Szmek
Based on coverity report.
2013-03-20libudev: avoid potential misaligned accessesJan Engelhardt
clang reports: src/libudev/libudev-util.c:665:35: warning: cast from "const unsigned char *" to "unsigned int *" increases required alignment from 1 to 4 [-Wcast-align]
2013-03-20libude: remove special handling of "device" link, it should not be usedKay Sievers
2013-03-13libudev: implement udev_device_set_attribute_value()Hannes Reinecke
2013-02-13use streq instead of strcmpThomas Hindoe Paaboel Andersen
2013-02-13use strneq instead of strncmpThomas Hindoe Paaboel Andersen
2013-02-07udev: remove HWDB_BINKay Sievers
2013-01-09udev: move string copy functions to shared/Kay Sievers
2013-01-04udev: net_id - append "dev_id" value if neededKay Sievers
2012-12-31udev: in addition to DEVMODE, honor DEVUID, DEVGID from the ueventKay Sievers
2012-12-17Fix "attribute 'packed' is ignored" warnings when using ClangRichard Yao
Clang 3.1 warned that "attribute 'packed' is ignored". This stems from placing "__attribute__ ((packed))" at the start of structure declarations when common practice is to place it at the end. Signed-off-by: Richard Yao <ryao@gentoo.org>
2012-12-14libudev: validate 'udev' argument to udev_enumerate_new()Michael Terry
https://bugs.freedesktop.org/show_bug.cgi?id=58289
2012-12-11libudev: hwdb: add missing endianess conversionEric Benoit
https://bugs.freedesktop.org/show_bug.cgi?id=58067
2012-11-20libudev: do not resolve $attr{device} symlinksKay Sievers
2012-11-16hwdb: use $(localstatedir)/lib/udev/hwdb.bin for the binary databaseZbigniew Jędrzejewski-Szmek
It's not configuration, so it doesn't belong in udev. Also, remove the catalog when uninstalling udev.