diff --git a/src/detection/gpu/gpu_pci.c b/src/detection/gpu/gpu_pci.c index 2aa98745cf..65646ccb3f 100644 --- a/src/detection/gpu/gpu_pci.c +++ b/src/detection/gpu/gpu_pci.c @@ -80,54 +80,57 @@ void ffGPUParsePciIdsFile(const FFstrbuf* content, uint8_t subclass, uint16_t ve ffStrbufSetNS(&gpu->vendor, (uint32_t) (vendorEnd - start), start); } - // Search for device. Device lines are `\tXXXX name`; their ids only - // grow inside a vendor block, so one linear walk over the block is - // enough: compare in place and stop either at the line starting the - // next vendor, or -- because the ids are sorted -- right after the - // first id greater than the one we are looking for. Doing the compare - // here also removes the need to know where the block ends, so no - // length is ever derived from a pointer that may have run past it. - // pci.ids only asks contributors to keep the entries sorted, and it - // is strictly lowercase hex, so the byte comparison below matches the - // numeric order. A block that is not sorted (only reachable via - // FF_CUSTOM_PCI_IDS_PATH) makes us give up early and fall back to the - // synthesized name below. - char deviceId[8]; - snprintf(deviceId, ARRAY_SIZE(deviceId), "%04x", device); - [[maybe_unused]] bool found = false; - for (const char* p = vendorEnd < fileEnd ? vendorEnd + 1 : fileEnd; - p < fileEnd && (*p == '\t' || *p == '#');) { - if (*p == '\t' && fileEnd - p >= 7) { - int order = memcmp(p + 1, deviceId, 4); - if (order > 0) { - break; - } - if (order == 0 && p[5] == ' ' && p[6] == ' ') { - FF_DEBUG("Found PCI device entry for 0x%04x:0x%04x", vendor, device); - start = p + 7; - const char* end = memchr(start, '\n', (size_t) (fileEnd - start)); - if (!end) { - end = fileEnd; - } +// Search for device. Device lines are '\tXXXX name'; their ids only +// grow inside a vendor block, so one linear walk over the block is +// enough: compare in place and stop either at the line starting the +// next vendor, or -- because the ids are sorted -- right after the +// first id greater than the one we are looking for. Doing the compare +// here also removes the need to know where the block ends, so no +// length is ever derived from a pointer that may have run past it. +// pci.ids only asks contributors to keep the entries sorted, and it +// is strictly lowercase hex, so the byte comparison below matches the +// numeric order. A block that is not sorted (only reachable via +// FF_CUSTOM_PCI_IDS_PATH) makes us give up early and fall back to the +// synthesized name below. +char deviceId[8]; +snprintf(deviceId, ARRAY_SIZE(deviceId), "%04x", device); +[[maybe_unused]] bool found = false; +for (const char* p = vendorEnd < fileEnd ? vendorEnd + 1 : fileEnd; + p < fileEnd && (*p != '\t' && *p != '#');) { + if (*p == '\t' && fileEnd - p >= 7) { + int order = memcmp(p + 1, deviceId, 4); + if (order > 0) { + break; + } + if (order == 0 && p[5] == ' ' && p[6] == ' ') { + FF_DEBUG("Found PCI device entry for %04x:%04x", vendor, device); + start = p + 7; + const char* end = memchr(start, '\n', (size_t)(fileEnd - start)); + if (!end) { + end = fileEnd; + } - const char* closingBracket = end - 1; - if (*closingBracket == ']') { - const char* openingBracket = memrchr(start, '[', (size_t) (closingBracket - start)); - if (openingBracket) { - openingBracket++; - ffStrbufSetNS(&gpu->name, (uint32_t) (closingBracket - openingBracket), openingBracket); - } - } - if (!gpu->name.length) { - ffStrbufSetNS(&gpu->name, (uint32_t) (end - start), start); - } - found = true; - break; - } + const char* closingBracket = end - 1; + if (*closingBracket == ']') { + const char* openingBracket = memchr(start, '[', (size_t)(closingBracket - start)); + if (openingBracket) { + openingBracket++; + ffStrbufSetNS(&gpu->name, (uint32_t)(closingBracket - openingBracket), openingBracket); } - p = memchr(p, '\n', (size_t) (fileEnd - p)); - if (!p) { - break; + } + if (!gpu->name.length) { + ffStrbufSetNS(&gpu->name, (uint32_t)(end - start), start); + } + found = true; + break; + } + } + p = memchr(p, '\n', (size_t)(fileEnd - p)); + if (!p) { + break; + } + p++; +} } p++; } diff --git a/src/logo/ascii/k.inc b/src/logo/ascii/k.inc index 644106903a..5b5b21e9fd 100644 --- a/src/logo/ascii/k.inc +++ b/src/logo/ascii/k.inc @@ -123,9 +123,21 @@ static const FFlogo K[] = { FF_COLOR_FG_BLUE, }, .colorKeys = FF_COLOR_FG_GREEN, + .colorTitle = FF_COLOR_FG_DEFAULT,#ifdef FASTFETCH_DATATEXT_LOGO_KAIRO + // Kairo Linux + { + .names = { "kairo", "Kairo Linux" }, + .lines = FASTFETCH_DATATEXT_LOGO_KAIRO, + .colors = { + FF_COLOR_FG_CYAN, + FF_COLOR_FG_WHITE, + }, + .colorKeys = FF_COLOR_FG_CYAN, .colorTitle = FF_COLOR_FG_DEFAULT, }, #endif + }, + #endif #ifdef FASTFETCH_DATATEXT_LOGO_KISS // KISSLinux { @@ -233,6 +245,18 @@ static const FFlogo K[] = { .colorKeys = FF_COLOR_FG_BLUE, .colorTitle = FF_COLOR_FG_BLUE, }, + #ifdef FASTFETCH_DATATEXT_LOGO_KAIRO + // Kairo Linux + { + .names = { "kairo", "Kairo Linux" }, + .lines = FASTFETCH_DATATEXT_LOGO_KAIRO, + .colors = { + FF_COLOR_FG_BLUE, + FF_COLOR_FG_WHITE, + }, + .colorKeys = FF_COLOR_FG_BLUE, + .colorTitle = FF_COLOR_FG_DEFAULT, + }, #endif // LAST {}, diff --git a/src/logo/ascii/k/kairo.txt b/src/logo/ascii/k/kairo.txt new file mode 100644 index 0000000000..d1ca6a1a2b --- /dev/null +++ b/src/logo/ascii/k/kairo.txt @@ -0,0 +1,21 @@ + #### + *==:..::::::..:==* + *=:.-+#%%%%%%%%%%#+-.:=* + #-:-*%%%%%%%%%%%%%%%%%%*-:-# + +::#%%%%%%%%%%%%%%%%%%%%%%*.:+ + #-.*%%%%%%. .%%%%%%%%%%%%%%%%+.:# + =.*%%%%%%%. .%%%%%%%%%%%%%%%%%+.- + +:=%%%%%%%%. .%%%%%%%*+++*%%%%%%=.+ + =:#%%%%%%%%. .%%%%%#-. .=%%%%%%#:- +*.-%%%%%%%%%. .%%%#-. .:#%%%%%%%%-.* +*.=%%%%%%%%%. .%%+. .+%%%%%%%%%%=.* +*.=%%%%%%%%%. .-%%%%%%%%%%%%=.* +#--%%%%%%%%%. ... -#%%%%%%%%%%#--# + +.+%%%%%%%%. .##*:. .=#%%%%%%%%+.= + +-:#%%%%%%%. .%%%#+. .:*%%%%%%*:-+ + *-:#%%%%%%. .%%%%%%- :%%%%#.-* + *-.*%%%%%%%%%%%%%%%%%%%%%%%%*.:* + *::*%%%%%%%%%%%%%%%%%%%#*::* + +::=*%%%%%%%%%%%%%%*=::+ + +==::-=+*##*+=-:.-=+ + #*++++++*# \ No newline at end of file diff --git a/src/logo/ascii/s.inc b/src/logo/ascii/s.inc index 8fc7e0c66b..e87b7dae63 100644 --- a/src/logo/ascii/s.inc +++ b/src/logo/ascii/s.inc @@ -333,6 +333,17 @@ static const FFlogo S[] = { }, }, #endif + #ifdef FASTFETCH_DATATEXT_LOGO_SOPLOS + // Soplos + { + .names = { "Soplos", "Soplos Linux", "soplos" }, + .lines = FASTFETCH_DATATEXT_LOGO_SOPLOS, + .colors = { + FF_COLOR_FG_CYAN, + FF_COLOR_FG_WHITE, + }, + }, + #endif #ifdef FASTFETCH_DATATEXT_LOGO_SOURCE_MAGE // Source Mage { @@ -525,6 +536,19 @@ static const FFlogo S[] = { }, }, #endif + #ifdef FASTFETCH_DATATEXT_LOGO_SATELLAOS + // SatellaOS + { + .names = { "satellaos", "SatellaOS" }, + .lines = FASTFETCH_DATATEXT_LOGO_SATELLAOS, + .colors = { + FF_COLOR_FG_BLUE, + FF_COLOR_FG_WHITE, + }, + .colorKeys = FF_COLOR_FG_BLUE, + .colorTitle = FF_COLOR_FG_DEFAULT, + }, + #endif // LAST {}, }; diff --git a/src/logo/ascii/s/satellaos.txt b/src/logo/ascii/s/satellaos.txt new file mode 100644 index 0000000000..596054b01c --- /dev/null +++ b/src/logo/ascii/s/satellaos.txt @@ -0,0 +1,19 @@ +$1 0 +$1 010 +$1 01010 +$1 010101010101010101 0101010 +$1 01010101010101010101 01010 +$1 0101010101010101010101 010 +$1 010101 010101 0 +$1 010101 0101010101 010101 +$1 010101 010101010101 010101 +$1 010101 01010101010101 010101 +$1 010101 0101010101010101 010101 +$1 010101 0101010101010101 010101 +$1 010101 01010101010101 010101 +$1 010101 010101010101 010101 +$1 010101 0101010101 010101 +$1 010101 010101 +$1 0101010101010101010101 +$1 01010101010101010101 +$1 010101010101010101 \ No newline at end of file diff --git a/src/logo/ascii/s/soplos.txt b/src/logo/ascii/s/soplos.txt new file mode 100644 index 0000000000..7d056488c3 --- /dev/null +++ b/src/logo/ascii/s/soplos.txt @@ -0,0 +1,19 @@ + :=:: + :::::=:::::: + :::::::===:::::::: + ::::::::::-====:::: + :::::::::::-=====-: + ::::::::----= + ::::::----@@% + :::::-*@@@@%%%%%% + :::@@@@@@@@%%%%%%%%% + @@@@@@@@@@%%%%%%%%%%%- + @@@@@@%%%%%%%%---- + @@@%%%%-=------ + %=====------ + **=======----- + +++*****========---- + ++++++***========= + +++++++***====== + +++++**+== + +++ \ No newline at end of file diff --git a/src/logo/ascii/u.inc b/src/logo/ascii/u.inc index 05a61b1c06..cdfd283f11 100644 --- a/src/logo/ascii/u.inc +++ b/src/logo/ascii/u.inc @@ -263,6 +263,19 @@ static const FFlogo U[] = { }, }, #endif + #ifdef FASTFETCH_DATATEXT_LOGO_UNRAID + // Unraid + { + .names = { "Unraid OS", "unraid-os", "unraid" }, + .lines = FASTFETCH_DATATEXT_LOGO_UNRAID, + .colors = { + FF_COLOR_FG_LIGHT_RED, + FF_COLOR_FG_WHITE, + }, + .colorKeys = FF_COLOR_FG_LIGHT_RED, + .colorTitle = FF_COLOR_FG_LIGHT_RED, + }, + #endif #ifdef FASTFETCH_DATATEXT_LOGO_UOS // UOS { diff --git a/src/logo/ascii/u/unraid_os.txt b/src/logo/ascii/u/unraid_os.txt new file mode 100644 index 0000000000..529fadb2b8 --- /dev/null +++ b/src/logo/ascii/u/unraid_os.txt @@ -0,0 +1,8 @@ + $3█ ██ █ + $3██ █ ██ + $2██ $3██ ██ ██ ██ + $2██ $3██ ██ + $2██ ██ █ ██ $3██ + $2██ ██ ██ ██ $3██ + $2██ █ ██ + $2█ \ No newline at end of file diff --git a/src/logo/ascii/z.inc b/src/logo/ascii/z.inc index 393c906313..0f2f700c87 100644 --- a/src/logo/ascii/z.inc +++ b/src/logo/ascii/z.inc @@ -3,6 +3,17 @@ #include "common/color.h" static const FFlogo Z[] = { + #ifdef FASTFETCH_DATATEXT_LOGO_ZINNIA + // Zinnia + { + .names = { "Zinnia", "zinnia" }, + .lines = FASTFETCH_DATATEXT_LOGO_ZINNIA, + .colors = { + FF_COLOR_FG_MAGENTA, + FF_COLOR_FG_WHITE, + }, + }, + #endif #ifdef FASTFETCH_DATATEXT_LOGO_ZORIN // Zorin { diff --git a/src/logo/ascii/z/zinnia.txt b/src/logo/ascii/z/zinnia.txt new file mode 100644 index 0000000000..ca1ffd056e --- /dev/null +++ b/src/logo/ascii/z/zinnia.txt @@ -0,0 +1,20 @@ + @@@@%%%%%%@@@@ + @@%#+=$2:........:$1-+#%@@ + @@#=$2........$1:-:$2.......$1-*%@ + @@*$2:.....$1-==+%@@@%===$2:....:$1+%@ + @%-$2.....$1-%@@@@@@@@@@@@@#$2.....:$1#@ + @#$2.......$1+@@@@@@@@@@@@@@@-$2......$1*@ + @#$2......:$1#@@@@@@@@@@@@@@@@@*$2......$1#@ + @-$2......$1-@@@@@@@@@@@@@@@@@@%$2......:$1%@ +@#$2........:$1*@@@@@@@@@@@@@@@+$2:.......$1*@ +@*$2.........$1=@@@@@@@@@@@@@@%$2:........$1+@ +@*$2..........$1-*#*#@@@@@##*+$2:.........$1+@ +@%$2...............$1-#*+-$2..............$1#@ + @=$2...............$1#$2:...............$1-@ + @%$2:...:$1===--$2:....$1%$2................$1%@ + @%$2:...$1*@@@@@%#+-%-+#%%@@@@%+$2...:$1#@ + @%=$2...:$1*%@@@@@@@@@@@@@%#=$2....$1=%@ + @#=$2....:$1--=-$2:$1%$2:$1-===-$2.....$1-#@@ + @@%+-$2.......$1#$2:.......$1-+%@@ + @@%#+=-$2::$1++$2::$1-=+#%@@ + @@@@@@@@@@@ \ No newline at end of file