Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script options fix #80

Closed
wants to merge 8 commits into from
Closed

Script options fix #80

wants to merge 8 commits into from

Conversation

abak
Copy link
Contributor

@abak abak commented Mar 17, 2014

This pull request fixes the following issues :

  • when passing custom arguments to a script, if those arguments are not declared within perf, they prevent the execution of perf.
    e.g.
perf script -i path/to/perf.data -s my_script -arg1 arg_value

perf will issue an error message and no processing will occur

  • when passing custom arguments to a script, if those arguments are declared by perf, they are consumed and not passed to the script.
    e.g.
perf script -i path/to/perf.data -s my_script -h

perf will display its own help message, instead of the expected help message from my_script.

These issues are addressed as follows :

  • The parse option flag is changed from PARSE_OPT_STOP_AT_NON_OPTION to PARSE_OPT_KEEP_UNKNOWN
  • A new option type is introduce OPT_CALLBACK_FINAL_OPTION, which effectively prevents the parsing of all options located after the script.

@abak
Copy link
Contributor Author

abak commented Mar 18, 2014

submitted through proper channels

@abak abak closed this Mar 18, 2014
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.

1 participant