summaryrefslogtreecommitdiffstats
path: root/libsparse/include/sparse
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2012-04-26 14:24:35 -0700
committerColin Cross <ccross@android.com>2012-07-09 22:09:37 -0700
commita21930b6b0dbb04a52948566d58fb48c6db58bab (patch)
treee74cfb32ad232c3b99364cd0931502519ca72111 /libsparse/include/sparse
parent9e1f17e926fa20255c5f4b4d2f68aa98a964253a (diff)
downloadsystem_core-a21930b6b0dbb04a52948566d58fb48c6db58bab.zip
system_core-a21930b6b0dbb04a52948566d58fb48c6db58bab.tar.gz
system_core-a21930b6b0dbb04a52948566d58fb48c6db58bab.tar.bz2
libsparse: add error reporting functions
Change-Id: I2f21355b6c5339d1d724b4c121ea30d575b2d366
Diffstat (limited to 'libsparse/include/sparse')
-rw-r--r--libsparse/include/sparse/sparse.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/libsparse/include/sparse/sparse.h b/libsparse/include/sparse/sparse.h
index 6484333..09a5137 100644
--- a/libsparse/include/sparse/sparse.h
+++ b/libsparse/include/sparse/sparse.h
@@ -157,4 +157,22 @@ int sparse_file_add_fd(struct sparse_file *s,
int sparse_file_write(struct sparse_file *s, int fd, bool gz, bool sparse,
bool crc);
+/**
+ * sparse_file_verbose - set a sparse file cookie to print verbose errors
+ *
+ * @s - sparse file cookie
+ *
+ * Print verbose sparse file errors whenever using the sparse file cookie.
+ */
+void sparse_file_verbose(struct sparse_file *s);
+
+/**
+ * sparse_print_verbose - function called to print verbose errors
+ *
+ * By default, verbose errors will print to standard error.
+ * sparse_print_verbose may be overridden to log verbose errors somewhere else.
+ *
+ */
+extern void (*sparse_print_verbose)(const char *fmt, ...);
+
#endif