diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-07-15 08:10:48 +0000 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2010-07-15 08:10:48 +0000 |
commit | fd2b1634bb0698c7cf6b1dd2489bab2777f34831 (patch) | |
tree | eaad57942e25838769ae2670d28607fb4d894e67 /cpukit/libcsupport | |
parent | 2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de> (diff) | |
download | rtems-fd2b1634bb0698c7cf6b1dd2489bab2777f34831.tar.bz2 |
2010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libcsupport/include/rtems/libio.h: Removed file_info and handlers
fields in rtems_libio_t.
* libcsupport/src/close.c, libcsupport/src/fcntl.c,
libcsupport/src/fdatasync.c, libcsupport/src/fstat.c,
libcsupport/src/fsync.c, libcsupport/src/ftruncate.c,
libcsupport/src/getdents.c, libcsupport/src/ioctl.c,
libcsupport/src/libio_sockets.c, libcsupport/src/lseek.c,
libcsupport/src/open.c, libcsupport/src/read.c,
libcsupport/src/readv.c, libcsupport/src/write.c,
libcsupport/src/writev.c, libfs/src/devfs/devclose.c,
libfs/src/devfs/devioctl.c, libfs/src/devfs/devopen.c,
libfs/src/devfs/devread.c, libfs/src/devfs/devwrite.c
libfs/src/dosfs/msdos_dir.c libfs/src/dosfs/msdos_file.c
libfs/src/imfs/deviceio.c libfs/src/imfs/imfs_directory.c
libfs/src/imfs/imfs_fifo.c libfs/src/imfs/memfile.c
libfs/src/nfsclient/src/nfs.c libfs/src/rfs/rtems-rfs-rtems-file.c
libfs/src/rfs/rtems-rfs-rtems.h libnetworking/lib/ftpfs.c: Reflect
changes above.
Diffstat (limited to 'cpukit/libcsupport')
-rw-r--r-- | cpukit/libcsupport/include/rtems/libio.h | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/close.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/fcntl.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/fdatasync.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/fstat.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/fsync.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/ftruncate.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/getdents.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/ioctl.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/libio_sockets.c | 10 | ||||
-rw-r--r-- | cpukit/libcsupport/src/lseek.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/open.c | 4 | ||||
-rw-r--r-- | cpukit/libcsupport/src/read.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/readv.c | 6 | ||||
-rw-r--r-- | cpukit/libcsupport/src/write.c | 2 | ||||
-rw-r--r-- | cpukit/libcsupport/src/writev.c | 6 |
16 files changed, 25 insertions, 27 deletions
diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h index 536e4513d7..1068074682 100644 --- a/cpukit/libcsupport/include/rtems/libio.h +++ b/cpukit/libcsupport/include/rtems/libio.h @@ -1119,8 +1119,6 @@ struct rtems_libio_tt { rtems_id sem; uint32_t data0; /* private to "driver" */ void *data1; /* ... */ - void *file_info; /* used by file handlers */ - const rtems_filesystem_file_handlers_r *handlers; /* type specific handlers */ }; /** diff --git a/cpukit/libcsupport/src/close.c b/cpukit/libcsupport/src/close.c index d14c4e18f5..726bca11d9 100644 --- a/cpukit/libcsupport/src/close.c +++ b/cpukit/libcsupport/src/close.c @@ -29,7 +29,7 @@ int close( rtems_libio_check_is_open(iop); rc = RTEMS_SUCCESSFUL; - rc = (*iop->handlers->close_h)( iop ); + rc = (*iop->pathinfo.handlers->close_h)( iop ); rtems_filesystem_freenode( &iop->pathinfo ); rtems_libio_free( iop ); diff --git a/cpukit/libcsupport/src/fcntl.c b/cpukit/libcsupport/src/fcntl.c index ad4fef7bbe..988a9414ee 100644 --- a/cpukit/libcsupport/src/fcntl.c +++ b/cpukit/libcsupport/src/fcntl.c @@ -62,8 +62,6 @@ static int vfcntl( } } - diop->handlers = iop->handlers; - diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); @@ -140,7 +138,7 @@ static int vfcntl( */ if (ret >= 0) { - int err = (*iop->handlers->fcntl_h)( cmd, iop ); + int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); if (err) { errno = err; ret = -1; diff --git a/cpukit/libcsupport/src/fdatasync.c b/cpukit/libcsupport/src/fdatasync.c index 504f7a9de4..de226af5c1 100644 --- a/cpukit/libcsupport/src/fdatasync.c +++ b/cpukit/libcsupport/src/fdatasync.c @@ -35,5 +35,5 @@ int fdatasync( * Now process the fdatasync(). */ - return (*iop->handlers->fdatasync_h)( iop ); + return (*iop->pathinfo.handlers->fdatasync_h)( iop ); } diff --git a/cpukit/libcsupport/src/fstat.c b/cpukit/libcsupport/src/fstat.c index 45eb450947..8ec12e0637 100644 --- a/cpukit/libcsupport/src/fstat.c +++ b/cpukit/libcsupport/src/fstat.c @@ -50,7 +50,7 @@ int fstat( */ memset( sbuf, 0, sizeof(struct stat) ); - return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); + return (*iop->pathinfo.handlers->fstat_h)( &iop->pathinfo, sbuf ); } /* diff --git a/cpukit/libcsupport/src/fsync.c b/cpukit/libcsupport/src/fsync.c index d8ecb88f3b..4d2fe2ae12 100644 --- a/cpukit/libcsupport/src/fsync.c +++ b/cpukit/libcsupport/src/fsync.c @@ -35,5 +35,5 @@ int fsync( * Now process the fsync(). */ - return (*iop->handlers->fsync_h)( iop ); + return (*iop->pathinfo.handlers->fsync_h)( iop ); } diff --git a/cpukit/libcsupport/src/ftruncate.c b/cpukit/libcsupport/src/ftruncate.c index e23db2c724..64946d7bb6 100644 --- a/cpukit/libcsupport/src/ftruncate.c +++ b/cpukit/libcsupport/src/ftruncate.c @@ -47,5 +47,5 @@ int ftruncate( rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); - return (*iop->handlers->ftruncate_h)( iop, length ); + return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); } diff --git a/cpukit/libcsupport/src/getdents.c b/cpukit/libcsupport/src/getdents.c index 6b5dbfe76c..d0b787cd88 100644 --- a/cpukit/libcsupport/src/getdents.c +++ b/cpukit/libcsupport/src/getdents.c @@ -51,5 +51,5 @@ int getdents( * Return the number of bytes that were actually transfered as a result * of the read attempt. */ - return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); + return (*iop->pathinfo.handlers->read_h)( iop, dd_buf, dd_len ); } diff --git a/cpukit/libcsupport/src/ioctl.c b/cpukit/libcsupport/src/ioctl.c index 95cdaf8881..a2328e22f8 100644 --- a/cpukit/libcsupport/src/ioctl.c +++ b/cpukit/libcsupport/src/ioctl.c @@ -47,7 +47,7 @@ int ioctl( /* * Now process the ioctl(). */ - rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); + rc = (*iop->pathinfo.handlers->ioctl_h)( iop, command, buffer ); return rc; } diff --git a/cpukit/libcsupport/src/libio_sockets.c b/cpukit/libcsupport/src/libio_sockets.c index eec74aaa63..c67e19d78c 100644 --- a/cpukit/libcsupport/src/libio_sockets.c +++ b/cpukit/libcsupport/src/libio_sockets.c @@ -16,10 +16,7 @@ #include "config.h" #endif -#include <rtems/libio_.h> /* libio_.h pulls in rtems */ -#include <rtems.h> - -#include <errno.h> +#include <rtems/libio_.h> #include <rtems/seterr.h> /* @@ -70,8 +67,7 @@ int rtems_bsdnet_makeFdForSocket( iop->flags |= LIBIO_FLAGS_WRITE | LIBIO_FLAGS_READ; iop->data0 = fd; iop->data1 = so; - iop->handlers = h; - iop->pathinfo.handlers = rtems_filesystem_root.handlers; - iop->pathinfo.ops = rtems_filesystem_root.ops; + iop->pathinfo.handlers = h; + iop->pathinfo.ops = &rtems_filesystem_operations_default; return fd; } diff --git a/cpukit/libcsupport/src/lseek.c b/cpukit/libcsupport/src/lseek.c index 840ec3c9d4..3f37029807 100644 --- a/cpukit/libcsupport/src/lseek.c +++ b/cpukit/libcsupport/src/lseek.c @@ -61,7 +61,7 @@ off_t lseek( * new offset. */ - status = (*iop->handlers->lseek_h)( iop, offset, whence ); + status = (*iop->pathinfo.handlers->lseek_h)( iop, offset, whence ); if ( status == (off_t) -1 ) iop->offset = old_offset; diff --git a/cpukit/libcsupport/src/open.c b/cpukit/libcsupport/src/open.c index 58db254a39..d8fe7aba49 100644 --- a/cpukit/libcsupport/src/open.c +++ b/cpukit/libcsupport/src/open.c @@ -154,12 +154,10 @@ int open( * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ - iop->handlers = loc.handlers; - iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; - rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); + rc = (*iop->pathinfo.handlers->open_h)( iop, pathname, flags, mode ); if ( rc ) { rc = errno; goto done; diff --git a/cpukit/libcsupport/src/read.c b/cpukit/libcsupport/src/read.c index 77ba4b1314..d3398ebee6 100644 --- a/cpukit/libcsupport/src/read.c +++ b/cpukit/libcsupport/src/read.c @@ -40,7 +40,7 @@ ssize_t read( /* * Now process the read(). */ - rc = (*iop->handlers->read_h)( iop, buffer, count ); + rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); if ( rc > 0 ) iop->offset += rc; diff --git a/cpukit/libcsupport/src/readv.c b/cpukit/libcsupport/src/readv.c index 184bc1f41b..3f97b14f14 100644 --- a/cpukit/libcsupport/src/readv.c +++ b/cpukit/libcsupport/src/readv.c @@ -97,7 +97,11 @@ ssize_t readv( * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { - bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); + bytes = (*iop->pathinfo.handlers->read_h)( + iop, + iov[v].iov_base, + iov[v].iov_len + ); if ( bytes < 0 ) return -1; diff --git a/cpukit/libcsupport/src/write.c b/cpukit/libcsupport/src/write.c index 1a792f708d..fafb96a7a3 100644 --- a/cpukit/libcsupport/src/write.c +++ b/cpukit/libcsupport/src/write.c @@ -47,7 +47,7 @@ ssize_t write( /* * Now process the write() request. */ - rc = (*iop->handlers->write_h)( iop, buffer, count ); + rc = (*iop->pathinfo.handlers->write_h)( iop, buffer, count ); if ( rc > 0 ) iop->offset += rc; diff --git a/cpukit/libcsupport/src/writev.c b/cpukit/libcsupport/src/writev.c index 151258e3a4..8dabe1d598 100644 --- a/cpukit/libcsupport/src/writev.c +++ b/cpukit/libcsupport/src/writev.c @@ -104,7 +104,11 @@ ssize_t writev( if ( iov[v].iov_len == 0 ) continue; - bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); + bytes = (*iop->pathinfo.handlers->write_h)( + iop, + iov[v].iov_base, + iov[v].iov_len + ); if ( bytes < 0 ) return -1; |