]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
tools/xenstore: make output of "xenstore-control help" more pretty
authorJuergen Gross <jgross@suse.com>
Wed, 18 Jan 2023 09:50:15 +0000 (10:50 +0100)
committerJulien Grall <jgrall@amazon.com>
Fri, 20 Jan 2023 09:23:51 +0000 (09:23 +0000)
Using a tab for separating the command from the options in the output
of "xenstore-control help" results in a rather ugly list.

Use a fixed size for the command instead.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Julien Grall <jgrall@amazon.com>
tools/xenstore/xenstored_control.c

index 000b2bb8c7abe491b2dba7999ef7a328fffeb9fa..cbd62556c3ae50a9d539de14d28890c8d9a9f81a 100644 (file)
@@ -996,7 +996,7 @@ static int do_control_help(const void *ctx, struct connection *conn,
        if (!resp)
                return ENOMEM;
        for (cmd = 0; cmd < ARRAY_SIZE(cmds); cmd++) {
-               resp = talloc_asprintf_append(resp, "%s\t%s\n",
+               resp = talloc_asprintf_append(resp, "%-15s %s\n",
                                              cmds[cmd].cmd, cmds[cmd].pars);
                if (!resp)
                        return ENOMEM;