From 2e156afe2a18d60349f35c271e99b800286821be Mon Sep 17 00:00:00 2001 From: fros4943 Date: Thu, 26 Mar 2009 12:22:52 +0000 Subject: [PATCH] bugfix: cfs_open must get aquire permissions --- apps/shell/shell-exec.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/shell/shell-exec.c b/apps/shell/shell-exec.c index c7b1e75d8..7587e239a 100644 --- a/apps/shell/shell-exec.c +++ b/apps/shell/shell-exec.c @@ -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(); } /*---------------------------------------------------------------------------*/