summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2026-07-10 15:55:23 -0600
committerTom Rini <[email protected]>2026-07-10 15:55:23 -0600
commit6741b0dfb41dc82a284ab1cff4c58af6ef2f3f9c (patch)
tree52be30716d160497ac62760403b2346ba77f3008 /include
parente0d10a4b85cb3adfff152494afe74d3a0cac1090 (diff)
parent31cf3f177823362a42bf4630ec85370ea768ddf1 (diff)
Merge patch series "fs: btrfs: add support for readdir"HEADmaster
Alexey Charkov <[email protected]> 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/[email protected]/ Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'include')
-rw-r--r--include/btrfs.h6
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__ */