From 4d86c235b84a62dde6dfe99a78cabc5cd9bb369c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 26 Apr 2018 10:05:33 +0200 Subject: [PATCH] core: include Found state in device dumps In particular, this confirms that the Found state needs to remain a bit-field: $ systemd-analyze dump |grep 'Found: '|sort |uniq -c 105 Found: found-udev 3 Found: found-udev,found-mount 1 Found: found-udev,found-swap --- src/core/device.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/core/device.c b/src/core/device.c index 294e79f9b58..565410fd361 100644 --- a/src/core/device.c +++ b/src/core/device.c @@ -273,14 +273,19 @@ static int device_deserialize_item(Unit *u, const char *key, const char *value, static void device_dump(Unit *u, FILE *f, const char *prefix) { Device *d = DEVICE(u); + _cleanup_free_ char *s = NULL; assert(d); + (void) device_found_to_string_many(d->found, &s); + fprintf(f, "%sDevice State: %s\n" - "%sSysfs Path: %s\n", + "%sSysfs Path: %s\n" + "%sFound: %s\n", prefix, device_state_to_string(d->state), - prefix, strna(d->sysfs)); + prefix, strna(d->sysfs), + prefix, strna(s)); } _pure_ static UnitActiveState device_active_state(Unit *u) { -- 2.47.3