Socket.ListenSpecial, config_parse_socket_listen, SOCKET_SPECIAL, 0
Socket.ListenMessageQueue, config_parse_socket_listen, SOCKET_MQUEUE, 0
Socket.ListenUSBFunction, config_parse_socket_listen, SOCKET_USB_FUNCTION, 0
+<<<<<<< HEAD
Socket.SocketProtocol, config_parse_socket_protocol, 0, 0
+=======
+>>>>>>> core: Add socket type for usb functionfs endpoints
Socket.BindIPv6Only, config_parse_socket_bind, 0, 0,
Socket.Backlog, config_parse_unsigned, 0, offsetof(Socket, backlog)
Socket.BindToDevice, config_parse_socket_bindtodevice, 0, 0
return r;
}
+static int ffs_address_create(
+ const char *path,
+ int *_fd) {
+
+ _cleanup_close_ int fd = -1;
+ struct stat st;
+
+ assert(path);
+ assert(_fd);
+
+ fd = open(path, O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK|O_NOFOLLOW);
+ if (fd < 0)
+ return -errno;
+
+ if (fstat(fd, &st) < 0)
+ return -errno;
+
+ /* Check whether this is a regular file (ffs endpoint)*/
+ if (!S_ISREG(st.st_mode))
+ return -EEXIST;
+
+ *_fd = fd;
+ fd = -1;
+
+ return 0;
+}
+
static int mq_address_create(
const char *path,
mode_t mq_mode,