Skip to contentSkip to conversation

xen: Fix XEN_DMOP_remote_shutdown return value

PATCH In review Ross Lagerwall 5 participants 5 messages Oct 11, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen: Fix XEN_DMOP_remote_shutdown return value

Return 0 to indicate success rather than whatever rc was previously set to (-EINVAL).

---
 xen/arch/x86/hvm/dm.c | 1 +
 1 file changed, 1 insertion(+)
xen/arch/x86/hvm/dm.c +1 -0
index 82addea..32ade95 100644
@@ -636,6 +636,7 @@ static int dm_op(const struct dmop_args *op_args)
             &op.u.remote_shutdown;
 
         domain_shutdown(d, data->reason);
+        rc = 0;
         break;
     }
 
Signature · 7 lines
2.9.5


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Ross Lagerwall

Return 0 to indicate success rather than whatever rc was previously set to (-EINVAL).

---
 xen/arch/x86/hvm/dm.c | 1 +
 1 file changed, 1 insertion(+)
xen/arch/x86/hvm/dm.c +0 -0
index 82addea..32ade95 100644

xen/arch/x86/hvm/dm.c static int dm_op(const struct dmop_args *op_args) · line 639

Quoted 4 lines
xen/arch/x86/hvm/dm.c +1 -0
@@ -636,6 +636,7 @@ static int dm_op(const struct dmop_args *op_args)
             &op.u.remote_shutdown;
 
         domain_shutdown(d, data->reason);
+        rc = 0;

Ideally with a newline here (can be fixed on commit).

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw

Andrew Cooper writes ("Re: [PATCH for-4.10] xen: Fix XEN_DMOP_remote_shutdown return value"):

Quoted 16 lines · Ross Lagerwall
Quoted 15 lines

Return 0 to indicate success rather than whatever rc was previously set to (-EINVAL).

---
 xen/arch/x86/hvm/dm.c | 1 +
 1 file changed, 1 insertion(+)
xen/arch/x86/hvm/dm.c +0 -0
index 82addea..32ade95 100644
@@ -636,6 +636,7 @@ static int dm_op(const struct dmop_args *op_args)
             &op.u.remote_shutdown;
 
Quoted 4 lines

xen/arch/x86/hvm/dm.c static int dm_op(const struct dmop_args *op_args) · line 639

Quoted 2 lines
xen/arch/x86/hvm/dm.c +1 -0
         domain_shutdown(d, data->reason);
+        rc = 0;

Ideally with a newline here (can be fixed on commit).

Thanks to Ross for spotting this, and to whoever committed it so speedily.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel