diff options
| author | Tom Rini <trini@konsulko.com> | 2026-07-10 15:55:23 -0600 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2026-07-10 15:55:23 -0600 |
| commit | 6741b0dfb41dc82a284ab1cff4c58af6ef2f3f9c (patch) | |
| tree | 52be30716d160497ac62760403b2346ba77f3008 /include/btrfs.h | |
| parent | e0d10a4b85cb3adfff152494afe74d3a0cac1090 (diff) | |
| parent | 31cf3f177823362a42bf4630ec85370ea768ddf1 (diff) | |
| download | u-boot-master.tar.gz u-boot-master.zip | |
Alexey Charkov <alchark@flipper.net> says:
Btrfs in U-boot currently uses a custom callback for ls and doesn't
expose the standard opendir/readdir/closedir interface, making it harder
to use in generic code. One area where this would be useful is in
discovering BLS type 1 entries [1] on a Btrfs filesystem.
Add support for the standard interface, and implement ls in terms of it.
[1] https://lore.kernel.org/u-boot/20260604-bls-v1-0-4ce6d1ee4711@flipper.net/
Link: https://lore.kernel.org/r/20260626-btrfs-readdir-v2-0-7dd43f72d1b4@flipper.net
Diffstat (limited to 'include/btrfs.h')
| -rw-r--r-- | include/btrfs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/btrfs.h b/include/btrfs.h index 2d73add18e0..3878b7817ea 100644 --- a/include/btrfs.h +++ b/include/btrfs.h @@ -10,15 +10,19 @@ struct blk_desc; struct disk_partition; +struct fs_dir_stream; +struct fs_dirent; int btrfs_probe(struct blk_desc *fs_dev_desc, struct disk_partition *fs_partition); -int btrfs_ls(const char *); int btrfs_exists(const char *); int btrfs_size(const char *, loff_t *); int btrfs_read(const char *, void *, loff_t, loff_t, loff_t *); void btrfs_close(void); int btrfs_uuid(char *); void btrfs_list_subvols(void); +int btrfs_opendir(const char *filename, struct fs_dir_stream **dirsp); +int btrfs_readdir(struct fs_dir_stream *dirs, struct fs_dirent **dentp); +void btrfs_closedir(struct fs_dir_stream *dirs); #endif /* __U_BOOT_BTRFS_H__ */ |
