From 2738635d82da5f010bae6a60472a6306df949ea5 Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Fri, 7 Oct 2011 18:38:07 +0300 Subject: Add debugging handler Add debugging handler to media_device that may be used to redirect all debug formatting to user-supplied function. fprintf will do, and that's what media-ctl test program will use. Signed-off-by: Sakari Ailus Acked-by: Laurent Pinchart --- src/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 0d68ff6..40ab13e 100644 --- a/src/main.c +++ b/src/main.c @@ -288,7 +288,8 @@ int main(int argc, char **argv) return EXIT_FAILURE; /* Open the media device and enumerate entities, pads and links. */ - media = media_open(media_opts.devname, media_opts.verbose); + media = media_open_debug(media_opts.devname, media_opts.verbose, + (void (*)(void *, ...))fprintf, stdout); if (media == NULL) goto out; -- cgit v1.2.3