summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml4
-rw-r--r--Makefile.am420
-rw-r--r--README10
-rw-r--r--TODO2
-rwxr-xr-xautogen.sh13
-rw-r--r--configure.ac74
-rw-r--r--docs/.gitignore1
-rw-r--r--docs/gudev/.gitignore19
-rw-r--r--docs/gudev/Makefile.am115
-rw-r--r--docs/gudev/gudev-docs.xml52
-rw-r--r--docs/gudev/gudev-sections.txt102
-rw-r--r--docs/gudev/gudev.types4
-rw-r--r--docs/gudev/version.xml.in1
-rw-r--r--docs/libudev/.gitignore19
-rw-r--r--docs/libudev/Makefile.am109
-rw-r--r--docs/libudev/libudev-docs.xml40
-rw-r--r--docs/libudev/libudev-sections.txt137
-rw-r--r--docs/libudev/libudev.types0
-rw-r--r--docs/libudev/version.xml.in1
-rw-r--r--hwdb/20-OUI.hwdb153
-rw-r--r--hwdb/20-bluetooth-vendor-product.hwdb161
-rw-r--r--hwdb/20-pci-vendor-model.hwdb216
-rw-r--r--hwdb/70-mouse.hwdb10
-rw-r--r--m4/.gitignore1
-rw-r--r--m4/ax_normalize_path.m4115
-rw-r--r--man/custom-html.xsl12
-rw-r--r--man/hwdb.xml4
-rw-r--r--man/systemctl.xml1
-rw-r--r--man/systemd.link.xml4
-rw-r--r--man/systemd.netdev.xml4
-rw-r--r--man/systemd.network.xml11
-rw-r--r--man/udev.xml4
-rw-r--r--po/es.po4
-rw-r--r--rules/60-persistent-storage.rules2
-rw-r--r--shell-completion/zsh/_systemctl.in66
-rw-r--r--src/core/ima-setup.c15
-rw-r--r--src/core/manager.c3
-rw-r--r--src/gudev/.gitignore7
l---------src/gudev/Makefile1
-rwxr-xr-xsrc/gudev/gjs-example.js75
-rw-r--r--src/gudev/gudev-1.0.pc.in11
-rw-r--r--src/gudev/gudev.h32
-rw-r--r--src/gudev/gudevclient.c533
-rw-r--r--src/gudev/gudevclient.h99
-rw-r--r--src/gudev/gudevdevice.c1027
-rw-r--r--src/gudev/gudevdevice.h130
-rw-r--r--src/gudev/gudevenumerator.c429
-rw-r--r--src/gudev/gudevenumerator.h106
-rw-r--r--src/gudev/gudevenums.h48
-rw-r--r--src/gudev/gudevenumtypes.c.template39
-rw-r--r--src/gudev/gudevenumtypes.h.template24
-rw-r--r--src/gudev/gudevmarshal.list1
-rw-r--r--src/gudev/gudevprivate.h40
-rw-r--r--src/gudev/gudevtypes.h50
-rw-r--r--src/gudev/libgudev-1.0.sym68
-rwxr-xr-xsrc/gudev/seed-example-enum.js38
-rwxr-xr-xsrc/gudev/seed-example.js72
-rw-r--r--src/kernel-install/90-loaderentry.install6
-rw-r--r--src/libsystemd-terminal/sysview.c2
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.c26
-rw-r--r--src/libsystemd/sd-bus/bus-kernel.h2
-rw-r--r--src/libsystemd/sd-bus/test-bus-kernel.c2
-rw-r--r--src/libsystemd/sd-device/device-enumerator.c18
-rw-r--r--src/libsystemd/sd-device/sd-device.c16
-rw-r--r--src/libsystemd/sd-hwdb/sd-hwdb.c2
-rw-r--r--src/libudev/libudev-device.c3
-rw-r--r--src/libudev/libudev-enumerate.c21
-rw-r--r--src/libudev/libudev-monitor.c36
-rw-r--r--src/login/71-seat.rules.in1
-rw-r--r--src/network/networkd-link.c6
-rw-r--r--src/network/networkd-manager.c4
-rw-r--r--src/network/networkd.h1
-rw-r--r--src/python-systemd/docs/layout.html2
-rw-r--r--src/shared/missing.h28
-rw-r--r--src/shared/random-util.c2
-rw-r--r--src/shared/util.c2
-rw-r--r--src/systemctl/systemctl.c2
-rw-r--r--src/test/test-udev.c13
-rw-r--r--src/test/test-unit-file.c2
-rw-r--r--src/test/test-util.c5
-rw-r--r--src/udev/net/link-config.c4
-rw-r--r--src/udev/udev-builtin-hwdb.c2
-rw-r--r--src/udev/udev-builtin-input_id.c146
-rw-r--r--src/udev/udev-builtin-keyboard.c6
-rw-r--r--src/udev/udev-builtin-net_id.c12
-rw-r--r--src/udev/udev-builtin-path_id.c30
-rw-r--r--src/udev/udev-builtin-usb_id.c2
-rw-r--r--src/udev/udev-event.c26
-rw-r--r--src/udev/udev-rules.c14
-rw-r--r--src/udev/udev.h11
-rw-r--r--src/udev/udevadm-test.c3
-rw-r--r--src/udev/udevd.c214
-rw-r--r--test/README.testsuite2
-rw-r--r--test/test-functions2
95 files changed, 1171 insertions, 4245 deletions
diff --git a/.gitignore b/.gitignore
index e26931b1b8..ea9aacfd9f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -38,7 +38,6 @@
/defined
/exported
/exported-*
-/gtk-doc.make
/hostnamectl
/install-tree
/journalctl
diff --git a/.travis.yml b/.travis.yml
index 4ea2bc2d30..5d63474c1d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,8 +3,8 @@ compiler:
- gcc
before_install:
- sudo apt-get update -qq
- - sudo apt-get install autotools-dev automake autoconf libtool libdbus-1-dev libcap-dev libblkid-dev libmount-dev libpam-dev libcryptsetup-dev libaudit-dev libacl1-dev libattr1-dev libselinux-dev liblzma-dev libgcrypt-dev libqrencode-dev libmicrohttpd-dev gtk-doc-tools gperf python2.7-dev
-script: ./autogen.sh && ./configure --enable-gtk-doc --enable-gtk-doc-pdf && make V=1 && sudo ./systemd-machine-id-setup && make check && make distcheck
+ - sudo apt-get install autotools-dev automake autoconf libtool libdbus-1-dev libcap-dev libblkid-dev libmount-dev libpam-dev libcryptsetup-dev libaudit-dev libacl1-dev libattr1-dev libselinux-dev liblzma-dev libgcrypt-dev libqrencode-dev libmicrohttpd-dev gperf python2.7-dev
+script: ./autogen.sh && ./configure && make V=1 && sudo ./systemd-machine-id-setup && make check && make distcheck
after_failure: cat test-suite.log
notifications:
irc:
diff --git a/Makefile.am b/Makefile.am
index 43b819bf9b..7603b2c0e1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -42,10 +42,6 @@ LIBUDEV_CURRENT=7
LIBUDEV_REVISION=3
LIBUDEV_AGE=6
-LIBGUDEV_CURRENT=2
-LIBGUDEV_REVISION=0
-LIBGUDEV_AGE=2
-
LIBSYSTEMD_CURRENT=7
LIBSYSTEMD_REVISION=0
LIBSYSTEMD_AGE=7
@@ -920,7 +916,42 @@ libsystemd_shared_la_SOURCES = \
src/shared/sysctl-util.c \
src/shared/sysctl-util.h \
src/shared/hostname-util.h \
- src/shared/hostname-util.c
+ src/shared/hostname-util.c \
+ src/shared/socket-label.c \
+ src/shared/label.c \
+ src/shared/label.h \
+ src/shared/selinux-util.c \
+ src/shared/selinux-util.h \
+ src/shared/mkdir-label.c \
+ src/shared/ask-password-api.c \
+ src/shared/ask-password-api.h \
+ src/shared/switch-root.h \
+ src/shared/switch-root.c \
+ src/shared/fileio-label.c \
+ src/shared/fileio-label.h \
+ src/shared/dev-setup.c \
+ src/shared/dev-setup.h \
+ src/shared/dropin.c \
+ src/shared/dropin.h \
+ src/shared/condition.c \
+ src/shared/condition.h \
+ src/shared/generator.h \
+ src/shared/generator.c \
+ src/shared/btrfs-util.c \
+ src/shared/btrfs-util.h \
+ src/shared/btrfs-ctree.h \
+ src/shared/rm-rf.c \
+ src/shared/rm-rf.h \
+ src/shared/copy.c \
+ src/shared/copy.h \
+ src/shared/install.c \
+ src/shared/install.h \
+ src/shared/install-printf.c \
+ src/shared/install-printf.h \
+ src/shared/path-lookup.c \
+ src/shared/path-lookup.h \
+ src/shared/specifier.c \
+ src/shared/specifier.h
if HAVE_UTMP
libsystemd_shared_la_SOURCES += \
@@ -939,74 +970,27 @@ nodist_libsystemd_shared_la_SOURCES = \
libsystemd_shared_la_CFLAGS = \
$(AM_CFLAGS) \
+ $(SELINUX_CFLAGS) \
$(CAP_CFLAGS) \
$(SECCOMP_CFLAGS) \
-pthread
libsystemd_shared_la_LIBADD = \
+ $(SELINUX_LIBS) \
$(CAP_LIBS) \
-lm
-# ------------------------------------------------------------------------------
-noinst_LTLIBRARIES += \
- libsystemd-units.la
-
-libsystemd_units_la_SOURCES = \
- src/shared/install.c \
- src/shared/install.h \
- src/shared/install-printf.c \
- src/shared/install-printf.h \
- src/shared/path-lookup.c \
- src/shared/path-lookup.h \
- src/shared/specifier.c \
- src/shared/specifier.h
-
-# ------------------------------------------------------------------------------
+# -----------------------------------------------------------------------------
noinst_LTLIBRARIES += \
- libsystemd-label.la
+ libsystemd-machine.la
-libsystemd_label_la_SOURCES = \
- src/shared/socket-label.c \
- src/shared/label.c \
- src/shared/label.h \
- src/shared/selinux-util.c \
- src/shared/selinux-util.h \
- src/shared/mkdir-label.c \
- src/shared/ask-password-api.c \
- src/shared/ask-password-api.h \
- src/shared/switch-root.h \
- src/shared/switch-root.c \
- src/shared/fileio-label.c \
- src/shared/fileio-label.h \
- src/shared/dev-setup.c \
- src/shared/dev-setup.h \
- src/shared/dropin.c \
- src/shared/dropin.h \
- src/shared/condition.c \
- src/shared/condition.h \
- src/shared/generator.h \
- src/shared/generator.c \
- src/shared/btrfs-util.c \
- src/shared/btrfs-util.h \
- src/shared/btrfs-ctree.h \
- src/shared/rm-rf.c \
- src/shared/rm-rf.h \
+libsystemd_machine_la_SOURCES = \
src/shared/machine-image.c \
src/shared/machine-image.h \
src/shared/machine-pool.c \
- src/shared/machine-pool.h \
- src/shared/copy.c \
- src/shared/copy.h
-
-libsystemd_label_la_CFLAGS = \
- $(AM_CFLAGS) \
- $(SELINUX_CFLAGS)
-
-libsystemd_label_la_LIBADD = \
- $(SELINUX_LIBS)
+ src/shared/machine-pool.h
# -----------------------------------------------------------------------------
-
if HAVE_LIBIPTC
noinst_LTLIBRARIES += \
libsystemd-fw.la
@@ -1024,7 +1008,6 @@ libsystemd_fw_la_LIBADD = \
endif
# -----------------------------------------------------------------------------
-
if ENABLE_LDCONFIG
dist_systemunit_DATA += \
units/ldconfig.service
@@ -1217,8 +1200,6 @@ libsystemd_core_la_CFLAGS = \
-pthread
libsystemd_core_la_LIBADD = \
- libsystemd-units.la \
- libsystemd-label.la \
libudev-internal.la \
libsystemd-shared.la \
libsystemd-internal.la \
@@ -1657,7 +1638,6 @@ test_copy_SOURCES = \
src/test/test-copy.c
test_copy_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
test_sigbus_SOURCES = \
@@ -1670,9 +1650,8 @@ test_condition_SOURCES = \
src/test/test-condition.c
test_condition_LDADD = \
- libsystemd-label.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
test_fdset_SOURCES = \
src/test/test-fdset.c
@@ -1697,7 +1676,6 @@ test_util_SOURCES = \
src/test/test-util.c
test_util_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
test_process_util_SOURCES = \
@@ -1717,8 +1695,6 @@ test_path_lookup_SOURCES = \
test_path_lookup_LDADD = \
-lm \
- libsystemd-units.la \
- libsystemd-label.la \
libsystemd-shared.la
test_uid_range_SOURCES = \
@@ -1892,7 +1868,6 @@ test_btrfs_SOURCES = \
src/test/test-btrfs.c
test_btrfs_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
if HAVE_LIBIPTC
@@ -1968,7 +1943,6 @@ test_cgroup_SOURCES = \
src/test/test-cgroup.c
test_cgroup_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la \
libsystemd-internal.la
@@ -1990,9 +1964,8 @@ test_cgroup_util_SOURCES = \
src/test/test-cgroup-util.c
test_cgroup_util_LDADD = \
- libsystemd-label.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
test_env_replace_SOURCES = \
src/test/test-env-replace.c
@@ -2010,15 +1983,13 @@ test_strv_SOURCES = \
src/test/test-strv.c
test_strv_LDADD = \
- libsystemd-units.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
test_path_util_SOURCES = \
src/test/test-path-util.c
test_path_util_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
test_path_SOURCES = \
@@ -2049,8 +2020,6 @@ test_install_SOURCES = \
src/test/test-install.c
test_install_LDADD = \
- libsystemd-units.la \
- libsystemd-label.la \
libsystemd-shared.la \
libsystemd-internal.la
@@ -2078,7 +2047,6 @@ test_conf_files_SOURCES = \
src/test/test-conf-files.c
test_conf_files_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
test_conf_parser_SOURCES = \
@@ -2092,8 +2060,8 @@ test_bus_policy_SOURCES = \
test_bus_policy_LDADD = \
libsystemd-proxy.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
# ------------------------------------------------------------------------------
## .PHONY so it always rebuilds it
@@ -2146,8 +2114,8 @@ systemd_analyze_CFLAGS = \
systemd_analyze_LDADD = \
libsystemd-core.la \
- libsystemd-internal.la \
libsystemd-shared.la \
+ libsystemd-internal.la \
$(RT_LIBS)
# ------------------------------------------------------------------------------
@@ -2176,9 +2144,8 @@ systemd_update_done_SOURCES = \
src/update-done/update-done.c
systemd_update_done_LDADD = \
- libsystemd-internal.la \
- libsystemd-label.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
# ------------------------------------------------------------------------------
systemd_shutdown_SOURCES = \
@@ -2191,7 +2158,6 @@ systemd_shutdown_SOURCES = \
src/core/killall.c
systemd_shutdown_LDADD = \
- libsystemd-label.la \
libudev-internal.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -2237,10 +2203,8 @@ systemd_tmpfiles_SOURCES = \
src/tmpfiles/tmpfiles.c
systemd_tmpfiles_LDADD = \
- libsystemd-units.la \
- libsystemd-label.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
if HAVE_ACL
systemd_tmpfiles_LDADD += \
@@ -2302,10 +2266,8 @@ systemd_sysusers_SOURCES = \
src/sysusers/sysusers.c
systemd_sysusers_LDADD = \
- libsystemd-units.la \
- libsystemd-label.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
rootbin_PROGRAMS += \
systemd-sysusers
@@ -2345,10 +2307,8 @@ systemd_firstboot_SOURCES = \
src/firstboot/firstboot.c
systemd_firstboot_LDADD = \
- libsystemd-units.la \
- libsystemd-label.la \
- libsystemd-internal.la \
libsystemd-shared.la \
+ libsystemd-internal.la \
-lcrypt
rootbin_PROGRAMS += \
@@ -2371,9 +2331,8 @@ systemd_machine_id_setup_SOURCES = \
src/core/machine-id-setup.h
systemd_machine_id_setup_LDADD = \
- libsystemd-label.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
# ------------------------------------------------------------------------------
systemd_sysctl_SOURCES = \
@@ -2394,7 +2353,6 @@ systemd_fsck_SOURCES = \
src/fsck/fsck.c
systemd_fsck_LDADD = \
- libsystemd-internal.la \
libudev-internal.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -2406,9 +2364,8 @@ systemd_machine_id_commit_SOURCES = \
src/core/machine-id-setup.h
systemd_machine_id_commit_LDADD = \
- libsystemd-label.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
SYSINIT_TARGET_WANTS += \
systemd-machine-id-commit.service
@@ -2419,8 +2376,8 @@ systemd_ac_power_SOURCES = \
systemd_ac_power_LDADD = \
libudev-internal.la \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
# ------------------------------------------------------------------------------
systemd_detect_virt_SOURCES = \
@@ -2444,7 +2401,6 @@ systemd_getty_generator_SOURCES = \
src/getty-generator/getty-generator.c
systemd_getty_generator_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@@ -2452,7 +2408,6 @@ systemd_debug_generator_SOURCES = \
src/debug-generator/debug-generator.c
systemd_debug_generator_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@@ -2461,7 +2416,6 @@ systemd_fstab_generator_SOURCES = \
src/core/mount-setup.c
systemd_fstab_generator_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@@ -2469,7 +2423,6 @@ systemd_system_update_generator_SOURCES = \
src/system-update-generator/system-update-generator.c
systemd_system_update_generator_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@@ -2484,14 +2437,13 @@ systemd_hibernate_resume_SOURCES = \
src/hibernate-resume/hibernate-resume.c
systemd_hibernate_resume_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
systemd_hibernate_resume_generator_SOURCES = \
src/hibernate-resume/hibernate-resume-generator.c
systemd_hibernate_resume_generator_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
dist_systemunit_DATA += \
@@ -2518,7 +2470,6 @@ systemd_efi_boot_generator_SOURCES = \
src/efi-boot-generator/efi-boot-generator.c
systemd_efi_boot_generator_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@@ -2536,7 +2487,6 @@ bootctl_CFLAGS = \
$(BLKID_CFLAGS)
bootctl_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la \
libsystemd-internal.la \
$(BLKID_LIBS)
@@ -2715,7 +2665,6 @@ systemd_gpt_auto_generator_SOURCES = \
src/shared/blkid-util.h
systemd_gpt_auto_generator_LDADD = \
- libsystemd-label.la \
libudev-internal.la \
libsystemd-internal.la \
libsystemd-shared.la \
@@ -2735,7 +2684,6 @@ systemd_dbus1_generator_SOURCES = \
src/dbus1-generator/dbus1-generator.c
systemd_dbus1_generator_LDADD = \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -2760,7 +2708,6 @@ systemd_sysv_generator_SOURCES = \
systemd_sysv_generator_LDADD = \
libsystemd-core.la \
- libsystemd-label.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@@ -2768,7 +2715,6 @@ systemd_rc_local_generator_SOURCES = \
src/rc-local-generator/rc-local-generator.c
systemd_rc_local_generator_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@@ -2778,7 +2724,6 @@ systemd_remount_fs_SOURCES = \
src/core/mount-setup.h
systemd_remount_fs_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@@ -2801,11 +2746,9 @@ systemctl_SOURCES = \
src/systemctl/systemctl.c
systemctl_LDADD = \
- libsystemd-units.la \
- libsystemd-label.la \
- libsystemd-internal.la \
libsystemd-logs.la \
libsystemd-journal-internal.la \
+ libsystemd-internal.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@@ -2813,23 +2756,22 @@ systemd_notify_SOURCES = \
src/notify/notify.c
systemd_notify_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
# ------------------------------------------------------------------------------
systemd_path_SOURCES = \
src/path/path.c
systemd_path_LDADD = \
- libsystemd-internal.la \
- libsystemd-shared.la
+ libsystemd-shared.la \
+ libsystemd-internal.la
# ------------------------------------------------------------------------------
systemd_ask_password_SOURCES = \
src/ask-password/ask-password.c
systemd_ask_password_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@@ -2868,9 +2810,9 @@ systemd_nspawn_CFLAGS = \
$(BLKID_CFLAGS)
systemd_nspawn_LDADD = \
- libsystemd-label.la \
libudev-internal.la \
libsystemd-internal.la \
+ libsystemd-machine.la \
libsystemd-shared.la \
$(BLKID_LIBS)
@@ -2890,7 +2832,6 @@ systemd_run_SOURCES = \
src/run/run.c
systemd_run_LDADD = \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -2966,7 +2907,6 @@ systemd_tty_ask_password_agent_SOURCES = \
src/tty-ask-password-agent/tty-ask-password-agent.c
systemd_tty_ask_password_agent_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@@ -3419,7 +3359,6 @@ libsystemd_network_la_SOURCES = \
libsystemd_network_la_LIBADD = \
libudev-internal.la \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la \
$(KMOD_LIBS)
@@ -3442,7 +3381,6 @@ test_dhcp_client_SOURCES = \
test_dhcp_client_LDADD = \
libsystemd-network.la \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -3461,7 +3399,6 @@ test_ipv4ll_SOURCES = \
test_ipv4ll_LDADD = \
libsystemd-network.la \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -3667,15 +3604,6 @@ src/libsystemd-terminal/unifont-glyph-array.bin: tools/compile-unifont.py $(UNIF
$(AM_V_GEN)$(PYTHON) $< <$(UNIFONT) >$@
# ------------------------------------------------------------------------------
-if ENABLE_GTK_DOC
-SUBDIRS += \
- docs/libudev
-
-noinst_DATA += \
- docs/html/libudev \
- docs/html/gudev
-endif
-
include_HEADERS += \
src/libudev/libudev.h
@@ -3715,18 +3643,6 @@ pkgconfiglib_DATA += \
EXTRA_DIST += \
src/libudev/libudev.pc.in
-CLEANFILES += \
- docs/html/libudev \
- docs/html/gudev
-
-docs/html/libudev:
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_LN)$(LN_S) -f ../libudev/html $@
-
-docs/html/gudev:
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_LN)$(LN_S) -f ../gudev/html $@
-
# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
libudev-install-hook:
libname=libudev.so && $(move-to-rootlibdir)
@@ -3863,7 +3779,6 @@ libudev_core_la_CFLAGS = \
libudev_core_la_LIBADD = \
libudev-internal.la \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-network.la \
libsystemd-shared.la \
@@ -3995,7 +3910,6 @@ test_libudev_SOURCES = \
src/test/test-libudev.c
test_libudev_LDADD = \
- libsystemd-label.la \
libudev-internal.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -4123,151 +4037,6 @@ dist_udevrules_DATA += \
rules/61-accelerometer.rules
# ------------------------------------------------------------------------------
-if ENABLE_GUDEV
-if ENABLE_GTK_DOC
-SUBDIRS += \
- docs/gudev
-endif
-
-libgudev_includedir = \
- $(includedir)/gudev-1.0/gudev
-
-libgudev_include_HEADERS = \
- src/gudev/gudev.h \
- src/gudev/gudevenums.h \
- src/gudev/gudevenumtypes.h \
- src/gudev/gudevtypes.h \
- src/gudev/gudevclient.h \
- src/gudev/gudevdevice.h \
- src/gudev/gudevenumerator.h
-
-lib_LTLIBRARIES += libgudev-1.0.la
-
-pkgconfiglib_DATA += \
- src/gudev/gudev-1.0.pc
-
-libgudev_1_0_la_SOURCES = \
- src/gudev/libgudev-1.0.sym \
- src/gudev/gudevenums.h \
- src/gudev/gudevenumtypes.h \
- src/gudev/gudevenumtypes.h\
- src/gudev/gudevtypes.h \
- src/gudev/gudevclient.h \
- src/gudev/gudevclient.c \
- src/gudev/gudevdevice.h \
- src/gudev/gudevdevice.c \
- src/gudev/gudevenumerator.h \
- src/gudev/gudevenumerator.c \
- src/gudev/gudevprivate.h
-
-nodist_libgudev_1_0_la_SOURCES = \
- src/gudev/gudevmarshal.h \
- src/gudev/gudevmarshal.c \
- src/gudev/gudevenumtypes.h \
- src/gudev/gudevenumtypes.c
-
-BUILT_SOURCES += \
- $(nodist_libgudev_1_0_la_SOURCES)
-
-libgudev_1_0_la_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- -I$(top_builddir)/src\
- -I$(top_srcdir)/src\
- -I$(top_builddir)/src/gudev \
- -I$(top_srcdir)/src/gudev \
- -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT \
- -D_GUDEV_COMPILATION \
- -DG_LOG_DOMAIN=\"GUdev\"
-
-libgudev_1_0_la_CFLAGS = \
- $(AM_CFLAGS) \
- -fvisibility=default \
- $(GLIB_CFLAGS)
-
-libgudev_1_0_la_LIBADD = \
- libudev.la \
- $(GLIB_LIBS)
-
-libgudev_1_0_la_LDFLAGS = \
- $(AM_LDFLAGS) \
- -version-info $(LIBGUDEV_CURRENT):$(LIBGUDEV_REVISION):$(LIBGUDEV_AGE) \
- -export-dynamic \
- -no-undefined \
- -Wl,--version-script=$(top_srcdir)/src/gudev/libgudev-1.0.sym
-
-src/gudev/gudevmarshal.h: src/gudev/gudevmarshal.list
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)glib-genmarshal $< --prefix=g_udev_marshal --header > $@
-
-src/gudev/gudevmarshal.c: src/gudev/gudevmarshal.list
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)echo '#include "gudevmarshal.h"' > $@ && \
- glib-genmarshal $< --prefix=g_udev_marshal --body >> $@
-
-src/gudev/gudevenumtypes.%: src/gudev/gudevenumtypes.%.template src/gudev/gudevenums.h
- $(AM_V_at)$(MKDIR_P) $(dir $@)
- $(AM_V_GEN)glib-mkenums --template $^ > $@
-
-if HAVE_INTROSPECTION
--include $(INTROSPECTION_MAKEFILE)
-
-src/gudev/GUdev-1.0.gir: libgudev-1.0.la
-
-src_gudev_GUdev_1_0_gir_INCLUDES = GObject-2.0
-
-src_gudev_GUdev_1_0_gir_CFLAGS = \
- $(AM_CFLAGS) \
- $(INCLUDES) \
- -D_GUDEV_COMPILATION \
- -D_GUDEV_WORK_AROUND_DEV_T_BUG \
- -I$(top_srcdir)/src \
- -I$(top_builddir)/src \
- -I$(top_srcdir)/src/gudev \
- -I$(top_builddir)/src/gudev
-
-src_gudev_GUdev_1_0_gir_LIBS = libgudev-1.0.la
-
-src_gudev_GUdev_1_0_gir_SCANNERFLAGS = \
- --pkg-export=gudev-1.0 \
- --warn-all
-
-src_gudev_GUdev_1_0_gir_FILES = \
- src/gudev/gudev.h \
- src/gudev/gudevtypes.h \
- src/gudev/gudevenums.h \
- src/gudev/gudevenumtypes.h \
- src/gudev/gudevclient.h \
- src/gudev/gudevdevice.h \
- src/gudev/gudevenumerator.h \
- src/gudev/gudevclient.c \
- src/gudev/gudevdevice.c \
- src/gudev/gudevenumerator.c
-
-INTROSPECTION_GIRS = src/gudev/GUdev-1.0.gir
-INTROSPECTION_SCANNER_ARGS = --c-include=gudev/gudev.h
-
-girdir = $(datadir)/gir-1.0
-gir_DATA = \
- src/gudev/GUdev-1.0.gir
-
-typelibsdir = $(libdir)/girepository-1.0
-typelibs_DATA = \
- src/gudev/GUdev-1.0.typelib
-
-CLEANFILES += $(gir_DATA) $(typelibs_DATA)
-endif # HAVE_INTROSPECTION
-endif
-
-EXTRA_DIST += \
- src/gudev/gudev-1.0.pc.in \
- src/gudev/gudevmarshal.list \
- src/gudev/gudevenumtypes.h.template \
- src/gudev/gudevenumtypes.c.template \
- src/gudev/gjs-example.js \
- src/gudev/seed-example-enum.js \
- src/gudev/seed-example.js
-
-# ------------------------------------------------------------------------------
mtd_probe_SOURCES = \
src/udev/mtd_probe/mtd_probe.c \
src/udev/mtd_probe/mtd_probe.h \
@@ -4299,7 +4068,6 @@ systemd_activate_SOURCES = \
src/activate/activate.c
systemd_activate_LDADD = \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -4569,7 +4337,6 @@ nodist_libsystemd_journal_core_la_SOURCES = \
libsystemd_journal_core_la_LIBADD = \
libsystemd-journal-internal.la \
libudev-internal.la \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -4671,8 +4438,7 @@ gperf_txt_sources += \
libsystemd_journal_internal_la_CFLAGS = \
$(AM_CFLAGS)
-libsystemd_journal_internal_la_LIBADD = \
- libsystemd-label.la
+libsystemd_journal_internal_la_LIBADD =
if HAVE_XZ
libsystemd_journal_internal_la_CFLAGS += \
@@ -4821,7 +4587,6 @@ systemd_coredump_SOURCES = \
systemd_coredump_LDADD = \
libsystemd-journal-internal.la \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -5000,7 +4765,6 @@ systemd_random_seed_SOURCES = \
src/random-seed/random-seed.c
systemd_random_seed_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
SYSINIT_TARGET_WANTS += \
@@ -5023,7 +4787,6 @@ systemd_backlight_SOURCES = \
src/backlight/backlight.c
systemd_backlight_LDADD = \
- libsystemd-label.la \
libudev-internal.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -5044,7 +4807,6 @@ systemd_rfkill_SOURCES = \
src/rfkill/rfkill.c
systemd_rfkill_LDADD = \
- libsystemd-label.la \
libudev-internal.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -5073,7 +4835,6 @@ systemd_cryptsetup_CFLAGS = \
$(LIBCRYPTSETUP_CFLAGS)
systemd_cryptsetup_LDADD = \
- libsystemd-label.la \
libudev-internal.la \
libsystemd-internal.la \
libsystemd-shared.la \
@@ -5083,7 +4844,6 @@ systemd_cryptsetup_generator_SOURCES = \
src/cryptsetup/cryptsetup-generator.c
systemd_cryptsetup_generator_LDADD = \
- libsystemd-label.la \
libsystemd-shared.la
SYSINIT_TARGET_WANTS += \
@@ -5097,7 +4857,6 @@ systemd_hostnamed_SOURCES = \
src/hostname/hostnamed.c
systemd_hostnamed_LDADD = \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -5162,7 +4921,6 @@ systemd_localed_SOURCES = \
src/locale/localed.c
systemd_localed_LDADD = \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la \
$(XKBCOMMON_LIBS)
@@ -5231,7 +4989,6 @@ systemd_timedated_SOURCES = \
src/timedate/timedated.c
systemd_timedated_LDADD = \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -5302,7 +5059,6 @@ gperf_gperf_sources += \
systemd_timesyncd_LDADD = \
libsystemd-resolve.la \
libsystemd-network.la \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -5370,9 +5126,9 @@ libsystemd_machine_core_la_SOURCES = \
src/machine/image-dbus.h
libsystemd_machine_core_la_LIBADD = \
- libsystemd-label.la \
libudev-internal.la \
libsystemd-internal.la \
+ libsystemd-machine.la \
libsystemd-shared.la
noinst_LTLIBRARIES += \
@@ -5385,7 +5141,6 @@ machinectl_LDADD = \
libsystemd-internal.la \
libsystemd-logs.la \
libsystemd-journal-internal.la \
- libsystemd-units.la \
libsystemd-shared.la
rootbin_PROGRAMS += \
@@ -5484,8 +5239,8 @@ systemd_importd_CFLAGS = \
-D SYSTEMD_EXPORT_PATH=\"$(rootlibexecdir)/systemd-export\"
systemd_importd_LDADD = \
+ libsystemd-machine.la \
libsystemd-internal.la \
- libsystemd-label.la \
libsystemd-shared.la
systemd_pull_SOURCES = \
@@ -5521,7 +5276,7 @@ systemd_pull_CFLAGS = \
-D USER_KEYRING_PATH=\"$(pkgsysconfdir)/import-pubring.gpg\"
systemd_pull_LDADD = \
- libsystemd-label.la \
+ libsystemd-machine.la \
libsystemd-internal.la \
libsystemd-shared.la \
$(LIBCURL_LIBS) \
@@ -5549,7 +5304,7 @@ systemd_import_CFLAGS = \
$(ZLIB_CFLAGS)
systemd_import_LDADD = \
- libsystemd-label.la \
+ libsystemd-machine.la \
libsystemd-internal.la \
libsystemd-shared.la \
$(XZ_LIBS) \
@@ -5573,7 +5328,7 @@ systemd_export_CFLAGS = \
$(ZLIB_CFLAGS)
systemd_export_LDADD = \
- libsystemd-label.la \
+ libsystemd-machine.la \
libsystemd-internal.la \
libsystemd-shared.la \
$(XZ_LIBS) \
@@ -5621,7 +5376,6 @@ test_qcow2_CFLAGS = \
test_qcow2_LDADD = \
libsystemd-internal.la \
- libsystemd-label.la \
libsystemd-shared.la \
$(ZLIB_LIBS)
@@ -5691,7 +5445,6 @@ gperf_txt_sources += \
systemd_resolved_LDADD = \
libsystemd-network.la \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la \
$(LIBIDN_LIBS)
@@ -5733,7 +5486,6 @@ test_dns_domain_SOURCES = \
test_dns_domain_LDADD = \
libsystemd-network.la \
- libsystemd-label.la \
libsystemd-internal.la \
libsystemd-shared.la \
$(LIBIDN_LIBS)
@@ -5860,7 +5612,6 @@ libsystemd_networkd_core_la_LIBADD = \
libudev-internal.la \
libsystemd-internal.la \
libsystemd-network.la \
- libsystemd-label.la \
libsystemd-shared.la
rootlibexec_PROGRAMS += \
@@ -5997,7 +5748,6 @@ libsystemd_logind_core_la_SOURCES = \
src/login/logind-acl.h
libsystemd_logind_core_la_LIBADD = \
- libsystemd-label.la \
libudev-internal.la \
libsystemd-internal.la \
libsystemd-shared.la
@@ -6826,11 +6576,6 @@ DISTCHECK_CONFIGURE_FLAGS += \
--with-python
endif
-if ENABLE_GTK_DOC
-DISTCHECK_CONFIGURE_FLAGS += \
- --enable-gtk-doc
-endif
-
if ENABLE_SPLIT_USR
DISTCHECK_CONFIGURE_FLAGS += \
--enable-split-usr
@@ -6865,11 +6610,6 @@ dist-check-help: $(rootbin_PROGRAMS) $(bin_PROGRAMS)
dist: dist-check-python dist-check-compat-libs
-# check "broken" platforms limited toolchains for link breakage before we release
-.PHONY: linkcheck
-linkcheck:
- $(MAKE) CFLAGS='-fno-lto' LDFLAGS='-Wl,-fuse-ld=gold -Wl,--as-needed -Wl,--no-gc-sections' distcheck
-
.PHONY: hwdb-update
hwdb-update:
( cd $(top_srcdir)/hwdb && \
@@ -6895,10 +6635,6 @@ upload: all check dist
.PHONY: doc-sync
doc-sync: all destdir-sphinx
- gtkdoc-rebase --html-dir=docs/libudev/html --online
- rsync -rlv --delete docs/libudev/html/ --omit-dir-times $(www_target)/libudev/
- gtkdoc-rebase --html-dir=docs/gudev/html --online
- rsync -rlv --delete docs/gudev/html/ --omit-dir-times $(www_target)/gudev/
rsync -rlv --delete-excluded --include="*.html" --exclude="*" --omit-dir-times man/ $(www_target)/man/
rsync -rlv --delete --omit-dir-times docs/html/python-systemd/ $(www_target)/python-systemd/
diff --git a/README b/README
index 8abd862fe1..777b34335e 100644
--- a/README
+++ b/README
@@ -7,11 +7,11 @@ WEB SITE:
http://www.freedesktop.org/wiki/Software/systemd
GIT:
- git://anongit.freedesktop.org/systemd/systemd
- ssh://git.freedesktop.org/git/systemd/systemd
+ git@github.com:systemd/systemd.git
+ https://github.com/systemd/systemd.git
GITWEB:
- http://cgit.freedesktop.org/systemd/systemd
+ https://github.com/systemd/systemd
MAILING LIST:
http://lists.freedesktop.org/mailman/listinfo/systemd-devel
@@ -21,7 +21,7 @@ IRC:
#systemd on irc.freenode.org
BUG REPORTS:
- https://bugs.freedesktop.org/enter_bug.cgi?product=systemd
+ https://github.com/systemd/systemd/issues
AUTHOR:
Lennart Poettering
@@ -129,7 +129,6 @@ REQUIREMENTS:
libmicrohttpd (optional)
libpython (optional)
libidn (optional)
- gobject-introspection > 1.40.0 (optional)
elfutils >= 158 (optional)
make, gcc, and similar tools
@@ -152,7 +151,6 @@ REQUIREMENTS:
libtool
intltool
gperf
- gtkdocize (optional)
python (optional)
python-lxml (optional, but required to build the indices)
sphinx (optional)
diff --git a/TODO b/TODO
index 43b69681a8..db3205c9e8 100644
--- a/TODO
+++ b/TODO
@@ -537,8 +537,6 @@ Features:
* maybe do not install getty@tty1.service symlink in /etc but in /usr?
-* re-enable "make check" for gtk-doc (broken for unknown reason)
-
* fstab: add new mount option x-systemd-after=/foobar/waldo to allow manual dependencies to other mount points
https://bugzilla.redhat.com/show_bug.cgi?id=812826
diff --git a/autogen.sh b/autogen.sh
index 7b62449be8..2d4acdfef1 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -28,15 +28,6 @@ if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then
echo "Activated pre-commit hook." || :
fi
-if which gtkdocize >/dev/null 2>/dev/null; then
- gtkdocize --docdir docs/ --flavour no-tmpl
- gtkdocargs=--enable-gtk-doc
-else
- echo "You don't have gtk-doc installed, and thus won't be able to generate the documentation."
- rm -f docs/gtk-doc.make
- echo 'EXTRA_DIST =' > docs/gtk-doc.make
-fi
-
intltoolize --force --automake
autoreconf --force --install --symlink
@@ -48,7 +39,7 @@ args="\
--sysconfdir=/etc \
--localstatedir=/var \
--libdir=$(libdir /usr/lib) \
-$gtkdocargs"
+"
if [ -f "$topdir/.config.args" ]; then
args="$args $(cat $topdir/.config.args)"
@@ -56,7 +47,7 @@ fi
if [ ! -L /bin ]; then
args="$args \
---with-rootprefix= \
+--with-rootprefix=/ \
--with-rootlibdir=$(libdir /lib) \
"
fi
diff --git a/configure.ac b/configure.ac
index 92654a644a..2625e0d15b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ AC_PREREQ([2.64])
AC_INIT([systemd],
[220],
- [http://bugs.freedesktop.org/enter_bug.cgi?product=systemd],
+ [http://github.com/systemd/systemd/issues],
[systemd],
[http://www.freedesktop.org/wiki/Software/systemd])
@@ -107,22 +107,6 @@ AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't s
M4_DEFINES=
-# gtkdocize greps for '^GTK_DOC_CHECK', so it needs to be on its own line
-m4_ifdef([GTK_DOC_CHECK], [
-GTK_DOC_CHECK([1.18],[--flavour no-tmpl])],
- [AM_CONDITIONAL([ENABLE_GTK_DOC], [false])
- enable_gtk_doc=no])
-
-AS_IF([test "x$enable_gtk_doc" = "xyes" -a "x$XSLTPROC" = x], [
- AC_MSG_ERROR([*** GTK doc requested but xsltproc not found])
-])
-
-m4_ifdef([GOBJECT_INTROSPECTION_CHECK], [
-GOBJECT_INTROSPECTION_CHECK([1.31.1])
-], [
- AM_CONDITIONAL([HAVE_INTROSPECTION], [false])
- enable_introspection=no])
-
AC_CHECK_TOOL(OBJCOPY, objcopy)
AC_CHECK_TOOL(STRINGS, strings)
AC_CHECK_TOOL(GPERF, gperf)
@@ -199,8 +183,6 @@ CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
-fdiagnostics-show-option \
-fno-strict-aliasing \
-fvisibility=hidden \
- -ffunction-sections \
- -fdata-sections \
-fstack-protector \
-fstack-protector-strong \
-fPIE \
@@ -224,10 +206,21 @@ AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
[AC_MSG_RESULT([skipping -D_FORTIFY_SOURCE, optimization not enabled])])
AC_SUBST([OUR_CPPFLAGS], "$with_cppflags $sanitizer_cppflags")
+AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
+ [CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
+ -Wl,--gc-sections])],
+ [AC_MSG_RESULT([skipping --gc-sections, optimization not enabled])])
+AC_SUBST([OUR_CFLAGS], "$with_ldflags $sanitizer_cflags")
+
+AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
+ [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
+ -ffunction-sections -fdata-sections])],
+ [AC_MSG_RESULT([skipping -ffunction/data-section, optimization not enabled])])
+AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
+
CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
-Wl,--as-needed \
-Wl,--no-undefined \
- -Wl,--gc-sections \
-Wl,-z,relro \
-Wl,-z,now \
-pie \
@@ -1294,14 +1287,6 @@ fi
AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
# ------------------------------------------------------------------------------
-AC_ARG_ENABLE([gudev],
- AS_HELP_STRING([--disable-gudev], [disable Gobject libudev support @<:@default=enabled@:>@]),
- [], [enable_gudev=yes])
-AS_IF([test "x$enable_gudev" = "xyes"], [ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 gio-2.0]) ])
-AM_CONDITIONAL([ENABLE_GUDEV], [test "x$enable_gudev" = "xyes"])
-AS_IF([test "x$enable_gudev" = "xyes"], [ AC_DEFINE(HAVE_GLIB, 1, [Define if glib is available]) ])
-
-# ------------------------------------------------------------------------------
AC_ARG_ENABLE(hwdb, [AC_HELP_STRING([--disable-hwdb], [disable hardware database support])],
enable_hwdb=$enableval, enable_hwdb=yes)
AM_CONDITIONAL(ENABLE_HWDB, [test x$enable_hwdb = xyes])
@@ -1370,16 +1355,19 @@ AC_ARG_WITH([dbuspolicydir],
AS_HELP_STRING([--with-dbuspolicydir=DIR], [D-Bus policy directory]),
[],
[with_dbuspolicydir=${sysconfdir}/dbus-1/system.d])
+AX_NORMALIZE_PATH([with_dbuspolicydir])
AC_ARG_WITH([dbussessionservicedir],
AS_HELP_STRING([--with-dbussessionservicedir=DIR], [D-Bus session service directory]),
[],
[with_dbussessionservicedir=${datadir}/dbus-1/services])
+AX_NORMALIZE_PATH([with_dbussessionservicedir])
AC_ARG_WITH([dbussystemservicedir],
AS_HELP_STRING([--with-dbussystemservicedir=DIR], [D-Bus system service directory]),
[],
[with_dbussystemservicedir=${datadir}/dbus-1/system-services])
+AX_NORMALIZE_PATH([with_dbussystemservicedir])
AC_ARG_WITH([bashcompletiondir],
AS_HELP_STRING([--with-bashcompletiondir=DIR], [Bash completions directory]),
@@ -1389,29 +1377,42 @@ AC_ARG_WITH([bashcompletiondir],
] , [
with_bashcompletiondir=${datadir}/bash-completion/completions
])])
+AX_NORMALIZE_PATH([with_bashcompletiondir])
AC_ARG_WITH([zshcompletiondir],
AS_HELP_STRING([--with-zshcompletiondir=DIR], [Zsh completions directory]),
[], [with_zshcompletiondir=${datadir}/zsh/site-functions])
+AX_NORMALIZE_PATH([with_zshcompletiondir])
AC_ARG_WITH([rootprefix],
AS_HELP_STRING([--with-rootprefix=DIR], [rootfs directory prefix for config files and kernel modules]),
[], [with_rootprefix=${ac_default_prefix}])
+# --with-rootprefix= (empty) should default to "/" but AX_NORMALIZE_PATH
+# defaults those to ".", solve that here for now until we can find a suitable
+# fix for AX_NORMALIZE_PATH upstream at autoconf-archive.
+# See: https://github.com/systemd/systemd/issues/54
+if test "x${with_rootprefix}" = "x"; then
+ with_rootprefix="/"
+fi
+AX_NORMALIZE_PATH([with_rootprefix])
AC_ARG_WITH([rootlibdir],
AS_HELP_STRING([--with-rootlibdir=DIR], [Root directory for libraries necessary for boot]),
[],
[with_rootlibdir=${libdir}])
+AX_NORMALIZE_PATH([with_rootlibdir])
AC_ARG_WITH([pamlibdir],
AS_HELP_STRING([--with-pamlibdir=DIR], [Directory for PAM modules]),
[],
[with_pamlibdir=${with_rootlibdir}/security])
+AX_NORMALIZE_PATH([with_pamlibdir])
AC_ARG_WITH([pamconfdir],
AS_HELP_STRING([--with-pamconfdir=DIR], [Directory for PAM configuration]),
[],
[with_pamconfdir=${sysconfdir}/pam.d])
+AX_NORMALIZE_PATH([with_pamconfdir])
AC_ARG_ENABLE([split-usr],
AS_HELP_STRING([--enable-split-usr], [Assume that /bin, /sbin aren\'t symlinks into /usr]),
@@ -1435,13 +1436,6 @@ AS_IF([test "x${enable_split_usr}" = "xyes"], [
])
AM_CONDITIONAL(ENABLE_SPLIT_USR, [test "x${enable_split_usr}" = "xyes"])
-# Work around intltoolize and gtk-doc problems in VPATH builds
-AM_CONDITIONAL([ENABLE_GTK_DOC_TESTS], [test "x$0" = "x./configure"],
- [Define to do gtk-doc tests])
-AS_IF([test "x$0" != "x./configure"], [
- AC_SUBST([INTLTOOL_UPDATE], [/bin/true])
-])
-
# QEMU and OVMF UEFI firmware
AS_IF([test x"$cross_compiling" = "xyes"], [], [
AC_PATH_PROG([QEMU], [qemu-system-x86_64])
@@ -1496,11 +1490,8 @@ AC_SUBST([rootprefix], [$with_rootprefix])
AC_SUBST([rootlibdir], [$with_rootlibdir])
AC_CONFIG_FILES([
- Makefile po/Makefile.in
- docs/libudev/Makefile
- docs/libudev/version.xml
- docs/gudev/Makefile
- docs/gudev/version.xml
+ Makefile
+ po/Makefile.in
])
AC_OUTPUT
@@ -1566,15 +1557,12 @@ AC_MSG_RESULT([
libmount: ${have_libmount}
dbus: ${have_dbus}
nss-myhostname: ${have_myhostname}
- gudev: ${enable_gudev}
hwdb: ${enable_hwdb}
- gintrospection: ${enable_introspection}
terminal: ${have_terminal}
kdbus: ${have_kdbus}
Python: ${have_python}
Python Headers: ${have_python_devel}
man pages: ${have_manpages}
- gtk-doc: ${enable_gtk_doc}
test coverage: ${have_coverage}
Split /usr: ${enable_split_usr}
SysV compatibility: ${SYSTEM_SYSV_COMPAT}
diff --git a/docs/.gitignore b/docs/.gitignore
index f48033d321..ac7af2e80e 100644
--- a/docs/.gitignore
+++ b/docs/.gitignore
@@ -1,2 +1 @@
-/gtk-doc.make
/html/
diff --git a/docs/gudev/.gitignore b/docs/gudev/.gitignore
deleted file mode 100644
index e6f2371ab1..0000000000
--- a/docs/gudev/.gitignore
+++ /dev/null
@@ -1,19 +0,0 @@
-/*.bak
-/gtk-doc.make
-/version.xml
-/Makefile
-/gudev-overrides.txt
-/gudev-decl-list.txt
-/gudev-decl.txt
-/gudev-undeclared.txt
-/gudev-undocumented.txt
-/gudev-unused.txt
-/gudev.args
-/gudev.hierarchy
-/gudev.interfaces
-/gudev.prerequisites
-/gudev.signals
-/html/
-/xml/
-/*.stamp
-/tmpl/
diff --git a/docs/gudev/Makefile.am b/docs/gudev/Makefile.am
deleted file mode 100644
index 659330303b..0000000000
--- a/docs/gudev/Makefile.am
+++ /dev/null
@@ -1,115 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-# We require automake 1.10 at least.
-AUTOMAKE_OPTIONS = 1.10 color-tests
-
-# This is a blank Makefile.am for using gtk-doc.
-# Copy this to your project's API docs directory and modify the variables to
-# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
-# of using the various options.
-
-# The name of the module, e.g. 'glib'.
-DOC_MODULE=gudev
-
-# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
-#DOC_MODULE_VERSION=2
-
-# The top-level SGML file. You can change this if you want to.
-DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
-
-# The directory containing the source code. Relative to $(srcdir).
-# gtk-doc will search all .c & .h files beneath here for inline comments
-# documenting the functions and macros.
-# e.g. DOC_SOURCE_DIR=../../../gtk
-DOC_SOURCE_DIR=$(top_srcdir)/src/gudev $(top_builddir)/src/gudev
-
-# Extra options to pass to gtkdoc-scangobj. Not normally needed.
-SCANGOBJ_OPTIONS=
-
-# Extra options to supply to gtkdoc-scan.
-# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
-SCAN_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkdb.
-# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
-MKDB_OPTIONS=--xml-mode --output-format=xml --name-space=g_udev
-
-# Extra options to supply to gtkdoc-mktmpl
-# e.g. MKTMPL_OPTIONS=--only-section-tmpl
-MKTMPL_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkhtml
-MKHTML_OPTIONS=--path=$(abs_srcdir) --path=$(abs_builddir)
-
-# Extra options to supply to gtkdoc-fixref. Not normally needed.
-# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
-FIXXREF_OPTIONS=>/dev/null 2>&1
-
-# Used for dependencies. The docs will be rebuilt if any of these change.
-# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
-# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
-HFILE_GLOB=$(top_srcdir)/src/gudev/*.h
-CFILE_GLOB=$(top_srcdir)/src/gudev/*.c
-
-# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
-# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
-EXTRA_HFILES=
-
-# Header files to ignore when scanning. Use base file name, no paths
-# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
-IGNORE_HFILES=gudevenumtypes.h gudevmarshal.h
-
-# Images to copy into HTML directory.
-# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
-HTML_IMAGES=
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
-content_files = version.xml
-
-# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
-# These files must be listed here *and* in content_files
-# e.g. expand_content_files=running.sgml
-expand_content_files=
-
-# Hack, hack. You silly gtk-doc, you must not add CFLAGS multiple
-# times when calling gcc; it surely can not work with options that must
-# be listed only once.
-# Kill CFLAGS here because gtk-doc thinks adding CFLAGS to CC _and_ also
-# adding CFLAGS itself again would work.
-override CFLAGS=
-override LDFLAGS=
-
-# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
-# Only needed if you are using gtkdoc-scangobj to dynamically query widget
-# signals and properties.
-# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
-# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
-GTKDOC_CFLAGS = \
- $(GLIB_CFLAGS) \
- -I$(top_srcdir)/src/gudev \
- -I$(top_builddir)/src/gudev
-
-GTKDOC_LIBS = \
- $(GLIB_LIBS) \
- $(top_builddir)/libgudev-1.0.la
-
-# This includes the standard gtk-doc make rules, copied by gtkdocize.
-include $(top_srcdir)/docs/gtk-doc.make
-
-# Other files to distribute
-# e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST += version.xml.in
-
-# Files not to distribute
-# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
-# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
-#DISTCLEANFILES +=
-
-# Comment this out if you want your docs-status tested during 'make check'
-if ENABLE_GTK_DOC
-if ENABLE_GTK_DOC_TESTS
-#TESTS_ENVIRONMENT = cd $(top_srcdir)
-#TESTS = $(GTKDOC_CHECK)
-endif
-endif
diff --git a/docs/gudev/gudev-docs.xml b/docs/gudev/gudev-docs.xml
deleted file mode 100644
index 3e7e50acd4..0000000000
--- a/docs/gudev/gudev-docs.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
- "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
-[
- <!ENTITY version SYSTEM "version.xml">
-]>
-<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
- <bookinfo>
- <title>GUdev Reference Manual</title>
- <releaseinfo>
- For version &version; — the latest version of this
- documentation can be found at
- <ulink role="online-location" url="http://www.freedesktop.org/software/systemd/gudev/">
- http://www.freedesktop.org/software/systemd/gudev/
- </ulink>.
- </releaseinfo>
- <copyright>
- <year>2009-2012</year>
- <holder>David Zeuthen &lt;davidz@redhat.com&gt;</holder>
- <holder>Bastien Nocera &lt;hadess@hadess.net&gt;</holder>
- </copyright>
- </bookinfo>
-
- <chapter id="ref-API">
- <title>API Reference</title>
- <xi:include href="xml/gudevclient.xml"/>
- <xi:include href="xml/gudevdevice.xml"/>
- <xi:include href="xml/gudevenumerator.xml"/>
- </chapter>
-
- <chapter id="gudev-hierarchy">
- <title>Object Hierarchy</title>
- <xi:include href="xml/tree_index.sgml"/>
- </chapter>
-
- <index id="api-index-full">
- <title>API Index</title>
- <xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
- </index>
-
- <index role="165">
- <title>Index of new symbols in 165</title>
- <xi:include href="xml/api-index-165.xml"><xi:fallback /></xi:include>
- </index>
-
- <index id="api-index-deprecated" role="deprecated">
- <title>Index of deprecated API</title>
- <xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
- </index>
-
- <xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
-</book>
diff --git a/docs/gudev/gudev-sections.txt b/docs/gudev/gudev-sections.txt
deleted file mode 100644
index 90765ee4cf..0000000000
--- a/docs/gudev/gudev-sections.txt
+++ /dev/null
@@ -1,102 +0,0 @@
-<SECTION>
-<FILE>gudevclient</FILE>
-<TITLE>GUdevClient</TITLE>
-GUdevClient
-GUdevClientClass
-GUdevDeviceType
-GUdevDeviceNumber
-g_udev_client_new
-g_udev_client_query_by_subsystem
-g_udev_client_query_by_device_number
-g_udev_client_query_by_device_file
-g_udev_client_query_by_sysfs_path
-g_udev_client_query_by_subsystem_and_name
-<SUBSECTION Standard>
-G_UDEV_CLIENT
-G_UDEV_IS_CLIENT
-G_UDEV_TYPE_CLIENT
-g_udev_client_get_type
-G_UDEV_CLIENT_CLASS
-G_UDEV_IS_CLIENT_CLASS
-G_UDEV_CLIENT_GET_CLASS
-<SUBSECTION Private>
-GUdevClientPrivate
-</SECTION>
-
-<SECTION>
-<FILE>gudevdevice</FILE>
-<TITLE>GUdevDevice</TITLE>
-GUdevDevice
-GUdevDeviceClass
-g_udev_device_get_subsystem
-g_udev_device_get_devtype
-g_udev_device_get_name
-g_udev_device_get_number
-g_udev_device_get_sysfs_path
-g_udev_device_get_driver
-g_udev_device_get_action
-g_udev_device_get_seqnum
-g_udev_device_get_device_type
-g_udev_device_get_device_number
-g_udev_device_get_device_file
-g_udev_device_get_device_file_symlinks
-g_udev_device_get_parent
-g_udev_device_get_parent_with_subsystem
-g_udev_device_get_tags
-g_udev_device_get_is_initialized
-g_udev_device_get_usec_since_initialized
-g_udev_device_get_property_keys
-g_udev_device_has_property
-g_udev_device_get_property
-g_udev_device_get_property_as_int
-g_udev_device_get_property_as_uint64
-g_udev_device_get_property_as_double
-g_udev_device_get_property_as_boolean
-g_udev_device_get_property_as_strv
-g_udev_device_get_sysfs_attr_keys
-g_udev_device_has_sysfs_attr
-g_udev_device_get_sysfs_attr
-g_udev_device_get_sysfs_attr_as_int
-g_udev_device_get_sysfs_attr_as_uint64
-g_udev_device_get_sysfs_attr_as_double
-g_udev_device_get_sysfs_attr_as_boolean
-g_udev_device_get_sysfs_attr_as_strv
-<SUBSECTION Standard>
-G_UDEV_DEVICE
-G_UDEV_IS_DEVICE
-G_UDEV_TYPE_DEVICE
-g_udev_device_get_type
-G_UDEV_DEVICE_CLASS
-G_UDEV_IS_DEVICE_CLASS
-G_UDEV_DEVICE_GET_CLASS
-<SUBSECTION Private>
-GUdevDevicePrivate
-</SECTION>
-
-<SECTION>
-<FILE>gudevenumerator</FILE>
-<TITLE>GUdevEnumerator</TITLE>
-GUdevEnumerator
-GUdevEnumeratorClass
-g_udev_enumerator_new
-g_udev_enumerator_add_match_subsystem
-g_udev_enumerator_add_nomatch_subsystem
-g_udev_enumerator_add_match_sysfs_attr
-g_udev_enumerator_add_nomatch_sysfs_attr
-g_udev_enumerator_add_match_property
-g_udev_enumerator_add_match_name
-g_udev_enumerator_add_match_tag
-g_udev_enumerator_add_match_is_initialized
-g_udev_enumerator_add_sysfs_path
-g_udev_enumerator_execute
-<SUBSECTION Standard>
-G_UDEV_ENUMERATOR
-G_UDEV_IS_ENUMERATOR
-G_UDEV_TYPE_ENUMERATOR
-g_udev_enumerator_get_type
-G_UDEV_ENUMERATOR_CLASS
-G_UDEV_IS_ENUMERATOR_CLASS
-G_UDEV_ENUMERATOR_GET_CLASS
-<SUBSECTION Private>
-GUdevEnumeratorPrivate
-</SECTION>
diff --git a/docs/gudev/gudev.types b/docs/gudev/gudev.types
deleted file mode 100644
index a89857a04d..0000000000
--- a/docs/gudev/gudev.types
+++ /dev/null
@@ -1,4 +0,0 @@
-g_udev_device_type_get_type
-g_udev_device_get_type
-g_udev_client_get_type
-g_udev_enumerator_get_type
diff --git a/docs/gudev/version.xml.in b/docs/gudev/version.xml.in
deleted file mode 100644
index d78bda9342..0000000000
--- a/docs/gudev/version.xml.in
+++ /dev/null
@@ -1 +0,0 @@
-@VERSION@
diff --git a/docs/libudev/.gitignore b/docs/libudev/.gitignore
deleted file mode 100644
index f8dd67c50a..0000000000
--- a/docs/libudev/.gitignore
+++ /dev/null
@@ -1,19 +0,0 @@
-/gtk-doc.make
-/version.xml
-/Makefile
-/libudev-overrides.txt
-/libudev-decl-list.txt
-/libudev-decl.txt
-/libudev-undeclared.txt
-/libudev-undocumented.txt
-/libudev-unused.txt
-/libudev.args
-/libudev.hierarchy
-/libudev.interfaces
-/libudev.prerequisites
-/libudev.signals
-/html/
-/xml/
-/*.stamp
-/*.bak
-/tmpl/
diff --git a/docs/libudev/Makefile.am b/docs/libudev/Makefile.am
deleted file mode 100644
index 2998c35167..0000000000
--- a/docs/libudev/Makefile.am
+++ /dev/null
@@ -1,109 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-# We require automake 1.10 at least.
-AUTOMAKE_OPTIONS = 1.10 color-tests
-
-# This is a blank Makefile.am for using gtk-doc.
-# Copy this to your project's API docs directory and modify the variables to
-# suit your project. See the GTK+ Makefiles in gtk+/docs/reference for examples
-# of using the various options.
-
-# The name of the module, e.g. 'glib'.
-DOC_MODULE=libudev
-
-# Uncomment for versioned docs and specify the version of the module, e.g. '2'.
-#DOC_MODULE_VERSION=2
-
-# The top-level SGML file. You can change this if you want to.
-DOC_MAIN_SGML_FILE=$(DOC_MODULE)-docs.xml
-
-# The directory containing the source code. Relative to $(srcdir).
-# gtk-doc will search all .c & .h files beneath here for inline comments
-# documenting the functions and macros.
-# e.g. DOC_SOURCE_DIR=../../../gtk
-DOC_SOURCE_DIR=$(top_srcdir)/src/libudev
-
-# Extra options to pass to gtkdoc-scangobj. Not normally needed.
-SCANGOBJ_OPTIONS=
-
-# Extra options to supply to gtkdoc-scan.
-# e.g. SCAN_OPTIONS=--deprecated-guards="GTK_DISABLE_DEPRECATED"
-SCAN_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkdb.
-# e.g. MKDB_OPTIONS=--sgml-mode --output-format=xml
-MKDB_OPTIONS=--xml-mode --output-format=xml --name-space=udev
-
-# Extra options to supply to gtkdoc-mktmpl
-# e.g. MKTMPL_OPTIONS=--only-section-tmpl
-MKTMPL_OPTIONS=
-
-# Extra options to supply to gtkdoc-mkhtml
-MKHTML_OPTIONS=--path=$(abs_srcdir) --path=$(abs_builddir)
-
-# Extra options to supply to gtkdoc-fixref. Not normally needed.
-# e.g. FIXXREF_OPTIONS=--extra-dir=../gdk-pixbuf/html --extra-dir=../gdk/html
-FIXXREF_OPTIONS=>/dev/null 2>&1
-
-# Used for dependencies. The docs will be rebuilt if any of these change.
-# e.g. HFILE_GLOB=$(top_srcdir)/gtk/*.h
-# e.g. CFILE_GLOB=$(top_srcdir)/gtk/*.c
-HFILE_GLOB=$(top_srcdir)/src/libudev/libudev*.h
-CFILE_GLOB=$(top_srcdir)/src/libudev/libudev*.c
-
-# Extra header to include when scanning, which are not under DOC_SOURCE_DIR
-# e.g. EXTRA_HFILES=$(top_srcdir}/contrib/extra.h
-EXTRA_HFILES=
-
-# Header files to ignore when scanning. Use base file name, no paths
-# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
-IGNORE_HFILES = libudev-private.h
-
-# Images to copy into HTML directory.
-# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
-HTML_IMAGES=
-
-# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE).
-# e.g. content_files=running.sgml building.sgml changes-2.0.sgml
-content_files = version.xml
-
-# SGML files where gtk-doc abbrevations (#GtkWidget) are expanded
-# These files must be listed here *and* in content_files
-# e.g. expand_content_files=running.sgml
-expand_content_files=
-
-# Hack, hack. You silly gtk-doc, you must not add CFLAGS multiple
-# times when calling gcc; it surely can not work with options that must
-# be listed only once.
-# Kill CFLAGS here because gtk-doc thinks adding CFLAGS to CC _and_ also
-# adding CFLAGS itself again would work.
-override CFLAGS=
-override LDFLAGS=
-
-# CFLAGS and LDFLAGS for compiling gtkdoc-scangobj with your library.
-# Only needed if you are using gtkdoc-scangobj to dynamically query widget
-# signals and properties.
-# e.g. GTKDOC_CFLAGS=-I$(top_srcdir) -I$(top_builddir) $(GTK_DEBUG_FLAGS)
-# e.g. GTKDOC_LIBS=$(top_builddir)/gtk/$(gtktargetlib)
-GTKDOC_CFLAGS=
-GTKDOC_LIBS=
-
-# This includes the standard gtk-doc make rules, copied by gtkdocize.
-include $(top_srcdir)/docs/gtk-doc.make
-
-# Other files to distribute
-# e.g. EXTRA_DIST += version.xml.in
-EXTRA_DIST += version.xml.in
-
-# Files not to distribute
-# for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types
-# for --rebuild-sections in $(SCAN_OPTIONS) e.g. $(DOC_MODULE)-sections.txt
-#DISTCLEANFILES +=
-
-# Comment this out if you want your docs-status tested during 'make check'
-if ENABLE_GTK_DOC
-if ENABLE_GTK_DOC_TESTS
-#TESTS_ENVIRONMENT = cd $(top_srcdir)
-#TESTS = $(GTKDOC_CHECK)
-endif
-endif
diff --git a/docs/libudev/libudev-docs.xml b/docs/libudev/libudev-docs.xml
deleted file mode 100644
index 454cd31646..0000000000
--- a/docs/libudev/libudev-docs.xml
+++ /dev/null
@@ -1,40 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
- "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
-[
- <!ENTITY version SYSTEM "version.xml">
-]>
-<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
- <bookinfo>
- <title>libudev Reference Manual</title>
- <releaseinfo>
- For version &version; — the latest version of this
- documentation can be found at
- <ulink role="online-location" url="http://www.freedesktop.org/software/systemd/libudev/">
- http://www.freedesktop.org/software/systemd/libudev/
- </ulink>.
- </releaseinfo>
- <copyright>
- <year>2009-2012</year>
- <holder>Kay Sievers &lt;kay@vrfy.org&gt;</holder>
- </copyright>
- </bookinfo>
-
- <chapter>
- <title>API Reference</title>
- <xi:include href="xml/libudev.xml"/>
- <xi:include href="xml/libudev-list.xml"/>
- <xi:include href="xml/libudev-device.xml"/>
- <xi:include href="xml/libudev-monitor.xml"/>
- <xi:include href="xml/libudev-enumerate.xml"/>
- <xi:include href="xml/libudev-queue.xml"/>
- <xi:include href="xml/libudev-hwdb.xml"/>
- <xi:include href="xml/libudev-util.xml"/>
- <xi:include href="xml/api-index-deprecated.xml"/>
- </chapter>
-
- <index id="api-index-full">
- <title>Index</title>
- <xi:include href="xml/api-index-full.xml"/>
- </index>
-</book>
diff --git a/docs/libudev/libudev-sections.txt b/docs/libudev/libudev-sections.txt
deleted file mode 100644
index 8a31ded4e9..0000000000
--- a/docs/libudev/libudev-sections.txt
+++ /dev/null
@@ -1,137 +0,0 @@
-<SECTION>
-<FILE>libudev</FILE>
-<TITLE>udev</TITLE>
-udev
-udev_ref
-udev_unref
-udev_new
-udev_set_log_fn
-udev_get_log_priority
-udev_set_log_priority
-udev_get_userdata
-udev_set_userdata
-</SECTION>
-
-<SECTION>
-<FILE>libudev-list</FILE>
-<TITLE>udev_list</TITLE>
-udev_list_entry
-udev_list_entry_get_next
-udev_list_entry_get_by_name
-udev_list_entry_get_name
-udev_list_entry_get_value
-udev_list_entry_foreach
-</SECTION>
-
-<SECTION>
-<FILE>libudev-device</FILE>
-<TITLE>udev_device</TITLE>
-udev_device
-udev_device_ref
-udev_device_unref
-udev_device_get_udev
-udev_device_new_from_syspath
-udev_device_new_from_devnum
-udev_device_new_from_subsystem_sysname
-udev_device_new_from_device_id
-udev_device_new_from_environment
-udev_device_get_parent
-udev_device_get_parent_with_subsystem_devtype
-udev_device_get_devpath
-udev_device_get_subsystem
-udev_device_get_devtype
-udev_device_get_syspath
-udev_device_get_sysname
-udev_device_get_sysnum
-udev_device_get_devnode
-udev_device_get_is_initialized
-udev_device_get_devlinks_list_entry
-udev_device_get_properties_list_entry
-udev_device_get_tags_list_entry
-udev_device_get_property_value
-udev_device_get_driver
-udev_device_get_devnum
-udev_device_get_action
-udev_device_get_sysattr_value
-udev_device_set_sysattr_value
-udev_device_get_sysattr_list_entry
-udev_device_get_seqnum
-udev_device_get_usec_since_initialized
-udev_device_has_tag
-</SECTION>
-
-<SECTION>
-<FILE>libudev-monitor</FILE>
-<TITLE>udev_monitor</TITLE>
-udev_monitor
-udev_monitor_ref
-udev_monitor_unref
-udev_monitor_get_udev
-udev_monitor_new_from_netlink
-udev_monitor_enable_receiving
-udev_monitor_set_receive_buffer_size
-udev_monitor_get_fd
-udev_monitor_receive_device
-udev_monitor_filter_add_match_subsystem_devtype
-udev_monitor_filter_add_match_tag
-udev_monitor_filter_update
-udev_monitor_filter_remove
-</SECTION>
-
-<SECTION>
-<FILE>libudev-enumerate</FILE>
-<TITLE>udev_enumerate</TITLE>
-udev_enumerate
-udev_enumerate_ref
-udev_enumerate_unref
-udev_enumerate_get_udev
-udev_enumerate_new
-udev_enumerate_add_match_subsystem
-udev_enumerate_add_nomatch_subsystem
-udev_enumerate_add_match_sysattr
-udev_enumerate_add_nomatch_sysattr
-udev_enumerate_add_match_property
-udev_enumerate_add_match_tag
-udev_enumerate_add_match_parent
-udev_enumerate_add_match_is_initialized
-udev_enumerate_add_match_sysname
-udev_enumerate_add_syspath
-udev_enumerate_scan_devices
-udev_enumerate_scan_subsystems
-udev_enumerate_get_list_entry
-</SECTION>
-
-<SECTION>
-<FILE>libudev-queue</FILE>
-<TITLE>udev_queue</TITLE>
-udev_queue
-udev_queue_ref
-udev_queue_unref
-udev_queue_get_udev
-udev_queue_new
-udev_queue_get_udev_is_active
-udev_queue_get_queue_is_empty
-udev_queue_get_seqnum_is_finished
-udev_queue_get_seqnum_sequence_is_finished
-udev_queue_get_queued_list_entry
-udev_queue_get_kernel_seqnum
-udev_queue_get_udev_seqnum
-udev_queue_get_fd
-udev_queue_flush
-</SECTION>
-
-<SECTION>
-<FILE>libudev-hwdb</FILE>
-<TITLE>udev_hwdb</TITLE>
-udev_hwdb
-udev_hwdb_ref
-udev_hwdb_unref
-udev_hwdb_new
-udev_hwdb_get_properties_list_entry
-</SECTION>
-
-<SECTION>
-<FILE>libudev-util</FILE>
-<TITLE>udev_util</TITLE>
-udev_util_encode_string
-</SECTION>
diff --git a/docs/libudev/libudev.types b/docs/libudev/libudev.types
deleted file mode 100644
index e69de29bb2..0000000000
--- a/docs/libudev/libudev.types
+++ /dev/null
diff --git a/docs/libudev/version.xml.in b/docs/libudev/version.xml.in
deleted file mode 100644
index d78bda9342..0000000000
--- a/docs/libudev/version.xml.in
+++ /dev/null
@@ -1 +0,0 @@
-@VERSION@
diff --git a/hwdb/20-OUI.hwdb b/hwdb/20-OUI.hwdb
index b7823d884f..fa4633dc16 100644
--- a/hwdb/20-OUI.hwdb
+++ b/hwdb/20-OUI.hwdb
@@ -44305,6 +44305,9 @@ OUI:00336C*
OUI:0034F1*
ID_OUI_FROM_DATABASE=Radicom Research, Inc.
+OUI:0034FE*
+ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
+
OUI:003532*
ID_OUI_FROM_DATABASE=Electro-Metrics Corporation
@@ -51670,6 +51673,9 @@ OUI:00F4B9*
OUI:00F76F*
ID_OUI_FROM_DATABASE=Apple
+OUI:00F81C*
+ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
+
OUI:00F860*
ID_OUI_FROM_DATABASE=PT. Panggung Electric Citrabuana
@@ -51727,6 +51733,9 @@ OUI:02CF1C*
OUI:02E6D3*
ID_OUI_FROM_DATABASE=NIXDORF COMPUTER CORPORATION
+OUI:04021F*
+ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
+
OUI:040A83*
ID_OUI_FROM_DATABASE=Alcatel-Lucent
@@ -51763,6 +51772,9 @@ OUI:041D10*
OUI:041E64*
ID_OUI_FROM_DATABASE=Apple
+OUI:041E7A*
+ ID_OUI_FROM_DATABASE=DSPWorks
+
OUI:04209A*
ID_OUI_FROM_DATABASE=Panasonic AVC Networks Company
@@ -53170,6 +53182,9 @@ OUI:0CD502*
OUI:0CD696*
ID_OUI_FROM_DATABASE=Amimon Ltd
+OUI:0CD6BD*
+ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
+
OUI:0CD7C2*
ID_OUI_FROM_DATABASE=Axium Technologies, Inc.
@@ -54481,6 +54496,9 @@ OUI:1C4840*
OUI:1C48F9*
ID_OUI_FROM_DATABASE=GN Netcom A/S
+OUI:1C497B*
+ ID_OUI_FROM_DATABASE=Gemtek Technology Co., Ltd.
+
OUI:1C4AF7*
ID_OUI_FROM_DATABASE=AMON INC
@@ -55156,6 +55174,9 @@ OUI:241C04*
OUI:241F2C*
ID_OUI_FROM_DATABASE=Calsys, Inc.
+OUI:241FA0*
+ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
+
OUI:2421AB*
ID_OUI_FROM_DATABASE=Sony Ericsson Mobile Communications
@@ -56110,6 +56131,9 @@ OUI:2CCD43*
OUI:2CCD69*
ID_OUI_FROM_DATABASE=Aqavi.com
+OUI:2CCF58*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
OUI:2CD05A*
ID_OUI_FROM_DATABASE=Liteon Technology Corporation
@@ -56473,6 +56497,9 @@ OUI:30F42F*
OUI:30F70D*
ID_OUI_FROM_DATABASE=Cisco Systems
+OUI:30F772*
+ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
+
OUI:30F7C5*
ID_OUI_FROM_DATABASE=Apple
@@ -56932,6 +56959,9 @@ OUI:380A0A*
OUI:380A94*
ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+OUI:380AAB*
+ ID_OUI_FROM_DATABASE=Formlabs
+
OUI:380B40*
ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
@@ -57964,6 +57994,9 @@ OUI:40D559*
OUI:40E230*
ID_OUI_FROM_DATABASE=AzureWave Technologies, Inc.
+OUI:40E3D6*
+ ID_OUI_FROM_DATABASE=Aruba Networks
+
OUI:40E730*
ID_OUI_FROM_DATABASE=DEY Storage Systems, Inc.
@@ -58024,6 +58057,9 @@ OUI:44184F*
OUI:4419B6*
ID_OUI_FROM_DATABASE=Hangzhou Hikvision Digital Technology Co.,Ltd.
+OUI:441CA8*
+ ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
+
OUI:441E91*
ID_OUI_FROM_DATABASE=ARVIDA Intelligent Electronics Technology Co.,Ltd.
@@ -59275,6 +59311,9 @@ OUI:50A6E3*
OUI:50A715*
ID_OUI_FROM_DATABASE=Aboundi, Inc.
+OUI:50A72B*
+ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
+
OUI:50A733*
ID_OUI_FROM_DATABASE=Ruckus Wireless
@@ -59335,6 +59374,9 @@ OUI:50D274*
OUI:50D6D7*
ID_OUI_FROM_DATABASE=Takahata Precision
+OUI:50DF95*
+ ID_OUI_FROM_DATABASE=Lytx
+
OUI:50E0C7*
ID_OUI_FROM_DATABASE=TurControlSystme AG
@@ -59413,6 +59455,9 @@ OUI:541B5D*
OUI:541DFB*
ID_OUI_FROM_DATABASE=Freestyle Energy Ltd
+OUI:541E56*
+ ID_OUI_FROM_DATABASE=juniper networks
+
OUI:541FD5*
ID_OUI_FROM_DATABASE=Advantage Electronics
@@ -59599,6 +59644,9 @@ OUI:54A274*
OUI:54A31B*
ID_OUI_FROM_DATABASE=Shenzhen Linkworld Technology Co,.LTD
+OUI:54A3FA*
+ ID_OUI_FROM_DATABASE=BQT Solutions (Australia)Pty Ltd
+
OUI:54A51B*
ID_OUI_FROM_DATABASE=Shenzhen Huawei Communication Technologies Co., Ltd
@@ -59710,6 +59758,9 @@ OUI:54FB58*
OUI:54FDBF*
ID_OUI_FROM_DATABASE=Scheidt & Bachmann GmbH
+OUI:54FF82*
+ ID_OUI_FROM_DATABASE=Davit Solution co.
+
OUI:54FFCF*
ID_OUI_FROM_DATABASE=Mopria Alliance
@@ -59809,6 +59860,9 @@ OUI:584822*
OUI:5848C0*
ID_OUI_FROM_DATABASE=COFLEC
+OUI:584925*
+ ID_OUI_FROM_DATABASE=E3 Enterprise
+
OUI:58493B*
ID_OUI_FROM_DATABASE=Palo Alto Networks
@@ -59935,6 +59989,9 @@ OUI:5894CF*
OUI:58971E*
ID_OUI_FROM_DATABASE=Cisco
+OUI:5897BD*
+ ID_OUI_FROM_DATABASE=Cisco Systems
+
OUI:589835*
ID_OUI_FROM_DATABASE=Technicolor
@@ -59962,6 +60019,9 @@ OUI:58B035*
OUI:58B0D4*
ID_OUI_FROM_DATABASE=ZuniData Systems Inc.
+OUI:58B633*
+ ID_OUI_FROM_DATABASE=Ruckus Wireless
+
OUI:58B961*
ID_OUI_FROM_DATABASE=SOLEM Electronique
@@ -61099,6 +61159,9 @@ OUI:64A341*
OUI:64A3CB*
ID_OUI_FROM_DATABASE=Apple
+OUI:64A651*
+ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
+
OUI:64A769*
ID_OUI_FROM_DATABASE=HTC Corporation
@@ -61141,6 +61204,9 @@ OUI:64BABD*
OUI:64BC11*
ID_OUI_FROM_DATABASE=CombiQ AB
+OUI:64C354*
+ ID_OUI_FROM_DATABASE=Avaya, Inc
+
OUI:64C5AA*
ID_OUI_FROM_DATABASE=South African Broadcasting Corporation
@@ -61600,6 +61666,9 @@ OUI:68F728*
OUI:68F895*
ID_OUI_FROM_DATABASE=Redflow Limited
+OUI:68F956*
+ ID_OUI_FROM_DATABASE=Objetivos y Servicio de Valor Añadido
+
OUI:68FB95*
ID_OUI_FROM_DATABASE=Generalplus Technology Inc.
@@ -63883,6 +63952,9 @@ OUI:809FAB*
OUI:80A1D7*
ID_OUI_FROM_DATABASE=Shanghai DareGlobal Technologies Co.,Ltd
+OUI:80A589*
+ ID_OUI_FROM_DATABASE=AzureWave Technologies, Inc.
+
OUI:80A85D*
ID_OUI_FROM_DATABASE=Osterhout Design Group
@@ -63973,6 +64045,9 @@ OUI:80E4DA*
OUI:80E650*
ID_OUI_FROM_DATABASE=Apple
+OUI:80E86F*
+ ID_OUI_FROM_DATABASE=Cisco Systems
+
OUI:80EA23*
ID_OUI_FROM_DATABASE=Wistron Neweb Corp.
@@ -64282,6 +64357,9 @@ OUI:84A6C8*
OUI:84A783*
ID_OUI_FROM_DATABASE=Alcatel Lucent
+OUI:84A788*
+ ID_OUI_FROM_DATABASE=Perples
+
OUI:84A8E4*
ID_OUI_FROM_DATABASE=Shenzhen Huawei Communication Technologies Co., Ltd
@@ -65149,6 +65227,9 @@ OUI:902155*
OUI:902181*
ID_OUI_FROM_DATABASE=Shanghai Huaqin Telecom Technology Co.,Ltd
+OUI:9023EC*
+ ID_OUI_FROM_DATABASE=Availink, Inc.
+
OUI:9027E4*
ID_OUI_FROM_DATABASE=Apple
@@ -65272,6 +65353,9 @@ OUI:906DC8*
OUI:906EBB*
ID_OUI_FROM_DATABASE=Hon Hai Precision Ind. Co.,Ltd.
+OUI:906FA9*
+ ID_OUI_FROM_DATABASE=NANJING PUTIAN TELECOMMUNICATIONS TECHNOLOGY CO.,LTD.
+
OUI:907025*
ID_OUI_FROM_DATABASE=Garea Microsys Co.,Ltd.
@@ -65839,6 +65923,9 @@ OUI:94EBCD*
OUI:94F19E*
ID_OUI_FROM_DATABASE=HUIZHOU MAORONG INTELLIGENT TECHNOLOGY CO.,LTD
+OUI:94F278*
+ ID_OUI_FROM_DATABASE=Elma Electronic
+
OUI:94F665*
ID_OUI_FROM_DATABASE=Ruckus Wireless
@@ -67354,6 +67441,9 @@ OUI:A81374*
OUI:A8154D*
ID_OUI_FROM_DATABASE=TP-LINK TECHNOLOGIES CO.,LTD.
+OUI:A815D6*
+ ID_OUI_FROM_DATABASE=Shenzhen Meione Technology CO., LTD
+
OUI:A816B2*
ID_OUI_FROM_DATABASE=LG Electronics
@@ -67792,6 +67882,9 @@ OUI:AC5D10*
OUI:AC5E8C*
ID_OUI_FROM_DATABASE=Utillink
+OUI:AC60B6*
+ ID_OUI_FROM_DATABASE=Ericsson AB
+
OUI:AC6123*
ID_OUI_FROM_DATABASE=Drivven, Inc.
@@ -68323,6 +68416,9 @@ OUI:B0C554*
OUI:B0C559*
ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+OUI:B0C5CA*
+ ID_OUI_FROM_DATABASE=IEEE REGISTRATION AUTHORITY - Please see MAM public listing for more information.
+
OUI:B0C69A*
ID_OUI_FROM_DATABASE=Juniper Networks
@@ -68461,6 +68557,9 @@ OUI:B424E7*
OUI:B428F1*
ID_OUI_FROM_DATABASE=E-Prime Co., Ltd.
+OUI:B4293D*
+ ID_OUI_FROM_DATABASE=Shenzhen Urovo Technology Co.,Ltd.
+
OUI:B42A39*
ID_OUI_FROM_DATABASE=ORBIT MERRET, spol. s r. o.
@@ -68926,6 +69025,9 @@ OUI:B87AC9*
OUI:B87CF2*
ID_OUI_FROM_DATABASE=Aerohive Networks Inc.
+OUI:B88687*
+ ID_OUI_FROM_DATABASE=Liteon Technology Corporation
+
OUI:B8871E*
ID_OUI_FROM_DATABASE=Good Mind Industries Co., Ltd.
@@ -69700,6 +69802,9 @@ OUI:C07009*
OUI:C07BBC*
ID_OUI_FROM_DATABASE=Cisco
+OUI:C07CD1*
+ ID_OUI_FROM_DATABASE=PEGATRON CORPORATION
+
OUI:C07E40*
ID_OUI_FROM_DATABASE=SHENZHEN XDK COMMUNICATION EQUIPMENT CO.,LTD
@@ -69892,6 +69997,9 @@ OUI:C401CE*
OUI:C40415*
ID_OUI_FROM_DATABASE=NETGEAR INC.,
+OUI:C4047B*
+ ID_OUI_FROM_DATABASE=Shenzhen YOUHUA Technology Co., Ltd
+
OUI:C40528*
ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
@@ -70378,6 +70486,9 @@ OUI:C848F5*
OUI:C84C75*
ID_OUI_FROM_DATABASE=CISCO SYSTEMS, INC.
+OUI:C85195*
+ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
+
OUI:C85645*
ID_OUI_FROM_DATABASE=Intermas France
@@ -70486,6 +70597,9 @@ OUI:C8A729*
OUI:C8A823*
ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+OUI:C8A9FC*
+ ID_OUI_FROM_DATABASE=Goyoo Networks Inc.
+
OUI:C8AA21*
ID_OUI_FROM_DATABASE=ARRIS Group, Inc.
@@ -71260,6 +71374,9 @@ OUI:D08CFF*
OUI:D0929E*
ID_OUI_FROM_DATABASE=Microsoft Corporation
+OUI:D09380*
+ ID_OUI_FROM_DATABASE=Ducere Technologies Pvt. Ltd.
+
OUI:D093F8*
ID_OUI_FROM_DATABASE=Stonestreet One LLC
@@ -71521,6 +71638,9 @@ OUI:D43D67*
OUI:D43D7E*
ID_OUI_FROM_DATABASE=Micro-Star Int'l Co, Ltd
+OUI:D440F0*
+ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
+
OUI:D443A8*
ID_OUI_FROM_DATABASE=Changzhou Haojie Electric Co., Ltd.
@@ -71812,6 +71932,9 @@ OUI:D4F143*
OUI:D4F46F*
ID_OUI_FROM_DATABASE=Apple
+OUI:D4F4BE*
+ ID_OUI_FROM_DATABASE=Palo Alto Networks
+
OUI:D4F513*
ID_OUI_FROM_DATABASE=Texas Instruments
@@ -72022,6 +72145,9 @@ OUI:D881CE*
OUI:D88466*
ID_OUI_FROM_DATABASE=Extreme Networks
+OUI:D888CE*
+ ID_OUI_FROM_DATABASE=RF Technology Pty Ltd
+
OUI:D88A3B*
ID_OUI_FROM_DATABASE=UNIT-EM
@@ -72319,6 +72445,9 @@ OUI:DC3C2E*
OUI:DC3C84*
ID_OUI_FROM_DATABASE=Ticom Geomatics, Inc.
+OUI:DC3CF6*
+ ID_OUI_FROM_DATABASE=Atomic Rules LLC
+
OUI:DC3E51*
ID_OUI_FROM_DATABASE=Solberg & Andersen AS
@@ -72940,6 +73069,9 @@ OUI:E4121D*
OUI:E41289*
ID_OUI_FROM_DATABASE=topsystem Systemhaus GmbH
+OUI:E41A2C*
+ ID_OUI_FROM_DATABASE=ZPE Systems, Inc.
+
OUI:E41C4B*
ID_OUI_FROM_DATABASE=V2 TECHNOLOGY, INC.
@@ -73120,6 +73252,9 @@ OUI:E496AE*
OUI:E497F0*
ID_OUI_FROM_DATABASE=Shanghai VLC Technologies Ltd. Co.
+OUI:E498D1*
+ ID_OUI_FROM_DATABASE=Microsoft Mobile Oy
+
OUI:E498D6*
ID_OUI_FROM_DATABASE=Apple, Inc
@@ -73507,6 +73642,9 @@ OUI:E8BB3D*
OUI:E8BBA8*
ID_OUI_FROM_DATABASE=GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD.
+OUI:E8BDD1*
+ ID_OUI_FROM_DATABASE=HUAWEI TECHNOLOGIES CO.,LTD
+
OUI:E8BE81*
ID_OUI_FROM_DATABASE=SAGEMCOM
@@ -74011,6 +74149,9 @@ OUI:F02624*
OUI:F0264C*
ID_OUI_FROM_DATABASE=Dr. Sigrist AG
+OUI:F0272D*
+ ID_OUI_FROM_DATABASE=Amazon Technologies Inc.
+
OUI:F02765*
ID_OUI_FROM_DATABASE=Murata Manufactuaring Co.,Ltd.
@@ -74368,6 +74509,9 @@ OUI:F40F1B*
OUI:F40F9B*
ID_OUI_FROM_DATABASE=WAVELINK
+OUI:F41535*
+ ID_OUI_FROM_DATABASE=SPON Communication Technology Co.,Ltd
+
OUI:F41563*
ID_OUI_FROM_DATABASE=F5 Networks, Inc.
@@ -74527,9 +74671,15 @@ OUI:F48139*
OUI:F48771*
ID_OUI_FROM_DATABASE=Infoblox
+OUI:F48B32*
+ ID_OUI_FROM_DATABASE=XIAOMI INC
+
OUI:F48E09*
ID_OUI_FROM_DATABASE=Nokia Corporation
+OUI:F48E92*
+ ID_OUI_FROM_DATABASE=Huawei Technologies Co., Ltd
+
OUI:F490CA*
ID_OUI_FROM_DATABASE=Tensorcom
@@ -75460,6 +75610,9 @@ OUI:FCE998*
OUI:FCEDB9*
ID_OUI_FROM_DATABASE=Arrayent
+OUI:FCF136*
+ ID_OUI_FROM_DATABASE=Samsung Electronics Co.,Ltd
+
OUI:FCF152*
ID_OUI_FROM_DATABASE=Sony Corporation
diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb
index ff8862b9ea..93241ca490 100644
--- a/hwdb/20-bluetooth-vendor-product.hwdb
+++ b/hwdb/20-bluetooth-vendor-product.hwdb
@@ -1237,7 +1237,7 @@ bluetooth:v0199*
ID_VENDOR_FROM_DATABASE=SALTO SYSTEMS S.L.
bluetooth:v019A*
- ID_VENDOR_FROM_DATABASE=T-Engine Forum
+ ID_VENDOR_FROM_DATABASE=TRON Forum (formerly T-Engine Forum)
bluetooth:v019B*
ID_VENDOR_FROM_DATABASE=CUBETECH s.r.o.
@@ -1508,3 +1508,162 @@ bluetooth:v01F3*
bluetooth:v01F4*
ID_VENDOR_FROM_DATABASE=UTC Fire and Security
+
+bluetooth:v01F5*
+ ID_VENDOR_FROM_DATABASE=Cool Webthings Limited
+
+bluetooth:v01F6*
+ ID_VENDOR_FROM_DATABASE=DJO Global
+
+bluetooth:v01F7*
+ ID_VENDOR_FROM_DATABASE=Gelliner Limited
+
+bluetooth:v01F8*
+ ID_VENDOR_FROM_DATABASE=Anyka (Guangzhou) Microelectronics Technology Co, LTD
+
+bluetooth:v01F9*
+ ID_VENDOR_FROM_DATABASE=Medtronic, Inc.
+
+bluetooth:v01FA*
+ ID_VENDOR_FROM_DATABASE=Gozio, Inc.
+
+bluetooth:v01FB*
+ ID_VENDOR_FROM_DATABASE=Form Lifting, LLC
+
+bluetooth:v01FC*
+ ID_VENDOR_FROM_DATABASE=Wahoo Fitness, LLC
+
+bluetooth:v01FD*
+ ID_VENDOR_FROM_DATABASE=Kontakt Micro-Location Sp. z o.o.
+
+bluetooth:v01FE*
+ ID_VENDOR_FROM_DATABASE=Radio System Corporation
+
+bluetooth:v01FF*
+ ID_VENDOR_FROM_DATABASE=Freescale Semiconductor, Inc.
+
+bluetooth:v0200*
+ ID_VENDOR_FROM_DATABASE=Verifone Systems PTe Ltd. Taiwan Branch
+
+bluetooth:v0201*
+ ID_VENDOR_FROM_DATABASE=AR Timing
+
+bluetooth:v0202*
+ ID_VENDOR_FROM_DATABASE=Rigado LLC
+
+bluetooth:v0203*
+ ID_VENDOR_FROM_DATABASE=Kemppi Oy
+
+bluetooth:v0204*
+ ID_VENDOR_FROM_DATABASE=Tapcentive Inc.
+
+bluetooth:v0205*
+ ID_VENDOR_FROM_DATABASE=Smartbotics Inc.
+
+bluetooth:v0206*
+ ID_VENDOR_FROM_DATABASE=Otter Products, LLC
+
+bluetooth:v0207*
+ ID_VENDOR_FROM_DATABASE=STEMP Inc.
+
+bluetooth:v0208*
+ ID_VENDOR_FROM_DATABASE=LumiGeek LLC
+
+bluetooth:v0209*
+ ID_VENDOR_FROM_DATABASE=InvisionHeart Inc.
+
+bluetooth:v020A*
+ ID_VENDOR_FROM_DATABASE=Macnica Inc.
+
+bluetooth:v020B*
+ ID_VENDOR_FROM_DATABASE=Jaguar Land Rover Limited
+
+bluetooth:v020C*
+ ID_VENDOR_FROM_DATABASE=CoroWare Technologies, Inc
+
+bluetooth:v020D*
+ ID_VENDOR_FROM_DATABASE=Simplo Technology Co., LTD
+
+bluetooth:v020E*
+ ID_VENDOR_FROM_DATABASE=Omron Healthcare Co., LTD
+
+bluetooth:v020F*
+ ID_VENDOR_FROM_DATABASE=Comodule GMBH
+
+bluetooth:v0210*
+ ID_VENDOR_FROM_DATABASE=ikeGPS
+
+bluetooth:v0211*
+ ID_VENDOR_FROM_DATABASE=Telink Semiconductor Co. Ltd
+
+bluetooth:v0212*
+ ID_VENDOR_FROM_DATABASE=Interplan Co., Ltd
+
+bluetooth:v0213*
+ ID_VENDOR_FROM_DATABASE=Wyler AG
+
+bluetooth:v0214*
+ ID_VENDOR_FROM_DATABASE=IK Multimedia Production srl
+
+bluetooth:v0215*
+ ID_VENDOR_FROM_DATABASE=Lukoton Experience Oy
+
+bluetooth:v0216*
+ ID_VENDOR_FROM_DATABASE=MTI Ltd
+
+bluetooth:v0217*
+ ID_VENDOR_FROM_DATABASE=Tech4home, Lda
+
+bluetooth:v0218*
+ ID_VENDOR_FROM_DATABASE=Hiotech AB
+
+bluetooth:v0219*
+ ID_VENDOR_FROM_DATABASE=DOTT Limited
+
+bluetooth:v021A*
+ ID_VENDOR_FROM_DATABASE=Blue Speck Labs, LLC
+
+bluetooth:v021B*
+ ID_VENDOR_FROM_DATABASE=Cisco Systems Inc
+
+bluetooth:v021C*
+ ID_VENDOR_FROM_DATABASE=Mobicomm Inc
+
+bluetooth:v021D*
+ ID_VENDOR_FROM_DATABASE=Edamic
+
+bluetooth:v021E*
+ ID_VENDOR_FROM_DATABASE=Goodnet Ltd
+
+bluetooth:v021F*
+ ID_VENDOR_FROM_DATABASE=Luster Leaf Products Inc
+
+bluetooth:v0220*
+ ID_VENDOR_FROM_DATABASE=Manus Machina BV
+
+bluetooth:v0221*
+ ID_VENDOR_FROM_DATABASE=Mobiquity Networks Inc
+
+bluetooth:v0222*
+ ID_VENDOR_FROM_DATABASE=Praxis Dynamics
+
+bluetooth:v0223*
+ ID_VENDOR_FROM_DATABASE=Philip Morris Products S.A.
+
+bluetooth:v0224*
+ ID_VENDOR_FROM_DATABASE=Comarch SA
+
+bluetooth:v0225*
+ ID_VENDOR_FROM_DATABASE=Nestl Nespresso S.A.
+
+bluetooth:v0226*
+ ID_VENDOR_FROM_DATABASE=Merlinia A/S
+
+bluetooth:v0227*
+ ID_VENDOR_FROM_DATABASE=LifeBEAM Technologies
+
+bluetooth:v0228*
+ ID_VENDOR_FROM_DATABASE=Twocanoes Labs, LLC
+
+bluetooth:v0229*
+ ID_VENDOR_FROM_DATABASE=Muoverti Limited
diff --git a/hwdb/20-pci-vendor-model.hwdb b/hwdb/20-pci-vendor-model.hwdb
index b27a5c7902..4cc7cfd65c 100644
--- a/hwdb/20-pci-vendor-model.hwdb
+++ b/hwdb/20-pci-vendor-model.hwdb
@@ -998,6 +998,9 @@ pci:v00001000d0000005Fsv00001028sd00001F4C*
pci:v00001000d0000005Fsv00001028sd00001F4D*
ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3008 [Fury] (PERC H330 Embedded (for monolithic))
+pci:v00001000d0000005Fsv00001054sd0000306A*
+ ID_MODEL_FROM_DATABASE=MegaRAID SAS-3 3008 [Fury] (SAS 3004 iMR ROMB)
+
pci:v00001000d00000060*
ID_MODEL_FROM_DATABASE=MegaRAID SAS 1078
@@ -6171,28 +6174,28 @@ pci:v00001002d00006819sv0000174Bsd0000E221*
ID_MODEL_FROM_DATABASE=Pitcairn PRO [Radeon HD 7850] (Radeon HD 7850 2GB GDDR5 DVI-I/DVI-D/HDMI/DP)
pci:v00001002d00006820*
- ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8890M / R9 M275X]
+ ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8890M / R9 M275X/M375X]
pci:v00001002d00006820sv0000103Csd00001851*
- ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8890M / R9 M275X] (Radeon HD 7750M)
+ ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (Radeon HD 7750M)
pci:v00001002d00006820sv000017AAsd00003643*
- ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8890M / R9 M275X] (Radeon R9 A375)
+ ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (Radeon R9 A375)
pci:v00001002d00006820sv000017AAsd00003801*
- ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8890M / R9 M275X] (Radeon R9 M275)
+ ID_MODEL_FROM_DATABASE=Venus XTX [Radeon HD 8890M / R9 M275X/M375X] (Radeon R9 M275)
pci:v00001002d00006821*
- ID_MODEL_FROM_DATABASE=Venus XT [Radeon HD 8870M / R9 M270X]
+ ID_MODEL_FROM_DATABASE=Venus XT [Radeon HD 8870M / R9 M270X/M370X]
pci:v00001002d00006821sv00001002sd0000031E*
- ID_MODEL_FROM_DATABASE=Venus XT [Radeon HD 8870M / R9 M270X] (FirePro SX4000)
+ ID_MODEL_FROM_DATABASE=Venus XT [Radeon HD 8870M / R9 M270X/M370X] (FirePro SX4000)
pci:v00001002d00006821sv00001028sd000005CC*
- ID_MODEL_FROM_DATABASE=Venus XT [Radeon HD 8870M / R9 M270X] (FirePro M5100)
+ ID_MODEL_FROM_DATABASE=Venus XT [Radeon HD 8870M / R9 M270X/M370X] (FirePro M5100)
pci:v00001002d00006821sv00001028sd000015CC*
- ID_MODEL_FROM_DATABASE=Venus XT [Radeon HD 8870M / R9 M270X] (FirePro M5100)
+ ID_MODEL_FROM_DATABASE=Venus XT [Radeon HD 8870M / R9 M270X/M370X] (FirePro M5100)
pci:v00001002d00006822*
ID_MODEL_FROM_DATABASE=Venus PRO [Radeon E8860]
@@ -12116,6 +12119,9 @@ pci:v0000102Bd0000051E*
pci:v0000102Bd0000051F*
ID_MODEL_FROM_DATABASE=MGA 2164W [Millennium II] AGP
+pci:v0000102Bd0000051Fsv0000102Bsd00002100*
+ ID_MODEL_FROM_DATABASE=MGA 2164W [Millennium II] AGP (MGA-2164WA [Millennium II A])
+
pci:v0000102Bd00000520*
ID_MODEL_FROM_DATABASE=MGA G200
@@ -12237,7 +12243,7 @@ pci:v0000102Bd00000521sv0000102Bsd0000FF02*
ID_MODEL_FROM_DATABASE=MGA G200 AGP (Mystique G200 AGP)
pci:v0000102Bd00000521sv0000102Bsd0000FF03*
- ID_MODEL_FROM_DATABASE=MGA G200 AGP (Millennium G200 AGP)
+ ID_MODEL_FROM_DATABASE=MGA G200 AGP (Millennium G200A AGP)
pci:v0000102Bd00000521sv0000102Bsd0000FF04*
ID_MODEL_FROM_DATABASE=MGA G200 AGP (Marvel G200 AGP)
@@ -26115,16 +26121,16 @@ pci:v000010DEd0000056Asv0000147Bsd00001C3E*
ID_MODEL_FROM_DATABASE=MCP73 [nForce 630i] USB 2.0 Controller (EHCI) (I-N73V motherboard)
pci:v000010DEd0000056C*
- ID_MODEL_FROM_DATABASE=MCP73 IDE
+ ID_MODEL_FROM_DATABASE=MCP73 IDE Controller
pci:v000010DEd0000056Csv00001019sd0000297A*
- ID_MODEL_FROM_DATABASE=MCP73 IDE (MCP73PVT-SM)
+ ID_MODEL_FROM_DATABASE=MCP73 IDE Controller (MCP73PVT-SM)
pci:v000010DEd0000056Csv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=MCP73 IDE (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=MCP73 IDE Controller (I-N73V motherboard)
pci:v000010DEd0000056Csv00001AFAsd00007150*
- ID_MODEL_FROM_DATABASE=MCP73 IDE (JW-IN7150-HD)
+ ID_MODEL_FROM_DATABASE=MCP73 IDE Controller (JW-IN7150-HD)
pci:v000010DEd0000056D*
ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge
@@ -26133,7 +26139,7 @@ pci:v000010DEd0000056Dsv00001019sd0000297A*
ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge (MCP73PVT-SM)
pci:v000010DEd0000056Dsv000010DEsd0000CB73*
- ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge (MCP73 PCIe x16 port)
+ ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge (MCP73 PCIe x1 port)
pci:v000010DEd0000056E*
ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge
@@ -26141,6 +26147,9 @@ pci:v000010DEd0000056E*
pci:v000010DEd0000056Esv00001019sd0000297A*
ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge (MCP73PVT-SM)
+pci:v000010DEd0000056Esv000010DEsd00000000*
+ ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge (MCP73 PCIe x16 port)
+
pci:v000010DEd0000056F*
ID_MODEL_FROM_DATABASE=MCP73 PCI Express bridge
@@ -26976,112 +26985,112 @@ pci:v000010DEd000007C8sv00001AFAsd00007150*
ID_MODEL_FROM_DATABASE=MCP73 Memory Controller (JW-IN7150-HD)
pci:v000010DEd000007CB*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller
pci:v000010DEd000007CBsv00001019sd0000297A*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (MCP73PVT-SM)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (MCP73PVT-SM)
pci:v000010DEd000007CBsv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (I-N73V motherboard)
pci:v000010DEd000007CBsv00001AFAsd00007150*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (JW-IN7150-HD)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (JW-IN7150-HD)
pci:v000010DEd000007CD*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller
pci:v000010DEd000007CDsv00001019sd0000297A*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (MCP73PVT-SM)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (MCP73PVT-SM)
pci:v000010DEd000007CDsv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (I-N73V motherboard)
pci:v000010DEd000007CDsv00001AFAsd00007150*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (JW-IN7150-HD)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (JW-IN7150-HD)
pci:v000010DEd000007CE*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller
pci:v000010DEd000007CEsv00001019sd0000297A*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (MCP73PVT-SM)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (MCP73PVT-SM)
pci:v000010DEd000007CEsv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (I-N73V motherboard)
pci:v000010DEd000007CEsv00001AFAsd00007150*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (JW-IN7150-HD)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (JW-IN7150-HD)
pci:v000010DEd000007CF*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller
pci:v000010DEd000007CFsv00001019sd0000297A*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (MCP73PVT-SM)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (MCP73PVT-SM)
pci:v000010DEd000007CFsv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (I-N73V motherboard)
pci:v000010DEd000007CFsv00001AFAsd00007150*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (JW-IN7150-HD)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (JW-IN7150-HD)
pci:v000010DEd000007D0*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller
pci:v000010DEd000007D0sv00001019sd0000297A*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (MCP73PVT-SM)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (MCP73PVT-SM)
pci:v000010DEd000007D0sv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (I-N73V motherboard)
pci:v000010DEd000007D0sv00001AFAsd00007150*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (JW-IN7150-HD)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (JW-IN7150-HD)
pci:v000010DEd000007D1*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller
pci:v000010DEd000007D1sv00001019sd0000297A*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (MCP73PVT-SM)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (MCP73PVT-SM)
pci:v000010DEd000007D1sv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (I-N73V motherboard)
pci:v000010DEd000007D1sv00001AFAsd00007150*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (JW-IN7150-HD)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (JW-IN7150-HD)
pci:v000010DEd000007D2*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller
pci:v000010DEd000007D2sv00001019sd0000297A*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (MCP73PVT-SM)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (MCP73PVT-SM)
pci:v000010DEd000007D2sv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (I-N73V motherboard)
pci:v000010DEd000007D2sv00001AFAsd00007150*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (JW-IN7150-HD)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (JW-IN7150-HD)
pci:v000010DEd000007D3*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller
pci:v000010DEd000007D3sv00001019sd0000297A*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (MCP73PVT-SM)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (MCP73PVT-SM)
pci:v000010DEd000007D3sv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (I-N73V motherboard)
pci:v000010DEd000007D3sv00001AFAsd00007150*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (JW-IN7150-HD)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (JW-IN7150-HD)
pci:v000010DEd000007D6*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller
pci:v000010DEd000007D6sv00001019sd0000297A*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (MCP73PVT-SM)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (MCP73PVT-SM)
pci:v000010DEd000007D6sv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (I-N73V motherboard)
pci:v000010DEd000007D6sv00001AFAsd00007150*
- ID_MODEL_FROM_DATABASE=nForce 630i memory controller (JW-IN7150-HD)
+ ID_MODEL_FROM_DATABASE=nForce 610i/630i memory controller (JW-IN7150-HD)
pci:v000010DEd000007D7*
ID_MODEL_FROM_DATABASE=MCP73 LPC Bridge
@@ -27165,10 +27174,10 @@ pci:v000010DEd000007E5*
ID_MODEL_FROM_DATABASE=C73 [GeForce 7100 / nForce 620i]
pci:v000010DEd000007F0*
- ID_MODEL_FROM_DATABASE=MCP73 IDE
+ ID_MODEL_FROM_DATABASE=MCP73 SATA Controller (IDE mode)
pci:v000010DEd000007F0sv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=MCP73 IDE (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=MCP73 SATA Controller (IDE mode) (I-N73V motherboard)
pci:v000010DEd000007F4*
ID_MODEL_FROM_DATABASE=GeForce 7100/nForce 630i SATA
@@ -27176,9 +27185,15 @@ pci:v000010DEd000007F4*
pci:v000010DEd000007F4sv00001019sd0000297A*
ID_MODEL_FROM_DATABASE=GeForce 7100/nForce 630i SATA (MCP73PVT-SM)
+pci:v000010DEd000007F4sv0000147Bsd00001C3E*
+ ID_MODEL_FROM_DATABASE=GeForce 7100/nForce 630i SATA (I-N73V motherboard)
+
pci:v000010DEd000007F8*
ID_MODEL_FROM_DATABASE=MCP73 SATA RAID Controller
+pci:v000010DEd000007F8sv0000147Bsd00001C3E*
+ ID_MODEL_FROM_DATABASE=MCP73 SATA RAID Controller (I-N73V motherboard)
+
pci:v000010DEd000007FC*
ID_MODEL_FROM_DATABASE=MCP73 High Definition Audio
@@ -27192,16 +27207,16 @@ pci:v000010DEd000007FCsv0000147Bsd00001C3E*
ID_MODEL_FROM_DATABASE=MCP73 High Definition Audio (I-N73V motherboard)
pci:v000010DEd000007FE*
- ID_MODEL_FROM_DATABASE=GeForce 7100/nForce 630i USB
+ ID_MODEL_FROM_DATABASE=MCP73 OHCI USB 1.1 Controller
pci:v000010DEd000007FEsv00001019sd0000297A*
- ID_MODEL_FROM_DATABASE=GeForce 7100/nForce 630i USB (MCP73PVT-SM)
+ ID_MODEL_FROM_DATABASE=MCP73 OHCI USB 1.1 Controller (MCP73PVT-SM)
pci:v000010DEd000007FEsv0000147Bsd00001C3E*
- ID_MODEL_FROM_DATABASE=GeForce 7100/nForce 630i USB (I-N73V motherboard)
+ ID_MODEL_FROM_DATABASE=MCP73 OHCI USB 1.1 Controller (I-N73V motherboard)
pci:v000010DEd000007FEsv00001AFAsd00007150*
- ID_MODEL_FROM_DATABASE=GeForce 7100/nForce 630i USB (JW-IN7150-HD)
+ ID_MODEL_FROM_DATABASE=MCP73 OHCI USB 1.1 Controller (JW-IN7150-HD)
pci:v000010DEd00000840*
ID_MODEL_FROM_DATABASE=C77 [GeForce 8200M]
@@ -30269,12 +30284,18 @@ pci:v000010DEd000013D8*
pci:v000010DEd000013D9*
ID_MODEL_FROM_DATABASE=GM204M [GeForce GTX 965M]
+pci:v000010DEd000013F2*
+ ID_MODEL_FROM_DATABASE=GM204GL [Tesla M60]
+
pci:v000010DEd00001401*
ID_MODEL_FROM_DATABASE=GM206 [GeForce GTX 960]
pci:v000010DEd000017C2*
ID_MODEL_FROM_DATABASE=GM200 [GeForce GTX TITAN X]
+pci:v000010DEd000017C8*
+ ID_MODEL_FROM_DATABASE=GM200 [GeForce GTX 980 Ti]
+
pci:v000010DEd000017F0*
ID_MODEL_FROM_DATABASE=GM200GL [Quadro M6000]
@@ -31673,12 +31694,21 @@ pci:v00001103d00000622*
pci:v00001103d00000640*
ID_MODEL_FROM_DATABASE=RocketRAID 640 4 Port SATA-III Controller
+pci:v00001103d00000641*
+ ID_MODEL_FROM_DATABASE=RocketRAID 640L 4 Port SATA-III Controller
+
+pci:v00001103d00000642*
+ ID_MODEL_FROM_DATABASE=RocketRAID 642L 2 Port SATA-III Controller (eSATA)
+
pci:v00001103d00000644*
ID_MODEL_FROM_DATABASE=RocketRAID 644 4 Port SATA-III Controller (eSATA)
pci:v00001103d00000645*
ID_MODEL_FROM_DATABASE=RocketRAID 644L 4 Port SATA-III Controller (eSATA)
+pci:v00001103d00000646*
+ ID_MODEL_FROM_DATABASE=RocketRAID 644LS SATA-III Controller (4 eSATA devices connected by 1 SAS cable)
+
pci:v00001103d00001720*
ID_MODEL_FROM_DATABASE=RocketRAID 1720 (2x SATA II RAID Controller)
@@ -32441,6 +32471,9 @@ pci:v00001106d00003058sv00001462sd00003092*
pci:v00001106d00003058sv00001462sd00003300*
ID_MODEL_FROM_DATABASE=VT82C686 AC97 Audio Controller (MS-6330 Onboard Audio)
+pci:v00001106d00003058sv00001462sd00003400*
+ ID_MODEL_FROM_DATABASE=VT82C686 AC97 Audio Controller (MS-6340 (VT8363) motherboard)
+
pci:v00001106d00003058sv000015DDsd00007609*
ID_MODEL_FROM_DATABASE=VT82C686 AC97 Audio Controller (Onboard Audio)
@@ -46559,9 +46592,6 @@ pci:v0000148E*
pci:v0000148F*
ID_VENDOR_FROM_DATABASE=Plant Equipment, Inc.
-pci:v0000148Fd00005370*
- ID_MODEL_FROM_DATABASE=Dexlink AUWL15I1
-
pci:v00001490*
ID_VENDOR_FROM_DATABASE=Stone Microsystems PTY Ltd.
@@ -63881,6 +63911,9 @@ pci:v00008086d00001A30*
pci:v00008086d00001A30sv00001028sd0000010E*
ID_MODEL_FROM_DATABASE=82845 845 [Brookdale] Chipset Host Bridge (Optiplex GX240)
+pci:v00008086d00001A30sv0000147Bsd00000505*
+ ID_MODEL_FROM_DATABASE=82845 845 [Brookdale] Chipset Host Bridge (BL7 motherboard)
+
pci:v00008086d00001A30sv000015D9sd00003280*
ID_MODEL_FROM_DATABASE=82845 845 [Brookdale] Chipset Host Bridge (Supermicro P4SBE Mainboard)
@@ -65304,43 +65337,46 @@ pci:v00008086d00002440sv00008086sd00005744*
ID_MODEL_FROM_DATABASE=82801BA ISA Bridge (LPC) (S845WD1-E)
pci:v00008086d00002442*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1
pci:v00008086d00002442sv00001014sd000001C6*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (Netvista A40/A40p)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (Netvista A40/A40p)
pci:v00008086d00002442sv00001025sd00001016*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (Travelmate 612 TX)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (Travelmate 612 TX)
pci:v00008086d00002442sv00001028sd000000C7*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (Dimension 8100)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (Dimension 8100)
pci:v00008086d00002442sv00001028sd000000D8*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (Precision 530)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (Precision 530)
pci:v00008086d00002442sv00001028sd0000010E*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (Optiplex GX240)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (Optiplex GX240)
pci:v00008086d00002442sv0000103Csd0000126F*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (e-pc 40)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (e-pc 40)
pci:v00008086d00002442sv00001043sd00008027*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (TUSL2-C Mainboard)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (TUSL2-C Mainboard)
pci:v00008086d00002442sv0000104Dsd000080DF*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (Vaio PCG-FX403)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (Vaio PCG-FX403)
+
+pci:v00008086d00002442sv0000147Bsd00000505*
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (BL7 motherboard)
pci:v00008086d00002442sv0000147Bsd00000507*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (TH7II-RAID)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (TH7II-RAID)
pci:v00008086d00002442sv00008086sd00004532*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (D815EEA2 mainboard)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (D815EEA2 mainboard)
pci:v00008086d00002442sv00008086sd00004557*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (D815EGEW Mainboard)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (D815EGEW Mainboard)
pci:v00008086d00002442sv00008086sd00005744*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (S845WD1-E mainboard)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #1 (S845WD1-E mainboard)
pci:v00008086d00002443*
ID_MODEL_FROM_DATABASE=82801BA/BAM SMBus Controller
@@ -65369,6 +65405,9 @@ pci:v00008086d00002443sv00001043sd00008027*
pci:v00008086d00002443sv0000104Dsd000080DF*
ID_MODEL_FROM_DATABASE=82801BA/BAM SMBus Controller (Vaio PCG-FX403)
+pci:v00008086d00002443sv0000147Bsd00000505*
+ ID_MODEL_FROM_DATABASE=82801BA/BAM SMBus Controller (BL7 motherboard)
+
pci:v00008086d00002443sv0000147Bsd00000507*
ID_MODEL_FROM_DATABASE=82801BA/BAM SMBus Controller (TH7II-RAID)
@@ -65385,37 +65424,40 @@ pci:v00008086d00002443sv00008086sd00005744*
ID_MODEL_FROM_DATABASE=82801BA/BAM SMBus Controller (S845WD1-E mainboard)
pci:v00008086d00002444*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2
pci:v00008086d00002444sv00001025sd00001016*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (Travelmate 612 TX)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2 (Travelmate 612 TX)
pci:v00008086d00002444sv00001028sd000000C7*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (Dimension 8100)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2 (Dimension 8100)
pci:v00008086d00002444sv00001028sd000000D8*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (Precision 530)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2 (Precision 530)
pci:v00008086d00002444sv00001028sd0000010E*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (Optiplex GX240)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2 (Optiplex GX240)
pci:v00008086d00002444sv0000103Csd0000126F*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (e-pc 40)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2 (e-pc 40)
pci:v00008086d00002444sv00001043sd00008027*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (TUSL2-C Mainboard)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2 (TUSL2-C Mainboard)
pci:v00008086d00002444sv0000104Dsd000080DF*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (Vaio PCG-FX403)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2 (Vaio PCG-FX403)
+
+pci:v00008086d00002444sv0000147Bsd00000505*
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2 (BL7 motherboard)
pci:v00008086d00002444sv0000147Bsd00000507*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (TH7II-RAID)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2 (TH7II-RAID)
pci:v00008086d00002444sv00008086sd00004532*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (D815EEA2 mainboard)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2 (D815EEA2 mainboard)
pci:v00008086d00002444sv00008086sd00005744*
- ID_MODEL_FROM_DATABASE=82801BA/BAM USB Controller #1 (S845WD1-E mainboard)
+ ID_MODEL_FROM_DATABASE=82801BA/BAM UHCI USB 1.1 Controller #2 (S845WD1-E mainboard)
pci:v00008086d00002445*
ID_MODEL_FROM_DATABASE=82801BA/BAM AC'97 Audio Controller
@@ -65444,6 +65486,9 @@ pci:v00008086d00002445sv0000104Dsd000080DF*
pci:v00008086d00002445sv00001462sd00003370*
ID_MODEL_FROM_DATABASE=82801BA/BAM AC'97 Audio Controller (STAC9721 AC)
+pci:v00008086d00002445sv0000147Bsd00000505*
+ ID_MODEL_FROM_DATABASE=82801BA/BAM AC'97 Audio Controller (BL7 motherboard)
+
pci:v00008086d00002445sv0000147Bsd00000507*
ID_MODEL_FROM_DATABASE=82801BA/BAM AC'97 Audio Controller (TH7II-RAID)
@@ -65645,6 +65690,9 @@ pci:v00008086d0000244Bsv0000103Csd0000126F*
pci:v00008086d0000244Bsv00001043sd00008027*
ID_MODEL_FROM_DATABASE=82801BA IDE U100 Controller (TUSL2-C Mainboard)
+pci:v00008086d0000244Bsv0000147Bsd00000505*
+ ID_MODEL_FROM_DATABASE=82801BA IDE U100 Controller (BL7 motherboard)
+
pci:v00008086d0000244Bsv0000147Bsd00000507*
ID_MODEL_FROM_DATABASE=82801BA IDE U100 Controller (TH7II-RAID)
@@ -79125,7 +79173,7 @@ pci:v0000DEAFd00009052*
ID_MODEL_FROM_DATABASE=PC Weasel Watchdog Timer
pci:v0000DEDA*
- ID_VENDOR_FROM_DATABASE=SoftHard Technology Ltd.
+ ID_VENDOR_FROM_DATABASE=XIMEA
pci:v0000E000*
ID_VENDOR_FROM_DATABASE=Winbond
diff --git a/hwdb/70-mouse.hwdb b/hwdb/70-mouse.hwdb
index 8174f2762e..2784b941a1 100644
--- a/hwdb/70-mouse.hwdb
+++ b/hwdb/70-mouse.hwdb
@@ -102,6 +102,16 @@
# For mice with switchable resolution, sort by the starred entry.
##########################################
+# Apple
+##########################################
+
+# Apple MagicMouse
+# Note: this device changes name once connected to a mac, the name ends up
+# as $username`s mouse
+mouse:bluetooth:v05acp030d:name:*:
+ MOUSE_DPI=1300@1000
+
+##########################################
# Chicony
##########################################
diff --git a/m4/.gitignore b/m4/.gitignore
index cf35a86e88..55eaa803a1 100644
--- a/m4/.gitignore
+++ b/m4/.gitignore
@@ -4,4 +4,3 @@ ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
-gtk-doc.m4
diff --git a/m4/ax_normalize_path.m4 b/m4/ax_normalize_path.m4
new file mode 100644
index 0000000000..e8f9973e35
--- /dev/null
+++ b/m4/ax_normalize_path.m4
@@ -0,0 +1,115 @@
+# ===========================================================================
+# http://www.gnu.org/software/autoconf-archive/ax_normalize_path.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_NORMALIZE_PATH(VARNAME, [REFERENCE_STRING])
+#
+# DESCRIPTION
+#
+# Perform some cleanups on the value of $VARNAME (interpreted as a path):
+#
+# - empty paths are changed to '.'
+# - trailing slashes are removed
+# - repeated slashes are squeezed except a leading doubled slash '//'
+# (which might indicate a networked disk on some OS).
+#
+# REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if
+# REFERENCE_STRING contains some backslashes, all slashes and backslashes
+# are turned into backslashes, otherwise they are all turned into slashes.
+#
+# This makes processing of DOS filenames quite easier, because you can
+# turn a filename to the Unix notation, make your processing, and turn it
+# back to original notation.
+#
+# filename='A:\FOO\\BAR\'
+# old_filename="$filename"
+# # Switch to the unix notation
+# AX_NORMALIZE_PATH([filename], ["/"])
+# # now we have $filename = 'A:/FOO/BAR' and we can process it as if
+# # it was a Unix path. For instance let's say that you want
+# # to append '/subpath':
+# filename="$filename/subpath"
+# # finally switch back to the original notation
+# AX_NORMALIZE_PATH([filename], ["$old_filename"])
+# # now $filename equals to 'A:\FOO\BAR\subpath'
+#
+# One good reason to make all path processing with the unix convention is
+# that backslashes have a special meaning in many cases. For instance
+#
+# expr 'A:\FOO' : 'A:\Foo'
+#
+# will return 0 because the second argument is a regex in which
+# backslashes have to be backslashed. In other words, to have the two
+# strings to match you should write this instead:
+#
+# expr 'A:\Foo' : 'A:\\Foo'
+#
+# Such behavior makes DOS filenames extremely unpleasant to work with. So
+# temporary turn your paths to the Unix notation, and revert them to the
+# original notation after the processing. See the macro
+# AX_COMPUTE_RELATIVE_PATHS for a concrete example of this.
+#
+# REFERENCE_STRING defaults to $VARIABLE, this means that slashes will be
+# converted to backslashes if $VARIABLE already contains some backslashes
+# (see $thirddir below).
+#
+# firstdir='/usr/local//share'
+# seconddir='C:\Program Files\\'
+# thirddir='C:\home/usr/'
+# AX_NORMALIZE_PATH([firstdir])
+# AX_NORMALIZE_PATH([seconddir])
+# AX_NORMALIZE_PATH([thirddir])
+# # $firstdir = '/usr/local/share'
+# # $seconddir = 'C:\Program Files'
+# # $thirddir = 'C:\home\usr'
+#
+# LICENSE
+#
+# Copyright (c) 2008 Alexandre Duret-Lutz <adl@gnu.org>
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+# Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+#serial 5
+
+AU_ALIAS([ADL_NORMALIZE_PATH], [AX_NORMALIZE_PATH])
+AC_DEFUN([AX_NORMALIZE_PATH],
+[case ":[$]$1:" in
+# change empty paths to '.'
+ ::) $1='.' ;;
+# strip trailing slashes
+ :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;;
+ :*:) ;;
+esac
+# squeze repeated slashes
+case ifelse($2,,"[$]$1",$2) in
+# if the path contains any backslashes, turn slashes into backslashes
+ *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+# if the path contains slashes, also turn backslashes into slashes
+ *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1/,g'` ;;
+esac])
diff --git a/man/custom-html.xsl b/man/custom-html.xsl
index 5730bed4a1..0856c1f29c 100644
--- a/man/custom-html.xsl
+++ b/man/custom-html.xsl
@@ -232,18 +232,6 @@
</xsl:attribute>
<xsl:text>Python </xsl:text>
</a>·
- <a>
- <xsl:attribute name="href">
- <xsl:text>../libudev/index.html</xsl:text>
- </xsl:attribute>
- <xsl:text>libudev </xsl:text>
- </a>·
- <a>
- <xsl:attribute name="href">
- <xsl:text>../libudev/index.html</xsl:text>
- </xsl:attribute>
- <xsl:text>gudev </xsl:text>
- </a>
<span style="float:right">
<xsl:text>systemd </xsl:text>
diff --git a/man/hwdb.xml b/man/hwdb.xml
index b3602ac5da..e6215df738 100644
--- a/man/hwdb.xml
+++ b/man/hwdb.xml
@@ -50,10 +50,10 @@
regardless of the directories in which they live. However, files with
identical filenames replace each other. Files in <filename>/etc</filename>
have the highest priority, files in <filename>/run</filename> take precedence
- over files with the same name in <filename>/usr/lib</filename>. This can be
+ over files with the same name in <filename>&rootprefix;/lib</filename>. This can be
used to override a system-supplied hwdb file with a local file if needed;
a symlink in <filename>/etc</filename> with the same name as a hwdb file in
- <filename>/usr/lib</filename>, pointing to <filename>/dev/null</filename>,
+ <filename>&rootprefix;/lib</filename>, pointing to <filename>/dev/null</filename>,
disables the hwdb file entirely. hwdb files must have the extension
<filename>.hwdb</filename>; other extensions are ignored.</para>
diff --git a/man/systemctl.xml b/man/systemctl.xml
index 35f47de52c..409b6f0895 100644
--- a/man/systemctl.xml
+++ b/man/systemctl.xml
@@ -1733,6 +1733,7 @@ kobject-uevent 1 systemd-udevd-kernel.socket systemd-udevd.service
<varname>$VISUAL</varname> are present or if it is set to an empty
string or if their execution failed, systemctl will try to execute well
known editors in this order:
+ <citerefentry project='die-net'><refentrytitle>editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry project='die-net'><refentrytitle>nano</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry project='die-net'><refentrytitle>vim</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry project='die-net'><refentrytitle>vi</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
diff --git a/man/systemd.link.xml b/man/systemd.link.xml
index 75cf6e1953..5db06842bd 100644
--- a/man/systemd.link.xml
+++ b/man/systemd.link.xml
@@ -70,10 +70,10 @@
However, files with identical filenames replace each other. Files
in <filename>/etc</filename> have the highest priority, files in
<filename>/run</filename> take precedence over files with the same
- name in <filename>/usr/lib</filename>. This can be used to
+ name in <filename>&rootprefix;/lib</filename>. This can be used to
override a system-supplied link file with a local file if needed;
a symlink in <filename>/etc</filename> with the same name as a
- link file in <filename>/usr/lib</filename>, pointing to
+ link file in <filename>&rootprefix;/lib</filename>, pointing to
<filename>/dev/null</filename>, disables the link file
entirely.</para>
diff --git a/man/systemd.netdev.xml b/man/systemd.netdev.xml
index 6cd77abd04..786c7d478a 100644
--- a/man/systemd.netdev.xml
+++ b/man/systemd.netdev.xml
@@ -81,10 +81,10 @@
identical filenames replace each other. Files in
<filename>/etc</filename> have the highest priority, files in
<filename>/run</filename> take precedence over files with the same
- name in <filename>/usr/lib</filename>. This can be used to
+ name in <filename>&rootprefix;/lib</filename>. This can be used to
override a system-supplied configuration file with a local file if
needed; a symlink in <filename>/etc</filename> with the same name
- as a configuration file in <filename>/usr/lib</filename>, pointing
+ as a configuration file in <filename>&rootprefix;/lib</filename>, pointing
to <filename>/dev/null</filename>, disables the configuration file
entirely.</para>
diff --git a/man/systemd.network.xml b/man/systemd.network.xml
index 0b9781fb8b..54fef4c9c4 100644
--- a/man/systemd.network.xml
+++ b/man/systemd.network.xml
@@ -77,10 +77,10 @@
identical filenames replace each other. Files in
<filename>/etc</filename> have the highest priority, files in
<filename>/run</filename> take precedence over files with the same
- name in <filename>/usr/lib</filename>. This can be used to
+ name in <filename>&rootprefix;/lib</filename>. This can be used to
override a system-supplied configuration file with a local file if
needed; a symlink in <filename>/etc</filename> with the same name
- as a configuration file in <filename>/usr/lib</filename>, pointing
+ as a configuration file in <filename>&rootprefix;/lib</filename>, pointing
to <filename>/dev/null</filename>, disables the configuration file
entirely.</para>
@@ -366,7 +366,8 @@
the routing table. Takes either a boolean argument, or the
values <literal>ipv4</literal> or <literal>ipv6</literal>,
which only enables IP forwarding for the specified address
- family. This controls the
+ family, or <literal>kernel</literal>, which preserves existing sysctl settings.
+ This controls the
<filename>net.ipv4.conf.&lt;interface&gt;.forwarding</filename>
and
<filename>net.ipv6.conf.&lt;interface&gt;.forwarding</filename>
@@ -375,8 +376,8 @@
for details about sysctl options). Defaults to
<literal>no</literal>.</para>
- <para>Note: unless this option is turned on, no IP
- forwarding is done on this interface, even if this is
+ <para>Note: unless this option is turned on, or set to <literal>kernel</literal>,
+ no IP forwarding is done on this interface, even if this is
globally turned on in the kernel, with the
<filename>net.ipv4.ip_forward</filename> and
<filename>net.ipv4.ip_forward</filename> sysctl
diff --git a/man/udev.xml b/man/udev.xml
index f7ebaad4bc..d5d8a17cdb 100644
--- a/man/udev.xml
+++ b/man/udev.xml
@@ -65,10 +65,10 @@
regardless of the directories in which they live. However, files with
identical filenames replace each other. Files in <filename>/etc</filename>
have the highest priority, files in <filename>/run</filename> take precedence
- over files with the same name in <filename>/usr/lib</filename>. This can be
+ over files with the same name in <filename>&rootprefix;/lib</filename>. This can be
used to override a system-supplied rules file with a local file if needed;
a symlink in <filename>/etc</filename> with the same name as a rules file in
- <filename>/usr/lib</filename>, pointing to <filename>/dev/null</filename>,
+ <filename>&rootprefix;/lib</filename>, pointing to <filename>/dev/null</filename>,
disables the rules file entirely. Rule files must have the extension
<filename>.rules</filename>; other extensions are ignored.</para>
diff --git a/po/es.po b/po/es.po
index 675f9721bf..811e36e81f 100644
--- a/po/es.po
+++ b/po/es.po
@@ -528,5 +528,5 @@ msgstr ""
#, c-format
msgid "Checking in progress on %d disk (%3.1f%% complete)"
msgid_plural "Checking in progress on %d disks (%3.1f%% complete)"
-msgstr[0] "Comprobando progreso en %d disco (%3.1f%% completado)"
-msgstr[1] "Comprobando progreso en %d discos (%3.1f%% completado)"
+msgstr[0] "Comprobando progreso en %d disco (%3.1f %% completado)"
+msgstr[1] "Comprobando progreso en %d discos (%3.1f %% completado)"
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
index 2aa15f3411..64c5f1cfdd 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -6,7 +6,7 @@
ACTION=="remove", GOTO="persistent_storage_end"
SUBSYSTEM!="block", GOTO="persistent_storage_end"
-KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|bcache*", GOTO="persistent_storage_end"
+KERNEL!="loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|sr*|vd*|bcache*|xvd*", GOTO="persistent_storage_end"
# ignore partitions that span the entire disk
TEST=="whole_disk", GOTO="persistent_storage_end"
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 1dc6406beb..17736de01c 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -65,7 +65,7 @@
if (( CURRENT == 1 )); then
_describe -t commands 'systemctl command' _systemctl_cmds || compadd "$@"
else
- local curcontext="$curcontext"
+ local curcontext="$curcontext" expl
cmd="${${_systemctl_cmds[(r)$words[1]:*]%%:*}}"
# Deal with any aliases
@@ -93,9 +93,7 @@
__systemctl()
{
- local -a _modes
- _modes=("--user" "--system")
- systemctl ${words:*_modes} --full --no-legend --no-pager "$@"
+ systemctl $_sys_service_mgr --full --no-legend --no-pager "$@"
}
@@ -174,7 +172,8 @@ for fun in is-active is-failed is-enabled status show cat mask preset help list-
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{
_systemctl_really_all_units
- compadd "$@" -a - _sys_really_all_units
+ _wanted systemd-units expl unit \
+ compadd "$@" -a - _sys_really_all_units
}
done
@@ -182,34 +181,39 @@ done
(( $+functions[_systemctl_disable] )) || _systemctl_disable()
{
local _sys_unit_state; _systemctl_unit_state
- compadd "$@" - ${(k)_sys_unit_state[(R)enabled]}
+ _wanted systemd-units expl 'enabled unit' \
+ compadd "$@" - ${(k)_sys_unit_state[(R)enabled]}
}
(( $+functions[_systemctl_reenable] )) || _systemctl_reenable()
{
local _sys_unit_state; _systemctl_unit_state
- compadd "$@" - ${(k)_sys_unit_state[(R)(enabled|disabled)]} $(_systemctl_get_template_names)
+ _wanted systemd-units expl 'enabled/disabled unit' \
+ compadd "$@" - ${(k)_sys_unit_state[(R)(enabled|disabled)]} $(_systemctl_get_template_names)
}
# Completion functions for DISABLED_UNITS
(( $+functions[_systemctl_enable] )) || _systemctl_enable()
{
local _sys_unit_state; _systemctl_unit_state
- compadd "$@" - ${(k)_sys_unit_state[(R)disabled]} $(_systemctl_get_template_names)
+ _wanted systemd-units expl 'disabled unit' \
+ compadd "$@" - ${(k)_sys_unit_state[(R)disabled]} $(_systemctl_get_template_names)
}
# Completion functions for FAILED_UNITS
(( $+functions[_systemctl_reset-failed] )) || _systemctl_reset-failed()
{
local _sys_failed_units; _systemctl_failed_units
- compadd "$@" -a - _sys_failed_units || _message "no failed unit found"
+ _wanted systemd-units expl 'failed unit' \
+ compadd "$@" -a - _sys_failed_units || _message "no failed unit found"
}
# Completion functions for STARTABLE_UNITS
(( $+functions[_systemctl_start] )) || _systemctl_start()
{
local _sys_startable_units; _systemctl_startable_units
- compadd "$@" - ${_sys_startable_units[*]} $(_systemctl_get_template_names)
+ _wanted systemd-units expl 'startable unit' \
+ compadd "$@" - ${_sys_startable_units[*]} $(_systemctl_get_template_names)
}
# Completion functions for STOPPABLE_UNITS
@@ -217,8 +221,9 @@ for fun in stop kill try-restart condrestart ; do
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{
local _sys_active_units; _systemctl_active_units
- compadd "$@" - $( _filter_units_by_property CanStop yes \
- ${_sys_active_units[*]} )
+ _wanted systemd-units expl 'stoppable unit' \
+ compadd "$@" - $( _filter_units_by_property CanStop yes \
+ ${_sys_active_units[*]} )
}
done
@@ -226,8 +231,9 @@ done
(( $+functions[_systemctl_isolate] )) || _systemctl_isolate()
{
_systemctl_all_units
- compadd "$@" - $( _filter_units_by_property AllowIsolate yes \
- ${_sys_all_units[*]} )
+ _wanted systemd-units expl 'isolatable unit' \
+ compadd "$@" - $( _filter_units_by_property AllowIsolate yes \
+ ${_sys_all_units[*]} )
}
# Completion functions for RELOADABLE_UNITS
@@ -235,8 +241,9 @@ for fun in reload reload-or-try-restart force-reload ; do
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{
local _sys_active_units; _systemctl_active_units
- compadd "$@" - $( _filter_units_by_property CanReload yes \
- ${_sys_active_units[*]} )
+ _wanted systemd-units expl 'reloadable unit' \
+ compadd "$@" - $( _filter_units_by_property CanReload yes \
+ ${_sys_active_units[*]} )
}
done
@@ -245,7 +252,8 @@ for fun in restart reload-or-restart ; do
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{
local _sys_restartable_units; _systemctl_restartable_units
- compadd "$@" - ${_sys_restartable_units[*]} $(_systemctl_get_template_names)
+ _wanted systemd-units expl 'restartable unit' \
+ compadd "$@" - ${_sys_restartable_units[*]} $(_systemctl_get_template_names)
}
done
@@ -253,28 +261,32 @@ done
(( $+functions[_systemctl_unmask] )) || _systemctl_unmask()
{
local _sys_unit_state; _systemctl_unit_state
- compadd "$@" - ${(k)_sys_unit_state[(R)masked]} || _message "no masked units found"
+ _wanted systemd-units expl 'masked unit' \
+ compadd "$@" - ${(k)_sys_unit_state[(R)masked]} || _message "no masked units found"
}
# Completion functions for JOBS
(( $+functions[_systemctl_cancel] )) || _systemctl_cancel()
{
- compadd "$@" - ${${(f)"$(__systemctl list-jobs)"}%% *} ||
- _message "no jobs found"
+ _wanted systemd-jobs expl job \
+ compadd "$@" - ${${(f)"$(__systemctl list-jobs)"}%% *} ||
+ _message "no jobs found"
}
# Completion functions for SNAPSHOTS
(( $+functions[_systemctl_delete] )) || _systemctl_delete()
{
- compadd "$@" - ${${(f)"$(__systemctl list-units --type snapshot --all)"}%% *} ||
- _message "no snapshots found"
+ _wanted systemd-snapshots expl snapshot \
+ compadd "$@" - ${${(f)"$(__systemctl list-units --type snapshot --all)"}%% *} ||
+ _message "no snapshots found"
}
# Completion functions for TARGETS
(( $+functions[_systemctl_set-default] )) || _systemctl_set-default()
{
- compadd "$@" - ${${(f)"$(__systemctl list-unit-files --type target --all)"}%% *} ||
- _message "no targets found"
+ _wanted systemd-targets expl target \
+ compadd "$@" - ${${(f)"$(__systemctl list-unit-files --type target --all)"}%% *} ||
+ _message "no targets found"
}
# Completion functions for ENVS
@@ -286,8 +298,8 @@ for fun in set-environment unset-environment ; do
if [[ "${fun}" = "set-environment" ]]; then
suf='-S='
fi
-
- compadd "$@" ${suf} - ${${(f)"$(systemctl show-environment)"}%%=*}
+ _wanted systemd-environment expl 'environment variable' \
+ compadd "$@" ${suf} - ${${(f)"$(systemctl show-environment)"}%%=*}
}
done
@@ -355,6 +367,8 @@ _job_modes() {
_values -s , "${_modes[@]}"
}
+local -a _modes; _modes=("--user" "--system")
+local _sys_service_mgr=${${words:*_modes}[(R)(${(j.|.)_modes})]:---system}
_arguments -s \
{-h,--help}'[Show help]' \
'--version[Show package version]' \
diff --git a/src/core/ima-setup.c b/src/core/ima-setup.c
index 7721b3ecaf..4d8b638115 100644
--- a/src/core/ima-setup.c
+++ b/src/core/ima-setup.c
@@ -24,9 +24,10 @@
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
#include "ima-setup.h"
-#include "copy.h"
#include "util.h"
#include "log.h"
@@ -39,6 +40,8 @@ int ima_setup(void) {
#ifdef HAVE_IMA
_cleanup_close_ int policyfd = -1, imafd = -1;
+ struct stat st;
+ char *policy;
if (access(IMA_SECFS_DIR, F_OK) < 0) {
log_debug("IMA support is disabled in the kernel, ignoring.");
@@ -63,12 +66,20 @@ int ima_setup(void) {
return 0;
}
- r = copy_bytes(policyfd, imafd, (off_t) -1, false);
+ if (fstat(policyfd, &st) < 0)
+ return log_error_errno(errno, "Failed to fstat "IMA_POLICY_PATH": %m");
+
+ policy = mmap(NULL, st.st_size, PROT_READ, MAP_PRIVATE, policyfd, 0);
+ if (policy == MAP_FAILED)
+ return log_error_errno(errno, "Failed to mmap "IMA_POLICY_PATH": %m");
+
+ r = loop_write(imafd, policy, (size_t) st.st_size, false);
if (r < 0)
log_error_errno(r, "Failed to load the IMA custom policy file "IMA_POLICY_PATH": %m");
else
log_info("Successfully loaded the IMA custom policy "IMA_POLICY_PATH".");
+ munmap(policy, st.st_size);
#endif /* HAVE_IMA */
return r;
}
diff --git a/src/core/manager.c b/src/core/manager.c
index ae473d05c2..a1c54339ea 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -741,9 +741,6 @@ static int manager_setup_kdbus(Manager *m) {
if (!is_kdbus_available())
return -ESOCKTNOSUPPORT;
- if (m->running_as == MANAGER_SYSTEM && detect_container(NULL) <= 0)
- bus_kernel_fix_attach_mask();
-
m->kdbus_fd = bus_kernel_create_bus(
m->running_as == MANAGER_SYSTEM ? "system" : "user",
m->running_as == MANAGER_SYSTEM, &p);
diff --git a/src/gudev/.gitignore b/src/gudev/.gitignore
deleted file mode 100644
index 4577903c40..0000000000
--- a/src/gudev/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-gudev-1.0.pc
-gudevenumtypes.c
-gudevenumtypes.h
-gudevmarshal.c
-gudevmarshal.h
-GUdev-1.0.gir
-GUdev-1.0.typelib
diff --git a/src/gudev/Makefile b/src/gudev/Makefile
deleted file mode 120000
index d0b0e8e008..0000000000
--- a/src/gudev/Makefile
+++ /dev/null
@@ -1 +0,0 @@
-../Makefile \ No newline at end of file
diff --git a/src/gudev/gjs-example.js b/src/gudev/gjs-example.js
deleted file mode 100755
index 5586fd6a61..0000000000
--- a/src/gudev/gjs-example.js
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/usr/bin/env gjs-console
-
-// This currently depends on the following patches to gjs
-//
-// http://bugzilla.gnome.org/show_bug.cgi?id=584558
-// http://bugzilla.gnome.org/show_bug.cgi?id=584560
-// http://bugzilla.gnome.org/show_bug.cgi?id=584568
-
-const GUdev = imports.gi.GUdev;
-const Mainloop = imports.mainloop;
-
-function print_device (device) {
- print (" subsystem: " + device.get_subsystem ());
- print (" devtype: " + device.get_devtype ());
- print (" name: " + device.get_name ());
- print (" number: " + device.get_number ());
- print (" sysfs_path: " + device.get_sysfs_path ());
- print (" driver: " + device.get_driver ());
- print (" action: " + device.get_action ());
- print (" seqnum: " + device.get_seqnum ());
- print (" device type: " + device.get_device_type ());
- print (" device number: " + device.get_device_number ());
- print (" device file: " + device.get_device_file ());
- print (" device file symlinks: " + device.get_device_file_symlinks ());
- print (" foo: " + device.get_sysfs_attr_as_strv ("stat"));
- var keys = device.get_property_keys ();
- for (var n = 0; n < keys.length; n++) {
- print (" " + keys[n] + "=" + device.get_property (keys[n]));
- }
-}
-
-function on_uevent (client, action, device) {
- print ("action " + action + " on device " + device.get_sysfs_path());
- print_device (device);
- print ("");
-}
-
-var client = new GUdev.Client ({subsystems: ["block", "usb/usb_interface"]});
-client.connect ("uevent", on_uevent);
-
-var block_devices = client.query_by_subsystem ("block");
-for (var n = 0; n < block_devices.length; n++) {
- print ("block device: " + block_devices[n].get_device_file ());
-}
-
-var d;
-
-d = client.query_by_device_number (GUdev.DeviceType.BLOCK, 0x0810);
-if (d == null) {
- print ("query_by_device_number 0x810 -> null");
-} else {
- print ("query_by_device_number 0x810 -> " + d.get_device_file ());
- var dd = d.get_parent_with_subsystem ("usb", null);
- print_device (dd);
- print ("--------------------------------------------------------------------------");
- while (d != null) {
- print_device (d);
- print ("");
- d = d.get_parent ();
- }
-}
-
-d = client.query_by_sysfs_path ("/sys/block/sda/sda1");
-print ("query_by_sysfs_path (\"/sys/block/sda1\") -> " + d.get_device_file ());
-
-d = client.query_by_subsystem_and_name ("block", "sda2");
-print ("query_by_subsystem_and_name (\"block\", \"sda2\") -> " + d.get_device_file ());
-
-d = client.query_by_device_file ("/dev/sda");
-print ("query_by_device_file (\"/dev/sda\") -> " + d.get_device_file ());
-
-d = client.query_by_device_file ("/dev/block/8:0");
-print ("query_by_device_file (\"/dev/block/8:0\") -> " + d.get_device_file ());
-
-Mainloop.run('udev-example');
diff --git a/src/gudev/gudev-1.0.pc.in b/src/gudev/gudev-1.0.pc.in
deleted file mode 100644
index 058262d767..0000000000
--- a/src/gudev/gudev-1.0.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: gudev-1.0
-Description: GObject bindings for libudev
-Version: @VERSION@
-Requires: glib-2.0, gobject-2.0
-Libs: -L${libdir} -lgudev-1.0
-Cflags: -I${includedir}/gudev-1.0
diff --git a/src/gudev/gudev.h b/src/gudev/gudev.h
deleted file mode 100644
index 1dc42b11b7..0000000000
--- a/src/gudev/gudev.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2008 David Zeuthen <davidz@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef __G_UDEV_H__
-#define __G_UDEV_H__
-
-#define _GUDEV_INSIDE_GUDEV_H
-#include <gudev/gudevenums.h>
-#include <gudev/gudevenumtypes.h>
-#include <gudev/gudevtypes.h>
-#include <gudev/gudevclient.h>
-#include <gudev/gudevdevice.h>
-#include <gudev/gudevenumerator.h>
-#undef _GUDEV_INSIDE_GUDEV_H
-
-#endif /* __G_UDEV_H__ */
diff --git a/src/gudev/gudevclient.c b/src/gudev/gudevclient.c
deleted file mode 100644
index 8b9516cba8..0000000000
--- a/src/gudev/gudevclient.c
+++ /dev/null
@@ -1,533 +0,0 @@
-/* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2008-2010 David Zeuthen <davidz@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#include "gudevclient.h"
-#include "gudevdevice.h"
-#include "gudevmarshal.h"
-#include "gudevprivate.h"
-
-/**
- * SECTION:gudevclient
- * @short_description: Query devices and listen to uevents
- *
- * #GUdevClient is used to query information about devices on a Linux
- * system from the Linux kernel and the udev device
- * manager.
- *
- * Device information is retrieved from the kernel (through the
- * <literal>sysfs</literal> filesystem) and the udev daemon (through a
- * <literal>tmpfs</literal> filesystem) and presented through
- * #GUdevDevice objects. This means that no blocking IO ever happens
- * (in both cases, we are essentially just reading data from kernel
- * memory) and as such there are no asynchronous versions of the
- * provided methods.
- *
- * To get #GUdevDevice objects, use
- * g_udev_client_query_by_subsystem(),
- * g_udev_client_query_by_device_number(),
- * g_udev_client_query_by_device_file(),
- * g_udev_client_query_by_sysfs_path(),
- * g_udev_client_query_by_subsystem_and_name()
- * or the #GUdevEnumerator type.
- *
- * To listen to uevents, connect to the #GUdevClient::uevent signal.
- */
-
-struct _GUdevClientPrivate
-{
- GSource *watch_source;
- struct udev *udev;
- struct udev_monitor *monitor;
-
- gchar **subsystems;
-};
-
-enum
-{
- PROP_0,
- PROP_SUBSYSTEMS,
-};
-
-enum
-{
- UEVENT_SIGNAL,
- LAST_SIGNAL,
-};
-
-static guint signals[LAST_SIGNAL] = { 0 };
-
-G_DEFINE_TYPE (GUdevClient, g_udev_client, G_TYPE_OBJECT)
-
-/* ---------------------------------------------------------------------------------------------------- */
-
-static gboolean
-monitor_event (GIOChannel *source,
- GIOCondition condition,
- gpointer data)
-{
- GUdevClient *client = (GUdevClient *) data;
- GUdevDevice *device;
- struct udev_device *udevice;
-
- if (client->priv->monitor == NULL)
- goto out;
- udevice = udev_monitor_receive_device (client->priv->monitor);
- if (udevice == NULL)
- goto out;
-
- device = _g_udev_device_new (udevice);
- udev_device_unref (udevice);
- g_signal_emit (client,
- signals[UEVENT_SIGNAL],
- 0,
- g_udev_device_get_action (device),
- device);
- g_object_unref (device);
-
- out:
- return TRUE;
-}
-
-static void
-g_udev_client_finalize (GObject *object)
-{
- GUdevClient *client = G_UDEV_CLIENT (object);
-
- if (client->priv->watch_source != NULL)
- {
- g_source_destroy (client->priv->watch_source);
- client->priv->watch_source = NULL;
- }
-
- if (client->priv->monitor != NULL)
- {
- udev_monitor_unref (client->priv->monitor);
- client->priv->monitor = NULL;
- }
-
- if (client->priv->udev != NULL)
- {
- udev_unref (client->priv->udev);
- client->priv->udev = NULL;
- }
-
- g_strfreev (client->priv->subsystems);
-
- if (G_OBJECT_CLASS (g_udev_client_parent_class)->finalize != NULL)
- G_OBJECT_CLASS (g_udev_client_parent_class)->finalize (object);
-}
-
-static void
-g_udev_client_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GUdevClient *client = G_UDEV_CLIENT (object);
-
- switch (prop_id)
- {
- case PROP_SUBSYSTEMS:
- if (client->priv->subsystems != NULL)
- g_strfreev (client->priv->subsystems);
- client->priv->subsystems = g_strdupv (g_value_get_boxed (value));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-g_udev_client_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GUdevClient *client = G_UDEV_CLIENT (object);
-
- switch (prop_id)
- {
- case PROP_SUBSYSTEMS:
- g_value_set_boxed (value, client->priv->subsystems);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-g_udev_client_constructed (GObject *object)
-{
- GUdevClient *client = G_UDEV_CLIENT (object);
- GIOChannel *channel;
- guint n;
-
- client->priv->udev = udev_new ();
-
- /* connect to event source */
- client->priv->monitor = udev_monitor_new_from_netlink (client->priv->udev, "udev");
-
- //g_debug ("ss = %p", client->priv->subsystems);
-
- if (client->priv->subsystems != NULL)
- {
- /* install subsystem filters to only wake up for certain events */
- for (n = 0; client->priv->subsystems[n] != NULL; n++)
- {
- gchar *subsystem;
- gchar *devtype;
- gchar *s;
-
- subsystem = g_strdup (client->priv->subsystems[n]);
- devtype = NULL;
-
- //g_debug ("s = '%s'", subsystem);
-
- s = strstr (subsystem, "/");
- if (s != NULL)
- {
- devtype = s + 1;
- *s = '\0';
- }
-
- if (client->priv->monitor != NULL)
- udev_monitor_filter_add_match_subsystem_devtype (client->priv->monitor, subsystem, devtype);
-
- g_free (subsystem);
- }
-
- /* listen to events, and buffer them */
- if (client->priv->monitor != NULL)
- {
- udev_monitor_enable_receiving (client->priv->monitor);
- channel = g_io_channel_unix_new (udev_monitor_get_fd (client->priv->monitor));
- client->priv->watch_source = g_io_create_watch (channel, G_IO_IN);
- g_io_channel_unref (channel);
- g_source_set_callback (client->priv->watch_source, (GSourceFunc) monitor_event, client, NULL);
- g_source_attach (client->priv->watch_source, g_main_context_get_thread_default ());
- g_source_unref (client->priv->watch_source);
- }
- else
- {
- client->priv->watch_source = NULL;
- }
- }
-
- if (G_OBJECT_CLASS (g_udev_client_parent_class)->constructed != NULL)
- G_OBJECT_CLASS (g_udev_client_parent_class)->constructed (object);
-}
-
-
-static void
-g_udev_client_class_init (GUdevClientClass *klass)
-{
- GObjectClass *gobject_class = (GObjectClass *) klass;
-
- gobject_class->constructed = g_udev_client_constructed;
- gobject_class->set_property = g_udev_client_set_property;
- gobject_class->get_property = g_udev_client_get_property;
- gobject_class->finalize = g_udev_client_finalize;
-
- /**
- * GUdevClient:subsystems:
- *
- * The subsystems to listen for uevents on.
- *
- * To listen for only a specific DEVTYPE for a given SUBSYSTEM, use
- * "subsystem/devtype". For example, to only listen for uevents
- * where SUBSYSTEM is usb and DEVTYPE is usb_interface, use
- * "usb/usb_interface".
- *
- * If this property is %NULL, then no events will be reported. If
- * it's the empty array, events from all subsystems will be
- * reported.
- */
- g_object_class_install_property (gobject_class,
- PROP_SUBSYSTEMS,
- g_param_spec_boxed ("subsystems",
- "The subsystems to listen for changes on",
- "The subsystems to listen for changes on",
- G_TYPE_STRV,
- G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_READWRITE));
-
- /**
- * GUdevClient::uevent:
- * @client: The #GUdevClient receiving the event.
- * @action: The action for the uevent e.g. "add", "remove", "change", "move", etc.
- * @device: Details about the #GUdevDevice the event is for.
- *
- * Emitted when @client receives an uevent.
- *
- * This signal is emitted in the
- * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
- * of the thread that @client was created in.
- */
- signals[UEVENT_SIGNAL] = g_signal_new ("uevent",
- G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (GUdevClientClass, uevent),
- NULL,
- NULL,
- g_udev_marshal_VOID__STRING_OBJECT,
- G_TYPE_NONE,
- 2,
- G_TYPE_STRING,
- G_UDEV_TYPE_DEVICE);
-
- g_type_class_add_private (klass, sizeof (GUdevClientPrivate));
-}
-
-static void
-g_udev_client_init (GUdevClient *client)
-{
- client->priv = G_TYPE_INSTANCE_GET_PRIVATE (client,
- G_UDEV_TYPE_CLIENT,
- GUdevClientPrivate);
-}
-
-/**
- * g_udev_client_new:
- * @subsystems: (array zero-terminated=1) (element-type utf8) (transfer none) (allow-none): A %NULL terminated string array of subsystems to listen for uevents on, %NULL to not listen on uevents at all, or an empty array to listen to uevents on all subsystems. See the documentation for the #GUdevClient:subsystems property for details on this parameter.
- *
- * Constructs a #GUdevClient object that can be used to query
- * information about devices. Connect to the #GUdevClient::uevent
- * signal to listen for uevents. Note that signals are emitted in the
- * <link linkend="g-main-context-push-thread-default">thread-default main loop</link>
- * of the thread that you call this constructor from.
- *
- * Returns: A new #GUdevClient object. Free with g_object_unref().
- */
-GUdevClient *
-g_udev_client_new (const gchar * const *subsystems)
-{
- return G_UDEV_CLIENT (g_object_new (G_UDEV_TYPE_CLIENT, "subsystems", subsystems, NULL));
-}
-
-/**
- * g_udev_client_query_by_subsystem:
- * @client: A #GUdevClient.
- * @subsystem: (allow-none): The subsystem to get devices for or %NULL to get all devices.
- *
- * Gets all devices belonging to @subsystem.
- *
- * Returns: (nullable) (element-type GUdevDevice) (transfer full): A
- * list of #GUdevDevice objects. The caller should free the result by
- * using g_object_unref() on each element in the list and then
- * g_list_free() on the list.
- */
-GList *
-g_udev_client_query_by_subsystem (GUdevClient *client,
- const gchar *subsystem)
-{
- struct udev_enumerate *enumerate;
- struct udev_list_entry *l, *devices;
- GList *ret;
-
- g_return_val_if_fail (G_UDEV_IS_CLIENT (client), NULL);
-
- ret = NULL;
-
- /* prepare a device scan */
- enumerate = udev_enumerate_new (client->priv->udev);
-
- /* filter for subsystem */
- if (subsystem != NULL)
- udev_enumerate_add_match_subsystem (enumerate, subsystem);
- /* retrieve the list */
- udev_enumerate_scan_devices (enumerate);
-
- /* add devices to the list */
- devices = udev_enumerate_get_list_entry (enumerate);
- for (l = devices; l != NULL; l = udev_list_entry_get_next (l))
- {
- struct udev_device *udevice;
- GUdevDevice *device;
-
- udevice = udev_device_new_from_syspath (udev_enumerate_get_udev (enumerate),
- udev_list_entry_get_name (l));
- if (udevice == NULL)
- continue;
- device = _g_udev_device_new (udevice);
- udev_device_unref (udevice);
- ret = g_list_prepend (ret, device);
- }
- udev_enumerate_unref (enumerate);
-
- ret = g_list_reverse (ret);
-
- return ret;
-}
-
-/**
- * g_udev_client_query_by_device_number:
- * @client: A #GUdevClient.
- * @type: A value from the #GUdevDeviceType enumeration.
- * @number: A device number.
- *
- * Looks up a device for a type and device number.
- *
- * Returns: (nullable) (transfer full): A #GUdevDevice object or %NULL
- * if the device was not found. Free with g_object_unref().
- */
-GUdevDevice *
-g_udev_client_query_by_device_number (GUdevClient *client,
- GUdevDeviceType type,
- GUdevDeviceNumber number)
-{
- struct udev_device *udevice;
- GUdevDevice *device;
-
- g_return_val_if_fail (G_UDEV_IS_CLIENT (client), NULL);
-
- device = NULL;
- udevice = udev_device_new_from_devnum (client->priv->udev, type, number);
-
- if (udevice == NULL)
- goto out;
-
- device = _g_udev_device_new (udevice);
- udev_device_unref (udevice);
-
- out:
- return device;
-}
-
-/**
- * g_udev_client_query_by_device_file:
- * @client: A #GUdevClient.
- * @device_file: A device file.
- *
- * Looks up a device for a device file.
- *
- * Returns: (nullable) (transfer full): A #GUdevDevice object or %NULL
- * if the device was not found. Free with g_object_unref().
- */
-GUdevDevice *
-g_udev_client_query_by_device_file (GUdevClient *client,
- const gchar *device_file)
-{
- struct stat stat_buf;
- GUdevDevice *device;
-
- g_return_val_if_fail (G_UDEV_IS_CLIENT (client), NULL);
- g_return_val_if_fail (device_file != NULL, NULL);
-
- device = NULL;
-
- if (stat (device_file, &stat_buf) != 0)
- goto out;
-
- if (stat_buf.st_rdev == 0)
- goto out;
-
- if (S_ISBLK (stat_buf.st_mode))
- device = g_udev_client_query_by_device_number (client, G_UDEV_DEVICE_TYPE_BLOCK, stat_buf.st_rdev);
- else if (S_ISCHR (stat_buf.st_mode))
- device = g_udev_client_query_by_device_number (client, G_UDEV_DEVICE_TYPE_CHAR, stat_buf.st_rdev);
-
- out:
- return device;
-}
-
-/**
- * g_udev_client_query_by_sysfs_path:
- * @client: A #GUdevClient.
- * @sysfs_path: A sysfs path.
- *
- * Looks up a device for a sysfs path.
- *
- * Returns: (nullable) (transfer full): A #GUdevDevice object or %NULL
- * if the device was not found. Free with g_object_unref().
- */
-GUdevDevice *
-g_udev_client_query_by_sysfs_path (GUdevClient *client,
- const gchar *sysfs_path)
-{
- struct udev_device *udevice;
- GUdevDevice *device;
-
- g_return_val_if_fail (G_UDEV_IS_CLIENT (client), NULL);
- g_return_val_if_fail (sysfs_path != NULL, NULL);
-
- device = NULL;
- udevice = udev_device_new_from_syspath (client->priv->udev, sysfs_path);
- if (udevice == NULL)
- goto out;
-
- device = _g_udev_device_new (udevice);
- udev_device_unref (udevice);
-
- out:
- return device;
-}
-
-/**
- * g_udev_client_query_by_subsystem_and_name:
- * @client: A #GUdevClient.
- * @subsystem: A subsystem name.
- * @name: The name of the device.
- *
- * Looks up a device for a subsystem and name.
- *
- * Returns: (nullable) (transfer full): A #GUdevDevice object or %NULL
- * if the device was not found. Free with g_object_unref().
- */
-GUdevDevice *
-g_udev_client_query_by_subsystem_and_name (GUdevClient *client,
- const gchar *subsystem,
- const gchar *name)
-{
- struct udev_device *udevice;
- GUdevDevice *device;
-
- g_return_val_if_fail (G_UDEV_IS_CLIENT (client), NULL);
- g_return_val_if_fail (subsystem != NULL, NULL);
- g_return_val_if_fail (name != NULL, NULL);
-
- device = NULL;
- udevice = udev_device_new_from_subsystem_sysname (client->priv->udev, subsystem, name);
- if (udevice == NULL)
- goto out;
-
- device = _g_udev_device_new (udevice);
- udev_device_unref (udevice);
-
- out:
- return device;
-}
-
-struct udev *
-_g_udev_client_get_udev (GUdevClient *client)
-{
- g_return_val_if_fail (G_UDEV_IS_CLIENT (client), NULL);
- return client->priv->udev;
-}
diff --git a/src/gudev/gudevclient.h b/src/gudev/gudevclient.h
deleted file mode 100644
index 23bfce615f..0000000000
--- a/src/gudev/gudevclient.h
+++ /dev/null
@@ -1,99 +0,0 @@
-/* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2008 David Zeuthen <davidz@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined (_GUDEV_COMPILATION) && !defined(_GUDEV_INSIDE_GUDEV_H)
-#error "Only <gudev/gudev.h> can be included directly, this file may disappear or change contents."
-#endif
-
-#ifndef __G_UDEV_CLIENT_H__
-#define __G_UDEV_CLIENT_H__
-
-#include <gudev/gudevtypes.h>
-
-G_BEGIN_DECLS
-
-#define G_UDEV_TYPE_CLIENT (g_udev_client_get_type ())
-#define G_UDEV_CLIENT(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_UDEV_TYPE_CLIENT, GUdevClient))
-#define G_UDEV_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_UDEV_TYPE_CLIENT, GUdevClientClass))
-#define G_UDEV_IS_CLIENT(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_UDEV_TYPE_CLIENT))
-#define G_UDEV_IS_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_UDEV_TYPE_CLIENT))
-#define G_UDEV_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_UDEV_TYPE_CLIENT, GUdevClientClass))
-
-typedef struct _GUdevClientClass GUdevClientClass;
-typedef struct _GUdevClientPrivate GUdevClientPrivate;
-
-/**
- * GUdevClient:
- *
- * The #GUdevClient struct is opaque and should not be accessed directly.
- */
-struct _GUdevClient
-{
- GObject parent;
-
- /*< private >*/
- GUdevClientPrivate *priv;
-};
-
-/**
- * GUdevClientClass:
- * @parent_class: Parent class.
- * @uevent: Signal class handler for the #GUdevClient::uevent signal.
- *
- * Class structure for #GUdevClient.
- */
-struct _GUdevClientClass
-{
- GObjectClass parent_class;
-
- /* signals */
- void (*uevent) (GUdevClient *client,
- const gchar *action,
- GUdevDevice *device);
-
- /*< private >*/
- /* Padding for future expansion */
- void (*reserved1) (void);
- void (*reserved2) (void);
- void (*reserved3) (void);
- void (*reserved4) (void);
- void (*reserved5) (void);
- void (*reserved6) (void);
- void (*reserved7) (void);
- void (*reserved8) (void);
-};
-
-GType g_udev_client_get_type (void) G_GNUC_CONST;
-GUdevClient *g_udev_client_new (const gchar* const *subsystems);
-GList *g_udev_client_query_by_subsystem (GUdevClient *client,
- const gchar *subsystem);
-GUdevDevice *g_udev_client_query_by_device_number (GUdevClient *client,
- GUdevDeviceType type,
- GUdevDeviceNumber number);
-GUdevDevice *g_udev_client_query_by_device_file (GUdevClient *client,
- const gchar *device_file);
-GUdevDevice *g_udev_client_query_by_sysfs_path (GUdevClient *client,
- const gchar *sysfs_path);
-GUdevDevice *g_udev_client_query_by_subsystem_and_name (GUdevClient *client,
- const gchar *subsystem,
- const gchar *name);
-
-G_END_DECLS
-
-#endif /* __G_UDEV_CLIENT_H__ */
diff --git a/src/gudev/gudevdevice.c b/src/gudev/gudevdevice.c
deleted file mode 100644
index 28b229b8d8..0000000000
--- a/src/gudev/gudevdevice.c
+++ /dev/null
@@ -1,1027 +0,0 @@
-/* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2008 David Zeuthen <davidz@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/stat.h>
-
-#include "gudevdevice.h"
-#include "gudevprivate.h"
-
-/**
- * SECTION:gudevdevice
- * @short_description: Get information about a device
- *
- * The #GUdevDevice class is used to get information about a specific
- * device. Note that you cannot instantiate a #GUdevDevice object
- * yourself. Instead you must use #GUdevClient to obtain #GUdevDevice
- * objects.
- *
- * To get basic information about a device, use
- * g_udev_device_get_subsystem(), g_udev_device_get_devtype(),
- * g_udev_device_get_name(), g_udev_device_get_number(),
- * g_udev_device_get_sysfs_path(), g_udev_device_get_driver(),
- * g_udev_device_get_action(), g_udev_device_get_seqnum(),
- * g_udev_device_get_device_type(), g_udev_device_get_device_number(),
- * g_udev_device_get_device_file(),
- * g_udev_device_get_device_file_symlinks().
- *
- * To navigate the device tree, use g_udev_device_get_parent() and
- * g_udev_device_get_parent_with_subsystem().
- *
- * To access udev properties for the device, use
- * g_udev_device_get_property_keys(),
- * g_udev_device_has_property(),
- * g_udev_device_get_property(),
- * g_udev_device_get_property_as_int(),
- * g_udev_device_get_property_as_uint64(),
- * g_udev_device_get_property_as_double(),
- * g_udev_device_get_property_as_boolean() and
- * g_udev_device_get_property_as_strv().
- *
- * To access sysfs attributes for the device, use
- * g_udev_device_get_sysfs_attr_keys(),
- * g_udev_device_has_sysfs_attr(),
- * g_udev_device_get_sysfs_attr(),
- * g_udev_device_get_sysfs_attr_as_int(),
- * g_udev_device_get_sysfs_attr_as_uint64(),
- * g_udev_device_get_sysfs_attr_as_double(),
- * g_udev_device_get_sysfs_attr_as_boolean() and
- * g_udev_device_get_sysfs_attr_as_strv().
- *
- * Note that all getters on #GUdevDevice are non-reffing – returned
- * values are owned by the object, should not be freed and are only
- * valid as long as the object is alive.
- *
- * By design, #GUdevDevice will not react to changes for a device – it
- * only contains a snapshot of information when the #GUdevDevice
- * object was created. To work with changes, you typically connect to
- * the #GUdevClient::uevent signal on a #GUdevClient and get a new
- * #GUdevDevice whenever an event happens.
- */
-
-struct _GUdevDevicePrivate
-{
- struct udev_device *udevice;
-
- /* computed ondemand and cached */
- gchar **device_file_symlinks;
- gchar **property_keys;
- gchar **sysfs_attr_keys;
- gchar **tags;
- GHashTable *prop_strvs;
- GHashTable *sysfs_attr_strvs;
-};
-
-G_DEFINE_TYPE (GUdevDevice, g_udev_device, G_TYPE_OBJECT)
-
-static void
-g_udev_device_finalize (GObject *object)
-{
- GUdevDevice *device = G_UDEV_DEVICE (object);
-
- g_strfreev (device->priv->device_file_symlinks);
- g_strfreev (device->priv->property_keys);
- g_strfreev (device->priv->sysfs_attr_keys);
- g_strfreev (device->priv->tags);
-
- if (device->priv->udevice != NULL)
- udev_device_unref (device->priv->udevice);
-
- if (device->priv->prop_strvs != NULL)
- g_hash_table_unref (device->priv->prop_strvs);
-
- if (device->priv->sysfs_attr_strvs != NULL)
- g_hash_table_unref (device->priv->sysfs_attr_strvs);
-
- if (G_OBJECT_CLASS (g_udev_device_parent_class)->finalize != NULL)
- (* G_OBJECT_CLASS (g_udev_device_parent_class)->finalize) (object);
-}
-
-static void
-g_udev_device_class_init (GUdevDeviceClass *klass)
-{
- GObjectClass *gobject_class = (GObjectClass *) klass;
-
- gobject_class->finalize = g_udev_device_finalize;
-
- g_type_class_add_private (klass, sizeof (GUdevDevicePrivate));
-}
-
-static void
-g_udev_device_init (GUdevDevice *device)
-{
- device->priv = G_TYPE_INSTANCE_GET_PRIVATE (device,
- G_UDEV_TYPE_DEVICE,
- GUdevDevicePrivate);
-}
-
-
-GUdevDevice *
-_g_udev_device_new (struct udev_device *udevice)
-{
- GUdevDevice *device;
-
- device = G_UDEV_DEVICE (g_object_new (G_UDEV_TYPE_DEVICE, NULL));
- device->priv->udevice = udev_device_ref (udevice);
-
- return device;
-}
-
-/**
- * g_udev_device_get_subsystem:
- * @device: A #GUdevDevice.
- *
- * Gets the subsystem for @device.
- *
- * Returns: The subsystem for @device.
- */
-const gchar *
-g_udev_device_get_subsystem (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- return udev_device_get_subsystem (device->priv->udevice);
-}
-
-/**
- * g_udev_device_get_devtype:
- * @device: A #GUdevDevice.
- *
- * Gets the device type for @device.
- *
- * Returns: The devtype for @device.
- */
-const gchar *
-g_udev_device_get_devtype (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- return udev_device_get_devtype (device->priv->udevice);
-}
-
-/**
- * g_udev_device_get_name:
- * @device: A #GUdevDevice.
- *
- * Gets the name of @device, e.g. "sda3".
- *
- * Returns: The name of @device.
- */
-const gchar *
-g_udev_device_get_name (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- return udev_device_get_sysname (device->priv->udevice);
-}
-
-/**
- * g_udev_device_get_number:
- * @device: A #GUdevDevice.
- *
- * Gets the number of @device, e.g. "3" if g_udev_device_get_name() returns "sda3".
- *
- * Returns: The number of @device.
- */
-const gchar *
-g_udev_device_get_number (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- return udev_device_get_sysnum (device->priv->udevice);
-}
-
-/**
- * g_udev_device_get_sysfs_path:
- * @device: A #GUdevDevice.
- *
- * Gets the sysfs path for @device.
- *
- * Returns: The sysfs path for @device.
- */
-const gchar *
-g_udev_device_get_sysfs_path (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- return udev_device_get_syspath (device->priv->udevice);
-}
-
-/**
- * g_udev_device_get_driver:
- * @device: A #GUdevDevice.
- *
- * Gets the name of the driver used for @device.
- *
- * Returns: (nullable): The name of the driver for @device or %NULL if
- * unknown.
- */
-const gchar *
-g_udev_device_get_driver (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- return udev_device_get_driver (device->priv->udevice);
-}
-
-/**
- * g_udev_device_get_action:
- * @device: A #GUdevDevice.
- *
- * Gets the most recent action (e.g. "add", "remove", "change", etc.) for @device.
- *
- * Returns: An action string.
- */
-const gchar *
-g_udev_device_get_action (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- return udev_device_get_action (device->priv->udevice);
-}
-
-/**
- * g_udev_device_get_seqnum:
- * @device: A #GUdevDevice.
- *
- * Gets the most recent sequence number for @device.
- *
- * Returns: A sequence number.
- */
-guint64
-g_udev_device_get_seqnum (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), 0);
- return udev_device_get_seqnum (device->priv->udevice);
-}
-
-/**
- * g_udev_device_get_device_type:
- * @device: A #GUdevDevice.
- *
- * Gets the type of the device file, if any, for @device.
- *
- * Returns: The device number for @device or #G_UDEV_DEVICE_TYPE_NONE if the device does not have a device file.
- */
-GUdevDeviceType
-g_udev_device_get_device_type (GUdevDevice *device)
-{
- struct stat stat_buf;
- const gchar *device_file;
- GUdevDeviceType type;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), G_UDEV_DEVICE_TYPE_NONE);
-
- type = G_UDEV_DEVICE_TYPE_NONE;
-
- /* TODO: would be better to have support for this in libudev... */
-
- device_file = g_udev_device_get_device_file (device);
- if (device_file == NULL)
- goto out;
-
- if (stat (device_file, &stat_buf) != 0)
- goto out;
-
- if (S_ISBLK (stat_buf.st_mode))
- type = G_UDEV_DEVICE_TYPE_BLOCK;
- else if (S_ISCHR (stat_buf.st_mode))
- type = G_UDEV_DEVICE_TYPE_CHAR;
-
- out:
- return type;
-}
-
-/**
- * g_udev_device_get_device_number:
- * @device: A #GUdevDevice.
- *
- * Gets the device number, if any, for @device.
- *
- * Returns: The device number for @device or 0 if unknown.
- */
-GUdevDeviceNumber
-g_udev_device_get_device_number (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), 0);
- return udev_device_get_devnum (device->priv->udevice);
-}
-
-/**
- * g_udev_device_get_device_file:
- * @device: A #GUdevDevice.
- *
- * Gets the device file for @device.
- *
- * Returns: (nullable): The device file for @device or %NULL if no
- * device file exists.
- */
-const gchar *
-g_udev_device_get_device_file (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- return udev_device_get_devnode (device->priv->udevice);
-}
-
-/**
- * g_udev_device_get_device_file_symlinks:
- * @device: A #GUdevDevice.
- *
- * Gets a list of symlinks (in <literal>/dev</literal>) that points to
- * the device file for @device.
- *
- * Returns: (transfer none) (array zero-terminated=1) (element-type utf8): A %NULL terminated string array of symlinks. This array is owned by @device and should not be freed by the caller.
- */
-const gchar * const *
-g_udev_device_get_device_file_symlinks (GUdevDevice *device)
-{
- struct udev_list_entry *l;
- GPtrArray *p;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
-
- if (device->priv->device_file_symlinks != NULL)
- goto out;
-
- p = g_ptr_array_new ();
- for (l = udev_device_get_devlinks_list_entry (device->priv->udevice); l != NULL; l = udev_list_entry_get_next (l))
- {
- g_ptr_array_add (p, g_strdup (udev_list_entry_get_name (l)));
- }
- g_ptr_array_add (p, NULL);
- device->priv->device_file_symlinks = (gchar **) g_ptr_array_free (p, FALSE);
-
- out:
- return (const gchar * const *) device->priv->device_file_symlinks;
-}
-
-/* ---------------------------------------------------------------------------------------------------- */
-
-/**
- * g_udev_device_get_parent:
- * @device: A #GUdevDevice.
- *
- * Gets the immediate parent of @device, if any.
- *
- * Returns: (nullable) (transfer full): A #GUdevDevice or %NULL if
- * @device has no parent. Free with g_object_unref().
- */
-GUdevDevice *
-g_udev_device_get_parent (GUdevDevice *device)
-{
- GUdevDevice *ret;
- struct udev_device *udevice;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
-
- ret = NULL;
-
- udevice = udev_device_get_parent (device->priv->udevice);
- if (udevice == NULL)
- goto out;
-
- ret = _g_udev_device_new (udevice);
-
- out:
- return ret;
-}
-
-/**
- * g_udev_device_get_parent_with_subsystem:
- * @device: A #GUdevDevice.
- * @subsystem: The subsystem of the parent to get.
- * @devtype: (allow-none): The devtype of the parent to get or %NULL.
- *
- * Walks up the chain of parents of @device and returns the first
- * device encountered where @subsystem and @devtype matches, if any.
- *
- * Returns: (nullable) (transfer full): A #GUdevDevice or %NULL if
- * @device has no parent with @subsystem and @devtype. Free with
- * g_object_unref().
- */
-GUdevDevice *
-g_udev_device_get_parent_with_subsystem (GUdevDevice *device,
- const gchar *subsystem,
- const gchar *devtype)
-{
- GUdevDevice *ret;
- struct udev_device *udevice;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- g_return_val_if_fail (subsystem != NULL, NULL);
-
- ret = NULL;
-
- udevice = udev_device_get_parent_with_subsystem_devtype (device->priv->udevice,
- subsystem,
- devtype);
- if (udevice == NULL)
- goto out;
-
- ret = _g_udev_device_new (udevice);
-
- out:
- return ret;
-}
-
-/* ---------------------------------------------------------------------------------------------------- */
-
-/**
- * g_udev_device_get_property_keys:
- * @device: A #GUdevDevice.
- *
- * Gets all keys for properties on @device.
- *
- * Returns: (transfer none) (array zero-terminated=1) (element-type utf8): A %NULL terminated string array of property keys. This array is owned by @device and should not be freed by the caller.
- */
-const gchar* const *
-g_udev_device_get_property_keys (GUdevDevice *device)
-{
- struct udev_list_entry *l;
- GPtrArray *p;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
-
- if (device->priv->property_keys != NULL)
- goto out;
-
- p = g_ptr_array_new ();
- for (l = udev_device_get_properties_list_entry (device->priv->udevice); l != NULL; l = udev_list_entry_get_next (l))
- {
- g_ptr_array_add (p, g_strdup (udev_list_entry_get_name (l)));
- }
- g_ptr_array_add (p, NULL);
- device->priv->property_keys = (gchar **) g_ptr_array_free (p, FALSE);
-
- out:
- return (const gchar * const *) device->priv->property_keys;
-}
-
-
-/**
- * g_udev_device_has_property:
- * @device: A #GUdevDevice.
- * @key: Name of property.
- *
- * Check if a the property with the given key exists.
- *
- * Returns: %TRUE only if the value for @key exist.
- */
-gboolean
-g_udev_device_has_property (GUdevDevice *device,
- const gchar *key)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), FALSE);
- g_return_val_if_fail (key != NULL, FALSE);
- return udev_device_get_property_value (device->priv->udevice, key) != NULL;
-}
-
-/**
- * g_udev_device_get_property:
- * @device: A #GUdevDevice.
- * @key: Name of property.
- *
- * Look up the value for @key on @device.
- *
- * Returns: (nullable): The value for @key or %NULL if @key doesn't
- * exist on @device. Do not free this string, it is owned by @device.
- */
-const gchar *
-g_udev_device_get_property (GUdevDevice *device,
- const gchar *key)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- g_return_val_if_fail (key != NULL, NULL);
- return udev_device_get_property_value (device->priv->udevice, key);
-}
-
-/**
- * g_udev_device_get_property_as_int:
- * @device: A #GUdevDevice.
- * @key: Name of property.
- *
- * Look up the value for @key on @device and convert it to an integer
- * using strtol().
- *
- * Returns: The value for @key or 0 if @key doesn't exist or
- * isn't an integer.
- */
-gint
-g_udev_device_get_property_as_int (GUdevDevice *device,
- const gchar *key)
-{
- gint result;
- const gchar *s;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), 0);
- g_return_val_if_fail (key != NULL, 0);
-
- result = 0;
- s = g_udev_device_get_property (device, key);
- if (s == NULL)
- goto out;
-
- result = strtol (s, NULL, 0);
-out:
- return result;
-}
-
-/**
- * g_udev_device_get_property_as_uint64:
- * @device: A #GUdevDevice.
- * @key: Name of property.
- *
- * Look up the value for @key on @device and convert it to an unsigned
- * 64-bit integer using g_ascii_strtoull().
- *
- * Returns: The value for @key or 0 if @key doesn't exist or isn't a
- * #guint64.
- */
-guint64
-g_udev_device_get_property_as_uint64 (GUdevDevice *device,
- const gchar *key)
-{
- guint64 result;
- const gchar *s;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), 0);
- g_return_val_if_fail (key != NULL, 0);
-
- result = 0;
- s = g_udev_device_get_property (device, key);
- if (s == NULL)
- goto out;
-
- result = g_ascii_strtoull (s, NULL, 0);
-out:
- return result;
-}
-
-/**
- * g_udev_device_get_property_as_double:
- * @device: A #GUdevDevice.
- * @key: Name of property.
- *
- * Look up the value for @key on @device and convert it to a double
- * precision floating point number using strtod().
- *
- * Returns: The value for @key or 0.0 if @key doesn't exist or isn't a
- * #gdouble.
- */
-gdouble
-g_udev_device_get_property_as_double (GUdevDevice *device,
- const gchar *key)
-{
- gdouble result;
- const gchar *s;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), 0.0);
- g_return_val_if_fail (key != NULL, 0.0);
-
- result = 0.0;
- s = g_udev_device_get_property (device, key);
- if (s == NULL)
- goto out;
-
- result = strtod (s, NULL);
-out:
- return result;
-}
-
-/**
- * g_udev_device_get_property_as_boolean:
- * @device: A #GUdevDevice.
- * @key: Name of property.
- *
- * Look up the value for @key on @device and convert it to an
- * boolean. This is done by doing a case-insensitive string comparison
- * on the string value against "1" and "true".
- *
- * Returns: The value for @key or %FALSE if @key doesn't exist or
- * isn't a #gboolean.
- */
-gboolean
-g_udev_device_get_property_as_boolean (GUdevDevice *device,
- const gchar *key)
-{
- gboolean result;
- const gchar *s;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), FALSE);
- g_return_val_if_fail (key != NULL, FALSE);
-
- result = FALSE;
- s = g_udev_device_get_property (device, key);
- if (s == NULL)
- goto out;
-
- if (strcmp (s, "1") == 0 || g_ascii_strcasecmp (s, "true") == 0)
- result = TRUE;
- out:
- return result;
-}
-
-static gchar **
-split_at_whitespace (const gchar *s)
-{
- gchar **result;
- guint n;
- guint m;
-
- result = g_strsplit_set (s, " \v\t\r\n", 0);
-
- /* remove empty strings, thanks GLib */
- for (n = 0; result[n] != NULL; n++)
- {
- if (strlen (result[n]) == 0)
- {
- g_free (result[n]);
- for (m = n; result[m] != NULL; m++)
- result[m] = result[m + 1];
- n--;
- }
- }
-
- return result;
-}
-
-/**
- * g_udev_device_get_property_as_strv:
- * @device: A #GUdevDevice.
- * @key: Name of property.
- *
- * Look up the value for @key on @device and return the result of
- * splitting it into non-empty tokens split at white space (only space
- * (' '), form-feed ('\f'), newline ('\n'), carriage return ('\r'),
- * horizontal tab ('\t'), and vertical tab ('\v') are considered; the
- * locale is not taken into account).
- *
- * Returns: (nullable) (transfer none) (array zero-terminated=1) (element-type utf8):
- * The value of @key on @device split into tokens or %NULL if @key
- * doesn't exist. This array is owned by @device and should not be
- * freed by the caller.
- */
-const gchar* const *
-g_udev_device_get_property_as_strv (GUdevDevice *device,
- const gchar *key)
-{
- gchar **result;
- const gchar *s;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- g_return_val_if_fail (key != NULL, NULL);
-
- if (device->priv->prop_strvs != NULL)
- {
- result = g_hash_table_lookup (device->priv->prop_strvs, key);
- if (result != NULL)
- goto out;
- }
-
- result = NULL;
- s = g_udev_device_get_property (device, key);
- if (s == NULL)
- goto out;
-
- result = split_at_whitespace (s);
- if (result == NULL)
- goto out;
-
- if (device->priv->prop_strvs == NULL)
- device->priv->prop_strvs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_strfreev);
- g_hash_table_insert (device->priv->prop_strvs, g_strdup (key), result);
-
-out:
- return (const gchar* const *) result;
-}
-
-/* ---------------------------------------------------------------------------------------------------- */
-
-/**
- * g_udev_device_get_sysfs_attr_keys:
- * @device: A #GUdevDevice.
- *
- * Gets all keys for sysfs attributes on @device.
- *
- * Returns: (transfer none) (array zero-terminated=1) (element-type utf8): A %NULL terminated string array of sysfs attribute keys. This array is owned by @device and should not be freed by the caller.
- */
-const gchar * const *
-g_udev_device_get_sysfs_attr_keys (GUdevDevice *device)
-{
- struct udev_list_entry *l;
- GPtrArray *p;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
-
- if (device->priv->sysfs_attr_keys != NULL)
- goto out;
-
- p = g_ptr_array_new ();
- for (l = udev_device_get_sysattr_list_entry (device->priv->udevice); l != NULL; l = udev_list_entry_get_next (l))
- {
- g_ptr_array_add (p, g_strdup (udev_list_entry_get_name (l)));
- }
- g_ptr_array_add (p, NULL);
- device->priv->sysfs_attr_keys = (gchar **) g_ptr_array_free (p, FALSE);
-
- out:
- return (const gchar * const *) device->priv->sysfs_attr_keys;
-}
-
-/**
- * g_udev_device_has_sysfs_attr:
- * @device: A #GUdevDevice.
- * @key: Name of sysfs attribute.
- *
- * Check if a the sysfs attribute with the given key exists.
- *
- * Returns: %TRUE only if the value for @key exist.
- */
-gboolean
-g_udev_device_has_sysfs_attr (GUdevDevice *device,
- const gchar *key)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), FALSE);
- g_return_val_if_fail (key != NULL, FALSE);
- return udev_device_get_sysattr_value (device->priv->udevice, key) != NULL;
-}
-
-/**
- * g_udev_device_get_sysfs_attr:
- * @device: A #GUdevDevice.
- * @name: Name of the sysfs attribute.
- *
- * Look up the sysfs attribute with @name on @device.
- *
- * Returns: (nullable): The value of the sysfs attribute or %NULL if
- * there is no such attribute. Do not free this string, it is owned by
- * @device.
- */
-const gchar *
-g_udev_device_get_sysfs_attr (GUdevDevice *device,
- const gchar *name)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- g_return_val_if_fail (name != NULL, NULL);
- return udev_device_get_sysattr_value (device->priv->udevice, name);
-}
-
-/**
- * g_udev_device_get_sysfs_attr_as_int:
- * @device: A #GUdevDevice.
- * @name: Name of the sysfs attribute.
- *
- * Look up the sysfs attribute with @name on @device and convert it to an integer
- * using strtol().
- *
- * Returns: The value of the sysfs attribute or 0 if there is no such
- * attribute.
- */
-gint
-g_udev_device_get_sysfs_attr_as_int (GUdevDevice *device,
- const gchar *name)
-{
- gint result;
- const gchar *s;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), 0);
- g_return_val_if_fail (name != NULL, 0);
-
- result = 0;
- s = g_udev_device_get_sysfs_attr (device, name);
- if (s == NULL)
- goto out;
-
- result = strtol (s, NULL, 0);
-out:
- return result;
-}
-
-/**
- * g_udev_device_get_sysfs_attr_as_uint64:
- * @device: A #GUdevDevice.
- * @name: Name of the sysfs attribute.
- *
- * Look up the sysfs attribute with @name on @device and convert it to an unsigned
- * 64-bit integer using g_ascii_strtoull().
- *
- * Returns: The value of the sysfs attribute or 0 if there is no such
- * attribute.
- */
-guint64
-g_udev_device_get_sysfs_attr_as_uint64 (GUdevDevice *device,
- const gchar *name)
-{
- guint64 result;
- const gchar *s;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), 0);
- g_return_val_if_fail (name != NULL, 0);
-
- result = 0;
- s = g_udev_device_get_sysfs_attr (device, name);
- if (s == NULL)
- goto out;
-
- result = g_ascii_strtoull (s, NULL, 0);
-out:
- return result;
-}
-
-/**
- * g_udev_device_get_sysfs_attr_as_double:
- * @device: A #GUdevDevice.
- * @name: Name of the sysfs attribute.
- *
- * Look up the sysfs attribute with @name on @device and convert it to a double
- * precision floating point number using strtod().
- *
- * Returns: The value of the sysfs attribute or 0.0 if there is no such
- * attribute.
- */
-gdouble
-g_udev_device_get_sysfs_attr_as_double (GUdevDevice *device,
- const gchar *name)
-{
- gdouble result;
- const gchar *s;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), 0.0);
- g_return_val_if_fail (name != NULL, 0.0);
-
- result = 0.0;
- s = g_udev_device_get_sysfs_attr (device, name);
- if (s == NULL)
- goto out;
-
- result = strtod (s, NULL);
-out:
- return result;
-}
-
-/**
- * g_udev_device_get_sysfs_attr_as_boolean:
- * @device: A #GUdevDevice.
- * @name: Name of the sysfs attribute.
- *
- * Look up the sysfs attribute with @name on @device and convert it to an
- * boolean. This is done by doing a case-insensitive string comparison
- * on the string value against "1" and "true".
- *
- * Returns: The value of the sysfs attribute or %FALSE if there is no such
- * attribute.
- */
-gboolean
-g_udev_device_get_sysfs_attr_as_boolean (GUdevDevice *device,
- const gchar *name)
-{
- gboolean result;
- const gchar *s;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), FALSE);
- g_return_val_if_fail (name != NULL, FALSE);
-
- result = FALSE;
- s = g_udev_device_get_sysfs_attr (device, name);
- if (s == NULL)
- goto out;
-
- if (strcmp (s, "1") == 0 || g_ascii_strcasecmp (s, "true") == 0)
- result = TRUE;
- out:
- return result;
-}
-
-/**
- * g_udev_device_get_sysfs_attr_as_strv:
- * @device: A #GUdevDevice.
- * @name: Name of the sysfs attribute.
- *
- * Look up the sysfs attribute with @name on @device and return the result of
- * splitting it into non-empty tokens split at white space (only space (' '),
- * form-feed ('\f'), newline ('\n'), carriage return ('\r'), horizontal
- * tab ('\t'), and vertical tab ('\v') are considered; the locale is
- * not taken into account).
- *
- * Returns: (nullable) (transfer none) (array zero-terminated=1) (element-type utf8):
- * The value of the sysfs attribute split into tokens or %NULL if
- * there is no such attribute. This array is owned by @device and
- * should not be freed by the caller.
- */
-const gchar * const *
-g_udev_device_get_sysfs_attr_as_strv (GUdevDevice *device,
- const gchar *name)
-{
- gchar **result;
- const gchar *s;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
- g_return_val_if_fail (name != NULL, NULL);
-
- if (device->priv->sysfs_attr_strvs != NULL)
- {
- result = g_hash_table_lookup (device->priv->sysfs_attr_strvs, name);
- if (result != NULL)
- goto out;
- }
-
- result = NULL;
- s = g_udev_device_get_sysfs_attr (device, name);
- if (s == NULL)
- goto out;
-
- result = split_at_whitespace (s);
- if (result == NULL)
- goto out;
-
- if (device->priv->sysfs_attr_strvs == NULL)
- device->priv->sysfs_attr_strvs = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_strfreev);
- g_hash_table_insert (device->priv->sysfs_attr_strvs, g_strdup (name), result);
-
-out:
- return (const gchar* const *) result;
-}
-
-/**
- * g_udev_device_get_tags:
- * @device: A #GUdevDevice.
- *
- * Gets all tags for @device.
- *
- * Returns: (transfer none) (array zero-terminated=1) (element-type utf8): A %NULL terminated string array of tags. This array is owned by @device and should not be freed by the caller.
- *
- * Since: 165
- */
-const gchar* const *
-g_udev_device_get_tags (GUdevDevice *device)
-{
- struct udev_list_entry *l;
- GPtrArray *p;
-
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), NULL);
-
- if (device->priv->tags != NULL)
- goto out;
-
- p = g_ptr_array_new ();
- for (l = udev_device_get_tags_list_entry (device->priv->udevice); l != NULL; l = udev_list_entry_get_next (l))
- {
- g_ptr_array_add (p, g_strdup (udev_list_entry_get_name (l)));
- }
- g_ptr_array_add (p, NULL);
- device->priv->tags = (gchar **) g_ptr_array_free (p, FALSE);
-
- out:
- return (const gchar * const *) device->priv->tags;
-}
-
-/**
- * g_udev_device_get_is_initialized:
- * @device: A #GUdevDevice.
- *
- * Gets whether @device has been initialized.
- *
- * Returns: Whether @device has been initialized.
- *
- * Since: 165
- */
-gboolean
-g_udev_device_get_is_initialized (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), FALSE);
- return udev_device_get_is_initialized (device->priv->udevice);
-}
-
-/**
- * g_udev_device_get_usec_since_initialized:
- * @device: A #GUdevDevice.
- *
- * Gets number of micro-seconds since @device was initialized.
- *
- * This only works for devices with properties in the udev
- * database. All other devices return 0.
- *
- * Returns: Number of micro-seconds since @device was initialized or 0 if unknown.
- *
- * Since: 165
- */
-guint64
-g_udev_device_get_usec_since_initialized (GUdevDevice *device)
-{
- g_return_val_if_fail (G_UDEV_IS_DEVICE (device), 0);
- return udev_device_get_usec_since_initialized (device->priv->udevice);
-}
diff --git a/src/gudev/gudevdevice.h b/src/gudev/gudevdevice.h
deleted file mode 100644
index 72ec180f55..0000000000
--- a/src/gudev/gudevdevice.h
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2008 David Zeuthen <davidz@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined (_GUDEV_COMPILATION) && !defined(_GUDEV_INSIDE_GUDEV_H)
-#error "Only <gudev/gudev.h> can be included directly, this file may disappear or change contents."
-#endif
-
-#ifndef __G_UDEV_DEVICE_H__
-#define __G_UDEV_DEVICE_H__
-
-#include <gudev/gudevtypes.h>
-
-G_BEGIN_DECLS
-
-#define G_UDEV_TYPE_DEVICE (g_udev_device_get_type ())
-#define G_UDEV_DEVICE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_UDEV_TYPE_DEVICE, GUdevDevice))
-#define G_UDEV_DEVICE_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_UDEV_TYPE_DEVICE, GUdevDeviceClass))
-#define G_UDEV_IS_DEVICE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_UDEV_TYPE_DEVICE))
-#define G_UDEV_IS_DEVICE_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_UDEV_TYPE_DEVICE))
-#define G_UDEV_DEVICE_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_UDEV_TYPE_DEVICE, GUdevDeviceClass))
-
-typedef struct _GUdevDeviceClass GUdevDeviceClass;
-typedef struct _GUdevDevicePrivate GUdevDevicePrivate;
-
-/**
- * GUdevDevice:
- *
- * The #GUdevDevice struct is opaque and should not be accessed directly.
- */
-struct _GUdevDevice
-{
- GObject parent;
-
- /*< private >*/
- GUdevDevicePrivate *priv;
-};
-
-/**
- * GUdevDeviceClass:
- * @parent_class: Parent class.
- *
- * Class structure for #GUdevDevice.
- */
-struct _GUdevDeviceClass
-{
- GObjectClass parent_class;
-
- /*< private >*/
- /* Padding for future expansion */
- void (*reserved1) (void);
- void (*reserved2) (void);
- void (*reserved3) (void);
- void (*reserved4) (void);
- void (*reserved5) (void);
- void (*reserved6) (void);
- void (*reserved7) (void);
- void (*reserved8) (void);
-};
-
-GType g_udev_device_get_type (void) G_GNUC_CONST;
-gboolean g_udev_device_get_is_initialized (GUdevDevice *device);
-guint64 g_udev_device_get_usec_since_initialized (GUdevDevice *device);
-const gchar *g_udev_device_get_subsystem (GUdevDevice *device);
-const gchar *g_udev_device_get_devtype (GUdevDevice *device);
-const gchar *g_udev_device_get_name (GUdevDevice *device);
-const gchar *g_udev_device_get_number (GUdevDevice *device);
-const gchar *g_udev_device_get_sysfs_path (GUdevDevice *device);
-const gchar *g_udev_device_get_driver (GUdevDevice *device);
-const gchar *g_udev_device_get_action (GUdevDevice *device);
-guint64 g_udev_device_get_seqnum (GUdevDevice *device);
-GUdevDeviceType g_udev_device_get_device_type (GUdevDevice *device);
-GUdevDeviceNumber g_udev_device_get_device_number (GUdevDevice *device);
-const gchar *g_udev_device_get_device_file (GUdevDevice *device);
-const gchar* const *g_udev_device_get_device_file_symlinks (GUdevDevice *device);
-GUdevDevice *g_udev_device_get_parent (GUdevDevice *device);
-GUdevDevice *g_udev_device_get_parent_with_subsystem (GUdevDevice *device,
- const gchar *subsystem,
- const gchar *devtype);
-const gchar* const *g_udev_device_get_property_keys (GUdevDevice *device);
-gboolean g_udev_device_has_property (GUdevDevice *device,
- const gchar *key);
-const gchar *g_udev_device_get_property (GUdevDevice *device,
- const gchar *key);
-gint g_udev_device_get_property_as_int (GUdevDevice *device,
- const gchar *key);
-guint64 g_udev_device_get_property_as_uint64 (GUdevDevice *device,
- const gchar *key);
-gdouble g_udev_device_get_property_as_double (GUdevDevice *device,
- const gchar *key);
-gboolean g_udev_device_get_property_as_boolean (GUdevDevice *device,
- const gchar *key);
-const gchar* const *g_udev_device_get_property_as_strv (GUdevDevice *device,
- const gchar *key);
-
-const gchar* const *g_udev_device_get_sysfs_attr_keys (GUdevDevice *device);
-gboolean g_udev_device_has_sysfs_attr (GUdevDevice *device,
- const gchar *key);
-const gchar *g_udev_device_get_sysfs_attr (GUdevDevice *device,
- const gchar *name);
-gint g_udev_device_get_sysfs_attr_as_int (GUdevDevice *device,
- const gchar *name);
-guint64 g_udev_device_get_sysfs_attr_as_uint64 (GUdevDevice *device,
- const gchar *name);
-gdouble g_udev_device_get_sysfs_attr_as_double (GUdevDevice *device,
- const gchar *name);
-gboolean g_udev_device_get_sysfs_attr_as_boolean (GUdevDevice *device,
- const gchar *name);
-const gchar* const *g_udev_device_get_sysfs_attr_as_strv (GUdevDevice *device,
- const gchar *name);
-const gchar* const *g_udev_device_get_tags (GUdevDevice *device);
-
-G_END_DECLS
-
-#endif /* __G_UDEV_DEVICE_H__ */
diff --git a/src/gudev/gudevenumerator.c b/src/gudev/gudevenumerator.c
deleted file mode 100644
index 1fb3098709..0000000000
--- a/src/gudev/gudevenumerator.c
+++ /dev/null
@@ -1,429 +0,0 @@
-/* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2008-2010 David Zeuthen <davidz@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-
-#include "gudevclient.h"
-#include "gudevenumerator.h"
-#include "gudevdevice.h"
-#include "gudevmarshal.h"
-#include "gudevprivate.h"
-
-/**
- * SECTION:gudevenumerator
- * @short_description: Lookup and sort devices
- *
- * #GUdevEnumerator is used to lookup and sort devices.
- *
- * Since: 165
- */
-
-struct _GUdevEnumeratorPrivate
-{
- GUdevClient *client;
- struct udev_enumerate *e;
-};
-
-enum
-{
- PROP_0,
- PROP_CLIENT,
-};
-
-G_DEFINE_TYPE (GUdevEnumerator, g_udev_enumerator, G_TYPE_OBJECT)
-
-/* ---------------------------------------------------------------------------------------------------- */
-
-static void
-g_udev_enumerator_finalize (GObject *object)
-{
- GUdevEnumerator *enumerator = G_UDEV_ENUMERATOR (object);
-
- if (enumerator->priv->client != NULL)
- {
- g_object_unref (enumerator->priv->client);
- enumerator->priv->client = NULL;
- }
-
- if (enumerator->priv->e != NULL)
- {
- udev_enumerate_unref (enumerator->priv->e);
- enumerator->priv->e = NULL;
- }
-
- if (G_OBJECT_CLASS (g_udev_enumerator_parent_class)->finalize != NULL)
- G_OBJECT_CLASS (g_udev_enumerator_parent_class)->finalize (object);
-}
-
-static void
-g_udev_enumerator_set_property (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GUdevEnumerator *enumerator = G_UDEV_ENUMERATOR (object);
-
- switch (prop_id)
- {
- case PROP_CLIENT:
- if (enumerator->priv->client != NULL)
- g_object_unref (enumerator->priv->client);
- enumerator->priv->client = g_value_dup_object (value);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-g_udev_enumerator_get_property (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GUdevEnumerator *enumerator = G_UDEV_ENUMERATOR (object);
-
- switch (prop_id)
- {
- case PROP_CLIENT:
- g_value_set_object (value, enumerator->priv->client);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-g_udev_enumerator_constructed (GObject *object)
-{
- GUdevEnumerator *enumerator = G_UDEV_ENUMERATOR (object);
-
- g_assert (G_UDEV_IS_CLIENT (enumerator->priv->client));
-
- enumerator->priv->e = udev_enumerate_new (_g_udev_client_get_udev (enumerator->priv->client));
-
- if (G_OBJECT_CLASS (g_udev_enumerator_parent_class)->constructed != NULL)
- G_OBJECT_CLASS (g_udev_enumerator_parent_class)->constructed (object);
-}
-
-static void
-g_udev_enumerator_class_init (GUdevEnumeratorClass *klass)
-{
- GObjectClass *gobject_class = (GObjectClass *) klass;
-
- gobject_class->finalize = g_udev_enumerator_finalize;
- gobject_class->set_property = g_udev_enumerator_set_property;
- gobject_class->get_property = g_udev_enumerator_get_property;
- gobject_class->constructed = g_udev_enumerator_constructed;
-
- /**
- * GUdevEnumerator:client:
- *
- * The #GUdevClient to enumerate devices from.
- *
- * Since: 165
- */
- g_object_class_install_property (gobject_class,
- PROP_CLIENT,
- g_param_spec_object ("client",
- "The client to enumerate devices from",
- "The client to enumerate devices from",
- G_UDEV_TYPE_CLIENT,
- G_PARAM_CONSTRUCT_ONLY |
- G_PARAM_READWRITE));
-
- g_type_class_add_private (klass, sizeof (GUdevEnumeratorPrivate));
-}
-
-static void
-g_udev_enumerator_init (GUdevEnumerator *enumerator)
-{
- enumerator->priv = G_TYPE_INSTANCE_GET_PRIVATE (enumerator,
- G_UDEV_TYPE_ENUMERATOR,
- GUdevEnumeratorPrivate);
-}
-
-/**
- * g_udev_enumerator_new:
- * @client: A #GUdevClient to enumerate devices from.
- *
- * Constructs a #GUdevEnumerator object that can be used to enumerate
- * and sort devices. Use the add_match_*() and add_nomatch_*() methods
- * and execute the query to get a list of devices with
- * g_udev_enumerator_execute().
- *
- * Returns: A new #GUdevEnumerator object. Free with g_object_unref().
- *
- * Since: 165
- */
-GUdevEnumerator *
-g_udev_enumerator_new (GUdevClient *client)
-{
- g_return_val_if_fail (G_UDEV_IS_CLIENT (client), NULL);
- return G_UDEV_ENUMERATOR (g_object_new (G_UDEV_TYPE_ENUMERATOR, "client", client, NULL));
-}
-
-
-/**
- * g_udev_enumerator_add_match_subsystem:
- * @enumerator: A #GUdevEnumerator.
- * @subsystem: Wildcard for subsystem name e.g. 'scsi' or 'a*'.
- *
- * All returned devices will match the given @subsystem.
- *
- * Returns: (transfer none): The passed in @enumerator.
- *
- * Since: 165
- */
-GUdevEnumerator *
-g_udev_enumerator_add_match_subsystem (GUdevEnumerator *enumerator,
- const gchar *subsystem)
-{
- g_return_val_if_fail (G_UDEV_IS_ENUMERATOR (enumerator), NULL);
- g_return_val_if_fail (subsystem != NULL, NULL);
- udev_enumerate_add_match_subsystem (enumerator->priv->e, subsystem);
- return enumerator;
-}
-
-/**
- * g_udev_enumerator_add_nomatch_subsystem:
- * @enumerator: A #GUdevEnumerator.
- * @subsystem: Wildcard for subsystem name e.g. 'scsi' or 'a*'.
- *
- * All returned devices will not match the given @subsystem.
- *
- * Returns: (transfer none): The passed in @enumerator.
- *
- * Since: 165
- */
-GUdevEnumerator *
-g_udev_enumerator_add_nomatch_subsystem (GUdevEnumerator *enumerator,
- const gchar *subsystem)
-{
- g_return_val_if_fail (G_UDEV_IS_ENUMERATOR (enumerator), NULL);
- g_return_val_if_fail (subsystem != NULL, NULL);
- udev_enumerate_add_nomatch_subsystem (enumerator->priv->e, subsystem);
- return enumerator;
-}
-
-/**
- * g_udev_enumerator_add_match_sysfs_attr:
- * @enumerator: A #GUdevEnumerator.
- * @name: Wildcard filter for sysfs attribute key.
- * @value: Wildcard filter for sysfs attribute value.
- *
- * All returned devices will have a sysfs attribute matching the given @name and @value.
- *
- * Returns: (transfer none): The passed in @enumerator.
- *
- * Since: 165
- */
-GUdevEnumerator *
-g_udev_enumerator_add_match_sysfs_attr (GUdevEnumerator *enumerator,
- const gchar *name,
- const gchar *value)
-{
- g_return_val_if_fail (G_UDEV_IS_ENUMERATOR (enumerator), NULL);
- g_return_val_if_fail (name != NULL, NULL);
- g_return_val_if_fail (value != NULL, NULL);
- udev_enumerate_add_match_sysattr (enumerator->priv->e, name, value);
- return enumerator;
-}
-
-/**
- * g_udev_enumerator_add_nomatch_sysfs_attr:
- * @enumerator: A #GUdevEnumerator.
- * @name: Wildcard filter for sysfs attribute key.
- * @value: Wildcard filter for sysfs attribute value.
- *
- * All returned devices will not have a sysfs attribute matching the given @name and @value.
- *
- * Returns: (transfer none): The passed in @enumerator.
- *
- * Since: 165
- */
-GUdevEnumerator *
-g_udev_enumerator_add_nomatch_sysfs_attr (GUdevEnumerator *enumerator,
- const gchar *name,
- const gchar *value)
-{
- g_return_val_if_fail (G_UDEV_IS_ENUMERATOR (enumerator), NULL);
- g_return_val_if_fail (name != NULL, NULL);
- g_return_val_if_fail (value != NULL, NULL);
- udev_enumerate_add_nomatch_sysattr (enumerator->priv->e, name, value);
- return enumerator;
-}
-
-/**
- * g_udev_enumerator_add_match_property:
- * @enumerator: A #GUdevEnumerator.
- * @name: Wildcard filter for property name.
- * @value: Wildcard filter for property value.
- *
- * All returned devices will have a property matching the given @name and @value.
- *
- * Returns: (transfer none): The passed in @enumerator.
- *
- * Since: 165
- */
-GUdevEnumerator *
-g_udev_enumerator_add_match_property (GUdevEnumerator *enumerator,
- const gchar *name,
- const gchar *value)
-{
- g_return_val_if_fail (G_UDEV_IS_ENUMERATOR (enumerator), NULL);
- g_return_val_if_fail (name != NULL, NULL);
- g_return_val_if_fail (value != NULL, NULL);
- udev_enumerate_add_match_property (enumerator->priv->e, name, value);
- return enumerator;
-}
-
-/**
- * g_udev_enumerator_add_match_name:
- * @enumerator: A #GUdevEnumerator.
- * @name: Wildcard filter for kernel name e.g. "sda*".
- *
- * All returned devices will match the given @name.
- *
- * Returns: (transfer none): The passed in @enumerator.
- *
- * Since: 165
- */
-GUdevEnumerator *
-g_udev_enumerator_add_match_name (GUdevEnumerator *enumerator,
- const gchar *name)
-{
- g_return_val_if_fail (G_UDEV_IS_ENUMERATOR (enumerator), NULL);
- g_return_val_if_fail (name != NULL, NULL);
- udev_enumerate_add_match_sysname (enumerator->priv->e, name);
- return enumerator;
-}
-
-/**
- * g_udev_enumerator_add_sysfs_path:
- * @enumerator: A #GUdevEnumerator.
- * @sysfs_path: A sysfs path, e.g. "/sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda"
- *
- * Add a device to the list of devices, to retrieve it back sorted in dependency order.
- *
- * Returns: (transfer none): The passed in @enumerator.
- *
- * Since: 165
- */
-GUdevEnumerator *
-g_udev_enumerator_add_sysfs_path (GUdevEnumerator *enumerator,
- const gchar *sysfs_path)
-{
- g_return_val_if_fail (G_UDEV_IS_ENUMERATOR (enumerator), NULL);
- g_return_val_if_fail (sysfs_path != NULL, NULL);
- udev_enumerate_add_syspath (enumerator->priv->e, sysfs_path);
- return enumerator;
-}
-
-/**
- * g_udev_enumerator_add_match_tag:
- * @enumerator: A #GUdevEnumerator.
- * @tag: A udev tag e.g. "udev-acl".
- *
- * All returned devices will match the given @tag.
- *
- * Returns: (transfer none): The passed in @enumerator.
- *
- * Since: 165
- */
-GUdevEnumerator *
-g_udev_enumerator_add_match_tag (GUdevEnumerator *enumerator,
- const gchar *tag)
-{
- g_return_val_if_fail (G_UDEV_IS_ENUMERATOR (enumerator), NULL);
- g_return_val_if_fail (tag != NULL, NULL);
- udev_enumerate_add_match_tag (enumerator->priv->e, tag);
- return enumerator;
-}
-
-/**
- * g_udev_enumerator_add_match_is_initialized:
- * @enumerator: A #GUdevEnumerator.
- *
- * All returned devices will be initialized.
- *
- * Returns: (transfer none): The passed in @enumerator.
- *
- * Since: 165
- */
-GUdevEnumerator *
-g_udev_enumerator_add_match_is_initialized (GUdevEnumerator *enumerator)
-{
- g_return_val_if_fail (G_UDEV_IS_ENUMERATOR (enumerator), NULL);
- udev_enumerate_add_match_is_initialized (enumerator->priv->e);
- return enumerator;
-}
-
-/**
- * g_udev_enumerator_execute:
- * @enumerator: A #GUdevEnumerator.
- *
- * Executes the query in @enumerator.
- *
- * Returns: (element-type GUdevDevice) (transfer full): A list of #GUdevDevice objects. The caller should free the result by using g_object_unref() on each element in the list and then g_list_free() on the list.
- *
- * Since: 165
- */
-GList *
-g_udev_enumerator_execute (GUdevEnumerator *enumerator)
-{
- GList *ret;
- struct udev_list_entry *l, *devices;
-
- g_return_val_if_fail (G_UDEV_IS_ENUMERATOR (enumerator), NULL);
-
- ret = NULL;
-
- /* retrieve the list */
- udev_enumerate_scan_devices (enumerator->priv->e);
-
- devices = udev_enumerate_get_list_entry (enumerator->priv->e);
- for (l = devices; l != NULL; l = udev_list_entry_get_next (l))
- {
- struct udev_device *udevice;
- GUdevDevice *device;
-
- udevice = udev_device_new_from_syspath (udev_enumerate_get_udev (enumerator->priv->e),
- udev_list_entry_get_name (l));
- if (udevice == NULL)
- continue;
-
- device = _g_udev_device_new (udevice);
- udev_device_unref (udevice);
- ret = g_list_prepend (ret, device);
- }
-
- ret = g_list_reverse (ret);
-
- return ret;
-}
diff --git a/src/gudev/gudevenumerator.h b/src/gudev/gudevenumerator.h
deleted file mode 100644
index e1dbcf1441..0000000000
--- a/src/gudev/gudevenumerator.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2008-2010 David Zeuthen <davidz@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined (_GUDEV_COMPILATION) && !defined(_GUDEV_INSIDE_GUDEV_H)
-#error "Only <gudev/gudev.h> can be included directly, this file may disappear or change contents."
-#endif
-
-#ifndef __G_UDEV_ENUMERATOR_H__
-#define __G_UDEV_ENUMERATOR_H__
-
-#include <gudev/gudevtypes.h>
-
-G_BEGIN_DECLS
-
-#define G_UDEV_TYPE_ENUMERATOR (g_udev_enumerator_get_type ())
-#define G_UDEV_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_UDEV_TYPE_ENUMERATOR, GUdevEnumerator))
-#define G_UDEV_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), G_UDEV_TYPE_ENUMERATOR, GUdevEnumeratorClass))
-#define G_UDEV_IS_ENUMERATOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_UDEV_TYPE_ENUMERATOR))
-#define G_UDEV_IS_ENUMERATOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), G_UDEV_TYPE_ENUMERATOR))
-#define G_UDEV_ENUMERATOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), G_UDEV_TYPE_ENUMERATOR, GUdevEnumeratorClass))
-
-typedef struct _GUdevEnumeratorClass GUdevEnumeratorClass;
-typedef struct _GUdevEnumeratorPrivate GUdevEnumeratorPrivate;
-
-/**
- * GUdevEnumerator:
- *
- * The #GUdevEnumerator struct is opaque and should not be accessed directly.
- *
- * Since: 165
- */
-struct _GUdevEnumerator
-{
- GObject parent;
-
- /*< private >*/
- GUdevEnumeratorPrivate *priv;
-};
-
-/**
- * GUdevEnumeratorClass:
- * @parent_class: Parent class.
- *
- * Class structure for #GUdevEnumerator.
- *
- * Since: 165
- */
-struct _GUdevEnumeratorClass
-{
- GObjectClass parent_class;
-
- /*< private >*/
- /* Padding for future expansion */
- void (*reserved1) (void);
- void (*reserved2) (void);
- void (*reserved3) (void);
- void (*reserved4) (void);
- void (*reserved5) (void);
- void (*reserved6) (void);
- void (*reserved7) (void);
- void (*reserved8) (void);
-};
-
-GType g_udev_enumerator_get_type (void) G_GNUC_CONST;
-GUdevEnumerator *g_udev_enumerator_new (GUdevClient *client);
-GUdevEnumerator *g_udev_enumerator_add_match_subsystem (GUdevEnumerator *enumerator,
- const gchar *subsystem);
-GUdevEnumerator *g_udev_enumerator_add_nomatch_subsystem (GUdevEnumerator *enumerator,
- const gchar *subsystem);
-GUdevEnumerator *g_udev_enumerator_add_match_sysfs_attr (GUdevEnumerator *enumerator,
- const gchar *name,
- const gchar *value);
-GUdevEnumerator *g_udev_enumerator_add_nomatch_sysfs_attr (GUdevEnumerator *enumerator,
- const gchar *name,
- const gchar *value);
-GUdevEnumerator *g_udev_enumerator_add_match_property (GUdevEnumerator *enumerator,
- const gchar *name,
- const gchar *value);
-GUdevEnumerator *g_udev_enumerator_add_match_name (GUdevEnumerator *enumerator,
- const gchar *name);
-GUdevEnumerator *g_udev_enumerator_add_match_tag (GUdevEnumerator *enumerator,
- const gchar *tag);
-GUdevEnumerator *g_udev_enumerator_add_match_is_initialized (GUdevEnumerator *enumerator);
-GUdevEnumerator *g_udev_enumerator_add_sysfs_path (GUdevEnumerator *enumerator,
- const gchar *sysfs_path);
-GList *g_udev_enumerator_execute (GUdevEnumerator *enumerator);
-
-G_END_DECLS
-
-#endif /* __G_UDEV_ENUMERATOR_H__ */
diff --git a/src/gudev/gudevenums.h b/src/gudev/gudevenums.h
deleted file mode 100644
index 467e93bd60..0000000000
--- a/src/gudev/gudevenums.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2008 David Zeuthen <davidz@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined (_GUDEV_COMPILATION) && !defined(_GUDEV_INSIDE_GUDEV_H)
-#error "Only <gudev/gudev.h> can be included directly, this file may disappear or change contents."
-#endif
-
-#ifndef __G_UDEV_ENUMS_H__
-#define __G_UDEV_ENUMS_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-/**
- * GUdevDeviceType:
- * @G_UDEV_DEVICE_TYPE_NONE: Device does not have a device file.
- * @G_UDEV_DEVICE_TYPE_BLOCK: Device is a block device.
- * @G_UDEV_DEVICE_TYPE_CHAR: Device is a character device.
- *
- * Enumeration used to specify a the type of a device.
- */
-typedef enum
-{
- G_UDEV_DEVICE_TYPE_NONE = 0,
- G_UDEV_DEVICE_TYPE_BLOCK = 'b',
- G_UDEV_DEVICE_TYPE_CHAR = 'c',
-} GUdevDeviceType;
-
-G_END_DECLS
-
-#endif /* __G_UDEV_ENUMS_H__ */
diff --git a/src/gudev/gudevenumtypes.c.template b/src/gudev/gudevenumtypes.c.template
deleted file mode 100644
index fc30b39e2e..0000000000
--- a/src/gudev/gudevenumtypes.c.template
+++ /dev/null
@@ -1,39 +0,0 @@
-/*** BEGIN file-header ***/
-#include <gudev.h>
-
-/*** END file-header ***/
-
-/*** BEGIN file-production ***/
-/* enumerations from "@filename@" */
-/*** END file-production ***/
-
-/*** BEGIN value-header ***/
-GType
-@enum_name@_get_type (void)
-{
- static volatile gsize g_define_type_id__volatile = 0;
-
- if (g_once_init_enter (&g_define_type_id__volatile))
- {
- static const G@Type@Value values[] = {
-/*** END value-header ***/
-
-/*** BEGIN value-production ***/
- { @VALUENAME@, "@VALUENAME@", "@valuenick@" },
-/*** END value-production ***/
-
-/*** BEGIN value-tail ***/
- { 0, NULL, NULL }
- };
- GType g_define_type_id =
- g_@type@_register_static (g_intern_static_string ("@EnumName@"), values);
- g_once_init_leave (&g_define_type_id__volatile, g_define_type_id);
- }
-
- return g_define_type_id__volatile;
-}
-
-/*** END value-tail ***/
-
-/*** BEGIN file-tail ***/
-/*** END file-tail ***/
diff --git a/src/gudev/gudevenumtypes.h.template b/src/gudev/gudevenumtypes.h.template
deleted file mode 100644
index d0ab3393e6..0000000000
--- a/src/gudev/gudevenumtypes.h.template
+++ /dev/null
@@ -1,24 +0,0 @@
-/*** BEGIN file-header ***/
-#ifndef __GUDEV_ENUM_TYPES_H__
-#define __GUDEV_ENUM_TYPES_H__
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-/*** END file-header ***/
-
-/*** BEGIN file-production ***/
-
-/* enumerations from "@filename@" */
-/*** END file-production ***/
-
-/*** BEGIN value-header ***/
-GType @enum_name@_get_type (void) G_GNUC_CONST;
-#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
-/*** END value-header ***/
-
-/*** BEGIN file-tail ***/
-G_END_DECLS
-
-#endif /* __GUDEV_ENUM_TYPES_H__ */
-/*** END file-tail ***/
diff --git a/src/gudev/gudevmarshal.list b/src/gudev/gudevmarshal.list
deleted file mode 100644
index 7e665999e8..0000000000
--- a/src/gudev/gudevmarshal.list
+++ /dev/null
@@ -1 +0,0 @@
-VOID:STRING,OBJECT
diff --git a/src/gudev/gudevprivate.h b/src/gudev/gudevprivate.h
deleted file mode 100644
index 52e272be3d..0000000000
--- a/src/gudev/gudevprivate.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2008 David Zeuthen <davidz@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined (_GUDEV_COMPILATION) && !defined(_GUDEV_INSIDE_GUDEV_H)
-#error "Only <gudev/gudev.h> can be included directly, this file may disappear or change contents."
-#endif
-
-#ifndef __G_UDEV_PRIVATE_H__
-#define __G_UDEV_PRIVATE_H__
-
-#include <gudev/gudevtypes.h>
-
-#include <libudev.h>
-
-G_BEGIN_DECLS
-
-GUdevDevice *
-_g_udev_device_new (struct udev_device *udevice);
-
-struct udev *_g_udev_client_get_udev (GUdevClient *client);
-
-G_END_DECLS
-
-#endif /* __G_UDEV_PRIVATE_H__ */
diff --git a/src/gudev/gudevtypes.h b/src/gudev/gudevtypes.h
deleted file mode 100644
index e2f688ff2d..0000000000
--- a/src/gudev/gudevtypes.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- Mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
- *
- * Copyright (C) 2008 David Zeuthen <davidz@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#if !defined (_GUDEV_COMPILATION) && !defined(_GUDEV_INSIDE_GUDEV_H)
-#error "Only <gudev/gudev.h> can be included directly, this file may disappear or change contents."
-#endif
-
-#ifndef __G_UDEV_TYPES_H__
-#define __G_UDEV_TYPES_H__
-
-#include <gudev/gudevenums.h>
-#include <sys/types.h>
-
-G_BEGIN_DECLS
-
-typedef struct _GUdevClient GUdevClient;
-typedef struct _GUdevDevice GUdevDevice;
-typedef struct _GUdevEnumerator GUdevEnumerator;
-
-/**
- * GUdevDeviceNumber:
- *
- * Corresponds to the standard #dev_t type as defined by POSIX (Until
- * bug 584517 is resolved this work-around is needed).
- */
-#ifdef _GUDEV_WORK_AROUND_DEV_T_BUG
-typedef guint64 GUdevDeviceNumber; /* __UQUAD_TYPE */
-#else
-typedef dev_t GUdevDeviceNumber;
-#endif
-
-G_END_DECLS
-
-#endif /* __G_UDEV_TYPES_H__ */
diff --git a/src/gudev/libgudev-1.0.sym b/src/gudev/libgudev-1.0.sym
deleted file mode 100644
index 0600486e9c..0000000000
--- a/src/gudev/libgudev-1.0.sym
+++ /dev/null
@@ -1,68 +0,0 @@
-/***
- This file is part of systemd.
-
- systemd is free software; you can redistribute it and/or modify it
- under the terms of the GNU Lesser General Public License as published by
- the Free Software Foundation; either version 2.1 of the License, or
- (at your option) any later version.
-***/
-
-{
-global:
- g_udev_client_get_type;
- g_udev_client_new;
- g_udev_client_query_by_device_file;
- g_udev_client_query_by_device_number;
- g_udev_client_query_by_subsystem;
- g_udev_client_query_by_subsystem_and_name;
- g_udev_client_query_by_sysfs_path;
- g_udev_device_get_action;
- g_udev_device_get_device_file;
- g_udev_device_get_device_file_symlinks;
- g_udev_device_get_device_number;
- g_udev_device_get_device_type;
- g_udev_device_get_devtype;
- g_udev_device_get_driver;
- g_udev_device_get_is_initialized;
- g_udev_device_get_name;
- g_udev_device_get_number;
- g_udev_device_get_parent;
- g_udev_device_get_parent_with_subsystem;
- g_udev_device_get_property;
- g_udev_device_get_property_as_boolean;
- g_udev_device_get_property_as_double;
- g_udev_device_get_property_as_int;
- g_udev_device_get_property_as_strv;
- g_udev_device_get_property_as_uint64;
- g_udev_device_get_property_keys;
- g_udev_device_get_seqnum;
- g_udev_device_get_subsystem;
- g_udev_device_get_sysfs_attr;
- g_udev_device_get_sysfs_attr_as_boolean;
- g_udev_device_get_sysfs_attr_as_double;
- g_udev_device_get_sysfs_attr_as_int;
- g_udev_device_get_sysfs_attr_as_strv;
- g_udev_device_get_sysfs_attr_as_uint64;
- g_udev_device_get_sysfs_attr_keys;
- g_udev_device_get_sysfs_path;
- g_udev_device_get_tags;
- g_udev_device_get_type;
- g_udev_device_get_usec_since_initialized;
- g_udev_device_has_property;
- g_udev_device_has_sysfs_attr;
- g_udev_device_type_get_type;
- g_udev_enumerator_add_match_is_initialized;
- g_udev_enumerator_add_match_name;
- g_udev_enumerator_add_match_property;
- g_udev_enumerator_add_match_subsystem;
- g_udev_enumerator_add_match_sysfs_attr;
- g_udev_enumerator_add_match_tag;
- g_udev_enumerator_add_nomatch_subsystem;
- g_udev_enumerator_add_nomatch_sysfs_attr;
- g_udev_enumerator_add_sysfs_path;
- g_udev_enumerator_execute;
- g_udev_enumerator_get_type;
- g_udev_enumerator_new;
-local:
- *;
-};
diff --git a/src/gudev/seed-example-enum.js b/src/gudev/seed-example-enum.js
deleted file mode 100755
index 66206ad806..0000000000
--- a/src/gudev/seed-example-enum.js
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env seed
-
-const GLib = imports.gi.GLib;
-const GUdev = imports.gi.GUdev;
-
-function print_device(device) {
- print(" initialized: " + device.get_is_initialized());
- print(" usec since initialized: " + device.get_usec_since_initialized());
- print(" subsystem: " + device.get_subsystem());
- print(" devtype: " + device.get_devtype());
- print(" name: " + device.get_name());
- print(" number: " + device.get_number());
- print(" sysfs_path: " + device.get_sysfs_path());
- print(" driver: " + device.get_driver());
- print(" action: " + device.get_action());
- print(" seqnum: " + device.get_seqnum());
- print(" device type: " + device.get_device_type());
- print(" device number: " + device.get_device_number());
- print(" device file: " + device.get_device_file());
- print(" device file symlinks: " + device.get_device_file_symlinks());
- print(" tags: " + device.get_tags());
- var keys = device.get_property_keys();
- for (var n = 0; n < keys.length; n++) {
- print(" " + keys[n] + "=" + device.get_property(keys[n]));
- }
-}
-
-var client = new GUdev.Client({subsystems: []});
-var enumerator = new GUdev.Enumerator({client: client});
-enumerator.add_match_subsystem('b*')
-
-var devices = enumerator.execute();
-
-for (var n=0; n < devices.length; n++) {
- var device = devices[n];
- print_device(device);
- print("");
-}
diff --git a/src/gudev/seed-example.js b/src/gudev/seed-example.js
deleted file mode 100755
index e2ac324d23..0000000000
--- a/src/gudev/seed-example.js
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env seed
-
-// seed example
-
-const GLib = imports.gi.GLib;
-const GUdev = imports.gi.GUdev;
-
-function print_device (device) {
- print (" subsystem: " + device.get_subsystem ());
- print (" devtype: " + device.get_devtype ());
- print (" name: " + device.get_name ());
- print (" number: " + device.get_number ());
- print (" sysfs_path: " + device.get_sysfs_path ());
- print (" driver: " + device.get_driver ());
- print (" action: " + device.get_action ());
- print (" seqnum: " + device.get_seqnum ());
- print (" device type: " + device.get_device_type ());
- print (" device number: " + device.get_device_number ());
- print (" device file: " + device.get_device_file ());
- print (" device file symlinks: " + device.get_device_file_symlinks ());
- print (" foo: " + device.get_sysfs_attr_as_strv ("stat"));
- var keys = device.get_property_keys ();
- for (var n = 0; n < keys.length; n++) {
- print (" " + keys[n] + "=" + device.get_property (keys[n]));
- }
-}
-
-function on_uevent (client, action, device) {
- print ("action " + action + " on device " + device.get_sysfs_path());
- print_device (device);
- print ("");
-}
-
-var client = new GUdev.Client ({subsystems: ["block", "usb/usb_interface"]});
-client.signal.connect ("uevent", on_uevent);
-
-var block_devices = client.query_by_subsystem ("block");
-for (var n = 0; n < block_devices.length; n++) {
- print ("block device: " + block_devices[n].get_device_file ());
-}
-
-var d;
-
-d = client.query_by_device_number (GUdev.DeviceType.BLOCK, 0x0810);
-if (d == null) {
- print ("query_by_device_number 0x810 -> null");
-} else {
- print ("query_by_device_number 0x810 -> " + d.get_device_file ());
- dd = d.get_parent_with_subsystem ("usb", null);
- print_device (dd);
- print ("--------------------------------------------------------------------------");
- while (d != null) {
- print_device (d);
- print ("");
- d = d.get_parent ();
- }
-}
-
-d = client.query_by_sysfs_path ("/sys/block/sda/sda1");
-print ("query_by_sysfs_path (\"/sys/block/sda1\") -> " + d.get_device_file ());
-
-d = client.query_by_subsystem_and_name ("block", "sda2");
-print ("query_by_subsystem_and_name (\"block\", \"sda2\") -> " + d.get_device_file ());
-
-d = client.query_by_device_file ("/dev/sda");
-print ("query_by_device_file (\"/dev/sda\") -> " + d.get_device_file ());
-
-d = client.query_by_device_file ("/dev/block/8:0");
-print ("query_by_device_file (\"/dev/block/8:0\") -> " + d.get_device_file ());
-
-var mainloop = GLib.main_loop_new ();
-GLib.main_loop_run (mainloop);
diff --git a/src/kernel-install/90-loaderentry.install b/src/kernel-install/90-loaderentry.install
index d433e00a5c..4c9b1f0327 100644
--- a/src/kernel-install/90-loaderentry.install
+++ b/src/kernel-install/90-loaderentry.install
@@ -43,14 +43,14 @@ fi
declare -a BOOT_OPTIONS
if [[ -f /etc/kernel/cmdline ]]; then
- readarray -t BOOT_OPTIONS < /etc/kernel/cmdline
+ read -r -d '' -a BOOT_OPTIONS < /etc/kernel/cmdline
fi
if ! [[ ${BOOT_OPTIONS[*]} ]]; then
- read -a line -r < /proc/cmdline
+ read -r -d '' -a line < /proc/cmdline
for i in "${line[@]}"; do
[[ "${i#initrd=*}" != "$i" ]] && continue
- BOOT_OPTIONS[${#BOOT_OPTIONS[@]}]="$i"
+ BOOT_OPTIONS+=("$i")
done
fi
diff --git a/src/libsystemd-terminal/sysview.c b/src/libsystemd-terminal/sysview.c
index c8bbce43d3..2e9b15859a 100644
--- a/src/libsystemd-terminal/sysview.c
+++ b/src/libsystemd-terminal/sysview.c
@@ -196,7 +196,7 @@ int sysview_session_new(sysview_session **out, sysview_seat *seat, const char *n
if (r < 0)
return r;
- session->custom = false;;
+ session->custom = false;
} else {
/*
* No session name was given. We assume this is an unmanaged
diff --git a/src/libsystemd/sd-bus/bus-kernel.c b/src/libsystemd/sd-bus/bus-kernel.c
index d5cc8100ce..417e4d5903 100644
--- a/src/libsystemd/sd-bus/bus-kernel.c
+++ b/src/libsystemd/sd-bus/bus-kernel.c
@@ -1770,32 +1770,6 @@ int bus_kernel_realize_attach_flags(sd_bus *bus) {
return 0;
}
-int bus_kernel_fix_attach_mask(void) {
- _cleanup_free_ char *mask = NULL;
- uint64_t m = (uint64_t) -1;
- char buf[2+16+2];
- int r;
-
- /* By default we don't want any kdbus metadata fields to be
- * suppressed, hence we reset the kernel mask for it to
- * (uint64_t) -1. If the module argument was overwritten by
- * the kernel cmdline, we leave it as is. */
-
- r = get_proc_cmdline_key("kdbus.attach_flags_mask=", &mask);
- if (r < 0)
- return log_warning_errno(r, "Failed to read kernel command line: %m");
-
- if (r == 0) {
- sprintf(buf, "0x%" PRIx64 "\n", m);
- r = write_string_file("/sys/module/kdbus/parameters/attach_flags_mask", buf);
- if (r < 0)
- return log_full_errno(IN_SET(r, -ENOENT, -EROFS) ? LOG_DEBUG : LOG_WARNING, r,
- "Failed to write kdbus attach mask: %m");
- }
-
- return 0;
-}
-
int bus_kernel_get_bus_name(sd_bus *bus, char **name) {
struct kdbus_cmd_info cmd = {
.size = sizeof(struct kdbus_cmd_info),
diff --git a/src/libsystemd/sd-bus/bus-kernel.h b/src/libsystemd/sd-bus/bus-kernel.h
index b9f31ba790..bb4dff6d82 100644
--- a/src/libsystemd/sd-bus/bus-kernel.h
+++ b/src/libsystemd/sd-bus/bus-kernel.h
@@ -90,8 +90,6 @@ int bus_kernel_drop_one(int fd);
int bus_kernel_realize_attach_flags(sd_bus *bus);
-int bus_kernel_fix_attach_mask(void);
-
int bus_kernel_get_bus_name(sd_bus *bus, char **name);
int bus_kernel_cmd_free(sd_bus *bus, uint64_t offset);
diff --git a/src/libsystemd/sd-bus/test-bus-kernel.c b/src/libsystemd/sd-bus/test-bus-kernel.c
index 8f4f60b65f..6506eaab2e 100644
--- a/src/libsystemd/sd-bus/test-bus-kernel.c
+++ b/src/libsystemd/sd-bus/test-bus-kernel.c
@@ -43,8 +43,6 @@ int main(int argc, char *argv[]) {
assert_se(asprintf(&name, "deine-mutter-%u", (unsigned) getpid()) >= 0);
- bus_kernel_fix_attach_mask();
-
bus_ref = bus_kernel_create_bus(name, false, &bus_name);
if (bus_ref == -ENOENT)
return EXIT_TEST_SKIP;
diff --git a/src/libsystemd/sd-device/device-enumerator.c b/src/libsystemd/sd-device/device-enumerator.c
index 3692d46e06..7fd77e9480 100644
--- a/src/libsystemd/sd-device/device-enumerator.c
+++ b/src/libsystemd/sd-device/device-enumerator.c
@@ -137,7 +137,6 @@ _public_ int sd_device_enumerator_add_match_sysattr(sd_device_enumerator *enumer
assert_return(enumerator, -EINVAL);
assert_return(_sysattr, -EINVAL);
- assert_return(_value, -EINVAL);
if (match)
hashmap = &enumerator->match_sysattr;
@@ -152,9 +151,11 @@ _public_ int sd_device_enumerator_add_match_sysattr(sd_device_enumerator *enumer
if (!sysattr)
return -ENOMEM;
- value = strdup(_value);
- if (!value)
- return -ENOMEM;
+ if (_value) {
+ value = strdup(_value);
+ if (!value)
+ return -ENOMEM;
+ }
r = hashmap_put(*hashmap, sysattr, value);
if (r < 0)
@@ -174,7 +175,6 @@ _public_ int sd_device_enumerator_add_match_property(sd_device_enumerator *enume
assert_return(enumerator, -EINVAL);
assert_return(_property, -EINVAL);
- assert_return(_value, -EINVAL);
r = hashmap_ensure_allocated(&enumerator->match_property, NULL);
if (r < 0)
@@ -184,9 +184,11 @@ _public_ int sd_device_enumerator_add_match_property(sd_device_enumerator *enume
if (!property)
return -ENOMEM;
- value = strdup(_value);
- if (!value)
- return -ENOMEM;
+ if (_value) {
+ value = strdup(_value);
+ if (!value)
+ return -ENOMEM;
+ }
r = hashmap_put(enumerator->match_property, property, value);
if (r < 0)
diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c
index 97da4a8eea..8e63b9ef56 100644
--- a/src/libsystemd/sd-device/sd-device.c
+++ b/src/libsystemd/sd-device/sd-device.c
@@ -785,7 +785,7 @@ _public_ int sd_device_get_subsystem(sd_device *device, const char **ret) {
path_startswith(device->devpath, "/class/") ||
path_startswith(device->devpath, "/bus/"))
r = device_set_subsystem(device, "subsystem");
- if (r < 0)
+ if (r < 0 && r != -ENOENT)
return log_debug_errno(r, "sd-device: could not set subsystem for %s: %m", device->devpath);
device->subsystem_set = true;
@@ -901,8 +901,11 @@ _public_ int sd_device_get_driver(sd_device *device, const char **ret) {
if (r >= 0) {
r = device_set_driver(device, driver);
if (r < 0)
- return r;
- }
+ return log_debug_errno(r, "sd-device: could not set driver for %s: %m", device->devpath);
+ } else if (r == -ENOENT)
+ device->driver_set = true;
+ else
+ return log_debug_errno(r, "sd-device: could not set driver for %s: %m", device->devpath);
}
*ret = device->driver;
@@ -1188,6 +1191,8 @@ int device_get_id_filename(sd_device *device, const char **ret) {
return r;
if (major(devnum) > 0) {
+ assert(subsystem);
+
/* use dev_t -- b259:131072, c254:0 */
r = asprintf(&id, "%c%u:%u",
streq(subsystem, "block") ? 'b' : 'c',
@@ -1209,6 +1214,9 @@ int device_get_id_filename(sd_device *device, const char **ret) {
if (!sysname)
return -EINVAL;
+ if (!subsystem)
+ return -EINVAL;
+
r = asprintf(&id, "+%s:%s", subsystem, sysname);
if (r < 0)
return -ENOMEM;
@@ -1262,7 +1270,7 @@ int device_read_db_aux(sd_device *device, bool force) {
}
/* devices with a database entry are initialized */
- device->is_initialized = true;;
+ device->is_initialized = true;
for (i = 0; i < db_len; i++) {
switch (state) {
diff --git a/src/libsystemd/sd-hwdb/sd-hwdb.c b/src/libsystemd/sd-hwdb/sd-hwdb.c
index 3bbf02896b..2a0e00f7d2 100644
--- a/src/libsystemd/sd-hwdb/sd-hwdb.c
+++ b/src/libsystemd/sd-hwdb/sd-hwdb.c
@@ -317,7 +317,7 @@ _public_ int sd_hwdb_new(sd_hwdb **ret) {
if (memcmp(hwdb->map, sig, sizeof(hwdb->head->signature)) != 0 ||
(size_t)hwdb->st.st_size != le64toh(hwdb->head->file_size)) {
log_debug("error recognizing the format of %s", hwdb_bin_path);
- return -EINVAL;;
+ return -EINVAL;
}
log_debug("=== trie on-disk ===");
diff --git a/src/libudev/libudev-device.c b/src/libudev/libudev-device.c
index 893d72c19f..c27b01db96 100644
--- a/src/libudev/libudev-device.c
+++ b/src/libudev/libudev-device.c
@@ -178,7 +178,8 @@ _public_ const char *udev_device_get_subsystem(struct udev_device *udev_device)
if (r < 0) {
errno = -r;
return NULL;
- }
+ } else if (!subsystem)
+ errno = ENODATA;
return subsystem;
}
diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c
index 255fbe808d..df088946df 100644
--- a/src/libudev/libudev-enumerate.c
+++ b/src/libudev/libudev-enumerate.c
@@ -196,6 +196,9 @@ _public_ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enume
_public_ int udev_enumerate_add_match_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem) {
assert_return(udev_enumerate, -EINVAL);
+ if (!subsystem)
+ return 0;
+
return sd_device_enumerator_add_match_subsystem(udev_enumerate->enumerator, subsystem, true);
}
@@ -211,6 +214,9 @@ _public_ int udev_enumerate_add_match_subsystem(struct udev_enumerate *udev_enum
_public_ int udev_enumerate_add_nomatch_subsystem(struct udev_enumerate *udev_enumerate, const char *subsystem) {
assert_return(udev_enumerate, -EINVAL);
+ if (!subsystem)
+ return 0;
+
return sd_device_enumerator_add_match_subsystem(udev_enumerate->enumerator, subsystem, false);
}
@@ -227,6 +233,9 @@ _public_ int udev_enumerate_add_nomatch_subsystem(struct udev_enumerate *udev_en
_public_ int udev_enumerate_add_match_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value) {
assert_return(udev_enumerate, -EINVAL);
+ if (!sysattr)
+ return 0;
+
return sd_device_enumerator_add_match_sysattr(udev_enumerate->enumerator, sysattr, value, true);
}
@@ -243,6 +252,9 @@ _public_ int udev_enumerate_add_match_sysattr(struct udev_enumerate *udev_enumer
_public_ int udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enumerate, const char *sysattr, const char *value) {
assert_return(udev_enumerate, -EINVAL);
+ if (!sysattr)
+ return 0;
+
return sd_device_enumerator_add_match_sysattr(udev_enumerate->enumerator, sysattr, value, false);
}
@@ -259,6 +271,9 @@ _public_ int udev_enumerate_add_nomatch_sysattr(struct udev_enumerate *udev_enum
_public_ int udev_enumerate_add_match_property(struct udev_enumerate *udev_enumerate, const char *property, const char *value) {
assert_return(udev_enumerate, -EINVAL);
+ if (!property)
+ return 0;
+
return sd_device_enumerator_add_match_property(udev_enumerate->enumerator, property, value);
}
@@ -274,6 +289,9 @@ _public_ int udev_enumerate_add_match_property(struct udev_enumerate *udev_enume
_public_ int udev_enumerate_add_match_tag(struct udev_enumerate *udev_enumerate, const char *tag) {
assert_return(udev_enumerate, -EINVAL);
+ if (!tag)
+ return 0;
+
return sd_device_enumerator_add_match_tag(udev_enumerate->enumerator, tag);
}
@@ -335,6 +353,9 @@ _public_ int udev_enumerate_add_match_is_initialized(struct udev_enumerate *udev
_public_ int udev_enumerate_add_match_sysname(struct udev_enumerate *udev_enumerate, const char *sysname) {
assert_return(udev_enumerate, -EINVAL);
+ if (!sysname)
+ return 0;
+
return sd_device_enumerator_add_match_sysname(udev_enumerate->enumerator, sysname);
}
diff --git a/src/libudev/libudev-monitor.c b/src/libudev/libudev-monitor.c
index b13c579460..282aa2b0d9 100644
--- a/src/libudev/libudev-monitor.c
+++ b/src/libudev/libudev-monitor.c
@@ -144,6 +144,22 @@ static bool udev_has_devtmpfs(struct udev *udev) {
return false;
}
+static void monitor_set_nl_address(struct udev_monitor *udev_monitor) {
+ union sockaddr_union snl;
+ socklen_t addrlen;
+ int r;
+
+ assert(udev_monitor);
+
+ /* get the address the kernel has assigned us
+ * it is usually, but not necessarily the pid
+ */
+ addrlen = sizeof(struct sockaddr_nl);
+ r = getsockname(udev_monitor->sock, &snl.sa, &addrlen);
+ if (r >= 0)
+ udev_monitor->snl.nl.nl_pid = snl.nl.nl_pid;
+}
+
struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const char *name, int fd)
{
struct udev_monitor *udev_monitor;
@@ -183,7 +199,7 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c
if (fd < 0) {
udev_monitor->sock = socket(PF_NETLINK, SOCK_RAW|SOCK_CLOEXEC|SOCK_NONBLOCK, NETLINK_KOBJECT_UEVENT);
- if (udev_monitor->sock == -1) {
+ if (udev_monitor->sock < 0) {
log_debug_errno(errno, "error getting socket: %m");
free(udev_monitor);
return NULL;
@@ -191,6 +207,7 @@ struct udev_monitor *udev_monitor_new_from_netlink_fd(struct udev *udev, const c
} else {
udev_monitor->bound = true;
udev_monitor->sock = fd;
+ monitor_set_nl_address(udev_monitor);
}
udev_monitor->snl.nl.nl_family = AF_NETLINK;
@@ -366,6 +383,7 @@ int udev_monitor_allow_unicast_sender(struct udev_monitor *udev_monitor, struct
udev_monitor->snl_trusted_sender.nl.nl_pid = sender->snl.nl.nl_pid;
return 0;
}
+
/**
* udev_monitor_enable_receiving:
* @udev_monitor: the monitor which should receive events
@@ -388,19 +406,9 @@ _public_ int udev_monitor_enable_receiving(struct udev_monitor *udev_monitor)
udev_monitor->bound = true;
}
- if (err >= 0) {
- union sockaddr_union snl;
- socklen_t addrlen;
-
- /*
- * get the address the kernel has assigned us
- * it is usually, but not necessarily the pid
- */
- addrlen = sizeof(struct sockaddr_nl);
- err = getsockname(udev_monitor->sock, &snl.sa, &addrlen);
- if (err == 0)
- udev_monitor->snl.nl.nl_pid = snl.nl.nl_pid;
- } else {
+ if (err >= 0)
+ monitor_set_nl_address(udev_monitor);
+ else {
log_debug_errno(errno, "bind failed: %m");
return -errno;
}
diff --git a/src/login/71-seat.rules.in b/src/login/71-seat.rules.in
index ad26acbbb3..ab7b66f651 100644
--- a/src/login/71-seat.rules.in
+++ b/src/login/71-seat.rules.in
@@ -11,6 +11,7 @@ TAG=="uaccess", SUBSYSTEM!="sound", TAG+="seat"
SUBSYSTEM=="sound", KERNEL=="card*", TAG+="seat"
SUBSYSTEM=="input", KERNEL=="input*", TAG+="seat"
SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="seat", TAG+="master-of-seat"
+SUBSYSTEM=="drm", KERNEL=="card[0-9]*", TAG+="seat", TAG+="master-of-seat"
SUBSYSTEM=="usb", ATTR{bDeviceClass}=="09", TAG+="seat"
# 'Plugable' USB hub, sound, network, graphics adapter
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index f039a2d687..b30fd7ae89 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -1481,6 +1481,9 @@ static int link_set_ipv4_forward(Link *link) {
const char *p = NULL;
int r;
+ if (link->network->ip_forward == ADDRESS_FAMILY_KERNEL)
+ return 0;
+
p = strjoina("/proc/sys/net/ipv4/conf/", link->ifname, "/forwarding");
r = write_string_file_no_create(p, one_zero(link_ipv4_forward_enabled(link)));
if (r < 0)
@@ -1497,6 +1500,9 @@ static int link_set_ipv6_forward(Link *link) {
if (!socket_ipv6_is_supported())
return 0;
+ if (link->network->ip_forward == ADDRESS_FAMILY_KERNEL)
+ return 0;
+
p = strjoina("/proc/sys/net/ipv6/conf/", link->ifname, "/forwarding");
r = write_string_file_no_create(p, one_zero(link_ipv6_forward_enabled(link)));
if (r < 0)
diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c
index db737ad484..2cc53df4b1 100644
--- a/src/network/networkd-manager.c
+++ b/src/network/networkd-manager.c
@@ -853,6 +853,8 @@ const char *address_family_boolean_to_string(AddressFamilyBoolean b) {
return "ipv4";
if (b == ADDRESS_FAMILY_IPV6)
return "ipv6";
+ if (b == ADDRESS_FAMILY_KERNEL)
+ return "kernel";
return NULL;
}
@@ -872,6 +874,8 @@ AddressFamilyBoolean address_family_boolean_from_string(const char *s) {
return ADDRESS_FAMILY_IPV4;
if (streq(s, "ipv6"))
return ADDRESS_FAMILY_IPV6;
+ if (streq(s, "kernel"))
+ return ADDRESS_FAMILY_KERNEL;
return _ADDRESS_FAMILY_BOOLEAN_INVALID;
}
diff --git a/src/network/networkd.h b/src/network/networkd.h
index 4b13d4aed1..49afeffe81 100644
--- a/src/network/networkd.h
+++ b/src/network/networkd.h
@@ -60,6 +60,7 @@ typedef enum AddressFamilyBoolean {
ADDRESS_FAMILY_IPV4 = 1,
ADDRESS_FAMILY_IPV6 = 2,
ADDRESS_FAMILY_YES = 3,
+ ADDRESS_FAMILY_KERNEL = 4,
_ADDRESS_FAMILY_BOOLEAN_MAX,
_ADDRESS_FAMILY_BOOLEAN_INVALID = -1,
} AddressFamilyBoolean;
diff --git a/src/python-systemd/docs/layout.html b/src/python-systemd/docs/layout.html
index be5ff980ef..930a6a7afe 100644
--- a/src/python-systemd/docs/layout.html
+++ b/src/python-systemd/docs/layout.html
@@ -4,8 +4,6 @@
<a href="../man/systemd.index.html">Index </a>·
<a href="../man/systemd.directives.html">Directives </a>·
<a href="index.html">Python </a>·
- <a href="../libudev/index.html">libudev </a>·
- <a href="../libudev/index.html">gudev </a>
<span style="float:right">systemd {{release}}</span>
<hr />
{% endblock %}
diff --git a/src/shared/missing.h b/src/shared/missing.h
index 9194009491..be7f6186fc 100644
--- a/src/shared/missing.h
+++ b/src/shared/missing.h
@@ -269,6 +269,11 @@ struct btrfs_qgroup_inherit {
__u64 qgroups[0];
};
+struct btrfs_ioctl_qgroup_limit_args {
+ __u64 qgroupid;
+ struct btrfs_qgroup_limit lim;
+};
+
struct btrfs_ioctl_vol_args_v2 {
__s64 fd;
__u64 transid;
@@ -360,6 +365,14 @@ struct btrfs_ioctl_clone_range_args {
__u64 src_offset, src_length;
__u64 dest_offset;
};
+
+#define BTRFS_QUOTA_CTL_ENABLE 1
+#define BTRFS_QUOTA_CTL_DISABLE 2
+#define BTRFS_QUOTA_CTL_RESCAN__NOTUSED 3
+struct btrfs_ioctl_quota_ctl_args {
+ __u64 cmd;
+ __u64 status;
+};
#endif
#ifndef BTRFS_IOC_DEFRAG
@@ -367,6 +380,11 @@ struct btrfs_ioctl_clone_range_args {
struct btrfs_ioctl_vol_args)
#endif
+#ifndef BTRFS_IOC_RESIZE
+#define BTRFS_IOC_RESIZE _IOW(BTRFS_IOCTL_MAGIC, 3, \
+ struct btrfs_ioctl_vol_args)
+#endif
+
#ifndef BTRFS_IOC_CLONE
#define BTRFS_IOC_CLONE _IOW(BTRFS_IOCTL_MAGIC, 9, int)
#endif
@@ -424,6 +442,16 @@ struct btrfs_ioctl_clone_range_args {
struct btrfs_ioctl_vol_args)
#endif
+#ifndef BTRFS_IOC_QUOTA_CTL
+#define BTRFS_IOC_QUOTA_CTL _IOWR(BTRFS_IOCTL_MAGIC, 40, \
+ struct btrfs_ioctl_quota_ctl_args)
+#endif
+
+#ifndef BTRFS_IOC_QGROUP_LIMIT
+#define BTRFS_IOC_QGROUP_LIMIT _IOR(BTRFS_IOCTL_MAGIC, 43, \
+ struct btrfs_ioctl_qgroup_limit_args)
+#endif
+
#ifndef BTRFS_FIRST_FREE_OBJECTID
#define BTRFS_FIRST_FREE_OBJECTID 256
#endif
diff --git a/src/shared/random-util.c b/src/shared/random-util.c
index 88f5182508..b230044f50 100644
--- a/src/shared/random-util.c
+++ b/src/shared/random-util.c
@@ -23,7 +23,9 @@
#include <sys/stat.h>
#include <fcntl.h>
#include <time.h>
+#ifdef HAVE_SYS_AUXV_H
#include <sys/auxv.h>
+#endif
#include <linux/random.h>
#include "random-util.h"
diff --git a/src/shared/util.c b/src/shared/util.c
index 8a6107969a..311acbb349 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -1152,7 +1152,7 @@ static int cunescape_one(const char *p, size_t length, char *ret, uint32_t *ret_
int a, b, c;
uint32_t m;
- if (length != (size_t) -1 && length < 4)
+ if (length != (size_t) -1 && length < 3)
return -EINVAL;
a = unoctchar(p[0]);
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index a7b8e54a9c..b3d90d2c33 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -5879,7 +5879,7 @@ static int run_editor(char **paths) {
execvp(editor, (char* const*) args);
}
- FOREACH_STRING(p, "nano", "vim", "vi") {
+ FOREACH_STRING(p, "editor", "nano", "vim", "vi") {
args[0] = p;
execvp(p, (char* const*) args);
/* We do not fail if the editor doesn't exist
diff --git a/src/test/test-udev.c b/src/test/test-udev.c
index f3953fe26a..d1fe953071 100644
--- a/src/test/test-udev.c
+++ b/src/test/test-udev.c
@@ -28,6 +28,7 @@
#include "missing.h"
#include "selinux-util.h"
+#include "signal-util.h"
#include "udev.h"
#include "udev-util.h"
@@ -79,7 +80,6 @@ int main(int argc, char *argv[]) {
char syspath[UTIL_PATH_SIZE];
const char *devpath;
const char *action;
- sigset_t mask, sigmask_orig;
int err;
err = fake_filesystems();
@@ -93,8 +93,6 @@ int main(int argc, char *argv[]) {
log_debug("version %s", VERSION);
mac_selinux_init("/dev");
- sigprocmask(SIG_SETMASK, NULL, &sigmask_orig);
-
action = argv[1];
if (action == NULL) {
log_error("action missing");
@@ -118,8 +116,7 @@ int main(int argc, char *argv[]) {
event = udev_event_new(dev);
- sigfillset(&mask);
- sigprocmask(SIG_SETMASK, &mask, &sigmask_orig);
+ assert_se(sigprocmask_many(SIG_BLOCK, SIGTERM, SIGINT, SIGHUP, SIGCHLD, -1) == 0);
/* do what devtmpfs usually provides us */
if (udev_device_get_devnode(dev) != NULL) {
@@ -142,11 +139,9 @@ int main(int argc, char *argv[]) {
udev_event_execute_rules(event,
3 * USEC_PER_SEC, USEC_PER_SEC,
NULL,
- rules,
- &sigmask_orig);
+ rules);
udev_event_execute_run(event,
- 3 * USEC_PER_SEC, USEC_PER_SEC,
- NULL);
+ 3 * USEC_PER_SEC, USEC_PER_SEC);
out:
mac_selinux_finish();
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
index 31b12d50d7..a8025c825b 100644
--- a/src/test/test-unit-file.c
+++ b/src/test/test-unit-file.c
@@ -232,7 +232,7 @@ static void test_config_parse_exec(void) {
&c, NULL);
assert_se(r >= 0);
c1 = c1->command_next;
- check_execcommand(c1, "/bin/find", NULL, "\\073", NULL, false);
+ check_execcommand(c1, "/bin/find", NULL, ";", NULL, false);
log_info("/* spaces in the filename */");
r = config_parse_exec(NULL, "fake", 5, "section", 1,
diff --git a/src/test/test-util.c b/src/test/test-util.c
index e0269821d7..9d5516a18d 100644
--- a/src/test/test-util.c
+++ b/src/test/test-util.c
@@ -460,6 +460,11 @@ static void test_cunescape(void) {
assert_se(cunescape("\\u0000", 0, &unescaped) < 0);
assert_se(cunescape("\\u00DF\\U000000df\\u03a0\\U00000041", UNESCAPE_RELAX, &unescaped) >= 0);
assert_se(streq_ptr(unescaped, "ßßΠA"));
+ free(unescaped);
+ unescaped = NULL;
+
+ assert_se(cunescape("\\073", 0, &unescaped) >= 0);
+ assert_se(streq_ptr(unescaped, ";"));
}
static void test_foreach_word(void) {
diff --git a/src/udev/net/link-config.c b/src/udev/net/link-config.c
index ce038abee5..5610b2808e 100644
--- a/src/udev/net/link-config.c
+++ b/src/udev/net/link-config.c
@@ -240,6 +240,10 @@ int link_config_get(link_config_ctx *ctx, struct udev_device *device,
link_config **ret) {
link_config *link;
+ assert(ctx);
+ assert(device);
+ assert(ret);
+
LIST_FOREACH(links, link, ctx->links) {
const char* attr_value;
diff --git a/src/udev/udev-builtin-hwdb.c b/src/udev/udev-builtin-hwdb.c
index 5e0e7ebb11..7dfc74e6fa 100644
--- a/src/udev/udev-builtin-hwdb.c
+++ b/src/udev/udev-builtin-hwdb.c
@@ -85,6 +85,8 @@ static int udev_builtin_hwdb_search(struct udev_device *dev, struct udev_device
bool last = false;
int r = 0;
+ assert(dev);
+
for (d = srcdev; d && !last; d = udev_device_get_parent(d)) {
const char *dsubsys;
const char *modalias = NULL;
diff --git a/src/udev/udev-builtin-input_id.c b/src/udev/udev-builtin-input_id.c
index b14190e423..e3fa4bc162 100644
--- a/src/udev/udev-builtin-input_id.c
+++ b/src/udev/udev-builtin-input_id.c
@@ -133,79 +133,99 @@ static bool test_pointers(struct udev_device *dev,
const unsigned long* bitmask_rel,
const unsigned long* bitmask_props,
bool test) {
- int is_mouse = 0;
- int is_touchpad = 0;
- bool ret = false;
-
- if (test_bit(INPUT_PROP_ACCELEROMETER, bitmask_props)) {
+ bool has_abs_coordinates = false;
+ bool has_rel_coordinates = false;
+ bool has_mt_coordinates = false;
+ bool has_joystick_axes_or_buttons = false;
+ bool is_direct = false;
+ bool has_touch = false;
+ bool has_3d_coordinates = false;
+ bool has_keys = false;
+ bool stylus_or_pen = false;
+ bool finger_but_no_pen = false;
+ bool has_mouse_button = false;
+ bool is_mouse = false;
+ bool is_touchpad = false;
+ bool is_touchscreen = false;
+ bool is_tablet = false;
+ bool is_joystick = false;
+ bool is_accelerometer = false;
+ bool is_pointing_stick= false;
+
+ has_keys = test_bit(EV_KEY, bitmask_ev);
+ has_abs_coordinates = test_bit(ABS_X, bitmask_abs) && test_bit(ABS_Y, bitmask_abs);
+ has_3d_coordinates = has_abs_coordinates && test_bit(ABS_Z, bitmask_abs);
+ is_accelerometer = test_bit(INPUT_PROP_ACCELEROMETER, bitmask_props);
+
+ if (!has_keys && has_3d_coordinates)
+ is_accelerometer = true;
+
+ if (is_accelerometer) {
udev_builtin_add_property(dev, test, "ID_INPUT_ACCELEROMETER", "1");
return true;
}
- if (!test_bit(EV_KEY, bitmask_ev)) {
- if (test_bit(EV_ABS, bitmask_ev) &&
- test_bit(ABS_X, bitmask_abs) &&
- test_bit(ABS_Y, bitmask_abs) &&
- test_bit(ABS_Z, bitmask_abs)) {
- udev_builtin_add_property(dev, test, "ID_INPUT_ACCELEROMETER", "1");
- ret = true;
- }
- return ret;
- }
-
- if (test_bit(EV_ABS, bitmask_ev) &&
- test_bit(ABS_X, bitmask_abs) && test_bit(ABS_Y, bitmask_abs)) {
- if (test_bit(BTN_STYLUS, bitmask_key) || test_bit(BTN_TOOL_PEN, bitmask_key)) {
- udev_builtin_add_property(dev, test, "ID_INPUT_TABLET", "1");
- ret = true;
- } else if (test_bit(BTN_TOOL_FINGER, bitmask_key) && !test_bit(BTN_TOOL_PEN, bitmask_key)) {
- is_touchpad = 1;
- } else if (test_bit(BTN_MOUSE, bitmask_key)) {
+ is_pointing_stick = test_bit(INPUT_PROP_POINTING_STICK, bitmask_props);
+ stylus_or_pen = test_bit(BTN_STYLUS, bitmask_key) || test_bit(BTN_TOOL_PEN, bitmask_key);
+ finger_but_no_pen = test_bit(BTN_TOOL_FINGER, bitmask_key) && !test_bit(BTN_TOOL_PEN, bitmask_key);
+ has_mouse_button = test_bit(BTN_LEFT, bitmask_key);
+ has_rel_coordinates = test_bit(EV_REL, bitmask_ev) && test_bit(REL_X, bitmask_rel) && test_bit(REL_Y, bitmask_rel);
+ has_mt_coordinates = test_bit(ABS_MT_POSITION_X, bitmask_abs) && test_bit(ABS_MT_POSITION_Y, bitmask_abs);
+
+ /* unset has_mt_coordinates if devices claims to have all abs axis */
+ if(has_mt_coordinates && test_bit(ABS_MT_SLOT, bitmask_abs) && test_bit(ABS_MT_SLOT - 1, bitmask_abs))
+ has_mt_coordinates = false;
+ is_direct = test_bit(INPUT_PROP_DIRECT, bitmask_props);
+ has_touch = test_bit(BTN_TOUCH, bitmask_key);
+ /* joysticks don't necessarily have buttons; e. g.
+ * rudders/pedals are joystick-like, but buttonless; they have
+ * other fancy axes */
+ has_joystick_axes_or_buttons = test_bit(BTN_TRIGGER, bitmask_key) ||
+ test_bit(BTN_A, bitmask_key) ||
+ test_bit(BTN_1, bitmask_key) ||
+ test_bit(ABS_RX, bitmask_abs) ||
+ test_bit(ABS_RY, bitmask_abs) ||
+ test_bit(ABS_RZ, bitmask_abs) ||
+ test_bit(ABS_THROTTLE, bitmask_abs) ||
+ test_bit(ABS_RUDDER, bitmask_abs) ||
+ test_bit(ABS_WHEEL, bitmask_abs) ||
+ test_bit(ABS_GAS, bitmask_abs) ||
+ test_bit(ABS_BRAKE, bitmask_abs);
+
+ if (has_abs_coordinates) {
+ if (stylus_or_pen)
+ is_tablet = true;
+ else if (finger_but_no_pen && !is_direct)
+ is_touchpad = true;
+ else if (has_mouse_button)
/* This path is taken by VMware's USB mouse, which has
* absolute axes, but no touch/pressure button. */
- is_mouse = 1;
- } else if (test_bit(BTN_TOUCH, bitmask_key)) {
- udev_builtin_add_property(dev, test, "ID_INPUT_TOUCHSCREEN", "1");
- ret = true;
- /* joysticks don't necessarily have to have buttons; e. g.
- * rudders/pedals are joystick-like, but buttonless; they have
- * other fancy axes */
- } else if (test_bit(BTN_TRIGGER, bitmask_key) ||
- test_bit(BTN_A, bitmask_key) ||
- test_bit(BTN_1, bitmask_key) ||
- test_bit(ABS_RX, bitmask_abs) ||
- test_bit(ABS_RY, bitmask_abs) ||
- test_bit(ABS_RZ, bitmask_abs) ||
- test_bit(ABS_THROTTLE, bitmask_abs) ||
- test_bit(ABS_RUDDER, bitmask_abs) ||
- test_bit(ABS_WHEEL, bitmask_abs) ||
- test_bit(ABS_GAS, bitmask_abs) ||
- test_bit(ABS_BRAKE, bitmask_abs)) {
- udev_builtin_add_property(dev, test, "ID_INPUT_JOYSTICK", "1");
- ret = true;
- }
+ is_mouse = true;
+ else if (has_touch)
+ is_touchscreen = true;
+ else if (has_joystick_axes_or_buttons)
+ is_joystick = true;
}
+ if (has_mt_coordinates && is_direct)
+ is_touchscreen = true;
- if (test_bit(INPUT_PROP_POINTING_STICK, bitmask_props)) {
- udev_builtin_add_property(dev, test, "ID_INPUT_POINTINGSTICK", "1");
- ret = true;
- }
+ if (has_rel_coordinates && has_mouse_button)
+ is_mouse = true;
- if (test_bit(EV_REL, bitmask_ev) &&
- test_bit(REL_X, bitmask_rel) && test_bit(REL_Y, bitmask_rel) &&
- test_bit(BTN_MOUSE, bitmask_key))
- is_mouse = 1;
-
- if (is_mouse) {
+ if (is_pointing_stick)
+ udev_builtin_add_property(dev, test, "ID_INPUT_POINTINGSTICK", "1");
+ if (is_mouse)
udev_builtin_add_property(dev, test, "ID_INPUT_MOUSE", "1");
- ret = true;
- }
- if (is_touchpad) {
+ if (is_touchpad)
udev_builtin_add_property(dev, test, "ID_INPUT_TOUCHPAD", "1");
- ret = true;
- }
-
- return ret;
+ if (is_touchscreen)
+ udev_builtin_add_property(dev, test, "ID_INPUT_TOUCHSCREEN", "1");
+ if (is_joystick)
+ udev_builtin_add_property(dev, test, "ID_INPUT_JOYSTICK", "1");
+ if (is_tablet)
+ udev_builtin_add_property(dev, test, "ID_INPUT_TABLET", "1");
+
+ return is_tablet || is_mouse || is_touchpad || is_touchscreen || is_joystick || is_pointing_stick;
}
/* key like devices */
@@ -268,6 +288,8 @@ static int builtin_input_id(struct udev_device *dev, int argc, char *argv[], boo
bool is_pointer;
bool is_key;
+ assert(dev);
+
/* walk up the parental chain until we find the real input device; the
* argument is very likely a subdevice of this, like eventN */
pdev = dev;
diff --git a/src/udev/udev-builtin-keyboard.c b/src/udev/udev-builtin-keyboard.c
index ed990c58fb..01f3879f37 100644
--- a/src/udev/udev-builtin-keyboard.c
+++ b/src/udev/udev-builtin-keyboard.c
@@ -37,6 +37,9 @@ static int install_force_release(struct udev_device *dev, const unsigned *releas
unsigned i;
int ret;
+ assert(dev);
+ assert(release);
+
atkbd = udev_device_get_parent_with_subsystem_devtype(dev, "serio", NULL);
if (!atkbd)
return -ENODEV;
@@ -152,6 +155,9 @@ static void set_trackpoint_sensitivity(struct udev_device *dev, const char *valu
char val_s[DECIMAL_STR_MAX(int)];
int r, val_i;
+ assert(dev);
+ assert(value);
+
/* The sensitivity sysfs attr belongs to the serio parent device */
pdev = udev_device_get_parent_with_subsystem_devtype(dev, "serio", NULL);
if (!pdev) {
diff --git a/src/udev/udev-builtin-net_id.c b/src/udev/udev-builtin-net_id.c
index 448920507a..6e7e1271fb 100644
--- a/src/udev/udev-builtin-net_id.c
+++ b/src/udev/udev-builtin-net_id.c
@@ -276,6 +276,9 @@ out:
static int names_pci(struct udev_device *dev, struct netnames *names) {
struct udev_device *parent;
+ assert(dev);
+ assert(names);
+
parent = udev_device_get_parent(dev);
if (!parent)
return -ENOENT;
@@ -302,6 +305,9 @@ static int names_usb(struct udev_device *dev, struct netnames *names) {
size_t l;
char *s;
+ assert(dev);
+ assert(names);
+
usbdev = udev_device_get_parent_with_subsystem_devtype(dev, "usb", "usb_interface");
if (!usbdev)
return -ENOENT;
@@ -350,6 +356,9 @@ static int names_bcma(struct udev_device *dev, struct netnames *names) {
struct udev_device *bcmadev;
unsigned int core;
+ assert(dev);
+ assert(names);
+
bcmadev = udev_device_get_parent_with_subsystem_devtype(dev, "bcma", NULL);
if (!bcmadev)
return -ENOENT;
@@ -371,6 +380,9 @@ static int names_ccw(struct udev_device *dev, struct netnames *names) {
size_t bus_id_len;
int rc;
+ assert(dev);
+ assert(names);
+
/* Retrieve the associated CCW device */
cdev = udev_device_get_parent(dev);
if (!cdev)
diff --git a/src/udev/udev-builtin-path_id.c b/src/udev/udev-builtin-path_id.c
index b6749aab76..4ca0a69d7d 100644
--- a/src/udev/udev-builtin-path_id.c
+++ b/src/udev/udev-builtin-path_id.c
@@ -77,6 +77,9 @@ static int format_lun_number(struct udev_device *dev, char **path) {
static struct udev_device *skip_subsystem(struct udev_device *dev, const char *subsys) {
struct udev_device *parent = dev;
+ assert(dev);
+ assert(subsys);
+
while (parent != NULL) {
const char *subsystem;
@@ -96,6 +99,9 @@ static struct udev_device *handle_scsi_fibre_channel(struct udev_device *parent,
const char *port;
char *lun = NULL;
+ assert(parent);
+ assert(path);
+
targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target");
if (targetdev == NULL)
return NULL;
@@ -126,6 +132,9 @@ static struct udev_device *handle_scsi_sas_wide_port(struct udev_device *parent,
const char *sas_address;
char *lun = NULL;
+ assert(parent);
+ assert(path);
+
targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target");
if (targetdev == NULL)
return NULL;
@@ -169,6 +178,9 @@ static struct udev_device *handle_scsi_sas(struct udev_device *parent, char **pa
const char *phy_count;
char *lun = NULL;
+ assert(parent);
+ assert(path);
+
targetdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_target");
if (targetdev == NULL)
return NULL;
@@ -259,6 +271,9 @@ static struct udev_device *handle_scsi_iscsi(struct udev_device *parent, char **
const char *port;
char *lun = NULL;
+ assert(parent);
+ assert(path);
+
/* find iscsi session */
transportdev = parent;
for (;;) {
@@ -316,6 +331,9 @@ static struct udev_device *handle_scsi_default(struct udev_device *parent, char
struct dirent *dent;
int basenum;
+ assert(parent);
+ assert(path);
+
hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host");
if (hostdev == NULL)
return NULL;
@@ -398,6 +416,9 @@ static struct udev_device *handle_scsi_hyperv(struct udev_device *parent, char *
char guid[38];
size_t i, k;
+ assert(parent);
+ assert(path);
+
hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host");
if (!hostdev)
return NULL;
@@ -555,6 +576,10 @@ static struct udev_device *handle_bcma(struct udev_device *parent, char **path)
static struct udev_device *handle_ccw(struct udev_device *parent, struct udev_device *dev, char **path) {
struct udev_device *scsi_dev;
+ assert(parent);
+ assert(dev);
+ assert(path);
+
scsi_dev = udev_device_get_parent_with_subsystem_devtype(dev, "scsi", "scsi_device");
if (scsi_dev != NULL) {
const char *wwpn;
@@ -582,6 +607,8 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
bool supported_transport = false;
bool supported_parent = false;
+ assert(dev);
+
/* S390 ccw bus */
parent = udev_device_get_parent_with_subsystem_devtype(dev, "ccw", NULL);
if (parent != NULL) {
@@ -638,7 +665,8 @@ static int builtin_path_id(struct udev_device *dev, int argc, char *argv[], bool
supported_parent = true;
}
- parent = udev_device_get_parent(parent);
+ if (parent)
+ parent = udev_device_get_parent(parent);
}
/*
diff --git a/src/udev/udev-builtin-usb_id.c b/src/udev/udev-builtin-usb_id.c
index 462efc5c86..d309dc31cb 100644
--- a/src/udev/udev-builtin-usb_id.c
+++ b/src/udev/udev-builtin-usb_id.c
@@ -252,6 +252,8 @@ static int builtin_usb_id(struct udev_device *dev, int argc, char *argv[], bool
size_t l;
char *s;
+ assert(dev);
+
/* shortcut, if we are called directly for a "usb_device" type */
if (udev_device_get_devtype(dev) != NULL && streq(udev_device_get_devtype(dev), "usb_device")) {
dev_if_packed_info(dev, packed_if_str, sizeof(packed_if_str));
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index a5c3edbff8..4dcf8f2e1c 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -119,6 +119,8 @@ size_t udev_event_apply_format(struct udev_event *event, const char *src, char *
char *s;
size_t l;
+ assert(dev);
+
from = src;
s = dest;
l = size;
@@ -383,7 +385,7 @@ out:
}
static int spawn_exec(struct udev_event *event,
- const char *cmd, char *const argv[], char **envp, const sigset_t *sigmask,
+ const char *cmd, char *const argv[], char **envp,
int fd_stdout, int fd_stderr) {
_cleanup_close_ int fd = -1;
@@ -411,9 +413,8 @@ static int spawn_exec(struct udev_event *event,
/* terminate child in case parent goes away */
prctl(PR_SET_PDEATHSIG, SIGTERM);
- /* restore original udev sigmask before exec */
- if (sigmask)
- sigprocmask(SIG_SETMASK, sigmask, NULL);
+ /* restore sigmask before exec */
+ (void) reset_signal_mask();
execve(argv[0], argv, envp);
@@ -697,7 +698,7 @@ out:
int udev_event_spawn(struct udev_event *event,
usec_t timeout_usec,
usec_t timeout_warn_usec,
- const char *cmd, char **envp, const sigset_t *sigmask,
+ const char *cmd, char **envp,
char *result, size_t ressize) {
int outpipe[2] = {-1, -1};
int errpipe[2] = {-1, -1};
@@ -747,7 +748,7 @@ int udev_event_spawn(struct udev_event *event,
log_debug("starting '%s'", cmd);
- spawn_exec(event, cmd, argv, envp, sigmask,
+ spawn_exec(event, cmd, argv, envp,
outpipe[WRITE_END], errpipe[WRITE_END]);
_exit(2 );
@@ -809,8 +810,7 @@ static int rename_netif(struct udev_event *event) {
void udev_event_execute_rules(struct udev_event *event,
usec_t timeout_usec, usec_t timeout_warn_usec,
struct udev_list *properties_list,
- struct udev_rules *rules,
- const sigset_t *sigmask) {
+ struct udev_rules *rules) {
struct udev_device *dev = event->dev;
if (udev_device_get_subsystem(dev) == NULL)
@@ -826,8 +826,7 @@ void udev_event_execute_rules(struct udev_event *event,
udev_rules_apply_to_event(rules, event,
timeout_usec, timeout_warn_usec,
- properties_list,
- sigmask);
+ properties_list);
if (major(udev_device_get_devnum(dev)) != 0)
udev_node_remove(dev);
@@ -845,8 +844,7 @@ void udev_event_execute_rules(struct udev_event *event,
udev_rules_apply_to_event(rules, event,
timeout_usec, timeout_warn_usec,
- properties_list,
- sigmask);
+ properties_list);
/* rename a new network interface, if needed */
if (udev_device_get_ifindex(dev) > 0 && streq(udev_device_get_action(dev), "add") &&
@@ -909,7 +907,7 @@ void udev_event_execute_rules(struct udev_event *event,
}
}
-void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec, const sigset_t *sigmask) {
+void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec) {
struct udev_list_entry *list_entry;
udev_list_entry_foreach(list_entry, udev_list_get_entry(&event->run_list)) {
@@ -932,7 +930,7 @@ void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, usec_
udev_event_apply_format(event, cmd, program, sizeof(program));
envp = udev_device_get_properties_envp(event->dev);
- udev_event_spawn(event, timeout_usec, timeout_warn_usec, program, envp, sigmask, NULL, 0);
+ udev_event_spawn(event, timeout_usec, timeout_warn_usec, program, envp, NULL, 0);
}
}
}
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index 4262119886..915371525f 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -633,7 +633,7 @@ static int import_file_into_properties(struct udev_device *dev, const char *file
static int import_program_into_properties(struct udev_event *event,
usec_t timeout_usec,
usec_t timeout_warn_usec,
- const char *program, const sigset_t *sigmask) {
+ const char *program) {
struct udev_device *dev = event->dev;
char **envp;
char result[UTIL_LINE_SIZE];
@@ -641,7 +641,7 @@ static int import_program_into_properties(struct udev_event *event,
int err;
envp = udev_device_get_properties_envp(dev);
- err = udev_event_spawn(event, timeout_usec, timeout_warn_usec, program, envp, sigmask, result, sizeof(result));
+ err = udev_event_spawn(event, timeout_usec, timeout_warn_usec, program, envp, result, sizeof(result));
if (err < 0)
return err;
@@ -664,6 +664,9 @@ static int import_parent_into_properties(struct udev_device *dev, const char *fi
struct udev_device *dev_parent;
struct udev_list_entry *list_entry;
+ assert(dev);
+ assert(filter);
+
dev_parent = udev_device_get_parent(dev);
if (dev_parent == NULL)
return -1;
@@ -1892,8 +1895,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
struct udev_event *event,
usec_t timeout_usec,
usec_t timeout_warn_usec,
- struct udev_list *properties_list,
- const sigset_t *sigmask) {
+ struct udev_list *properties_list) {
struct token *cur;
struct token *rule;
enum escape_type esc = ESCAPE_UNSET;
@@ -2129,7 +2131,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
rules_str(rules, rule->rule.filename_off),
rule->rule.filename_line);
- if (udev_event_spawn(event, timeout_usec, timeout_warn_usec, program, envp, sigmask, result, sizeof(result)) < 0) {
+ if (udev_event_spawn(event, timeout_usec, timeout_warn_usec, program, envp, result, sizeof(result)) < 0) {
if (cur->key.op != OP_NOMATCH)
goto nomatch;
} else {
@@ -2165,7 +2167,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
rules_str(rules, rule->rule.filename_off),
rule->rule.filename_line);
- if (import_program_into_properties(event, timeout_usec, timeout_warn_usec, import, sigmask) != 0)
+ if (import_program_into_properties(event, timeout_usec, timeout_warn_usec, import) != 0)
if (cur->key.op != OP_NOMATCH)
goto nomatch;
break;
diff --git a/src/udev/udev.h b/src/udev/udev.h
index 1b17c615b8..fd8504c424 100644
--- a/src/udev/udev.h
+++ b/src/udev/udev.h
@@ -20,7 +20,6 @@
#include <sys/types.h>
#include <sys/param.h>
-#include <signal.h>
#include "macro.h"
#include "sd-rtnl.h"
@@ -73,8 +72,7 @@ struct udev_rules *udev_rules_unref(struct udev_rules *rules);
bool udev_rules_check_timestamp(struct udev_rules *rules);
int udev_rules_apply_to_event(struct udev_rules *rules, struct udev_event *event,
usec_t timeout_usec, usec_t timeout_warn_usec,
- struct udev_list *properties_list,
- const sigset_t *sigmask);
+ struct udev_list *properties_list);
int udev_rules_apply_static_dev_perms(struct udev_rules *rules);
/* udev-event.c */
@@ -86,14 +84,13 @@ int udev_event_apply_subsys_kernel(struct udev_event *event, const char *string,
int udev_event_spawn(struct udev_event *event,
usec_t timeout_usec,
usec_t timeout_warn_usec,
- const char *cmd, char **envp, const sigset_t *sigmask,
+ const char *cmd, char **envp,
char *result, size_t ressize);
void udev_event_execute_rules(struct udev_event *event,
usec_t timeout_usec, usec_t timeout_warn_usec,
struct udev_list *properties_list,
- struct udev_rules *rules,
- const sigset_t *sigset);
-void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec, const sigset_t *sigset);
+ struct udev_rules *rules);
+void udev_event_execute_run(struct udev_event *event, usec_t timeout_usec, usec_t timeout_warn_usec);
int udev_build_argv(struct udev *udev, char *cmd, int *argc, char *argv[]);
/* udev-watch.c */
diff --git a/src/udev/udevadm-test.c b/src/udev/udevadm-test.c
index 46ec0e3225..d04e618d0d 100644
--- a/src/udev/udevadm-test.c
+++ b/src/udev/udevadm-test.c
@@ -135,8 +135,7 @@ static int adm_test(struct udev *udev, int argc, char *argv[]) {
udev_event_execute_rules(event,
60 * USEC_PER_SEC, 20 * USEC_PER_SEC,
NULL,
- rules,
- &sigmask_orig);
+ rules);
udev_list_entry_foreach(entry, udev_device_get_properties_list_entry(dev))
printf("%s=%s\n", udev_list_entry_get_name(entry), udev_list_entry_get_value(entry));
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 34e88af539..eb43091190 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -42,6 +42,8 @@
#include "sd-daemon.h"
#include "sd-event.h"
+
+#include "signal-util.h"
#include "event-util.h"
#include "rtnl-util.h"
#include "cgroup-util.h"
@@ -67,9 +69,8 @@ typedef struct Manager {
sd_event *event;
Hashmap *workers;
struct udev_list_node events;
- char *cgroup;
+ const char *cgroup;
pid_t pid; /* the process that originally allocated the manager object */
- sigset_t sigmask_orig;
struct udev_rules *rules;
struct udev_list properties;
@@ -306,7 +307,6 @@ static void manager_free(Manager *manager) {
udev_list_cleanup(&manager->properties);
udev_rules_unref(manager->rules);
- free(manager->cgroup);
safe_close(manager->fd_inotify);
safe_close_pair(manager->worker_watch);
@@ -401,6 +401,8 @@ static void worker_spawn(Manager *manager, struct event *event) {
struct udev_event *udev_event;
int fd_lock = -1;
+ assert(dev);
+
log_debug("seq %llu running", udev_device_get_seqnum(dev));
udev_event = udev_event_new(dev);
if (udev_event == NULL) {
@@ -446,12 +448,10 @@ static void worker_spawn(Manager *manager, struct event *event) {
udev_event_execute_rules(udev_event,
arg_event_timeout_usec, arg_event_timeout_warn_usec,
&manager->properties,
- manager->rules,
- &manager->sigmask_orig);
+ manager->rules);
udev_event_execute_run(udev_event,
- arg_event_timeout_usec, arg_event_timeout_warn_usec,
- &manager->sigmask_orig);
+ arg_event_timeout_usec, arg_event_timeout_warn_usec);
if (udev_event->rtnl)
/* in case rtnl was initialized */
@@ -1261,38 +1261,91 @@ static int on_post(sd_event_source *s, void *userdata) {
return 1;
}
-static int systemd_fds(int *rctrl, int *rnetlink) {
- int ctrl = -1, netlink = -1;
- int fd, n;
+static int listen_fds(int *rctrl, int *rnetlink) {
+ _cleanup_udev_unref_ struct udev *udev = NULL;
+ int ctrl_fd = -1, netlink_fd = -1;
+ int fd, n, r;
+
+ assert(rctrl);
+ assert(rnetlink);
n = sd_listen_fds(true);
- if (n <= 0)
- return -1;
+ if (n < 0)
+ return n;
for (fd = SD_LISTEN_FDS_START; fd < n + SD_LISTEN_FDS_START; fd++) {
if (sd_is_socket(fd, AF_LOCAL, SOCK_SEQPACKET, -1)) {
- if (ctrl >= 0)
- return -1;
- ctrl = fd;
+ if (ctrl_fd >= 0)
+ return -EINVAL;
+ ctrl_fd = fd;
continue;
}
if (sd_is_socket(fd, AF_NETLINK, SOCK_RAW, -1)) {
- if (netlink >= 0)
- return -1;
- netlink = fd;
+ if (netlink_fd >= 0)
+ return -EINVAL;
+ netlink_fd = fd;
continue;
}
- return -1;
+ return -EINVAL;
}
- if (ctrl < 0 || netlink < 0)
- return -1;
+ if (ctrl_fd < 0) {
+ _cleanup_udev_ctrl_unref_ struct udev_ctrl *ctrl = NULL;
+
+ udev = udev_new();
+ if (!udev)
+ return -ENOMEM;
+
+ ctrl = udev_ctrl_new(udev);
+ if (!ctrl)
+ return log_error_errno(EINVAL, "error initializing udev control socket");
+
+ r = udev_ctrl_enable_receiving(ctrl);
+ if (r < 0)
+ return log_error_errno(EINVAL, "error binding udev control socket");
+
+ fd = udev_ctrl_get_fd(ctrl);
+ if (fd < 0)
+ return log_error_errno(EIO, "could not get ctrl fd");
+
+ ctrl_fd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
+ if (ctrl_fd < 0)
+ return log_error_errno(errno, "could not dup ctrl fd: %m");
+ }
+
+ if (netlink_fd < 0) {
+ _cleanup_udev_monitor_unref_ struct udev_monitor *monitor = NULL;
+
+ if (!udev) {
+ udev = udev_new();
+ if (!udev)
+ return -ENOMEM;
+ }
+
+ monitor = udev_monitor_new_from_netlink(udev, "kernel");
+ if (!monitor)
+ return log_error_errno(EINVAL, "error initializing netlink socket");
+
+ (void) udev_monitor_set_receive_buffer_size(monitor, 128 * 1024 * 1024);
+
+ r = udev_monitor_enable_receiving(monitor);
+ if (r < 0)
+ return log_error_errno(EINVAL, "error binding netlink socket");
+
+ fd = udev_monitor_get_fd(monitor);
+ if (fd < 0)
+ return log_error_errno(netlink_fd, "could not get uevent fd: %m");
+
+ netlink_fd = fcntl(fd, F_DUPFD_CLOEXEC, 3);
+ if (ctrl_fd < 0)
+ return log_error_errno(errno, "could not dup netlink fd: %m");
+ }
+
+ *rctrl = ctrl_fd;
+ *rnetlink = netlink_fd;
- log_debug("ctrl=%i netlink=%i", ctrl, netlink);
- *rctrl = ctrl;
- *rnetlink = netlink;
return 0;
}
@@ -1437,11 +1490,13 @@ static int parse_argv(int argc, char *argv[]) {
return 1;
}
-static int manager_new(Manager **ret) {
+static int manager_new(Manager **ret, int fd_ctrl, int fd_uevent, const char *cgroup) {
_cleanup_(manager_freep) Manager *manager = NULL;
- int r, fd_ctrl, fd_uevent;
+ int r, fd_worker, one = 1;
assert(ret);
+ assert(fd_ctrl >= 0);
+ assert(fd_uevent >= 0);
manager = new0(Manager, 1);
if (!manager)
@@ -1464,57 +1519,15 @@ static int manager_new(Manager **ret) {
udev_list_node_init(&manager->events);
udev_list_init(manager->udev, &manager->properties, true);
- r = systemd_fds(&fd_ctrl, &fd_uevent);
- if (r >= 0) {
- /* get control and netlink socket from systemd */
- manager->ctrl = udev_ctrl_new_from_fd(manager->udev, fd_ctrl);
- if (!manager->ctrl)
- return log_error_errno(EINVAL, "error taking over udev control socket");
-
- manager->monitor = udev_monitor_new_from_netlink_fd(manager->udev, "kernel", fd_uevent);
- if (!manager->monitor)
- return log_error_errno(EINVAL, "error taking over netlink socket");
-
- /* get our own cgroup, we regularly kill everything udev has left behind */
- r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, 0, &manager->cgroup);
- if (r < 0)
- log_warning_errno(r, "failed to get cgroup: %m");
- } else {
- /* open control and netlink socket */
- manager->ctrl = udev_ctrl_new(manager->udev);
- if (!manager->ctrl)
- return log_error_errno(EINVAL, "error initializing udev control socket");
-
- fd_ctrl = udev_ctrl_get_fd(manager->ctrl);
-
- manager->monitor = udev_monitor_new_from_netlink(manager->udev, "kernel");
- if (!manager->monitor)
- return log_error_errno(EINVAL, "error initializing netlink socket");
-
- fd_uevent = udev_monitor_get_fd(manager->monitor);
-
- (void) udev_monitor_set_receive_buffer_size(manager->monitor, 128 * 1024 * 1024);
- }
-
- r = udev_monitor_enable_receiving(manager->monitor);
- if (r < 0)
- return log_error_errno(EINVAL, "error binding netlink socket");
-
- r = udev_ctrl_enable_receiving(manager->ctrl);
- if (r < 0)
- return log_error_errno(EINVAL, "error binding udev control socket");
+ manager->cgroup = cgroup;
- *ret = manager;
- manager = NULL;
+ manager->ctrl = udev_ctrl_new_from_fd(manager->udev, fd_ctrl);
+ if (!manager->ctrl)
+ return log_error_errno(EINVAL, "error taking over udev control socket");
- return 0;
-}
-
-static int manager_listen(Manager *manager) {
- sigset_t mask;
- int r, fd_worker, one = 1;
-
- assert(manager);
+ manager->monitor = udev_monitor_new_from_netlink_fd(manager->udev, "kernel", fd_uevent);
+ if (!manager->monitor)
+ return log_error_errno(EINVAL, "error taking over netlink socket");
/* unnamed socket from workers to the main daemon */
r = socketpair(AF_LOCAL, SOCK_DGRAM|SOCK_CLOEXEC, 0, manager->worker_watch);
@@ -1534,8 +1547,7 @@ static int manager_listen(Manager *manager) {
udev_watch_restore(manager->udev);
/* block and listen to all signals on signalfd */
- sigfillset(&mask);
- sigprocmask(SIG_SETMASK, &mask, &manager->sigmask_orig);
+ assert_se(sigprocmask_many(SIG_BLOCK, SIGTERM, SIGINT, SIGHUP, SIGCHLD, -1) == 0);
r = sd_event_default(&manager->event);
if (r < 0)
@@ -1561,7 +1573,7 @@ static int manager_listen(Manager *manager) {
if (r < 0)
return log_error_errno(r, "error creating watchdog event source: %m");
- r = sd_event_add_io(manager->event, &manager->ctrl_event, udev_ctrl_get_fd(manager->ctrl), EPOLLIN, on_ctrl_msg, manager);
+ r = sd_event_add_io(manager->event, &manager->ctrl_event, fd_ctrl, EPOLLIN, on_ctrl_msg, manager);
if (r < 0)
return log_error_errno(r, "error creating ctrl event source: %m");
@@ -1577,7 +1589,7 @@ static int manager_listen(Manager *manager) {
if (r < 0)
return log_error_errno(r, "error creating inotify event source: %m");
- r = sd_event_add_io(manager->event, &manager->uevent_event, udev_monitor_get_fd(manager->monitor), EPOLLIN, on_uevent, manager);
+ r = sd_event_add_io(manager->event, &manager->uevent_event, fd_uevent, EPOLLIN, on_uevent, manager);
if (r < 0)
return log_error_errno(r, "error creating uevent event source: %m");
@@ -1589,12 +1601,16 @@ static int manager_listen(Manager *manager) {
if (r < 0)
return log_error_errno(r, "error creating post event source: %m");
+ *ret = manager;
+ manager = NULL;
+
return 0;
}
int main(int argc, char *argv[]) {
_cleanup_(manager_freep) Manager *manager = NULL;
- int r;
+ _cleanup_free_ char *cgroup = NULL;
+ int r, fd_ctrl, fd_uevent;
log_set_target(LOG_TARGET_AUTO);
log_parse_environment();
@@ -1651,13 +1667,20 @@ int main(int argc, char *argv[]) {
dev_setup(NULL, UID_INVALID, GID_INVALID);
- r = manager_new(&manager);
- if (r < 0)
- goto exit;
+ if (getppid() == 1) {
+ /* get our own cgroup, we regularly kill everything udev has left behind
+ we only do this on systemd systems, and only if we are directly spawned
+ by PID1. otherwise we are not guaranteed to have a dedicated cgroup */
+ r = cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, 0, &cgroup);
+ if (r < 0)
+ log_warning_errno(r, "failed to get cgroup: %m");
+ }
- r = udev_rules_apply_static_dev_perms(manager->rules);
- if (r < 0)
- log_error_errno(r, "failed to apply permissions on static device nodes: %m");
+ r = listen_fds(&fd_ctrl, &fd_uevent);
+ if (r < 0) {
+ r = log_error_errno(r, "could not listen on fds: %m");
+ goto exit;
+ }
if (arg_daemonize) {
pid_t pid;
@@ -1680,14 +1703,21 @@ int main(int argc, char *argv[]) {
setsid();
write_string_file("/proc/self/oom_score_adj", "-1000");
- } else
- sd_notify(false,
- "READY=1\n"
- "STATUS=Processing...");
+ }
- r = manager_listen(manager);
+ r = manager_new(&manager, fd_ctrl, fd_uevent, cgroup);
+ if (r < 0) {
+ r = log_error_errno(r, "failed to allocate manager object: %m");
+ goto exit;
+ }
+
+ r = udev_rules_apply_static_dev_perms(manager->rules);
if (r < 0)
- return log_error_errno(r, "failed to set up fds and listen for events: %m");
+ log_error_errno(r, "failed to apply permissions on static device nodes: %m");
+
+ (void) sd_notify(false,
+ "READY=1\n"
+ "STATUS=Processing...");
r = sd_event_loop(manager->event);
if (r < 0) {
diff --git a/test/README.testsuite b/test/README.testsuite
index 2ae85a2ce1..5c7aca43a8 100644
--- a/test/README.testsuite
+++ b/test/README.testsuite
@@ -10,8 +10,6 @@ $ sudo make clean check
make[1]: Entering directory `/mnt/data/harald/git/systemd/test/TEST-01-BASIC'
Making all in .
Making all in po
-Making all in docs/libudev
-Making all in docs/gudev
TEST: Basic systemd setup [OK]
make[1]: Leaving directory `/mnt/data/harald/git/systemd/test/TEST-01-BASIC'
...
diff --git a/test/test-functions b/test/test-functions
index 901ff48605..8272e52e17 100644
--- a/test/test-functions
+++ b/test/test-functions
@@ -125,7 +125,7 @@ install_systemd() {
# install compiled files
(cd $TEST_BASE_DIR/..; set -x; make DESTDIR=$initdir install)
# remove unneeded documentation
- rm -fr $initdir/usr/share/{man,doc,gtk-doc}
+ rm -fr $initdir/usr/share/{man,doc}
# we strip binaries since debug symbols increase binaries size a lot
# and it could fill the available space
strip_binaries