JsonConfig: write all flags when generating config file

This commit is contained in:
李通洲
2025-08-04 16:46:28 +08:00
parent e753d4d3a4
commit fa4e11c73b
83 changed files with 700 additions and 932 deletions
+3 -7
View File
@@ -157,15 +157,11 @@ void ffParsePhysicalDiskJsonObject(FFPhysicalDiskOptions* options, yyjson_val* m
void ffGeneratePhysicalDiskJsonConfig(FFPhysicalDiskOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
{
__attribute__((__cleanup__(ffDestroyPhysicalDiskOptions))) FFPhysicalDiskOptions defaultOptions;
ffInitPhysicalDiskOptions(&defaultOptions);
ffJsonConfigGenerateModuleArgsConfig(doc, module, &options->moduleArgs);
ffJsonConfigGenerateModuleArgsConfig(doc, module, &defaultOptions.moduleArgs, &options->moduleArgs);
yyjson_mut_obj_add_strbuf(doc, module, "namePrefix", &options->namePrefix);
if (!ffStrbufEqual(&options->namePrefix, &defaultOptions.namePrefix))
yyjson_mut_obj_add_strbuf(doc, module, "namePrefix", &options->namePrefix);
ffTempsGenerateJsonConfig(doc, module, defaultOptions.temp, defaultOptions.tempConfig, options->temp, options->tempConfig);
ffTempsGenerateJsonConfig(doc, module, options->temp, options->tempConfig);
}
void ffGeneratePhysicalDiskJsonResult(FFPhysicalDiskOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)