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/tools.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/tools.h') diff --git a/src/tools.h b/src/tools.h index de06cb3..e64b37e 100644 --- a/src/tools.h +++ b/src/tools.h @@ -25,5 +25,8 @@ #define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) #define FIELD_SIZEOF(t, f) (sizeof(((t*)0)->f)) +void media_print_streampos(struct media_device *media, const char *p, + const char *end); + #endif /* __TOOLS_H__ */ -- cgit v1.2.3