diff options
-rw-r--r-- | cpukit/ChangeLog | 10 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_fifo.c | 11 | ||||
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_initsupp.c | 3 | ||||
-rw-r--r-- | cpukit/libfs/src/pipe/fifo.c | 9 | ||||
-rw-r--r-- | cpukit/libfs/src/pipe/pipe.h | 2 | ||||
-rw-r--r-- | cpukit/score/include/rtems/score/object.h | 4 | ||||
-rw-r--r-- | cpukit/score/src/objectgetinfo.c | 2 | ||||
-rw-r--r-- | cpukit/score/src/objectinitializeinformation.c | 2 |
8 files changed, 27 insertions, 16 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index f939728372..3698457375 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,13 @@ +2010-08-09 Bharath Suri <bharath.s.jois@gmail.com> + + PR 1660/filesystem + * libfs/src/pipe/fifo.c, libfs/src/pipe/pipe.h: Changed + int pipe_release to void pipe_release. + * libfs/src/imfs/imfs_fifo.c: Corresponding change to + IMFS_fifo_close since pipe_release does not return any error. + * libfs/src/imfs/imfs_initsupp.c: Changes to improve + IMFS_determine_bytes_per_block + 2010-08-10 Joel Sherrill <joel.sherrill@oarcorp.com> PR 1661/testing diff --git a/cpukit/libfs/src/imfs/imfs_fifo.c b/cpukit/libfs/src/imfs/imfs_fifo.c index 4090c16c0d..8e59e2fe14 100644 --- a/cpukit/libfs/src/imfs/imfs_fifo.c +++ b/cpukit/libfs/src/imfs/imfs_fifo.c @@ -49,15 +49,14 @@ int IMFS_fifo_close( rtems_libio_t *iop ) { + int err = 0; IMFS_jnode_t *jnode = iop->pathinfo.node_access; - int err = pipe_release(&JNODE2PIPE(jnode), iop); - - if (err == 0) { - iop->flags &= ~LIBIO_FLAGS_OPEN; - IMFS_check_node_remove(jnode); - } + pipe_release(&JNODE2PIPE(jnode), iop); + iop->flags &= ~LIBIO_FLAGS_OPEN; + IMFS_check_node_remove(jnode); + IMFS_FIFO_RETURN(err); } diff --git a/cpukit/libfs/src/imfs/imfs_initsupp.c b/cpukit/libfs/src/imfs/imfs_initsupp.c index 629a2a1a65..47e1d392e8 100644 --- a/cpukit/libfs/src/imfs/imfs_initsupp.c +++ b/cpukit/libfs/src/imfs/imfs_initsupp.c @@ -48,7 +48,10 @@ static int IMFS_determine_bytes_per_block( for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; + break; } + if(bit_mask > requested_bytes_per_block) + break; } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block diff --git a/cpukit/libfs/src/pipe/fifo.c b/cpukit/libfs/src/pipe/fifo.c index a19ef617a3..9579954611 100644 --- a/cpukit/libfs/src/pipe/fifo.c +++ b/cpukit/libfs/src/pipe/fifo.c @@ -241,7 +241,7 @@ out: * *pipep points to pipe control structure. When the last user releases pipe, * it will be set to NULL. */ -int pipe_release( +void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) @@ -286,17 +286,16 @@ int pipe_release( #if 0 if (! delfile) - return 0; + return; if (iop->pathinfo.ops->unlink_h == NULL) - return 0; + return; /* This is safe for IMFS, but how about other FSes? */ iop->flags &= ~LIBIO_FLAGS_OPEN; if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) - return -errno; + return; #endif - return 0; } /* diff --git a/cpukit/libfs/src/pipe/pipe.h b/cpukit/libfs/src/pipe/pipe.h index 1c07e1a458..354cc9d130 100644 --- a/cpukit/libfs/src/pipe/pipe.h +++ b/cpukit/libfs/src/pipe/pipe.h @@ -52,7 +52,7 @@ extern int pipe_create( * *pipep points to pipe control structure. When the last user releases pipe, * it will be set to NULL. */ -extern int pipe_release( +extern void pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ); diff --git a/cpukit/score/include/rtems/score/object.h b/cpukit/score/include/rtems/score/object.h index 2ee8c66c8d..590d831345 100644 --- a/cpukit/score/include/rtems/score/object.h +++ b/cpukit/score/include/rtems/score/object.h @@ -476,7 +476,7 @@ void _Objects_Shrink_information( void _Objects_Initialize_information ( Objects_Information *information, Objects_APIs the_api, - uint32_t the_class, + uint16_t the_class, uint32_t maximum, uint16_t size, bool is_string, @@ -754,7 +754,7 @@ Objects_Control *_Objects_Get_next( */ Objects_Information *_Objects_Get_information( Objects_APIs the_api, - uint32_t the_class + uint16_t the_class ); /** diff --git a/cpukit/score/src/objectgetinfo.c b/cpukit/score/src/objectgetinfo.c index 9207af8f90..da3e79713e 100644 --- a/cpukit/score/src/objectgetinfo.c +++ b/cpukit/score/src/objectgetinfo.c @@ -20,7 +20,7 @@ Objects_Information *_Objects_Get_information( Objects_APIs the_api, - uint32_t the_class + uint16_t the_class ) { Objects_Information *info; diff --git a/cpukit/score/src/objectinitializeinformation.c b/cpukit/score/src/objectinitializeinformation.c index 050df7861e..771637c8ca 100644 --- a/cpukit/score/src/objectinitializeinformation.c +++ b/cpukit/score/src/objectinitializeinformation.c @@ -49,7 +49,7 @@ void _Objects_Initialize_information( Objects_Information *information, Objects_APIs the_api, - uint32_t the_class, + uint16_t the_class, uint32_t maximum, uint16_t size, bool is_string, |