move boot_storage.h/.c to bdk/storage, check result of ensure_partition

This commit is contained in:
Christoph Baumann committed 2025-04-22 14:25:14 +02:00
1 parent fe5e4dc40a
commit 4e9e21b3b1
6 files changed
+11 -5

No files matched your search

File renamed without changes.
File renamed without changes.
+1 -1
View File
@@ -28,7 +28,7 @@
#include "../frontend/fe_tools.h"
#include "../config.h"
#include "../storage/emummc.h"
#include "../storage/boot_storage.h"
#include <storage/boot_storage.h>
extern hekate_config h_cfg;
+1 -1
View File
@@ -25,7 +25,7 @@
#include "../hos/pkg1.h"
#include "l4t.h"
#include "l4t_config.inl"
#include "../storage/boot_storage.h"
#include <storage/boot_storage.h>
/*
* API Revision info
+8 -2
View File
@@ -69,6 +69,10 @@ DRESULT disk_read (
UINT count /* Number of sectors to read */
)
{
if(!ensure_partition(pdrv)){
return RES_ERROR;
}
sdmmc_storage_t *storage = &sd_storage;
u32 actual_sector = sector;
switch(pdrv){
@@ -87,7 +91,6 @@ DRESULT disk_read (
}
ensure_partition(pdrv);
return sdmmc_storage_read(storage, actual_sector, count, buff) ? RES_OK : RES_ERROR;
}
@@ -102,6 +105,10 @@ DRESULT disk_write (
UINT count /* Number of sectors to write */
)
{
if(!ensure_partition(pdrv)){
return RES_ERROR;
}
sdmmc_storage_t *storage = &sd_storage;
u32 actual_sector = sector;
switch(pdrv){
@@ -120,7 +127,6 @@ DRESULT disk_write (
}
ensure_partition(pdrv);
return sdmmc_storage_write(storage, actual_sector, count, (void*)buff) ? RES_OK : RES_ERROR;
}
+1 -1
View File
@@ -31,7 +31,7 @@
#include <libs/compr/blz.h>
#include <libs/fatfs/ff.h>
#include "storage/emummc.h"
#include "storage/boot_storage.h"
#include <storage/boot_storage.h>
#include "frontend/fe_tools.h"
#include "frontend/fe_info.h"