2021-02-18 22:25:36 +01:00
|
|
|
#include "fastfetch.h"
|
|
|
|
|
|
2021-04-15 18:59:26 +02:00
|
|
|
#define FF_KERNEL_MODULE_NAME "Kernel"
|
|
|
|
|
#define FF_KERNEL_NUM_FORMAT_ARGS 3
|
|
|
|
|
|
2021-02-27 18:30:05 +01:00
|
|
|
void ffPrintKernel(FFinstance* instance)
|
2021-02-18 22:25:36 +01:00
|
|
|
{
|
2021-03-23 19:48:52 +01:00
|
|
|
if(instance->config.kernelFormat.length == 0)
|
2021-03-19 20:57:07 +01:00
|
|
|
{
|
2021-04-15 18:59:26 +02:00
|
|
|
ffPrintLogoAndKey(instance, FF_KERNEL_MODULE_NAME, 0, &instance->config.kernelKey);
|
2021-03-07 20:35:17 +01:00
|
|
|
puts(instance->state.utsname.release);
|
2021-03-19 20:57:07 +01:00
|
|
|
}
|
2021-03-27 15:39:56 +01:00
|
|
|
else
|
|
|
|
|
{
|
2021-04-15 18:59:26 +02:00
|
|
|
ffPrintFormatString(instance, FF_KERNEL_MODULE_NAME, 0, &instance->config.kernelKey, &instance->config.kernelFormat, NULL, FF_KERNEL_NUM_FORMAT_ARGS, (FFformatarg[]){
|
|
|
|
|
{FF_FORMAT_ARG_TYPE_STRING, instance->state.utsname.sysname},
|
|
|
|
|
{FF_FORMAT_ARG_TYPE_STRING, instance->state.utsname.release},
|
|
|
|
|
{FF_FORMAT_ARG_TYPE_STRING, instance->state.utsname.version}
|
|
|
|
|
});
|
2021-03-27 15:39:56 +01:00
|
|
|
}
|
2021-03-27 18:14:19 +01:00
|
|
|
}
|