From 63d16ca854fc8795e9b1314baaf715b78525a5a9 Mon Sep 17 00:00:00 2001 From: Carter Li Date: Tue, 25 Aug 2026 16:30:04 +0800 Subject: [PATCH] Top: removes option `kernelTask` (never implemented) --- doc/json_schema.json | 5 ----- src/modules/top/option.h | 1 - src/modules/top/top.c | 6 ++---- 3 files changed, 2 insertions(+), 10 deletions(-) diff --git a/doc/json_schema.json b/doc/json_schema.json index 411cb9ce0..a34d00fcf 100644 --- a/doc/json_schema.json +++ b/doc/json_schema.json @@ -4466,11 +4466,6 @@ "description": "Print all process on a single line", "default": false }, - "kernelTask": { - "type": "boolean", - "description": "Whether to include kernel tasks (kworker, System, kernel_task) in the process list", - "default": false - }, "percent": { "$ref": "#/$defs/percent" }, diff --git a/src/modules/top/option.h b/src/modules/top/option.h index d40cff6fc..3b58118a2 100644 --- a/src/modules/top/option.h +++ b/src/modules/top/option.h @@ -17,7 +17,6 @@ typedef struct FFTopOptions { uint32_t waitTime; FFPercentageModuleConfig percent; bool compact; - bool kernelTask; // Whether to include kernel tasks (kworker, System, kernel_task) in the process list } FFTopOptions; static_assert(sizeof(FFTopOptions) <= FF_OPTION_MAX_SIZE, "FFTopOptions size exceeds maximum allowed size"); diff --git a/src/modules/top/top.c b/src/modules/top/top.c index a8b924fe3..b36a3a1cc 100644 --- a/src/modules/top/top.c +++ b/src/modules/top/top.c @@ -138,7 +138,6 @@ void ffGenerateTopJsonConfig(FFTopOptions* options, yyjson_mut_doc* doc, yyjson_ yyjson_mut_obj_add_uint(doc, module, "processes", options->nProcesses); yyjson_mut_obj_add_uint(doc, module, "waitTime", options->waitTime); yyjson_mut_obj_add_bool(doc, module, "compact", options->compact); - yyjson_mut_obj_add_bool(doc, module, "kernelTask", options->kernelTask); ffPercentGenerateJsonConfig(doc, module, options->percent); } @@ -173,7 +172,6 @@ void ffInitTopOptions(FFTopOptions* options) { options->nProcesses = 5; options->waitTime = 500; options->compact = false; - options->kernelTask = false; options->percent = (FFPercentageModuleConfig){ 50, 80, 0 }; } @@ -218,8 +216,8 @@ FFModuleBaseInfo ffTopModuleInfo = { { "Process ID", "pid" }, { "CPU usage", "cpu" }, { "Memory usage (RSS) in bytes", "mem" }, - { "Disk read bytes per second", "disk-read" }, - { "Disk write bytes per second", "disk-write" }, + { "Disk read bytes per second (0 if unsupported)", "disk-read" }, + { "Disk write bytes per second (0 if unsupported)", "disk-write" }, { "CPU usage percentage", "cpu-percentage" }, { "Memory usage (RSS) formatted", "mem-formatted" }, { "Disk read formatted", "disk-read-formatted" },