<xi:include href="version-info.xml" xpointer="v258"/>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--revert</option></term>
+ <listitem>
+ <para>Revert settings previously set with <command>udevadm control</command> command. When
+ specified, settings set with <option>-l/--log-level=</option>, <option>--trace</option>,
+ <option>-m/--children-max=</option>, and <option>-p/--property=</option> will be cleared.</para>
+
+ <xi:include href="version-info.xml" xpointer="v258"/>
+ </listitem>
+ </varlistentry>
<varlistentry>
<term><option>-t</option></term>
<term><option>--timeout=<replaceable>seconds</replaceable></option></term>
static int arg_log_level = -1;
static int arg_start_exec_queue = -1;
static int arg_trace = -1;
+static bool arg_revert = false;
static bool arg_load_credentials = false;
STATIC_DESTRUCTOR_REGISTER(arg_env, strv_freep);
!strv_isempty(arg_env) ||
arg_max_children >= 0 ||
arg_ping ||
- arg_trace >= 0;
+ arg_trace >= 0 ||
+ arg_revert;
}
static int help(void) {
" -m --children-max=N Maximum number of children\n"
" --ping Wait for udev to respond to a ping message\n"
" --trace=BOOL Enable/disable trace logging\n"
+ " --revert Revert previously set configurations\n"
" -t --timeout=SECONDS Maximum time to block for a reply\n"
" --load-credentials Load udev rules from credentials\n",
program_invocation_short_name);
enum {
ARG_PING = 0x100,
ARG_TRACE,
+ ARG_REVERT,
ARG_LOAD_CREDENTIALS,
};
{ "children-max", required_argument, NULL, 'm' },
{ "ping", no_argument, NULL, ARG_PING },
{ "trace", required_argument, NULL, ARG_TRACE },
+ { "revert", no_argument, NULL, ARG_REVERT },
{ "timeout", required_argument, NULL, 't' },
{ "load-credentials", no_argument, NULL, ARG_LOAD_CREDENTIALS },
{ "version", no_argument, NULL, 'V' },
arg_trace = r;
break;
+ case ARG_REVERT:
+ arg_revert = true;
+ break;
+
case 't':
r = parse_sec(optarg, &arg_timeout);
if (r < 0)
if (arg_exit)
return varlink_call_and_log(link, "io.systemd.Udev.Exit", /* parameters = */ NULL, /* reply = */ NULL);
+ if (arg_revert) {
+ r = varlink_call_and_log(link, "io.systemd.Udev.Revert", /* parameters = */ NULL, /* reply = */ NULL);
+ if (r < 0)
+ return r;
+ }
+
if (arg_log_level >= 0) {
r = varlink_callbo_and_log(link, "io.systemd.service.SetLogLevel", /* reply = */ NULL,
SD_JSON_BUILD_PAIR_INTEGER("level", arg_log_level));