diff options
Diffstat (limited to 'disk')
-rw-r--r-- | disk/part_dos.c | 6 | ||||
-rw-r--r-- | disk/part_dos.h | 7 |
2 files changed, 3 insertions, 10 deletions
diff --git a/disk/part_dos.c b/disk/part_dos.c index 2de1bb8..b5bcb37 100644 --- a/disk/part_dos.c +++ b/disk/part_dos.c @@ -87,7 +87,7 @@ static int test_block_type(unsigned char *buffer) int test_part_dos (block_dev_desc_t *dev_desc) { - unsigned char buffer[DEFAULT_SECTOR_SIZE]; + unsigned char buffer[dev_desc->blksz]; if ((dev_desc->block_read(dev_desc->dev, 0, 1, (ulong *) buffer) != 1) || (buffer[DOS_PART_MAGIC_OFFSET + 0] != 0x55) || @@ -102,7 +102,7 @@ int test_part_dos (block_dev_desc_t *dev_desc) static void print_partition_extended (block_dev_desc_t *dev_desc, int ext_part_sector, int relative, int part_num) { - unsigned char buffer[DEFAULT_SECTOR_SIZE]; + unsigned char buffer[dev_desc->blksz]; dos_partition_t *pt; int i; @@ -166,7 +166,7 @@ static int get_partition_info_extended (block_dev_desc_t *dev_desc, int ext_part int relative, int part_num, int which_part, disk_partition_t *info) { - unsigned char buffer[DEFAULT_SECTOR_SIZE]; + unsigned char buffer[dev_desc->blksz]; dos_partition_t *pt; int i; diff --git a/disk/part_dos.h b/disk/part_dos.h index 195a32c..de75542 100644 --- a/disk/part_dos.h +++ b/disk/part_dos.h @@ -25,13 +25,6 @@ #define _DISK_PART_DOS_H -#ifdef CONFIG_ISO_PARTITION -/* Make the buffers bigger if ISO partition support is enabled -- CD-ROMS - have 2048 byte blocks */ -#define DEFAULT_SECTOR_SIZE 2048 -#else -#define DEFAULT_SECTOR_SIZE 512 -#endif #define DOS_PART_TBL_OFFSET 0x1be #define DOS_PART_MAGIC_OFFSET 0x1fe #define DOS_PBR_FSTYPE_OFFSET 0x36 |