c = cg_unescape(c);
if (!unit_name_is_valid(c, TEMPLATE_INVALID))
- return -EINVAL;
+ return -ENXIO;
s = strdup(c);
if (!s)
if (!t)
t = skip_user_manager(e);
if (!t)
- return -ENOENT;
+ return -ENXIO;
/* ... and skip more slices if there are any */
e = skip_slices(t);
n = strchrnul(e, '/');
if (e == n)
- return -ENOENT;
+ return -ENXIO;
s = strndupa(e, n - e);
s = cg_unescape(s);
x = startswith(s, "session-");
if (!x)
- return -ENOENT;
+ return -ENXIO;
y = endswith(x, ".scope");
if (!y || x == y)
- return -ENOENT;
+ return -ENXIO;
if (session) {
char *r;
start = startswith(slice, "user-");
if (!start)
- return -ENOENT;
+ return -ENXIO;
end = endswith(slice, ".slice");
if (!end)
- return -ENOENT;
+ return -ENXIO;
s = strndupa(start, end - start);
if (!s)
- return -ENOENT;
+ return -ENXIO;
if (parse_uid(s, &u) < 0)
- return -EIO;
+ return -ENXIO;
if (uid)
*uid = u;
char *s;
if (!e)
- return -ENOENT;
+ return -ENXIO;
s = strndup(e, m);
if (!s)