2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-02 07:15:31 +00:00

lib: return -EBADE instead of -1

Signed-off-by: Ruslan Kuprieiev <kupruser@gmail.com>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Ruslan Kuprieiev
2013-12-18 15:50:27 +04:00
committed by Pavel Emelyanov
parent e4c366806f
commit e80ee17368
2 changed files with 10 additions and 10 deletions

View File

@@ -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)

View File

@@ -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);