From 448774fb8f7ae7087c1e2c9ca1da9bfe2235702e Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Sat, 12 Dec 2015 17:03:51 +0100 Subject: [PATCH] Print also the too long path to help detection --- cmdline/support.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmdline/support.c b/cmdline/support.c index 169eb0fe..27f0c7b8 100644 --- a/cmdline/support.c +++ b/cmdline/support.c @@ -355,7 +355,7 @@ void pathcpy(char* dst, size_t size, const char* src) if (len + 1 > size) { /* LCOV_EXCL_START */ - log_fatal("Path too long\n"); + log_fatal("Path too long '%s'\n", src); os_abort(); /* LCOV_EXCL_STOP */ } @@ -370,7 +370,7 @@ void pathcat(char* dst, size_t size, const char* src) if (dst_len + src_len + 1 > size) { /* LCOV_EXCL_START */ - log_fatal("Path too long\n"); + log_fatal("Path too long '%s%s'\n", dst, src); os_abort(); /* LCOV_EXCL_STOP */ } @@ -384,7 +384,7 @@ void pathcatc(char* dst, size_t size, char c) if (dst_len + 2 > size) { /* LCOV_EXCL_START */ - log_fatal("Path too long\n"); + log_fatal("Path too long '%s%c'\n", dst, c); os_abort(); /* LCOV_EXCL_STOP */ } @@ -432,7 +432,7 @@ void pathprint(char* dst, size_t size, const char* format, ...) if (len >= size) { /* LCOV_EXCL_START */ - log_fatal("Path too long\n"); + log_fatal("Path too long '%s'\n", format); os_abort(); /* LCOV_EXCL_STOP */ }