mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
In case of the "Path too long" message prints the stacktrace
This commit is contained in:
parent
f8214de959
commit
7313e3d9d0
4 changed files with 9 additions and 5 deletions
|
|
@ -90,11 +90,13 @@ noinst_HEADERS = \
|
|||
mktest_SOURCES = \
|
||||
cmdline/mktest.c \
|
||||
cmdline/mingw.c \
|
||||
cmdline/unix.c \
|
||||
cmdline/support.c
|
||||
|
||||
mkstream_SOURCES = \
|
||||
cmdline/mkstream.c \
|
||||
cmdline/mingw.c \
|
||||
cmdline/unix.c \
|
||||
cmdline/support.c \
|
||||
cmdline/util.c \
|
||||
cmdline/stream.c \
|
||||
|
|
|
|||
|
|
@ -255,6 +255,7 @@ void os_abort(void)
|
|||
printf(", gcc " __VERSION__);
|
||||
#endif
|
||||
printf(", %d-bit", (int)sizeof(void *) * 8);
|
||||
printf(", PATH_MAX=%d", PATH_MAX);
|
||||
printf("\n");
|
||||
|
||||
/* get stackstrace, but without symbols */
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ void pathcpy(char* dst, size_t size, const char* src)
|
|||
if (len + 1 > size) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Path too long\n");
|
||||
exit(EXIT_FAILURE);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
|
|
@ -371,7 +371,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");
|
||||
exit(EXIT_FAILURE);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
|
|
@ -385,7 +385,7 @@ void pathcatc(char* dst, size_t size, char c)
|
|||
if (dst_len + 2 > size) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Path too long\n");
|
||||
exit(EXIT_FAILURE);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
|
|
@ -433,7 +433,7 @@ void pathprint(char* dst, size_t size, const char* format, ...)
|
|||
if (len >= size) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Path too long\n");
|
||||
exit(EXIT_FAILURE);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
}
|
||||
|
|
@ -446,7 +446,7 @@ void pathslash(char* dst, size_t size)
|
|||
if (len + 2 >= size) {
|
||||
/* LCOV_EXCL_START */
|
||||
log_fatal("Path too long\n");
|
||||
exit(EXIT_FAILURE);
|
||||
os_abort();
|
||||
/* LCOV_EXCL_STOP */
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1103,6 +1103,7 @@ void os_abort(void)
|
|||
printf(", gcc " __VERSION__);
|
||||
#endif
|
||||
printf(", %d-bit", (int)sizeof(void *) * 8);
|
||||
printf(", PATH_MAX=%d", PATH_MAX);
|
||||
printf("\n");
|
||||
|
||||
size = backtrace(stack, 32);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue