/**
* Finds where the unit is defined on disk. Returns 0 if the unit is not found. Returns 1 if it is
* found, and sets:
+ *
* - the path to the unit in *ret_frament_path, if it exists on disk,
+ *
* - and a strv of existing drop-ins in *ret_dropin_paths, if the arg is not NULL and any dropins
* were found.
*
* Returns -ERFKILL if the unit is masked, and -EKEYREJECTED if the unit file could not be loaded for
- * some reason (the latter only applies if we are going through the service manager).
+ * some reason (the latter only applies if we are going through the service manager). As special
+ * exception it won't log for these two error cases.
*/
assert(unit_name);
return log_error_errno(r, "Failed to get LoadState: %s", bus_error_message(&error, r));
if (streq(load_state, "masked"))
- return -ERFKILL;
+ return -ERFKILL; /* special case: no logging */
if (streq(load_state, "not-found")) {
r = 0;
goto finish;
}
if (!STR_IN_SET(load_state, "loaded", "bad-setting"))
- return -EKEYREJECTED;
+ return -EKEYREJECTED; /* special case: no logging */
r = sd_bus_get_property_string(
bus,