2 * This program is free software; you can redistribute it and/or
3 * modify it under the terms of the GNU General Public
4 * License v2 as published by the Free Software Foundation.
6 * This program is distributed in the hope that it will be useful,
7 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9 * General Public License for more details.
11 * You should have received a copy of the GNU General Public
12 * License along with this program; if not, write to the
13 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
14 * Boston, MA 021110-1307, USA.
21 __attribute__ ((format (printf, 1, 2)))
22 void __btrfs_warning(const char *fmt, ...)
26 fputs("WARNING: ", stderr);
28 vfprintf(stderr, fmt, args);
33 __attribute__ ((format (printf, 1, 2)))
34 void __btrfs_error(const char *fmt, ...)
38 fputs("ERROR: ", stderr);
40 vfprintf(stderr, fmt, args);
45 __attribute__ ((format (printf, 2, 3)))
46 int __btrfs_warning_on(int condition, const char *fmt, ...)
53 fputs("WARNING: ", stderr);
55 vfprintf(stderr, fmt, args);
62 __attribute__ ((format (printf, 2, 3)))
63 int __btrfs_error_on(int condition, const char *fmt, ...)
70 fputs("ERROR: ", stderr);
72 vfprintf(stderr, fmt, args);