Patrick Rudolph has uploaded this change for review.

View Change

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 should not
be translated by "Unknown device path type: 0".

Makes console output a lot prettier and readable.

Note: DEVICE_PATH_NONE is used as dummy devices for hotplugable slots.

Change-Id: I08d471d8217f966e80daefe2d9971e357defde62
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
---
M src/device/device_util.c
1 file changed, 3 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/22272/1
diff --git a/src/device/device_util.c b/src/device/device_util.c
index 762f0e7..03ba43d 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -274,6 +274,9 @@
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;

To view, visit change 22272. To unsubscribe, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I08d471d8217f966e80daefe2d9971e357defde62
Gerrit-Change-Number: 22272
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro@das-labor.org>