3 exFAT file system implementation library.
5 Free exFAT implementation.
6 Copyright (C) 2010-2023 Andrew Nayenko
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License along
19 with this program; if not, write to the Free Software Foundation, Inc.,
20 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <android/log.h>
35 * This message means an internal bug in exFAT implementation.
37 void exfat_bug(const char* format, ...)
45 fputs("BUG: ", stderr);
46 vfprintf(stderr, format, ap);
51 __android_log_vprint(ANDROID_LOG_FATAL, PACKAGE, format, aq);
53 if (!isatty(STDERR_FILENO))
54 vsyslog(LOG_CRIT, format, aq);
62 * This message means an error in exFAT file system.
64 void exfat_error(const char* format, ...)
73 fputs("ERROR: ", stderr);
74 vfprintf(stderr, format, ap);
79 __android_log_vprint(ANDROID_LOG_ERROR, PACKAGE, format, aq);
81 if (!isatty(STDERR_FILENO))
82 vsyslog(LOG_ERR, format, aq);
88 * This message means that there is something unexpected in exFAT file system
89 * that can be a potential problem.
91 void exfat_warn(const char* format, ...)
99 fputs("WARN: ", stderr);
100 vfprintf(stderr, format, ap);
102 fputs(".\n", stderr);
105 __android_log_vprint(ANDROID_LOG_WARN, PACKAGE, format, aq);
107 if (!isatty(STDERR_FILENO))
108 vsyslog(LOG_WARNING, format, aq);
114 * Just debug message. Disabled by default.
116 void exfat_debug(const char* format, ...)
120 va_start(ap, format);
124 fputs("DEBUG: ", stderr);
125 vfprintf(stderr, format, ap);
127 fputs(".\n", stderr);
130 __android_log_vprint(ANDROID_LOG_DEBUG, PACKAGE, format, aq);
132 if (!isatty(STDERR_FILENO))
133 vsyslog(LOG_DEBUG, format, aq);