diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-10-31 21:51:22 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-10-31 21:51:42 -0400 |
commit | d401501fdad9a3c0299e1b8bdfadcb8a41c2eba5 (patch) | |
tree | 09cae818fda5638636247d5834ae08cd83c0f0a1 /firmware | |
parent | bf2a929f4ea34cf81c23478560203480a01a56c6 (diff) | |
download | rockbox-d401501fdad9a3c0299e1b8bdfadcb8a41c2eba5.tar.gz rockbox-d401501fdad9a3c0299e1b8bdfadcb8a41c2eba5.zip |
disk: Clean up identing (no funcitonal change)
Change-Id: I7a689132b155579ab3938231330f5bde7566809b
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/common/disk.c | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/firmware/common/disk.c b/firmware/common/disk.c index 576eede143..bef04037ad 100644 --- a/firmware/common/disk.c +++ b/firmware/common/disk.c | |||
@@ -331,19 +331,18 @@ int disk_mount(int drive) | |||
331 | disk_sector_multiplier[IF_MD_DRV(drive)] = 1; | 331 | disk_sector_multiplier[IF_MD_DRV(drive)] = 1; |
332 | #endif | 332 | #endif |
333 | 333 | ||
334 | /* try "superfloppy" mode */ | 334 | /* try "superfloppy" mode */ |
335 | DEBUGF("Trying to mount sector 0.\n"); | 335 | DEBUGF("Trying to mount sector 0.\n"); |
336 | 336 | ||
337 | if (!fat_mount(IF_MV(volume,) IF_MD(drive,) 0)) | 337 | if (!fat_mount(IF_MV(volume,) IF_MD(drive,) 0)) |
338 | { | 338 | { |
339 | #ifdef MAX_LOG_SECTOR_SIZE | 339 | #ifdef MAX_LOG_SECTOR_SIZE |
340 | disk_sector_multiplier[drive] = | 340 | disk_sector_multiplier[drive] = fat_get_bytes_per_sector(IF_MV(volume)) / SECTOR_SIZE; |
341 | fat_get_bytes_per_sector(IF_MV(volume)) / SECTOR_SIZE; | 341 | #endif |
342 | #endif | 342 | mounted = 1; |
343 | mounted = 1; | 343 | init_volume(&volumes[volume], drive, 0); |
344 | init_volume(&volumes[volume], drive, 0); | 344 | volume_onmount_internal(IF_MV(volume)); |
345 | volume_onmount_internal(IF_MV(volume)); | 345 | } |
346 | } | ||
347 | 346 | ||
348 | if (mounted == 0 && volume != -1) /* not a "superfloppy"? */ | 347 | if (mounted == 0 && volume != -1) /* not a "superfloppy"? */ |
349 | { | 348 | { |
@@ -356,7 +355,7 @@ int disk_mount(int drive) | |||
356 | 355 | ||
357 | DEBUGF("Trying to mount partition %d.\n", i); | 356 | DEBUGF("Trying to mount partition %d.\n", i); |
358 | 357 | ||
359 | #ifdef MAX_LOG_SECTOR_SIZE | 358 | #ifdef MAX_LOG_SECTOR_SIZE |
360 | for (int j = 1; j <= (MAX_LOG_SECTOR_SIZE/SECTOR_SIZE); j <<= 1) | 359 | for (int j = 1; j <= (MAX_LOG_SECTOR_SIZE/SECTOR_SIZE); j <<= 1) |
361 | { | 360 | { |
362 | if (!fat_mount(IF_MV(volume,) IF_MD(drive,) pinfo[i].start * j)) | 361 | if (!fat_mount(IF_MV(volume,) IF_MD(drive,) pinfo[i].start * j)) |
@@ -371,7 +370,7 @@ int disk_mount(int drive) | |||
371 | break; | 370 | break; |
372 | } | 371 | } |
373 | } | 372 | } |
374 | #else /* ndef MAX_LOG_SECTOR_SIZE */ | 373 | #else /* ndef MAX_LOG_SECTOR_SIZE */ |
375 | if (!fat_mount(IF_MV(volume,) IF_MD(drive,) pinfo[i].start)) | 374 | if (!fat_mount(IF_MV(volume,) IF_MD(drive,) pinfo[i].start)) |
376 | { | 375 | { |
377 | mounted++; | 376 | mounted++; |
@@ -379,7 +378,7 @@ int disk_mount(int drive) | |||
379 | volume_onmount_internal(IF_MV(volume)); | 378 | volume_onmount_internal(IF_MV(volume)); |
380 | volume = get_free_volume(); /* prepare next entry */ | 379 | volume = get_free_volume(); /* prepare next entry */ |
381 | } | 380 | } |
382 | #endif /* MAX_LOG_SECTOR_SIZE */ | 381 | #endif /* MAX_LOG_SECTOR_SIZE */ |
383 | } | 382 | } |
384 | } | 383 | } |
385 | 384 | ||