Lines Matching +full:- +full:- +full:root
1 // SPDX-License-Identifier: GPL-2.0+
3 * BTRFS filesystem implementation for U-Boot
15 static int readdir_callback(const struct btrfs_root *root, in readdir_callback() argument
34 if (btrfs_lookup_inode(root, &item->location, &inode, NULL)) { in readdir_callback()
36 __func__, item->name_len, name); in readdir_callback()
43 if (item->type == BTRFS_FT_SYMLINK) { in readdir_callback()
47 if (target && btrfs_readlink(root, item->location.objectid, in readdir_callback()
57 printf("<%s> ", typestr[item->type]); in readdir_callback()
58 if (item->type == BTRFS_FT_CHRDEV || item->type == BTRFS_FT_BLKDEV) in readdir_callback()
64 printf("%24.24s %.*s", filetime, item->name_len, name); in readdir_callback()
66 if (item->type == BTRFS_FT_SYMLINK) { in readdir_callback()
67 printf(" -> %s", target ? target : "?"); in readdir_callback()
86 return -1; in btrfs_probe()
90 return -1; in btrfs_probe()
94 btrfs_info.tree_root.bytenr = btrfs_info.sb.root; in btrfs_probe()
100 return -1; in btrfs_probe()
106 return -1; in btrfs_probe()
114 struct btrfs_root root = btrfs_info.fs_root; in btrfs_ls() local
118 inr = btrfs_lookup_path(&root, root.root_dirid, path, &type, NULL, 40); in btrfs_ls()
120 if (inr == -1ULL) { in btrfs_ls()
130 if (btrfs_readdir(&root, inr, readdir_callback)) { in btrfs_ls()
140 struct btrfs_root root = btrfs_info.fs_root; in btrfs_exists() local
144 inr = btrfs_lookup_path(&root, root.root_dirid, file, &type, NULL, 40); in btrfs_exists()
146 return (inr != -1ULL && type == BTRFS_FT_REG_FILE); in btrfs_exists()
151 struct btrfs_root root = btrfs_info.fs_root; in btrfs_size() local
156 inr = btrfs_lookup_path(&root, root.root_dirid, file, &type, &inode, in btrfs_size()
159 if (inr == -1ULL) { in btrfs_size()
176 struct btrfs_root root = btrfs_info.fs_root; in btrfs_read() local
181 inr = btrfs_lookup_path(&root, root.root_dirid, file, &type, &inode, in btrfs_read()
184 if (inr == -1ULL) { in btrfs_read()
197 if (len > inode.size - offset) in btrfs_read()
198 len = inode.size - offset; in btrfs_read()
200 rd = btrfs_file_read(&root, inr, offset, len, buf); in btrfs_read()
201 if (rd == -1ULL) { in btrfs_read()
221 return -ENOSYS; in btrfs_uuid()