return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"With 'edit --stdin --full', exactly one unit for editing must be specified.");
- STRV_FOREACH(tmp, names) {
- r = unit_is_masked(bus, *tmp);
- if (r < 0 && r != -ENOENT)
- return log_error_errno(r, "Failed to check if unit %s is masked: %m", *tmp);
- if (r > 0)
- return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Cannot edit %s: unit is masked.", *tmp);
- }
-
r = find_paths_to_edit(bus, &context, names);
if (r < 0)
return r;