This is an automated email from Gerrit. Eden Synrez ([email protected]) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/4879
-- gerrit commit ed570ac27d385be83365555d705b0497ddbd6d07 Author: Eden Synrez <[email protected]> Date: Tue Jan 29 19:46:00 2019 +0300 target/armv7m_trace: Replace trace file open method with non-blocking one This makes "tpiu config internal" more friendly to named pipes, but doesn't effect regular files. Original code blocks command exection while pipe is not opened for reading at the other end. It somewhat uncomfortable, especially when use OpenOCD with some IDEs. Change-Id: I7a84c2fa1ffc932f3c0c23f0aba91bdd5f3441dc Signed-off-by: Eden Synrez <[email protected]> diff --git a/src/target/armv7m_trace.c b/src/target/armv7m_trace.c index 62f0f8e..a55d4cc 100644 --- a/src/target/armv7m_trace.c +++ b/src/target/armv7m_trace.c @@ -166,6 +166,7 @@ COMMAND_HANDLER(handle_tpiu_config_command) struct armv7m_common *armv7m = target_to_armv7m(target); unsigned int cmd_idx = 0; + int fd; if (CMD_ARGC == cmd_idx) return ERROR_COMMAND_SYNTAX_ERROR; @@ -192,7 +193,8 @@ COMMAND_HANDLER(handle_tpiu_config_command) armv7m->trace_config.config_type = TRACE_CONFIG_TYPE_INTERNAL; if (strcmp(CMD_ARGV[cmd_idx], "-") != 0) { - armv7m->trace_config.trace_file = fopen(CMD_ARGV[cmd_idx], "ab"); + fd = open(CMD_ARGV[cmd_idx], O_CREAT | O_RDWR, 0664); + armv7m->trace_config.trace_file = fdopen(fd, "ab"); if (!armv7m->trace_config.trace_file) { LOG_ERROR("Can't open trace destination file"); return ERROR_FAIL; -- _______________________________________________ OpenOCD-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/openocd-devel
