projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rockchip: Remove ARCH= references from documentation
[oweals/u-boot.git]
/
cmd
/
zfs.c
diff --git
a/cmd/zfs.c
b/cmd/zfs.c
index 3ed9912d19bd4d43a310233ff87e30a24917fcf9..e429ac88d73c107eb4b6bef68b160d37f4ad92cd 100644
(file)
--- a/
cmd/zfs.c
+++ b/
cmd/zfs.c
@@
-1,3
+1,4
@@
+// SPDX-License-Identifier: GPL-2.0+
/*
*
* ZFS filesystem porting to Uboot by
/*
*
* ZFS filesystem porting to Uboot by
@@
-5,14
+6,13
@@
*
* zfsfs support
* made from existing GRUB Sources by Sun, GNU and others.
*
* zfsfs support
* made from existing GRUB Sources by Sun, GNU and others.
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <part.h>
#include <config.h>
#include <command.h>
*/
#include <common.h>
#include <part.h>
#include <config.h>
#include <command.h>
+#include <env.h>
#include <image.h>
#include <linux/ctype.h>
#include <asm/byteorder.h>
#include <image.h>
#include <linux/ctype.h>
#include <asm/byteorder.h>
@@
-32,15
+32,15
@@
#define DOS_FS_TYPE_OFFSET 0x36
#define DOS_FS32_TYPE_OFFSET 0x52
#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;
{
char *filename = NULL;
int dev;
int part;
ulong addr = 0;
-
disk_partition_t
info;
+
struct disk_partition
info;
struct blk_desc *dev_desc;
struct blk_desc *dev_desc;
- char buf[12];
unsigned long count;
const char *addr_str;
struct zfs_file zfile;
unsigned long count;
const char *addr_str;
struct zfs_file zfile;
@@
-51,10
+51,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);
count = 0;
addr = simple_strtoul(argv[3], NULL, 16);
- filename =
getenv
("bootfile");
+ filename =
env_get
("bootfile");
switch (argc) {
case 3:
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
if (addr_str != NULL)
addr = simple_strtoul(addr_str, NULL, 16);
else
@@
-112,10
+112,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 */
zfs_close(&zfile);
/* Loading ok, update default load address */
- load_addr = addr;
+
image_
load_addr = addr;
printf("%llu bytes read\n", zfile.size);
printf("%llu bytes read\n", zfile.size);
-
setenv
_hex("filesize", zfile.size);
+
env_set
_hex("filesize", zfile.size);
return 0;
}
return 0;
}
@@
-130,13
+130,13
@@
int zfs_print(const char *entry, const struct zfs_dirhook_info *data)
}
}
-
-
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;
{
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)
struct device_s vdev;
if (argc < 2)