From: openocd-gerrit <ope...@us...> - 2025-01-25 10:36:50
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Main OpenOCD repository". The branch, master has been updated via ac18b8cd6a3f21b97f942efdbb0ec2f362bb132b (commit) via 345473f3ceaf6a1241f62354e31eeababfc56588 (commit) from 778d2dc4bb982ffa00f5fbd343346555fcbf9113 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ac18b8cd6a3f21b97f942efdbb0ec2f362bb132b Author: Antonio Borneo <bor...@gm...> Date: Sun Nov 17 21:35:45 2024 +0100 configure: make more robust the check for elf 64 The check if 'elf.h' defines the type 'Elf64_Ehdr' is currently done through 'grep' on the file. While there is no false positive, so far, such test could incorrectly find the text inside a comment or in a block guarded by #if/#endif. Use the autoconf macro AC_CHECK_TYPE() to detect if the type is properly declared. Change-Id: Ibb74db3d90ac6d1589b9dc1e5a7ae59e47945e78 Signed-off-by: Antonio Borneo <bor...@gm...> Reviewed-on: https://review.openocd.org/c/openocd/+/8591 Tested-by: jenkins diff --git a/configure.ac b/configure.ac index 49054288f..fc1e20ef8 100644 --- a/configure.ac +++ b/configure.ac @@ -52,9 +52,11 @@ AC_SEARCH_LIBS([openpty], [util]) AC_CHECK_HEADERS([sys/socket.h]) AC_CHECK_HEADERS([elf.h]) -AC_EGREP_HEADER(Elf64_Ehdr, [elf.h], [ - AC_DEFINE([HAVE_ELF64], [1], [Define to 1 if the system has the type `Elf64_Ehdr'.]) -]) + +AC_CHECK_TYPE([Elf64_Ehdr], + AC_DEFINE([HAVE_ELF64], [1], [Define to 1 if the system has the type 'Elf64_Ehdr'.]), + [], [[#include <elf.h>]]) + AC_CHECK_HEADERS([fcntl.h]) AC_CHECK_HEADERS([malloc.h]) AC_CHECK_HEADERS([netdb.h]) commit 345473f3ceaf6a1241f62354e31eeababfc56588 Author: Evgeniy Naydanov <evg...@sy...> Date: Tue Dec 17 18:13:00 2024 +0300 helper/options: handle errors in `-l` Before the patch an error in opening the log file (e.g. can't write a file) was ignored when specified via `-l`. E.g.: ``` > touch log > chmod -w log > openocd -l log -c shutdown ... failed to open output log "log" shutdown command invoked > echo $? 0 ``` After the patch: ``` ... > openocd -l log -c shutdown ... failed to open output log "log" > echo $? 1 ``` Change-Id: Ibab45f580dc46a499bf967c4afad071f9c2972a2 Signed-off-by: Evgeniy Naydanov <evg...@sy...> Reviewed-on: https://review.openocd.org/c/openocd/+/8666 Tested-by: jenkins Reviewed-by: Antonio Borneo <bor...@gm...> diff --git a/src/helper/options.c b/src/helper/options.c index 9e332cc8c..50977a610 100644 --- a/src/helper/options.c +++ b/src/helper/options.c @@ -303,8 +303,12 @@ int parse_cmdline_args(struct command_context *cmd_ctx, int argc, char *argv[]) break; } case 'l': /* --log_output | -l */ - command_run_linef(cmd_ctx, "log_output %s", optarg); + { + int retval = command_run_linef(cmd_ctx, "log_output %s", optarg); + if (retval != ERROR_OK) + return retval; break; + } case 'c': /* --command | -c */ add_config_command(optarg); break; ----------------------------------------------------------------------- Summary of changes: configure.ac | 8 +++++--- src/helper/options.c | 6 +++++- 2 files changed, 10 insertions(+), 4 deletions(-) hooks/post-receive -- Main OpenOCD repository |