Skip to content

Commit b99f444

Browse files
committed
Global: remove --allow-slow-operations
1 parent c504096 commit b99f444

File tree

4 files changed

+5
-17
lines changed

4 files changed

+5
-17
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This release introduces a new option `--migrate-config`, which migrates old flag
44

55
Changes:
66
* `--pipe` and `--stat` are moved from `general` options to `display` options. This affects cjson configuration.
7-
* Display keys `percent*` and `size*` in JSON config are restructured. `{ "sizeNdigits": 1 }` is now `{ "size": { "ndigits": 1 } }`
7+
* Display keys `percent*` and `size*` in JSON config are restructured. e.g. `{ "sizeNdigits": 1 }` is now `{ "size": { "ndigits": 1 } }`
88
* With the introduction of `--migrate-config`, the old flag based config file is deprecated, and will be removed in 3.0.0 (next major version)
99
* Support of `--gen-config conf` is deprecated accordingly, and will be removed in 2.3.0 (next minor version)
1010
* The global flag `--allow-slow-operations` is splitted into some explicit flags in differnet modules

doc/json_schema.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,6 @@
227227
"title": "Fastfetch general configurations",
228228
"type": "object",
229229
"properties": {
230-
"allowSlowOperations": {
231-
"type": "boolean",
232-
"title": "Allow operations that can be very slow for more detailed output",
233-
"default": false
234-
},
235230
"multithreading": {
236231
"type": "boolean",
237232
"title": "Use multiple threads to detect values",

src/options/general.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_va
1717
{
1818
const char* key = yyjson_get_str(key_);
1919

20-
if (ffStrEqualsIgnCase(key, "allowSlowOperations"))
21-
options->allowSlowOperations = yyjson_get_bool(val);
22-
else if (ffStrEqualsIgnCase(key, "thread") || ffStrEqualsIgnCase(key, "multithreading"))
20+
if (ffStrEqualsIgnCase(key, "thread") || ffStrEqualsIgnCase(key, "multithreading"))
2321
options->multithreading = yyjson_get_bool(val);
2422
else if (ffStrEqualsIgnCase(key, "processingTimeout"))
2523
options->processingTimeout = (int32_t) yyjson_get_int(val);
@@ -42,6 +40,8 @@ const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_va
4240
return "Property `general.stat` has been changed to `display.stat`";
4341
else if (ffStrEqualsIgnCase(key, "pipe"))
4442
return "Property `general.pipe` has been changed to `display.pipe`";
43+
else if (ffStrEqualsIgnCase(key, "allowSlowOperations"))
44+
return "Property `general.allowSlowOperations` has been obsoleted. See CHANGELOG for detail";
4545

4646
else
4747
return "Unknown general property";
@@ -52,9 +52,7 @@ const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_va
5252

5353
bool ffOptionsParseGeneralCommandLine(FFOptionsGeneral* options, const char* key, const char* value)
5454
{
55-
if(ffStrEqualsIgnCase(key, "--allow-slow-operations"))
56-
options->allowSlowOperations = ffOptionParseBoolean(value);
57-
else if(ffStrEqualsIgnCase(key, "--thread") || ffStrEqualsIgnCase(key, "--multithreading"))
55+
if(ffStrEqualsIgnCase(key, "--thread") || ffStrEqualsIgnCase(key, "--multithreading"))
5856
options->multithreading = ffOptionParseBoolean(value);
5957
else if(ffStrEqualsIgnCase(key, "--processing-timeout"))
6058
options->processingTimeout = ffOptionParseInt32(key, value);
@@ -82,7 +80,6 @@ bool ffOptionsParseGeneralCommandLine(FFOptionsGeneral* options, const char* key
8280
void ffOptionsInitGeneral(FFOptionsGeneral* options)
8381
{
8482
options->processingTimeout = 1000;
85-
options->allowSlowOperations = false;
8683
options->multithreading = true;
8784

8885
#if defined(__linux__) || defined(__FreeBSD__)
@@ -110,9 +107,6 @@ void ffOptionsGenerateGeneralJsonConfig(FFOptionsGeneral* options, yyjson_mut_do
110107

111108
yyjson_mut_val* obj = yyjson_mut_obj(doc);
112109

113-
if (options->allowSlowOperations != defaultOptions.allowSlowOperations)
114-
yyjson_mut_obj_add_bool(doc, obj, "allowSlowOperations", options->allowSlowOperations);
115-
116110
if (options->multithreading != defaultOptions.multithreading)
117111
yyjson_mut_obj_add_bool(doc, obj, "thread", options->multithreading);
118112

src/options/general.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
typedef struct FFOptionsGeneral
66
{
7-
bool allowSlowOperations;
87
bool multithreading;
98
int32_t processingTimeout;
109

0 commit comments

Comments
 (0)