Skip to content

Commit 745a8dd

Browse files
authored
Merge pull request #540 from fastfetch-cli/dev
Release v2.0.4
2 parents 9a4e787 + c400866 commit 745a8dd

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# 2.0.4
2+
3+
Bugfixes:
4+
* Fix building on 32-bit FreeBSD (Memory, BSD)
5+
* Fix `--file-raw` doesn't work (Logo)
6+
7+
Features:
8+
* Trait `-` as an alias for `/dev/stdin`. Available for `--file`, `--file-raw` and `--raw` (Logo)
9+
110
# 2.0.3
211

312
Bugfixes:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
22

33
project(fastfetch
4-
VERSION 2.0.3
4+
VERSION 2.0.4
55
LANGUAGES C
66
DESCRIPTION "Fast system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"

src/detection/memory/memory_bsd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
const char* ffDetectMemory(FFMemoryResult* ram)
55
{
6-
uint64_t length = sizeof(ram->bytesTotal);
6+
size_t length = sizeof(ram->bytesTotal);
77
if (sysctl((int[]){ CTL_HW, HW_PHYSMEM }, 2, &ram->bytesTotal, &length, NULL, 0))
88
return "Failed to read hw.physmem";
99

src/fastfetch.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1205,7 +1205,8 @@ static void parseArguments(FFdata* data, int argc, const char** argv)
12051205
}
12061206

12071207
if(i == argc - 1 || (
1208-
*argv[i + 1] == '-' &&
1208+
argv[i + 1][0] == '-' &&
1209+
argv[i + 1][1] != '\0' && // `-` is used as an alias for `/dev/stdin`
12091210
strcasecmp(argv[i], "--separator-string") != 0 // Separator string can start with a -
12101211
)) {
12111212
parseOption(data, argv[i], NULL);

src/logo/logo.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,10 @@ static bool logoPrintFileIfExists(bool doColorReplacement, bool raw)
359359

360360
FF_STRBUF_AUTO_DESTROY content = ffStrbufCreate();
361361

362-
if(!ffAppendFileBuffer(options->source.chars, &content))
362+
if(ffStrbufEqualS(&options->source, "-")
363+
? !ffAppendFDBuffer(FFUnixFD2NativeFD(STDIN_FILENO), &content)
364+
: !ffAppendFileBuffer(options->source.chars, &content)
365+
)
363366
{
364367
fprintf(stderr, "Logo: Failed to load file content from logo source: %s \n", options->source.chars);
365368
return false;

src/logo/option.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ bool ffParseLogoCommandOptions(FFLogoOptions* options, const char* key, const ch
126126
ffOptionParseString(key, value, &options->source);
127127
options->type = FF_LOGO_TYPE_FILE;
128128
}
129-
else if(strcasecmp(key, "raw") == 0)
129+
else if(strcasecmp(subKey, "raw") == 0)
130130
{
131131
ffOptionParseString(key, value, &options->source);
132132
options->type = FF_LOGO_TYPE_FILE_RAW;

0 commit comments

Comments
 (0)