summaryrefslogtreecommitdiff
path: root/console
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-15 18:38:08 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2014-04-15 21:11:57 +0200
commit20e078293697dd99ddcf2c2151c9f075409cc185 (patch)
tree0e62dd3dbecab3b8d5fdb8c3d3ad57cd52408432 /console
parentf1aa15a509d4249b19bb3d7f1f388829dd5135f8 (diff)
Include the MIG-generated server header files
This enables the compiler to check that the server function declarations match MIGs expectations. Fix a few oddities along the way. * console-client/trans.c: Include MIG-generated server header file(s). * console/console.c: Likewise. Also, fix declarations. * console/mutations.h (TIOCTL_IMPORTS): Just use libnetfs/priv.h. * console/priv.h: Delete now unused file. * ext2fs/storeinfo.c: Include MIG-generated server header file(s). * fatfs/inode.c: Likewise. * fatfs/main.c: Likewise. Also, fix declaration. * isofs/inode.c: Likewise. * libdiskfs/boot-start.c: Likewise. * libdiskfs/file-chg.c: Include the correct MIG-generated server header file. * libdiskfs/file-chmod.c: Include MIG-generated server header file(s). * libdiskfs/file-get-fs-opts.c: Likewise. * libdiskfs/init-startup.c: Likewise. * libnetfs/file-get-children.c: Likewise. * libnetfs/file-getcontrol.c: Include the correct MIG-generated server header file. * libnetfs/file-set-translator.c: Include MIG-generated server header file(s). * libnetfs/fsstubs.c: Likewise. * libtrivfs/file-access.c: Likewise. * libtrivfs/file-chauthor.c: Likewise. * libtrivfs/file-chflags.c: Likewise. * libtrivfs/file-chg.c: Likewise. * libtrivfs/file-chmod.c: Likewise. * libtrivfs/file-chown.c: Likewise. * libtrivfs/file-exec.c: Likewise. * libtrivfs/file-get-children.c: Likewise. * libtrivfs/file-get-fs-options.c: Likewise. * libtrivfs/file-get-source.c: Likewise. * libtrivfs/file-get-storage-info.c: Likewise. * libtrivfs/file-get-trans.c: Likewise. * libtrivfs/file-get-transcntl.c: Likewise. * libtrivfs/file-getcontrol.c: Likewise. * libtrivfs/file-getfh.c: Likewise. * libtrivfs/file-getlinknode.c: Likewise. * libtrivfs/file-lock.c: Likewise. * libtrivfs/file-reparent.c: Likewise. * libtrivfs/file-set-size.c: Likewise. * libtrivfs/file-set-trans.c: Likewise. * libtrivfs/file-statfs.c: Likewise. * libtrivfs/file-sync.c: Likewise. * libtrivfs/file-syncfs.c: Likewise. * libtrivfs/file-utimes.c: Likewise. * libtrivfs/fsys-forward.c: Likewise. * libtrivfs/fsys-get-options.c: Likewise. * libtrivfs/fsys-getroot.c: Likewise. * libtrivfs/fsys-goaway.c: Likewise. * libtrivfs/fsys-set-options.c: Likewise. * libtrivfs/fsys-stubs.c: Likewise. * libtrivfs/fsys-syncfs.c: Likewise. * libtrivfs/io-async-icky.c: Likewise. * libtrivfs/io-async.c: Likewise. * libtrivfs/io-duplicate.c: Likewise. * libtrivfs/io-identity.c: Likewise. * libtrivfs/io-map.c: Likewise. * libtrivfs/io-modes-get.c: Likewise. * libtrivfs/io-modes-off.c: Likewise. * libtrivfs/io-modes-on.c: Likewise. * libtrivfs/io-modes-set.c: Likewise. * libtrivfs/io-owner-get.c: Likewise. * libtrivfs/io-owner-mod.c: Likewise. * libtrivfs/io-pathconf.c: Likewise. * libtrivfs/io-read.c: Likewise. * libtrivfs/io-readable.c: Likewise. * libtrivfs/io-reauthenticate.c: Likewise. * libtrivfs/io-restrict-auth.c: Likewise. * libtrivfs/io-revoke.c: Likewise. * libtrivfs/io-seek.c: Likewise. * libtrivfs/io-select.c: Likewise. * libtrivfs/io-stat.c: Likewise. * libtrivfs/io-stubs.c: Likewise. * libtrivfs/io-version.c: Likewise. * libtrivfs/io-write.c: Likewise. * pfinet/tunnel.c: Likewise. * storeio/io.c: Likewise. * storeio/storeio.c: Likewise. * term/users.c: Likewise. * tmpfs/node.c: Likewise. * trans/fakeroot.c: Likewise. Also, include all server headers that provide the X_server_routine functions... (netfs_demuxer): ... that were previously declared here. * trans/fifo.c: Include MIG-generated server header file(s). * trans/firmlink.c: Likewise. * trans/hello-mt.c: Likewise. * trans/hello.c: Likewise. * trans/magic.c: Likewise. * trans/mtab.c: Likewise. * trans/new-fifo.c: Likewise. * trans/null.c: Likewise. * trans/proxy-defpager.c: Likewise. * trans/streamio.c: Likewise. * libdiskfs/fsmutations.h: Qualify the import with the libraries path. Without this change, out-of-tree builds would no longer work. * libnetfs/mutations.h: Likewise. * libtrivfs/mig-mutate.h: Likewise.
Diffstat (limited to 'console')
-rw-r--r--console/console.c40
-rw-r--r--console/mutations.h2
-rw-r--r--console/priv.h41
3 files changed, 24 insertions, 59 deletions
diff --git a/console/console.c b/console/console.c
index 0577ea04..57ae8133 100644
--- a/console/console.c
+++ b/console/console.c
@@ -48,6 +48,9 @@
#include "input.h"
#include "fs_notify_U.h"
+#include "libnetfs/fs_S.h"
+#include "libnetfs/io_S.h"
+#include "tioctl_S.h"
const char *argp_program_version = STANDARD_HURD_VERSION (console);
@@ -1815,98 +1818,101 @@ S_tioctl_tiocgpgrp (struct protid *cred, int *pgrp)
}
kern_return_t
-S_tioctl_tiocmodg (io_t port, int *state)
+S_tioctl_tiocmodg (struct protid *cred, int *state)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocmods (io_t port, int state)
+S_tioctl_tiocmods (struct protid *cred, int state)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocexcl (io_t port)
+S_tioctl_tiocexcl (struct protid *cred)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocnxcl (io_t port)
+S_tioctl_tiocnxcl (struct protid *cred)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocgeta (io_t port, tcflag_t *modes, cc_t *ccs, speed_t *speeds)
+S_tioctl_tiocgeta (struct protid *cred, tcflag_t *modes, cc_t *ccs,
+ speed_t *speeds)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocseta (io_t port, tcflag_t *modes, cc_t *ccs, speed_t *speeds)
+S_tioctl_tiocseta (struct protid *cred, tcflag_t *modes, cc_t *ccs,
+ speed_t *speeds)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocsetaw (io_t port, tcflag_t *modes, cc_t *ccs, speed_t *speeds)
+S_tioctl_tiocsetaw (struct protid *cred, tcflag_t *modes, cc_t *ccs,
+ speed_t *speeds)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocsetaf (io_t port, tcflag_t *modes, cc_t *ccs,
- speed_t *speeds)
+S_tioctl_tiocsetaf (struct protid *cred, tcflag_t *modes, cc_t *ccs,
+ speed_t *speeds)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocgetd (io_t port, int *disc)
+S_tioctl_tiocgetd (struct protid *cred, int *disc)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocsetd (io_t port, int disc)
+S_tioctl_tiocsetd (struct protid *cred, int disc)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocdrain (io_t port)
+S_tioctl_tiocdrain (struct protid *cred)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocmget (io_t port, int *bits)
+S_tioctl_tiocmget (struct protid *cred, int *bits)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocmset (io_t port, int bits)
+S_tioctl_tiocmset (struct protid *cred, int bits)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocsig (io_t port, int sig)
+S_tioctl_tiocsig (struct protid *cred, int sig)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocext (io_t port, int mode)
+S_tioctl_tiocext (struct protid *cred, int mode)
{
return EOPNOTSUPP;
}
kern_return_t
-S_tioctl_tiocucntl (io_t port, int mode)
+S_tioctl_tiocucntl (struct protid *cred, int mode)
{
return EOPNOTSUPP;
diff --git a/console/mutations.h b/console/mutations.h
index c1867a00..4e1cc7e1 100644
--- a/console/mutations.h
+++ b/console/mutations.h
@@ -23,7 +23,7 @@
#define IO_INTRAN protid_t begin_using_protid_port (io_t)
#define IO_DESTRUCTOR end_using_protid_port (protid_t)
-#define TIOCTL_IMPORTS import "priv.h";
+#define TIOCTL_IMPORTS import "libnetfs/priv.h";
#define NOTIFY_INTRAN \
port_info_t begin_using_port_info_port (mach_port_t)
diff --git a/console/priv.h b/console/priv.h
deleted file mode 100644
index fdb96e7f..00000000
--- a/console/priv.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- Copyright (C) 1995, 1996, 2001, 2007 Free Software Foundation, Inc.
-
- Written by Michael I. Bushnell, p/BSG.
-
- This file is part of the GNU Hurd.
-
- The GNU Hurd 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.
-
- The GNU Hurd 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA. */
-
-#ifndef _CONSOLE_PRIV_H
-#define _CONSOLE_PRIV_H
-
-#include <hurd/hurd_types.h>
-
-#include <hurd/netfs.h>
-
-static inline struct protid * __attribute__ ((unused))
-begin_using_protid_port (file_t port)
-{
- return ports_lookup_port (netfs_port_bucket, port, netfs_protid_class);
-}
-
-static inline void __attribute__ ((unused))
-end_using_protid_port (struct protid *cred)
-{
- if (cred)
- ports_port_deref (cred);
-}
-#endif