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=cb5bb5e5f7e63374e1caab40f3ff63a2fbacedcd;hp=f38f06baf9dec578b42dbd298f52e7dd91c23f0d;hb=6b1c5e6d152a584896d71a3d9ad4d3f417050045;hpb=d2338db3145922b1dfcb3b458e5bce2568a9347a diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c index f38f06baf..cb5bb5e5f 100644 --- a/src/login/sysfs-show.c +++ b/src/login/sysfs-show.c @@ -1,5 +1,3 @@ -/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ - /*** This file is part of systemd. @@ -21,13 +19,21 @@ #include #include + +#if 0 /// elogind needs the systems udev header +#include "libudev.h" +#else #include +#endif // 0 -#include "util.h" -#include "sysfs-show.h" +#include "alloc-util.h" +#include "locale-util.h" #include "path-util.h" -#include "udev-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, @@ -108,7 +114,7 @@ static int show_sysfs_one( if (!k) return -ENOMEM; - printf("%s%s%s\n", prefix, draw_special_char(lookahead ? DRAW_TREE_BRANCH : DRAW_TREE_RIGHT), k); + printf("%s%s%s\n", prefix, special_glyph(lookahead ? TREE_BRANCH : TREE_RIGHT), k); if (asprintf(&l, "%s%s:%s%s%s%s", @@ -122,13 +128,13 @@ static int show_sysfs_one( if (!k) return -ENOMEM; - printf("%s%s%s\n", prefix, lookahead ? draw_special_char(DRAW_TREE_VERTICAL) : " ", k); + printf("%s%s%s\n", prefix, lookahead ? special_glyph(TREE_VERTICAL) : " ", k); *item = next; if (*item) { _cleanup_free_ char *p = NULL; - p = strappend(prefix, lookahead ? draw_special_char(DRAW_TREE_VERTICAL) : " "); + p = strappend(prefix, lookahead ? special_glyph(TREE_VERTICAL) : " "); if (!p) return -ENOMEM; @@ -181,7 +187,7 @@ int show_sysfs(const char *seat, const char *prefix, unsigned n_columns) { 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)"); + printf("%s%s%s\n", prefix, special_glyph(TREE_RIGHT), "(none)"); return r; }