X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-uboot.git;a=blobdiff_plain;f=include%2Fos.h;h=fa4e39fc74c9eb516fa25096cfdfa70c9bfdc8d7;hp=d302b3685bb56e41f1ddd2fcf9e9daa6033d6a4f;hb=cfd13e8dda9d2db3f6bdf32d623aecf10ee1ba50;hpb=91b136c7989e763b01632ca3de6fca8ead0b847b diff --git a/include/os.h b/include/os.h index d302b3685b..fa4e39fc74 100644 --- a/include/os.h +++ b/include/os.h @@ -83,6 +83,14 @@ int os_open(const char *pathname, int flags); */ int os_close(int fd); +/** + * Access to the OS unlink() system call + * + * \param pathname Path of file to delete + * \return 0 for success, other for error + */ +int os_unlink(const char *pathname); + /** * Access to the OS exit() system call * @@ -113,7 +121,7 @@ void *os_malloc(size_t length); * * \param ptr Pointer to memory block to free */ -void *os_free(void *ptr); +void os_free(void *ptr); /** * Reallocate previously-allocated memory to increase/decrease space @@ -229,4 +237,20 @@ void os_putc(int ch); */ void os_puts(const char *str); +/** + * Write the sandbox RAM buffer to a existing file + * + * @param fname Filename to write memory to (simple binary format) + * @return 0 if OK, -ve on error + */ +int os_write_ram_buf(const char *fname); + +/** + * Read the sandbox RAM buffer from an existing file + * + * @param fname Filename containing memory (simple binary format) + * @return 0 if OK, -ve on error + */ +int os_read_ram_buf(const char *fname); + #endif