PhysicalDisk: renames hideUnknown for hideUnused

This commit is contained in:
李通洲
2026-04-09 10:10:51 +08:00
parent 9090dbd276
commit e8e43c10fc
11 changed files with 25 additions and 25 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ typedef enum __attribute__((__packed__)) FFPhysicalDiskType {
FF_PHYSICALDISK_TYPE_READWRITE = 1 << 5,
FF_PHYSICALDISK_TYPE_READONLY = 1 << 6,
FF_PHYSICALDISK_TYPE_UNKNOWN = 1 << 7,
FF_PHYSICALDISK_TYPE_UNUSED = 1 << 7,
FF_PHYSICALDISK_TYPE_FORCE_UNSIGNED = UINT8_MAX,
} FFPhysicalDiskType;
+6 -6
View File
@@ -151,14 +151,14 @@ void ffParsePhysicalDiskJsonObject(FFPhysicalDiskOptions* options, yyjson_val* m
continue;
}
if (unsafe_yyjson_equals_str(key, "hideUnknown")) {
if (unsafe_yyjson_equals_str(key, "hideUnused")) {
if (!yyjson_is_bool(val)) {
ffPrintError(FF_PHYSICALDISK_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "hideUnknown must be a boolean");
ffPrintError(FF_PHYSICALDISK_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "hideUnused must be a boolean");
} else {
if (unsafe_yyjson_is_true(val)) {
options->hideType |= FF_PHYSICALDISK_TYPE_UNKNOWN;
options->hideType |= FF_PHYSICALDISK_TYPE_UNUSED;
} else {
options->hideType &= ~FF_PHYSICALDISK_TYPE_UNKNOWN;
options->hideType &= ~FF_PHYSICALDISK_TYPE_UNUSED;
}
}
continue;
@@ -225,7 +225,7 @@ bool ffGeneratePhysicalDiskJsonResult(FFPhysicalDiskOptions* options, yyjson_mut
yyjson_mut_obj_add_null(doc, obj, "readOnly");
}
yyjson_mut_obj_add_bool(doc, obj, "unknown", !!(dev->type & FF_PHYSICALDISK_TYPE_UNKNOWN));
yyjson_mut_obj_add_bool(doc, obj, "unknown", !!(dev->type & FF_PHYSICALDISK_TYPE_UNUSED));
yyjson_mut_obj_add_strbuf(doc, obj, "revision", &dev->revision);
@@ -253,7 +253,7 @@ void ffInitPhysicalDiskOptions(FFPhysicalDiskOptions* options) {
ffStrbufInit(&options->namePrefix);
options->temp = false;
options->tempConfig = (FFColorRangeConfig) { 50, 70 };
options->hideType = FF_PHYSICALDISK_TYPE_UNKNOWN;
options->hideType = FF_PHYSICALDISK_TYPE_UNUSED;
}
void ffDestroyPhysicalDiskOptions(FFPhysicalDiskOptions* options) {