Skip to content

Conversation

RndelQndel
Copy link

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

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 <[email protected]>
@RndelQndel
Copy link
Author

RndelQndel commented Aug 28, 2023

I can't fill that command alone. Because I didn't know all options.

It just draft and concept.

@RndelQndel RndelQndel marked this pull request as ready for review August 28, 2023 14:47
@MichelleJin12
Copy link
Contributor

Hello, @RndelQndel
Please change utils: add more detailed help message to uftrace: Add more detailed help message.

opts->mode = UFTRACE_MODE_INVALID;
}

static int print_subhelp(int beforekey)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be nice to list available options (only for the subcommand) as well.

break;
case UFTRACE_MODE_INVALID:
default:
retval = -3;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the -3 mean?

update_subcmd(opts, argv[optind]);

if (opts->mode != UFTRACE_MODE_INVALID) {
beforekey = opts->mode;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use opts->mode directly?

break;
}

return (retval);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use parenthesis for return statement.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@RndelQndel return retval

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants