]> err.no Git - systemd/commitdiff
remove extra space from udevinfo symlink output
authorHarald Hoyer <harald@redhat.com>
Thu, 20 Sep 2007 13:24:42 +0000 (15:24 +0200)
committerKay Sievers <kay.sievers@vrfy.org>
Thu, 20 Sep 2007 13:24:42 +0000 (15:24 +0200)
udevinfo.c

index be9aa769e10f46352039dbdb93e0d723d5dc89d6..8e54705fe36689adaad84c4f6de851d99120e3bc 100644 (file)
@@ -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: