summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-12-23 23:38:13 +0100
committerLennart Poettering <lennart@poettering.net>2014-12-24 16:53:04 +0100
commitde33fc625725d199629ed074d6278504deb23deb (patch)
treea7b5d8da7142bf2b394c5e65e8d3ef7be38002b8 /src
parent0254e9448f3c645758ed63618a3bbb13c242f5e7 (diff)
sd-bus: rename sd_bus_open_system_container() to sd_bus_open_system_machine()
Pretty much everywhere else we use the generic term "machine" when referring to containers in API, so let's do though in sd-bus too. In particular, since the concept of a "container" exists in sd-bus too, but as part of the marshalling system.
Diffstat (limited to 'src')
-rw-r--r--src/analyze/analyze.c2
-rw-r--r--src/hostname/hostnamectl.c2
-rw-r--r--src/libsystemd/libsystemd.sym.m42
-rw-r--r--src/libsystemd/sd-bus/bus-internal.h2
-rw-r--r--src/libsystemd/sd-bus/bus-util.c8
-rw-r--r--src/libsystemd/sd-bus/bus-util.h2
-rw-r--r--src/libsystemd/sd-bus/busctl.c6
-rw-r--r--src/libsystemd/sd-bus/sd-bus.c14
-rw-r--r--src/locale/localectl.c2
-rw-r--r--src/login/loginctl.c2
-rw-r--r--src/machine/machinectl.c4
-rw-r--r--src/run/run.c4
-rw-r--r--src/systemctl/systemctl.c12
-rw-r--r--src/systemd/sd-bus.h2
-rw-r--r--src/timedate/timedatectl.c2
15 files changed, 33 insertions, 33 deletions
diff --git a/src/analyze/analyze.c b/src/analyze/analyze.c
index 9a5fd741c7..6a6855148e 100644
--- a/src/analyze/analyze.c
+++ b/src/analyze/analyze.c
@@ -1313,7 +1313,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'M':
- arg_transport = BUS_TRANSPORT_CONTAINER;
+ arg_transport = BUS_TRANSPORT_MACHINE;
arg_host = optarg;
break;
diff --git a/src/hostname/hostnamectl.c b/src/hostname/hostnamectl.c
index b3ce8510ba..de4ce7ede6 100644
--- a/src/hostname/hostnamectl.c
+++ b/src/hostname/hostnamectl.c
@@ -405,7 +405,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'M':
- arg_transport = BUS_TRANSPORT_CONTAINER;
+ arg_transport = BUS_TRANSPORT_MACHINE;
arg_host = optarg;
break;
diff --git a/src/libsystemd/libsystemd.sym.m4 b/src/libsystemd/libsystemd.sym.m4
index de8bec3098..80a61baab8 100644
--- a/src/libsystemd/libsystemd.sym.m4
+++ b/src/libsystemd/libsystemd.sym.m4
@@ -169,7 +169,7 @@ global:
sd_bus_open_user;
sd_bus_open_system;
sd_bus_open_system_remote;
- sd_bus_open_system_container;
+ sd_bus_open_system_machine;
sd_bus_new;
sd_bus_set_address;
sd_bus_set_fd;
diff --git a/src/libsystemd/sd-bus/bus-internal.h b/src/libsystemd/sd-bus/bus-internal.h
index 48c20c97fc..e9f1a816aa 100644
--- a/src/libsystemd/sd-bus/bus-internal.h
+++ b/src/libsystemd/sd-bus/bus-internal.h
@@ -386,7 +386,7 @@ char *bus_address_escape(const char *v);
int bus_set_address_system(sd_bus *bus);
int bus_set_address_user(sd_bus *bus);
int bus_set_address_system_remote(sd_bus *b, const char *host);
-int bus_set_address_system_container(sd_bus *b, const char *machine);
+int bus_set_address_system_machine(sd_bus *b, const char *machine);
int bus_remove_match_by_string(sd_bus *bus, const char *match, sd_bus_message_handler_t callback, void *userdata);
diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/libsystemd/sd-bus/bus-util.c
index 0f1a89c8e1..389b6ad71c 100644
--- a/src/libsystemd/sd-bus/bus-util.c
+++ b/src/libsystemd/sd-bus/bus-util.c
@@ -1156,8 +1156,8 @@ int bus_open_transport(BusTransport transport, const char *host, bool user, sd_b
r = sd_bus_open_system_remote(bus, host);
break;
- case BUS_TRANSPORT_CONTAINER:
- r = sd_bus_open_system_container(bus, host);
+ case BUS_TRANSPORT_MACHINE:
+ r = sd_bus_open_system_machine(bus, host);
break;
default:
@@ -1191,8 +1191,8 @@ int bus_open_transport_systemd(BusTransport transport, const char *host, bool us
r = sd_bus_open_system_remote(bus, host);
break;
- case BUS_TRANSPORT_CONTAINER:
- r = sd_bus_open_system_container(bus, host);
+ case BUS_TRANSPORT_MACHINE:
+ r = sd_bus_open_system_machine(bus, host);
break;
default:
diff --git a/src/libsystemd/sd-bus/bus-util.h b/src/libsystemd/sd-bus/bus-util.h
index 696daa1f03..0609882294 100644
--- a/src/libsystemd/sd-bus/bus-util.h
+++ b/src/libsystemd/sd-bus/bus-util.h
@@ -30,7 +30,7 @@
typedef enum BusTransport {
BUS_TRANSPORT_LOCAL,
BUS_TRANSPORT_REMOTE,
- BUS_TRANSPORT_CONTAINER,
+ BUS_TRANSPORT_MACHINE,
_BUS_TRANSPORT_MAX,
_BUS_TRANSPORT_INVALID = -1
} BusTransport;
diff --git a/src/libsystemd/sd-bus/busctl.c b/src/libsystemd/sd-bus/busctl.c
index 009739fc0f..c9eeb91b0c 100644
--- a/src/libsystemd/sd-bus/busctl.c
+++ b/src/libsystemd/sd-bus/busctl.c
@@ -1854,7 +1854,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'M':
- arg_transport = BUS_TRANSPORT_CONTAINER;
+ arg_transport = BUS_TRANSPORT_MACHINE;
arg_host = optarg;
break;
@@ -2035,8 +2035,8 @@ int main(int argc, char *argv[]) {
r = bus_set_address_system_remote(bus, arg_host);
break;
- case BUS_TRANSPORT_CONTAINER:
- r = bus_set_address_system_container(bus, arg_host);
+ case BUS_TRANSPORT_MACHINE:
+ r = bus_set_address_system_machine(bus, arg_host);
break;
default:
diff --git a/src/libsystemd/sd-bus/sd-bus.c b/src/libsystemd/sd-bus/sd-bus.c
index 69ee239523..f87c31651b 100644
--- a/src/libsystemd/sd-bus/sd-bus.c
+++ b/src/libsystemd/sd-bus/sd-bus.c
@@ -950,7 +950,7 @@ static int bus_parse_next_address(sd_bus *b) {
return r;
break;
- } else if (startswith(a, "x-container-unix:")) {
+ } else if (startswith(a, "x-machine-unix:")) {
a += 17;
r = parse_container_unix_address(b, &a, &guid);
@@ -958,7 +958,7 @@ static int bus_parse_next_address(sd_bus *b) {
return r;
break;
- } else if (startswith(a, "x-container-kernel:")) {
+ } else if (startswith(a, "x-machine-kernel:")) {
a += 19;
r = parse_container_kernel_address(b, &a, &guid);
@@ -1334,7 +1334,7 @@ fail:
return r;
}
-int bus_set_address_system_container(sd_bus *b, const char *machine) {
+int bus_set_address_system_machine(sd_bus *b, const char *machine) {
_cleanup_free_ char *e = NULL;
assert(b);
@@ -1345,9 +1345,9 @@ int bus_set_address_system_container(sd_bus *b, const char *machine) {
return -ENOMEM;
#ifdef ENABLE_KDBUS
- b->address = strjoin("x-container-kernel:machine=", e, ";x-container-unix:machine=", e, NULL);
+ b->address = strjoin("x-machine-kernel:machine=", e, ";x-machine-unix:machine=", e, NULL);
#else
- b->address = strjoin("x-container-unix:machine=", e, NULL);
+ b->address = strjoin("x-machine-unix:machine=", e, NULL);
#endif
if (!b->address)
return -ENOMEM;
@@ -1355,7 +1355,7 @@ int bus_set_address_system_container(sd_bus *b, const char *machine) {
return 0;
}
-_public_ int sd_bus_open_system_container(sd_bus **ret, const char *machine) {
+_public_ int sd_bus_open_system_machine(sd_bus **ret, const char *machine) {
sd_bus *bus;
int r;
@@ -1367,7 +1367,7 @@ _public_ int sd_bus_open_system_container(sd_bus **ret, const char *machine) {
if (r < 0)
return r;
- r = bus_set_address_system_container(bus, machine);
+ r = bus_set_address_system_machine(bus, machine);
if (r < 0)
goto fail;
diff --git a/src/locale/localectl.c b/src/locale/localectl.c
index 0d0233bf46..41a88a828c 100644
--- a/src/locale/localectl.c
+++ b/src/locale/localectl.c
@@ -565,7 +565,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'M':
- arg_transport = BUS_TRANSPORT_CONTAINER;
+ arg_transport = BUS_TRANSPORT_MACHINE;
arg_host = optarg;
break;
diff --git a/src/login/loginctl.c b/src/login/loginctl.c
index 6881edb7e4..03abb7594f 100644
--- a/src/login/loginctl.c
+++ b/src/login/loginctl.c
@@ -1173,7 +1173,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'M':
- arg_transport = BUS_TRANSPORT_CONTAINER;
+ arg_transport = BUS_TRANSPORT_MACHINE;
arg_host = optarg;
break;
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 472fab6e49..d223e7895a 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -1024,7 +1024,7 @@ static int login_machine(int argc, char *argv[], void *userdata) {
assert(bus);
if (arg_transport != BUS_TRANSPORT_LOCAL &&
- arg_transport != BUS_TRANSPORT_CONTAINER) {
+ arg_transport != BUS_TRANSPORT_MACHINE) {
log_error("Login only supported on local machines.");
return -ENOTSUP;
}
@@ -1221,7 +1221,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'M':
- arg_transport = BUS_TRANSPORT_CONTAINER;
+ arg_transport = BUS_TRANSPORT_MACHINE;
arg_host = optarg;
break;
diff --git a/src/run/run.c b/src/run/run.c
index 05bfc61beb..b183e4e616 100644
--- a/src/run/run.c
+++ b/src/run/run.c
@@ -214,7 +214,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'M':
- arg_transport = BUS_TRANSPORT_CONTAINER;
+ arg_transport = BUS_TRANSPORT_MACHINE;
arg_host = optarg;
break;
@@ -679,7 +679,7 @@ static int start_transient_service(
if (r < 0)
return log_error_errno(r, "Failed to determine tty name: %m");
- } else if (arg_transport == BUS_TRANSPORT_CONTAINER) {
+ } else if (arg_transport == BUS_TRANSPORT_MACHINE) {
_cleanup_bus_unref_ sd_bus *system_bus = NULL;
_cleanup_bus_message_unref_ sd_bus_message *reply = NULL;
const char *s;
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 4c4648f4c4..abe23ec235 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -622,7 +622,7 @@ static int get_unit_list_recursive(
_cleanup_bus_close_unref_ sd_bus *container = NULL;
int k;
- r = sd_bus_open_system_container(&container, *i);
+ r = sd_bus_open_system_machine(&container, *i);
if (r < 0) {
log_error_errno(r, "Failed to connect to container %s: %m", *i);
continue;
@@ -1713,7 +1713,7 @@ static int get_machine_properties(sd_bus *bus, struct machine_info *mi) {
assert(mi);
if (!bus) {
- r = sd_bus_open_system_container(&container, mi->name);
+ r = sd_bus_open_system_machine(&container, mi->name);
if (r < 0)
return r;
@@ -3704,12 +3704,12 @@ static void print_status_info(
if (i->control_group &&
(i->main_pid > 0 || i->control_pid > 0 ||
- ((arg_transport != BUS_TRANSPORT_LOCAL && arg_transport != BUS_TRANSPORT_CONTAINER) || cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, i->control_group, false) == 0))) {
+ ((arg_transport != BUS_TRANSPORT_LOCAL && arg_transport != BUS_TRANSPORT_MACHINE) || cg_is_empty_recursive(SYSTEMD_CGROUP_CONTROLLER, i->control_group, false) == 0))) {
unsigned c;
printf(" CGroup: %s\n", i->control_group);
- if (arg_transport == BUS_TRANSPORT_LOCAL || arg_transport == BUS_TRANSPORT_CONTAINER) {
+ if (arg_transport == BUS_TRANSPORT_LOCAL || arg_transport == BUS_TRANSPORT_MACHINE) {
unsigned k = 0;
pid_t extra[2];
static const char prefix[] = " ";
@@ -4603,7 +4603,7 @@ static int show_system_status(sd_bus *bus) {
format_timestamp_relative(since1, sizeof(since1), mi.timestamp));
printf(" CGroup: %s\n", mi.control_group ?: "/");
- if (arg_transport == BUS_TRANSPORT_LOCAL || arg_transport == BUS_TRANSPORT_CONTAINER) {
+ if (arg_transport == BUS_TRANSPORT_LOCAL || arg_transport == BUS_TRANSPORT_MACHINE) {
int flags =
arg_all * OUTPUT_SHOW_ALL |
(!on_tty() || pager_have()) * OUTPUT_FULL_WIDTH |
@@ -6682,7 +6682,7 @@ static int systemctl_parse_argv(int argc, char *argv[]) {
break;
case 'M':
- arg_transport = BUS_TRANSPORT_CONTAINER;
+ arg_transport = BUS_TRANSPORT_MACHINE;
arg_host = optarg;
break;
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h
index c27537f862..300b949a4b 100644
--- a/src/systemd/sd-bus.h
+++ b/src/systemd/sd-bus.h
@@ -117,7 +117,7 @@ int sd_bus_open(sd_bus **ret);
int sd_bus_open_user(sd_bus **ret);
int sd_bus_open_system(sd_bus **ret);
int sd_bus_open_system_remote(sd_bus **ret, const char *host);
-int sd_bus_open_system_container(sd_bus **ret, const char *machine);
+int sd_bus_open_system_machine(sd_bus **ret, const char *machine);
int sd_bus_new(sd_bus **ret);
diff --git a/src/timedate/timedatectl.c b/src/timedate/timedatectl.c
index 49196ca793..74f40b9c80 100644
--- a/src/timedate/timedatectl.c
+++ b/src/timedate/timedatectl.c
@@ -436,7 +436,7 @@ static int parse_argv(int argc, char *argv[]) {
break;
case 'M':
- arg_transport = BUS_TRANSPORT_CONTAINER;
+ arg_transport = BUS_TRANSPORT_MACHINE;
arg_host = optarg;
break;