* code for more information.
*/
int smh_load(const char *fname, void *memp, int avail, int verbose);
-int smh_read(int fd, void *memp, int len);
-int smh_open(const char *fname, char *modestr);
-int smh_close(int fd);
-int smh_len_fd(int fd);
int smh_len(const char *fname);
#endif /* __SEMIHOSTING_H__ */
#define MODE_READ 0x0
#define MODE_READBIN 0x1
+static int smh_read(int fd, void *memp, int len);
+static int smh_open(const char *fname, char *modestr);
+static int smh_close(int fd);
+static int smh_len_fd(int fd);
+
/*
* Call the handler
*/
/*
* Read 'len' bytes of file into 'memp'. Returns 0 on success, else failure
*/
-int smh_read(int fd, void *memp, int len)
+static int smh_read(int fd, void *memp, int len)
{
int ret;
struct smh_read_s {
* Open a file on the host. Mode is "r" or "rb" currently. Returns a file
* descriptor or -1 on error.
*/
-int smh_open(const char *fname, char *modestr)
+static int smh_open(const char *fname, char *modestr)
{
int ret, fd, mode;
struct smh_open_s {
/*
* Close the file using the file descriptor
*/
-int smh_close(int fd)
+static int smh_close(int fd)
{
int ret;
long fdlong;
/*
* Get the file length from the file descriptor
*/
-int smh_len_fd(int fd)
+static int smh_len_fd(int fd)
{
int ret;
long fdlong;