From 6b75120352f65c9fc4d20f55a783704b882f70ed Mon Sep 17 00:00:00 2001 From: Masayuki Ishikawa Date: Mon, 20 Apr 2015 17:46:21 +0900 Subject: [PATCH] NSH library: Fix open flags in nsh_codeccmd.c Jira: PDFW15IS-2824 Signed-off-by: Masayuki Ishikawa --- nshlib/nsh_codeccmd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nshlib/nsh_codeccmd.c b/nshlib/nsh_codeccmd.c index da273e9e7..20b3947bb 100644 --- a/nshlib/nsh_codeccmd.c +++ b/nshlib/nsh_codeccmd.c @@ -314,9 +314,9 @@ static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv, fullpath = nsh_getfullpath(vtbl, localfile); - /* Open the local file for writing */ + /* Open the local file for reading */ - fd = open(fullpath, O_RDONLY|O_TRUNC, 0644); + fd = open(fullpath, O_RDONLY); if (fd < 0) { nsh_output(vtbl, g_fmtcmdfailed, argv[0], "open", NSH_ERRNO);