summaryrefslogtreecommitdiff
path: root/include/blk.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-07-29 11:34:53 -0600
committerJaehoon Chung <jh80.chung@samsung.com>2017-08-17 16:44:16 +0900
commit6faa4ed74df2d83cbb959ba799032da4249893b6 (patch)
treea79d028afa2b58447d49c6e70497530e0138779a /include/blk.h
parent745fb9c25e9fd4c59e375cf8f6e2eb8ff75d6d95 (diff)
dm: blk: Add a function to find an interface-type name
Add a function to find the name of an interface type (e.g. "sata", "scsi") from the interface type enum. This is useful for generic code (not specific to SATA or SCSI, for example) that wants to display the type of interface it is dealing with. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/blk.h')
-rw-r--r--include/blk.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/blk.h b/include/blk.h
index 61b56281b3..8672e32fe1 100644
--- a/include/blk.h
+++ b/include/blk.h
@@ -624,4 +624,12 @@ ulong blk_write_devnum(enum if_type if_type, int devnum, lbaint_t start,
*/
int blk_select_hwpart_devnum(enum if_type if_type, int devnum, int hwpart);
+/**
+ * blk_get_if_type_name() - Get the name of an interface type
+ *
+ * @if_type: Interface type to check
+ * @return name of interface, or NULL if none
+ */
+const char *blk_get_if_type_name(enum if_type if_type);
+
#endif