forked from Imagelibrary/rtems
Use "bool" instead of "rtems_boolean|boolean".
This commit is contained in:
@@ -18,13 +18,13 @@
|
||||
#ifndef _RTEMS_DOSFS_H
|
||||
#define _RTEMS_DOSFS_H
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/libio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/libio.h>
|
||||
|
||||
extern rtems_filesystem_operations_table msdos_ops;
|
||||
|
||||
#define MSDOS_FMT_FATANY 0
|
||||
@@ -44,7 +44,7 @@ typedef struct {
|
||||
uint32_t files_per_root_dir; /* request value: file entries in root */
|
||||
uint8_t fattype; /* request value: MSDOS_FMT_FAT12/16/32 */
|
||||
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 */
|
||||
/* make sector number of first sector */
|
||||
/* of first cluster divisible by this */
|
||||
|
||||
@@ -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;
|
||||
uint8_t i;
|
||||
rtems_boolean sec_of_fat;
|
||||
bool sec_of_fat;
|
||||
|
||||
|
||||
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;
|
||||
uint8_t i;
|
||||
rtems_boolean sec_of_fat;
|
||||
bool sec_of_fat;
|
||||
|
||||
if (fs_info->c.state == FAT_CACHE_EMPTY)
|
||||
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;
|
||||
uint32_t j = 0;
|
||||
rtems_boolean resrc_unsuff = FALSE;
|
||||
bool resrc_unsuff = false;
|
||||
|
||||
while (!resrc_unsuff)
|
||||
{
|
||||
@@ -745,10 +745,10 @@ fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
|
||||
if (fs_info->uino != NULL)
|
||||
fs_info->index = fs_info->uino_pool_size;
|
||||
else
|
||||
resrc_unsuff = TRUE;
|
||||
resrc_unsuff = true;
|
||||
}
|
||||
else
|
||||
resrc_unsuff = TRUE;
|
||||
resrc_unsuff = true;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -782,9 +782,9 @@ fat_free_unique_ino(
|
||||
* ino - ino to be tested
|
||||
*
|
||||
* 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(
|
||||
rtems_filesystem_mount_table_entry_t *mt_entry,
|
||||
uint32_t ino
|
||||
|
||||
@@ -17,10 +17,6 @@
|
||||
#ifndef __DOSFS_FAT_H__
|
||||
#define __DOSFS_FAT_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <rtems/seterr.h>
|
||||
@@ -29,6 +25,10 @@ extern "C" {
|
||||
#include <errno.h>
|
||||
#include <rtems/bdbuf.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#ifndef RC_OK
|
||||
#define RC_OK 0
|
||||
#endif
|
||||
@@ -328,7 +328,7 @@ typedef struct fat_vol_s
|
||||
typedef struct fat_cache_s
|
||||
{
|
||||
uint32_t blk_num;
|
||||
rtems_boolean modified;
|
||||
bool modified;
|
||||
uint8_t state;
|
||||
rtems_bdbuf_buffer *buf;
|
||||
} fat_cache_t;
|
||||
@@ -413,7 +413,7 @@ fat_cluster_num_to_sector512_num(
|
||||
static inline void
|
||||
fat_buf_mark_modified(fat_fs_info_t *fs_info)
|
||||
{
|
||||
fs_info->c.modified = TRUE;
|
||||
fs_info->c.modified = true;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -465,7 +465,7 @@ fat_shutdown_drive(rtems_filesystem_mount_table_entry_t *mt_entry);
|
||||
uint32_t
|
||||
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,
|
||||
uint32_t ino);
|
||||
|
||||
|
||||
@@ -15,16 +15,16 @@
|
||||
#ifndef __DOSFS_MSDOS_H__
|
||||
#define __DOSFS_MSDOS_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <rtems.h>
|
||||
#include <rtems/libio_.h>
|
||||
|
||||
#include "fat.h"
|
||||
#include "fat_file.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define MSDOS_NAME_NOT_FOUND_ERR 0x7D01
|
||||
|
||||
/*
|
||||
@@ -382,7 +382,7 @@ int msdos_set_dir_wrt_time_and_date(
|
||||
int msdos_dir_is_empty(
|
||||
rtems_filesystem_mount_table_entry_t *mt_entry,
|
||||
fat_file_fd_t *fat_fd,
|
||||
rtems_boolean *ret_val
|
||||
bool *ret_val
|
||||
);
|
||||
|
||||
int msdos_find_name_in_fat_file(
|
||||
|
||||
@@ -490,7 +490,7 @@ msdos_dir_rmnod(rtems_filesystem_location_info_t *pathloc)
|
||||
rtems_status_code sc = RTEMS_SUCCESSFUL;
|
||||
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
|
||||
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,
|
||||
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
|
||||
|
||||
@@ -266,7 +266,7 @@ msdos_eval4make(
|
||||
int i = 0;
|
||||
int len;
|
||||
char token[ MSDOS_NAME_MAX + 1 ];
|
||||
rtems_boolean done = 0;
|
||||
bool done = false;
|
||||
|
||||
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
|
||||
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
|
||||
@@ -374,7 +374,7 @@ msdos_eval4make(
|
||||
goto error;
|
||||
}
|
||||
else
|
||||
done = TRUE;
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ typedef struct {
|
||||
uint8_t fattype;
|
||||
char OEMName[FAT_BR_OEMNAME_SIZE+1];
|
||||
char VolLabel[FAT_BR_VOLLAB_SIZE+1];
|
||||
boolean VolLabel_present;
|
||||
bool VolLabel_present;
|
||||
uint32_t vol_id;
|
||||
} msdos_format_param_t;
|
||||
|
||||
@@ -217,8 +217,8 @@ static int msdos_format_eval_sectors_per_cluster
|
||||
\*=========================================================================*/
|
||||
{
|
||||
|
||||
boolean finished = FALSE;
|
||||
int ret_val = 0;
|
||||
bool finished = false;
|
||||
int ret_val = 0;
|
||||
uint32_t fatdata_cluster_cnt;
|
||||
uint32_t fat_capacity;
|
||||
uint32_t sectors_per_fat;
|
||||
@@ -264,7 +264,7 @@ static int msdos_format_eval_sectors_per_cluster
|
||||
sectors_per_cluster *= 2;
|
||||
}
|
||||
else {
|
||||
finished = TRUE;
|
||||
finished = true;
|
||||
}
|
||||
/*
|
||||
* 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)
|
||||
> MS_BYTES_PER_CLUSTER_LIMIT) {
|
||||
ret_val = EINVAL;
|
||||
finished = TRUE;
|
||||
finished = true;
|
||||
}
|
||||
} while (!finished);
|
||||
|
||||
@@ -583,7 +583,7 @@ static int msdos_format_determine_fmt_params
|
||||
if ((rqdata != NULL) &&
|
||||
(rqdata->VolLabel != NULL)) {
|
||||
from = rqdata->VolLabel;
|
||||
fmt_params->VolLabel_present = TRUE;
|
||||
fmt_params->VolLabel_present = true;
|
||||
}
|
||||
for (cnt = 0;
|
||||
cnt < (sizeof(fmt_params->VolLabel)-1);
|
||||
|
||||
@@ -689,7 +689,7 @@ int
|
||||
msdos_dir_is_empty(
|
||||
rtems_filesystem_mount_table_entry_t *mt_entry,
|
||||
fat_file_fd_t *fat_fd,
|
||||
rtems_boolean *ret_val
|
||||
bool *ret_val
|
||||
)
|
||||
{
|
||||
ssize_t ret = 0;
|
||||
@@ -697,7 +697,7 @@ msdos_dir_is_empty(
|
||||
uint32_t j = 0, i = 0;
|
||||
|
||||
/* 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,
|
||||
fs_info->fat.vol.bps,
|
||||
@@ -725,14 +725,14 @@ msdos_dir_is_empty(
|
||||
if ((*MSDOS_DIR_NAME(fs_info->cl_buf + i)) ==
|
||||
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
|
||||
{
|
||||
*ret_val = TRUE;
|
||||
*ret_val = true;
|
||||
return RC_OK;
|
||||
}
|
||||
return RC_OK;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
*ret_val = TRUE;
|
||||
*ret_val = true;
|
||||
return RC_OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ static int IMFS_determine_bytes_per_block(
|
||||
int default_bytes_per_block
|
||||
)
|
||||
{
|
||||
rtems_boolean is_valid = FALSE;
|
||||
bool is_valid = false;
|
||||
int bit_mask;
|
||||
/*
|
||||
* check, whether requested bytes per block is valid
|
||||
@@ -50,7 +50,7 @@ static int IMFS_determine_bytes_per_block(
|
||||
!is_valid && (bit_mask <= 512);
|
||||
bit_mask <<= 1) {
|
||||
if (bit_mask == requested_bytes_per_block) {
|
||||
is_valid = TRUE;
|
||||
is_valid = true;
|
||||
}
|
||||
}
|
||||
*dest_bytes_per_block = ((is_valid)
|
||||
|
||||
@@ -80,7 +80,7 @@ rtems_status_code rtems_io_lookup_name(
|
||||
int result;
|
||||
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;
|
||||
|
||||
if ( !loc.ops->node_type_h ) {
|
||||
|
||||
Reference in New Issue
Block a user