~funderscore blog cgit wiki get in touch
aboutsummaryrefslogtreecommitdiff
blob: 25ebdbbeff30a6ebb69a3fdb9409325f04458fe6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* SPDX-License-Identifier: GPL-2.0+ */
/*
 * Copyright (C) 2022, Sean Anderson <sean.anderson@seco.com>
 * Copyright (c) 2012, Google Inc.
 */

#ifndef __SEMIHOSTING_FS__
#define __SEMIHOSTING_FS__

struct blk_desc;
struct disk_partition;

int smh_fs_set_blk_dev(struct blk_desc *rbdd, struct disk_partition *info);
void smh_fs_close(void);
int smh_fs_size(const char *filename, loff_t *size);
int smh_fs_read(const char *filename, void *buf, loff_t offset, loff_t len,
		loff_t *actread);
int smh_fs_write(const char *filename, void *buf, loff_t offset,
		 loff_t len, loff_t *actwrite);

#endif