Use "bool" instead of "rtems_boolean|boolean".

This commit is contained in:
Ralf Corsepius
2008-09-04 08:33:06 +00:00
parent 88d1c65935
commit 0a896eb9ce
10 changed files with 39 additions and 39 deletions

View File

@@ -18,13 +18,13 @@
#ifndef _RTEMS_DOSFS_H #ifndef _RTEMS_DOSFS_H
#define _RTEMS_DOSFS_H #define _RTEMS_DOSFS_H
#include <rtems.h>
#include <rtems/libio.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
#include <rtems.h>
#include <rtems/libio.h>
extern rtems_filesystem_operations_table msdos_ops; extern rtems_filesystem_operations_table msdos_ops;
#define MSDOS_FMT_FATANY 0 #define MSDOS_FMT_FATANY 0
@@ -44,7 +44,7 @@ typedef struct {
uint32_t files_per_root_dir; /* request value: file entries in root */ uint32_t files_per_root_dir; /* request value: file entries in root */
uint8_t fattype; /* request value: MSDOS_FMT_FAT12/16/32 */ uint8_t fattype; /* request value: MSDOS_FMT_FAT12/16/32 */
uint8_t media; /* media code. default: 0xF8 */ uint8_t media; /* media code. default: 0xF8 */
boolean quick_format; /* TRUE: do not clear out data sectors */ bool quick_format; /* true: do not clear out data sectors */
uint32_t cluster_align; /* requested value: cluster alignment */ uint32_t cluster_align; /* requested value: cluster alignment */
/* make sector number of first sector */ /* make sector number of first sector */
/* of first cluster divisible by this */ /* of first cluster divisible by this */

View File

@@ -32,7 +32,7 @@ fat_buf_access(fat_fs_info_t *fs_info, uint32_t blk, int op_type,
{ {
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i; uint8_t i;
rtems_boolean sec_of_fat; bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY) if (fs_info->c.state == FAT_CACHE_EMPTY)
@@ -110,7 +110,7 @@ fat_buf_release(fat_fs_info_t *fs_info)
{ {
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i; uint8_t i;
rtems_boolean sec_of_fat; bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY) if (fs_info->c.state == FAT_CACHE_EMPTY)
return RC_OK; return RC_OK;
@@ -722,7 +722,7 @@ fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{ {
register fat_fs_info_t *fs_info = mt_entry->fs_info; register fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t j = 0; uint32_t j = 0;
rtems_boolean resrc_unsuff = FALSE; bool resrc_unsuff = false;
while (!resrc_unsuff) while (!resrc_unsuff)
{ {
@@ -745,10 +745,10 @@ fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
if (fs_info->uino != NULL) if (fs_info->uino != NULL)
fs_info->index = fs_info->uino_pool_size; fs_info->index = fs_info->uino_pool_size;
else else
resrc_unsuff = TRUE; resrc_unsuff = true;
} }
else else
resrc_unsuff = TRUE; resrc_unsuff = true;
} }
return 0; return 0;
} }
@@ -782,9 +782,9 @@ fat_free_unique_ino(
* ino - ino to be tested * ino - ino to be tested
* *
* RETURNS: * RETURNS:
* TRUE if ino is allocated from unique ino pool, FALSE otherwise * true if ino is allocated from unique ino pool, false otherwise
*/ */
inline rtems_boolean inline bool
fat_ino_is_unique( fat_ino_is_unique(
rtems_filesystem_mount_table_entry_t *mt_entry, rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino uint32_t ino

View File

@@ -17,10 +17,6 @@
#ifndef __DOSFS_FAT_H__ #ifndef __DOSFS_FAT_H__
#define __DOSFS_FAT_H__ #define __DOSFS_FAT_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <string.h> #include <string.h>
#include <rtems/seterr.h> #include <rtems/seterr.h>
@@ -29,6 +25,10 @@ extern "C" {
#include <errno.h> #include <errno.h>
#include <rtems/bdbuf.h> #include <rtems/bdbuf.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef RC_OK #ifndef RC_OK
#define RC_OK 0 #define RC_OK 0
#endif #endif
@@ -328,7 +328,7 @@ typedef struct fat_vol_s
typedef struct fat_cache_s typedef struct fat_cache_s
{ {
uint32_t blk_num; uint32_t blk_num;
rtems_boolean modified; bool modified;
uint8_t state; uint8_t state;
rtems_bdbuf_buffer *buf; rtems_bdbuf_buffer *buf;
} fat_cache_t; } fat_cache_t;
@@ -413,7 +413,7 @@ fat_cluster_num_to_sector512_num(
static inline void static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info) fat_buf_mark_modified(fat_fs_info_t *fs_info)
{ {
fs_info->c.modified = TRUE; fs_info->c.modified = true;
} }
int int
@@ -465,7 +465,7 @@ fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry);
uint32_t uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry); fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry);
rtems_boolean bool
fat_ino_is_unique(rtems_filesystem_mount_table_entry_t *mt_entry, fat_ino_is_unique(rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino); uint32_t ino);

View File

@@ -15,16 +15,16 @@
#ifndef __DOSFS_MSDOS_H__ #ifndef __DOSFS_MSDOS_H__
#define __DOSFS_MSDOS_H__ #define __DOSFS_MSDOS_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <rtems.h> #include <rtems.h>
#include <rtems/libio_.h> #include <rtems/libio_.h>
#include "fat.h" #include "fat.h"
#include "fat_file.h" #include "fat_file.h"
#ifdef __cplusplus
extern "C" {
#endif
#define MSDOS_NAME_NOT_FOUND_ERR 0x7D01 #define MSDOS_NAME_NOT_FOUND_ERR 0x7D01
/* /*
@@ -382,7 +382,7 @@ int msdos_set_dir_wrt_time_and_date(
int msdos_dir_is_empty( int msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry, rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd, fat_file_fd_t *fat_fd,
rtems_boolean *ret_val bool *ret_val
); );
int msdos_find_name_in_fat_file( int msdos_find_name_in_fat_file(

View File

@@ -490,7 +490,7 @@ msdos_dir_rmnod(rtems_filesystem_location_info_t *pathloc)
rtems_status_code sc = RTEMS_SUCCESSFUL; rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info; msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = pathloc->node_access; fat_file_fd_t *fat_fd = pathloc->node_access;
rtems_boolean is_empty = FALSE; bool is_empty = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT, sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT); MSDOS_VOLUME_SEMAPHORE_TIMEOUT);

View File

@@ -266,7 +266,7 @@ msdos_eval4make(
int i = 0; int i = 0;
int len; int len;
char token[ MSDOS_NAME_MAX + 1 ]; char token[ MSDOS_NAME_MAX + 1 ];
rtems_boolean done = 0; bool done = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT, sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
MSDOS_VOLUME_SEMAPHORE_TIMEOUT); MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
@@ -374,7 +374,7 @@ msdos_eval4make(
goto error; goto error;
} }
else else
done = TRUE; done = true;
} }
break; break;

View File

@@ -61,7 +61,7 @@ typedef struct {
uint8_t fattype; uint8_t fattype;
char OEMName[FAT_BR_OEMNAME_SIZE+1]; char OEMName[FAT_BR_OEMNAME_SIZE+1];
char VolLabel[FAT_BR_VOLLAB_SIZE+1]; char VolLabel[FAT_BR_VOLLAB_SIZE+1];
boolean VolLabel_present; bool VolLabel_present;
uint32_t vol_id; uint32_t vol_id;
} msdos_format_param_t; } msdos_format_param_t;
@@ -217,8 +217,8 @@ static int msdos_format_eval_sectors_per_cluster
\*=========================================================================*/ \*=========================================================================*/
{ {
boolean finished = FALSE; bool finished = false;
int ret_val = 0; int ret_val = 0;
uint32_t fatdata_cluster_cnt; uint32_t fatdata_cluster_cnt;
uint32_t fat_capacity; uint32_t fat_capacity;
uint32_t sectors_per_fat; uint32_t sectors_per_fat;
@@ -264,7 +264,7 @@ static int msdos_format_eval_sectors_per_cluster
sectors_per_cluster *= 2; sectors_per_cluster *= 2;
} }
else { else {
finished = TRUE; finished = true;
} }
/* /*
* when maximum cluster size is exceeded, we have invalid data, abort... * when maximum cluster size is exceeded, we have invalid data, abort...
@@ -272,7 +272,7 @@ static int msdos_format_eval_sectors_per_cluster
if ((sectors_per_cluster * bytes_per_sector) if ((sectors_per_cluster * bytes_per_sector)
> MS_BYTES_PER_CLUSTER_LIMIT) { > MS_BYTES_PER_CLUSTER_LIMIT) {
ret_val = EINVAL; ret_val = EINVAL;
finished = TRUE; finished = true;
} }
} while (!finished); } while (!finished);
@@ -583,7 +583,7 @@ static int msdos_format_determine_fmt_params
if ((rqdata != NULL) && if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) { (rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel; from = rqdata->VolLabel;
fmt_params->VolLabel_present = TRUE; fmt_params->VolLabel_present = true;
} }
for (cnt = 0; for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1); cnt < (sizeof(fmt_params->VolLabel)-1);

View File

@@ -689,7 +689,7 @@ int
msdos_dir_is_empty( msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry, rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd, fat_file_fd_t *fat_fd,
rtems_boolean *ret_val bool *ret_val
) )
{ {
ssize_t ret = 0; ssize_t ret = 0;
@@ -697,7 +697,7 @@ msdos_dir_is_empty(
uint32_t j = 0, i = 0; uint32_t j = 0, i = 0;
/* dir is not empty */ /* dir is not empty */
*ret_val = FALSE; *ret_val = false;
while ((ret = fat_file_read(mt_entry, fat_fd, j * fs_info->fat.vol.bps, while ((ret = fat_file_read(mt_entry, fat_fd, j * fs_info->fat.vol.bps,
fs_info->fat.vol.bps, fs_info->fat.vol.bps,
@@ -725,14 +725,14 @@ msdos_dir_is_empty(
if ((*MSDOS_DIR_NAME(fs_info->cl_buf + i)) == if ((*MSDOS_DIR_NAME(fs_info->cl_buf + i)) ==
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY) MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{ {
*ret_val = TRUE; *ret_val = true;
return RC_OK; return RC_OK;
} }
return RC_OK; return RC_OK;
} }
j++; j++;
} }
*ret_val = TRUE; *ret_val = true;
return RC_OK; return RC_OK;
} }

View File

@@ -41,7 +41,7 @@ static int IMFS_determine_bytes_per_block(
int default_bytes_per_block int default_bytes_per_block
) )
{ {
rtems_boolean is_valid = FALSE; bool is_valid = false;
int bit_mask; int bit_mask;
/* /*
* check, whether requested bytes per block is valid * check, whether requested bytes per block is valid
@@ -50,7 +50,7 @@ static int IMFS_determine_bytes_per_block(
!is_valid && (bit_mask <= 512); !is_valid && (bit_mask <= 512);
bit_mask <<= 1) { bit_mask <<= 1) {
if (bit_mask == requested_bytes_per_block) { if (bit_mask == requested_bytes_per_block) {
is_valid = TRUE; is_valid = true;
} }
} }
*dest_bytes_per_block = ((is_valid) *dest_bytes_per_block = ((is_valid)

View File

@@ -80,7 +80,7 @@ rtems_status_code rtems_io_lookup_name(
int result; int result;
rtems_filesystem_node_types_t node_type; rtems_filesystem_node_types_t node_type;
result = rtems_filesystem_evaluate_path( name, 0x00, &loc, TRUE ); result = rtems_filesystem_evaluate_path( name, 0x00, &loc, true );
the_jnode = loc.node_access; the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) { if ( !loc.ops->node_type_h ) {