diff mbox

[v2,4/4] qga: improve error handling in transfer_memory_block

Message ID 20170407222016.15308-5-f4bug@amsat.org
State New
Headers show

Commit Message

Philippe Mathieu-Daudé April 7, 2017, 10:20 p.m. UTC
Suggested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---

Michael should I use Signed-off-by instead of the Suggested-by (since it is your
code)?

 qga/commands-posix.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Michael Roth April 11, 2017, 1:20 a.m. UTC | #1
Quoting Philippe Mathieu-Daudé (2017-04-07 17:20:16)
> Suggested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>

> ---
> 
> Michael should I use Signed-off-by instead of the Suggested-by (since it is your
> code)?

I suppose it could go either way depending on the circumstances
(assuming you've asked for / obtained their SoB obviously), but
speaking for myself here I don't think it's necessary.

> 
>  qga/commands-posix.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> index fc45102a1e..ca5a24b2c9 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -2128,6 +2128,9 @@ static void transfer_memory_block(GuestMemoryBlock *mem_blk, bool sys2memblk,
>              if (errno == ENOENT) {
>                  result->response =
>                      GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_NOT_SUPPORTED;
> +            } else {
> +                result->response =
> +                    GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_FAILED;
>              }
>              goto out1;
>          }
> -- 
> 2.11.0
>
Philippe Mathieu-Daudé April 11, 2017, 3:14 a.m. UTC | #2
On 04/10/2017 10:20 PM, Michael Roth wrote:
> Quoting Philippe Mathieu-Daudé (2017-04-07 17:20:16)
>> Suggested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
>
>> ---
>>
>> Michael should I use Signed-off-by instead of the Suggested-by (since it is your
>> code)?
>
> I suppose it could go either way depending on the circumstances
> (assuming you've asked for / obtained their SoB obviously), but
> speaking for myself here I don't think it's necessary.
>

Ok! I allowed myself to add your "Suggested-by" after reading Linux's 
process/submitting-patches.rst doc, assuming no need to ask for it since 
you answered in public ML. I'll diligently ask next time!

>>
>>  qga/commands-posix.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
>> index fc45102a1e..ca5a24b2c9 100644
>> --- a/qga/commands-posix.c
>> +++ b/qga/commands-posix.c
>> @@ -2128,6 +2128,9 @@ static void transfer_memory_block(GuestMemoryBlock *mem_blk, bool sys2memblk,
>>              if (errno == ENOENT) {
>>                  result->response =
>>                      GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_NOT_SUPPORTED;
>> +            } else {
>> +                result->response =
>> +                    GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_FAILED;
>>              }
>>              goto out1;
>>          }
>> --
>> 2.11.0
>>
>
Philippe Mathieu-Daudé July 15, 2017, 11:04 p.m. UTC | #3
ping?

On Mon, Apr 10, 2017 at 10:20 PM, Michael Roth
<mdroth@linux.vnet.ibm.com> wrote:
> Quoting Philippe Mathieu-Daudé (2017-04-07 17:20:16)
>> Suggested-by: Michael Roth <mdroth@linux.vnet.ibm.com>
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>
> Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
>
>> ---
>>
>> Michael should I use Signed-off-by instead of the Suggested-by (since it is your
>> code)?
>
> I suppose it could go either way depending on the circumstances
> (assuming you've asked for / obtained their SoB obviously), but
> speaking for myself here I don't think it's necessary.
>
>>
>>  qga/commands-posix.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
>> index fc45102a1e..ca5a24b2c9 100644
>> --- a/qga/commands-posix.c
>> +++ b/qga/commands-posix.c
>> @@ -2128,6 +2128,9 @@ static void transfer_memory_block(GuestMemoryBlock *mem_blk, bool sys2memblk,
>>              if (errno == ENOENT) {
>>                  result->response =
>>                      GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_NOT_SUPPORTED;
>> +            } else {
>> +                result->response =
>> +                    GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_FAILED;
>>              }
>>              goto out1;
>>          }
>> --
>> 2.11.0
>>
>
diff mbox

Patch

diff --git a/qga/commands-posix.c b/qga/commands-posix.c
index fc45102a1e..ca5a24b2c9 100644
--- a/qga/commands-posix.c
+++ b/qga/commands-posix.c
@@ -2128,6 +2128,9 @@  static void transfer_memory_block(GuestMemoryBlock *mem_blk, bool sys2memblk,
             if (errno == ENOENT) {
                 result->response =
                     GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_NOT_SUPPORTED;
+            } else {
+                result->response =
+                    GUEST_MEMORY_BLOCK_RESPONSE_TYPE_OPERATION_FAILED;
             }
             goto out1;
         }