From c9bb7e7766c76cd75eb782e7531c6a0ab6129165 Mon Sep 17 00:00:00 2001 From: suchmememanyskill Date: Sun, 1 Aug 2021 19:29:04 +0200 Subject: [PATCH] Add some fuse features --- source/script/standardLibrary.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/source/script/standardLibrary.c b/source/script/standardLibrary.c index 27efb02..3f4022b 100644 --- a/source/script/standardLibrary.c +++ b/source/script/standardLibrary.c @@ -26,6 +26,7 @@ #include "../fs/fsutils.h" #include #include "../storage/emmcfile.h" +#include #endif // Takes [int, function]. Returns elseable. ClassFunction(stdIf) { @@ -461,6 +462,14 @@ ClassFunction(stdPower){ return &emptyClass; } +ClassFunction(stdIsPatched){ + return newIntVariablePtr(fuse_check_patched_rcm()); +} + +ClassFunction(stdHwType){ + return newIntVariablePtr(fuse_read_hw_type()); +} + #else #define STUBBED(name) ClassFunction(name) { return newIntVariablePtr(0); } @@ -543,6 +552,8 @@ ClassFunctionTableEntry_t standardFunctionDefenitions[] = { {"emmcwrite", stdEmmcFileWrite, 2, twoStringArgStd}, {"emummcread", stdEmummcFileRead, 2, twoStringArgStd}, {"emummcwrite", stdEmummcFileWrite, 2, twoStringArgStd}, + {"fuse_patched", stdIsPatched, 0, 0}, + {"fuse_hwtype", stdHwType, 0, 0}, // FileSystem // Dir