[lib][ptable] add a function to grab the device the current ptable has scanned

This commit is contained in:
Travis Geiselbrecht
2015-01-20 15:57:14 -08:00
parent d544af0557
commit 2d2aeb64c5
2 changed files with 6 additions and 0 deletions

View File

@@ -30,6 +30,7 @@
status_t ptable_scan(bdev_t *bdev, uint64_t offset);
bool ptable_found_valid(void);
bdev_t *ptable_get_device(void);
#define MAX_FLASH_PTABLE_NAME_LEN 12

View File

@@ -286,6 +286,11 @@ bool ptable_found_valid(void)
return ptable.valid;
}
bdev_t *ptable_get_device(void)
{
return ptable.bdev;
}
status_t ptable_find(const char *name, struct ptable_entry *_entry)
{
if (!ptable.valid)