From 5689365a909362d82ad4959d3fec9ebacfd5ec96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Behrmann?= Date: Tue, 13 May 2025 17:19:02 +0200 Subject: [PATCH 1/4] man: add missing fdstore in systemctl clean --what documentation --- man/systemctl.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/man/systemctl.xml b/man/systemctl.xml index b1fb6cec8c..aac17ae01a 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -558,7 +558,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err clean PATTERN - Remove the configuration, state, cache, logs or runtime data of the specified units. Use + Remove the configuration, state, cache, logs, runtime or file descriptor store data of the specified units. Use to select which kind of resource to remove. For service units this may be used to remove the directories configured with ConfigurationDirectory=, StateDirectory=, CacheDirectory=, From 028de7292d6923c4b77c5d03d47097aeda24fc1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Behrmann?= Date: Tue, 13 May 2025 17:19:39 +0200 Subject: [PATCH 2/4] man, systemctl: document --what=help --- man/systemctl.xml | 4 ++++ src/systemctl/systemctl.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/man/systemctl.xml b/man/systemctl.xml index aac17ae01a..ed0cafff8b 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -616,6 +616,10 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err all All of the above + + help + Show the supported values and exit + diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index fdbde7dc5e..55fa386e7a 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -958,7 +958,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) { case ARG_WHAT: if (isempty(optarg)) - return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "--what= requires arguments."); + return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "--what= requires arguments (see --what=help)."); for (const char *p = optarg;;) { _cleanup_free_ char *k = NULL; From 652e4dd7434d1603866c059aa8a67eaf8b73346f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Behrmann?= Date: Tue, 13 May 2025 17:20:37 +0200 Subject: [PATCH 3/4] man: note for systemctl clean --what that commas separate values --- man/systemctl.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/man/systemctl.xml b/man/systemctl.xml index ed0cafff8b..bfd684dc86 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -573,7 +573,8 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err command only applies to units that use either of these settings. If is not specified, the cache and runtime data as well as the file descriptor store are removed (as these three types of resources are generally redundant and reproducible on the next invocation of - the unit). Note that the specified units must be stopped to invoke this operation. + the unit). Multiple values can be seperated by commas. Note that the specified units must be stopped + to invoke this operation. From 68b6289a9e4a8a9cc3567f066f921388e99da9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Behrmann?= <behrmann@physik.fu-berlin.de> Date: Tue, 13 May 2025 17:21:02 +0200 Subject: [PATCH 4/4] systemct: show all in output of systemctl clean --what=help --- src/systemctl/systemctl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 55fa386e7a..cf7f00b1c2 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -975,7 +975,8 @@ static int systemctl_parse_argv(int argc, char *argv[]) { "cache\n" "logs\n" "configuration\n" - "fdstore"); + "fdstore\n" + "all"); return 0; }