chiark / gitweb /
transaction: downgrade warnings about masked units
authorLennart Poettering <lennart@poettering.net>
Sun, 22 Apr 2012 13:22:52 +0000 (15:22 +0200)
committerLennart Poettering <lennart@poettering.net>
Sun, 22 Apr 2012 13:22:52 +0000 (15:22 +0200)
src/core/transaction.c

index 91feab03983d144ad436ebbd30a2abf270f1f0d5..a8b7e4c25d9b60fef8c474353cf7c5927d791a8b 100644 (file)
@@ -843,7 +843,7 @@ int transaction_add_job_and_dependencies(
 
         if (type != JOB_STOP && unit->load_state == UNIT_MASKED) {
                 dbus_set_error(e, BUS_ERROR_MASKED, "Unit %s is masked.", unit->id);
-                return -EINVAL;
+                return -EADDRNOTAVAIL;
         }
 
         if (!unit_job_is_applicable(unit, type)) {
@@ -913,7 +913,8 @@ int transaction_add_job_and_dependencies(
                         SET_FOREACH(dep, ret->unit->dependencies[UNIT_REQUIRES_OVERRIDABLE], i) {
                                 r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, !override, override, false, false, ignore_order, e);
                                 if (r < 0) {
-                                        log_warning("Cannot add dependency job for unit %s, ignoring: %s", dep->id, bus_error(e, r));
+                                        log_full(r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_WARNING,
+                                                 "Cannot add dependency job for unit %s, ignoring: %s", dep->id, bus_error(e, r));
 
                                         if (e)
                                                 dbus_error_free(e);
@@ -923,7 +924,8 @@ int transaction_add_job_and_dependencies(
                         SET_FOREACH(dep, ret->unit->dependencies[UNIT_WANTS], i) {
                                 r = transaction_add_job_and_dependencies(tr, JOB_START, dep, ret, false, false, false, false, ignore_order, e);
                                 if (r < 0) {
-                                        log_warning("Cannot add dependency job for unit %s, ignoring: %s", dep->id, bus_error(e, r));
+                                        log_full(r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_WARNING,
+                                                 "Cannot add dependency job for unit %s, ignoring: %s", dep->id, bus_error(e, r));
 
                                         if (e)
                                                 dbus_error_free(e);
@@ -944,7 +946,8 @@ int transaction_add_job_and_dependencies(
                         SET_FOREACH(dep, ret->unit->dependencies[UNIT_REQUISITE_OVERRIDABLE], i) {
                                 r = transaction_add_job_and_dependencies(tr, JOB_VERIFY_ACTIVE, dep, ret, !override, override, false, false, ignore_order, e);
                                 if (r < 0) {
-                                        log_warning("Cannot add dependency job for unit %s, ignoring: %s", dep->id, bus_error(e, r));
+                                        log_full(r == -EADDRNOTAVAIL ? LOG_DEBUG : LOG_WARNING,
+                                                 "Cannot add dependency job for unit %s, ignoring: %s", dep->id, bus_error(e, r));
 
                                         if (e)
                                                 dbus_error_free(e);