mirror of
https://github.com/systemd/systemd.git
synced 2025-01-11 09:18:07 +03:00
udev: add 'conf-virt' constant for confidential virtualization tech
Related: https://github.com/systemd/systemd/issues/27604 Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
0895124572
commit
6e2e83b487
@ -279,6 +279,14 @@
|
||||
for possible values.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term><literal>cvm</literal></term>
|
||||
<listitem>
|
||||
<para>System's confidential virtualization technology. See
|
||||
<citerefentry><refentrytitle>systemd-detect-virt</refentrytitle><manvolnum>1</manvolnum></citerefentry>
|
||||
for possible values.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
<para>Unknown keys will never match.</para>
|
||||
</listitem>
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include "architecture.h"
|
||||
#include "conf-files.h"
|
||||
#include "conf-parser.h"
|
||||
#include "confidential-virt.h"
|
||||
#include "constants.h"
|
||||
#include "device-private.h"
|
||||
#include "device-util.h"
|
||||
@ -1920,6 +1921,8 @@ static int udev_rule_apply_token_to_event(
|
||||
val = architecture_to_string(uname_architecture());
|
||||
else if (streq(k, "virt"))
|
||||
val = virtualization_to_string(detect_virtualization());
|
||||
else if (streq(k, "cvm"))
|
||||
val = confidential_virtualization_to_string(detect_confidential_virtualization());
|
||||
else
|
||||
assert_not_reached();
|
||||
return token_match_string(token, val);
|
||||
|
Loading…
Reference in New Issue
Block a user