platform/upstream/systemd.git
6 years agotest-process-util: logs something when skipping tests
Yu Watanabe [Thu, 20 Sep 2018 07:09:05 +0000 (16:09 +0900)]
test-process-util: logs something when skipping tests

6 years agosd-hwdb: initialize variable
Yu Watanabe [Thu, 20 Sep 2018 07:38:19 +0000 (16:38 +0900)]
sd-hwdb: initialize variable

The variable 'fn' was not initialized on compat mode.

Fixes CID#1395731.

6 years agotmpfiles: Order tmpfiles-setup after journald
João Paulo Rechi Vita [Tue, 18 Sep 2018 22:03:54 +0000 (15:03 -0700)]
tmpfiles: Order tmpfiles-setup after journald

systemd-tmpfiles-setup.service needs to be ordered after
systemd-journald.service, so entries in /run/log/journal are already
created when systemd-tmpfiles tries to adjust its permissions.

This is specially problematic for setups using a volatile journal where
the initrd does not ship a machine-id (i.e. OSTree-based systems), where
logs from the initrd will be inaccessible for users in the
systemd-journal group. It also has a side effect of `journalctl --user`
failing with "No journal files were opened due to insufficient
permissions".

Fixes #10128.

6 years agomeson: fix dirname/basename confusion in meson-and-wants.sh install helper (#10126)
Zbigniew Jędrzejewski-Szmek [Thu, 20 Sep 2018 07:01:58 +0000 (09:01 +0200)]
meson: fix dirname/basename confusion in meson-and-wants.sh install helper (#10126)

We would create a useless empty directory under build/.
It seems we were lucky and all symlinks were installed into directories
which were alredy created because we installed something into the same
location earlier.

While at it, also add '-v' to 'mkdir -p'. This will print the names of
directories as they are created (just once), making it easier to see all of
what the install script is doing.

6 years agoMerge pull request #10113 from yuwata/unify-hwdb
Zbigniew Jędrzejewski-Szmek [Wed, 19 Sep 2018 11:34:01 +0000 (13:34 +0200)]
Merge pull request #10113 from yuwata/unify-hwdb

hwdb,udevadm: unify duplicated code and move it to hwdb-util.c

6 years agohwdb,udevadm: also unify hwdb_query() and hwdb_test()
Yu Watanabe [Tue, 18 Sep 2018 14:14:18 +0000 (23:14 +0900)]
hwdb,udevadm: also unify hwdb_query() and hwdb_test()

6 years agosd-hwdb: use structured initializers
Yu Watanabe [Tue, 18 Sep 2018 14:09:43 +0000 (23:09 +0900)]
sd-hwdb: use structured initializers

6 years agohwdb: unify duplicated code and move it to hwdb-util.c
Yu Watanabe [Tue, 18 Sep 2018 13:57:45 +0000 (22:57 +0900)]
hwdb: unify duplicated code and move it to hwdb-util.c

Both 'systemd-hwdb update' and 'udevadm hwdb --update' creates hwdb
database. The database created by systemd-hwdb containes additional
information such that priority, line number, and source filename.
The unified function 'hwdb_update()' can take a flag 'compat' which
controls the format version of created database.

6 years agosd-hwdb: adjust included headers
Yu Watanabe [Tue, 18 Sep 2018 04:37:51 +0000 (13:37 +0900)]
sd-hwdb: adjust included headers

6 years agohwdb: use _cleanup_ attribute at one more place
Yu Watanabe [Tue, 18 Sep 2018 03:50:33 +0000 (12:50 +0900)]
hwdb: use _cleanup_ attribute at one more place

6 years agohwdb: make trie_node_cleanup() can take NULL
Yu Watanabe [Tue, 18 Sep 2018 03:49:51 +0000 (12:49 +0900)]
hwdb: make trie_node_cleanup() can take NULL

6 years agoRemove trailing space
javitoom [Wed, 19 Sep 2018 07:29:25 +0000 (09:29 +0200)]
Remove trailing space

Remove trailing space

6 years agohwdb: Add accelerometer orientation quirk for the Teclast X98 Plus I (A5C6) tablet
javitoom [Mon, 17 Sep 2018 14:48:41 +0000 (16:48 +0200)]
hwdb: Add accelerometer orientation quirk for the Teclast X98 Plus I (A5C6) tablet

Add accelerometer orientation quirk for the Teclast X98 Plus I (A5C6) tablet.

6 years agonspawn: suppress one more log message when --quiet is passed
Yu Watanabe [Tue, 18 Sep 2018 23:42:01 +0000 (08:42 +0900)]
nspawn: suppress one more log message when --quiet is passed

Fixes #10119.

6 years agoSupport for Kensington Expert Mouse in hwdb
Tony Novak [Tue, 18 Sep 2018 20:17:08 +0000 (16:17 -0400)]
Support for Kensington Expert Mouse in hwdb

Fixes #10120.

6 years agoMerge pull request #10112 from yuwata/typesafe-qsort
Zbigniew Jędrzejewski-Szmek [Wed, 19 Sep 2018 06:15:58 +0000 (08:15 +0200)]
Merge pull request #10112 from yuwata/typesafe-qsort

tree-wide: use typesafe_qsort() or friends

6 years agobusctl,sd-lldp: explicitly specify type of argument in compare function
Yu Watanabe [Tue, 18 Sep 2018 23:28:50 +0000 (08:28 +0900)]
busctl,sd-lldp: explicitly specify type of argument in compare function

Several functions are shared by qsort and hash_ops or Prioq.
This makes these functions explicitly specify argument type,
and cast to __compar_fn_t where necessary.

6 years agotree-wide: use typesafe_bsearch() or typesafe_bsearch_r()
Yu Watanabe [Tue, 18 Sep 2018 02:08:23 +0000 (11:08 +0900)]
tree-wide: use typesafe_bsearch() or typesafe_bsearch_r()

6 years agoutil: introduce typesafe_bsearch() and typesafe_bsearch_r()
Yu Watanabe [Tue, 18 Sep 2018 02:05:20 +0000 (11:05 +0900)]
util: introduce typesafe_bsearch() and typesafe_bsearch_r()

6 years agotree-wide: use typesafe_qsort_r()
Yu Watanabe [Mon, 17 Sep 2018 23:58:42 +0000 (08:58 +0900)]
tree-wide: use typesafe_qsort_r()

6 years agoutil: introduce typesafe_qsort_r()
Yu Watanabe [Mon, 17 Sep 2018 23:58:21 +0000 (08:58 +0900)]
util: introduce typesafe_qsort_r()

6 years agotree-wide: use typesafe_qsort()
Yu Watanabe [Mon, 17 Sep 2018 23:39:24 +0000 (08:39 +0900)]
tree-wide: use typesafe_qsort()

6 years agodetect-virt: do not try to read all of /proc/cpuinfo
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 07:24:36 +0000 (09:24 +0200)]
detect-virt: do not try to read all of /proc/cpuinfo

Quoting https://github.com/systemd/systemd/issues/10074:
> detect_vm_uml() reads /proc/cpuinfo with read_full_file()
> read_full_file() has a file max limit size of READ_FULL_BYTES_MAX=(4U*1024U*1024U)
> Unfortunately, the size of my /proc/cpuinfo is bigger, approximately:
> echo $(( 4* $(cat /proc/cpuinfo | wc -c)))
> 9918072
> This causes read_full_file() to fail and the Condition test fallout.

Let's just read line by line until we find an intersting line. This also
helps if not running under UML, because we avoid reading as much data.

6 years agoverbs: reset optind (#10116)
Yu Watanabe [Tue, 18 Sep 2018 14:24:58 +0000 (23:24 +0900)]
verbs: reset optind (#10116)

optind may be used in each verb, e.g., udevadm. So, let's initialize
optind before calling verbs.

Without this, e.g., udevadm -d hwdb --update causes error in parsing arguments.

6 years agocore: fix the check if CONFIG_CGROUP_BPF is on
Alexander Filippov [Mon, 17 Sep 2018 09:49:40 +0000 (12:49 +0300)]
core: fix the check if CONFIG_CGROUP_BPF is on

Since the commit torvalds/linux@fdb5c4531c1e0e50e609df83f736b6f3a02896e2
the syscall BPF_PROG_ATTACH return EBADF when CONFIG_CGROUP_BPF is
turned off and as result the bpf_firewall_supported() returns the
incorrect value.

This commmit replaces the syscall BPF_PROG_ATTACH with BPF_PROG_DETACH
which is still work as expected.

Resolves openbmc/linux#159
See also systemd/systemd#7054

Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
6 years agoMerge pull request #10114 from yuwata/namespace-logs
Zbigniew Jędrzejewski-Szmek [Tue, 18 Sep 2018 09:21:59 +0000 (11:21 +0200)]
Merge pull request #10114 from yuwata/namespace-logs

namespace: log message cleanups

6 years agocore/execute: do not use the negative errno when setup_namespace() returns -ENOANO
Yu Watanabe [Wed, 5 Sep 2018 06:12:37 +0000 (15:12 +0900)]
core/execute: do not use the negative errno when setup_namespace() returns -ENOANO

Without this, log shows meaningless error message 'No anode', e.g.,
===
Failed to unshare the mount namespace: Operation not permitted
foo.service: Failed to set up mount namespacing: No anode
foo.service: Failed at step NAMESPACE spawning /usr/bin/test: No anode
===

Follow-up for 1beab8b0d0ff2d7d1436b52d4a0c3d56dc908962.

6 years agocore/namespace: add more log messages
Yu Watanabe [Mon, 3 Sep 2018 15:31:05 +0000 (00:31 +0900)]
core/namespace: add more log messages

6 years agodoc: Fix link to CONTRIBUTING.md (#10109)
Jon Ringle [Tue, 18 Sep 2018 03:29:36 +0000 (23:29 -0400)]
doc: Fix link to CONTRIBUTING.md (#10109)

6 years agotests: make UBSan print full backtraces
Evgeny Vereshchagin [Sat, 15 Sep 2018 14:21:33 +0000 (14:21 +0000)]
tests: make UBSan print full backtraces

This should make it easier to get backtraces that can be
pasted into issues like https://github.com/systemd/systemd/issues/10096.

6 years agosd-device: use qsort_safe() (#10099)
Yu Watanabe [Sun, 16 Sep 2018 14:46:58 +0000 (23:46 +0900)]
sd-device: use qsort_safe() (#10099)

The number of found devices may be zero. So, let's use qsort_safe().

Follow-up for 0a1665890cec06032a17c16206e9f519ca88446e.
Fixes #10096.

6 years agoMerge pull request #9928 from yuwata/libudev-cleanups
Zbigniew Jędrzejewski-Szmek [Sat, 15 Sep 2018 20:36:38 +0000 (22:36 +0200)]
Merge pull request #9928 from yuwata/libudev-cleanups

libudev: coding style updates

6 years agoMerge pull request #9958 from yuwata/sd-device-enum-set
Zbigniew Jędrzejewski-Szmek [Sat, 15 Sep 2018 16:33:18 +0000 (18:33 +0200)]
Merge pull request #9958 from yuwata/sd-device-enum-set

sd-device: make sd_device_enumerator_get_*_next() not destroy the list

6 years agoMerge pull request #10070 from keszybz/test-reporting
Yu Watanabe [Sat, 15 Sep 2018 06:55:15 +0000 (15:55 +0900)]
Merge pull request #10070 from keszybz/test-reporting

Test reporting improvements

6 years agoMerge pull request #10089 from yuwata/fix-oss-fuzz-10350
Evgeny Vereshchagin [Sat, 15 Sep 2018 02:36:44 +0000 (05:36 +0300)]
Merge pull request #10089 from yuwata/fix-oss-fuzz-10350

bus-util: use _printf_ attribute

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10350.

6 years agotest-catalog: drop unused variable
Yu Watanabe [Fri, 14 Sep 2018 16:58:50 +0000 (01:58 +0900)]
test-catalog: drop unused variable

Follow-up for 49cdae63d168b2fe0e19f9f090b90d79de3c39bb.

6 years agobus-util: use _printf_ attribute
Yu Watanabe [Fri, 14 Sep 2018 16:49:29 +0000 (01:49 +0900)]
bus-util: use _printf_ attribute

Follow-up for eda193578effbc3cee0f6d56ade52434778737c9.

Fixes oss-fuzz#10350.

6 years agosocket-util: attempt SO_RCVBUFFORCE/SO_SNDBUFFORCE only if SO_RCVBUF/SO_SNDBUF fails
Franck Bui [Fri, 14 Sep 2018 07:24:08 +0000 (09:24 +0200)]
socket-util: attempt SO_RCVBUFFORCE/SO_SNDBUFFORCE only if SO_RCVBUF/SO_SNDBUF fails

Both SO_SNDBUFFORCE and SO_RCVBUFFORCE requires capability 'net_admin'.

If this capability is not granted to the service the first attempt to increase
the recv/snd buffers (via sd_notify()) with SO_RCVBUFFORCE/SO_SNDBUFFORCE will
fail, even if the requested size is lower than the limit enforced by the
kernel.

If apparmor is used, the DENIED logs for net_admin will show up. These log
entries are seen as red warning light, because they could indicate that a
program has been hacked and tries to compromise the system.

It would be nicer if they can be avoided without giving services (relying on
sd_notify) net_admin capability or dropping DENIED logs for all such services
via their apparmor profile.

I'm not sure if sd_notify really needs to forcibly increase the buffer sizes,
but at least if the requested size is below the kernel limit, the capability
(hence the log entries) should be avoided.

Hence let's first ask politely for increasing the buffers and only if it fails
then ignore the kernel limit if we have sufficient privileges.

6 years agoMerge pull request #9920 from yuwata/udev-cleanup-4
Zbigniew Jędrzejewski-Szmek [Fri, 14 Sep 2018 08:05:59 +0000 (10:05 +0200)]
Merge pull request #9920 from yuwata/udev-cleanup-4

udev: drop unused udev structs and use verbs in udevadm

6 years agotests: add a helper function to skip with errno
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 14:11:16 +0000 (16:11 +0200)]
tests: add a helper function to skip with errno

6 years agotests: use a helper function to parse environment and open logging
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 12:31:13 +0000 (14:31 +0200)]
tests: use a helper function to parse environment and open logging

The advantages are that we save a few lines, and that we can override
logging using environment variables in more test executables.

6 years agotest-condition: make function return void
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 11:35:03 +0000 (13:35 +0200)]
test-condition: make function return void

We don't look at the result anyway.

6 years agotests: add helper to unify skipping a test and exiting
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 11:34:12 +0000 (13:34 +0200)]
tests: add helper to unify skipping a test and exiting

6 years agoman: fix typo (#10084)
Harshit Jain [Fri, 14 Sep 2018 07:04:10 +0000 (12:34 +0530)]
man: fix typo (#10084)

fixes #10083

6 years agouser-runtime-dir@.service: don't stop on runlevel switch (#10079)
Alan Jenkins [Fri, 14 Sep 2018 03:11:57 +0000 (04:11 +0100)]
user-runtime-dir@.service: don't stop on runlevel switch (#10079)

Followup to commit 13cf422e04b7 ("user@.service: don't kill user manager at runlevel switch")

I think there's a general rule that units with `StopWhenUnneeded=yes` need
`IgnoreOnIsolate=yes`...  But it doesn't apply to `suspend.target` and friends.
`printer.target` and friends break on isolate even if we apply the rule[1].
That just leaves `graphical-session.target`, which is a user service.
"isolate" is *mostly* a weird attempt to emulate runlevels, so I decided
not to worry about it for user services.

[1] https://github.com/systemd/systemd/issues/6505#issuecomment-320644819

6 years agoreplace https://github.com/systemd/systemd/blob/master/doc/* with https://github...
killermoehre [Thu, 13 Sep 2018 11:53:03 +0000 (13:53 +0200)]
replace https://github.com/systemd/systemd/blob/master/doc/* with https://github.com/systemd/systemd/blob/master/docs/* to point to proper documentation

6 years agouser@.service: don't kill user manager at runlevel switch
Thomas Blume [Wed, 12 Sep 2018 13:10:58 +0000 (15:10 +0200)]
user@.service: don't kill user manager at runlevel switch

Loggin in as root user and then switching the runlevel results in a
stop of the user manager, even though the user ist still logged in.
That leaves a broken user session.

Adding "IgnoreOnIsolate=true" to user@.service fixes this.

6 years agotest: unset $XDG_{CONFIG,DATA}_DIRS
Yu Watanabe [Thu, 13 Sep 2018 07:37:33 +0000 (16:37 +0900)]
test: unset $XDG_{CONFIG,DATA}_DIRS

When $XDG_DATA_DIRS is unset, then, the default value
'/usr/local/share:/usr/share' is used.
When $XDG_DATA_DIRS contain the default paths but the order
is inverted: '/usr/share:/usr/local/share', then test-path-lookup fails.

Fixes #10002.

6 years agomeson: drop some unneeded parens
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 14:57:06 +0000 (16:57 +0200)]
meson: drop some unneeded parens

6 years agomeson: always allow compilation of tests binaries
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 14:52:08 +0000 (16:52 +0200)]
meson: always allow compilation of tests binaries

6 years agoNEWS: remove repeated "slightly"
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 14:11:15 +0000 (16:11 +0200)]
NEWS: remove repeated "slightly"

6 years agomeson: do not build tests by default when '-Dtests=false'
Yu Watanabe [Wed, 12 Sep 2018 12:47:56 +0000 (21:47 +0900)]
meson: do not build tests by default when '-Dtests=false'

[zj: it is still possible to build tests explicitly by calling
     ninja -C build test-name. This way we have full flexibility.]

6 years agotest: log when skipping tests in more cases
Yu Watanabe [Wed, 12 Sep 2018 12:52:31 +0000 (21:52 +0900)]
test: log when skipping tests in more cases

Follow-up for the previous commit.

6 years agotest: when skipping tests, always print something
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 11:25:45 +0000 (13:25 +0200)]
test: when skipping tests, always print something

It is quite confusing if the test "fails" without printing anything at all.

A typo in an 'if' statement is also fixed.

6 years agomeson: disable _all_ tests when -Dtests=false
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 09:08:49 +0000 (11:08 +0200)]
meson: disable _all_ tests when -Dtests=false

