From a3e23f325439a290c504d6bbc48c2e742149ecab Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Fri, 8 Feb 2019 12:49:54 +0000 Subject: virtiofsd: Trim down imported files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There's a lot of the original fuse code we don't need; trim them down. Signed-off-by: Dr. David Alan Gilbert with additional trimming by: Signed-off-by: Misono Tomohiro Reviewed-by: Daniel P. Berrangé Reviewed-by: Xiao Yang Signed-off-by: Dr. David Alan Gilbert --- tools/virtiofsd/passthrough_helpers.h | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'tools/virtiofsd/passthrough_helpers.h') diff --git a/tools/virtiofsd/passthrough_helpers.h b/tools/virtiofsd/passthrough_helpers.h index 6b77c33600..7c5f561fbc 100644 --- a/tools/virtiofsd/passthrough_helpers.h +++ b/tools/virtiofsd/passthrough_helpers.h @@ -42,32 +42,6 @@ static int mknod_wrapper(int dirfd, const char *path, const char *link, res = symlinkat(link, dirfd, path); } else if (S_ISFIFO(mode)) { res = mkfifoat(dirfd, path, mode); -#ifdef __FreeBSD__ - } else if (S_ISSOCK(mode)) { - struct sockaddr_un su; - int fd; - - if (strlen(path) >= sizeof(su.sun_path)) { - errno = ENAMETOOLONG; - return -1; - } - fd = socket(AF_UNIX, SOCK_STREAM, 0); - if (fd >= 0) { - /* - * We must bind the socket to the underlying file - * system to create the socket file, even though - * we'll never listen on this socket. - */ - su.sun_family = AF_UNIX; - strncpy(su.sun_path, path, sizeof(su.sun_path)); - res = bindat(dirfd, fd, (struct sockaddr*)&su, - sizeof(su)); - if (res == 0) - close(fd); - } else { - res = -1; - } -#endif } else { res = mknodat(dirfd, path, mode, rdev); } -- cgit v1.2.3