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

[PATCH v3 2/8] 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, 21 May 2024 12:35:51 +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=6MgtBjlO1A8ilW5oFOin/8HiTsVKeBou6t2YnvlwNys=; b=oeHMEoOkkpR1cbiCvXZL4B/zvvoKPa3pGw6i4hVo0NuA7I1pOQSHJyWqia0FcCiYpzdzErUvp/phEaUtZ/ps8uz3bC2V0T47KX7FZgFcH8Szsf4dnq9zBdNf/rcOk0ZGKBSz7uGBfnj0//PzUr/bCDms0MNPbu+cs0+XGwNt1Yvqz39STI2f77t7QXfGv4cdnRiUUU0Kx+X/0iubBUFla7/MtHzeW3P0d2HtVnV/PSd0l1aDfCzPv1IWxRmTsfb3App75fGTZ6qtj13ToDdkpSXMQzXWwWa4/gmqhHQmIHmc0zSukJgDeBrD8EyVGmzTS+2AAJtFGyPZZ0HkJSfzyw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gBWTSlySG9p9Ae6RjL0C+Kr51gF7ITt0cBlVY003oDwljuC3e9lwBPuxooeRQdBOWr3H94GjZkD41AkAb+rjvf46Eic8gferqRxss5IujoWAnoqf56bpwxcAckFBOq8f8lP/wa08KDAk6BQxP48bDJBpAjJHffOg6FwFnRYnadvEkwdpjYOgKc17RrP3ekfw6IiHIRoGMEyZxdMKJgUCLX7J/8rc3vJCX+l0RuygBaMx+i+KABiQMoa+vmhfeCQgLRZ71Q/nT8Lf4P9VzFa4MZTl19nm5Ssy3SoeewJNnqxTPMPoUiZu2B3vGX+13OSI4k5gn3YA3GC3cPRh5nCUmg==
  • Cc: Anthony PERARD <anthony@xxxxxxxxxxxxxx>, Henry Wang <xin.wang2@xxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>
  • Delivery-date: Tue, 21 May 2024 04:36:13 +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".
Add the missing "," in the cmdtable.

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@xxxxxxxxxxxxxx>
Signed-off-by: Henry Wang <xin.wang2@xxxxxxx>
Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>
---
v3:
- Add Jason's Reviewed-by tag.
v2:
- New patch
---
 tools/xl/xl_cmdtable.c  | 2 +-
 tools/xl/xl_vmcontrol.c | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c
index 62bdb2aeaa..1f3c6b5897 100644
--- a/tools/xl/xl_cmdtable.c
+++ b/tools/xl/xl_cmdtable.c
@@ -635,7 +635,7 @@ const struct cmd_spec cmd_table[] = {
     { "dt-overlay",
       &main_dt_overlay, 0, 1,
       "Add/Remove a device tree overlay",
-      "add/remove <.dtbo>"
+      "add/remove <.dtbo>",
       "-h print this help\n"
     },
 #endif
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®.