diff --git a/usb/store/config.h b/usb/store/config.h index c929993..ce5464f 100644 --- a/usb/store/config.h +++ b/usb/store/config.h @@ -38,9 +38,9 @@ #define DEBUG_GLOBAL 1 #if DEBUG_GLOBAL /* Define only one of the three debug posibilities below */ -#define DEBUG_TO_FILE 0 +#define DEBUG_TO_FILE 1 #define DEBUG_TO_ARANYM 0 /* NOTE: No arguments are passed to the printf function */ -#define DEBUG_TO_CONSOLE 1 +#define DEBUG_TO_CONSOLE 0 /* Define which local layer you want on */ #define DEBUG_HOST_LAYER 0 diff --git a/usb/store/main.c b/usb/store/main.c index 46a9e3f..32d7f4b 100644 --- a/usb/store/main.c +++ b/usb/store/main.c @@ -96,7 +96,6 @@ printf("idx %d PCI handle: %lx\n", idx -1, handle); /* Galvez: Debug */ int main(int argc, char **argv) { -printf("main()\n"); #ifdef CONFIG_USB_STORAGE long p = 0; int r; diff --git a/usb/store/makefile b/usb/store/makefile index 624462b..2164391 100644 --- a/usb/store/makefile +++ b/usb/store/makefile @@ -39,7 +39,7 @@ PROGRAM = stor_pci.tos endif STACKSIZE = 64k -OPTIMISATION = -O2 -fomit-frame-pointer +OPTIMISATION = -O -fomit-frame-pointer CPU = -m68020-60 LIB = ASFLAGS = $(CPU) diff --git a/usb/store/usb_storage.c b/usb/store/usb_storage.c index 85e0218..e48724e 100644 --- a/usb/store/usb_storage.c +++ b/usb/store/usb_storage.c @@ -198,7 +198,7 @@ typedef struct disk_partition { } disk_partition_t; //extern unsigned long swap_long(unsigned long val); -//#define le32_to_int(a) swap_32(*(unsigned long *)a) +#define le32_to_int(a) swap_32(*(unsigned long *)a) int usb_stor_get_info(struct usb_device *dev, struct us_data *us, block_dev_desc_t *dev_desc); int usb_storage_probe(struct usb_device *dev, unsigned int ifnum, struct us_data *ss); @@ -289,8 +289,8 @@ static int get_partition_info_extended(block_dev_desc_t *dev_desc, int ext_part_ { info->type = (unsigned long)pt->sys_ind; info->blksz = 512; - info->start = ext_part_sector + __le32_to_cpu(pt->start4); - info->size = __le32_to_cpu(pt->size4); + info->start = ext_part_sector + le32_to_int(pt->start4); + info->size = le32_to_int(pt->size4); DEBUG_STORAGE("DOS partition at offset 0x%lx, size 0x%lx, type 0x%x %s\r\n", info->start, info->size, pt->sys_ind, (is_extended(pt->sys_ind) ? " Extd" : "")); @@ -307,7 +307,7 @@ static int get_partition_info_extended(block_dev_desc_t *dev_desc, int ext_part_ { if(is_extended(pt->sys_ind)) { - int lba_start = __le32_to_cpu(pt->start4) + relative; + int lba_start = le32_to_int(pt->start4) + relative; usb_free(buffer); return get_partition_info_extended(dev_desc, lba_start, ext_part_sector == 0 ? lba_start : relative, part_num, which_part, info); }