Back in 08318a2c5acb3d0e4243c36461e69a3e45482441, value "false" was enabled for
'-Dtests=', but various tests were not conditionalized properly. So even with
-Dtests=false -Dslow-tests=false we'd run 120 tests. Let's make this consistent.

6 years agomeson: disable "slow tests" too when tests are generally disabled
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 09:02:58 +0000 (11:02 +0200)]
meson: disable "slow tests" too when tests are generally disabled

We would have a strange situation where after setting -Dslow-tests=true -Dtests=false
we'd get mostly the slow tests (plus some other ones which I'll fix in
subsequent commit). Let's simplify things by making -Dtests=false just
disable those tests too.

6 years agotest-barrier: just make this a slow test
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 07:55:39 +0000 (09:55 +0200)]
test-barrier: just make this a slow test

test-barrier was using a custom mechanism to skip itself. Let's
just follow the normal scheme.

6 years agotests: centralize check for slow tests
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 07:45:17 +0000 (09:45 +0200)]
tests: centralize check for slow tests

6 years agoupdate TODO
Lennart Poettering [Wed, 12 Sep 2018 19:39:14 +0000 (21:39 +0200)]
update TODO

6 years agonspawn: use copy-static if systemd-resolved is up and image is writable
afg [Wed, 29 Aug 2018 01:20:27 +0000 (09:20 +0800)]
nspawn: use copy-static if systemd-resolved is up and image is writable

