Move link parsing from main.c to media.c, making it part of libmediactl
authorSakari Ailus <sakari.ailus@iki.fi>
Fri, 7 Oct 2011 15:38:03 +0000 (18:38 +0300)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Sat, 8 Oct 2011 11:30:11 +0000 (13:30 +0200)
commit636b48e43db57442fd631a7c5592e34da74f191d
treea0b06b78f7f9d3b762fbec3e884498630fcd7a2b
parent9a5f1e0365265310545abdd43da7d28a44fd43a6
Move link parsing from main.c to media.c, making it part of libmediactl

This makes it possible to benefit from the link parsing code anywhere the
library is being used.

dprintf macro will later be replaced with proper debug support.

Also fix a case where -1 was returned on error and the user was expected to
check the value of errno. Negative error codes are now returned
consistently.

Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
src/main.c
src/mediactl.c
src/mediactl.h