* made from existing GRUB Sources by Sun, GNU and others.
*/
-#include <common.h>
#include <part.h>
#include <config.h>
#include <command.h>
#define DOS_FS_TYPE_OFFSET 0x36
#define DOS_FS32_TYPE_OFFSET 0x52
-static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_zfs_load(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
char *filename = NULL;
int dev;
int part;
ulong addr = 0;
- disk_partition_t info;
+ struct disk_partition info;
struct blk_desc *dev_desc;
- char buf[12];
unsigned long count;
const char *addr_str;
struct zfs_file zfile;
return CMD_RET_USAGE;
count = 0;
- addr = simple_strtoul(argv[3], NULL, 16);
+ addr = hextoul(argv[3], NULL);
filename = env_get("bootfile");
switch (argc) {
case 3:
addr_str = env_get("loadaddr");
if (addr_str != NULL)
- addr = simple_strtoul(addr_str, NULL, 16);
+ addr = hextoul(addr_str, NULL);
else
addr = CONFIG_SYS_LOAD_ADDR;
break;
case 6:
filename = argv[4];
- count = simple_strtoul(argv[5], NULL, 16);
+ count = hextoul(argv[5], NULL);
break;
default:
return 0;
}
-
int zfs_print(const char *entry, const struct zfs_dirhook_info *data)
{
printf("%s %s\n",
return 0; /* 0 continue, 1 stop */
}
-
-
-static int do_zfs_ls(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+static int do_zfs_ls(struct cmd_tbl *cmdtp, int flag, int argc,
+ char *const argv[])
{
const char *filename = "/";
int part;
struct blk_desc *dev_desc;
- disk_partition_t info;
+ struct disk_partition info;
struct device_s vdev;
if (argc < 2)
return 0;
}
-
U_BOOT_CMD(zfsls, 4, 1, do_zfs_ls,
"list files in a directory (default /)",
"<interface> <dev[:part]> [directory]\n"