ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
Blob Blame History Raw
From 63c96665d60fd219410eb213b2e2fd83ef242616 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 18 Dec 2013 17:16:33 +0100
Subject: [PATCH] loginctl: when showing device tree of seats with no devices
 show something useful

---
 src/login/sysfs-show.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c
index 3c03bd1..14de7d8 100644
--- a/src/login/sysfs-show.c
+++ b/src/login/sysfs-show.c
@@ -182,6 +182,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)");
 
 finish:
         if (e)