#include <linux/ctype.h>
#include <asm/byteorder.h>
#include <ext2fs.h>
+#if ((CONFIG_COMMANDS & CFG_CMD_USB) && defined(CONFIG_USB_STORAGE))
+#include <usb.h>
+#endif
#ifndef CONFIG_DOS_PARTITION
#error DOS partition support must be selected
U_BOOT_CMD(
ext2ls, 4, 1, do_ext2ls,
- "ext2ls- list files in a directory (default /)\n",
+ "ext2ls - list files in a directory (default /)\n",
"<interface> <dev[:part]> [directory]\n"
" - list files from 'dev' on 'interface' in a 'directory'\n"
);
{
char *filename = NULL;
char *ep;
- int dev, part = 0;
+ int dev, part = 1;
ulong addr = 0, part_length, filelen;
disk_partition_t info;
block_dev_desc_t *dev_desc = NULL;
PRINTF("Using device %s%d, partition %d\n", argv[1], dev, part);
if (part != 0) {
- if (get_partition_info (&dev_desc[dev], part, &info)) {
+ if (get_partition_info (dev_desc, part, &info)) {
printf ("** Bad partition %d **\n", part);
return(1);
}
- if (strncmp(info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) {
+ if (strncmp((char *)info.type, BOOT_PART_TYPE, sizeof(info.type)) != 0) {
printf ("\n** Invalid partition type \"%.32s\""
" (expect \"" BOOT_PART_TYPE "\")\n",
info.type);