commands: return -1 on lxc_cmd_get_init_pid() err

A while back the whole lxc_cmd() infrastructure was changed to return meaningful negative error codes. But lxc_cmd_get_init_pid() should always return -1. Make it so! Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com> Reported-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 7ee4b4b8
...@@ -381,7 +381,7 @@ pid_t lxc_cmd_get_init_pid(const char *name, const char *lxcpath) ...@@ -381,7 +381,7 @@ pid_t lxc_cmd_get_init_pid(const char *name, const char *lxcpath)
ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL); ret = lxc_cmd(name, &cmd, &stopped, lxcpath, NULL);
if (ret < 0) if (ret < 0)
return ret; return -1;
return PTR_TO_INT(cmd.rsp.data); return PTR_TO_INT(cmd.rsp.data);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment