From 76ec966f0e33685f8331603805c0349adceea836 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sat, 16 Apr 2016 18:41:34 -0400 Subject: tree-wide: use ERFKILL instead of ESHUTDOWN for "unit masked" If the error code ever leaks (we print the strerror error instead of providing our own), the message for ESHUTDOWN is "Cannot send after transport endpoint shutdown", which can be misleading. In particular it suggest that some mishandling of the dbus connection occured. Let's change that to ERFKILL which has the advantage that a) it sounds implausible as actual error, b) has the connotation of disabling something manually. --- src/test/test-install-root.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/test/test-install-root.c') diff --git a/src/test/test-install-root.c b/src/test/test-install-root.c index 2138655e29..998c345a1a 100644 --- a/src/test/test-install-root.c +++ b/src/test/test-install-root.c @@ -80,7 +80,7 @@ static void test_basic_mask_and_enable(const char *root) { assert_se(unit_file_get_state(UNIT_FILE_SYSTEM, root, "d.service", &state) >= 0 && state == UNIT_FILE_MASKED); /* Enabling a masked unit should fail! */ - assert_se(unit_file_enable(UNIT_FILE_SYSTEM, false, root, STRV_MAKE("a.service"), false, &changes, &n_changes) == -ESHUTDOWN); + assert_se(unit_file_enable(UNIT_FILE_SYSTEM, false, root, STRV_MAKE("a.service"), false, &changes, &n_changes) == -ERFKILL); unit_file_changes_free(changes, n_changes); changes = NULL; n_changes = 0; -- cgit v1.2.3-54-g00ecf