From a45e9ae97ab2bdcdfb5058935cc656d450fe77c6 Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Tue, 1 Dec 2020 22:31:03 -0800 Subject: [PATCH] cut base64 and cJSON modules out. fix read! this wasn't too bad --- .gitmodules | 6 ------ fs/base64 | 1 - fs/cJSON | 1 - fs/tabfs.c | 9 ++------- 4 files changed, 2 insertions(+), 15 deletions(-) delete mode 160000 fs/base64 delete mode 160000 fs/cJSON diff --git a/.gitmodules b/.gitmodules index 83e5456..0abc4ca 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,3 @@ -[submodule "fs/cJSON"] - path = fs/cJSON - url = https://github.com/DaveGamble/cJSON.git -[submodule "fs/base64"] - path = fs/base64 - url = https://github.com/zhicheng/base64.git [submodule "fs/frozen"] path = fs/frozen url = https://github.com/cesanta/frozen.git diff --git a/fs/base64 b/fs/base64 deleted file mode 160000 index 6148c69..0000000 --- a/fs/base64 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6148c6944469d629a94a1695eb91989030762ffc diff --git a/fs/cJSON b/fs/cJSON deleted file mode 160000 index 2c914c0..0000000 --- a/fs/cJSON +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 2c914c073d71701b596fa58a84529712a0bd1eeb diff --git a/fs/tabfs.c b/fs/tabfs.c index 274656c..3e53810 100644 --- a/fs/tabfs.c +++ b/fs/tabfs.c @@ -11,15 +11,9 @@ #include #include -#include "cJSON/cJSON.h" -#include "cJSON/cJSON.c" - #include "frozen/frozen.h" #include "frozen/frozen.c" -#include "base64/base64.h" -#include "base64/base64.c" - FILE* l; static void send_request(const char *fmt, ...) { @@ -191,10 +185,11 @@ tabfs_read(const char *path, char *buf, size_t size, off_t offset, send_request("{op: %Q, path: %Q, size: %d, offset: %d, fh: %d, flags: %d}", "read", path, size, offset, fi->fh, fi->flags); + // FIXME: base64 char *scan_buf; receive_response("{buf: %Q}", &scan_buf); snprintf(buf, size, "%s", scan_buf); free(scan_buf); - return 0; + return strlen(scan_buf); /* MAKE_REQ("read", { */ /* cJSON_AddStringToObject(req, "path", path); */