sim-card
/
qemu
Archived
10
0
Fork 0

exec_close(): accept any negative value as qemu_fclose() error

Note that we don't return the unchanged return value back yet, because
we need to change all qemu_fclose() callers to accept any positive value
as success.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
Eduardo Habkost 2011-11-10 10:41:41 -02:00 committed by Anthony Liguori
parent 90d8454ed0
commit ce812673dc
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ static int exec_close(MigrationState *s)
ret = qemu_fclose(s->opaque);
s->opaque = NULL;
s->fd = -1;
if (ret != -1 &&
if (ret >= 0 &&
WIFEXITED(ret)
&& WEXITSTATUS(ret) == 0) {
ret = 0;