diff options
| author | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-09-07 17:24:14 +0000 |
|---|---|---|
| committer | Maurus Cuelenaere <mcuelenaere@gmail.com> | 2008-09-07 17:24:14 +0000 |
| commit | 23fc923bde033d2abffa29651f3dff921abcaed7 (patch) | |
| tree | df3aec4da921c3923d39c30f8c82b66fab419313 /firmware/common | |
| parent | 97f775df059b1d505a72369e5f69559eeec175f4 (diff) | |
| download | rockbox-23fc923bde033d2abffa29651f3dff921abcaed7.zip rockbox-23fc923bde033d2abffa29651f3dff921abcaed7.tar.gz rockbox-23fc923bde033d2abffa29651f3dff921abcaed7.tar.bz2 rockbox-23fc923bde033d2abffa29651f3dff921abcaed7.tar.xz | |
ZVM:
* Optimize MiniFS handling
* Add basic CFS handling (doesn't work yet)
* Remove hacky stuff in disk.c
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18438 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/common')
| -rw-r--r-- | firmware/common/disk.c | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/firmware/common/disk.c b/firmware/common/disk.c index f6b836c..4add5b9 100644 --- a/firmware/common/disk.c +++ b/firmware/common/disk.c @@ -81,7 +81,6 @@ struct partinfo* disk_init(IF_MV_NONVOID(int drive)) #endif ata_read_sectors(IF_MV2(drive,) 0,1, §or); -#ifndef CREATIVE_ZVx /* check that the boot sector is initialized */ if ( (sector[510] != 0x55) || (sector[511] != 0xaa)) { @@ -104,46 +103,6 @@ struct partinfo* disk_init(IF_MV_NONVOID(int drive)) /* not handled yet */ } } -#else - struct partition_struct - { - unsigned int end; - unsigned int start; - char name[8]; - }; - struct hdd_struct - { - unsigned char MBLK[4]; - int sector_size; - long long total_disk_size; - struct partition_struct partitions[4]; - }; - struct hdd_struct* hdd_struct = (struct hdd_struct*)sector; - - if(hdd_struct->MBLK[0] != 0x4B || - hdd_struct->MBLK[1] != 0x4C || - hdd_struct->MBLK[2] != 0x42 || - hdd_struct->MBLK[3] != 0x4D) /* 0x4B4C424D = KLBM */ - { - DEBUGF("Bad boot sector signature\n"); - return NULL; - } - else - { - /* parse partitions */ - for ( i=0; i<4; i++ ) { - if(hdd_struct->partitions[i].name[0] != 0) - { - pinfo[i].type = ( strcmp(hdd_struct->partitions[i].name, "cfs") == 0 ? PARTITION_TYPE_FAT32_LBA : 0); - pinfo[i].start = hdd_struct->partitions[i].start; - pinfo[i].size = (hdd_struct->partitions[i].end - hdd_struct->partitions[i].start); - - DEBUGF("Part%d: Type %02x, start: %08lx size: %08lx\n", - i,pinfo[i].type,pinfo[i].start,pinfo[i].size); - } - } - } -#endif return pinfo; } @@ -200,7 +159,7 @@ int disk_mount(int drive) { return 0; } -#if defined(TOSHIBA_GIGABEAT_S) || defined(CREATIVE_ZVx) +#if defined(TOSHIBA_GIGABEAT_S) int i = 1; /* For the Gigabeat S, we mount the second partition */ #else int i = 0; |