mirror of https://github.com/rusefi/ChibiOS.git
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@15379 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
e446956b6a
commit
f9f2c3636f
|
@ -181,7 +181,7 @@ static void cmd_path(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
static bool shell_execute(int argc, char *argv[]) {
|
||||
extern int runelf(const char *fname, int argc, char *argv[], char *envp[]);
|
||||
extern int runelf(int argc, char *argv[], char *envp[]);
|
||||
int i, ret;
|
||||
|
||||
static const struct {
|
||||
|
@ -204,7 +204,7 @@ static bool shell_execute(int argc, char *argv[]) {
|
|||
}
|
||||
|
||||
/* Trying to execute from file.*/
|
||||
ret = runelf(argv[0], argc - 1, argv + 1, environ);
|
||||
ret = runelf(argc, argv, environ);
|
||||
if (ret != -1) {
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ extern int __returnelf(void);
|
|||
|
||||
static char buf[1024];
|
||||
|
||||
int runelf(const char *fname, int argc, char *argv[], char *envp[]) {
|
||||
int runelf(int argc, char *argv[], char *envp[]) {
|
||||
uint8_t *buf, *bufend;
|
||||
sb_header_t *sbhp;
|
||||
msg_t ret;
|
||||
|
@ -42,7 +42,7 @@ int runelf(const char *fname, int argc, char *argv[], char *envp[]) {
|
|||
}
|
||||
|
||||
/* Loading the specified file.*/
|
||||
ret = sbLoadElf(fname, buf, (size_t)(bufend - buf));
|
||||
ret = sbLoadElf(argv[0], buf, (size_t)(bufend - buf));
|
||||
if (CH_RET_IS_ERROR(ret)) {
|
||||
errno = CH_DECODE_ERROR(ret);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in New Issue