6 years agoMerge pull request #10061 from xnox/fix-logindless-scheduled-shutdown
Lennart Poettering [Wed, 12 Sep 2018 18:45:31 +0000 (20:45 +0200)]
Merge pull request #10061 from xnox/fix-logindless-scheduled-shutdown

Fix logindless scheduled shutdown

6 years agoMerge pull request #10060 from yuwata/property-take-value
Lennart Poettering [Wed, 12 Sep 2018 18:17:53 +0000 (20:17 +0200)]
Merge pull request #10060 from yuwata/property-take-value

bus-util: make --property= optionaly take value

6 years agotest: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIR
Filipe Brandenburger [Wed, 12 Sep 2018 07:23:40 +0000 (00:23 -0700)]
test: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIR

This makes it so that tests no longer need to know the absolute paths to the
source and build dirs, instead using the systemd-runtest.env file to get these
paths when running from the build tree.

Confirmed that test-catalog works on `ninja test`, when called standalone and
also when the environment file is not present, in which case it will use the
installed location under /usr/lib/systemd/catalog.

The location can now also be overridden for this test by setting the
$SYSTEMD_CATALOG_DIR environment variable.

6 years agotest: use ${builddir}/systemd-runtest.env to set $SYSTEMD_TEST_DATA
Filipe Brandenburger [Wed, 12 Sep 2018 06:55:02 +0000 (23:55 -0700)]
test: use ${builddir}/systemd-runtest.env to set $SYSTEMD_TEST_DATA

