X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Flogin%2Fsysfs-show.c;h=9a9fb7622d1732abb69576101105da5328fd02e4;hb=edda707302d7c5138291c0ff4e9c43db9fba51d8;hp=3286411de88b7637ad24d5dac4c45e7da53e0321;hpb=06acf2d46a38bec212d78094e6ef8b100679048a;p=elogind.git diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c index 3286411de..9a9fb7622 100644 --- a/src/login/sysfs-show.c +++ b/src/login/sysfs-show.c @@ -27,6 +27,7 @@ #include "sysfs-show.h" #include "path-util.h" #include "udev-util.h" +#include "terminal-util.h" static int show_sysfs_one( struct udev *udev, @@ -121,13 +122,13 @@ static int show_sysfs_one( if (!k) return -ENOMEM; - printf("%s%s%s\n", prefix, lookahead ? draw_special_char(DRAW_TREE_VERT) : " ", k); + printf("%s%s%s\n", prefix, lookahead ? draw_special_char(DRAW_TREE_VERTICAL) : " ", k); *item = next; if (*item) { _cleanup_free_ char *p = NULL; - p = strappend(prefix, lookahead ? draw_special_char(DRAW_TREE_VERT) : " "); + p = strappend(prefix, lookahead ? draw_special_char(DRAW_TREE_VERTICAL) : " "); if (!p) return -ENOMEM; @@ -179,6 +180,8 @@ int show_sysfs(const char *seat, const char *prefix, unsigned n_columns) { first = udev_enumerate_get_list_entry(e); if (first) show_sysfs_one(udev, seat, &first, "/", prefix, n_columns); + else + printf("%s%s%s\n", prefix, draw_special_char(DRAW_TREE_RIGHT), "(none)"); return r; }