---
 libdiskfs/file-get-fs-opts.c   | 10 +++++++++-
 libdiskfs/file-get-trans.c     | 15 ++++++++++++---
 libdiskfs/file-get-transcntl.c |  9 ++++++++-
 libdiskfs/file-getfh.c         | 14 +++++++++++---
 libdiskfs/file-getlinknode.c   |  8 +++++++-
 libdiskfs/file-lock-stat.c     | 10 ++++++----
 libdiskfs/file-lock.c          | 12 +++++++++---
 libdiskfs/file-record-lock.c   |  7 ++++++-
 libdiskfs/file-reparent.c      | 10 +++++++++-
 libdiskfs/file-set-size.c      |  8 +++++++-
 libdiskfs/file-statfs.c        |  4 ++++
 libdiskfs/file-sync.c          |  9 ++++++++-
 libdiskfs/file-syncfs.c        |  9 ++++++++-
 libdiskfs/file-utimes.c        | 12 +++++++++++-
 libdiskfs/fsys-forward.c       | 14 +++++++++++++-
 libdiskfs/fsys-get-children.c  | 16 ++++++++++++++--
 libdiskfs/fsys-get-source.c    | 10 +++++++++-
 libdiskfs/fsys-getfile.c       | 20 +++++++++++++++++---
 libdiskfs/fsys-getroot.c       | 29 +++++++++++++++++++++++------
 libdiskfs/fsys-goaway.c        |  8 +++++++-
 20 files changed, 198 insertions(+), 36 deletions(-)

diff --git a/libdiskfs/file-get-fs-opts.c b/libdiskfs/file-get-fs-opts.c
index e11bc0fd..a2e4f0b2 100644
--- a/libdiskfs/file-get-fs-opts.c
+++ b/libdiskfs/file-get-fs-opts.c
@@ -22,8 +22,16 @@
 #include <errno.h>
 #include <string.h>
 #include <argz.h>
-#include "priv.h"
+#include <pthread.h>
+#include <stdlib.h>
+#include <stddef.h>
+
 #include "fs_S.h"
