X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Flogin%2Fsysfs-show.c;h=e9ca4bb03d0d15cdb0c02a14eeeffedd6d1087af;hp=939bd6125e21f23a1d6598d0bc7d990daed78426;hb=48a439f2dac67302f3e7d1ccb21bd93e919efd02;hpb=ddae67fa1bdd86b480a60ad6fc1d90d6f35a03d0 diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c index 939bd6125..e9ca4bb03 100644 --- a/src/login/sysfs-show.c +++ b/src/login/sysfs-show.c @@ -21,12 +21,17 @@ #include #include -#include -#include "util.h" -#include "sysfs-show.h" +#include "libudev.h" + +#include "alloc-util.h" +#include "locale-util.h" #include "path-util.h" +#include "string-util.h" +#include "sysfs-show.h" +#include "terminal-util.h" #include "udev-util.h" +#include "util.h" static int show_sysfs_one( struct udev *udev, @@ -113,7 +118,7 @@ static int show_sysfs_one( "%s%s:%s%s%s%s", is_master ? "[MASTER] " : "", subsystem, sysname, - name ? " \"" : "", name ? name : "", name ? "\"" : "") < 0) + name ? " \"" : "", strempty(name), name ? "\"" : "") < 0) return -ENOMEM; free(k); @@ -121,13 +126,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;