Skip to content

Commit

Permalink
Merge pull request #500 from jphickey/fix-499-linux-args
Browse files Browse the repository at this point in the history
Fix #499, store all arguments in generic-linux BSP
  • Loading branch information
astrogeco authored Jun 23, 2020
2 parents 9910039 + f0ebd4a commit 4878b90
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/bsp/generic-linux/src/bsp_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,12 @@ int main(int argc, char *argv[])
* Note that the first argument (0) is the command name. The
* first "real" argument is at position 1.
*
* The first arg is ignored to be more consistent with other platforms
* where this is not passed in.
* However this still needs to pass it through as the appliction
* might still want to use library "getopt" and this expects the
* first parameter to be this way.
*/
if (argc > 1)
{
OS_BSP_Global.ArgC = argc - 1;
OS_BSP_Global.ArgV = &argv[1];
}
OS_BSP_Global.ArgC = argc;
OS_BSP_Global.ArgV = argv;

/*
* Only attempt terminal control if the stdout is a TTY
Expand Down

0 comments on commit 4878b90

Please sign in to comment.