summaryrefslogtreecommitdiffstats
path: root/freebsd/sys/sys
diff options
context:
space:
mode:
authorKevin Kirspel <kevin-kirspel@idexx.com>2017-05-12 08:16:27 -0400
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-05-12 14:20:33 +0200
commit817cbf7201ebd2c27d8e1b8e47a9090762bb010e (patch)
treee2d315cfbe7498d2c3f49473cafb02bcd61e6d6e /freebsd/sys/sys
parentUpdating scripts for USB Serial Drivers (diff)
downloadrtems-libbsd-817cbf7201ebd2c27d8e1b8e47a9090762bb010e.tar.bz2
devfs: Fix some issues
Fix issue with cdev private data usage with RTEMS iop structure. Add support for cdev alias device names. Add support for cdev fstat.
Diffstat (limited to 'freebsd/sys/sys')
-rw-r--r--freebsd/sys/sys/file.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/freebsd/sys/sys/file.h b/freebsd/sys/sys/file.h
index 8f91f52c..c52dc7a9 100644
--- a/freebsd/sys/sys/file.h
+++ b/freebsd/sys/sys/file.h
@@ -199,14 +199,11 @@ struct file {
void *f_label; /* Place-holder for MAC label. */
#else /* __rtems__ */
rtems_libio_t f_io;
- union {
- struct cdev_privdata *fvn_cdevpriv;
- /* (d) Private data for the cdev. */
- } f_vnun;
#endif /* __rtems__ */
};
#ifdef __rtems__
#define f_data f_io.pathinfo.node_access_2
+#define f_cdevpriv f_io.data1
static inline struct file *
rtems_bsd_iop_to_fp(rtems_libio_t *iop)
@@ -283,8 +280,10 @@ rtems_bsd_error_to_status_and_errno(int error)
}
#endif /* __rtems__ */
+#ifndef __rtems__
#define f_cdevpriv f_vnun.fvn_cdevpriv
#define f_advice f_vnun.fvn_advice
+#endif /* __rtems__ */
#define FOFFSET_LOCKED 0x1
#define FOFFSET_LOCK_WAITING 0x2