From c9b88f04044e856bff6434775da31cb13dfb9836 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 6 Mar 2019 05:40:32 -0800 Subject: [PATCH] fusee: dynamically read NAND num_sectors (thanks @shchmue!) --- fusee/fusee-secondary/src/nxfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fusee/fusee-secondary/src/nxfs.c b/fusee/fusee-secondary/src/nxfs.c index e7e72306c..966bf71b1 100644 --- a/fusee/fusee-secondary/src/nxfs.c +++ b/fusee/fusee-secondary/src/nxfs.c @@ -316,7 +316,7 @@ int nxfs_mount_all(void) { model = g_mmc_devpart_template; model.device_struct = &g_emmc_user_mmcpart; model.start_sector = 0; - model.num_sectors = (32ull << 30) / model.sector_size; + model.num_sectors = g_emmc_user_mmcpart.device->ext_csd.sectors; rc = rawdev_mount_device("rawnand", &model, false);