summaryrefslogtreecommitdiff
path: root/src/libudev
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2016-09-14 18:33:57 -0400
committerLuke Shumaker <lukeshu@sbcglobal.net>2016-09-14 18:33:57 -0400
commit3c72c8d3ee67388336aca58c5afa3fb93a9c24c0 (patch)
treed072df7fee0f5906fad88c08398b2fe887cbc064 /src/libudev
parente51613a3291342c6006edda8783755fb8994fd75 (diff)
parent6ba6ca19507add38549e07058c57489a8cd98cd1 (diff)
Merge branch 'notsystemd/postmove' into notsystemd/master
# Conflicts: # src/grp-journal/systemd-journald/Makefile # src/grp-login/systemd-logind/Makefile # src/grp-machine/grp-import/systemd-export/Makefile # src/grp-machine/grp-import/systemd-import/Makefile # src/grp-machine/grp-import/systemd-pull/Makefile # src/grp-machine/systemd-machined/Makefile # src/grp-network/libnetworkd-core/Makefile # src/grp-resolve/libbasic-dns/Makefile # src/grp-resolve/systemd-resolved/Makefile # src/grp-utils/systemd-path/Makefile # src/libshared/src/Makefile # src/libsystemd-network/include/systemd-network/sd-ndisc.h # src/libsystemd/Makefile # src/libsystemd/src/test.mk # src/libudev/Makefile # src/systemd-dbus1-generator/Makefile # src/systemd-nspawn/nspawn.c Signed-off-by: Luke Shumaker <lukeshu@sbcglobal.net>
Diffstat (limited to 'src/libudev')
-rw-r--r--src/libudev/Makefile6
-rw-r--r--src/libudev/libudev.xml2
-rw-r--r--src/libudev/src/libudev-device.c2
-rw-r--r--src/libudev/src/libudev-monitor.c14
-rw-r--r--src/libudev/udev_device_get_syspath.xml8
5 files changed, 17 insertions, 15 deletions
diff --git a/src/libudev/Makefile b/src/libudev/Makefile
index 0ca3d15841..8224a52d8b 100644
--- a/src/libudev/Makefile
+++ b/src/libudev/Makefile
@@ -24,7 +24,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk
include $(topsrcdir)/build-aux/Makefile.head.mk
LIBUDEV_CURRENT=7
-LIBUDEV_REVISION=4
+LIBUDEV_REVISION=5
LIBUDEV_AGE=6
include_HEADERS += \
@@ -38,7 +38,9 @@ libudev_la_LDFLAGS = \
-version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \
-Wl,--version-script=$(srcdir)/libudev.sym
-libudev_la_LIBADD += $(libudev-internal.DEPENDS)
+libudev_la_LIBADD = \
+ libsystemd-internal.la \
+ libbasic.la
pkgconfiglib_DATA += \
src/libudev/libudev.pc
diff --git a/src/libudev/libudev.xml b/src/libudev/libudev.xml
index 7ef978463c..53b68dcc89 100644
--- a/src/libudev/libudev.xml
+++ b/src/libudev/libudev.xml
@@ -81,7 +81,7 @@
<para>To introspect a local device on a system, a udev device
object can be created via
<citerefentry><refentrytitle>udev_device_new_from_syspath</refentrytitle><manvolnum>3</manvolnum></citerefentry>
- and friends. The device object allows to query current state,
+ and friends. The device object allows one to query current state,
read and write attributes and lookup properties of the device in
question.</para>
diff --git a/src/libudev/src/libudev-device.c b/src/libudev/src/libudev-device.c
index 2cb20aa557..a3a0d473a6 100644
--- a/src/libudev/src/libudev-device.c
+++ b/src/libudev/src/libudev-device.c
@@ -621,7 +621,7 @@ _public_ const char *udev_device_get_syspath(struct udev_device *udev_device)
*
* Get the kernel device name in /sys.
*
- * Returns: the name string of the device device
+ * Returns: the name string of the device
**/
_public_ const char *udev_device_get_sysname(struct udev_device *udev_device)
{
diff --git a/src/libudev/src/libudev-monitor.c b/src/libudev/src/libudev-monitor.c
index be8e280336..87ee3d2e1b 100644
--- a/src/libudev/src/libudev-monitor.c
+++ b/src/libudev/src/libudev-monitor.c
@@ -652,9 +652,9 @@ retry:
if (memcmp(buf.raw, "libudev", 8) == 0) {
/* udev message needs proper version magic */
- if (buf.nlh.magic != htonl(UDEV_MONITOR_MAGIC)) {
+ if (buf.nlh.magic != htobe32(UDEV_MONITOR_MAGIC)) {
log_debug("unrecognized message signature (%x != %x)",
- buf.nlh.magic, htonl(UDEV_MONITOR_MAGIC));
+ buf.nlh.magic, htobe32(UDEV_MONITOR_MAGIC));
return NULL;
}
if (buf.nlh.properties_off+32 > (size_t)buflen) {
@@ -717,7 +717,7 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor,
ssize_t blen, count;
struct udev_monitor_netlink_header nlh = {
.prefix = "libudev",
- .magic = htonl(UDEV_MONITOR_MAGIC),
+ .magic = htobe32(UDEV_MONITOR_MAGIC),
.header_size = sizeof nlh,
};
struct iovec iov[2] = {
@@ -738,19 +738,19 @@ int udev_monitor_send_device(struct udev_monitor *udev_monitor,
/* fill in versioned header */
val = udev_device_get_subsystem(udev_device);
- nlh.filter_subsystem_hash = htonl(util_string_hash32(val));
+ nlh.filter_subsystem_hash = htobe32(util_string_hash32(val));
val = udev_device_get_devtype(udev_device);
if (val != NULL)
- nlh.filter_devtype_hash = htonl(util_string_hash32(val));
+ nlh.filter_devtype_hash = htobe32(util_string_hash32(val));
/* add tag bloom filter */
tag_bloom_bits = 0;
udev_list_entry_foreach(list_entry, udev_device_get_tags_list_entry(udev_device))
tag_bloom_bits |= util_string_bloom64(udev_list_entry_get_name(list_entry));
if (tag_bloom_bits > 0) {
- nlh.filter_tag_bloom_hi = htonl(tag_bloom_bits >> 32);
- nlh.filter_tag_bloom_lo = htonl(tag_bloom_bits & 0xffffffff);
+ nlh.filter_tag_bloom_hi = htobe32(tag_bloom_bits >> 32);
+ nlh.filter_tag_bloom_lo = htobe32(tag_bloom_bits & 0xffffffff);
}
/* add properties list */
diff --git a/src/libudev/udev_device_get_syspath.xml b/src/libudev/udev_device_get_syspath.xml
index b54749ed56..014f43b21c 100644
--- a/src/libudev/udev_device_get_syspath.xml
+++ b/src/libudev/udev_device_get_syspath.xml
@@ -184,10 +184,10 @@
to such a parent device. On failure, <constant>NULL</constant>
is returned.</para>
- <para>On success, <function>udev_device_get_is_initialized()</function>
- returns either <constant>1</constant> or <constant>0</constant>,
- depending on whether the passed device is initialized or not. On
- failure, a negative error code is returned.</para>
+ <para>On success, <function>udev_device_get_is_initialized()</function> returns either <constant>1</constant> or
+ <constant>0</constant>, depending on whether the passed device has already been initialized by udev or not. On
+ failure, a negative error code is returned. Note that devices for which no udev rules are defined are never
+ reported initialized.</para>
</refsect1>
<refsect1>