revert changes that slip in the last commit

This commit is contained in:
David Gálvez
2011-01-03 09:16:53 +00:00
parent 756ab9cd6e
commit 6745eb25e9
4 changed files with 7 additions and 8 deletions

View File

@@ -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

View File

@@ -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;

View File

@@ -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)

View File

@@ -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);
}