print logo in ffPrintAndSaveCachedValue

This commit is contained in:
Linus Dierheimer
2021-03-21 20:46:20 +01:00
parent 2004544528
commit 071b2c6727
8 changed files with 2 additions and 15 deletions
+1
View File
@@ -305,6 +305,7 @@ bool ffPrintCachedValue(FFinstance* instance, const char* key)
void ffPrintAndSaveCachedValue(FFinstance* instance, const char* key, FFstrbuf* value)
{
ffPrintLogoAndKey(instance, key);
ffStrbufWriteTo(value, stdout);
putchar('\n');
-2
View File
@@ -33,8 +33,6 @@ void ffPrintCPU(FFinstance* instance)
int numProcs = get_nprocs();
ffPrintLogoAndKey(instance, "CPU");
FF_STRBUF_CREATE(cpu);
if(ffStrbufIsEmpty(&instance->config.cpuFormat))
+1 -3
View File
@@ -11,8 +11,6 @@ static void handleGPU(FFinstance* instance, struct pci_access* pacc, struct pci_
if(ffPrintCachedValue(instance, key))
return;
FF_STRBUF_CREATE(gpu);
char vendor[512];
ffpci_lookup_name(pacc, vendor, sizeof(vendor), PCI_LOOKUP_VENDOR, dev->vendor_id, dev->device_id);
@@ -25,7 +23,7 @@ static void handleGPU(FFinstance* instance, struct pci_access* pacc, struct pci_
char name[512];
ffpci_lookup_name(pacc, name, sizeof(name), PCI_LOOKUP_DEVICE, dev->vendor_id, dev->device_id);
ffPrintLogoAndKey(instance, "GPU");
FF_STRBUF_CREATE(gpu);
if(ffStrbufIsEmpty(&instance->config.gpuFormat))
{
-2
View File
@@ -20,8 +20,6 @@ void ffPrintHost(FFinstance* instance)
return;
}
ffPrintLogoAndKey(instance, "Host");
FF_STRBUF_CREATE(host);
if(!ffStrbufIsEmpty(&instance->config.hostFormat))
-2
View File
@@ -39,8 +39,6 @@ void ffPrintLocale(FFinstance* instance)
fclose(fp);
}
ffPrintLogoAndKey(instance, "Locale");
FF_STRBUF_CREATE(locale);
if(ffStrbufIsEmpty(&instance->config.localeFormat))
-2
View File
@@ -13,8 +13,6 @@ void ffPrintOS(FFinstance* instance)
return;
}
ffPrintLogoAndKey(instance, "OS");
FF_STRBUF_CREATE(os);
if(!ffStrbufIsEmpty(&instance->config.osFormat))
-2
View File
@@ -74,8 +74,6 @@ void ffPrintResolution(FFinstance* instance)
dlclose(x11);
ffPrintLogoAndKey(instance, "Resolution");
FF_STRBUF_CREATE(resolution);
if(!ffStrbufIsEmpty(&instance->config.resolutionFormat))
-2
View File
@@ -27,8 +27,6 @@ void ffPrintShell(FFinstance* instance)
++shellName;
}
ffPrintLogoAndKey(instance, "Shell");
FF_STRBUF_CREATE(shell);
if(!ffStrbufIsEmpty(&instance->config.shellFormat))