commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 01/04: New upstream snapshot


From: Samuel Thibault
Subject: [hurd] 01/04: New upstream snapshot
Date: Wed, 23 Mar 2016 22:48:03 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch master
in repository hurd.

commit 905d9caa0a813eddecf96eac5c20ac3a19be80fb
Author: Samuel Thibault <address@hidden>
Date:   Wed Mar 23 17:37:38 2016 +0000

    New upstream snapshot
---
 ext2fs/pager.c         |   2 +-
 libfshelp/fetch-root.c |   3 +-
 pflocal/Makefile       |   4 +-
 pflocal/fs.c           | 308 +++++++++++++++++++++++++++++++++++++++++++++++++
 pflocal/mig-mutate.h   |   6 +
 pflocal/sserver.c      |   2 +
 6 files changed, 321 insertions(+), 4 deletions(-)

diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index d395472..7d3a8f3 100644
--- a/ext2fs/pager.c
+++ b/ext2fs/pager.c
@@ -914,7 +914,7 @@ disk_cache_init (void)
   /* Initialize disk_cache_info.  Start with the last entry so that
      the first ends up at the front of the free list.  This keeps the
      assertions at the end of this function happy.  */
-  for (int i = disk_cache_blocks; i >= 0; i--)
+  for (int i = disk_cache_blocks - 1; i >= 0; i--)
     {
       disk_cache_info[i].block = DC_NO_BLOCK;
       disk_cache_info[i].flags = 0;
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index d7761e5..cc9fa50 100644
--- a/libfshelp/fetch-root.c
+++ b/libfshelp/fetch-root.c
@@ -189,7 +189,8 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
   if ((err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED)
       && control == box->active)
     fshelp_set_active (box, MACH_PORT_NULL, 0);
-  mach_port_deallocate (mach_task_self (), control);
+  else
+    mach_port_deallocate (mach_task_self (), control);
 
   if (err == MACH_SEND_INVALID_DEST || err == MIG_SERVER_DIED)
     goto start_over;
diff --git a/pflocal/Makefile b/pflocal/Makefile
index 0d9341f..3a07975 100644
--- a/pflocal/Makefile
+++ b/pflocal/Makefile
@@ -21,9 +21,9 @@ makemode := server
 
 target = pflocal
 
-SRCS = connq.c io.c pflocal.c socket.c pf.c sock.c sserver.c
+SRCS = connq.c io.c fs.c pflocal.c socket.c pf.c sock.c sserver.c
 
-MIGSTUBS = ioServer.o socketServer.o
+MIGSTUBS = ioServer.o fsServer.o socketServer.o
 OBJS = $(SRCS:.c=.o) $(MIGSTUBS)
 HURDLIBS = pipe trivfs iohelp fshelp ports ihash shouldbeinlibc
 LDLIBS = -lpthread
diff --git a/pflocal/fs.c b/pflocal/fs.c
new file mode 100644
index 0000000..d77f00b
--- /dev/null
+++ b/pflocal/fs.c
@@ -0,0 +1,308 @@
+/* Socket I/O operations
+
+   Copyright (C) 2016 Free Software Foundation, Inc.
+
+   Written by Miles Bader <address@hidden>
+
+   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. */
+
+#include <fcntl.h>
+
+#include "sock.h"
+#include "sserver.h"
+
+#include "fs_S.h"
+
+error_t
+S_dir_notice_changes (struct sock_user *cred,
+                     mach_port_t notify)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_dir_link (struct sock_user *dircred,
+           struct sock_user *filecred,
+           char *name,
+           int excl)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_dir_lookup (struct sock_user *dircred,
+             char *path,
+             int flags,
+             mode_t mode,
+             enum retry_type *retry,
+             char *retryname,
+             file_t *returned_port,
+             mach_msg_type_name_t *returned_port_poly)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_dir_mkdir (struct sock_user *dircred,
+            char *name,
+            mode_t mode)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_dir_mkfile (struct sock_user *cred,
+             int flags,
+             mode_t mode,
+             mach_port_t *newnode,
+             mach_msg_type_name_t *newnodetype)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_dir_readdir (struct sock_user *cred,
+              char **data,
+              size_t *datacnt,
+              boolean_t *data_dealloc,
+              int entry,
+              int nentries,
+              vm_size_t bufsiz,
+              int *amt)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_dir_rename (struct sock_user *fromcred,
+             char *fromname,
+             struct sock_user *tocred,
+             char *toname,
+             int excl)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_dir_rmdir (struct sock_user *dircred,
+            char *name)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_dir_unlink (struct sock_user *dircred,
+             char *name)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_chauthor (struct sock_user *user,
+                uid_t author)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_check_access (struct sock_user *cred, int *type)
+{
+  if (!cred)
+    return EOPNOTSUPP;
+
+  *type = 0;
+  if (cred->sock->read_pipe)
+    *type |= O_READ;
+  if (cred->sock->write_pipe)
+    *type |= O_WRITE;
+
+  return 0;
+}
+
+error_t
+S_file_chflags (struct sock_user *cred, int flags)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_notice_changes (struct sock_user *cred, mach_port_t notify)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_chmod (struct sock_user *cred, mode_t mode)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_chown (struct sock_user *cred, uid_t uid, gid_t gid)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_exec (struct sock_user *cred,
+            task_t task,
+            int flags,
+            char *argv,
+            size_t argvlen,
+            char *envp,
+            size_t envplen,
+            mach_port_t *fds,
+            size_t fdslen,
+            mach_port_t *portarray,
+            size_t portarraylen,
+            int *intarray,
+            size_t intarraylen,
+            mach_port_t *deallocnames,
+            size_t deallocnameslen,
+            mach_port_t *destroynames,
+            size_t destroynameslen)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_get_children (struct sock_user *cred,
+                    char **children,
+                    mach_msg_type_number_t *children_len)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_getcontrol (struct sock_user *cred,
+                  mach_port_t *control,
+                  mach_msg_type_name_t *controltype)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_getfh (struct sock_user *cred, char **fh, size_t *fh_len)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_get_fs_options (struct sock_user *cred, char **data, size_t *data_len)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_getlinknode (struct sock_user *cred,
+                   file_t *port,
+                   mach_msg_type_name_t *portpoly)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_get_source (struct sock_user *cred, char *source)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_get_storage_info (struct sock_user *cred,
+                        mach_port_t **ports,
+                        mach_msg_type_name_t *ports_type,
+                        mach_msg_type_number_t *num_ports,
+                        int **ints, mach_msg_type_number_t *num_ints,
+                        off_t **offsets,
+                        mach_msg_type_number_t *num_offsets,
+                        char **data, mach_msg_type_number_t *data_len)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_get_translator (struct sock_user *cred, char **trans, size_t *translen)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_get_translator_cntl (struct sock_user *cred,
+                           mach_port_t *ctl,
+                           mach_msg_type_name_t *ctltype)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_lock (struct sock_user *cred, int flags)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_lock_stat (struct sock_user *cred, int *mystatus, int *otherstatus)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_reparent (struct sock_user *cred, mach_port_t parent,
+                mach_port_t *new, mach_msg_type_name_t *new_type)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_set_size (struct sock_user *cred, off_t size)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_set_translator (struct sock_user *cred,
+                      int passive_flags,
+                      int active_flags,
+                      int killtrans_flags,
+                      char *passive,
+                      size_t passivelen,
+                      fsys_t active)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_statfs (struct sock_user *file, fsys_statfsbuf_t *statbuf)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_sync (struct sock_user *cred, int wait, int omitmetadata)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_syncfs (struct sock_user *cred, int wait, int dochildren)
+{
+  return EOPNOTSUPP;
+}
+
+error_t
+S_file_utimes (struct sock_user *cred, time_value_t atime, time_value_t mtime)
+{
+  return EOPNOTSUPP;
+}
diff --git a/pflocal/mig-mutate.h b/pflocal/mig-mutate.h
index 238c806..0743f33 100644
--- a/pflocal/mig-mutate.h
+++ b/pflocal/mig-mutate.h
@@ -26,6 +26,12 @@
 
 #define IO_IMPORTS import "mig-decls.h";
 
+#define FILE_INTRAN sock_user_t begin_using_sock_user_port (io_t)
+#define FILE_INTRAN_PAYLOAD sock_user_t begin_using_sock_user_payload
+#define FILE_DESTRUCTOR end_using_sock_user_port (sock_user_t)
+
+#define FILE_IMPORTS import "mig-decls.h";
+
 #define SOCKET_INTRAN sock_user_t begin_using_sock_user_port (socket_t)
 #define SOCKET_INTRAN_PAYLOAD sock_user_t begin_using_sock_user_payload
 #define SOCKET_DESTRUCTOR end_using_sock_user_port (sock_user_t)
diff --git a/pflocal/sserver.c b/pflocal/sserver.c
index 7df69a4..e500a75 100644
--- a/pflocal/sserver.c
+++ b/pflocal/sserver.c
@@ -33,6 +33,7 @@ static int sock_server_active = 0;
 static pthread_spinlock_t sock_server_active_lock = 
PTHREAD_SPINLOCK_INITIALIZER;
 
 #include "io_S.h"
+#include "fs_S.h"
 #include "socket_S.h"
 #include "../libports/interrupt_S.h"
 #include "../libports/notify_S.h"
@@ -43,6 +44,7 @@ sock_demuxer (mach_msg_header_t *inp, mach_msg_header_t *outp)
 {
   mig_routine_t routine;
   if ((routine = io_server_routine (inp)) ||
+      (routine = fs_server_routine (inp)) ||
       (routine = socket_server_routine (inp)) ||
       (routine = ports_interrupt_server_routine (inp)) ||
       (routine = ports_notify_server_routine (inp)))

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]