mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-12 09:17:44 +03:00
parent
f20f4a775e
commit
36591e1080
@ -389,14 +389,18 @@ static int parse_fdname(const char *fdname, char **session_id, dev_t *dev) {
|
||||
|
||||
if (!streq(parts[0], "session"))
|
||||
return -EINVAL;
|
||||
|
||||
id = strdup(parts[1]);
|
||||
if (!id)
|
||||
return -ENOMEM;
|
||||
|
||||
if (!streq(parts[2], "device"))
|
||||
return -EINVAL;
|
||||
r = safe_atou(parts[3], &major) ||
|
||||
safe_atou(parts[4], &minor);
|
||||
|
||||
r = safe_atou(parts[3], &major);
|
||||
if (r < 0)
|
||||
return r;
|
||||
r = safe_atou(parts[4], &minor);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user