]> wimlib.net Git - wimlib/blobdiff - src/util.c
NEWS
[wimlib] / src / util.c
index d091c3e155fba957bd57d38fd72b1131cba7100d..de5eec5b38e2616c87fa3812c36fbd5261fa3e96 100644 (file)
@@ -53,6 +53,22 @@ void wimlib_error(const char *format, ...)
                va_end(va);
        }
 }
+
+void wimlib_warning(const char *format, ...)
+{
+       if (__wimlib_print_errors) {
+               va_list va;
+               int errno_save;
+
+               va_start(va, format);
+               errno_save = errno;
+               fputs("WARNING: ", stderr);
+               vfprintf(stderr, format, va);
+               errno = errno_save;
+               va_end(va);
+       }
+}
+
 #endif
 
 WIMLIBAPI int wimlib_set_print_errors(bool show_error_messages)
@@ -131,8 +147,10 @@ static const char *error_strings[] = {
                = "Could not read data from a file",
        [WIMLIB_ERR_RENAME] 
                = "Could not rename a file",
-       [WIMLIB_ERR_SPLIT] 
-               = "The WIM is part of a split WIM, which Wimlib does not support",
+       [WIMLIB_ERR_SPLIT_INVALID] 
+               = "The WIM is part of an invalid split WIM",
+       [WIMLIB_ERR_SPLIT_UNSUPPORTED] 
+               = "The WIM is part of a split WIM, which is not supported for this operation",
        [WIMLIB_ERR_STAT] 
                = "Could not read the metadata for a file or directory",
        [WIMLIB_ERR_TIMEOUT]