aboutsummaryrefslogtreecommitdiff
path: root/include/part.h
diff options
context:
space:
mode:
authorSean Anderson <sean.anderson@seco.com>2021-04-12 18:53:05 -0400
committerTom Rini <trini@konsulko.com>2021-04-22 14:09:45 -0400
commit7194527b6a456abaa24198dc4b6c289905c4cffd (patch)
tree62f82f28a3807a864676356f7da6d030b9e9cdf5 /include/part.h
parentfe3a2808bb5f86c738d47a4158117e32c349db0d (diff)
downloadu-boot-7194527b6a456abaa24198dc4b6c289905c4cffd.zip
u-boot-7194527b6a456abaa24198dc4b6c289905c4cffd.tar.gz
u-boot-7194527b6a456abaa24198dc4b6c289905c4cffd.tar.bz2
cmd: fs: Use part_get_info_by_dev_and_name_or_num to parse partitions
This allows using dev#partlabel syntax. Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Diffstat (limited to 'include/part.h')
-rw-r--r--include/part.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/part.h b/include/part.h
index 7f78271..419c859 100644
--- a/include/part.h
+++ b/include/part.h
@@ -230,7 +230,7 @@ int part_get_info_by_name(struct blk_desc *dev_desc,
* @param[in] allow_whole_dev true to allow the user to select partition 0
* (which means the whole device), false to require a valid
* partition number >= 1
- * @return 0 on success, or a negative on error
+ * @return the partition number on success, or negative errno on error
*/
int part_get_info_by_dev_and_name_or_num(const char *dev_iface,
const char *dev_part_str,
@@ -275,6 +275,16 @@ static inline int blk_get_device_part_str(const char *ifname,
struct disk_partition *info,
int allow_whole_dev)
{ *dev_desc = NULL; return -1; }
+static inline int
+part_get_info_by_dev_and_name_or_num(const char *dev_iface,
+ const char *dev_part_str,
+ struct blk_desc **dev_desc,
+ struct disk_partition *part_info,
+ int allow_whole_dev)
+{
+ *dev_desc = NULL;
+ return -ENOSYS;
+}
#endif
/*