mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-23 00:48:13 +08:00
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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
Objects_Information *_Objects_Get_information(
|
||||
Objects_APIs the_api,
|
||||
uint32_t the_class
|
||||
uint16_t the_class
|
||||
)
|
||||
{
|
||||
Objects_Information *info;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user