summaryrefslogtreecommitdiff
path: root/src/user/lib/camellia.c
diff options
context:
space:
mode:
authordzwdz2023-08-14 18:51:07 +0200
committerdzwdz2023-08-14 18:51:07 +0200
commit642b5fb0007b64c77d186fcb018d571152ee1d47 (patch)
tree1c466461f3602d306be309a053edae558ef2568e /src/user/lib/camellia.c
parent8050069c57b729c18c19b1a03ab6e4bf63b4735e (diff)
reorganization: first steps
Diffstat (limited to 'src/user/lib/camellia.c')
-rw-r--r--src/user/lib/camellia.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/user/lib/camellia.c b/src/user/lib/camellia.c
deleted file mode 100644
index 4e092e4..0000000
--- a/src/user/lib/camellia.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <camellia.h>
-#include <camellia/syscalls.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-hid_t camellia_open(const char *path, int flags) {
- hid_t ret;
- char *buf;
- size_t len;
-
- if (path == NULL)
- return errno = EINVAL, -EINVAL;
- if (flags & OPEN_CREATE)
- flags |= OPEN_WRITE;
-
- len = absolutepath(NULL, path, 0);
- buf = malloc(len);
- if (!buf)
- return -errno;
- absolutepath(buf, path, len);
- ret = _sys_open(buf, strlen(buf), flags);
- free(buf);
-
- if (ret < 0)
- errno = -ret;
-
- return ret;
-}