From 11672356e7f870033e27f934c57a5d48d061991e Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Mon, 1 Sep 2008 11:28:56 +0000 Subject: Convert to using "bool". --- cpukit/libmisc/serdbg/serdbg.c | 4 ++-- cpukit/libmisc/serdbg/serdbg.h | 5 +++-- cpukit/libmisc/serdbg/serdbgcnf.h | 4 ++-- cpukit/libmisc/serdbg/serdbgio.c | 12 ++++++------ cpukit/libmisc/serdbg/termios_printk.c | 10 +++++----- 5 files changed, 18 insertions(+), 17 deletions(-) (limited to 'cpukit/libmisc/serdbg') diff --git a/cpukit/libmisc/serdbg/serdbg.c b/cpukit/libmisc/serdbg/serdbg.c index ace431aab9..2f9abf6824 100644 --- a/cpukit/libmisc/serdbg/serdbg.c +++ b/cpukit/libmisc/serdbg/serdbg.c @@ -50,14 +50,14 @@ int serdbg_init_dbg | rtems_status_code | \*=========================================================================*/ { - static boolean is_initialized = FALSE; + static bool is_initialized = false; rtems_status_code rc = RTEMS_SUCCESSFUL; if (is_initialized) { return RTEMS_SUCCESSFUL; } - is_initialized = TRUE; + is_initialized = true; /* * try to open serial device */ diff --git a/cpukit/libmisc/serdbg/serdbg.h b/cpukit/libmisc/serdbg/serdbg.h index 8057ee3ae4..375b03b5d5 100644 --- a/cpukit/libmisc/serdbg/serdbg.h +++ b/cpukit/libmisc/serdbg/serdbg.h @@ -28,12 +28,13 @@ #ifdef __cplusplus extern "C" { #endif + typedef struct { uint32_t baudrate; /* debug baud rate, e.g. 57600 */ void (*callout)(void); /* callout pointer during polling */ - int (*open_io)(const char *dev_name,uint32_t baudrate); /* I/O open fnc */ + int (*open_io)(const char *dev_name, uint32_t baudrate); /* I/O open fnc */ const char *devname; /* debug device, e.g. "/dev/tty01" */ - uint8_t skip_init_bkpt; /* if TRUE, do not stop when initializing */ + bool skip_init_bkpt; /* if TRUE, do not stop when initializing */ } serdbg_conf_t; /* diff --git a/cpukit/libmisc/serdbg/serdbgcnf.h b/cpukit/libmisc/serdbg/serdbgcnf.h index 278fdf0db2..3820f61f8a 100644 --- a/cpukit/libmisc/serdbg/serdbgcnf.h +++ b/cpukit/libmisc/serdbg/serdbgcnf.h @@ -65,9 +65,9 @@ serdbg_conf_t serdbg_conf = { CONFIGURE_SERDBG_DEVNAME, #ifdef CONFIGURE_SERDBG_SKIP_INIT_BKPT - TRUE, + true, #else - FALSE, + false, #endif }; diff --git a/cpukit/libmisc/serdbg/serdbgio.c b/cpukit/libmisc/serdbg/serdbgio.c index 494a2fab0b..6ab5b3c716 100644 --- a/cpukit/libmisc/serdbg/serdbgio.c +++ b/cpukit/libmisc/serdbg/serdbgio.c @@ -67,7 +67,7 @@ int serdbg_open | 0 on success, -1 and errno otherwise | \*=========================================================================*/ { - boolean err_occurred = FALSE; + bool err_occurred = false; rtems_libio_t *iop = NULL; struct termios act_termios; tcflag_t baudcode = B0; @@ -99,7 +99,7 @@ int serdbg_open case 115200: baudcode = B115200; break; case 230400: baudcode = B230400; break; case 460800: baudcode = B460800; break; - default : err_occurred = TRUE; errno = EINVAL; break; + default : err_occurred = true; errno = EINVAL; break; } /* @@ -113,12 +113,12 @@ int serdbg_open do { serdbg_fd = open(dev_name,O_RDWR); if (serdbg_fd < 0) { - err_occurred = TRUE; + err_occurred = true; } else { if (serdbg_fd < 3) { if (fd_store_used >= FD_STORE_CNT) { - err_occurred = TRUE; + err_occurred = true; } else { fd_store[fd_store_used++] = serdbg_fd; @@ -153,7 +153,7 @@ int serdbg_open */ if (!err_occurred && (0 != tcgetattr(serdbg_fd,&act_termios))) { - err_occurred = TRUE; + err_occurred = true; } if (!err_occurred) { act_termios.c_iflag @@ -169,7 +169,7 @@ int serdbg_open cfsetispeed(&act_termios,baudcode); if (0 != tcsetattr(serdbg_fd,TCSANOW,&act_termios)) { - err_occurred = TRUE; + err_occurred = true; } } return (err_occurred diff --git a/cpukit/libmisc/serdbg/termios_printk.c b/cpukit/libmisc/serdbg/termios_printk.c index 6e31bbcfd0..2b1f0cb0bd 100644 --- a/cpukit/libmisc/serdbg/termios_printk.c +++ b/cpukit/libmisc/serdbg/termios_printk.c @@ -152,7 +152,7 @@ int termios_printk_open | 0 on success, -1 and errno otherwise | \*=========================================================================*/ { - boolean err_occurred = FALSE; + bool err_occurred = false; rtems_libio_t *iop = NULL; struct termios act_termios; tcflag_t baudcode = B0; @@ -186,7 +186,7 @@ int termios_printk_open case 115200: baudcode = B115200; break; case 230400: baudcode = B230400; break; case 460800: baudcode = B460800; break; - default : err_occurred = TRUE; errno = EINVAL; break; + default : err_occurred = true; errno = EINVAL; break; } /* * open device for serdbg operation @@ -196,7 +196,7 @@ int termios_printk_open (dev_name[0] != '\0')) { termios_printk_fd = open(dev_name,O_RDWR); if (termios_printk_fd < 0) { - err_occurred = TRUE; + err_occurred = true; } } /* @@ -216,7 +216,7 @@ int termios_printk_open */ if (!err_occurred && (0 != tcgetattr(termios_printk_fd,&act_termios))) { - err_occurred = TRUE; + err_occurred = true; } if (!err_occurred) { @@ -224,7 +224,7 @@ int termios_printk_open cfsetispeed(&act_termios,baudcode); if (0 != tcsetattr(termios_printk_fd,TCSANOW,&act_termios)) { - err_occurred = TRUE; + err_occurred = true; } } if (!err_occurred) { -- cgit v1.2.3