]> xenbits.xensource.com Git - xen.git/commitdiff
tools/xl: Correct the help information and exit code of the dt-overlay command
authorHenry Wang <xin.wang2@amd.com>
Thu, 23 May 2024 07:40:32 +0000 (15:40 +0800)
committerStefano Stabellini <stefano.stabellini@amd.com>
Fri, 24 May 2024 23:26:22 +0000 (16:26 -0700)
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@xenproject.org>
Signed-off-by: Henry Wang <xin.wang2@amd.com>
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
tools/xl/xl_cmdtable.c
tools/xl/xl_vmcontrol.c

index 62bdb2aeaa3559c5eafb479019084b29464343b8..1f3c6b58978e0e57b03d8c95c850cc3cea83a00d 100644 (file)
@@ -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
index 98f6bd2e7607c64875cc630dfaa9084fce522d77..02575d5d36ae7fae0a5a9eb5a331c118a39e2021 100644 (file)
@@ -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);