diff options
Diffstat (limited to 'src/user/include/knob')
-rw-r--r-- | src/user/include/knob/block.h | 5 | ||||
-rw-r--r-- | src/user/include/knob/file.h | 3 | ||||
-rw-r--r-- | src/user/include/knob/user.h | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/src/user/include/knob/block.h b/src/user/include/knob/block.h index 2aa2b36..4625577 100644 --- a/src/user/include/knob/block.h +++ b/src/user/include/knob/block.h @@ -1,7 +1,10 @@ #ifndef KNOB_BLOCK_H #define KNOB_BLOCK_H +#include <stdbool.h> +#include <stdint.h> + void blockcpy(void *to, const void *from, uint32_t size); -bool blockequ(void *a, void *b, uint32_t size) __attribute__ ((__pure__)); +bool blockequ(const void *a, const void *b, uint32_t size) __attribute__ ((__pure__)); #endif
\ No newline at end of file diff --git a/src/user/include/knob/file.h b/src/user/include/knob/file.h index 4d0da87..a0d084f 100644 --- a/src/user/include/knob/file.h +++ b/src/user/include/knob/file.h @@ -9,8 +9,11 @@ const char *remove_prefix(const char *path, uint8_t *dn_out); struct file *open_file(const char *path); void close_file(struct file *f); +void _close_all_files(); uint32_t read_from_file(struct file *f, uint32_t max, void *buf); +//return value and max_length don't include null terminator +uint32_t read_line_from_file(struct file *f, char *sz, uint32_t max_length); uint32_t seek_file_to(struct file *f, uint32_t to); int32_t seek_file_by(struct file *f, int32_t by); diff --git a/src/user/include/knob/user.h b/src/user/include/knob/user.h index 45caab4..479a731 100644 --- a/src/user/include/knob/user.h +++ b/src/user/include/knob/user.h @@ -4,7 +4,6 @@ #include <stdint.h> void tell_user_sz(const char *sz); -void tell_user_n(uint32_t n); //return value and max_length don't include null terminator //returns the real length of the string |