Changeset 67d0f4e in rtems


Ignore:
Timestamp:
Oct 4, 1999, 1:43:46 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
cb620844
Parents:
936f288
Message:

Modified to setup environment pointer on all BSPs. This results
in getenv/putenv working all the time without special assistance
from the BSP.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • c/src/lib/libbsp/shared/bootcard.c

    r936f288 r67d0f4e  
    4545 */
    4646
    47 int main(int argc, char **argv);
     47int main(int argc, char **argv, char **envp);
    4848
    49 int boot_card(int argc, char **argv)
     49int boot_card(int argc, char **argv, char **envp)
    5050{
    51   int status;
     51  int    status;
     52  static char  *argv_pointer = NULL;
     53  static char  *envp_pointer = NULL;
     54  char **argv_p = &argv_pointer;
     55  char **envp_p = &envp_pointer;
     56
     57  /*
     58   *  Set things up so main is called with real pointers for argv and envp.
     59   *  If the BSP has passed us something useful, then pass it on.
     60   */
     61
     62  if ( argv )
     63    argv_p = argv;
     64
     65  if ( envp )
     66    envp_p = envp;
     67
    5268
    5369  /*
     
    105121#endif
    106122
    107   status = main(argc, argv);
     123  status = main( argc, argv_p, envp_p );
    108124
    109125  /*
Note: See TracChangeset for help on using the changeset viewer.