summaryrefslogtreecommitdiff
path: root/src/user/include/knob
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-06-21 17:47:13 -0400
committerBenji Dial <benji6283@gmail.com>2021-06-21 17:47:13 -0400
commitf57e2eabe0a10c9732c83532e01654a499fb8dcf (patch)
treecbf91a23fcdd65e0ea7ed55b0940ca7042d59bef /src/user/include/knob
parent83835306d57461205a7bcfef9f4c3e06bc504006 (diff)
downloadportland-os-f57e2eabe0a10c9732c83532e01654a499fb8dcf.tar.gz
many, many changes; settings is broken
Diffstat (limited to 'src/user/include/knob')
-rw-r--r--src/user/include/knob/block.h1
-rw-r--r--src/user/include/knob/file.h4
-rw-r--r--src/user/include/knob/heap.h2
3 files changed, 3 insertions, 4 deletions
diff --git a/src/user/include/knob/block.h b/src/user/include/knob/block.h
index 27cb83b..5766245 100644
--- a/src/user/include/knob/block.h
+++ b/src/user/include/knob/block.h
@@ -16,6 +16,7 @@ uint32_t strcpy(char *to, const char *from);
//allocates new memory
char *strdup(const char *from);
+char *strndup(const char *from, uint32_t new_len);
//without null-terminator
uint32_t strlen(const char *str) __attribute__ ((pure));
diff --git a/src/user/include/knob/file.h b/src/user/include/knob/file.h
index 04fc201..f98a15c 100644
--- a/src/user/include/knob/file.h
+++ b/src/user/include/knob/file.h
@@ -10,13 +10,11 @@ extern "C" {
struct file;
-const char *remove_prefix(const char *path, uint8_t *dn_out);
-
struct file *open_file(const char *path);
void close_file(struct file *f);
uint32_t read_from_file(struct file *f, uint32_t max, void *buf);
-uint32_t write_to_file(struct file *f, uint32_t max, void *buf);
+uint32_t write_to_file(struct file *f, uint32_t max, const 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);
diff --git a/src/user/include/knob/heap.h b/src/user/include/knob/heap.h
index c0d7006..d7b0773 100644
--- a/src/user/include/knob/heap.h
+++ b/src/user/include/knob/heap.h
@@ -8,7 +8,7 @@ extern "C" {
#include <stdint.h>
void *get_block(uint32_t bytes) __attribute__ ((malloc));
-void free_block(void *block);
+void free_block(const void *block);
#ifdef __cplusplus
}