summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/libmisc/capture/capture-cli.c118
-rw-r--r--cpukit/libmisc/capture/capture.c46
-rw-r--r--cpukit/libmisc/capture/capture.h14
-rw-r--r--cpukit/libmisc/serdbg/serdbg.c4
-rw-r--r--cpukit/libmisc/serdbg/serdbg.h5
-rw-r--r--cpukit/libmisc/serdbg/serdbgcnf.h4
-rw-r--r--cpukit/libmisc/serdbg/serdbgio.c12
-rw-r--r--cpukit/libmisc/serdbg/termios_printk.c10
-rw-r--r--cpukit/libmisc/shell/main_logoff.c2
-rw-r--r--cpukit/libmisc/shell/shell.c35
-rw-r--r--cpukit/libmisc/shell/shell.h6
11 files changed, 129 insertions, 127 deletions
diff --git a/cpukit/libmisc/capture/capture-cli.c b/cpukit/libmisc/capture/capture-cli.c
index d65bdb8dc5..bd659f283f 100644
--- a/cpukit/libmisc/capture/capture-cli.c
+++ b/cpukit/libmisc/capture/capture-cli.c
@@ -66,10 +66,10 @@ static void
rtems_capture_cli_open (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
uint32_t size = 0;
- rtems_boolean enable = 0;
+ bool enable = false;
rtems_status_code sc;
int arg;
@@ -84,7 +84,7 @@ rtems_capture_cli_open (int argc,
if (argv[arg][0] == '-')
{
if (argv[arg][1] == 'i')
- enable = 1;
+ enable = true;
else
fprintf (stdout, "warning: option -%c ignored\n", argv[arg][1]);
}
@@ -137,7 +137,7 @@ static void
rtems_capture_cli_close (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
@@ -165,7 +165,7 @@ static void
rtems_capture_cli_enable (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
@@ -193,7 +193,7 @@ static void
rtems_capture_cli_disable (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
@@ -221,7 +221,7 @@ static void
rtems_capture_cli_task_list (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_task_priority ceiling = rtems_capture_watch_get_ceiling ();
rtems_task_priority floor = rtems_capture_watch_get_floor ();
@@ -460,7 +460,7 @@ static void
rtems_capture_cli_task_load (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
rtems_task_priority priority;
@@ -533,7 +533,7 @@ static void
rtems_capture_cli_watch_list (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_capture_control_t* control = rtems_capture_get_control_list ();
rtems_task_priority ceiling = rtems_capture_watch_get_ceiling ();
@@ -619,10 +619,10 @@ rtems_capture_cli_watch_list (int argc,
*
*/
-static rtems_boolean
+static bool
rtems_capture_cli_get_name_id (char* arg,
- rtems_boolean* valid_name,
- rtems_boolean* valid_id,
+ bool* valid_name,
+ bool* valid_id,
rtems_name* name,
rtems_id* id)
{
@@ -648,7 +648,7 @@ rtems_capture_cli_get_name_id (char* arg,
if (i == l)
{
*id = strtoul (arg, 0, 16);
- *valid_id = 1;
+ *valid_id = true;
}
else
{
@@ -663,7 +663,7 @@ rtems_capture_cli_get_name_id (char* arg,
rname = rtems_build_name(arg[0], arg[1], arg[2], arg[3]);
*name = rname;
- *valid_name = 1;
+ *valid_name = true;
}
return 1;
@@ -685,14 +685,14 @@ static void
rtems_capture_cli_watch_add (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
int arg;
rtems_name name = 0;
rtems_id id = 0;
- rtems_boolean valid_name = 0;
- rtems_boolean valid_id = 0;
+ bool valid_name = false;
+ bool valid_id = false;
if (argc <= 1)
{
@@ -748,14 +748,14 @@ static void
rtems_capture_cli_watch_del (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
int arg;
rtems_name name = 0;
rtems_id id = 0;
- rtems_boolean valid_name = 0;
- rtems_boolean valid_id = 0;
+ bool valid_name = false;
+ bool valid_id = false;
if (argc <= 1)
{
@@ -810,15 +810,15 @@ static void
rtems_capture_cli_watch_control (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
int arg;
rtems_name name = 0;
rtems_id id = 0;
- rtems_boolean valid_name = 0;
- rtems_boolean valid_id = 0;
- rtems_boolean enable = 0;
+ bool valid_name = false;
+ bool valid_id = false;
+ bool enable = false;
if (argc <= 2)
{
@@ -835,9 +835,9 @@ rtems_capture_cli_watch_control (int argc,
else
{
if (strcmp (argv[arg], "on") == 0)
- enable = 1;
+ enable = true;
else if (strcmp (argv[arg], "off") == 0)
- enable = 0;
+ enable = false;
else if (!rtems_capture_cli_get_name_id (argv[arg], &valid_name,
&valid_id, &name, &id))
return;
@@ -877,11 +877,11 @@ static void
rtems_capture_cli_watch_global (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
int arg;
- rtems_boolean enable = 0;
+ bool enable = false;
if (argc <= 1)
{
@@ -898,9 +898,9 @@ rtems_capture_cli_watch_global (int argc,
else
{
if (strcmp (argv[arg], "on") == 0)
- enable = 1;
+ enable = true;
else if (strcmp (argv[arg], "off") == 0)
- enable = 0;
+ enable = false;
}
}
@@ -931,7 +931,7 @@ static void
rtems_capture_cli_watch_ceiling (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
int arg;
@@ -982,7 +982,7 @@ static void
rtems_capture_cli_watch_floor (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
int arg;
@@ -1082,20 +1082,20 @@ rtems_capture_cli_trigger_worker (int set, int argc, char** argv)
int arg;
int trigger = 0; /* switch */
rtems_capture_trigger_mode_t trigger_mode = rtems_capture_from_any;
- rtems_boolean trigger_set = 0;
- rtems_boolean is_from = 0;
+ bool trigger_set = false;
+ bool is_from = false;
rtems_name name = 0;
rtems_id id = 0;
- rtems_boolean valid_name = 0;
- rtems_boolean valid_id = 0;
+ bool valid_name = false;
+ bool valid_id = false;
rtems_name from_name = 0;
rtems_id from_id = 0;
- rtems_boolean from_valid_name = 0;
- rtems_boolean from_valid_id = 0;
+ bool from_valid_name = false;
+ bool from_valid_id = false;
rtems_name to_name = 0;
rtems_id to_id = 0;
- rtems_boolean to_valid_name = 0;
- rtems_boolean to_valid_id = 0;
+ bool to_valid_name = false;
+ bool to_valid_id = false;
for (arg = 1; arg < argc; arg++)
{
@@ -1116,18 +1116,18 @@ rtems_capture_cli_trigger_worker (int set, int argc, char** argv)
{
if (!trigger_set)
{
- rtems_boolean found = 0;
- int t;
+ bool found = false;
+ int t;
for (t = 0; t < RTEMS_CAPTURE_CLI_TRIGGERS_NUM; t++)
if (strcmp (argv[arg], rtems_capture_cli_triggers[t].name) == 0)
{
trigger = t;
- found = 1;
+ found = true;
break;
}
- trigger_set = 1;
+ trigger_set = true;
/*
* If a trigger was not found assume the default and
@@ -1156,7 +1156,7 @@ rtems_capture_cli_trigger_worker (int set, int argc, char** argv)
{
if (!from_valid_name && !from_valid_id)
{
- from_valid_name = 1;
+ from_valid_name = true;
from_name = name;
}
else
@@ -1164,7 +1164,7 @@ rtems_capture_cli_trigger_worker (int set, int argc, char** argv)
}
else if (!to_valid_name && !to_valid_id)
{
- to_valid_name = 1;
+ to_valid_name = true;
to_name = name;
}
else
@@ -1177,7 +1177,7 @@ rtems_capture_cli_trigger_worker (int set, int argc, char** argv)
{
if (!from_valid_name && !from_valid_id)
{
- from_valid_id = 1;
+ from_valid_id = true;
from_id = id;
}
else
@@ -1185,7 +1185,7 @@ rtems_capture_cli_trigger_worker (int set, int argc, char** argv)
}
else if (!to_valid_name && !to_valid_id)
{
- to_valid_id = 1;
+ to_valid_id = true;
to_id = id;
}
else
@@ -1260,7 +1260,7 @@ static void
rtems_capture_cli_trigger_set (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_capture_cli_trigger_worker (1, argc, argv);
}
@@ -1278,7 +1278,7 @@ static void
rtems_capture_cli_trigger_clear (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_capture_cli_trigger_worker (0, argc, argv);
}
@@ -1296,10 +1296,10 @@ static void
rtems_capture_cli_trace_records (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
- rtems_boolean csv = 0;
+ bool csv = false;
static int dump_total = 22;
int total;
int count;
@@ -1312,14 +1312,14 @@ rtems_capture_cli_trace_records (int argc,
if (argv[arg][0] == '-')
{
if (argv[arg][1] == 'c')
- csv = 1;
+ csv = true;
else
fprintf (stdout, "warning: option -%c ignored\n", argv[arg][1]);
}
else
{
- int i;
- int l;
+ size_t i;
+ size_t l;
l = strlen (argv[arg]);
@@ -1427,10 +1427,10 @@ static void
rtems_capture_cli_flush (int argc,
char** argv,
rtems_monitor_command_arg_t* command_arg,
- boolean verbose)
+ bool verbose)
{
rtems_status_code sc;
- rtems_boolean prime = 1;
+ bool prime = true;
int arg;
for (arg = 1; arg < argc; arg++)
@@ -1438,7 +1438,7 @@ rtems_capture_cli_flush (int argc,
if (argv[arg][0] == '-')
{
if (argv[arg][1] == 'n')
- prime = 0;
+ prime = false;
else
fprintf (stdout, "warning: option -%c ignored\n", argv[arg][1]);
}
@@ -1609,7 +1609,7 @@ static rtems_monitor_command_entry_t rtems_capture_cli_cmds[] =
rtems_status_code
rtems_capture_cli_init (rtems_capture_timestamp timestamp)
{
- int cmd;
+ size_t cmd;
capture_timestamp = timestamp;
diff --git a/cpukit/libmisc/capture/capture.c b/cpukit/libmisc/capture/capture.c
index 5086ae2fec..15d84927e0 100644
--- a/cpukit/libmisc/capture/capture.c
+++ b/cpukit/libmisc/capture/capture.c
@@ -138,7 +138,7 @@ static inline void rtems_capture_get_time (uint32_t* ticks,
* in RTEMS.
*
*/
-static inline rtems_boolean
+static inline bool
rtems_capture_match_names (rtems_name lhs, rtems_name rhs)
{
return lhs == rhs;
@@ -154,7 +154,7 @@ rtems_capture_match_names (rtems_name lhs, rtems_name rhs)
* in RTEMS.
*
*/
-static inline rtems_boolean
+static inline bool
rtems_capture_match_ids (rtems_id lhs, rtems_id rhs)
{
return lhs == rhs;
@@ -167,7 +167,7 @@ rtems_capture_match_ids (rtems_id lhs, rtems_id rhs)
*
* This function matches a name and/or id.
*/
-static inline rtems_boolean
+static inline bool
rtems_capture_match_name_id (rtems_name lhs_name,
rtems_id lhs_id,
rtems_name rhs_name,
@@ -212,7 +212,7 @@ rtems_capture_dup_name (rtems_name* dst, rtems_name src)
* tasks is the number of bits in uint32_t.
*
*/
-static inline rtems_boolean
+static inline bool
rtems_capture_by_in_to (uint32_t events,
rtems_capture_task_t* by,
rtems_capture_control_t* to)
@@ -582,7 +582,7 @@ rtems_capture_record (rtems_capture_task_t* task,
* See if we have triggered and if not see if this event is a
* cause of a trigger.
*/
-rtems_boolean
+bool
rtems_capture_trigger (rtems_capture_task_t* ft,
rtems_capture_task_t* tt,
uint32_t events)
@@ -655,7 +655,7 @@ rtems_capture_trigger (rtems_capture_task_t* ft,
* This function is called when a task is created.
*
*/
-static rtems_boolean
+static bool
rtems_capture_create_task (rtems_tcb* current_task,
rtems_tcb* new_task)
{
@@ -1146,7 +1146,7 @@ rtems_capture_close (void)
* This function allows control of tracing at a global level.
*/
rtems_status_code
-rtems_capture_control (rtems_boolean enable)
+rtems_capture_control (bool enable)
{
rtems_interrupt_level level;
@@ -1178,7 +1178,7 @@ rtems_capture_control (rtems_boolean enable)
* to profile the load on a system.
*/
rtems_status_code
-rtems_capture_monitor (rtems_boolean enable)
+rtems_capture_monitor (bool enable)
{
rtems_interrupt_level level;
@@ -1209,7 +1209,7 @@ rtems_capture_monitor (rtems_boolean enable)
* capture engine to also be primed again.
*/
rtems_status_code
-rtems_capture_flush (rtems_boolean prime)
+rtems_capture_flush (bool prime)
{
rtems_interrupt_level level;
rtems_capture_task_t* task;
@@ -1293,7 +1293,7 @@ rtems_capture_watch_del (rtems_name name, rtems_id id)
rtems_capture_control_t* control;
rtems_capture_control_t** prev_control;
rtems_capture_task_t* task;
- rtems_boolean found = 0;
+ bool found = false;
/*
* Should this test be for wildcards ?
@@ -1318,7 +1318,7 @@ rtems_capture_watch_del (rtems_name name, rtems_id id)
control = *prev_control;
- found = 1;
+ found = true;
}
else
{
@@ -1342,11 +1342,11 @@ rtems_capture_watch_del (rtems_name name, rtems_id id)
* disabled.
*/
rtems_status_code
-rtems_capture_watch_ctrl (rtems_name name, rtems_id id, rtems_boolean enable)
+rtems_capture_watch_ctrl (rtems_name name, rtems_id id, bool enable)
{
rtems_interrupt_level level;
rtems_capture_control_t* control;
- rtems_boolean found = 0;
+ bool found = false;
/*
* Find the control and then set the watch. It must exist before it can
@@ -1365,7 +1365,7 @@ rtems_capture_watch_ctrl (rtems_name name, rtems_id id, rtems_boolean enable)
rtems_interrupt_enable (level);
- found = 1;
+ found = true;
}
}
@@ -1385,7 +1385,7 @@ rtems_capture_watch_ctrl (rtems_name name, rtems_id id, rtems_boolean enable)
* the floor to be traced.
*/
rtems_status_code
-rtems_capture_watch_global (rtems_boolean enable)
+rtems_capture_watch_global (bool enable)
{
rtems_interrupt_level level;
@@ -1412,7 +1412,7 @@ rtems_capture_watch_global (rtems_boolean enable)
*
* This function returns the global watch state.
*/
-rtems_boolean
+bool
rtems_capture_watch_global_on (void)
{
return capture_flags & RTEMS_CAPTURE_GLOBAL_WATCH ? 1 : 0;
@@ -1564,8 +1564,8 @@ rtems_capture_set_trigger (rtems_name from_name,
control->to_triggers |= flags;
else
{
- rtems_boolean done = 0;
- int i;
+ bool done = false;
+ int i;
control->by_triggers |= flags;
@@ -1576,7 +1576,7 @@ rtems_capture_set_trigger (rtems_name from_name,
(from_id && (control->by[i].id == from_id))))
{
control->by[i].trigger |= flags;
- done = 1;
+ done = true;
break;
}
}
@@ -1591,7 +1591,7 @@ rtems_capture_set_trigger (rtems_name from_name,
control->by[i].name = from_name;
control->by[i].id = from_id;
control->by[i].trigger = flags;
- done = 1;
+ done = true;
break;
}
}
@@ -1648,8 +1648,8 @@ rtems_capture_clear_trigger (rtems_name from_name,
control->to_triggers &= ~flags;
else
{
- rtems_boolean done = 0;
- int i;
+ bool done = false;
+ int i;
control->by_triggers &= ~flags;
@@ -1662,7 +1662,7 @@ rtems_capture_clear_trigger (rtems_name from_name,
control->by[i].trigger &= ~trigger;
if (control->by[i].trigger == 0)
control->by_valid &= ~RTEMS_CAPTURE_CONTROL_FROM_MASK (i);
- done = 1;
+ done = true;
break;
}
}
diff --git a/cpukit/libmisc/capture/capture.h b/cpukit/libmisc/capture/capture.h
index 29441e4d70..acc5fcd912 100644
--- a/cpukit/libmisc/capture/capture.h
+++ b/cpukit/libmisc/capture/capture.h
@@ -286,7 +286,7 @@ rtems_capture_close (void);
* This function allows control of tracing at a global level.
*/
rtems_status_code
-rtems_capture_control (rtems_boolean enable);
+rtems_capture_control (bool enable);
/**
* rtems_capture_monitor
@@ -298,7 +298,7 @@ rtems_capture_control (rtems_boolean enable);
* to profile the load on a system.
*/
rtems_status_code
-rtems_capture_monitor (rtems_boolean enable);
+rtems_capture_monitor (bool enable);
/*
* rtems_capture_flush
@@ -309,7 +309,7 @@ rtems_capture_monitor (rtems_boolean enable);
* capture engine to also be primed again.
*/
rtems_status_code
-rtems_capture_flush (rtems_boolean prime);
+rtems_capture_flush (bool prime);
/**
* rtems_capture_watch_add
@@ -347,7 +347,7 @@ rtems_capture_watch_del (rtems_name name, rtems_id id);
rtems_status_code
rtems_capture_watch_ctrl (rtems_name name,
rtems_id id,
- rtems_boolean enable);
+ bool enable);
/**
* rtems_capture_watch_global
@@ -359,7 +359,7 @@ rtems_capture_watch_ctrl (rtems_name name,
* the ceiling and above the floor to be traced.
*/
rtems_status_code
-rtems_capture_watch_global (rtems_boolean enable);
+rtems_capture_watch_global (bool enable);
/**
* rtems_capture_watch_global_on
@@ -368,7 +368,7 @@ rtems_capture_watch_global (rtems_boolean enable);
*
* This function returns the global watch state.
*/
-rtems_boolean
+bool
rtems_capture_watch_global_on (void);
/**
@@ -570,7 +570,7 @@ rtems_capture_next_task (rtems_capture_task_t* task)
* This function returns true if the task control block points to
* a valid task.
*/
-static inline rtems_boolean
+static inline bool
rtems_capture_task_valid (rtems_capture_task_t* task)
{
return task->tcb != NULL;
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) {
diff --git a/cpukit/libmisc/shell/main_logoff.c b/cpukit/libmisc/shell/main_logoff.c
index f19df02725..036aa37581 100644
--- a/cpukit/libmisc/shell/main_logoff.c
+++ b/cpukit/libmisc/shell/main_logoff.c
@@ -29,7 +29,7 @@ int rtems_shell_main_logoff(
{
printf("logoff from the system...");
- rtems_current_shell_env->exit_shell = TRUE;
+ rtems_current_shell_env->exit_shell = true;
return 0;
}
diff --git a/cpukit/libmisc/shell/shell.c b/cpukit/libmisc/shell/shell.c
index f341764beb..bbcbfb9d3d 100644
--- a/cpukit/libmisc/shell/shell.c
+++ b/cpukit/libmisc/shell/shell.c
@@ -446,13 +446,14 @@ int rtems_shell_scanline(
* TODO: Redirection. Tty Signals. ENVVARs. Shell language.
* ----------------------------------------------- */
-void rtems_shell_init_issue(void) {
- static char issue_inited=FALSE;
+void rtems_shell_init_issue(void)
+{
+ static bool issue_inited=false;
struct stat buf;
if (issue_inited)
return;
- issue_inited = TRUE;
+ issue_inited = true;
/* dummy call to init /etc dir */
getpwnam("root");
@@ -657,7 +658,7 @@ rtems_task rtems_shell_task(rtems_task_argument task_argument)
#define RTEMS_SHELL_CMD_COUNT (32)
#define RTEMS_SHELL_PROMPT_SIZE (128)
-rtems_boolean rtems_shell_main_loop(
+bool rtems_shell_main_loop(
rtems_shell_env_t *shell_env_arg
)
{
@@ -673,8 +674,8 @@ rtems_boolean rtems_shell_main_loop(
char *cmd_argv;
int argc;
char *argv[RTEMS_SHELL_MAXIMUM_ARGUMENTS];
- rtems_boolean result = TRUE;
- rtems_boolean input_file = FALSE;
+ bool result = true;
+ bool input_file = true;
int line = 0;
FILE *stdinToClose = NULL;
FILE *stdoutToClose = NULL;
@@ -698,7 +699,7 @@ rtems_boolean rtems_shell_main_loop(
);
if (sc != RTEMS_SUCCESSFUL) {
rtems_error(sc,"rtems_task_variable_add(current_shell_env):");
- return FALSE;
+ return false;
}
setuid(0);
@@ -723,7 +724,7 @@ rtems_boolean rtems_shell_main_loop(
if (!output) {
fprintf(stderr, "shell: open output %s failed: %s\n",
shell_env_arg->output, strerror(errno));
- return FALSE;
+ return false;
}
stdout = output;
stdoutToClose = output;
@@ -735,12 +736,12 @@ rtems_boolean rtems_shell_main_loop(
if (!input) {
fprintf(stderr, "shell: open input %s failed: %s\n",
shell_env_arg->input, strerror(errno));
- return FALSE;
+ return false;
}
stdin = input;
stdinToClose = input;
- shell_env->forever = FALSE;
- input_file = TRUE;
+ shell_env->forever = false;
+ input_file =true;
}
else {
/* make a raw terminal,Linux Manuals */
@@ -796,7 +797,7 @@ rtems_boolean rtems_shell_main_loop(
sc = rtems_libio_set_private_env();
if (sc != RTEMS_SUCCESSFUL) {
rtems_error(sc,"rtems_libio_set_private_env():");
- result = FALSE;
+ result = false;
break;
}
@@ -806,10 +807,10 @@ rtems_boolean rtems_shell_main_loop(
* keep on trucking.
*/
if ( input_file ) {
- result = TRUE;
+ result = true;
} else {
- if (rtems_shell_login(stdin,stdout)) result = FALSE;
- else result = TRUE;
+ if (rtems_shell_login(stdin,stdout)) result = false;
+ else result = true;
}
if (result) {
@@ -828,7 +829,7 @@ rtems_boolean rtems_shell_main_loop(
else
chdir("/"); /* XXX: chdir to getpwent homedir */
- shell_env->exit_shell = FALSE;
+ shell_env->exit_shell = false;
for (;;) {
int cmd;
@@ -981,7 +982,7 @@ static rtems_status_code rtems_shell_run (
}
shell_env->devname = devname;
shell_env->taskname = task_name;
- shell_env->exit_shell = FALSE;
+ shell_env->exit_shell = false;
shell_env->forever = forever;
shell_env->echo = echo;
shell_env->input = strdup (input);
diff --git a/cpukit/libmisc/shell/shell.h b/cpukit/libmisc/shell/shell.h
index 904d4e0bd9..5509b365bc 100644
--- a/cpukit/libmisc/shell/shell.h
+++ b/cpukit/libmisc/shell/shell.h
@@ -181,8 +181,8 @@ typedef struct {
char *devname;
char *taskname;
/* user extensions */
- int exit_shell; /* logout */
- int forever ; /* repeat login */
+ bool exit_shell; /* logout */
+ bool forever ; /* repeat login */
int errorlevel;
int echo;
char cwd[256];
@@ -192,7 +192,7 @@ typedef struct {
rtems_id wake_on_end;
} rtems_shell_env_t;
-rtems_boolean rtems_shell_main_loop(
+bool rtems_shell_main_loop(
rtems_shell_env_t *rtems_shell_env
);