X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=cmd%2Fzfs.c;h=384ac4c9396cc288c5169aaac2210f49321849fd;hb=1713dac4399f35b38e6468ae932a2b435b022ecd;hp=bb61afd80decf2aa26e9eff12745be538088c3de;hpb=e35929e4a1ffe861f2f45e107986568c56c4f077;p=u-boot diff --git a/cmd/zfs.c b/cmd/zfs.c index bb61afd80d..384ac4c939 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,8 +6,6 @@ * * zfsfs support * made from existing GRUB Sources by Sun, GNU and others. - * - * SPDX-License-Identifier: GPL-2.0+ */ #include @@ -24,7 +23,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 @@ -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 @@ -84,7 +83,7 @@ static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] if (part < 0) return 1; - dev = dev_desc->dev; + dev = dev_desc->devnum; printf("Loading file \"%s\" from %s device %d%c%c\n", filename, argv[1], dev, part ? ':' : ' ', part ? part + '0' : ' '); @@ -115,7 +114,7 @@ static int do_zfs_load(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[] load_addr = addr; printf("%llu bytes read\n", zfile.size); - setenv_hex("filesize", zfile.size); + env_set_hex("filesize", zfile.size); return 0; }