X-Git-Url: https://review.openocd.org/gitweb?a=blobdiff_plain;f=src%2Fhelper%2Ffileio.h;h=597bafc0124ae5c53934bb9f866d61f9f6b57284;hb=3cfbf705597732c7b6a5b11a556c818529ea725b;hp=6ed6fe454e7f4c918e882b584e2e3c3459018f04;hpb=69df712d1d06b2c698bed3de086b9f734de73b7e;p=openocd.git diff --git a/src/helper/fileio.h b/src/helper/fileio.h index 6ed6fe454e..597bafc012 100644 --- a/src/helper/fileio.h +++ b/src/helper/fileio.h @@ -26,7 +26,7 @@ #ifndef FILEIO_H #define FILEIO_H -#include "types.h" +#include #define FILEIO_MAX_ERROR_STRING (128) @@ -58,13 +58,13 @@ int fileio_open(struct fileio *fileio, const char *url, enum fileio_access access, enum fileio_type type); int fileio_close(struct fileio *fileio); -int fileio_seek(struct fileio *fileio, uint32_t position); -int fileio_fgets(struct fileio *fileio, uint32_t size, char *buffer); +int fileio_seek(struct fileio *fileio, size_t position); +int fileio_fgets(struct fileio *fileio, size_t size, void *buffer); int fileio_read(struct fileio *fileio, - uint32_t size, uint8_t *buffer, uint32_t *size_read); + size_t size, void *buffer, size_t *size_read); int fileio_write(struct fileio *fileio, - uint32_t size, const uint8_t *buffer, uint32_t *size_written); + size_t size, const void *buffer, size_t *size_written); int fileio_read_u32(struct fileio *fileio, uint32_t *data); int fileio_write_u32(struct fileio *fileio, uint32_t data);