summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2013-01-29 11:42:26 +0100
committerStef Walter <stefw@gnome.org>2013-02-05 09:42:34 +0100
commit15163fb9b7b03543da02d74d75d0f49c314f1c33 (patch)
tree66e29780e9bfd5e70237efb382feafcd653cdbdb
parentcba41e5a46893b16cfbd845d55285894f4a43408 (diff)
downloadp11-kit-15163fb9b7b03543da02d74d75d0f49c314f1c33.tar.gz
Add p11_kit_be_loud() function for use in tests and tools
This does the opposite of p11_kit_be_quiet().
-rw-r--r--doc/p11-kit-sections.txt1
-rw-r--r--p11-kit/p11-kit.h2
-rw-r--r--p11-kit/util.c14
3 files changed, 17 insertions, 0 deletions
diff --git a/doc/p11-kit-sections.txt b/doc/p11-kit-sections.txt
index f3f32a3..c6a4686 100644
--- a/doc/p11-kit-sections.txt
+++ b/doc/p11-kit-sections.txt
@@ -84,5 +84,6 @@ p11_kit_uri_type_t
<FILE>p11-kit-future</FILE>
p11_kit_set_progname
p11_kit_be_quiet
+p11_kit_be_loud
p11_kit_message
</SECTION>
diff --git a/p11-kit/p11-kit.h b/p11-kit/p11-kit.h
index 77cf1b5..042ed44 100644
--- a/p11-kit/p11-kit.h
+++ b/p11-kit/p11-kit.h
@@ -84,6 +84,8 @@ void p11_kit_set_progname (const char *progname
void p11_kit_be_quiet (void);
+void p11_kit_be_loud (void);
+
const char* p11_kit_message (void);
#endif
diff --git a/p11-kit/util.c b/p11-kit/util.c
index 9c5d99b..11a9a22 100644
--- a/p11-kit/util.c
+++ b/p11-kit/util.c
@@ -142,6 +142,20 @@ void
p11_kit_be_quiet (void)
{
p11_message_quiet ();
+ p11_debug_init ();
+}
+
+/**
+ * p11_kit_be_loud:
+ *
+ * Tell the p11-kit library will print failure or warning messages to stderr.
+ * This is the default behavior, but can be changed using p11_kit_be_quiet().
+ */
+void
+p11_kit_be_loud (void)
+{
+ p11_message_loud ();
+ p11_debug_init ();
}
/**