This simplifies get_testdata_dir() to simply checking for an environment
variable, with an additional function to locate a systemd-runtest.env file in
the same directory as the test binary and reading environment variable
assignments from that file if it exists.

This makes it possible to:
- Run `ninja test` from the build dir and have it use ${srcdir}/test for
  test unit definitions.
- Run a test directly, such as `build/test-execute` and have it locate
  them correctly.
- Run installed tests (from systemd-tests package) and locate the test
  units in the installed location (/usr/lib/systemd/tests/testdata), in
  which case the absence of the systemd-runtest.env file will have
  get_testdata_dir() use the installed location hardcoded into the
  binaries.

Explicit setting of $SYSTEMD_TEST_DATA still overrides the contents of
systemd-runtest.env.

6 years agotest: remove support for suffix in get_testdata_dir()
Filipe Brandenburger [Wed, 12 Sep 2018 06:15:09 +0000 (23:15 -0700)]
test: remove support for suffix in get_testdata_dir()

Instead, use path_join() in callers wherever needed.

6 years agoSet theme jekyll-theme-slate
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 09:51:27 +0000 (11:51 +0200)]
Set theme jekyll-theme-slate

6 years agobash-completion: systemctl: re-implement __filter_units_by_properties()
Yu Watanabe [Wed, 12 Sep 2018 03:36:22 +0000 (12:36 +0900)]
bash-completion: systemctl: re-implement __filter_units_by_properties()

