mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 18:13:33 +08:00
Implement redirection of output from NSH builtin commands to a file in a mounted volume
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5521 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user