1*4882a593Smuzhiyun /* 2*4882a593Smuzhiyun * Copyright (c) 2012, Google Inc. 3*4882a593Smuzhiyun * 4*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or modify 5*4882a593Smuzhiyun * it under the terms of the GNU General Public License version 2 as 6*4882a593Smuzhiyun * published by the Free Software Foundation. 7*4882a593Smuzhiyun * 8*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful, 9*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 10*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11*4882a593Smuzhiyun * GNU General Public License for more details. 12*4882a593Smuzhiyun * 13*4882a593Smuzhiyun * You should have received a copy of the GNU General Public License 14*4882a593Smuzhiyun * along with this program; if not, write to the Free Software 15*4882a593Smuzhiyun * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 16*4882a593Smuzhiyun */ 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun #ifndef __SANDBOX_FS__ 19*4882a593Smuzhiyun #define __SANDBOX_FS__ 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info); 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer, 24*4882a593Smuzhiyun loff_t maxsize, loff_t *actread); 25*4882a593Smuzhiyun int sandbox_fs_write_at(const char *filename, loff_t pos, void *buffer, 26*4882a593Smuzhiyun loff_t maxsize, loff_t *actwrite); 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun void sandbox_fs_close(void); 29*4882a593Smuzhiyun int sandbox_fs_ls(const char *dirname); 30*4882a593Smuzhiyun int sandbox_fs_exists(const char *filename); 31*4882a593Smuzhiyun int sandbox_fs_size(const char *filename, loff_t *size); 32*4882a593Smuzhiyun int fs_read_sandbox(const char *filename, void *buf, loff_t offset, loff_t len, 33*4882a593Smuzhiyun loff_t *actread); 34*4882a593Smuzhiyun int fs_write_sandbox(const char *filename, void *buf, loff_t offset, 35*4882a593Smuzhiyun loff_t len, loff_t *actwrite); 36*4882a593Smuzhiyun 37*4882a593Smuzhiyun #endif 38