This also unifies __filter_units_by_property() and
__filter_units_by_properties(), and makes completion for 'restart',
'reload' or 'stop' show more candidates.

6 years agobus-util: make --property= optionally take value
Yu Watanabe [Tue, 11 Sep 2018 08:18:14 +0000 (17:18 +0900)]
bus-util: make --property= optionally take value

6 years agoMerge pull request #10046 from yuwata/fix-10045
Michael Biebl [Tue, 11 Sep 2018 21:30:16 +0000 (23:30 +0200)]
Merge pull request #10046 from yuwata/fix-10045

test: use installed catalogs when test-catalog is not located at build dir

6 years agosystemctl: correctly proceed to immediate shutdown if scheduling fails
Dimitri John Ledkov [Tue, 11 Sep 2018 09:41:56 +0000 (10:41 +0100)]
systemctl: correctly proceed to immediate shutdown if scheduling fails

Actually check the return code from logind_schedule_shutdown() and proceed to
immediate shutdown if that fails. Negative return codes can be returned if
systemctl is compiled without logind support, or if logind otherwise failed
(either too old, disabled/masked, or it is incomplete
systemd-shim/systemd-service implementation).

6 years agosd-device,libudev: make an argument for *_set_sysattr_value() const
Yu Watanabe [Tue, 11 Sep 2018 03:42:18 +0000 (12:42 +0900)]
sd-device,libudev: make an argument for *_set_sysattr_value() const

