chiark / gitweb /
dbus-common: Add helper method to handle no-reply messages
[elogind.git] / src / login / sysfs-show.c
index b0edc33b8031c418d0b8e6a7dc599d45b1052231..d113ec3e4394414fe9ff99d2eff89bf866c0c0b7 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "util.h"
 #include "sysfs-show.h"
+#include "path-util.h"
 
 static int show_sysfs_one(
                 struct udev *udev,
@@ -104,7 +105,8 @@ static int show_sysfs_one(
                 }
 
                 k = ellipsize(sysfs, n_columns, 20);
-                printf("%s%s %s\n", prefix, lookahead ? "\342\224\234" : "\342\224\224", k ? k : sysfs);
+                printf("%s%s%s\n", prefix, draw_special_char(lookahead ? DRAW_TREE_BRANCH : DRAW_TREE_RIGHT),
+                                   k ? k : sysfs);
                 free(k);
 
                 if (asprintf(&l,
@@ -116,7 +118,8 @@ static int show_sysfs_one(
                 }
 
                 k = ellipsize(l, n_columns, 70);
-                printf("%s%s %s\n", prefix, lookahead ? "\342\224\202" : " ", k ? k : l);
+                printf("%s%s%s\n", prefix, lookahead ? draw_special_char(DRAW_TREE_VERT) : "  ",
+                                   k ? k : l);
                 free(k);
                 free(l);
 
@@ -124,7 +127,7 @@ static int show_sysfs_one(
                 if (*item) {
                         char *p;
 
-                        p = strappend(prefix, lookahead ? "\342\224\202 " : "  ");
+                        p = strappend(prefix, lookahead ? draw_special_char(DRAW_TREE_VERT) : "  ");
                         show_sysfs_one(udev, seat, item, sysfs, p ? p : prefix, n_columns - 2);
                         free(p);
                 }