daandemeyer / rpms / systemd

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