Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved. |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 4 | */ |
| 5 | #ifndef _FS_H |
| 6 | #define _FS_H |
| 7 | |
Heinrich Schuchardt | 13c11c6 | 2021-05-15 22:06:16 +0200 | [diff] [blame] | 8 | #include <rtc.h> |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 9 | |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 10 | struct cmd_tbl; |
| 11 | |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 12 | #define FS_TYPE_ANY 0 |
| 13 | #define FS_TYPE_FAT 1 |
| 14 | #define FS_TYPE_EXT 2 |
Simon Glass | 92ccc96 | 2012-12-26 09:53:35 +0000 | [diff] [blame] | 15 | #define FS_TYPE_SANDBOX 3 |
Hans de Goede | 251cee0 | 2015-09-17 18:46:58 -0400 | [diff] [blame] | 16 | #define FS_TYPE_UBIFS 4 |
Marek BehĂșn | 0c936ee | 2017-09-03 17:00:29 +0200 | [diff] [blame] | 17 | #define FS_TYPE_BTRFS 5 |
Joao Marcos Costa | c510061 | 2020-07-30 15:33:47 +0200 | [diff] [blame] | 18 | #define FS_TYPE_SQUASHFS 6 |
Huang Jianan | 830613f | 2022-02-26 15:05:47 +0800 | [diff] [blame] | 19 | #define FS_TYPE_EROFS 7 |
Sean Anderson | f676b45 | 2022-03-22 16:59:20 -0400 | [diff] [blame] | 20 | #define FS_TYPE_SEMIHOSTING 8 |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 21 | |
Simon Glass | e6f6f9e | 2020-05-10 11:39:58 -0600 | [diff] [blame] | 22 | struct blk_desc; |
| 23 | |
Simon Glass | 1444998 | 2019-12-28 10:44:44 -0700 | [diff] [blame] | 24 | /** |
| 25 | * do_fat_fsload - Run the fatload command |
| 26 | * |
| 27 | * @cmdtp: Command information for fatload |
| 28 | * @flag: Command flags (CMD_FLAG_...) |
| 29 | * @argc: Number of arguments |
| 30 | * @argv: List of arguments |
Heinrich Schuchardt | 185f812 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 31 | * Return: result (see enum command_ret_t) |
Simon Glass | 1444998 | 2019-12-28 10:44:44 -0700 | [diff] [blame] | 32 | */ |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 33 | int do_fat_fsload(struct cmd_tbl *cmdtp, int flag, int argc, |
| 34 | char *const argv[]); |
Simon Glass | 1444998 | 2019-12-28 10:44:44 -0700 | [diff] [blame] | 35 | |
| 36 | /** |
| 37 | * do_ext2load - Run the ext2load command |
| 38 | * |
| 39 | * @cmdtp: Command information for ext2load |
| 40 | * @flag: Command flags (CMD_FLAG_...) |
| 41 | * @argc: Number of arguments |
| 42 | * @argv: List of arguments |
Heinrich Schuchardt | 185f812 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 43 | * Return: result (see enum command_ret_t) |
Simon Glass | 1444998 | 2019-12-28 10:44:44 -0700 | [diff] [blame] | 44 | */ |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 45 | int do_ext2load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
Simon Glass | 1444998 | 2019-12-28 10:44:44 -0700 | [diff] [blame] | 46 | |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 47 | /* |
Roger Knecht | da223d8 | 2022-08-25 12:12:01 +0000 | [diff] [blame] | 48 | * Tell the fs layer which block device and partition to use for future |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 49 | * commands. This also internally identifies the filesystem that is present |
| 50 | * within the partition. The identification process may be limited to a |
| 51 | * specific filesystem type by passing FS_* in the fstype parameter. |
| 52 | * |
| 53 | * Returns 0 on success. |
| 54 | * Returns non-zero if there is an error accessing the disk or partition, or |
| 55 | * no known filesystem type could be recognized on it. |
| 56 | */ |
| 57 | int fs_set_blk_dev(const char *ifname, const char *dev_part_str, int fstype); |
| 58 | |
Simon Glass | c24e58f | 2022-04-24 23:31:04 -0600 | [diff] [blame] | 59 | /** |
| 60 | * fs_set_type() - Tell fs layer which filesystem type is used |
| 61 | * |
| 62 | * This is needed when reading from a non-block device such as sandbox. It does |
| 63 | * a similar job to fs_set_blk_dev() but just sets the filesystem type instead |
| 64 | * of detecting it and loading it on the block device |
| 65 | * |
| 66 | * @type: Filesystem type to use (FS_TYPE...) |
| 67 | */ |
| 68 | void fs_set_type(int type); |
| 69 | |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 70 | /* |
Rob Clark | 4bbcc96 | 2017-09-09 13:15:55 -0400 | [diff] [blame] | 71 | * fs_set_blk_dev_with_part - Set current block device + partition |
| 72 | * |
| 73 | * Similar to fs_set_blk_dev(), but useful for cases where you already |
| 74 | * know the blk_desc and part number. |
| 75 | * |
| 76 | * Returns 0 on success. |
| 77 | * Returns non-zero if invalid partition or error accessing the disk. |
| 78 | */ |
| 79 | int fs_set_blk_dev_with_part(struct blk_desc *desc, int part); |
| 80 | |
Alex Kiernan | 0d488e8 | 2018-05-29 15:30:50 +0000 | [diff] [blame] | 81 | /** |
AKASHI Takahiro | 64f49eb | 2019-10-07 14:59:35 +0900 | [diff] [blame] | 82 | * fs_close() - Unset current block device and partition |
| 83 | * |
Heinrich Schuchardt | e4bad9f | 2019-10-13 10:26:26 +0200 | [diff] [blame] | 84 | * fs_close() closes the connection to a file system opened with either |
| 85 | * fs_set_blk_dev() or fs_set_dev_with_part(). |
| 86 | * |
| 87 | * Many file functions implicitly call fs_close(), e.g. fs_closedir(), |
| 88 | * fs_exist(), fs_ln(), fs_ls(), fs_mkdir(), fs_read(), fs_size(), fs_write(), |
| 89 | * fs_unlink(). |
AKASHI Takahiro | 64f49eb | 2019-10-07 14:59:35 +0900 | [diff] [blame] | 90 | */ |
| 91 | void fs_close(void); |
| 92 | |
| 93 | /** |
AKASHI Takahiro | b7cd956 | 2019-10-07 14:59:37 +0900 | [diff] [blame] | 94 | * fs_get_type() - Get type of current filesystem |
| 95 | * |
| 96 | * Return: filesystem type |
| 97 | * |
| 98 | * Returns filesystem type representing the current filesystem, or |
| 99 | * FS_TYPE_ANY for any unrecognised filesystem. |
| 100 | */ |
| 101 | int fs_get_type(void); |
| 102 | |
| 103 | /** |
Alex Kiernan | 0d488e8 | 2018-05-29 15:30:50 +0000 | [diff] [blame] | 104 | * fs_get_type_name() - Get type of current filesystem |
| 105 | * |
| 106 | * Return: Pointer to filesystem name |
| 107 | * |
| 108 | * Returns a string describing the current filesystem, or the sentinel |
| 109 | * "unsupported" for any unrecognised filesystem. |
| 110 | */ |
| 111 | const char *fs_get_type_name(void); |
| 112 | |
Rob Clark | 4bbcc96 | 2017-09-09 13:15:55 -0400 | [diff] [blame] | 113 | /* |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 114 | * Print the list of files on the partition previously set by fs_set_blk_dev(), |
| 115 | * in directory "dirname". |
| 116 | * |
| 117 | * Returns 0 on success. Returns non-zero on error. |
| 118 | */ |
| 119 | int fs_ls(const char *dirname); |
| 120 | |
| 121 | /* |
Stephen Warren | 6152916 | 2014-02-03 13:21:00 -0700 | [diff] [blame] | 122 | * Determine whether a file exists |
| 123 | * |
| 124 | * Returns 1 if the file exists, 0 if it doesn't exist. |
| 125 | */ |
| 126 | int fs_exists(const char *filename); |
| 127 | |
| 128 | /* |
Suriyan Ramasami | d455d87 | 2014-11-17 14:39:38 -0800 | [diff] [blame] | 129 | * fs_size - Determine a file's size |
Stephen Warren | cf65981 | 2014-06-11 12:47:26 -0600 | [diff] [blame] | 130 | * |
Suriyan Ramasami | d455d87 | 2014-11-17 14:39:38 -0800 | [diff] [blame] | 131 | * @filename: Name of the file |
| 132 | * @size: Size of file |
Heinrich Schuchardt | 185f812 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 133 | * Return: 0 if ok with valid *size, negative on error |
Stephen Warren | cf65981 | 2014-06-11 12:47:26 -0600 | [diff] [blame] | 134 | */ |
Suriyan Ramasami | d455d87 | 2014-11-17 14:39:38 -0800 | [diff] [blame] | 135 | int fs_size(const char *filename, loff_t *size); |
Stephen Warren | cf65981 | 2014-06-11 12:47:26 -0600 | [diff] [blame] | 136 | |
Heinrich Schuchardt | a0e92cd | 2019-04-25 20:36:39 +0200 | [diff] [blame] | 137 | /** |
| 138 | * fs_read() - read file from the partition previously set by fs_set_blk_dev() |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 139 | * |
Heinrich Schuchardt | a0e92cd | 2019-04-25 20:36:39 +0200 | [diff] [blame] | 140 | * Note that not all filesystem drivers support either or both of offset != 0 |
| 141 | * and len != 0. |
| 142 | * |
| 143 | * @filename: full path of the file to read from |
| 144 | * @addr: address of the buffer to write to |
| 145 | * @offset: offset in the file from where to start reading |
| 146 | * @len: the number of bytes to read. Use 0 to read entire file. |
| 147 | * @actread: returns the actual number of bytes read |
| 148 | * Return: 0 if OK with valid *actread, -1 on error conditions |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 149 | */ |
Suriyan Ramasami | d455d87 | 2014-11-17 14:39:38 -0800 | [diff] [blame] | 150 | int fs_read(const char *filename, ulong addr, loff_t offset, loff_t len, |
| 151 | loff_t *actread); |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 152 | |
Heinrich Schuchardt | a0e92cd | 2019-04-25 20:36:39 +0200 | [diff] [blame] | 153 | /** |
| 154 | * fs_write() - write file to the partition previously set by fs_set_blk_dev() |
Stephen Warren | bd6fb31 | 2014-02-03 13:20:59 -0700 | [diff] [blame] | 155 | * |
Heinrich Schuchardt | a0e92cd | 2019-04-25 20:36:39 +0200 | [diff] [blame] | 156 | * Note that not all filesystem drivers support offset != 0. |
| 157 | * |
| 158 | * @filename: full path of the file to write to |
| 159 | * @addr: address of the buffer to read from |
| 160 | * @offset: offset in the file from where to start writing |
| 161 | * @len: the number of bytes to write |
| 162 | * @actwrite: returns the actual number of bytes written |
| 163 | * Return: 0 if OK with valid *actwrite, -1 on error conditions |
Stephen Warren | bd6fb31 | 2014-02-03 13:20:59 -0700 | [diff] [blame] | 164 | */ |
Suriyan Ramasami | d455d87 | 2014-11-17 14:39:38 -0800 | [diff] [blame] | 165 | int fs_write(const char *filename, ulong addr, loff_t offset, loff_t len, |
| 166 | loff_t *actwrite); |
Stephen Warren | bd6fb31 | 2014-02-03 13:20:59 -0700 | [diff] [blame] | 167 | |
| 168 | /* |
Rob Clark | 4bbcc96 | 2017-09-09 13:15:55 -0400 | [diff] [blame] | 169 | * Directory entry types, matches the subset of DT_x in posix readdir() |
| 170 | * which apply to u-boot. |
| 171 | */ |
| 172 | #define FS_DT_DIR 4 /* directory */ |
| 173 | #define FS_DT_REG 8 /* regular file */ |
| 174 | #define FS_DT_LNK 10 /* symbolic link */ |
| 175 | |
Miquel Raynal | 2ac0baa | 2022-06-09 16:02:06 +0200 | [diff] [blame] | 176 | #define FS_DIRENT_NAME_LEN 256 |
| 177 | |
Heinrich Schuchardt | 13c11c6 | 2021-05-15 22:06:16 +0200 | [diff] [blame] | 178 | /** |
| 179 | * struct fs_dirent - directory entry |
| 180 | * |
| 181 | * A directory entry, returned by fs_readdir(). Returns information |
Rob Clark | 4bbcc96 | 2017-09-09 13:15:55 -0400 | [diff] [blame] | 182 | * about the file/directory at the current directory entry position. |
| 183 | */ |
| 184 | struct fs_dirent { |
Heinrich Schuchardt | 13c11c6 | 2021-05-15 22:06:16 +0200 | [diff] [blame] | 185 | /** @type: one of FS_DT_x (not a mask) */ |
| 186 | unsigned int type; |
| 187 | /** @size: file size */ |
| 188 | loff_t size; |
| 189 | /** @flags: attribute flags (FS_ATTR_*) */ |
| 190 | u32 attr; |
| 191 | /** create_time: time of creation */ |
| 192 | struct rtc_time create_time; |
| 193 | /** access_time: time of last access */ |
| 194 | struct rtc_time access_time; |
| 195 | /** change_time: time of last modification */ |
| 196 | struct rtc_time change_time; |
| 197 | /** name: file name */ |
Miquel Raynal | 2ac0baa | 2022-06-09 16:02:06 +0200 | [diff] [blame] | 198 | char name[FS_DIRENT_NAME_LEN]; |
Rob Clark | 4bbcc96 | 2017-09-09 13:15:55 -0400 | [diff] [blame] | 199 | }; |
| 200 | |
| 201 | /* Note: fs_dir_stream should be treated as opaque to the user of fs layer */ |
| 202 | struct fs_dir_stream { |
| 203 | /* private to fs. layer: */ |
| 204 | struct blk_desc *desc; |
| 205 | int part; |
| 206 | }; |
| 207 | |
| 208 | /* |
| 209 | * fs_opendir - Open a directory |
| 210 | * |
| 211 | * @filename: the path to directory to open |
Heinrich Schuchardt | 185f812 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 212 | * Return: a pointer to the directory stream or NULL on error and errno |
Rob Clark | 4bbcc96 | 2017-09-09 13:15:55 -0400 | [diff] [blame] | 213 | * set appropriately |
| 214 | */ |
| 215 | struct fs_dir_stream *fs_opendir(const char *filename); |
| 216 | |
| 217 | /* |
| 218 | * fs_readdir - Read the next directory entry in the directory stream. |
| 219 | * |
| 220 | * Works in an analogous way to posix readdir(). The previously returned |
| 221 | * directory entry is no longer valid after calling fs_readdir() again. |
| 222 | * After fs_closedir() is called, the returned directory entry is no |
| 223 | * longer valid. |
| 224 | * |
| 225 | * @dirs: the directory stream |
Heinrich Schuchardt | 185f812 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 226 | * Return: the next directory entry (only valid until next fs_readdir() or |
Rob Clark | 4bbcc96 | 2017-09-09 13:15:55 -0400 | [diff] [blame] | 227 | * fs_closedir() call, do not attempt to free()) or NULL if the end of |
| 228 | * the directory is reached. |
| 229 | */ |
| 230 | struct fs_dirent *fs_readdir(struct fs_dir_stream *dirs); |
| 231 | |
| 232 | /* |
| 233 | * fs_closedir - close a directory stream |
| 234 | * |
| 235 | * @dirs: the directory stream |
| 236 | */ |
| 237 | void fs_closedir(struct fs_dir_stream *dirs); |
| 238 | |
| 239 | /* |
AKASHI Takahiro | e2519da | 2018-09-11 15:59:13 +0900 | [diff] [blame] | 240 | * fs_unlink - delete a file or directory |
| 241 | * |
| 242 | * If a given name is a directory, it will be deleted only if it's empty |
| 243 | * |
| 244 | * @filename: Name of file or directory to delete |
Heinrich Schuchardt | 185f812 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 245 | * Return: 0 on success, -1 on error conditions |
AKASHI Takahiro | e2519da | 2018-09-11 15:59:13 +0900 | [diff] [blame] | 246 | */ |
| 247 | int fs_unlink(const char *filename); |
| 248 | |
| 249 | /* |
AKASHI Takahiro | e7074cf | 2018-09-11 15:59:08 +0900 | [diff] [blame] | 250 | * fs_mkdir - Create a directory |
| 251 | * |
| 252 | * @filename: Name of directory to create |
Heinrich Schuchardt | 185f812 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 253 | * Return: 0 on success, -1 on error conditions |
AKASHI Takahiro | e7074cf | 2018-09-11 15:59:08 +0900 | [diff] [blame] | 254 | */ |
| 255 | int fs_mkdir(const char *filename); |
| 256 | |
| 257 | /* |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 258 | * Common implementation for various filesystem commands, optionally limited |
| 259 | * to a specific filesystem type via the fstype parameter. |
| 260 | */ |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 261 | int do_size(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], |
| 262 | int fstype); |
| 263 | int do_load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], |
| 264 | int fstype); |
| 265 | int do_ls(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], |
| 266 | int fstype); |
Stephen Warren | 6152916 | 2014-02-03 13:21:00 -0700 | [diff] [blame] | 267 | int file_exists(const char *dev_type, const char *dev_part, const char *file, |
| 268 | int fstype); |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 269 | int do_save(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], |
| 270 | int fstype); |
| 271 | int do_rm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], |
| 272 | int fstype); |
| 273 | int do_mkdir(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], |
| 274 | int fstype); |
| 275 | int do_ln(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], |
Jean-Jacques Hiblot | aaa1215 | 2019-02-13 12:15:26 +0100 | [diff] [blame] | 276 | int fstype); |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 277 | |
Christian Gmeiner | 59e890e | 2014-11-12 14:35:04 +0100 | [diff] [blame] | 278 | /* |
| 279 | * Determine the UUID of the specified filesystem and print it. Optionally it is |
| 280 | * possible to store the UUID directly in env. |
| 281 | */ |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 282 | int do_fs_uuid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], |
| 283 | int fstype); |
Christian Gmeiner | 59e890e | 2014-11-12 14:35:04 +0100 | [diff] [blame] | 284 | |
Sjoerd Simons | 1a1ad8e | 2015-01-05 18:13:36 +0100 | [diff] [blame] | 285 | /* |
| 286 | * Determine the type of the specified filesystem and print it. Optionally it is |
| 287 | * possible to store the type directly in env. |
| 288 | */ |
Simon Glass | 0914011 | 2020-05-10 11:40:03 -0600 | [diff] [blame] | 289 | int do_fs_type(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); |
Sjoerd Simons | 1a1ad8e | 2015-01-05 18:13:36 +0100 | [diff] [blame] | 290 | |
Niel Fourie | 2280fa5 | 2020-03-24 16:17:04 +0100 | [diff] [blame] | 291 | /** |
| 292 | * do_fs_types - List supported filesystems. |
| 293 | * |
| 294 | * @cmdtp: Command information for fstypes |
| 295 | * @flag: Command flags (CMD_FLAG_...) |
| 296 | * @argc: Number of arguments |
| 297 | * @argv: List of arguments |
Heinrich Schuchardt | 185f812 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 298 | * Return: result (see enum command_ret_t) |
Niel Fourie | 2280fa5 | 2020-03-24 16:17:04 +0100 | [diff] [blame] | 299 | */ |
| 300 | int do_fs_types(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); |
| 301 | |
Simon Glass | de7b5a8 | 2023-06-01 10:22:38 -0600 | [diff] [blame] | 302 | /** |
| 303 | * fs_read_alloc() - Allocate space for a file and read it |
| 304 | * |
| 305 | * You must call fs_set_blk_dev() or a similar function before calling this, |
| 306 | * since that sets up the block device to use. |
| 307 | * |
| 308 | * The file is terminated with a nul character |
| 309 | * |
| 310 | * @fname: Filename to read |
| 311 | * @size: Size of file to read (must be correct!) |
| 312 | * @align: Alignment to use for memory allocation (0 for default) |
| 313 | * @bufp: On success, returns the allocated buffer with the nul-terminated file |
| 314 | * in it |
| 315 | * Return: 0 if OK, -ENOMEM if out of memory, -EIO if read failed |
| 316 | */ |
| 317 | int fs_read_alloc(const char *fname, ulong size, uint align, void **bufp); |
| 318 | |
| 319 | /** |
| 320 | * fs_load_alloc() - Load a file into allocated space |
| 321 | * |
| 322 | * The file is terminated with a nul character |
| 323 | * |
| 324 | * @ifname: Interface name to read from (e.g. "mmc") |
| 325 | * @dev_part_str: Device and partition string (e.g. "1:2") |
| 326 | * @fname: Filename to read |
| 327 | * @max_size: Maximum allowed size for the file (use 0 for 1GB) |
| 328 | * @align: Alignment to use for memory allocation (0 for default) |
| 329 | * @bufp: On success, returns the allocated buffer with the nul-terminated file |
| 330 | * in it |
| 331 | * @sizep: On success, returns the size of the file |
| 332 | * Return: 0 if OK, -ENOMEM if out of memory, -ENOENT if the file does not |
| 333 | * exist, -ENOMEDIUM if the device does not exist, -E2BIG if the file is too |
| 334 | * large (greater than @max_size), -EIO if read failed |
| 335 | */ |
| 336 | int fs_load_alloc(const char *ifname, const char *dev_part_str, |
| 337 | const char *fname, ulong max_size, ulong align, void **bufp, |
| 338 | ulong *sizep); |
| 339 | |
Stephen Warren | 045fa1e | 2012-10-22 06:43:51 +0000 | [diff] [blame] | 340 | #endif /* _FS_H */ |