aboutsummaryrefslogtreecommitdiff
path: root/tools/virtiofsd/passthrough_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/virtiofsd/passthrough_helpers.h')
-rw-r--r--tools/virtiofsd/passthrough_helpers.h26
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);
}