]>
glassweightruler.freedombox.rocks Git - Ventoy.git/blob - SQUASHFS/squashfs-tools-4.4/squashfs-tools/error.h
4 * Create a squashfs filesystem. This is a highly compressed read only
7 * Copyright (c) 2012, 2013, 2014, 2019
8 * Phillip Lougher <phillip@squashfs.org.uk>
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2,
13 * or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 extern int exit_on_error
;
29 extern void prep_exit();
30 extern void progressbar_error(char *fmt
, ...);
31 extern void progressbar_info(char *fmt
, ...);
34 #define TRACE(s, args...) \
36 progressbar_info("squashfs: "s, ## args);\
39 #define TRACE(s, args...)
42 #define INFO(s, args...) \
45 progressbar_info(s, ## args);\
48 #define ERROR(s, args...) \
50 progressbar_error(s, ## args); \
53 #define ERROR_START(s, args...) \
55 disable_progress_bar(); \
56 fprintf(stderr, s, ## args); \
59 #define ERROR_EXIT(s, args...) \
61 if (exit_on_error) { \
62 fprintf(stderr, "\n"); \
65 fprintf(stderr, s, ## args); \
66 enable_progress_bar(); \
70 #define EXIT_MKSQUASHFS() \
76 #define BAD_ERROR(s, args...) \
78 progressbar_error("FATAL ERROR:" s, ##args); \
82 #define EXIT_UNSQUASH(s, args...) BAD_ERROR(s, ##args)
84 #define EXIT_UNSQUASH_IGNORE(s, args...) \
89 BAD_ERROR(s, ##args); \
92 #define EXIT_UNSQUASH_STRICT(s, args...) \
97 BAD_ERROR(s, ##args); \
100 #define MEM_ERROR() \
102 progressbar_error("FATAL ERROR: Out of memory (%s)\n", \