fixed the way accept() works in regards to the cookie pointer. It is no longer visible to userspace, we pass the fd instead. Also renamed kernel's shutdown() to system_shutdown as it collides with Posix's shutdown().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21223 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -86,6 +86,8 @@ extern void fd_set_close_on_exec(struct io_context *context, int fd, bool closeF
|
||||
|
||||
static struct io_context *get_current_io_context(bool kernel);
|
||||
|
||||
extern status_t user_fd_kernel_ioctl(int fd, ulong op, void *buffer, size_t length);
|
||||
|
||||
/* The prototypes of the (sys|user)_ functions are currently defined in vfs.h */
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ extern bool kernel_startup;
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
status_t shutdown(bool reboot);
|
||||
status_t system_shutdown(bool reboot);
|
||||
status_t _user_shutdown(bool reboot);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -23,7 +23,7 @@ enum {
|
||||
|
||||
// ops not acting on an existing socket
|
||||
NET_STACK_SOCKET = NET_STACK_IOCTL_BASE, // socket_args *
|
||||
NET_STACK_GET_COOKIE, // void **
|
||||
NET_STACK_GET_COOKIE, // void **
|
||||
NET_STACK_CONTROL_NET_MODULE, // control_net_module_args *
|
||||
NET_STACK_GET_NEXT_STAT, // get_next_stat_args *
|
||||
|
||||
@@ -72,13 +72,13 @@ struct socket_args { // used by NET_STACK_SOCKET
|
||||
};
|
||||
|
||||
struct socketpair_args { // used by NET_STACK_SOCKETPAIR
|
||||
void *cookie;
|
||||
int second_socket;
|
||||
};
|
||||
|
||||
struct accept_args { // used by NET_STACK_ACCEPT
|
||||
void *cookie;
|
||||
struct sockaddr *address;
|
||||
socklen_t address_length;
|
||||
struct accept_args { // used by NET_STACK_ACCEPT
|
||||
int accept_socket;
|
||||
struct sockaddr *address;
|
||||
socklen_t address_length;
|
||||
};
|
||||
|
||||
struct get_next_stat_args { // used by NET_STACK_GET_NEXT_STAT
|
||||
|
||||
Reference in New Issue
Block a user