va_start(va, format);
errno_save = errno;
+ fflush(stdout);
fputs("[ERROR] ", stderr);
vfprintf(stderr, format, va);
fprintf(stderr, ": %s\n", strerror(errno_save));
va_start(va, format);
errno_save = errno;
+ fflush(stdout);
fputs("[WARNING] ", stderr);
vfprintf(stderr, format, va);
putc('\n', stderr);
= "Tried to add an image with a name that is already in use",
[WIMLIB_ERR_INTEGRITY]
= "The WIM failed an integrity check",
+ [WIMLIB_ERR_INVALID_CAPTURE_CONFIG]
+ = "The capture configuration string was invalid",
[WIMLIB_ERR_INVALID_CHUNK_SIZE]
= "The WIM is compressed but does not have a chunk "
"size of 32768",
p--;
/* Trailing slashes. */
- while ((p != path - 1) && *p == '/')
+ while (1) {
+ if (p == path - 1)
+ return "";
+ if (*p != '/')
+ break;
p--;
+ }
while ((p != path - 1) && *p != '/')
p--;