diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-17 14:43:55 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-17 14:43:55 +0000 |
commit | d8d9cc8a96cdc2219af7bec8142e7633779fd685 (patch) | |
tree | d9cf39f88361f174a2350d354ffb5584d43e2fc4 /nuttx/binfmt/builtin.c | |
parent | 4f0e8b1249c1550bac83f9db61c67094bc6afc2d (diff) | |
download | px4-nuttx-d8d9cc8a96cdc2219af7bec8142e7633779fd685.tar.gz px4-nuttx-d8d9cc8a96cdc2219af7bec8142e7633779fd685.tar.bz2 px4-nuttx-d8d9cc8a96cdc2219af7bec8142e7633779fd685.zip |
Add logic to automatically unload module on exit; Several patches from Mike Smith
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5528 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/binfmt/builtin.c')
-rw-r--r-- | nuttx/binfmt/builtin.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/nuttx/binfmt/builtin.c b/nuttx/binfmt/builtin.c index d36cb6326..d80d9f5d8 100644 --- a/nuttx/binfmt/builtin.c +++ b/nuttx/binfmt/builtin.c @@ -89,6 +89,7 @@ static struct binfmt_s g_builtin_binfmt = static int builtin_loadbinary(struct binary_s *binp) { FAR const char *filename; + FAR const struct builtin_s *b; int fd; int index; int ret; @@ -134,9 +135,10 @@ static int builtin_loadbinary(struct binary_s *binp) * the priority. That is a bug and needs to be fixed. */ - binp->entrypt = g_builtins[index].main; - binp->stacksize = g_builtins[index].stacksize; - binp->priority = g_builtins[index].priority; + b = builtin_for_index(index); + binp->entrypt = b->main; + binp->stacksize = b->stacksize; + binp->priority = b->priority; return OK; } |