diff options
author | Lennart Poettering <lennart@poettering.net> | 2016-06-14 23:41:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-14 23:41:00 +0200 |
commit | 8dd57192bcee3c23625247ac8f11ef2043fcb36b (patch) | |
tree | c5037bdf6c630e81f1d65f2edae038ffcf5a68b5 /src | |
parent | 1d7100298c2a696d99f6fbd6ab858762aeb51ac7 (diff) | |
parent | bd8420c5186de99ac6684d47a30743a29a1b4dd6 (diff) |
Merge pull request #3539 from keszybz/udevadm-man-fix
Udevadm man fix
Diffstat (limited to 'src')
-rw-r--r-- | src/udev/udevadm-info.c | 12 |
1 files changed, 4 insertions, 8 deletions
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; |