From 38e257f11cdbd41a32f13e5a6d908b2dc65172cb Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 27 Feb 2011 12:35:31 +0100 Subject: [PATCH] zapit-debug: hack to shorten debug messages Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/9060dff7dc22d08e10b333f9b88c17e1eed8744d Author: Stefan Seyfried Date: 2011-02-27 (Sun, 27 Feb 2011) --- src/zapit/include/zapit/debug.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/zapit/include/zapit/debug.h b/src/zapit/include/zapit/debug.h index bc40cdfe0..4d0a0c629 100644 --- a/src/zapit/include/zapit/debug.h +++ b/src/zapit/include/zapit/debug.h @@ -48,14 +48,14 @@ extern int zapit_debug; do { \ if (zapit_debug) \ fprintf(stdout, "[%s:%s:%d] " fmt, \ - __FILE__, __FUNCTION__, \ + strrchr(__FILE__, '/'), __FUNCTION__, \ __LINE__ , ## args); \ } while (0) #define ERROR(str) \ do { \ fprintf(stderr, "[%s:%s:%d] %s: %s\n", \ - __FILE__, __FUNCTION__, \ + strrchr(__FILE__, '/'), __FUNCTION__, \ __LINE__, str, strerror(errno)); \ } while (0) @@ -64,14 +64,14 @@ extern int zapit_debug; #define INFO(fmt, args...) \ do { \ fprintf(stdout, "[%s:%s:%d] " fmt "\n", \ - __FILE__, __FUNCTION__, \ + strrchr(__FILE__, '/'), __FUNCTION__, \ __LINE__ , ## args); \ } while (0) #define WARN(fmt, args...) \ do { \ fprintf(stderr, "[%s:%s:%d] " fmt "\n", \ - __FILE__, __FUNCTION__, \ + strrchr(__FILE__, '/'), __FUNCTION__, \ __LINE__ , ## args); \ } while (0)