mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 19:29:18 +00:00
bugfix: cfs_open must get aquire permissions
This commit is contained in:
parent
25cc327acc
commit
2e156afe2a
@ -28,7 +28,7 @@
|
||||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: shell-exec.c,v 1.3 2008/08/21 19:15:41 nvt-se Exp $
|
||||
* $Id: shell-exec.c,v 1.4 2009/03/26 12:22:52 fros4943 Exp $
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -71,19 +71,18 @@ PROCESS_THREAD(shell_exec_process, ev, data)
|
||||
autostart_exit(elfloader_autostart_processes);
|
||||
}
|
||||
|
||||
|
||||
fd = cfs_open(name, CFS_READ);
|
||||
fd = cfs_open(name, CFS_READ | CFS_WRITE);
|
||||
if(fd < 0) {
|
||||
shell_output_str(&exec_command,
|
||||
"exec: could not open ", name);
|
||||
} else {
|
||||
int ret;
|
||||
char *print, *symbol;
|
||||
|
||||
|
||||
ret = elfloader_load(fd);
|
||||
cfs_close(fd);
|
||||
symbol = "";
|
||||
|
||||
|
||||
switch(ret) {
|
||||
case ELFLOADER_OK:
|
||||
print = "OK";
|
||||
@ -127,7 +126,7 @@ PROCESS_THREAD(shell_exec_process, ev, data)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
PROCESS_END();
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
Loading…
Reference in New Issue
Block a user