mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
nshlib/testing: Fix open() arguments.
Pass explicit open flags for the NSH script redirect file so the mode argument is used as file creation permissions. Add the missing mode argument to AIO ostest open() calls that create the test file. Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com>
This commit is contained in:
parent
f9f59bd0f8
commit
5c703f5603
2 changed files with 9 additions and 8 deletions
|
|
@ -61,7 +61,8 @@ static int nsh_script_redirect(FAR struct nsh_vtbl_s *vtbl,
|
|||
|
||||
if (CONFIG_NSH_SCRIPT_REDIRECT_PATH[0])
|
||||
{
|
||||
fd = open(CONFIG_NSH_SCRIPT_REDIRECT_PATH, 0666);
|
||||
fd = open(CONFIG_NSH_SCRIPT_REDIRECT_PATH,
|
||||
O_WRONLY | O_CREAT | O_TRUNC, 0666);
|
||||
if (fd > 0)
|
||||
{
|
||||
nsh_redirect(vtbl, 0, fd, fd, save);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue