aboutsummaryrefslogtreecommitdiff
path: root/pflocal/io.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@gnu.org>2000-08-02 20:19:45 +0000
committerMark Kettenis <kettenis@gnu.org>2000-08-02 20:19:45 +0000
commita6888a2b3a918920fe27133308c820e78dcecf16 (patch)
treef6f411ce5fcbcc26087c78daa4b93ddc613defd7 /pflocal/io.c
parent18dc5dc677ebf1d415e1adeff24041e9f496a2ed (diff)
downloadhurd-a6888a2b3a918920fe27133308c820e78dcecf16.tar.gz
hurd-a6888a2b3a918920fe27133308c820e78dcecf16.tar.bz2
hurd-a6888a2b3a918920fe27133308c820e78dcecf16.zip
Add `magic' protocols to specify the file type of a sockets. This
allows implementation of POSIX pipes by using a S_IFSOCK protocol. * sock.h: Include <sys/types.h>. (struct sock): Add new member `mode'. (sock_create): Add new parameter `mode'. * sock.c (sock_create): Initialize `mode' member of struct sock, with new parameter. * pf.c (S_socket_create): Pass file type/mode to sock_create based on PROTOCOL. * io.c (S_io_stat): Use new member of `struct sock' to set ST->st_mode.
Diffstat (limited to 'pflocal/io.c')
-rw-r--r--pflocal/io.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pflocal/io.c b/pflocal/io.c
index 133c75c9..dca24876 100644
--- a/pflocal/io.c
+++ b/pflocal/io.c
@@ -1,6 +1,6 @@
/* Socket I/O operations
- Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
Written by Miles Bader <miles@gnu.ai.mit.edu>
@@ -287,7 +287,7 @@ S_io_stat (struct sock_user *user, struct stat *st)
bzero (st, sizeof (struct stat));
st->st_fstype = FSTYPE_SOCKET;
- st->st_mode = S_IFSOCK;
+ st->st_mode = sock->mode;
st->st_fsid = getpid ();
st->st_ino = sock->id;
/* As we try to be clever with large transfers, ask for them. */