richardphibel / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
9fc0f6
From 63c96665d60fd219410eb213b2e2fd83ef242616 Mon Sep 17 00:00:00 2001
9fc0f6
From: Lennart Poettering <lennart@poettering.net>
9fc0f6
Date: Wed, 18 Dec 2013 17:16:33 +0100
9fc0f6
Subject: [PATCH] loginctl: when showing device tree of seats with no devices
9fc0f6
 show something useful
9fc0f6
9fc0f6
---
9fc0f6
 src/login/sysfs-show.c | 2 ++
9fc0f6
 1 file changed, 2 insertions(+)
9fc0f6
9fc0f6
diff --git a/src/login/sysfs-show.c b/src/login/sysfs-show.c
9fc0f6
index 3c03bd1..14de7d8 100644
9fc0f6
--- a/src/login/sysfs-show.c
9fc0f6
+++ b/src/login/sysfs-show.c
9fc0f6
@@ -182,6 +182,8 @@ int show_sysfs(const char *seat, const char *prefix, unsigned n_columns) {
9fc0f6
         first = udev_enumerate_get_list_entry(e);
9fc0f6
         if (first)
9fc0f6
                 show_sysfs_one(udev, seat, &first, "/", prefix, n_columns);
9fc0f6
+        else
9fc0f6
+                printf("%s%s%s\n", prefix, draw_special_char(DRAW_TREE_RIGHT), "(none)");
9fc0f6
 
9fc0f6
 finish:
9fc0f6
         if (e)