Commit e80ee173 authored by Ruslan Kuprieiev's avatar Ruslan Kuprieiev Committed by Pavel Emelyanov

lib: return -EBADE instead of -1

Signed-off-by: 's avatarRuslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent e4c36680
......@@ -231,7 +231,7 @@ int criu_check(void)
if (ret)
goto exit;
ret = resp->success ? 0 : -1;
ret = resp->success ? 0 : -EBADE;
exit:
if (resp)
......@@ -263,7 +263,7 @@ int criu_dump(void)
else
ret = 0;
} else
ret = -1;
ret = -EBADE;
exit:
if (resp)
......@@ -292,7 +292,7 @@ int criu_restore(void)
if (resp->success)
ret = resp->restore->pid;
else
ret = -1;
ret = -EBADE;
exit:
if (resp)
......
......@@ -45,20 +45,20 @@ void criu_set_log_file(char *log_file);
*
* Return value errno Description
* ----------------------------------------------------------------------------
* 0 0 Success.
* 0 undefined Success.
*
* >0 0 Success(criu_restore() only).
* >0 undefined Success(criu_restore() only).
*
* -1 0 RPC has returned fail.
* -BADE rpc err (0 for now) RPC has returned fail.
*
* -ECONNREFUSED from failed syscall Unable to connect to CRIU.
* -ECONNREFUSED errno Unable to connect to CRIU.
*
* -ECOMM from failed syscall Unable to send/recv msg to/from CRIU.
* -ECOMM errno Unable to send/recv msg to/from CRIU.
*
* -EINVAL 0 CRIU doesn't support this type of request.
* -EINVAL undefined CRIU doesn't support this type of request.
* You should probably update CRIU.
*
* -EBADMSG 0 Unexpected response from CRIU.
* -EBADMSG undefined Unexpected response from CRIU.
* You should probably update CRIU.
*/
int criu_check(void);
......
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