chiark / gitweb /
nspawn: mount a new /proc instance in the container so that we don't see the hosts...
[elogind.git] / src / install.c
index e1c69444f99a7d9ea500be597437e620578b2879..b37bbbdc5acd64bbf1faf62516178098f7468a03 100644 (file)
@@ -1462,7 +1462,7 @@ int unit_file_disable(
 
         q = remove_marked_symlinks(remove_symlinks_to, config_path, changes, n_changes);
         if (r == 0)
-                r = 1;
+                r = q;
 
 finish:
         install_context_done(&c);
@@ -1874,7 +1874,7 @@ int unit_file_get_list(
                         }
 
                         r = null_or_empty_path(f->path);
-                        if (r < 0) {
+                        if (r < 0 && r != -ENOENT) {
                                 free(f->path);
                                 free(f);
                                 goto finish;
@@ -1942,3 +1942,10 @@ static const char* const unit_file_state_table[_UNIT_FILE_STATE_MAX] = {
 };
 
 DEFINE_STRING_TABLE_LOOKUP(unit_file_state, UnitFileState);
+
+static const char* const unit_file_change_type_table[_UNIT_FILE_CHANGE_TYPE_MAX] = {
+        [UNIT_FILE_SYMLINK] = "symlink",
+        [UNIT_FILE_UNLINK] = "unlink",
+};
+
+DEFINE_STRING_TABLE_LOOKUP(unit_file_change_type, UnitFileChangeType);