From 08811b747b28e65a79f532542979765d841a1914 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Thu, 7 Apr 2022 17:34:23 +0200 Subject: [PATCH] Use `__FILE__` --- csi_camera.sh | 2 +- opts/log.h | 2 +- usb_camera.sh | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/csi_camera.sh b/csi_camera.sh index df0d12b..5e1f921 100755 --- a/csi_camera.sh +++ b/csi_camera.sh @@ -4,5 +4,5 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) cd "$SCRIPT_DIR" set -xeo pipefail -make +make -j$(nproc) $GDB ./camera_stream -camera-path=$(echo /dev/v4l/by-path/*.csi-video-index0) "$@" diff --git a/opts/log.h b/opts/log.h index 75a86b1..250bb76 100644 --- a/opts/log.h +++ b/opts/log.h @@ -2,7 +2,7 @@ #include -#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) +#define __FILENAME__ __FILE__ typedef struct log_options_s { bool debug; diff --git a/usb_camera.sh b/usb_camera.sh index ff90b48..a2fb997 100755 --- a/usb_camera.sh +++ b/usb_camera.sh @@ -4,5 +4,5 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) cd "$SCRIPT_DIR" set -xeo pipefail -make -$GDB ./camera_stream -camera-path=$(echo /dev/v4l/by-id/usb-*-video-index0 ) "$@" +make -j$(nproc) +$GDB ./camera_stream -camera-path=$(echo /dev/v4l/by-id/usb-*-video-index0) "$@"