From 87f58c2ed885d636229f7209fde883058433a1ce Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 26 Sep 2013 22:16:24 +0200 Subject: Print v4l parser position on error Most parser functions take a **endp argument to indicate the caller where parsing has stopped. This is currently only used after parsing something successfully. This patch sets **endp to the erroneous position in the error case and prints its position after an error has occured. Signed-off-by: Laurent Pinchart --- src/mediactl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/mediactl.c') diff --git a/src/mediactl.c b/src/mediactl.c index b22fbdf..57cf86b 100644 --- a/src/mediactl.c +++ b/src/mediactl.c @@ -677,8 +677,8 @@ int media_parse_setup_link(struct media_device *media, return media_setup_link(media, link->source, link->sink, flags); } -static void media_print_streampos(struct media_device *media, const char *p, - const char *end) +void media_print_streampos(struct media_device *media, const char *p, + const char *end) { int pos; -- cgit v1.2.3