semihostingfs.h 598 B

123456789101112131415161718192021
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2022, Sean Anderson <sean.anderson@seco.com>
  4. * Copyright (c) 2012, Google Inc.
  5. */
  6. #ifndef __SEMIHOSTING_FS__
  7. #define __SEMIHOSTING_FS__
  8. struct blk_desc;
  9. struct disk_partition;
  10. int smh_fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
  11. void smh_fs_close(void);
  12. int smh_fs_size(const char *filename, loff_t *size);
  13. int smh_fs_read(const char *filename, void *buf, loff_t offset, loff_t len,
  14. loff_t *actread);
  15. int smh_fs_write(const char *filename, void *buf, loff_t offset,
  16. loff_t len, loff_t *actwrite);
  17. #endif