diff mbox series

[1/6] fs: update fs_dev_part in fs_set_blk_dev_with_part()

Message ID 20181017073207.13150-2-takahiro.akashi@linaro.org
State Accepted
Commit b0c78d8ffc9fe8b0388353d72e9f2b9e9c6107c6
Headers show
Series efi: make efi and bootmgr more usable | expand

Commit Message

AKASHI Takahiro Oct. 17, 2018, 7:32 a.m. UTC
As in the case of fs_set_blk_dev(), fs_set_blk_dev_with_part() should
maintain and update fs_dev_part whenever called.

Without this patch, a problem will come up when an efi binary associated
with efi's BOOTxxxx variable is invoked via "bootefi bootmgr".

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
---
 fs/fs.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/fs/fs.c b/fs/fs.c
index adae98d021ee..cb265174e2f2 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -365,6 +365,7 @@  int fs_set_blk_dev_with_part(struct blk_desc *desc, int part)
 	for (i = 0, info = fstypes; i < ARRAY_SIZE(fstypes); i++, info++) {
 		if (!info->probe(fs_dev_desc, &fs_partition)) {
 			fs_type = info->fstype;
+			fs_dev_part = part;
 			return 0;
 		}
 	}