6 years agolibudev-monitor: use assert_return() in many places
Yu Watanabe [Fri, 24 Aug 2018 08:12:04 +0000 (17:12 +0900)]
libudev-monitor: use assert_return() in many places

6 years agolibudev-monitor: add missing error checks in udev_monitor_enable_receiving()
Yu Watanabe [Fri, 24 Aug 2018 08:10:27 +0000 (17:10 +0900)]
libudev-monitor: add missing error checks in udev_monitor_enable_receiving()

6 years agolibudev-monitor: introduce udev_monitor_send_sd_device()
Yu Watanabe [Fri, 24 Aug 2018 08:05:22 +0000 (17:05 +0900)]
libudev-monitor: introduce udev_monitor_send_sd_device()

And use it in udev_monitor_send_device().

6 years agolibudev-monitor: re-implement udev_monitor_receive_sd_device()
Yu Watanabe [Fri, 24 Aug 2018 08:04:10 +0000 (17:04 +0900)]
libudev-monitor: re-implement udev_monitor_receive_sd_device()

6 years agolibudev-monitor: use Hashmap or Set to store filters
Yu Watanabe [Fri, 24 Aug 2018 08:00:40 +0000 (17:00 +0900)]
libudev-monitor: use Hashmap or Set to store filters

6 years agolibudev-monitor: use structured initializer
Yu Watanabe [Fri, 24 Aug 2018 07:51:58 +0000 (16:51 +0900)]
libudev-monitor: use structured initializer

