diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-15 21:01:37 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-15 21:01:37 +0000 |
commit | 9cc7477faf3e49678aa827a6bc1ab99e2812c4d8 (patch) | |
tree | a84eb181060b4367ba7278a829a2ce7f3a83ffa9 /apps/builtin/binfs.c | |
parent | fa14e61b3b4bca193293aba75f7ee106cbe4dd69 (diff) | |
download | nuttx-9cc7477faf3e49678aa827a6bc1ab99e2812c4d8.tar.gz nuttx-9cc7477faf3e49678aa827a6bc1ab99e2812c4d8.tar.bz2 nuttx-9cc7477faf3e49678aa827a6bc1ab99e2812c4d8.zip |
Implement redirection of output from NSH builtin commands to a file in a mounted volume
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5521 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'apps/builtin/binfs.c')
-rw-r--r-- | apps/builtin/binfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/builtin/binfs.c b/apps/builtin/binfs.c index 365021c7f..1fc2e7940 100644 --- a/apps/builtin/binfs.c +++ b/apps/builtin/binfs.c @@ -399,7 +399,7 @@ static int binfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) /* Have we reached the end of the directory */ index = dir->u.binfs.fb_index; - if (builtins[index].name == NULL) + if (g_builtins[index].name == NULL) { /* We signal the end of the directory by returning the * special error -ENOENT @@ -412,9 +412,9 @@ static int binfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir) { /* Save the filename and file type */ - fvdbg("Entry %d: \"%s\"\n", index, builtins[index].name); + fvdbg("Entry %d: \"%s\"\n", index, g_builtins[index].name); dir->fd_dir.d_type = DTYPE_FILE; - strncpy(dir->fd_dir.d_name, builtins[index].name, NAME_MAX+1); + strncpy(dir->fd_dir.d_name, g_builtins[index].name, NAME_MAX+1); /* The application list is terminated by an entry with a NULL name. * Therefore, there is at least one more entry in the list. |