From: Georgia Brikis Date: Tue, 22 Mar 2016 11:08:42 +0000 (+0100) Subject: core: Fix path for opening ffs endpoint ep0 X-Git-Tag: v230~239^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2885%2Fhead;p=thirdparty%2Fsystemd.git core: Fix path for opening ffs endpoint ep0 usbffs_address_create() expects an absolute path to the file that is supposed to be opened. The path specified only leads to the directory containing the endpoint ep0 not the endpoint itself. This commit adds the endpoints name to the path. --- diff --git a/src/core/socket.c b/src/core/socket.c index 87586c1c2e3..dd515a17a57 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -1341,8 +1341,12 @@ static int socket_open_fds(Socket *s) { break; case SOCKET_USB_FUNCTION: + { + _cleanup_free_ char *ep = NULL; - p->fd = usbffs_address_create(p->path); + ep = path_make_absolute("ep0", p->path); + + p->fd = usbffs_address_create(ep); if (p->fd < 0) { r = p->fd; goto rollback; @@ -1357,7 +1361,7 @@ static int socket_open_fds(Socket *s) { goto rollback; break; - + } default: assert_not_reached("Unknown port type"); }