[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] tools/xen-ucode: fix error code propagation of microcode load operation


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
  • Date: Fri, 12 Jun 2020 17:44:15 +0100
  • Authentication-results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: andrew.cooper3@xxxxxxxxxx, ian.jackson@xxxxxxxxxxxxx, wl@xxxxxxx, Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
  • Delivery-date: Fri, 12 Jun 2020 16:44:45 +0000
  • Ironport-sdr: IjLRnD1CjhquFjV5pHyTMPb8LFKYcG/tJyvf5x9B/YHjixQABN2MIllxhs/IWFsX2JtafQ/AU3 x3sCl6FU5DgkHJlisoZoCy5Rc/vkP58tllufSlu1jQY5XxZxqTiKKn54yGMADxptbIiiIKv/K0 Xr1y1ZZHVNOUHwRbqFQaqwfU4RQMaP2mpac9bVZwAMm62AQx576qhVvRDA/cfCzSMfjUdygOqd zTeJ73HpKaclaTzDh4N+YgCSUdIj1SA5kyFkjCsUKX80fyjnftS0n7T1+21z+32gXfYMElKu0n bqU=
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Otherwise it's impossible to know the reason for a fault or blob rejection
inside the automation.

Signed-off-by: Igor Druzhinin <igor.druzhinin@xxxxxxxxxx>
---
 tools/misc/xen-ucode.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/misc/xen-ucode.c b/tools/misc/xen-ucode.c
index 0c257f4..2c907e1 100644
--- a/tools/misc/xen-ucode.c
+++ b/tools/misc/xen-ucode.c
@@ -62,8 +62,11 @@ int main(int argc, char *argv[])
 
     ret = xc_microcode_update(xch, buf, len);
     if ( ret )
+    {
+        ret = errno;
         fprintf(stderr, "Failed to update microcode. (err: %s)\n",
                 strerror(errno));
+    }
 
     xc_interface_close(xch);
 
@@ -74,5 +77,5 @@ int main(int argc, char *argv[])
     }
     close(fd);
 
-    return 0;
+    return ret;
 }
-- 
2.7.4




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.