summaryrefslogtreecommitdiff
path: root/src/login
diff options
context:
space:
mode:
authorMichal Schmidt <mschmidt@redhat.com>2012-11-12 22:27:48 +0100
committerMichal Schmidt <mschmidt@redhat.com>2012-11-12 22:27:48 +0100
commit45a5ff0de744bc73a0695e61f749ee983ef97b64 (patch)
tree43a5c000f1aaf347bd9304d3e6ba3b06b2934103 /src/login
parenta9cdc94f7ff40f22a3cf9472f612a80730a1b010 (diff)
util: nicer tree drawings
Draw trees more similar to pstree/findmnt/lsblk/...
Diffstat (limited to 'src/login')
-rw-r--r--src/login/sysfs-show.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c
index 172c75d82b..d113ec3e43 100644
--- a/src/login/sysfs-show.c
+++ b/src/login/sysfs-show.c
@@ -105,8 +105,8 @@ static int show_sysfs_one(
}
k = ellipsize(sysfs, n_columns, 20);
- printf("%s%s %s\n", prefix, draw_special_char(lookahead ? DRAW_BOX_VERT_AND_RIGHT : DRAW_BOX_UP_AND_RIGHT),
- 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,
@@ -118,8 +118,8 @@ static int show_sysfs_one(
}
k = ellipsize(l, n_columns, 70);
- printf("%s%s %s\n", prefix, lookahead ? draw_special_char(DRAW_BOX_VERT) : " ",
- k ? k : l);
+ printf("%s%s%s\n", prefix, lookahead ? draw_special_char(DRAW_TREE_VERT) : " ",
+ k ? k : l);
free(k);
free(l);
@@ -127,7 +127,7 @@ static int show_sysfs_one(
if (*item) {
char *p;
- p = strjoin(prefix, lookahead ? draw_special_char(DRAW_BOX_VERT) : " ", " ", NULL);
+ 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);
}