Print also the too long path to help detection

This commit is contained in:
Andrea Mazzoleni 2015-12-12 17:03:51 +01:00
parent 7313e3d9d0
commit 448774fb8f

View file

@ -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 */
}