summaryrefslogtreecommitdiffstats
path: root/test/urls
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2013-09-19 12:18:56 +0800
committerJeremy Kerr <jk@ozlabs.org>2013-09-19 21:36:32 +0800
commit307b4b091e0bc298964e90888bf179431e32c134 (patch)
tree47cc758b0929eb29a216efd945b9ad46f4ffb19a /test/urls
parente52b37c27c267c882d82cd1e34412817b5a4dbce (diff)
downloadtalos-petitboot-307b4b091e0bc298964e90888bf179431e32c134.tar.gz
talos-petitboot-307b4b091e0bc298964e90888bf179431e32c134.zip
lib/log: Cleanup log API
Rather than exposing log internals (through always_flush and set_stream), do all logging init through pb_log_init(). If pb_log_init() hasn't been called, pb_log will drop messages. Also, add a pb_debug() function, specifically for debugging information. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'test/urls')
-rw-r--r--test/urls/parse-url.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/test/urls/parse-url.c b/test/urls/parse-url.c
index cfa6762..1688eab 100644
--- a/test/urls/parse-url.c
+++ b/test/urls/parse-url.c
@@ -8,17 +8,12 @@
int main(int argc, char **argv)
{
struct pb_url *url;
- FILE *null;
if (argc != 2 && argc != 3) {
fprintf(stderr, "Usage: %s <URL> [update]\n", argv[0]);
return EXIT_FAILURE;
}
- /* discard log output */
- null = fopen("/dev/null", "w");
- pb_log_set_stream(null);
-
url = pb_url_parse(NULL, argv[1]);
if (!url)
return EXIT_FAILURE;
OpenPOWER on IntegriCloud