diff options
author | Stephen Warren <swarren@nvidia.com> | 2012-09-21 09:50:56 (GMT) |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-09-25 21:49:33 (GMT) |
commit | 2023e60861283ee808950a558e14b45be8776bf4 (patch) | |
tree | a8ddbbf0fdfd51fb59f26f460626eaa44d584a05 /include/part.h | |
parent | 650f36641ccfe1c2444277891da7c76cdde99f8b (diff) | |
download | u-boot-2023e60861283ee808950a558e14b45be8776bf4.tar.xz |
disk: introduce get_device()
This patch introduces function get_device(). This looks up a
block_dev_desc_t from an interface name (e.g. mmc) and device number
(e.g. 0). This function is essentially the non-partition-specific
prefix of get_device_and_partition().
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'include/part.h')
-rw-r--r-- | include/part.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/part.h b/include/part.h index a6d06f3..144df4e 100644 --- a/include/part.h +++ b/include/part.h @@ -112,6 +112,8 @@ int get_partition_info (block_dev_desc_t * dev_desc, int part, disk_partition_t void print_part (block_dev_desc_t *dev_desc); void init_part (block_dev_desc_t *dev_desc); void dev_print(block_dev_desc_t *dev_desc); +int get_device(const char *ifname, const char *dev_str, + block_dev_desc_t **dev_desc); int get_device_and_partition(const char *ifname, const char *dev_str, block_dev_desc_t **dev_desc, disk_partition_t *info); @@ -131,6 +133,9 @@ static inline int get_partition_info (block_dev_desc_t * dev_desc, int part, static inline void print_part (block_dev_desc_t *dev_desc) {} static inline void init_part (block_dev_desc_t *dev_desc) {} static inline void dev_print(block_dev_desc_t *dev_desc) {} +static inline int get_device(const char *ifname, const char *dev_str, + block_dev_desc_t **dev_desc) +{ return -1; } static inline int get_device_and_partition(const char *ifname, const char *dev_str, block_dev_desc_t **dev_desc, |