mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 08:13:44 +01:00
@@ -11,9 +11,9 @@ static void printZpool(FFZpoolOptions* options, FFZpoolResult* result, uint8_t i
|
||||
FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate();
|
||||
if (options->moduleArgs.key.length == 0) {
|
||||
if (result->name.length > 0) {
|
||||
ffStrbufSetF(&buffer, "%s (%s)", FF_ZPOOL_MODULE_NAME, result->name.chars);
|
||||
ffStrbufSetF(&buffer, "%s (%s)", FF_MODULE_GET_DISPLAY_NAME(Zpool), result->name.chars);
|
||||
} else {
|
||||
ffStrbufSetS(&buffer, FF_ZPOOL_MODULE_NAME);
|
||||
ffStrbufSetS(&buffer, FF_MODULE_GET_DISPLAY_NAME(Zpool));
|
||||
}
|
||||
} else {
|
||||
ffStrbufClear(&buffer);
|
||||
@@ -105,11 +105,11 @@ bool ffPrintZpool(FFZpoolOptions* options) {
|
||||
const char* error = ffDetectZpool(&results);
|
||||
|
||||
if (error) {
|
||||
ffPrintError(FF_ZPOOL_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "%s", error);
|
||||
ffPrintError(FF_MODULE_GET_DISPLAY_NAME(Zpool), 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "%s", error);
|
||||
return false;
|
||||
}
|
||||
if (results.length == 0) {
|
||||
ffPrintError(FF_ZPOOL_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "%s", "No zpool found");
|
||||
ffPrintError(FF_MODULE_GET_DISPLAY_NAME(Zpool), 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "%s", "No zpool found");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ void ffParseZpoolJsonObject(FFZpoolOptions* options, yyjson_val* module) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ffPrintError(FF_ZPOOL_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "Unknown JSON key %s", unsafe_yyjson_get_str(key));
|
||||
ffPrintError(FF_MODULE_GET_DISPLAY_NAME(Zpool), 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, "Unknown JSON key %s", unsafe_yyjson_get_str(key));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -192,7 +192,7 @@ void ffDestroyZpoolOptions(FFZpoolOptions* options) {
|
||||
}
|
||||
|
||||
FFModuleBaseInfo ffZpoolModuleInfo = {
|
||||
.name = FF_ZPOOL_MODULE_NAME,
|
||||
.name = "Zpool",
|
||||
.description = "Print ZFS storage pools",
|
||||
.displayName = {
|
||||
.en = "Zpool",
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
|
||||
#include "option.h"
|
||||
|
||||
#define FF_ZPOOL_MODULE_NAME "Zpool"
|
||||
|
||||
bool ffPrintZpool(FFZpoolOptions* options);
|
||||
void ffInitZpoolOptions(FFZpoolOptions* options);
|
||||
void ffDestroyZpoolOptions(FFZpoolOptions* options);
|
||||
|
||||
Reference in New Issue
Block a user