mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2001-10-25 Jennifer Averett <jennifer@OARcorp.com>
* libc/libio.c: Initialize more fields to NULL/0 during initialiation. * include/rtems/libio_.h: Fix freenode macro so it works for sockets which do not have the full set of filesystem operations and are initialized via something other than open().
This commit is contained in:
@@ -165,8 +165,9 @@ extern rtems_libio_t *rtems_libio_iop_freelist;
|
||||
|
||||
#define rtems_filesystem_freenode( _node ) \
|
||||
do { \
|
||||
if ( (_node)->ops->freenod_h ) \
|
||||
(*(_node)->ops->freenod_h)( (_node) ); \
|
||||
if ( (_node)->ops )\
|
||||
if ( (_node)->ops->freenod_h ) \
|
||||
(*(_node)->ops->freenod_h)( (_node) ); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
|
||||
@@ -165,8 +165,9 @@ extern rtems_libio_t *rtems_libio_iop_freelist;
|
||||
|
||||
#define rtems_filesystem_freenode( _node ) \
|
||||
do { \
|
||||
if ( (_node)->ops->freenod_h ) \
|
||||
(*(_node)->ops->freenod_h)( (_node) ); \
|
||||
if ( (_node)->ops )\
|
||||
if ( (_node)->ops->freenod_h ) \
|
||||
(*(_node)->ops->freenod_h)( (_node) ); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
|
||||
@@ -206,10 +206,20 @@ rtems_libio_t *rtems_libio_allocate( void )
|
||||
if (rc != RTEMS_SUCCESSFUL)
|
||||
goto failed;
|
||||
rtems_libio_iop_freelist = iop->data1;
|
||||
iop->data1 = 0;
|
||||
iop->flags = LIBIO_FLAGS_OPEN;
|
||||
iop->size = 0;
|
||||
iop->offset = 0;
|
||||
|
||||
iop->driver = NULL;
|
||||
iop->size = 0;
|
||||
iop->offset = 0;
|
||||
iop->flags = LIBIO_FLAGS_OPEN;
|
||||
iop->pathinfo.node_access = NULL;
|
||||
iop->pathinfo.handlers = NULL;
|
||||
iop->pathinfo.ops = NULL;
|
||||
iop->pathinfo.mt_entry = NULL;
|
||||
iop->data0 = 0;
|
||||
iop->data1 = NULL;
|
||||
iop->file_info = NULL;
|
||||
iop->handlers = NULL;
|
||||
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
2001-10-25 Jennifer Averett <jennifer@OARcorp.com>
|
||||
|
||||
* libc/libio.c: Initialize more fields to NULL/0 during initialiation.
|
||||
* include/rtems/libio_.h: Fix freenode macro so it works for sockets
|
||||
which do not have the full set of filesystem operations and are
|
||||
initialized via something other than open().
|
||||
|
||||
2001-10-18 Till Straumann <strauman@SLAC.Stanford.EDU>
|
||||
|
||||
* libc/open.c, libc/close.c: Moved freenode from open to
|
||||
|
||||
@@ -165,8 +165,9 @@ extern rtems_libio_t *rtems_libio_iop_freelist;
|
||||
|
||||
#define rtems_filesystem_freenode( _node ) \
|
||||
do { \
|
||||
if ( (_node)->ops->freenod_h ) \
|
||||
(*(_node)->ops->freenod_h)( (_node) ); \
|
||||
if ( (_node)->ops )\
|
||||
if ( (_node)->ops->freenod_h ) \
|
||||
(*(_node)->ops->freenod_h)( (_node) ); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
|
||||
@@ -206,10 +206,20 @@ rtems_libio_t *rtems_libio_allocate( void )
|
||||
if (rc != RTEMS_SUCCESSFUL)
|
||||
goto failed;
|
||||
rtems_libio_iop_freelist = iop->data1;
|
||||
iop->data1 = 0;
|
||||
iop->flags = LIBIO_FLAGS_OPEN;
|
||||
iop->size = 0;
|
||||
iop->offset = 0;
|
||||
|
||||
iop->driver = NULL;
|
||||
iop->size = 0;
|
||||
iop->offset = 0;
|
||||
iop->flags = LIBIO_FLAGS_OPEN;
|
||||
iop->pathinfo.node_access = NULL;
|
||||
iop->pathinfo.handlers = NULL;
|
||||
iop->pathinfo.ops = NULL;
|
||||
iop->pathinfo.mt_entry = NULL;
|
||||
iop->data0 = 0;
|
||||
iop->data1 = NULL;
|
||||
iop->file_info = NULL;
|
||||
iop->handlers = NULL;
|
||||
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
@@ -165,8 +165,9 @@ extern rtems_libio_t *rtems_libio_iop_freelist;
|
||||
|
||||
#define rtems_filesystem_freenode( _node ) \
|
||||
do { \
|
||||
if ( (_node)->ops->freenod_h ) \
|
||||
(*(_node)->ops->freenod_h)( (_node) ); \
|
||||
if ( (_node)->ops )\
|
||||
if ( (_node)->ops->freenod_h ) \
|
||||
(*(_node)->ops->freenod_h)( (_node) ); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
|
||||
@@ -165,8 +165,9 @@ extern rtems_libio_t *rtems_libio_iop_freelist;
|
||||
|
||||
#define rtems_filesystem_freenode( _node ) \
|
||||
do { \
|
||||
if ( (_node)->ops->freenod_h ) \
|
||||
(*(_node)->ops->freenod_h)( (_node) ); \
|
||||
if ( (_node)->ops )\
|
||||
if ( (_node)->ops->freenod_h ) \
|
||||
(*(_node)->ops->freenod_h)( (_node) ); \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
|
||||
@@ -206,10 +206,20 @@ rtems_libio_t *rtems_libio_allocate( void )
|
||||
if (rc != RTEMS_SUCCESSFUL)
|
||||
goto failed;
|
||||
rtems_libio_iop_freelist = iop->data1;
|
||||
iop->data1 = 0;
|
||||
iop->flags = LIBIO_FLAGS_OPEN;
|
||||
iop->size = 0;
|
||||
iop->offset = 0;
|
||||
|
||||
iop->driver = NULL;
|
||||
iop->size = 0;
|
||||
iop->offset = 0;
|
||||
iop->flags = LIBIO_FLAGS_OPEN;
|
||||
iop->pathinfo.node_access = NULL;
|
||||
iop->pathinfo.handlers = NULL;
|
||||
iop->pathinfo.ops = NULL;
|
||||
iop->pathinfo.mt_entry = NULL;
|
||||
iop->data0 = 0;
|
||||
iop->data1 = NULL;
|
||||
iop->file_info = NULL;
|
||||
iop->handlers = NULL;
|
||||
|
||||
goto done;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user