Kernel (Windows): move kernel.displayVersion to OS.codeName

This commit is contained in:
李通洲
2025-09-30 10:01:01 +08:00
parent 9b1e318bd1
commit 1594a69d6c
6 changed files with 40 additions and 36 deletions
+1 -8
View File
@@ -10,12 +10,7 @@ bool ffPrintKernel(FFKernelOptions* options)
if(options->moduleArgs.outputFormat.length == 0)
{
ffPrintLogoAndKey(FF_KERNEL_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT);
printf("%s %s", info->name.chars, info->release.chars);
if(info->displayVersion.length > 0)
printf(" (%s)\n", info->displayVersion.chars);
else
putchar('\n');
printf("%s %s\n", info->name.chars, info->release.chars);
}
else
{
@@ -26,7 +21,6 @@ bool ffPrintKernel(FFKernelOptions* options)
FF_FORMAT_ARG(info->release, "release"),
FF_FORMAT_ARG(info->version, "version"),
FF_FORMAT_ARG(info->architecture, "arch"),
FF_FORMAT_ARG(info->displayVersion, "display-version"),
FF_FORMAT_ARG(str, "page-size"),
}));
}
@@ -61,7 +55,6 @@ bool ffGenerateKernelJsonResult(FF_MAYBE_UNUSED FFKernelOptions* options, yyjson
yyjson_mut_obj_add_strbuf(doc, obj, "name", &info->name);
yyjson_mut_obj_add_strbuf(doc, obj, "release", &info->release);
yyjson_mut_obj_add_strbuf(doc, obj, "version", &info->version);
yyjson_mut_obj_add_strbuf(doc, obj, "displayVersion", &info->displayVersion);
yyjson_mut_obj_add_uint(doc, obj, "pageSize", info->pageSize);
return true;