summaryrefslogtreecommitdiff
path: root/src/user/knob/block.c
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2020-09-19 14:53:29 -0400
committerBenji Dial <benji6283@gmail.com>2020-09-19 14:53:29 -0400
commitde20d7430df08731d9108acb83e1234ba7f1fe16 (patch)
tree8646f3d1bae3d30391df34766e3e58c0c2af8aab /src/user/knob/block.c
parent20853582d5385d12421433d21910e783caa00764 (diff)
downloadportland-os-de20d7430df08731d9108acb83e1234ba7f1fe16.tar.gz
file manager
Diffstat (limited to 'src/user/knob/block.c')
-rw-r--r--src/user/knob/block.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/user/knob/block.c b/src/user/knob/block.c
index 7524ad3..4ec0564 100644
--- a/src/user/knob/block.c
+++ b/src/user/knob/block.c
@@ -14,4 +14,13 @@ bool blockequ(const void *a, const void *b, uint32_t size) {
if (*(uint8_t *)(a++) != *(uint8_t *)(b++))
return false;
return true;
+}
+
+//returns length without null-terminator
+uint32_t strcpy(char *to, const char *from) {
+ uint32_t i = 0;
+ do
+ to[i] = from[i];
+ while (from[i++]);
+ return i - 1;
} \ No newline at end of file