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

[PATCH v2 2/2] tools/xl: Correct the help information and exit code of the dt-overlay command


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Henry Wang <xin.wang2@xxxxxxx>
  • Date: Tue, 7 May 2024 16:24:00 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UCoREhGdiGdJh4nqENuQ2tKLWDW2JKQq7+BvW87Gh/k=; b=fP0JsAyw9MdF+mZ3W/l+XokiHx7jTAavRMKbmi3KZSfcaoOhTp4+Gbr1T+XTSSEv1g94XIkndLag7PKwuibueaUERgL6SMgealrD2ptsdU+/uvUfrU4y2+NB9coIScQ7VeCW/IZkUpxqGmOa/8014q2ilC6aktMF2cgAd/d6NhibUdwRSNgkPdn5YPz2XuTQn3b6vSYbsi+IgwguIuYsV2gAJYYj0gZRtGFOpHm9fd4U6lXApK7beE2KWFV0BRbsGRZjcbxCp3iOT/x1qZt8zOwdpA9MZE107+nHkRdas3cGWk1A8FWgxXSFLbpRsFRSn/TgrXgZG2yR1/63JeaR/Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=cir1bWtVTDDZiusjo6Y2irTyEaA96THmEn15TBtAcvuTY5AfHv3ZGPbf57uoqAQLfYlMmFNty8QLU3WKyHDiiR+JLk1ElMELPnigFFx62AWMfbgBKO8pL0mUdZujAekwLMDz7PFKN8JaHE3igiPsOEKSQD8j3+pVbx2To8j9MAtZkJgzEqmc8a+WadKj1DoiZCJrSWFZXLrGPC0MMov4GbJdTLi81pQj7BbtSnR9OpDwfXl9Ka4DRiT3rrZJXBO7x5mH0icVXmnkwnuzoRtE0Mrnli5aeEbuNU6Oh4J3Ib5bG5UV8NrpheRPJcOzluAyvaPSrENtgH+2m+onDSsZbA==
  • Cc: Henry Wang <xin.wang2@xxxxxxx>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxx>
  • Delivery-date: Tue, 07 May 2024 08:24:25 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Fix the name mismatch in the xl dt-overlay command, the
command name should be "dt-overlay" instead of "dt_overlay".

Fix the exit code of the dt-overlay command, use EXIT_FAILURE
instead of ERROR_FAIL.

Fixes: 61765a07e3d8 ("tools/xl: Add new xl command overlay for device tree 
overlay support")
Suggested-by: Anthony PERARD <anthony.perard@xxxxxxxxx>
Signed-off-by: Henry Wang <xin.wang2@xxxxxxx>
---
v2:
- New patch
---
 tools/xl/xl_vmcontrol.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/xl/xl_vmcontrol.c b/tools/xl/xl_vmcontrol.c
index 98f6bd2e76..02575d5d36 100644
--- a/tools/xl/xl_vmcontrol.c
+++ b/tools/xl/xl_vmcontrol.c
@@ -1278,7 +1278,7 @@ int main_dt_overlay(int argc, char **argv)
     const int overlay_remove_op = 2;
 
     if (argc < 2) {
-        help("dt_overlay");
+        help("dt-overlay");
         return EXIT_FAILURE;
     }
 
@@ -1302,11 +1302,11 @@ int main_dt_overlay(int argc, char **argv)
             fprintf(stderr, "failed to read the overlay device tree file %s\n",
                     overlay_config_file);
             free(overlay_dtb);
-            return ERROR_FAIL;
+            return EXIT_FAILURE;
         }
     } else {
         fprintf(stderr, "overlay dtbo file not provided\n");
-        return ERROR_FAIL;
+        return EXIT_FAILURE;
     }
 
     rc = libxl_dt_overlay(ctx, overlay_dtb, overlay_dtb_size, op);
-- 
2.34.1




 


Rackspace

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