revert changes that slip in the last commit
This commit is contained in:
@@ -38,9 +38,9 @@
|
|||||||
#define DEBUG_GLOBAL 1
|
#define DEBUG_GLOBAL 1
|
||||||
#if DEBUG_GLOBAL
|
#if DEBUG_GLOBAL
|
||||||
/* Define only one of the three debug posibilities below */
|
/* 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_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 which local layer you want on */
|
||||||
#define DEBUG_HOST_LAYER 0
|
#define DEBUG_HOST_LAYER 0
|
||||||
|
|||||||
@@ -96,7 +96,6 @@ printf("idx %d PCI handle: %lx\n", idx -1, handle); /* Galvez: Debug */
|
|||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
printf("main()\n");
|
|
||||||
#ifdef CONFIG_USB_STORAGE
|
#ifdef CONFIG_USB_STORAGE
|
||||||
long p = 0;
|
long p = 0;
|
||||||
int r;
|
int r;
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ PROGRAM = stor_pci.tos
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
STACKSIZE = 64k
|
STACKSIZE = 64k
|
||||||
OPTIMISATION = -O2 -fomit-frame-pointer
|
OPTIMISATION = -O -fomit-frame-pointer
|
||||||
CPU = -m68020-60
|
CPU = -m68020-60
|
||||||
LIB =
|
LIB =
|
||||||
ASFLAGS = $(CPU)
|
ASFLAGS = $(CPU)
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ typedef struct disk_partition {
|
|||||||
} disk_partition_t;
|
} disk_partition_t;
|
||||||
|
|
||||||
//extern unsigned long swap_long(unsigned long val);
|
//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_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);
|
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->type = (unsigned long)pt->sys_ind;
|
||||||
info->blksz = 512;
|
info->blksz = 512;
|
||||||
info->start = ext_part_sector + __le32_to_cpu(pt->start4);
|
info->start = ext_part_sector + le32_to_int(pt->start4);
|
||||||
info->size = __le32_to_cpu(pt->size4);
|
info->size = le32_to_int(pt->size4);
|
||||||
DEBUG_STORAGE("DOS partition at offset 0x%lx, size 0x%lx, type 0x%x %s\r\n",
|
DEBUG_STORAGE("DOS partition at offset 0x%lx, size 0x%lx, type 0x%x %s\r\n",
|
||||||
info->start, info->size, pt->sys_ind,
|
info->start, info->size, pt->sys_ind,
|
||||||
(is_extended(pt->sys_ind) ? " Extd" : ""));
|
(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))
|
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);
|
usb_free(buffer);
|
||||||
return get_partition_info_extended(dev_desc, lba_start, ext_part_sector == 0 ? lba_start : relative, part_num, which_part, info);
|
return get_partition_info_extended(dev_desc, lba_start, ext_part_sector == 0 ? lba_start : relative, part_num, which_part, info);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user