Modules: return bool to indicate whether the detection is succeeded

This commit is contained in:
李通洲
2025-08-18 13:38:30 +08:00
parent a9aaa36b2c
commit 3b5e9c74d6
147 changed files with 869 additions and 538 deletions
+6 -2
View File
@@ -5,7 +5,7 @@
#include "modules/version/version.h"
#include "util/stringUtils.h"
void ffPrintVersion(FFVersionOptions* options)
bool ffPrintVersion(FFVersionOptions* options)
{
FFVersionResult* result = &ffVersionResult;
@@ -42,6 +42,8 @@ void ffPrintVersion(FFVersionOptions* options)
FF_FORMAT_ARG(buf, "libc"),
}));
}
return true;
}
void ffParseVersionJsonObject(FFVersionOptions* options, yyjson_val* module)
@@ -62,7 +64,7 @@ void ffGenerateVersionJsonConfig(FFVersionOptions* options, yyjson_mut_doc* doc,
ffJsonConfigGenerateModuleArgsConfig(doc, module, &options->moduleArgs);
}
void ffGenerateVersionJsonResult(FF_MAYBE_UNUSED FFVersionOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
bool ffGenerateVersionJsonResult(FF_MAYBE_UNUSED FFVersionOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
{
FFVersionResult* result = &ffVersionResult;
@@ -92,6 +94,8 @@ void ffGenerateVersionJsonResult(FF_MAYBE_UNUSED FFVersionOptions* options, yyjs
}
yyjson_mut_obj_add_strbuf(doc, obj, "libc", &buf);
}
return true;
}
void ffInitVersionOptions(FFVersionOptions* options)
+1 -1
View File
@@ -4,7 +4,7 @@
#define FF_VERSION_MODULE_NAME "Version"
void ffPrintVersion(FFVersionOptions* options);
bool ffPrintVersion(FFVersionOptions* options);
void ffInitVersionOptions(FFVersionOptions* options);
void ffDestroyVersionOptions(FFVersionOptions* options);