6 years agolibudev-monitor: rename monitor_set_nl_address() and make it return negative errno
Yu Watanabe [Fri, 24 Aug 2018 07:47:30 +0000 (16:47 +0900)]
libudev-monitor: rename monitor_set_nl_address() and make it return negative errno

6 years agolibudev-monitor: rename udev_has_devtmpfs() and move it to mount-util.c
Yu Watanabe [Mon, 13 Aug 2018 08:59:44 +0000 (17:59 +0900)]
libudev-monitor: rename udev_has_devtmpfs() and move it to mount-util.c

As the function itself is quite generic.

6 years agolibudev-monitor: use structured initializer in bpf_*()
Yu Watanabe [Fri, 24 Aug 2018 07:43:01 +0000 (16:43 +0900)]
libudev-monitor: use structured initializer in bpf_*()

This also drop inline attribute from the functions.

6 years agolibudev-monitor: use 'unsigned' instead of 'unsigned int'
Yu Watanabe [Fri, 24 Aug 2018 07:40:47 +0000 (16:40 +0900)]
libudev-monitor: use 'unsigned' instead of 'unsigned int'

6 years agolibudev-device: create sd_device at first in udev_device_new_from_*()
Yu Watanabe [Fri, 24 Aug 2018 07:11:13 +0000 (16:11 +0900)]
libudev-device: create sd_device at first in udev_device_new_from_*()

