diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2019-02-08 12:49:54 +0000 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2020-01-23 16:41:36 +0000 |
commit | a3e23f325439a290c504d6bbc48c2e742149ecab (patch) | |
tree | cb2536210f239e5e8efba6bb5a8f2716241c2cd4 /tools/virtiofsd/passthrough_helpers.h | |
parent | 7c6b66027241f41720240fc6ee1021cdbd975b2e (diff) |
virtiofsd: Trim down imported files
There's a lot of the original fuse code we don't need; trim them down.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
with additional trimming by:
Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Xiao Yang <yangx.jy@cn.fujitsu.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'tools/virtiofsd/passthrough_helpers.h')
-rw-r--r-- | tools/virtiofsd/passthrough_helpers.h | 26 |
1 files changed, 0 insertions, 26 deletions
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); } |