From 6b7e59231014b94636f4a1b730143fbe6f60c3f4 Mon Sep 17 00:00:00 2001 From: Pawel Szewczyk Date: Fri, 4 Sep 2015 12:23:51 +0200 Subject: core: Add FFSDescriptors and FFSStrings service parameters By using these parameters functionfs service can specify ffs descriptors and strings which should be written to ep0. --- src/core/service.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/core/service.c') diff --git a/src/core/service.c b/src/core/service.c index fc28ba4d07..f7de5e89ff 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -482,6 +482,12 @@ static int service_verify(Service *s) { return -EINVAL; } + if (s->usb_function_descriptors && !s->usb_function_strings) + log_unit_warning(UNIT(s), "Service has USBFunctionDescriptors= setting, but no USBFunctionStrings=. Ignoring."); + + if (!s->usb_function_descriptors && s->usb_function_strings) + log_unit_warning(UNIT(s), "Service has USBFunctionStrings= setting, but no USBFunctionDescriptors=. Ignoring."); + return 0; } -- cgit v1.2.3-54-g00ecf