summaryrefslogtreecommitdiffstats
path: root/src/shared/varlink-io.systemd.Machine.c
diff options
context:
space:
mode:
authorIvan Kruglov <mail@ikruglov.com>2024-10-07 11:27:16 +0200
committerIvan Kruglov <mail@ikruglov.com>2024-10-07 14:45:49 +0200
commit6bb6354b4fe85090fdfb2b2d8c92f6e2da6b6550 (patch)
tree9a750346131dab37a03db5cb600ac75dacff0f2f /src/shared/varlink-io.systemd.Machine.c
parentmachine: introduce io.systemd.Machine.Unregister varlink method (diff)
downloadsystemd-6bb6354b4fe85090fdfb2b2d8c92f6e2da6b6550.tar.xz
systemd-6bb6354b4fe85090fdfb2b2d8c92f6e2da6b6550.zip
machine: introduce io.systemd.Machine.Terminate varlink method
Diffstat (limited to '')
-rw-r--r--src/shared/varlink-io.systemd.Machine.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/shared/varlink-io.systemd.Machine.c b/src/shared/varlink-io.systemd.Machine.c
index 9b65dad363..d37f31bc3f 100644
--- a/src/shared/varlink-io.systemd.Machine.c
+++ b/src/shared/varlink-io.systemd.Machine.c
@@ -33,6 +33,11 @@ static SD_VARLINK_DEFINE_METHOD(
SD_VARLINK_FIELD_COMMENT("The name of a machine to unregister."),
SD_VARLINK_DEFINE_INPUT(name, SD_VARLINK_STRING, 0));
+static SD_VARLINK_DEFINE_METHOD(
+ Terminate,
+ SD_VARLINK_FIELD_COMMENT("The name of a machine to terminate."),
+ SD_VARLINK_DEFINE_INPUT(name, SD_VARLINK_STRING, 0));
+
static SD_VARLINK_DEFINE_METHOD_FULL(
List,
SD_VARLINK_SUPPORTS_MORE,
@@ -71,6 +76,8 @@ SD_VARLINK_DEFINE_INTERFACE(
&vl_type_Timestamp,
&vl_method_Register,
&vl_method_Unregister,
+ SD_VARLINK_SYMBOL_COMMENT("Terminate machine, killing its processes"),
+ &vl_method_Terminate,
SD_VARLINK_SYMBOL_COMMENT("List running machines"),
&vl_method_List,
SD_VARLINK_SYMBOL_COMMENT("No matching machine currently running"),