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