summaryrefslogtreecommitdiff
path: root/src/device/device_util.c
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-11-01 11:33:00 +0100
committerPatrick Georgi <pgeorgi@google.com>2017-11-07 12:32:13 +0000
commit6a8118405821815017d780d953260bc48eb90e6d (patch)
treef477247f6351169e3606981908671868b0caffce /src/device/device_util.c
parent12217f2878990ef7f754596eda687b1e50166e24 (diff)
device/device_util: Add string for DEVICE_PATH_NONE
Add string for DEVICE_PATH_NONE in dev_path. The enum DEVICE_PATH_NONE can be translated to string and shouldn't be translated by "Unknown device path type: 0". Makes console output a lot prettier and readable. Note: DEVICE_PATH_NONE is used on dummy devices for hotpluggable slots. Change-Id: I08d471d8217f966e80daefe2d9971e357defde62 Signed-off-by: Patrick Rudolph <siro@das-labor.org> Reviewed-on: https://review.coreboot.org/22272 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/device/device_util.c')
-rw-r--r--src/device/device_util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c
index 762f0e76ff..03ba43dc4d 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -274,6 +274,9 @@ const char *dev_path(device_t dev)
memcpy(buffer, "<null>", 7);
} else {
switch(dev->path.type) {
+ case DEVICE_PATH_NONE:
+ memcpy(buffer, "NONE", 5);
+ break;
case DEVICE_PATH_ROOT:
memcpy(buffer, "Root Device", 12);
break;