diff options
Diffstat (limited to 'pflocal')
-rw-r--r-- | pflocal/Makefile | 40 | ||||
-rw-r--r-- | pflocal/io.c | 14 |
2 files changed, 45 insertions, 9 deletions
diff --git a/pflocal/Makefile b/pflocal/Makefile new file mode 100644 index 00000000..0c1da528 --- /dev/null +++ b/pflocal/Makefile @@ -0,0 +1,40 @@ +# Makefile for pflocal +# +# Copyright (C) 1995 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation; either version 2, or (at +# your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +dir := pflocal +makemode := server + +target = pflocal + +SRCS = connq.c io.c pflocal.c socket.c pf.c sock.c sserver.c +LCLHDRS = connq.h sock.h mig-decls.h mig-mutate.h +HURDLIBS = libtrivfs libpipe libports libthreads libihash +MIGSTUBS = ioServer.o socketServer.o interruptServer.o notifyServer.o + +OBJS = $(SRCS:.c=.o) $(MIGSTUBS) error.o + +CPPFLAGS += -I../lib +CPPFLAGS += $(CPPFLAGS-$(notdir $<)) + +MIGSFLAGS = -imacros mig-mutate.h + +CPPFLAGS-error.c = -Dprogram_name=program_invocation_name -DHAVE_VPRINTF -DSTDC_HEADERS -DHAVE_STRERROR + +vpath %.c ../lib + +include ../Makeconf diff --git a/pflocal/io.c b/pflocal/io.c index fcbce170..acc6bed4 100644 --- a/pflocal/io.c +++ b/pflocal/io.c @@ -27,9 +27,9 @@ #include <hurd.h> /* for getauth() */ #include <hurd/hurd_types.h> #include <hurd/auth.h> +#include <hurd/pipe.h> #include "sock.h" -#include "pipe.h" #include "connq.h" #include "sserver.h" @@ -57,8 +57,8 @@ S_io_read (struct sock_user *user, if (!err) { err = - pipe_read (pipe, user->sock->flags & SOCK_NONBLOCK, NULL, NULL, - data, data_len, amount, NULL, NULL, NULL, NULL); + pipe_read (pipe, user->sock->flags & SOCK_NONBLOCK, NULL, + data, data_len, amount); pipe_release (pipe); } @@ -101,9 +101,7 @@ S_io_write (struct sock_user *user, if (!err) { - err = pipe_write (pipe, source_addr, - data, data_len, NULL, 0, NULL, 0, - amount); + err = pipe_write (pipe, source_addr, data, data_len, amount); if (source_addr) ports_port_deref (source_addr); } @@ -310,6 +308,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_fsid = getpid (); st->st_ino = sock->id; /* As we try to be clever with large transfers, ask for them. */ @@ -336,9 +335,6 @@ debug (sock, "lock"); copy_time (&sock->change_time, &st->st_ctime, &st->st_ctime_usec); - /* When RPIPE == WPIPE, it *is* a fifo; also the fifo server uses sockets. */ - st->st_mode = (wpipe == rpipe ? S_IFIFO : S_IFSOCK); - debug (sock, "unlock"); mutex_unlock (&sock->lock); |