virpidfile: Set correct retval in virPidFileReadPath()
The virPidFileReadPath() function is supposed to return 0 on success or a negative value on failure. But the negative value has a special meaning - it's negated errno. Therefore, when converting string to int we shouldn't return -1 which translates to EPERM. Returning EINVAL looks closer to the truth. Signed-off-by: NMichal Privoznik <mprivozn@redhat.com> Reviewed-by: NJán Tomko <jtomko@redhat.com>
Showing
想要评论请 注册 或 登录