From 6e5a5a3b27257f212fcd10a3580cfca3ea224fab Mon Sep 17 00:00:00 2001 From: dzwdz Date: Wed, 4 Aug 2021 12:27:02 +0200 Subject: partial path_simplify implementation it currently only checks if the path is valid, it's the bare minimum needed to write tests --- src/kernel/vfs/path.h | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/kernel/vfs/path.h (limited to 'src/kernel/vfs/path.h') diff --git a/src/kernel/vfs/path.h b/src/kernel/vfs/path.h new file mode 100644 index 0000000..22dc754 --- /dev/null +++ b/src/kernel/vfs/path.h @@ -0,0 +1,11 @@ +#pragma once +#include +#include + +/** Reduce a path to its simplest form. + * *in and *out can't overlap unless they're equal. Then, the path is modified + * in-place. + * + * @return Was the path valid? If this is false, *out is undefined + */ +bool path_simplify(const char *in, char *out, size_t len); -- cgit v1.2.3