utils: add more detailed help message#1813
Open
RndelQndel wants to merge 1 commit intonamhyung:masterfrom
Open
utils: add more detailed help message#1813RndelQndel wants to merge 1 commit intonamhyung:masterfrom
RndelQndel wants to merge 1 commit intonamhyung:masterfrom
Conversation
Add more detailed helping message Example: uftrace replay --help COMMAND: replay Show program excution in the trace data Each command has detailed helping message for option Signed-off-by: Yongrak Choi <cyl941028@gmail.com>
Author
|
I can't fill that command alone. Because I didn't know all options. It just draft and concept. |
Contributor
|
Hello, @RndelQndel |
namhyung
reviewed
Aug 31, 2023
| opts->mode = UFTRACE_MODE_INVALID; | ||
| } | ||
|
|
||
| static int print_subhelp(int beforekey) |
Owner
There was a problem hiding this comment.
It should be before_key but I don't know what that means.
|
|
||
| __used static const char uftrace_record_usage[] = | ||
| " COMMAND:\n" | ||
| " record Run a program and saves the trace data\n" |
Owner
There was a problem hiding this comment.
It'd be nice to list available options (only for the subcommand) as well.
| break; | ||
| case UFTRACE_MODE_INVALID: | ||
| default: | ||
| retval = -3; |
| update_subcmd(opts, argv[optind]); | ||
|
|
||
| if (opts->mode != UFTRACE_MODE_INVALID) { | ||
| beforekey = opts->mode; |
Owner
There was a problem hiding this comment.
Why not use opts->mode directly?
| break; | ||
| } | ||
|
|
||
| return (retval); |
Owner
There was a problem hiding this comment.
We don't use parenthesis for return statement.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add more detailed helping message
Example:
uftrace replay --help
COMMAND:
replay Show program excution in the trace data
Each command has detailed helping message for option