oomd: move SubscriptionTaken Varlink error out of generic Varlink code
This error is a private error returned by PID 1 to oomd. It's internal, and very specific to the use-case. Hence it should not be part of the org.varlink.service interface (which isn't really our namespace anyway). Hence, let's clean this up and move it over to the ManagedOOM varlink interface of PID, where it belongs. Since this is a private protocol of our two daemons, and the client (i.e. oomd) doesn't explicitly test for this error anyway we can just move it over without ill effects.
This commit is contained in:
@@ -13,8 +13,11 @@ static VARLINK_DEFINE_METHOD(
|
||||
SubscribeManagedOOMCGroups,
|
||||
VARLINK_DEFINE_OUTPUT_BY_TYPE(cgroups, ControlGroup, VARLINK_ARRAY));
|
||||
|
||||
static VARLINK_DEFINE_ERROR(SubscriptionTaken);
|
||||
|
||||
VARLINK_DEFINE_INTERFACE(
|
||||
io_systemd_ManagedOOM,
|
||||
"io.systemd.ManagedOOM",
|
||||
&vl_method_SubscribeManagedOOMCGroups,
|
||||
&vl_type_ControlGroup);
|
||||
&vl_type_ControlGroup,
|
||||
&vl_error_SubscriptionTaken);
|
||||
|
||||
@@ -200,5 +200,4 @@ DEFINE_TRIVIAL_CLEANUP_FUNC(VarlinkServer *, varlink_server_unref);
|
||||
#define VARLINK_ERROR_INVALID_PARAMETER "org.varlink.service.InvalidParameter"
|
||||
|
||||
/* These are errors we came up with and squatted the namespace with */
|
||||
#define VARLINK_ERROR_SUBSCRIPTION_TAKEN "org.varlink.service.SubscriptionTaken"
|
||||
#define VARLINK_ERROR_PERMISSION_DENIED "org.varlink.service.PermissionDenied"
|
||||
|
||||
Reference in New Issue
Block a user