summaryrefslogtreecommitdiffstats
path: root/libsparse/sparse_err.c
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-07-17 19:40:39 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-07-17 19:40:39 -0700
commit4d72d8818e0a60e1f0cb9a2b9de51f16f3e3ebbb (patch)
tree7c91432f4dff0dfec2d6f10fa5c4b08226ce29c3 /libsparse/sparse_err.c
parent6a575430e4697c5879457e6ecf6486e313890173 (diff)
parentf694ba5f7fa81f250045c107e919888661a734ae (diff)
downloadsystem_core-4d72d8818e0a60e1f0cb9a2b9de51f16f3e3ebbb.zip
system_core-4d72d8818e0a60e1f0cb9a2b9de51f16f3e3ebbb.tar.gz
system_core-4d72d8818e0a60e1f0cb9a2b9de51f16f3e3ebbb.tar.bz2
am f694ba5f: Merge changes I6c59381c,I0da088fc,I883572f5,Idc2cfe20,I1a156d10,I177abdb9,I18707bd9,I26744c74,I266f70e1,I75f10db2,I95aa2317,I2f21355b,I5d4ab07f,Ic138ad58,I012d8a42,If664e4fc
* commit 'f694ba5f7fa81f250045c107e919888661a734ae': fastboot: add support for auto-resparsing large files fastboot: add fb_getvar fastboot: use getopt_long libsparse: rename symbols that conflict with libext4_utils libsparse: add sparse_file_len libsparse: add function to resparse a file and a utility to use it libsparse: add callback output file type libsparse: pseudo-subclass output_file for normal and gz files libsparse: add sparse_file read and convert tools to use it libsparse: fix windows image writing libsparse: merge adjacent blocks of the same type libsparse: add error reporting functions libsparse: add support for including fds libsparse: cleanups libsparse: remove static variables system/core: move libsparse into system/core
Diffstat (limited to 'libsparse/sparse_err.c')
-rw-r--r--libsparse/sparse_err.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/libsparse/sparse_err.c b/libsparse/sparse_err.c
new file mode 100644
index 0000000..0f392ad
--- /dev/null
+++ b/libsparse/sparse_err.c
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2012 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <sparse/sparse.h>
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <unistd.h>
+
+void sparse_default_print(const char *fmt, ...)
+{
+ va_list argp;
+
+ va_start(argp, fmt);
+ vfprintf(stderr, fmt, argp);
+ va_end(argp);
+}
+
+void (*sparse_print_error)(const char *fmt, ...) = sparse_default_print;
+void (*sparse_print_verbose)(const char *fmt, ...) = sparse_default_print;