X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cmd%2Fzfs.c;h=9c237a5758d430e15f7d808de6851e2e5c7697c6;hb=9900e4623a9a826447b0467cabc29e09fdf29fb6;hp=93067a990a9afc2c04c284719263bebbd3b852c7;hpb=bcce53d048de7f41078d25e39aa2f26d752d3658;p=oweals%2Fu-boot.git diff --git a/cmd/zfs.c b/cmd/zfs.c index 93067a990a..9c237a5758 100644 --- a/cmd/zfs.c +++ b/cmd/zfs.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * * ZFS filesystem porting to Uboot by @@ -5,14 +6,13 @@ * * zfsfs support * made from existing GRUB Sources by Sun, GNU and others. - * - * SPDX-License-Identifier: GPL-2.0+ */ #include #include #include #include +#include #include #include #include @@ -24,7 +24,7 @@ #include #endif -#if !defined(CONFIG_DOS_PARTITION) && !defined(CONFIG_EFI_PARTITION) +#if !CONFIG_IS_ENABLED(DOS_PARTITION) && !CONFIG_IS_ENABLED(EFI_PARTITION) #error DOS or EFI partition support must be selected #endif @@ -40,7 +40,6 @@ static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] ulong addr = 0; disk_partition_t info; struct blk_desc *dev_desc; - char buf[12]; unsigned long count; const char *addr_str; struct zfs_file zfile; @@ -51,10 +50,10 @@ static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] count = 0; addr = simple_strtoul(argv[3], NULL, 16); - filename = getenv("bootfile"); + filename = env_get("bootfile"); switch (argc) { case 3: - addr_str = getenv("loadaddr"); + addr_str = env_get("loadaddr"); if (addr_str != NULL) addr = simple_strtoul(addr_str, NULL, 16); else @@ -112,10 +111,10 @@ static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] zfs_close(&zfile); /* Loading ok, update default load address */ - load_addr = addr; + image_load_addr = addr; printf("%llu bytes read\n", zfile.size); - setenv_hex("filesize", zfile.size); + env_set_hex("filesize", zfile.size); return 0; }