various: set info on varlink server object

The values that were previously hardcoded in sd-varlink.c are now defined
in new varlink_set_info_systemd() and that function is called everywhere
where we create a server.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2024-12-10 10:51:56 +01:00
parent 29f63c67b0
commit fd409ff0e0
21 changed files with 107 additions and 48 deletions
+2 -1
View File
@@ -23,6 +23,7 @@
#include "stat-util.h"
#include "user-util.h"
#include "varlink-io.systemd.MountFileSystem.h"
#include "varlink-util.h"
#define ITERATIONS_MAX 64U
#define RUNTIME_MAX_USEC (5 * USEC_PER_MINUTE)
@@ -595,7 +596,7 @@ static int run(int argc, char *argv[]) {
if (r < 0)
return log_error_errno(r, "Failed to turn off non-blocking mode for listening socket: %m");
r = sd_varlink_server_new(&server, SD_VARLINK_SERVER_INHERIT_USERDATA);
r = varlink_server_new(&server, SD_VARLINK_SERVER_INHERIT_USERDATA, NULL);
if (r < 0)
return log_error_errno(r, "Failed to allocate server: %m");