storage: rename MAX_LOG_SECTOR_SIZE to MAX_VIRT_SECTOR_SIZE

Change-Id: I34f00748c1b0935d65af5f0fc6bdd13356ff31e1
This commit is contained in:
Solomon Peachy 2024-11-07 17:15:28 -05:00
parent 7ecab006c0
commit bc6c189dcb
15 changed files with 38 additions and 38 deletions

View file

@ -22,10 +22,10 @@
#ifdef MAX_PHYS_SECTOR_SIZE
#ifdef MAX_LOG_SECTOR_SIZE
#define __MAX_LOG_SECTOR_SIZE MAX_LOG_SECTOR_SIZE
#ifdef MAX_VIRT_SECTOR_SIZE
#define __MAX_VIRT_SECTOR_SIZE MAX_VIRT_SECTOR_SIZE
#else
#define __MAX_LOG_SECTOR_SIZE SECTOR_SIZE
#define __MAX_VIRT_SECTOR_SIZE SECTOR_SIZE
#endif
struct sector_cache_entry {
@ -226,7 +226,7 @@ static int ata_get_phys_sector_mult(void)
sector 1 then assume the drive supports "512e" and will handle
it better than us, so ignore the large physical sectors.
*/
char throwaway[__MAX_LOG_SECTOR_SIZE];
char throwaway[__MAX_VIRT_SECTOR_SIZE];
rc = ata_transfer_sectors(1, 1, &throwaway, false);
if (rc == 0)
phys_sector_mult = 1;

View file

@ -163,7 +163,7 @@ union raw_dirent
#define FAT_NTRES_LC_NAME 0x08
#define FAT_NTRES_LC_EXT 0x10
#ifdef MAX_LOG_SECTOR_SIZE
#ifdef MAX_VIRT_SECTOR_SIZE
#define LOG_SECTOR_SIZE(bpb) fat_bpb->sector_size
#else
#define LOG_SECTOR_SIZE(bpb) SECTOR_SIZE
@ -272,14 +272,14 @@ static struct bpb
int BPB_FN_DECL(update_fat_entry, unsigned long, unsigned long);
void BPB_FN_DECL(fat_recalc_free_internal);
#endif /* HAVE_FAT16SUPPORT */
#ifdef MAX_LOG_SECTOR_SIZE
#ifdef MAX_VIRT_SECTOR_SIZE
uint16_t sector_size;
#endif
} fat_bpbs[NUM_VOLUMES]; /* mounted partition info */
#ifdef STORAGE_NEEDS_BOUNCE_BUFFER
#ifdef MAX_LOG_SECTOR_SIZE
#define BOUNCE_SECTOR_SIZE MAX_LOG_SECTOR_SIZE
#ifdef MAX_VIRT_SECTOR_SIZE
#define BOUNCE_SECTOR_SIZE MAX_VIRT_SECTOR_SIZE
#else
#define BOUNCE_SECTOR_SIZE SECTOR_SIZE
#endif
@ -1999,7 +1999,7 @@ static int free_cluster_chain(struct bpb *fat_bpb, long startcluster)
int fat_file_sector_size(const struct fat_file *file)
{
#ifdef MAX_LOG_SECTOR_SIZE
#ifdef MAX_VIRT_SECTOR_SIZE
const struct bpb *fat_bpb = FAT_BPB(file->volume);
#endif
@ -2769,7 +2769,7 @@ int fat_readdir(struct fat_filestr *dirstr, struct fat_dirscan_info *scan,
scan->entries = 0;
#ifdef MAX_LOG_SECTOR_SIZE
#ifdef MAX_VIRT_SECTOR_SIZE
struct fat_file *file = dirstr->fatfilep;
const struct bpb *fat_bpb = FAT_BPB(file->volume);
#endif
@ -2917,7 +2917,7 @@ int fat_mount(IF_MV(int volume,) IF_MD(int drive,) unsigned long startsector)
fat_bpb->drive = drive;
#endif
#ifdef MAX_LOG_SECTOR_SIZE
#ifdef MAX_VIRT_SECTOR_SIZE
fat_bpb->sector_size = disk_get_log_sector_size(IF_MD(drive));
#endif
@ -2959,7 +2959,7 @@ int fat_unmount(IF_MV_NONVOID(int volume))
/** Debug screen stuff **/
#ifdef MAX_LOG_SECTOR_SIZE
#ifdef MAX_VIRT_SECTOR_SIZE
/* This isn't necessarily the same as storage's logical sector size;
we can have situations where the filesystem (and partition table)
uses a larger "virtual sector" than the underlying storage device */
@ -2973,7 +2973,7 @@ int fat_get_bytes_per_sector(IF_MV_NONVOID(int volume))
return bytes;
}
#endif /* MAX_LOG_SECTOR_SIZE */
#endif /* MAX_VIRT_SECTOR_SIZE */
unsigned int fat_get_cluster_size(IF_MV_NONVOID(int volume))
{