mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-29 16:00:17 +00:00
Use bool instead of boolean.
This commit is contained in:
@@ -104,7 +104,7 @@
|
||||
|
||||
rtems_device_major_number rtems_libi2c_major;
|
||||
|
||||
static boolean is_initialized = FALSE;
|
||||
static bool is_initialized = false;
|
||||
|
||||
static struct i2cbus
|
||||
{
|
||||
@@ -223,7 +223,7 @@ rtems_i2c_init (rtems_device_major_number major, rtems_device_minor_number minor
|
||||
rval = mutexCreate (rtems_build_name ('l', 'I', '2', 'C'), &libmutex);
|
||||
|
||||
if ( RTEMS_SUCCESSFUL == rval ) {
|
||||
is_initialized = TRUE;
|
||||
is_initialized = true;
|
||||
rtems_libi2c_major = major;
|
||||
} else {
|
||||
libmutex = 0;
|
||||
@@ -373,7 +373,7 @@ rtems_libi2c_initialize (void)
|
||||
if ( libmutex )
|
||||
rtems_semaphore_delete (libmutex);
|
||||
libmutex = 0;
|
||||
is_initialized = FALSE;
|
||||
is_initialized = false;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -576,7 +576,7 @@ rtems_libi2c_ioctl (rtems_device_minor_number minor,
|
||||
va_list ap;
|
||||
int sc = 0;
|
||||
void *args;
|
||||
rtems_boolean is_started = FALSE;
|
||||
bool is_started = false;
|
||||
DECL_CHECKED_BH (busno, bush, minor, -)
|
||||
|
||||
va_start(ap, cmd);
|
||||
|
||||
@@ -437,10 +437,10 @@ typedef struct {
|
||||
uint32_t baudrate; /* maximum bits per second */
|
||||
/* only valid for SPI drivers: */
|
||||
uint8_t bits_per_char; /* how many bits per byte/word/longword? */
|
||||
boolean lsb_first; /* TRUE: send LSB first */
|
||||
boolean clock_inv; /* TRUE: inverted clock (high active) */
|
||||
boolean clock_phs; /* TRUE: clock starts toggling at start of data tfr */
|
||||
uint32_t idle_char; /* This character will be continuously transmitted in read only functions */
|
||||
bool lsb_first; /* true: send LSB first */
|
||||
bool clock_inv; /* true: inverted clock (high active) */
|
||||
bool clock_phs; /* true: clock starts toggling at start of data tfr */
|
||||
uint32_t idle_char; /* This character will be continuously transmitted in read only functions */
|
||||
} rtems_libi2c_tfr_mode_t;
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -114,7 +114,7 @@ struct ftpStream {
|
||||
/*
|
||||
* other stuff to remember
|
||||
*/
|
||||
boolean eof_reached;
|
||||
bool eof_reached;
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -234,7 +234,7 @@ int rtems_ftp_get_message
|
||||
size_t rd_size;
|
||||
size_t tmp_size;
|
||||
int eno = 0;
|
||||
rtems_boolean finished = FALSE;
|
||||
bool finished = false;
|
||||
do {
|
||||
/*
|
||||
* fetch (at least) 4 characters from control connection
|
||||
@@ -264,7 +264,7 @@ int rtems_ftp_get_message
|
||||
(isdigit((unsigned int)rd_buffer[1])) &&
|
||||
(isdigit((unsigned int)rd_buffer[2])) &&
|
||||
(rd_buffer[3] == ' ')) {
|
||||
finished = TRUE;
|
||||
finished = true;
|
||||
rd_buffer[3] = '\0';
|
||||
*msg_code = atol(rd_buffer);
|
||||
}
|
||||
@@ -535,8 +535,8 @@ int rtems_ftp_open(
|
||||
uint16_t my_port;
|
||||
int eno = 0;
|
||||
rtems_status_code rc;
|
||||
rtems_boolean is_write = FALSE;
|
||||
rtems_boolean sema_obtained = FALSE;
|
||||
bool is_write = false;
|
||||
bool sema_obtained = false;
|
||||
struct ftpStream *fsp = NULL;
|
||||
int msg_tmp = 0;
|
||||
socklen_t sockaddr_size;
|
||||
@@ -569,7 +569,7 @@ int rtems_ftp_open(
|
||||
if (eno == 0) {
|
||||
rc = rtems_semaphore_obtain (ftp_mutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
|
||||
if (rc == RTEMS_SUCCESSFUL) {
|
||||
sema_obtained = TRUE;
|
||||
sema_obtained = true;
|
||||
}
|
||||
else {
|
||||
eno = EBUSY;
|
||||
@@ -599,7 +599,7 @@ int rtems_ftp_open(
|
||||
if (eno == 0) {
|
||||
fsp = ftpStreams[s] = malloc (sizeof (struct ftpStream));
|
||||
rtems_semaphore_release (ftp_mutex);
|
||||
sema_obtained = FALSE;
|
||||
sema_obtained = false;
|
||||
if (fsp == NULL) {
|
||||
eno = ENOMEM;
|
||||
}
|
||||
@@ -609,7 +609,7 @@ int rtems_ftp_open(
|
||||
fsp->ctrl_socket = -1; /* mark, that sockets not yet created */
|
||||
fsp->port_socket = -1;
|
||||
fsp->data_socket = -1;
|
||||
fsp->eof_reached = FALSE;
|
||||
fsp->eof_reached = false;
|
||||
}
|
||||
}
|
||||
if (eno == 0) {
|
||||
@@ -944,7 +944,7 @@ int rtems_ftp_open(
|
||||
*/
|
||||
if (sema_obtained) {
|
||||
rtems_semaphore_release (ftp_mutex);
|
||||
sema_obtained = FALSE;
|
||||
sema_obtained = false;
|
||||
}
|
||||
#if 0
|
||||
if (eno != 0) {
|
||||
@@ -997,7 +997,7 @@ ssize_t rtems_ftp_read(
|
||||
}
|
||||
else {
|
||||
eno = rtems_ftp_get_message(fsp,&msg_tmp);
|
||||
fsp->eof_reached = TRUE;
|
||||
fsp->eof_reached = true;
|
||||
if ((eno == 0) &&
|
||||
(msg_tmp != FTP_REPLY_TFERCMPL)) {
|
||||
eno = EIO;
|
||||
|
||||
Reference in New Issue
Block a user