Fix program-path in util/parse-backtrace and dump_stack function
authorBernd Schubert <bschubert@ddn.com>
Wed, 31 Jul 2024 20:29:54 +0000 (22:29 +0200)
committerBernd Schubert <bernd.schubert@fastmail.fm>
Fri, 2 Aug 2024 18:08:38 +0000 (20:08 +0200)
The option to the path of the binary had been accidentally removed
in the scripts that can parse backtraces.
The dump_stack() function had left over debug messages.

lib/fuse_signals.c
util/parse-backtrace.sh

index 99af700aa1a7f50a089774044b98164a66135385..fb1304c0da79a5e5ee23900ef27cfb6da36bd723 100644 (file)
@@ -32,15 +32,12 @@ static void *backtrace_buffer[BT_STACK_SZ];
 
 static void dump_stack(void)
 {
-       fprintf(stderr, "%s:%d\n", __func__, __LINE__);
 #ifdef HAVE_BACKTRACE
        char **strings;
 
        int nptrs = backtrace(backtrace_buffer, BT_STACK_SZ);
        strings = backtrace_symbols(backtrace_buffer, nptrs);
 
-       fprintf(stderr, "%s: nptrs=%d\n", __func__, nptrs);
-
        if (strings == NULL) {
                fuse_log(FUSE_LOG_ERR, "Failed to get backtrace symbols: %s\n",
                         strerror(errno));
index adf706d53894025fde5388ada8228937e14309e3..3db96f8e1e0d87f49fa4faa04015be09e2bdb95a 100755 (executable)
@@ -23,7 +23,7 @@ if [ -z "$1" -o "$1" = "-h" -o "$1" = "--help" ]; then
     print_help
 fi
 
-while getopts "hf:t:" opt; do
+while getopts "hf:t:p:" opt; do
     case $opt in
     h)
         print_help
@@ -34,6 +34,9 @@ while getopts "hf:t:" opt; do
     t)
         TRACE="$OPTARG"
         ;;
+    p)
+        PROGRAM_PATH="$OPTARG"
+        ;;
     *)
         print_help
         ;;