Re: [Qemu-devel] [PATCH v2 1/5] qemu-io: Don't die on second open

2017-05-31 Thread Max Reitz
On 2017-05-31 17:12, Eric Blake wrote: > On 05/31/2017 09:18 AM, Max Reitz wrote: >> On 2017-05-24 22:28, Eric Blake wrote: >>> Most callback commands in qemu-io return 0 to keep the interpreter >>> loop running, or 1 to quit immediately. However, open_f() just >>> passed through the return value

Re: [Qemu-devel] [PATCH v2 1/5] qemu-io: Don't die on second open

2017-05-31 Thread Eric Blake
On 05/31/2017 09:18 AM, Max Reitz wrote: > On 2017-05-24 22:28, Eric Blake wrote: >> Most callback commands in qemu-io return 0 to keep the interpreter >> loop running, or 1 to quit immediately. However, open_f() just >> passed through the return value of openfile(), which has different >> semanti

Re: [Qemu-devel] [PATCH v2 1/5] qemu-io: Don't die on second open

2017-05-31 Thread Max Reitz
On 2017-05-24 22:28, Eric Blake wrote: > Most callback commands in qemu-io return 0 to keep the interpreter > loop running, or 1 to quit immediately. However, open_f() just > passed through the return value of openfile(), which has different > semantics of returning 0 if a file was opened, or 1 on

Re: [Qemu-devel] [PATCH v2 1/5] qemu-io: Don't die on second open

2017-05-24 Thread Fam Zheng
On Wed, 05/24 15:28, Eric Blake wrote: > Most callback commands in qemu-io return 0 to keep the interpreter > loop running, or 1 to quit immediately. However, open_f() just > passed through the return value of openfile(), which has different > semantics of returning 0 if a file was opened, or 1 on

[Qemu-devel] [PATCH v2 1/5] qemu-io: Don't die on second open

2017-05-24 Thread Eric Blake
Most callback commands in qemu-io return 0 to keep the interpreter loop running, or 1 to quit immediately. However, open_f() just passed through the return value of openfile(), which has different semantics of returning 0 if a file was opened, or 1 on any failure. As a result of mixing the return