summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2007-09-20 15:24:42 +0200
committerKay Sievers <kay.sievers@vrfy.org>2007-09-20 15:24:42 +0200
commitc952356635a30f610a4d1b84e84d678fee7772c8 (patch)
tree6d13f46d695c85526370ee4db501396121a4226b
parent3a58ef80dfbc08fd8722af5408a26abe12fe053c (diff)
remove extra space from udevinfo symlink output
-rw-r--r--udevinfo.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/udevinfo.c b/udevinfo.c
index be9aa769e1..8e54705fe3 100644
--- a/udevinfo.c
+++ b/udevinfo.c
@@ -389,10 +389,16 @@ int main(int argc, char *argv[], char *envp[])
goto exit;
if (root)
list_for_each_entry(name_loop, &udev->symlink_list, node)
- printf("%s/%s ", udev_root, name_loop->name);
+ if (name_loop->node.next != &udev->symlink_list)
+ printf("%s/%s ", udev_root, name_loop->name);
+ else
+ printf("%s/%s", udev_root, name_loop->name);
else
list_for_each_entry(name_loop, &udev->symlink_list, node)
- printf("%s ", name_loop->name);
+ if (name_loop->node.next != &udev->symlink_list)
+ printf("%s ", name_loop->name);
+ else
+ printf("%s", name_loop->name);
printf("\n");
break;
case QUERY_PATH: