blob: 783dd5c88a7325c3ddccedce87c04acb0335adfd [file] [log] [blame]
Simon Glass11842872012-12-26 09:53:35 +00001/*
2 * Copyright (c) 2012, Google Inc.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16 */
17
18#ifndef __SANDBOX_FS__
19#define __SANDBOX_FS__
20
Simon Glass655306c2020-05-10 11:39:58 -060021struct blk_desc;
22struct disk_partition;
23
Simon Glassc1c4a8f2020-05-10 11:39:57 -060024int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
Simon Glass11842872012-12-26 09:53:35 +000025
Suriyan Ramasami378da1032014-11-17 14:39:37 -080026int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,
27 loff_t maxsize, loff_t *actread);
28int sandbox_fs_write_at(const char *filename, loff_t pos, void *buffer,
29 loff_t maxsize, loff_t *actwrite);
Simon Glass11842872012-12-26 09:53:35 +000030
31void sandbox_fs_close(void);
32int sandbox_fs_ls(const char *dirname);
Stephen Warren97d66f22014-02-03 13:21:07 -070033int sandbox_fs_exists(const char *filename);
Suriyan Ramasami96171fb2014-11-17 14:39:38 -080034int sandbox_fs_size(const char *filename, loff_t *size);
35int fs_read_sandbox(const char *filename, void *buf, loff_t offset, loff_t len,
36 loff_t *actread);
37int fs_write_sandbox(const char *filename, void *buf, loff_t offset,
38 loff_t len, loff_t *actwrite);
Simon Glass11842872012-12-26 09:53:35 +000039
40#endif