From 7e8ff80fadd2066f8fa9a058efe23aa301325433 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 31 Jul 2025 06:16:22 -0400 Subject: kernel: descrip: Add 'td' parameter to fd routines Update the signature of 'fd_get()', 'fd_alloc()' and 'fd_dup()' to include a pointer to the process to target. This improves the flexibility of the file descriptor API. Signed-off-by: Ian Moffett --- sys/kern/kern_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/kern_socket.c') diff --git a/sys/kern/kern_socket.c b/sys/kern/kern_socket.c index 8be5031..77041cd 100644 --- a/sys/kern/kern_socket.c +++ b/sys/kern/kern_socket.c @@ -64,7 +64,7 @@ get_ksock(int sockfd, struct ksocket **res) } /* Grab the file descriptor */ - fdesc = fd_get(sockfd); + fdesc = fd_get(NULL, sockfd); if (fdesc == NULL) { return -EBADF; } @@ -247,7 +247,7 @@ socket(int domain, int type, int protocol) struct sockbuf *sbuf = NULL; int fd, error = -1; - if ((error = fd_alloc(&fdesc)) < 0) { + if ((error = fd_alloc(NULL, &fdesc)) < 0) { return error; } -- cgit v1.2.3