diff options
author | Tom Rini <trini@konsulko.com> | 2018-12-27 07:50:24 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-12-27 07:50:24 -0500 |
commit | b47b3810379aaf6d336151acda66c2a29fc8b657 (patch) | |
tree | 15364a84e350a1a71ead52ead1b313a6dad2a3a5 /api/api_storage.c | |
parent | 562a63e86bc7b308a328a7bbdf0db237855c39a8 (diff) | |
parent | e17e0ceb83538c015a50b965547f2f4d38f81c5d (diff) |
Merge branch '2018-12-26-master-imports'
- Misc TI platform fixes
- mt7629 fix for Linux compatible SMP support
- Other small regression fixes
Diffstat (limited to 'api/api_storage.c')
-rw-r--r-- | api/api_storage.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/api/api_storage.c b/api/api_storage.c index 8aeeda2715..2b90c18aae 100644 --- a/api/api_storage.c +++ b/api/api_storage.c @@ -99,6 +99,7 @@ static int dev_stor_get(int type, int *more, struct device_info *di) { struct blk_desc *dd; int found = 0; + int found_last = 0; int i = 0; /* Wasn't configured for this type, return 0 directly */ @@ -111,9 +112,13 @@ static int dev_stor_get(int type, int *more, struct device_info *di) if (di->cookie == (void *)blk_get_dev(specs[type].name, i)) { i += 1; + found_last = 1; break; } } + + if (!found_last) + i = 0; } for (; i < specs[type].max_dev; i++) { |