1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-08 11:27:32 +03:00
Commit Graph

38 Commits

Author SHA1 Message Date
Thomas Hindoe Paaboel Andersen
c4ef05484d use correct format types 2014-12-11 21:47:06 +01:00
Lennart Poettering
154e6f233a libudev: set errno properly in all error conditions of udev_device_new_from_syspath() 2014-12-03 02:04:55 +01:00
Michal Schmidt
4a62c710b6 treewide: another round of simplifications
Using the same scripts as in f647962d64 "treewide: yet more log_*_errno
+ return simplifications".
2014-11-28 19:57:32 +01:00
Michal Schmidt
56f64d9576 treewide: use log_*_errno whenever %m is in the format string
If the format string contains %m, clearly errno must have a meaningful
value, so we might as well use log_*_errno to have ERRNO= logged.

Using:
find . -name '*.[ch]' | xargs sed -r -i -e \
's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/'

Plus some whitespace, linewrap, and indent adjustments.
2014-11-28 19:49:27 +01:00
Michal Schmidt
ff49bc3212 treewide: drop unnecessary trailing \n in log_*() calls 2014-11-28 14:26:31 +01:00
Kay Sievers
41b848b0ea udev: move global property handling from libudev to udevd 2014-11-13 13:50:01 +01:00
Kay Sievers
25e773eeb4 udev: switch to systemd logging functions 2014-11-13 13:12:57 +01:00
Robert Milasan
572016d1c2 udev: fix path for database names on 'change' event
If a device does not have a major/minor number attached, we use different
database names than if it does. On "change" events, we didn't copy the
devnum over, therefore, we used different paths than on 'add' or 'remove'
events (where devnum was properly copied).

Fix this by always copying the devnum into the udev-device.

(David: added commit-log from email)
2014-09-18 15:28:07 +02:00
David Herrmann
8e3ba3772c udev: allow removing tags via TAG-="foobar"
This extends the udev parser to support OP_REMOVE (-=) and adds support
for TAG-= to remove previously set tags. We don't fail if the tag didn't
exist.

This is pretty handy if we ship default rules for seat-assignments and
users want to exclude specific devices from that. They can easily add
rules that drop any automatically added "seat" tags again.
2014-09-11 15:22:16 +02:00
Tom Gundersen
aa0e72ea54 libudev: set errno when udev_device_new_from_* or udev_device_get_parent_* fail 2014-08-01 11:56:13 +02:00
Zbigniew Jędrzejewski-Szmek
de0671ee7f Remove unnecessary casts in printfs
No functional change expected :)
2014-05-15 15:29:58 +02:00
Lennart Poettering
955d98c9c1 everywhere: make use of new0() and macro() macros, and stop using perror() 2014-02-13 14:45:51 +01:00
Greg KH
29804cc1e0 use memzero(foo, length); for all memset(foo, 0, length); calls
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).
2014-01-31 11:55:01 +01:00
Kay Sievers
f6613dd959 libudev: devices received from udev are always initialized 2013-12-18 17:34:22 +01:00
Zbigniew Jędrzejewski-Szmek
572ce4f783 docs: remove unneeded the's in gudev docs
https://bugs.freedesktop.org/show_bug.cgi?id=72164
2013-11-30 20:27:54 -05:00
Lennart Poettering
725d7e6ceb libudev: always return NULL in _unref() APIs
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-20 19:36:14 +01:00
Lennart Poettering
994e023433 libudev: always return valid negative error codes on API functions 2013-11-20 19:36:14 +01:00
Kay Sievers
b26618399e udev: declare some symbols static 2013-11-13 03:34:24 +01:00
Thomas Hindoe Paaboel Andersen
5eec7de6ad typo fixes in man and comments 2013-08-15 23:38:09 +02:00
Kay Sievers
67410e9f73 hwdb: add --device=<device-id> and --filter=<key name glob> 2013-07-01 22:34:43 +02:00
Kay Sievers
53726349e1 libude: remove special handling of "device" link, it should not be used 2013-03-20 16:11:25 +01:00
Hannes Reinecke
946f182575 libudev: implement udev_device_set_attribute_value() 2013-03-13 17:44:45 +01:00
Kay Sievers
d5a89d7dc1 udev: move string copy functions to shared/ 2013-01-09 19:06:46 +01:00
Kay Sievers
1edefa4f1d udev: in addition to DEVMODE, honor DEVUID, DEVGID from the uevent 2012-12-31 04:48:44 +01:00
Kay Sievers
5ae18ddc0d libudev: do not resolve $attr{device} symlinks 2012-11-20 18:07:57 +01:00
Kay Sievers
88a6477ef3 libudev: update copyright headers 2012-11-12 17:50:33 +01:00
Kay Sievers
40fe8b11be udev: use usec_t and now() 2012-11-12 01:03:14 +01:00
Kay Sievers
8a1733871f udev: remove SYMLINK "unique" option 2012-10-08 21:54:39 +02:00
Thomas Hindoe Paaboel Andersen
c53158818d man: fix a bunch of typos in docs
https://bugs.freedesktop.org/show_bug.cgi?id=54501
2012-09-13 19:34:24 +02:00
Kay Sievers
dbf61afb29 udev: export udev_device_new_from_device_id() 2012-08-10 19:56:57 +02:00
Kay Sievers
4cb72937d3 udev: get rid of TEST_PREFIX and use unshare() to fake /sys, /dev, /run 2012-07-15 22:10:46 +02:00
Kay Sievers
c195956988 udev: update docs, NEWS 2012-05-15 23:44:28 +02:00
Kay Sievers
20bbd54f60 udev: libudev - bump soname, remove deprecated functions, introduce symbol versions 2012-05-15 23:06:26 +02:00
Kay Sievers
c8f8394a93 libudev: prefix log macros with 'udev_' 2012-04-26 17:43:48 +02:00
Kay Sievers
21dbe43aec docs: hook-up gtk-doc to 'make check' 2012-04-20 03:25:36 +02:00
Kay Sievers
33502ffe2e udev: use startswith() and streq() 2012-04-16 20:54:17 +02:00
Kay Sievers
6ada823a9a udev: remove configuration options for /dev, /sys, /run directories 2012-04-16 19:20:57 +02:00
Kay Sievers
bb061708d5 udev: move libudev, gudev to src/; move gudev/docs/, udev/docs/ to to docs/ 2012-04-13 19:22:06 +02:00