summaryrefslogtreecommitdiff
path: root/src/device/device_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device/device_util.c')
-rw-r--r--src/device/device_util.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/device/device_util.c b/src/device/device_util.c
index ac18538a1b..837dfb593f 100644
--- a/src/device/device_util.c
+++ b/src/device/device_util.c
@@ -921,3 +921,15 @@ int dev_count_cpu(void)
return count;
}
+
+/* Get device path name */
+const char *dev_path_name(enum device_path_type type)
+{
+ static const char *const type_names[] = DEVICE_PATH_NAMES;
+ const char *type_name = "Unknown";
+
+ /* Translate the type value into a string */
+ if (type < ARRAY_SIZE(type_names))
+ type_name = type_names[type];
+ return type_name;
+}