summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-06-14 23:41:00 +0200
committerGitHub <noreply@github.com>2016-06-14 23:41:00 +0200
commit8dd57192bcee3c23625247ac8f11ef2043fcb36b (patch)
treec5037bdf6c630e81f1d65f2edae038ffcf5a68b5
parent1d7100298c2a696d99f6fbd6ab858762aeb51ac7 (diff)
parentbd8420c5186de99ac6684d47a30743a29a1b4dd6 (diff)
Merge pull request #3539 from keszybz/udevadm-man-fix
Udevadm man fix
-rw-r--r--man/udevadm.xml2
-rw-r--r--src/udev/udevadm-info.c12
2 files changed, 5 insertions, 9 deletions
diff --git a/man/udevadm.xml b/man/udevadm.xml
index 8c1abd2770..1c7921f5bd 100644
--- a/man/udevadm.xml
+++ b/man/udevadm.xml
@@ -380,7 +380,7 @@
<para>Modify the internal state of the running udev daemon.</para>
<variablelist>
<varlistentry>
- <term><option>-x</option></term>
+ <term><option>-e</option></term>
<term><option>--exit</option></term>
<listitem>
<para>Signal and wait for systemd-udevd to exit.</para>
diff --git a/src/udev/udevadm-info.c b/src/udev/udevadm-info.c
index 66b51c1209..6753c52005 100644
--- a/src/udev/udevadm-info.c
+++ b/src/udev/udevadm-info.c
@@ -433,17 +433,13 @@ static int uinfo(struct udev *udev, int argc, char *argv[]) {
case QUERY_PROPERTY:
list_entry = udev_device_get_properties_list_entry(device);
while (list_entry != NULL) {
- if (export) {
- const char *prefix = export_prefix;
-
- if (prefix == NULL)
- prefix = "";
- printf("%s%s='%s'\n", prefix,
+ if (export)
+ printf("%s%s='%s'\n", strempty(export_prefix),
udev_list_entry_get_name(list_entry),
udev_list_entry_get_value(list_entry));
- } else {
+ else
printf("%s=%s\n", udev_list_entry_get_name(list_entry), udev_list_entry_get_value(list_entry));
- }
+
list_entry = udev_list_entry_get_next(list_entry);
}
break;