+#include <hurd/hurd_types.h>
+#include <libiohelp/iohelp.h>
+#include <libdiskfs/diskfs.h>
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
 
 kern_return_t
 diskfs_S_file_get_fs_options (struct protid *cred, data_t *data,
diff --git a/libdiskfs/file-get-trans.c b/libdiskfs/file-get-trans.c
index b0a4b4ee..6e923424 100644
--- a/libdiskfs/file-get-trans.c
+++ b/libdiskfs/file-get-trans.c
@@ -15,11 +15,20 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
-#include "priv.h"
-#include <hurd/paths.h>
+#include <pthread.h>
 #include <string.h>
 #include <stdio.h>
 #include <errno.h>
+#include <stdlib.h>
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <assert-backtrace.h>
+
+#include <hurd/paths.h>
+#include <hurd/hurd_types.h>
+#include <libdiskfs/diskfs.h>
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
 #include "fs_S.h"
 
 /* Implement file_get_translator as described in <hurd/fs.defs>. */
@@ -93,7 +102,7 @@ diskfs_S_file_get_translator (struct protid *cred,
          *translen = len;
        }
       else if (len > *translen)
-       munmap (trans, len);
+       munmap ((void *)trans, len);
     }
   else if (S_ISCHR (np->dn_stat.st_mode) || S_ISBLK (np->dn_stat.st_mode))
     {
diff --git a/libdiskfs/file-get-transcntl.c b/libdiskfs/file-get-transcntl.c
index 311d23ef..ca7844f5 100644
--- a/libdiskfs/file-get-transcntl.c
+++ b/libdiskfs/file-get-transcntl.c
@@ -15,7 +15,14 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
-#include "priv.h"
+#include <errno.h>
+#include <pthread.h>
+
+#include <libfshelp/fshelp.h>
+#include <libdiskfs/diskfs.h>
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
+#include <mach/port.h>
 #include "fs_S.h"
 
 /* Implement file_get_translator_cntl as described in <hurd/fs.defs>. */
diff --git a/libdiskfs/file-getfh.c b/libdiskfs/file-getfh.c
index 8023a14f..37573662 100644
--- a/libdiskfs/file-getfh.c
+++ b/libdiskfs/file-getfh.c
@@ -19,8 +19,16 @@
    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include <string.h>
-
-#include "priv.h"
+#include <pthread.h>
+#include <errno.h>
+#include <idvec.h>
+#include <sys/mman.h>
+#include <assert-backtrace.h>
+
+#include <hurd/hurd_types.h>
+#include <libdiskfs/diskfs.h>
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
 #include "fs_S.h"
 #include "fhandle.h"
 
@@ -57,7 +65,7 @@ diskfs_S_file_getfh (struct protid *cred, data_t *fh,
 
   pthread_mutex_lock (&node->lock);
 
-  f->data.cache_id = node->cache_id;
+  f->data.cache_id = (int)node->cache_id;
   f->data.gen = node->dn_stat.st_gen;
 
   pthread_mutex_unlock (&node->lock);
diff --git a/libdiskfs/file-getlinknode.c b/libdiskfs/file-getlinknode.c
index 4b346c96..3dfdc8c2 100644
--- a/libdiskfs/file-getlinknode.c
+++ b/libdiskfs/file-getlinknode.c
@@ -15,7 +15,13 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
-#include "priv.h"
+#include <errno.h>
+
+#include <hurd/hurd_types.h>
+#include <libdiskfs/diskfs.h>
+#include <libports/ports.h>
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
 #include "fs_S.h"
 
 /* Implement file_getlinknode as described in <hurd/fs.defs>. */
diff --git a/libdiskfs/file-lock-stat.c b/libdiskfs/file-lock-stat.c
index c6990c46..1eb7cad3 100644
--- a/libdiskfs/file-lock-stat.c
+++ b/libdiskfs/file-lock-stat.c
@@ -15,11 +15,13 @@
    You should have received a copy of the GNU General Public License
    along with the GNU Hurd.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "priv.h"
-#include "fs_S.h"
+#include <errno.h>
+#include <pthread.h>
 
-#include <fcntl.h>
-#include <sys/file.h>
+#include <libdiskfs/diskfs.h>
+#include <libfshelp/fshelp.h>
+#include <mach/machine/kern_return.h>
+#include "fs_S.h"
 
 kern_return_t
 diskfs_S_file_lock_stat (struct protid *cred,
diff --git a/libdiskfs/file-lock.c b/libdiskfs/file-lock.c
index 0446fc3d..41ffbb4b 100644
--- a/libdiskfs/file-lock.c
+++ b/libdiskfs/file-lock.c
@@ -15,11 +15,17 @@
    You should have received a copy of the GNU General Public License
    along with the GNU Hurd.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "priv.h"
-#include "fs_S.h"
-
+#include <errno.h>
+#include <pthread.h>
 #include <fcntl.h>
 #include <sys/file.h>
+#include <stdio.h>
+
+#include <libdiskfs/diskfs.h>
+#include <libfshelp/fshelp.h>
+#include <mach/machine/kern_return.h>
+#include <mach/port.h>
+#include "fs_S.h"
 
 kern_return_t
 diskfs_S_file_lock (struct protid *cred, int flags)
diff --git a/libdiskfs/file-record-lock.c b/libdiskfs/file-record-lock.c
index 83a05bbd..09431946 100644
--- a/libdiskfs/file-record-lock.c
+++ b/libdiskfs/file-record-lock.c
@@ -15,7 +15,12 @@
    You should have received a copy of the GNU General Public License
    along with the GNU Hurd.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "priv.h"
+#include <fcntl.h>
+#include <pthread.h>
+
+#include <libfshelp/fshelp.h>
+#include <mach/machine/kern_return.h>
+#include <mach/port.h>
 #include "diskfs.h"
 #include "fs_S.h"
 
diff --git a/libdiskfs/file-reparent.c b/libdiskfs/file-reparent.c
index fa3479e3..44b3f4aa 100644
--- a/libdiskfs/file-reparent.c
+++ b/libdiskfs/file-reparent.c
@@ -20,7 +20,15 @@
    along with the GNU Hurd; see the file COPYING.  If not, write to
    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include "priv.h"
+#include <errno.h>
+
+#include <libdiskfs/diskfs.h>
+#include <libports/ports.h>
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
+#include <mach/port.h>
+#include <mach-shortcuts.h>
+#include <mach_init.h>
 #include "fs_S.h"
 
 kern_return_t
diff --git a/libdiskfs/file-set-size.c b/libdiskfs/file-set-size.c
index fe2125ae..f445e210 100644
--- a/libdiskfs/file-set-size.c
+++ b/libdiskfs/file-set-size.c
@@ -15,9 +15,15 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+
 #include "priv.h"
 #include "fs_S.h"
-#include <fcntl.h>
+#include <hurd/hurd_types.h>
+#include <libdiskfs/diskfs.h>
+#include <mach/machine/kern_return.h>
 
 /* Implement file_set_size as described in <hurd/fs.defs>. */
 kern_return_t
diff --git a/libdiskfs/file-statfs.c b/libdiskfs/file-statfs.c
index 5e960579..0f5a8055 100644
--- a/libdiskfs/file-statfs.c
+++ b/libdiskfs/file-statfs.c
@@ -17,8 +17,12 @@
 
 #include <string.h>
 #include <sys/statvfs.h>
+#include <errno.h>
 
 #include "priv.h"
+#include <hurd/hurd_types.h>
+#include "diskfs.h"
+#include <mach/machine/kern_return.h>
 #include "fs_S.h"
 
 #ifndef ST_RELATIME
diff --git a/libdiskfs/file-sync.c b/libdiskfs/file-sync.c
index 20fa005c..2f3d02a1 100644
--- a/libdiskfs/file-sync.c
+++ b/libdiskfs/file-sync.c
@@ -15,7 +15,13 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
-#include "priv.h"
+#include <errno.h>
+#include <pthread.h>
+
+#include <hurd/iohelp.h>
+#include <libdiskfs/diskfs.h>
+#include <libiohelp/iohelp.h>
+#include <mach/machine/kern_return.h>
 #include "fs_S.h"
 
 /* Implement file_sync as described in <hurd/fs.defs>. */
@@ -24,6 +30,7 @@ diskfs_S_file_sync (struct protid *cred,
                    int wait,
                    int omitmetadata)
 {
+  (void) omitmetadata;
   struct node *np;
 
   if (!cred)
diff --git a/libdiskfs/file-syncfs.c b/libdiskfs/file-syncfs.c
index d271ab1e..4407d8c3 100644
--- a/libdiskfs/file-syncfs.c
+++ b/libdiskfs/file-syncfs.c
@@ -15,7 +15,14 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
-#include "priv.h"
+#include <errno.h>
+#include <stddef.h>
+#include <stdlib.h>
+
+#include "diskfs.h"
+#include <libfshelp/fshelp.h>
+#include <mach/machine/kern_return.h>
+#include <mach/port.h>
 #include "fs_S.h"
 #include <hurd/fsys.h>
 
diff --git a/libdiskfs/file-utimes.c b/libdiskfs/file-utimes.c
index 13751d0b..584078ea 100644
--- a/libdiskfs/file-utimes.c
+++ b/libdiskfs/file-utimes.c
@@ -15,8 +15,17 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
+#include <sys/stat.h>
+#include <time.h>
+
 #include "priv.h"
 #include "fs_S.h"
+#include <hurd/hurd_types.h>
+#include <libdiskfs/diskfs.h>
+#include <libfshelp/fshelp.h>
+#include <mach/machine/kern_return.h>
+#include <mach/time_value.h>
+
 
 /* Implement file_utimes as described in <hurd/fs.defs>. */
 kern_return_t
@@ -53,7 +62,8 @@ diskfs_S_file_utimens (struct protid *cred,
 {
   CHANGE_NODE_FIELD (cred,
                   ({
-                    if (!(err = fshelp_isowner (&np->dn_stat, cred->user)))
+                    err = fshelp_isowner (&np->dn_stat, cred->user);
+                    if (!err)
                       {
                         /* Flush pending updates first.  */
                         diskfs_set_node_times (np);
diff --git a/libdiskfs/fsys-forward.c b/libdiskfs/fsys-forward.c
index 8068b0d2..6c09be57 100644
--- a/libdiskfs/fsys-forward.c
+++ b/libdiskfs/fsys-forward.c
@@ -20,7 +20,12 @@
    along with the GNU Hurd; see the file COPYING.  If not, write to
    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
-#include "priv.h"
+#include <errno.h>
+
+#include <hurd/hurd_types.h>
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
+#include <mach/port.h>
 #include "fsys_S.h"
 
 /* Ask SERVER to provide fsys translation service for us.  REQUESTOR is
@@ -34,5 +39,12 @@ diskfs_S_fsys_forward (mach_port_t server,
                        mach_port_t requestor, const_data_t argz,
                        mach_msg_type_number_t argz_len)
 {
+  (void) server;
+  (void) reply;
+  (void) reply_type;
+  (void) requestor;
+  (void) argz;
+  (void) argz_len;
+  
   return EOPNOTSUPP;
 }
diff --git a/libdiskfs/fsys-get-children.c b/libdiskfs/fsys-get-children.c
index 27d9d114..88a80f98 100644
--- a/libdiskfs/fsys-get-children.c
+++ b/libdiskfs/fsys-get-children.c
@@ -17,10 +17,19 @@
    You should have received a copy of the GNU General Public License
    along with the GNU Hurd.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "priv.h"
+#include <errno.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <sys/mman.h>
+
+#include "diskfs.h"
+#include <libfshelp/fshelp.h>
+#include <libiohelp/iohelp.h>
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
+#include <mach/port.h>
 #include "fsys_S.h"
 
-#include <argz.h>
 
 /* Return any active child translators.  NAMES is an argz vector
    containing file names relative to the root of the translator.
@@ -45,6 +54,9 @@ diskfs_S_fsys_get_children (struct diskfs_control *fsys,
   mach_port_t *c;
   size_t c_count;
 
+  (void) reply;
+  (void) replytype;
+
   if (! fsys)
     return EOPNOTSUPP;
 
diff --git a/libdiskfs/fsys-get-source.c b/libdiskfs/fsys-get-source.c
index c2197a61..464c7f47 100644
--- a/libdiskfs/fsys-get-source.c
+++ b/libdiskfs/fsys-get-source.c
@@ -17,7 +17,13 @@
    You should have received a copy of the GNU General Public License
    along with the GNU Hurd.  If not, see <http://www.gnu.org/licenses/>.  */
 
-#include "priv.h"
+#include <errno.h>
+
+#include <hurd/hurd_types.h>
+#include "diskfs.h"
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
+#include <mach/port.h>
 #include "fsys_S.h"
 
 /* Return information about the source of the translator.  If the
@@ -32,6 +38,8 @@ diskfs_S_fsys_get_source (struct diskfs_control *fsys,
                           mach_msg_type_name_t replytype,
                          string_t source)
 {
+  (void) reply;
+  (void) replytype;
   if (! fsys)
     return EOPNOTSUPP;
 
diff --git a/libdiskfs/fsys-getfile.c b/libdiskfs/fsys-getfile.c
index b80c2869..38714bba 100644
--- a/libdiskfs/fsys-getfile.c
+++ b/libdiskfs/fsys-getfile.c
@@ -19,8 +19,19 @@
    the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include <fcntl.h>
-
-#include "priv.h"
+#include <errno.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#include <hurd/hurd_types.h>
+#include <hurd/iohelp.h>
+#include <libdiskfs/diskfs.h>
+#include <libfshelp/fshelp.h>
+#include <libiohelp/iohelp.h>
+#include <libports/ports.h>
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
+#include <mach/port.h>
 #include "fsys_S.h"
 #include "fhandle.h"
 
@@ -42,6 +53,9 @@ diskfs_S_fsys_getfile (struct diskfs_control *pt,
   struct peropen *new_po;
   struct iouser *user;
 
+  (void) reply;
+  (void) reply_type;
+
   if (!pt)
     return EOPNOTSUPP;
 
@@ -64,7 +78,7 @@ diskfs_S_fsys_getfile (struct diskfs_control *pt,
       return ESTALE;
     }
 
-  err = iohelp_create_complex_iouser (&user, uids, nuids, gids, ngids);
+  err = iohelp_create_complex_iouser (&user, uids, (int) nuids, gids, (int) 
ngids);
   if (err)
     {
       diskfs_nput (node);
diff --git a/libdiskfs/fsys-getroot.c b/libdiskfs/fsys-getroot.c
index 4debdf8b..84b6ee38 100644
--- a/libdiskfs/fsys-getroot.c
+++ b/libdiskfs/fsys-getroot.c
@@ -19,11 +19,26 @@
 
 /* Written by Michael I. Bushnell.  */
 
+#include <errno.h>
+#include <pthread.h>
+#include <sys/stat.h>
+#include <idvec.h>
+#include <sys/types.h>
+#include <fcntl.h>
+
+#include <hurd/hurd_types.h>
+#include <hurd/iohelp.h>
+#include "diskfs.h"
+#include <libfshelp/fshelp.h>
+#include <libports/ports.h>
+#include <mach-shortcuts.h>
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
+#include <mach/port.h>
+#include <mach_init.h>
 #include "priv.h"
 #include "fsys_S.h"
 #include <hurd/fshelp.h>
-#include <hurd/fsys.h>
-#include <fcntl.h>
 
 /* Implement fsys_getroot as described in <hurd/fsys.defs>. */
 kern_return_t
@@ -41,6 +56,8 @@ diskfs_S_fsys_getroot (struct diskfs_control *pt,
                        file_t *returned_port,
                        mach_msg_type_name_t *returned_port_poly)
 {
+  (void) reply;
+  (void) replytype;
   error_t err = 0;
   mode_t type;
   struct protid *newpi;
@@ -48,10 +65,10 @@ diskfs_S_fsys_getroot (struct diskfs_control *pt,
   struct iouser user;
   struct peropen peropen_context =
   {
-    root_parent: dotdot,
-    shadow_root_parent: MACH_PORT_NULL,
-    shadow_root: _diskfs_chroot_directory ? diskfs_root_node : NULL, /* XXX */
-    path: NULL,
+    .root_parent =  dotdot,
+    .shadow_root_parent =  MACH_PORT_NULL,
+    .shadow_root =  _diskfs_chroot_directory ? diskfs_root_node : NULL, /* XXX 
*/
+    .path =  NULL,
   };
 
   if (!pt)
diff --git a/libdiskfs/fsys-goaway.c b/libdiskfs/fsys-goaway.c
index a1a00038..1953f421 100644
--- a/libdiskfs/fsys-goaway.c
+++ b/libdiskfs/fsys-goaway.c
@@ -19,7 +19,13 @@
 
 /* Written by Michael I. Bushnell.  */
 
-#include "priv.h"
+#include <errno.h>
+#include <stdlib.h>
+
+#include <libdiskfs/diskfs.h>
+#include <mach/machine/kern_return.h>
+#include <mach/message.h>
+#include <mach/port.h>
 #include "fsys_S.h"
 #include "fsys_reply_U.h"
 
-- 
2.53.0


Reply via email to