summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-23 08:32:07 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-27 14:23:15 +0100
commitb112710b07e44adeb2e3bcd39086fde3b66e942d (patch)
tree3f53e18f4cd0ed0412f45c00c59a732683b57b33
parentAdd Xilinx Zynq BSP support (diff)
downloadrtems-libbsd-b112710b07e44adeb2e3bcd39086fde3b66e942d.tar.bz2
Update due to IMFS generic API changes
-rw-r--r--freebsd/sys/kern/uipc_usrreq.c34
-rw-r--r--freebsd/sys/net/bpf.c10
-rw-r--r--freebsd/sys/sys/unpcb.h2
3 files changed, 17 insertions, 29 deletions
diff --git a/freebsd/sys/kern/uipc_usrreq.c b/freebsd/sys/kern/uipc_usrreq.c
index eacfc715..9254e9b2 100644
--- a/freebsd/sys/kern/uipc_usrreq.c
+++ b/freebsd/sys/kern/uipc_usrreq.c
@@ -472,12 +472,12 @@ uipc_attach(struct socket *so, int proto, struct thread *td)
#ifdef __rtems__
static IMFS_jnode_t *
-rtems_uipc_imfs_initialize(IMFS_jnode_t *node, const IMFS_types_union *info)
+rtems_uipc_imfs_initialize(IMFS_jnode_t *node, void *arg)
{
struct socket *so;
struct unpcb *unp;
- node = IMFS_node_initialize_generic(node, info);
+ node = IMFS_node_initialize_generic(node, arg);
so = IMFS_generic_get_context_by_node(node);
unp = sotounpcb(so);
@@ -487,7 +487,7 @@ rtems_uipc_imfs_initialize(IMFS_jnode_t *node, const IMFS_types_union *info)
return node;
}
-static IMFS_jnode_t *
+static void
rtems_uipc_imfs_destroy(IMFS_jnode_t *node)
{
struct socket *so;
@@ -498,24 +498,16 @@ rtems_uipc_imfs_destroy(IMFS_jnode_t *node)
unp->unp_vnode = NULL;
- return node;
+ IMFS_node_destroy_default(node);
}
-static const IMFS_node_control rtems_uipc_imfs_control = {
- .imfs_type = IMFS_GENERIC,
- .handlers = &socketops,
- .node_initialize = rtems_uipc_imfs_initialize,
- .node_remove = IMFS_node_remove_default,
- .node_destroy = rtems_uipc_imfs_destroy
-};
+static const IMFS_node_control rtems_uipc_imfs_control =
+ IMFS_GENERIC_INITIALIZER(&socketops, rtems_uipc_imfs_initialize,
+ rtems_uipc_imfs_destroy);
-static const IMFS_node_control rtems_uipc_imfs_zombi_control = {
- .imfs_type = IMFS_GENERIC,
- .handlers = &rtems_filesystem_handlers_default,
- .node_initialize = NULL,
- .node_remove = IMFS_node_remove_default,
- .node_destroy = IMFS_node_destroy_default
-};
+static const IMFS_node_control rtems_uipc_imfs_zombi_control =
+ IMFS_GENERIC_INITIALIZER(&rtems_filesystem_handlers_default, NULL,
+ IMFS_node_destroy_default);
#endif /* __rtems__ */
static int
uipc_bind(struct socket *so, struct sockaddr *nam, struct thread *td)
@@ -718,7 +710,7 @@ uipc_detach(struct socket *so)
struct vnode *vp;
int freeunp, local_unp_rights;
#else /* __rtems__ */
- struct IMFS_jnode_tt *vp;
+ IMFS_generic_t *vp;
int freeunp;
#endif /* __rtems__ */
@@ -740,8 +732,8 @@ uipc_detach(struct socket *so)
#ifndef __rtems__
VOP_UNP_DETACH(vp);
#else /* __rtems__ */
- vp->control = &rtems_uipc_imfs_zombi_control;
- vp->info.generic.context = NULL;
+ vp->Node.control = &rtems_uipc_imfs_zombi_control;
+ vp->context = NULL;
#endif /* __rtems__ */
unp->unp_vnode = NULL;
}
diff --git a/freebsd/sys/net/bpf.c b/freebsd/sys/net/bpf.c
index 10ad3558..41756658 100644
--- a/freebsd/sys/net/bpf.c
+++ b/freebsd/sys/net/bpf.c
@@ -2931,13 +2931,9 @@ static const rtems_filesystem_file_handlers_r bpf_imfs_handlers = {
.writev_h = bpf_imfs_writev
};
-static const IMFS_node_control bpf_imfs_control = {
- .imfs_type = IMFS_GENERIC,
- .handlers = &bpf_imfs_handlers,
- .node_initialize = IMFS_node_initialize_default,
- .node_remove = IMFS_node_remove_default,
- .node_destroy = IMFS_node_destroy_default
-};
+static const IMFS_node_control bpf_imfs_control = IMFS_GENERIC_INITIALIZER(
+ &bpf_imfs_handlers, IMFS_node_initialize_generic,
+ IMFS_node_destroy_default);
#endif /* __rtems__ */
static void
diff --git a/freebsd/sys/sys/unpcb.h b/freebsd/sys/sys/unpcb.h
index d141b966..38a2d1fe 100644
--- a/freebsd/sys/sys/unpcb.h
+++ b/freebsd/sys/sys/unpcb.h
@@ -71,7 +71,7 @@ struct unpcb {
#ifndef __rtems__
struct vnode *unp_vnode; /* if associated with file */
#else /* __rtems__ */
- struct IMFS_jnode_tt *unp_vnode; /* if associated with file */
+ void *unp_vnode; /* if associated with file */
#endif /* __rtems__ */
ino_t unp_ino; /* fake inode number */
struct unpcb *unp_conn; /* control block of connected socket */