You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
app/pdump: improve command line arguments handling
Rework the argc/argv handling in pdump a little to improve things.
Issues with the original implementation:
* assumed user would never pass proc-type parameter on the commandline
* did not null-terminate the argv array (generally harmless but not in
spec)
* did not handle case where arg processing in eal_init would reorder
non-flag args to the end to be handled by the app.
Fix these - all-be-it minor issues, by having a separate count value for
the number of arguments we put in the argp array, rather than assuming
that its argc + 1 (for proc-type flag). Properly set the last argv entry
to NULL, and when processing app args, reuse the argp array passed to
eal_init rather than reverting back to the original argv array.
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Anatoly Burakov <[email protected]>
0 commit comments