summaryrefslogtreecommitdiff
path: root/src/user/include/knob
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-02-17 17:59:05 -0500
committerBenji Dial <benji6283@gmail.com>2021-02-17 17:59:05 -0500
commit79973061600a2af480c4f8ec1e1e71846985b653 (patch)
treef63a54b5116bd19e2f82b14261c65584d80407f5 /src/user/include/knob
parent302666775a00b1df398ca06b97aa481a6626045d (diff)
downloadportland-os-79973061600a2af480c4f8ec1e1e71846985b653.tar.gz
dirlist program, making fat refuse to list file as directory
Diffstat (limited to 'src/user/include/knob')
-rw-r--r--src/user/include/knob/block.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/user/include/knob/block.h b/src/user/include/knob/block.h
index f77709d..1231a6d 100644
--- a/src/user/include/knob/block.h
+++ b/src/user/include/knob/block.h
@@ -18,4 +18,10 @@ uint32_t strlen(const char *str) __attribute__ ((pure));
bool strequ(const char *a, const char *b) __attribute__ ((pure));
+//if str has length == len, nothing is done
+//if str has length < len, it is right-padded with spaces
+//if str has length > len, the end is replaced with " ..."
+//this replacement happens in place, with no memory allocation
+void str_trunc_fill(char *str, uint32_t len);
+
#endif \ No newline at end of file