mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
systemctl: make systemctl clean --what= values more discoverable (#37418)
This commit is contained in:
@@ -558,7 +558,7 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
|
||||
<term><command>clean <replaceable>PATTERN</replaceable>…</command></term>
|
||||
|
||||
<listitem>
|
||||
<para>Remove the configuration, state, cache, logs or runtime data of the specified units. Use
|
||||
<para>Remove the configuration, state, cache, logs, runtime or file descriptor store data of the specified units. Use
|
||||
<option>--what=</option> to select which kind of resource to remove. For service units this may
|
||||
be used to remove the directories configured with <varname>ConfigurationDirectory=</varname>,
|
||||
<varname>StateDirectory=</varname>, <varname>CacheDirectory=</varname>,
|
||||
@@ -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 <option>--what=</option> 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.</para>
|
||||
the unit). Multiple values can be seperated by commas. Note that the specified units must be stopped
|
||||
to invoke this operation.</para>
|
||||
|
||||
<table>
|
||||
<title>
|
||||
@@ -616,6 +617,10 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err
|
||||
<entry><literal>all</literal></entry>
|
||||
<entry>All of the above</entry>
|
||||
</row>
|
||||
<row>
|
||||
<entry><literal>help</literal></entry>
|
||||
<entry>Show the supported values and exit</entry>
|
||||
</row>
|
||||
</tbody>
|
||||
</tgroup>
|
||||
</table>
|
||||
|
||||
@@ -965,7 +965,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;
|
||||
@@ -982,7 +982,8 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
|
||||
"cache\n"
|
||||
"logs\n"
|
||||
"configuration\n"
|
||||
"fdstore");
|
||||
"fdstore\n"
|
||||
"all");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user