sandboxfs.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  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. #ifndef __SANDBOX_FS__
  18. #define __SANDBOX_FS__
  19. int sandbox_fs_set_blk_dev(struct blk_desc *rbdd, disk_partition_t *info);
  20. int sandbox_fs_read_at(const char *filename, loff_t pos, void *buffer,
  21. loff_t maxsize, loff_t *actread);
  22. int sandbox_fs_write_at(const char *filename, loff_t pos, void *buffer,
  23. loff_t maxsize, loff_t *actwrite);
  24. void sandbox_fs_close(void);
  25. int sandbox_fs_ls(const char *dirname);
  26. int sandbox_fs_exists(const char *filename);
  27. int sandbox_fs_size(const char *filename, loff_t *size);
  28. int fs_read_sandbox(const char *filename, void *buf, loff_t offset, loff_t len,
  29. loff_t *actread);
  30. int fs_write_sandbox(const char *filename, void *buf, loff_t offset,
  31. loff_t len, loff_t *actwrite);
  32. #endif