summaryrefslogtreecommitdiff
path: root/src/apk_defines.h
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2008-04-22 06:04:20 +0000
committerTimo Teras <timo.teras@iki.fi>2008-04-22 06:04:20 +0000
commit384c2f1d94282ff5564a5f6c5ab9e51c975f83a6 (patch)
tree30c7225064e95641e31b8e3ce5934773678253ee /src/apk_defines.h
parent823283edca0d8403742999917a4ff0698ad641cb (diff)
downloadapk-tools-384c2f1d94282ff5564a5f6c5ab9e51c975f83a6.tar.gz
apk-tools-384c2f1d94282ff5564a5f6c5ab9e51c975f83a6.tar.bz2
apk-tools-384c2f1d94282ff5564a5f6c5ab9e51c975f83a6.tar.xz
apk-tools-384c2f1d94282ff5564a5f6c5ab9e51c975f83a6.zip
Preserve uid and gid. Quiet flag to print dots on progress.
Diffstat (limited to 'src/apk_defines.h')
-rw-r--r--src/apk_defines.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/apk_defines.h b/src/apk_defines.h
index ecd08e3..c9c64f5 100644
--- a/src/apk_defines.h
+++ b/src/apk_defines.h
@@ -44,9 +44,11 @@ typedef struct md5_ctx csum_ctx_t;
#define csum_finish(ctx, buf) md5_finish(ctx, buf)
#endif
-#define apk_error(args...) apk_log("ERROR: ", args)
-#define apk_warning(args...) apk_log("WARNING: ", args)
-#define apk_message(args...) apk_log(NULL, args)
+extern int apk_quiet;
+
+#define apk_error(args...) if (!apk_quiet) { apk_log("ERROR: ", args); }
+#define apk_warning(args...) if (!apk_quiet) { apk_log("WARNING: ", args); }
+#define apk_message(args...) if (!apk_quiet) { apk_log(NULL, args); }
void apk_log(const char *prefix, const char *format, ...);