forked from Imagelibrary/rtems
Convert using "bool".
This commit is contained in:
@@ -45,7 +45,7 @@ extern void open_dev_console(void);
|
||||
/*
|
||||
* Prototypes required to install newlib reentrancy user extension
|
||||
*/
|
||||
rtems_boolean libc_create_hook(
|
||||
bool libc_create_hook(
|
||||
rtems_tcb *current_task,
|
||||
rtems_tcb *creating_task
|
||||
);
|
||||
|
||||
@@ -32,7 +32,7 @@ uint32_t benchmark_timer_read( void );
|
||||
rtems_status_code benchmark_timer_empty_function( void );
|
||||
|
||||
void benchmark_timer_disable_subtracting_average_overhead(
|
||||
rtems_boolean find_flag
|
||||
bool find_flag
|
||||
);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
@@ -35,7 +35,7 @@ int chdir(
|
||||
*/
|
||||
|
||||
result = rtems_filesystem_evaluate_path(
|
||||
pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, TRUE );
|
||||
pathname, RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
|
||||
if ( result != 0 )
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ int chmod(
|
||||
rtems_filesystem_location_info_t loc;
|
||||
int result;
|
||||
|
||||
status = rtems_filesystem_evaluate_path( path, 0, &loc, TRUE );
|
||||
status = rtems_filesystem_evaluate_path( path, 0, &loc, true );
|
||||
if ( status != 0 )
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ int chown(
|
||||
rtems_filesystem_location_info_t loc;
|
||||
int result;
|
||||
|
||||
if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, TRUE ) )
|
||||
if ( rtems_filesystem_evaluate_path( path, 0x00, &loc, true ) )
|
||||
return -1;
|
||||
|
||||
if ( !loc.ops->chown_h ) {
|
||||
|
||||
@@ -29,7 +29,7 @@ void free(
|
||||
return;
|
||||
|
||||
#if defined(RTEMS_HEAP_DEBUG)
|
||||
_Protected_heap_Walk( &RTEMS_Malloc_Heap, 0, FALSE );
|
||||
_Protected_heap_Walk( &RTEMS_Malloc_Heap, 0, false );
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
@@ -37,7 +37,7 @@ int link(
|
||||
* Get the node we are linking to.
|
||||
*/
|
||||
|
||||
result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, TRUE );
|
||||
result = rtems_filesystem_evaluate_path( existing, 0, &existing_loc, true );
|
||||
if ( result != 0 )
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -17,6 +17,6 @@
|
||||
|
||||
#define _STAT_NAME lstat
|
||||
#define _STAT_R_NAME _lstat_r
|
||||
#define _STAT_FOLLOW_LINKS FALSE
|
||||
#define _STAT_FOLLOW_LINKS false
|
||||
|
||||
#include "stat.c"
|
||||
|
||||
@@ -52,7 +52,7 @@ void *malloc(
|
||||
* Walk the heap and verify its integrity
|
||||
*/
|
||||
#if defined(RTEMS_HEAP_DEBUG)
|
||||
_Protected_heap_Walk( &RTEMS_Malloc_Heap, 0, FALSE );
|
||||
_Protected_heap_Walk( &RTEMS_Malloc_Heap, 0, false );
|
||||
#endif
|
||||
|
||||
#if defined(RTEMS_MALLOC_BOUNDARY_HELPERS)
|
||||
|
||||
@@ -24,15 +24,15 @@
|
||||
|
||||
rtems_chain_control RTEMS_Malloc_GC_list;
|
||||
|
||||
boolean malloc_is_system_state_OK(void)
|
||||
bool malloc_is_system_state_OK(void)
|
||||
{
|
||||
if ( _Thread_Dispatch_disable_level > 0 )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if ( _ISR_Nest_level > 0 )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void malloc_deferred_frees_initialize(void)
|
||||
|
||||
@@ -93,7 +93,7 @@ void RTEMS_Malloc_Initialize(
|
||||
rtems_fatal_error_occurred( status );
|
||||
|
||||
#if defined(RTEMS_HEAP_DEBUG)
|
||||
if ( _Protected_heap_Walk( &RTEMS_Malloc_Heap, 0, FALSE ) ) {
|
||||
if ( _Protected_heap_Walk( &RTEMS_Malloc_Heap, 0, false ) ) {
|
||||
printk( "Malloc heap not initialized correctly\n" );
|
||||
rtems_print_buffer( start, 32 );
|
||||
printk( "\n" );
|
||||
|
||||
@@ -49,7 +49,7 @@ extern rtems_malloc_statistics_t rtems_malloc_statistics;
|
||||
/*
|
||||
* Process deferred free operations
|
||||
*/
|
||||
boolean malloc_is_system_state_OK(void);
|
||||
bool malloc_is_system_state_OK(void);
|
||||
void malloc_deferred_frees_initialize(void);
|
||||
void malloc_deferred_frees_process(void);
|
||||
void malloc_deferred_free(void *);
|
||||
|
||||
@@ -40,7 +40,7 @@ rtems_chain_control rtems_filesystem_mount_table_control;
|
||||
*/
|
||||
|
||||
int init_fs_mount_table( void );
|
||||
static int Is_node_fs_root(
|
||||
static bool Is_node_fs_root(
|
||||
rtems_filesystem_location_info_t *loc
|
||||
);
|
||||
|
||||
@@ -139,7 +139,7 @@ int mount(
|
||||
if ( mount_point ) {
|
||||
|
||||
if ( rtems_filesystem_evaluate_path(
|
||||
mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, TRUE ) == -1 )
|
||||
mount_point, RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
|
||||
goto cleanup_and_bail;
|
||||
|
||||
loc_to_free = &loc;
|
||||
@@ -271,7 +271,7 @@ int init_fs_mount_table(void)
|
||||
*
|
||||
*/
|
||||
|
||||
static int Is_node_fs_root(
|
||||
static bool Is_node_fs_root(
|
||||
rtems_filesystem_location_info_t *loc
|
||||
)
|
||||
{
|
||||
@@ -287,7 +287,7 @@ static int Is_node_fs_root(
|
||||
the_node = the_node->next ) {
|
||||
the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node;
|
||||
if ( the_mount_entry->mt_fs_root.node_access == loc->node_access )
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -84,10 +84,10 @@ bool libc_create_hook(
|
||||
|
||||
_REENT_INIT_PTR((ptr)); /* GCC extension: structure constants */
|
||||
creating_task->libc_reent = ptr;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -111,7 +111,7 @@ int open(
|
||||
*/
|
||||
|
||||
status = rtems_filesystem_evaluate_path(
|
||||
pathname, eval_flags, &loc, TRUE );
|
||||
pathname, eval_flags, &loc, true );
|
||||
|
||||
if ( status == -1 ) {
|
||||
if ( errno != ENOENT ) {
|
||||
@@ -133,7 +133,7 @@ int open(
|
||||
}
|
||||
|
||||
/* Sanity check to see if the file name exists after the mknod() */
|
||||
status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, TRUE );
|
||||
status = rtems_filesystem_evaluate_path( pathname, 0x0, &loc, true );
|
||||
if ( status != 0 ) { /* The file did not exist */
|
||||
rc = EACCES;
|
||||
goto done;
|
||||
|
||||
@@ -30,7 +30,7 @@ ssize_t readlink(
|
||||
if (!buf)
|
||||
rtems_set_errno_and_return_minus_one( EFAULT );
|
||||
|
||||
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE );
|
||||
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
|
||||
if ( result != 0 )
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ ssize_t readv(
|
||||
int v;
|
||||
int bytes;
|
||||
rtems_libio_t *iop;
|
||||
boolean all_zeros;
|
||||
bool all_zeros;
|
||||
|
||||
rtems_libio_check_fd( fd );
|
||||
iop = rtems_libio_iop( fd );
|
||||
@@ -67,7 +67,7 @@ ssize_t readv(
|
||||
* that we do not do anything if there is an argument error.
|
||||
*/
|
||||
|
||||
all_zeros = TRUE;
|
||||
all_zeros = true;
|
||||
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
|
||||
ssize_t old;
|
||||
|
||||
@@ -84,7 +84,7 @@ ssize_t readv(
|
||||
rtems_set_errno_and_return_minus_one( EINVAL );
|
||||
|
||||
if ( iov[v].iov_len )
|
||||
all_zeros = FALSE;
|
||||
all_zeros = false;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -92,7 +92,7 @@ ssize_t readv(
|
||||
* OpenGroup didn't address this case as they did with writev(),
|
||||
* we will handle it the same way for symmetry.
|
||||
*/
|
||||
if ( all_zeros == TRUE ) {
|
||||
if ( all_zeros == true ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ int rmdir(
|
||||
* Get the node where we wish to go.
|
||||
*/
|
||||
|
||||
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, FALSE );
|
||||
result = rtems_filesystem_evaluate_path( pathname, 0, &loc, false );
|
||||
if ( result != 0 )
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
#ifndef _STAT_NAME
|
||||
#define _STAT_NAME stat
|
||||
#define _STAT_R_NAME _stat_r
|
||||
#define _STAT_FOLLOW_LINKS TRUE
|
||||
#define _STAT_FOLLOW_LINKS true
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -1144,7 +1144,7 @@ rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
|
||||
unsigned int newTail;
|
||||
char c;
|
||||
int dropped = 0;
|
||||
boolean flow_rcv = FALSE; /* TRUE, if flow control char received */
|
||||
bool flow_rcv = false; /* true, if flow control char received */
|
||||
rtems_interrupt_level level;
|
||||
|
||||
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
|
||||
@@ -1180,13 +1180,13 @@ rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len)
|
||||
/* stop output */
|
||||
tty->flow_ctrl |= FL_ORCVXOF;
|
||||
}
|
||||
flow_rcv = TRUE;
|
||||
flow_rcv = true;
|
||||
}
|
||||
else if (c == tty->termios.c_cc[VSTART]) {
|
||||
/* VSTART received */
|
||||
/* restart output */
|
||||
tty->flow_ctrl &= ~FL_ORCVXOF;
|
||||
flow_rcv = TRUE;
|
||||
flow_rcv = true;
|
||||
}
|
||||
}
|
||||
if (flow_rcv) {
|
||||
|
||||
@@ -31,7 +31,7 @@ int unlink(
|
||||
* Get the node to be unlinked.
|
||||
*/
|
||||
|
||||
result = rtems_filesystem_evaluate_path( path, 0, &loc, FALSE );
|
||||
result = rtems_filesystem_evaluate_path( path, 0, &loc, false );
|
||||
if ( result != 0 )
|
||||
return -1;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ int search_mt_for_mount_point(
|
||||
rtems_filesystem_location_info_t *location_of_mount_point
|
||||
);
|
||||
|
||||
rtems_boolean rtems_filesystem_nodes_equal(
|
||||
bool rtems_filesystem_nodes_equal(
|
||||
const rtems_filesystem_location_info_t *loc1,
|
||||
const rtems_filesystem_location_info_t *loc2
|
||||
){
|
||||
@@ -63,7 +63,7 @@ rtems_boolean rtems_filesystem_nodes_equal(
|
||||
* the root node of the file system being unmounted.
|
||||
*/
|
||||
|
||||
rtems_boolean file_systems_below_this_mountpoint(
|
||||
bool file_systems_below_this_mountpoint(
|
||||
const char *path,
|
||||
rtems_filesystem_location_info_t *fs_root_loc,
|
||||
rtems_filesystem_mount_table_entry_t *fs_to_unmount
|
||||
@@ -82,11 +82,11 @@ rtems_boolean file_systems_below_this_mountpoint(
|
||||
the_node = the_node->next ) {
|
||||
the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node;
|
||||
if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) {
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -113,7 +113,7 @@ int unmount(
|
||||
* The mount entry that is being refered to.
|
||||
*/
|
||||
|
||||
if ( rtems_filesystem_evaluate_path( path, 0x0, &loc, TRUE ) )
|
||||
if ( rtems_filesystem_evaluate_path( path, 0x0, &loc, true ) )
|
||||
return -1;
|
||||
|
||||
mt_entry = loc.mt_entry;
|
||||
|
||||
@@ -30,7 +30,7 @@ int utime(
|
||||
rtems_filesystem_location_info_t temp_loc;
|
||||
int result;
|
||||
|
||||
if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, TRUE ) )
|
||||
if ( rtems_filesystem_evaluate_path( path, 0x00, &temp_loc, true ) )
|
||||
return -1;
|
||||
|
||||
if ( !temp_loc.ops->utime_h ){
|
||||
|
||||
@@ -36,7 +36,7 @@ ssize_t writev(
|
||||
int bytes;
|
||||
rtems_libio_t *iop;
|
||||
ssize_t old;
|
||||
boolean all_zeros;
|
||||
bool all_zeros;
|
||||
|
||||
rtems_libio_check_fd( fd );
|
||||
iop = rtems_libio_iop( fd );
|
||||
@@ -73,7 +73,7 @@ ssize_t writev(
|
||||
* The variable "all_zero" is used as an early exit point before
|
||||
* entering the write loop.
|
||||
*/
|
||||
all_zeros = TRUE;
|
||||
all_zeros = true;
|
||||
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
|
||||
|
||||
if ( !iov[v].iov_base )
|
||||
@@ -83,7 +83,7 @@ ssize_t writev(
|
||||
rtems_set_errno_and_return_minus_one( EINVAL );
|
||||
|
||||
if ( iov[v].iov_len )
|
||||
all_zeros = FALSE;
|
||||
all_zeros = false;
|
||||
|
||||
/* check for wrap */
|
||||
old = total;
|
||||
@@ -95,7 +95,7 @@ ssize_t writev(
|
||||
/*
|
||||
* A writev with all zeros is supposed to have no effect per OpenGroup.
|
||||
*/
|
||||
if ( all_zeros == TRUE ) {
|
||||
if ( all_zeros == true ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user