diff options
author | Colin Cross <ccross@android.com> | 2012-07-17 18:36:41 -0700 |
---|---|---|
committer | android code review <noreply-gerritcodereview@google.com> | 2012-07-17 18:36:41 -0700 |
commit | f694ba5f7fa81f250045c107e919888661a734ae (patch) | |
tree | 9d3f48d28d81126862b9612767f5b49c0e5a4d0d /libsparse/sparse_err.c | |
parent | b3a679386d26677290a09fdf4e3406c57e835fd0 (diff) | |
parent | f838788e6a4d57634a53eb597ee76a597feffcb5 (diff) | |
download | system_core-f694ba5f7fa81f250045c107e919888661a734ae.zip system_core-f694ba5f7fa81f250045c107e919888661a734ae.tar.gz system_core-f694ba5f7fa81f250045c107e919888661a734ae.tar.bz2 |
Merge changes I6c59381c,I0da088fc,I883572f5,Idc2cfe20,I1a156d10,I177abdb9,I18707bd9,I26744c74,I266f70e1,I75f10db2,I95aa2317,I2f21355b,I5d4ab07f,Ic138ad58,I012d8a42,If664e4fc
* changes:
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.c | 33 |
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; |