6 years agolibudev-device: drop prototypes of unexistent functions
Yu Watanabe [Fri, 24 Aug 2018 05:44:01 +0000 (14:44 +0900)]
libudev-device: drop prototypes of unexistent functions

6 years agolibudev: drop a prototype of unexistent function
Yu Watanabe [Fri, 24 Aug 2018 05:43:43 +0000 (14:43 +0900)]
libudev: drop a prototype of unexistent function

6 years agolibudev-device: coding style fixes
Yu Watanabe [Fri, 24 Aug 2018 05:32:05 +0000 (14:32 +0900)]
libudev-device: coding style fixes

6 years agolibudev-device: fix return value of udev_device_has_tag()
Yu Watanabe [Fri, 24 Aug 2018 05:31:41 +0000 (14:31 +0900)]
libudev-device: fix return value of udev_device_has_tag()

6 years agolibudev-device: use original negative errno
Yu Watanabe [Fri, 24 Aug 2018 05:30:24 +0000 (14:30 +0900)]
libudev-device: use original negative errno

6 years agolibudev-device: use structured initializer
Yu Watanabe [Fri, 24 Aug 2018 05:16:43 +0000 (14:16 +0900)]
libudev-device: use structured initializer

6 years agolibudev-enumerate: use structured initializer
Yu Watanabe [Fri, 24 Aug 2018 05:09:17 +0000 (14:09 +0900)]
libudev-enumerate: use structured initializer

6 years agolibudev-hwdb: use assert_return_errno()
Yu Watanabe [Fri, 24 Aug 2018 04:57:58 +0000 (13:57 +0900)]
libudev-hwdb: use assert_return_errno()

6 years agolibudev-hwdb: use structured initializer
Yu Watanabe [Fri, 24 Aug 2018 04:57:04 +0000 (13:57 +0900)]
libudev-hwdb: use structured initializer

6 years agolibudev-hwdb: drop unused 'struct udev *udev' in udev_hwdb struct
Yu Watanabe [Fri, 24 Aug 2018 04:55:25 +0000 (13:55 +0900)]
libudev-hwdb: drop unused 'struct udev *udev' in udev_hwdb struct

6 years agolibudev-queue: coding style fixes
Yu Watanabe [Fri, 24 Aug 2018 04:43:59 +0000 (13:43 +0900)]
libudev-queue: coding style fixes

6 years agolibudev-queue: drop prototypes of nonexistent functions
Yu Watanabe [Fri, 24 Aug 2018 04:43:38 +0000 (13:43 +0900)]
libudev-queue: drop prototypes of nonexistent functions

6 years agolibudev-queue: use _cleanup_ attribute and TAKE_FD()
Yu Watanabe [Fri, 24 Aug 2018 04:42:18 +0000 (13:42 +0900)]
libudev-queue: use _cleanup_ attribute and TAKE_FD()

6 years agolibudev-queue: use assert_return()
Yu Watanabe [Fri, 24 Aug 2018 04:41:22 +0000 (13:41 +0900)]
libudev-queue: use assert_return()

6 years agolibudev-queue: use structured initializer
Yu Watanabe [Fri, 24 Aug 2018 04:39:46 +0000 (13:39 +0900)]
libudev-queue: use structured initializer

6 years agolibudev: modernize code a bit
Yu Watanabe [Tue, 28 Aug 2018 04:15:03 +0000 (13:15 +0900)]
libudev: modernize code a bit

6 years agolibudev: use structured initializer
Yu Watanabe [Tue, 28 Aug 2018 04:14:42 +0000 (13:14 +0900)]
libudev: use structured initializer

6 years agolibudev: drop unused element in udev struct
Yu Watanabe [Tue, 28 Aug 2018 04:14:02 +0000 (13:14 +0900)]
libudev: drop unused element in udev struct