chiark / gitweb /
test-functions:install_libnss() call dracut_install with all $NSS_LIBS
[elogind.git] / src / systemctl / systemctl.c
index 66c0b9949e44dd3b3e06c7ac547a0bebbca2cd58..462f7fdc3379d30528572c47ce76cd8cf7bf5f3a 100644 (file)
@@ -4563,6 +4563,11 @@ static int cat(sd_bus *bus, char **args) {
 
         assert(args);
 
+        if (arg_host) {
+                log_error("Option --host cannot be used with 'cat'");
+                return -EINVAL;
+        }
+
         r = init_home_and_lookup_paths(&user_home, &user_runtime, &lp);
         if (r < 0)
                 return r;
@@ -4973,8 +4978,8 @@ static int switch_root(sd_bus *bus, char **args) {
         if (init) {
                 const char *root_systemd_path = NULL, *root_init_path = NULL;
 
-                root_systemd_path = strappenda(root, "/" SYSTEMD_BINARY_PATH);
-                root_init_path = strappenda(root, "/", init);
+                root_systemd_path = strjoina(root, "/" SYSTEMD_BINARY_PATH);
+                root_init_path = strjoina(root, "/", init);
 
                 /* If the passed init is actually the same as the
                  * systemd binary, then let's suppress it. */
@@ -5778,7 +5783,7 @@ static int unit_file_create_dropin(const char *unit_name, const char *user_home,
         assert(ret_new_path);
         assert(ret_tmp_path);
 
-        ending = strappenda(unit_name, ".d/override.conf");
+        ending = strjoina(unit_name, ".d/override.conf");
         r = get_file_to_edit(ending, user_home, user_runtime, &tmp_new_path);
         if (r < 0)
                 return r;