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

[PATCH v2 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: Thu, 16 May 2024 18:03:24 +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=7coXZqUivStKOWByVVC93sA3+vqD9Aj0YK2CmeBB7tg=; b=m4l7p6qOF1lRreW1l3CBIqWZKzMv3E/eRQyWes6HlXU7afJOK1Os5GpzuCaaSUGhAYnC++9kNXSahM3gNStDtfr8J50Toi2GW1DJiZc21QO7V3UsfhiuIFAkAQHr8eb4bAQLZA8SWyU66qI0UQnE/48qF3+64DU+NHeO8MNjIXFLSlP+pVy5l33AZgDNDWgeAGb6MHzxZD5av5CtVneyPFtT+oQ0lt1tB8REnV7OjQipKFZBJx1nhGje82TmTISY5gehBPtGnDG3yGJBSZnbhfBnR3unTLsE6kWBYsaXcQ+ky6LdRzPpWlx7eOsPyWvQgl6VtJojMeYOETNCp0waSQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ajw8jvLIdS0hWT6baNa0RZztzpKE35uPM2NqX3o+g4QDdMctbOyacesvJISS9V4lkMTWXxwUZc45CQtKpuq6f5BeQ068x3vwo43XtxTG3MW/ak25k61NzM0x9MFGUVUpL41A0B8nKP076xx/SqZgb3VOthMyw/ouCm2hBWRyZrahJOy7DFZPSl/alBmyjVx26Wm08D+/o/0vRIV1CSY9SjD8OhjUFICW3K85i5iemcMDrEV4DyjkDJ0aNjSr8iHm0Ou+K5JtqMcVmzpoaL64cvZDdackoWxGR4x4k/++Isj5eBYC7RJMmE2+vMmNmM+2SCqDRW6dnprWOAX+HPhJqA==
  • Cc: Henry Wang <xin.wang2@xxxxxxx>, Anthony PERARD <anthony@xxxxxxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxx>
  • Delivery-date: Thu, 16 May 2024 10:03:52 +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.perard@xxxxxxxxx>
Signed-off-by: Henry Wang <xin.wang2@xxxxxxx>
---
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®.