* properly handle .mount unit state tracking when two mount points are stacked one on top of another on the exact same mount point.
-* shorten the message to sane length:
- "Cannot add dependency job for unit display-manager.service, ignoring: Unit display-manager.service
- failed to load: No such file or directory. See system logs and 'systemctl status display-manager.service' for details."
-
* sd_bus_unref() is broken regarding self-references and "pseudo thread-safety".
See the comment in sd_bus_unref() for more..
}
if (type != JOB_STOP && unit->load_state == UNIT_ERROR) {
- sd_bus_error_setf(e, BUS_ERROR_LOAD_FAILED,
- "Unit %s failed to load: %s. "
- "See system logs and 'systemctl status %s' for details.",
- unit->id,
- strerror(-unit->load_error),
- unit->id);
+ if (unit->load_error == -ENOENT)
+ sd_bus_error_setf(e, BUS_ERROR_LOAD_FAILED,
+ "Unit %s failed to load: %s.",
+ unit->id,
+ strerror(-unit->load_error));
+ else
+ sd_bus_error_setf(e, BUS_ERROR_LOAD_FAILED,
+ "Unit %s failed to load: %s. "
+ "See system logs and 'systemctl status %s' for details.",
+ unit->id,
+ strerror(-unit->load_error),
+ unit->id);
return -EINVAL;
}