|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 6ad3b2b62cbe34cc02ee98deb5f48047f5e42d26 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Sat, 30 Aug 2014 17:22:42 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] systemd: fix error message
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
src/core/dbus-manager.c | 4 ++--
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/src/core/dbus-manager.c b/src/core/dbus-manager.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index 008cf6b4cd..e792fe7e28 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/src/core/dbus-manager.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/src/core/dbus-manager.c
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -1241,7 +1241,7 @@ static int method_switch_root(sd_bus *bus, sd_bus_message *message, void *userda
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
return r;
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
if (m->running_as != SYSTEMD_SYSTEM)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED, "KExec is only supported for system managers.");
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ return sd_bus_error_setf(error, SD_BUS_ERROR_NOT_SUPPORTED, "Root switching is only supported by system manager.");
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
r = sd_bus_message_read(message, "ss", &root, &init);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
if (r < 0)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -1252,7 +1252,7 @@ static int method_switch_root(sd_bus *bus, sd_bus_message *message, void *userda
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
/* Safety check */
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
if (isempty(init)) {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- if (! path_is_os_tree(root))
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ if (!path_is_os_tree(root))
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Specified switch root path %s does not seem to be an OS tree. os-release file is missing.", root);
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
} else {
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
_cleanup_free_ char *p = NULL;
|