summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2011-10-07 18:38:07 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2011-10-08 13:32:17 +0200
commit2738635d82da5f010bae6a60472a6306df949ea5 (patch)
tree97ce4c08c0ab6dcc7abd7f78bd2e5965e15c63a3 /src/main.c
parent879982243998d6ebf7e7ac4e79b2cfc7371aeda2 (diff)
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 <sakari.ailus@iki.fi> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c3
1 files changed, 2 insertions, 1 deletions
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;