summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorYork Sun <yorksun@freescale.com>2013-04-01 11:29:11 -0700
committerTom Rini <trini@ti.com>2013-04-01 16:33:52 -0400
commit472d546054dadacca91530bad42ad06f6408124e (patch)
tree3acfccea2d15c21f12651a852d31452d33ea98e0 /common
parent5644369450635fa5c2967bee55b1ac41f6e988d0 (diff)
downloadu-boot-imx-472d546054dadacca91530bad42ad06f6408124e.zip
u-boot-imx-472d546054dadacca91530bad42ad06f6408124e.tar.gz
u-boot-imx-472d546054dadacca91530bad42ad06f6408124e.tar.bz2
Consolidate bool type
'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'common')
-rw-r--r--common/bedbug.c75
-rw-r--r--common/cmd_bedbug.c4
-rw-r--r--common/cmd_fdc.c117
-rw-r--r--common/cmd_scsi.c18
-rw-r--r--common/dlmalloc.c2
-rw-r--r--common/dlmalloc.src2
6 files changed, 107 insertions, 111 deletions
diff --git a/common/bedbug.c b/common/bedbug.c
index 60109cf..42ecf61 100644
--- a/common/bedbug.c
+++ b/common/bedbug.c
@@ -72,7 +72,7 @@ int downstring __P ((char *));
* F_INSTR - output raw instruction.
* F_LINENO - show line # info if available.
*
- * Returns TRUE if the area was successfully disassembled or FALSE if
+ * Returns true if the area was successfully disassembled or false if
* a problem was encountered with accessing the memory.
*/
@@ -137,8 +137,8 @@ int disppc (unsigned char *memaddr, unsigned char *virtual, int num_instr,
for (i = 0; i < num_instr; ++i, memaddr += 4, ctx.virtual += 4) {
#ifdef USE_SOURCE_CODE
if (ctx.flags & F_LINENO) {
- if ((line_info_from_addr ((Elf32_Word) ctx.virtual, filename,
- funcname, &line_no) == TRUE) &&
+ if ((line_info_from_addr ((Elf32_Word) ctx.virtual,
+ filename, funcname, &line_no) == true) &&
((line_no != last_line_no) ||
(strcmp (last_funcname, funcname) != 0))) {
print_source_line (filename, funcname, line_no, pfunc);
@@ -154,15 +154,15 @@ int disppc (unsigned char *memaddr, unsigned char *virtual, int num_instr,
#ifdef USE_SOURCE_CODE
if (ctx.flags & F_SYMBOL) {
if ((symname =
- symbol_name_from_addr ((Elf32_Word) ctx.virtual,
- TRUE, 0)) != 0) {
+ symbol_name_from_addr((Elf32_Word) ctx.virtual,
+ true, 0)) != 0) {
cursym = symname;
symoffset = 0;
} else {
if ((cursym == 0) &&
((symname =
- symbol_name_from_addr ((Elf32_Word) ctx.virtual,
- FALSE, &symoffset)) != 0)) {
+ symbol_name_from_addr((Elf32_Word) ctx.virtual,
+ false, &symoffset)) != 0)) {
cursym = symname;
} else {
symoffset += 4;
@@ -205,7 +205,8 @@ int disppc (unsigned char *memaddr, unsigned char *virtual, int num_instr,
}
if (((ctx.flags & F_SIMPLE) == 0) ||
- (ctx.op->hfunc == 0) || ((*ctx.op->hfunc) (&ctx) == FALSE)) {
+ (ctx.op->hfunc == 0) ||
+ ((*ctx.op->hfunc) (&ctx) == false)) {
sprintf (&ctx.data[ctx.datalen], "%-7s ", ctx.op->name);
ctx.datalen += 8;
print_operands (&ctx);
@@ -214,7 +215,7 @@ int disppc (unsigned char *memaddr, unsigned char *virtual, int num_instr,
(*pfunc) (ctx.data);
}
- return TRUE;
+ return true;
} /* disppc */
@@ -364,10 +365,10 @@ int print_operands (struct ppc_ctx *ctx)
* value The address of an unsigned long to be filled in
* with the value of the operand if it is found. This
* will only be filled in if the function returns
- * TRUE. This may be passed as 0 if the value is
+ * true. This may be passed as 0 if the value is
* not required.
*
- * Returns TRUE if the operand was found or FALSE if it was not.
+ * Returns true if the operand was found or false if it was not.
*/
int get_operand_value (struct opcode *op, unsigned long instr,
@@ -379,7 +380,7 @@ int get_operand_value (struct opcode *op, unsigned long instr,
/*------------------------------------------------------------*/
if (field > n_operands) {
- return FALSE; /* bad operand ?! */
+ return false; /* bad operand ?! */
}
/* Walk through the operands and list each in order */
@@ -393,10 +394,10 @@ int get_operand_value (struct opcode *op, unsigned long instr,
if (value) {
*value = (instr >> opr->shift) & ((1 << opr->bits) - 1);
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
} /* operand_value */
@@ -649,7 +650,7 @@ int tbr_value (char *name)
* Arguments:
* ctx A pointer to the disassembler context record.
*
- * Returns TRUE if the simpler form was printed or FALSE if it was not.
+ * Returns true if the simpler form was printed or false if it was not.
*/
int handle_bc (struct ppc_ctx *ctx)
@@ -669,33 +670,33 @@ int handle_bc (struct ppc_ctx *ctx)
/*------------------------------------------------------------*/
- if (get_operand_value (ctx->op, ctx->instr, O_BO, &bo) == FALSE)
- return FALSE;
+ if (get_operand_value(ctx->op, ctx->instr, O_BO, &bo) == false)
+ return false;
- if (get_operand_value (ctx->op, ctx->instr, O_BI, &bi) == FALSE)
- return FALSE;
+ if (get_operand_value(ctx->op, ctx->instr, O_BI, &bi) == false)
+ return false;
if ((bo == 12) && (bi == 0)) {
ctx->op = &blt;
sprintf (&ctx->data[ctx->datalen], "%-7s ", ctx->op->name);
ctx->datalen += 8;
print_operands (ctx);
- return TRUE;
+ return true;
} else if ((bo == 4) && (bi == 10)) {
ctx->op = &bne;
sprintf (&ctx->data[ctx->datalen], "%-7s ", ctx->op->name);
ctx->datalen += 8;
print_operands (ctx);
- return TRUE;
+ return true;
} else if ((bo == 16) && (bi == 0)) {
ctx->op = &bdnz;
sprintf (&ctx->data[ctx->datalen], "%-7s ", ctx->op->name);
ctx->datalen += 8;
print_operands (ctx);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
} /* handle_blt */
@@ -719,7 +720,7 @@ int handle_bc (struct ppc_ctx *ctx)
* pfunc The address of a function to call to print the output.
*
*
- * Returns TRUE if it was able to output the line info, or false if it was
+ * Returns true if it was able to output the line info, or false if it was
* not.
*/
@@ -734,7 +735,7 @@ int print_source_line (char *filename, char *funcname,
sprintf (out_buf, "%s %s(): line %d", filename, funcname, line_no);
(*pfunc) (out_buf);
- return TRUE;
+ return true;
} /* print_source_line */
@@ -1039,14 +1040,14 @@ int downstring (char *s)
* Arguments:
* nextaddr The address (to be filled in) of the next
* instruction to execute. This will only be a valid
- * address if TRUE is returned.
+ * address if true is returned.
*
* step_over A flag indicating how to compute addresses for
* branch statements:
- * TRUE = Step over the branch (next)
- * FALSE = step into the branch (step)
+ * true = Step over the branch (next)
+ * false = step into the branch (step)
*
- * Returns TRUE if it was able to compute the address. Returns FALSE if
+ * Returns true if it was able to compute the address. Returns false if
* it has a problem reading the current instruction or one of the registers.
*/
@@ -1075,7 +1076,7 @@ int find_next_address (unsigned char *nextaddr, int step_over,
if (nextaddr == 0 || regs == 0) {
printf ("find_next_address: bad args");
- return FALSE;
+ return false;
}
pc = regs->nip & 0xfffffffc;
@@ -1083,7 +1084,7 @@ int find_next_address (unsigned char *nextaddr, int step_over,
if ((op = find_opcode (instr)) == (struct opcode *) 0) {
printf ("find_next_address: can't parse opcode 0x%lx", instr);
- return FALSE;
+ return false;
}
ctr = regs->ctr;
@@ -1100,7 +1101,7 @@ int find_next_address (unsigned char *nextaddr, int step_over,
!get_operand_value (op, instr, O_BI, &bi) ||
!get_operand_value (op, instr, O_AA, &aa) ||
!get_operand_value (op, instr, O_LK, &lk))
- return FALSE;
+ return false;
if ((addr & (1 << 13)) != 0)
addr = addr - (1 << 14);
@@ -1116,7 +1117,7 @@ int find_next_address (unsigned char *nextaddr, int step_over,
if (!get_operand_value (op, instr, O_LI, &addr) ||
!get_operand_value (op, instr, O_AA, &aa) ||
!get_operand_value (op, instr, O_LK, &lk))
- return FALSE;
+ return false;
if ((addr & (1 << 23)) != 0)
addr = addr - (1 << 24);
@@ -1130,7 +1131,7 @@ int find_next_address (unsigned char *nextaddr, int step_over,
if (!get_operand_value (op, instr, O_BO, &bo) ||
!get_operand_value (op, instr, O_BI, &bi) ||
!get_operand_value (op, instr, O_LK, &lk))
- return FALSE;
+ return false;
addr = ctr;
aa = 1;
@@ -1143,7 +1144,7 @@ int find_next_address (unsigned char *nextaddr, int step_over,
if (!get_operand_value (op, instr, O_BO, &bo) ||
!get_operand_value (op, instr, O_BI, &bi) ||
!get_operand_value (op, instr, O_LK, &lk))
- return FALSE;
+ return false;
addr = lr;
aa = 1;
@@ -1227,12 +1228,12 @@ int find_next_address (unsigned char *nextaddr, int step_over,
step = next = pc + 4;
}
- if (step_over == TRUE)
+ if (step_over == true)
*(unsigned long *) nextaddr = next;
else
*(unsigned long *) nextaddr = step;
- return TRUE;
+ return true;
} /* find_next_address */
diff --git a/common/cmd_bedbug.c b/common/cmd_bedbug.c
index 9791423..77b6e3e 100644
--- a/common/cmd_bedbug.c
+++ b/common/cmd_bedbug.c
@@ -292,7 +292,7 @@ int do_bedbug_step (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
return 1;
}
- if (!find_next_address ((unsigned char *) &addr, FALSE, bug_ctx.regs))
+ if (!find_next_address((unsigned char *) &addr, false, bug_ctx.regs))
return 1;
if (bug_ctx.set)
@@ -323,7 +323,7 @@ int do_bedbug_next (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
return 1;
}
- if (!find_next_address ((unsigned char *) &addr, TRUE, bug_ctx.regs))
+ if (!find_next_address((unsigned char *) &addr, true, bug_ctx.regs))
return 1;
if (bug_ctx.set)
diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c
index 66e0ef0..dfa3690 100644
--- a/common/cmd_fdc.c
+++ b/common/cmd_fdc.c
@@ -39,13 +39,6 @@
#define PRINTF(fmt,args...)
#endif
-#ifndef TRUE
-#define TRUE 1
-#endif
-#ifndef FALSE
-#define FALSE 0
-#endif
-
/*#if defined(CONFIG_CMD_DATE) */
/*#include <rtc.h> */
/*#endif */
@@ -214,9 +207,9 @@ int wait_for_fdc_int(void)
timeout--;
udelay(10);
if(timeout==0) /* timeout occured */
- return FALSE;
+ return false;
}
- return TRUE;
+ return true;
}
/* reads a byte from the FIFO of the FDC and checks direction and RQM bit
@@ -244,7 +237,7 @@ int fdc_need_more_output(void)
c=(unsigned char)read_fdc_byte();
printf("Error: more output: %x\n",c);
}
- return TRUE;
+ return true;
}
@@ -260,10 +253,10 @@ int write_fdc_byte(unsigned char val)
udelay(10);
fdc_need_more_output();
if(timeout==0) /* timeout occured */
- return FALSE;
+ return false;
}
write_fdc_reg(FDC_FIFO,val);
- return TRUE;
+ return true;
}
/* sets up all FDC commands and issues it to the FDC. If
@@ -344,9 +337,9 @@ int fdc_issue_cmd(FDC_COMMAND_STRUCT *pCMD,FD_GEO_STRUCT *pFG)
}
for(i=0;i<pCMD->cmdlen;i++) {
/* PRINTF("write cmd%d = 0x%02X\n",i,pCMD->cmd[i]); */
- if(write_fdc_byte(pCMD->cmd[i])==FALSE) {
+ if (write_fdc_byte(pCMD->cmd[i]) == false) {
PRINTF("Error: timeout while issue cmd%d\n",i);
- return FALSE;
+ return false;
}
}
timeout=FDC_TIME_OUT;
@@ -355,12 +348,12 @@ int fdc_issue_cmd(FDC_COMMAND_STRUCT *pCMD,FD_GEO_STRUCT *pFG)
timeout--;
if(timeout==0) {
PRINTF(" timeout while reading result%d MSR=0x%02X\n",i,read_fdc_reg(FDC_MSR));
- return FALSE;
+ return false;
}
}
pCMD->result[i]=(unsigned char)read_fdc_byte();
}
- return TRUE;
+ return true;
}
/* selects the drive assigned in the cmd structur and
@@ -391,9 +384,10 @@ void stop_fdc_drive(FDC_COMMAND_STRUCT *pCMD)
int fdc_recalibrate(FDC_COMMAND_STRUCT *pCMD,FD_GEO_STRUCT *pFG)
{
pCMD->cmd[COMMAND]=FDC_CMD_RECALIBRATE;
- if(fdc_issue_cmd(pCMD,pFG)==FALSE)
- return FALSE;
- while(wait_for_fdc_int()!=TRUE);
+ if (fdc_issue_cmd(pCMD, pFG) == false)
+ return false;
+ while (wait_for_fdc_int() != true);
+
pCMD->cmd[COMMAND]=FDC_CMD_SENSE_INT;
return(fdc_issue_cmd(pCMD,pFG));
}
@@ -403,9 +397,10 @@ int fdc_recalibrate(FDC_COMMAND_STRUCT *pCMD,FD_GEO_STRUCT *pFG)
int fdc_seek(FDC_COMMAND_STRUCT *pCMD,FD_GEO_STRUCT *pFG)
{
pCMD->cmd[COMMAND]=FDC_CMD_SEEK;
- if(fdc_issue_cmd(pCMD,pFG)==FALSE)
- return FALSE;
- while(wait_for_fdc_int()!=TRUE);
+ if (fdc_issue_cmd(pCMD, pFG) == false)
+ return false;
+ while (wait_for_fdc_int() != true);
+
pCMD->cmd[COMMAND]=FDC_CMD_SENSE_INT;
return(fdc_issue_cmd(pCMD,pFG));
}
@@ -421,7 +416,7 @@ int fdc_terminate(FDC_COMMAND_STRUCT *pCMD)
for(i=0;i<7;i++) {
pCMD->result[i]=(unsigned char)read_fdc_byte();
}
- return TRUE;
+ return true;
}
/* reads data from FDC, seek commands are issued automatic */
@@ -440,18 +435,18 @@ int fdc_read_data(unsigned char *buffer, unsigned long blocks,FDC_COMMAND_STRUCT
retriesrw=0;
retriescal=0;
offset=0;
- if(fdc_seek(pCMD,pFG)==FALSE) {
+ if (fdc_seek(pCMD, pFG) == false) {
stop_fdc_drive(pCMD);
if (flags)
enable_interrupts();
- return FALSE;
+ return false;
}
if((pCMD->result[STATUS_0]&0x20)!=0x20) {
printf("Seek error Status: %02X\n",pCMD->result[STATUS_0]);
stop_fdc_drive(pCMD);
if (flags)
enable_interrupts();
- return FALSE;
+ return false;
}
/* now determine the next seek point */
/* lastblk=pCMD->blnr + blocks; */
@@ -466,11 +461,11 @@ int fdc_read_data(unsigned char *buffer, unsigned long blocks,FDC_COMMAND_STRUCT
retryrw:
len=sect_size * readblk;
pCMD->cmd[COMMAND]=FDC_CMD_READ;
- if(fdc_issue_cmd(pCMD,pFG)==FALSE) {
+ if (fdc_issue_cmd(pCMD, pFG) == false) {
stop_fdc_drive(pCMD);
if (flags)
enable_interrupts();
- return FALSE;
+ return false;
}
for (i=0;i<len;i++) {
timeout=FDC_TIME_OUT;
@@ -492,15 +487,15 @@ retryrw:
stop_fdc_drive(pCMD);
if (flags)
enable_interrupts();
- return FALSE;
+ return false;
}
else {
PRINTF(" trying to recalibrate Try %d\n",retriescal);
- if(fdc_recalibrate(pCMD,pFG)==FALSE) {
+ if (fdc_recalibrate(pCMD, pFG) == false) {
stop_fdc_drive(pCMD);
if (flags)
enable_interrupts();
- return FALSE;
+ return false;
}
retriesrw=0;
goto retrycal;
@@ -512,7 +507,7 @@ retryrw:
} /* else >FDC_RW_RETRIES */
}/* if output */
timeout--;
- }while(TRUE);
+ } while (true);
} /* for len */
/* the last sector of a track or all data has been read,
* we need to get the results */
@@ -530,22 +525,22 @@ retryrw:
readblk=blocks;
retrycal:
/* a seek is necessary */
- if(fdc_seek(pCMD,pFG)==FALSE) {
+ if (fdc_seek(pCMD, pFG) == false) {
stop_fdc_drive(pCMD);
if (flags)
enable_interrupts();
- return FALSE;
+ return false;
}
if((pCMD->result[STATUS_0]&0x20)!=0x20) {
PRINTF("Seek error Status: %02X\n",pCMD->result[STATUS_0]);
stop_fdc_drive(pCMD);
- return FALSE;
+ return false;
}
- }while(TRUE); /* start over */
+ } while (true); /* start over */
stop_fdc_drive(pCMD); /* switch off drive */
if (flags)
enable_interrupts();
- return TRUE;
+ return true;
}
/* Scan all drives and check if drive is present and disk is inserted */
@@ -559,20 +554,20 @@ int fdc_check_drive(FDC_COMMAND_STRUCT *pCMD, FD_GEO_STRUCT *pFG)
pCMD->drive=drives;
select_fdc_drive(pCMD);
pCMD->blnr=0; /* set to the 1st block */
- if(fdc_recalibrate(pCMD,pFG)==FALSE)
+ if (fdc_recalibrate(pCMD, pFG) == false)
continue;
if((pCMD->result[STATUS_0]&0x10)==0x10)
continue;
/* ok drive connected check for disk */
state|=(1<<drives);
pCMD->blnr=pFG->size; /* set to the last block */
- if(fdc_seek(pCMD,pFG)==FALSE)
+ if (fdc_seek(pCMD, pFG) == false)
continue;
pCMD->blnr=0; /* set to the 1st block */
- if(fdc_recalibrate(pCMD,pFG)==FALSE)
+ if (fdc_recalibrate(pCMD, pFG) == false)
continue;
pCMD->cmd[COMMAND]=FDC_CMD_READ_ID;
- if(fdc_issue_cmd(pCMD,pFG)==FALSE)
+ if (fdc_issue_cmd(pCMD, pFG) == false)
continue;
state|=(0x10<<drives);
}
@@ -584,7 +579,7 @@ int fdc_check_drive(FDC_COMMAND_STRUCT *pCMD, FD_GEO_STRUCT *pFG)
((state&(0x10<<i))==(0x10<<i)) ? pFG->name : "");
}
pCMD->flags=state;
- return TRUE;
+ return true;
}
@@ -611,9 +606,9 @@ int fdc_setup(int drive, FDC_COMMAND_STRUCT *pCMD, FD_GEO_STRUCT *pFG)
write_fdc_reg(FDC_CCR,pFG->rate);
/* then initialize the DSR */
write_fdc_reg(FDC_DSR,pFG->rate);
- if(wait_for_fdc_int()==FALSE) {
+ if (wait_for_fdc_int() == false) {
PRINTF("Time Out after writing CCR\n");
- return FALSE;
+ return false;
}
/* now issue sense Interrupt and status command
* assuming only one drive present (drive 0) */
@@ -621,7 +616,7 @@ int fdc_setup(int drive, FDC_COMMAND_STRUCT *pCMD, FD_GEO_STRUCT *pFG)
for(i=0;i<4;i++) {
/* issue sense interrupt for all 4 possible drives */
pCMD->cmd[COMMAND]=FDC_CMD_SENSE_INT;
- if(fdc_issue_cmd(pCMD,pFG)==FALSE) {
+ if (fdc_issue_cmd(pCMD, pFG) == false) {
PRINTF("Sense Interrupt for drive %d failed\n",i);
}
}
@@ -629,24 +624,24 @@ int fdc_setup(int drive, FDC_COMMAND_STRUCT *pCMD, FD_GEO_STRUCT *pFG)
pCMD->drive=drive;
select_fdc_drive(pCMD);
pCMD->cmd[COMMAND]=FDC_CMD_CONFIGURE;
- if(fdc_issue_cmd(pCMD,pFG)==FALSE) {
+ if (fdc_issue_cmd(pCMD, pFG) == false) {
PRINTF(" configure timeout\n");
stop_fdc_drive(pCMD);
- return FALSE;
+ return false;
}
/* issue specify command */
pCMD->cmd[COMMAND]=FDC_CMD_SPECIFY;
- if(fdc_issue_cmd(pCMD,pFG)==FALSE) {
+ if (fdc_issue_cmd(pCMD, pFG) == false) {
PRINTF(" specify timeout\n");
stop_fdc_drive(pCMD);
- return FALSE;
+ return false;
}
/* then, we clear the reset in the DOR */
/* fdc_check_drive(pCMD,pFG); */
/* write_fdc_reg(FDC_DOR,0x04); */
- return TRUE;
+ return true;
}
#if defined(CONFIG_CMD_FDOS)
@@ -664,30 +659,30 @@ int fdc_fdos_init (int drive)
FDC_COMMAND_STRUCT *pCMD = &cmd;
/* setup FDC and scan for drives */
- if(fdc_setup(drive,pCMD,pFG)==FALSE) {
+ if (fdc_setup(drive, pCMD, pFG) == false) {
printf("\n** Error in setup FDC **\n");
- return FALSE;
+ return false;
}
- if(fdc_check_drive(pCMD,pFG)==FALSE) {
+ if (fdc_check_drive(pCMD, pFG) == false) {
printf("\n** Error in check_drives **\n");
- return FALSE;
+ return false;
}
if((pCMD->flags&(1<<drive))==0) {
/* drive not available */
printf("\n** Drive %d not available **\n",drive);
- return FALSE;
+ return false;
}
if((pCMD->flags&(0x10<<drive))==0) {
/* no disk inserted */
printf("\n** No disk inserted in drive %d **\n",drive);
- return FALSE;
+ return false;
}
/* ok, we have a valid source */
pCMD->drive=drive;
/* read first block */
pCMD->blnr=0;
- return TRUE;
+ return true;
}
/**************************************************************************
* int fdc_fdos_seek
@@ -747,11 +742,11 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
return CMD_RET_USAGE;
}
/* setup FDC and scan for drives */
- if(fdc_setup(boot_drive,pCMD,pFG)==FALSE) {
+ if (fdc_setup(boot_drive, pCMD, pFG) == false) {
printf("\n** Error in setup FDC **\n");
return 1;
}
- if(fdc_check_drive(pCMD,pFG)==FALSE) {
+ if (fdc_check_drive(pCMD, pFG) == false) {
printf("\n** Error in check_drives **\n");
return 1;
}
@@ -769,7 +764,7 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
pCMD->drive=boot_drive;
/* read first block */
pCMD->blnr=0;
- if(fdc_read_data((unsigned char *)addr,1,pCMD,pFG)==FALSE) {
+ if (fdc_read_data((unsigned char *)addr, 1, pCMD, pFG) == false) {
printf("\nRead error:");
for(i=0;i<7;i++)
printf("result%d: 0x%02X\n",i,pCMD->result[i]);
@@ -801,7 +796,7 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
nrofblk++;
printf("Loading %ld Bytes (%d blocks) at 0x%08lx..\n",imsize,nrofblk,addr);
pCMD->blnr=0;
- if(fdc_read_data((unsigned char *)addr,nrofblk,pCMD,pFG)==FALSE) {
+ if (fdc_read_data((unsigned char *)addr, nrofblk, pCMD, pFG) == false) {
/* read image block */
printf("\nRead error:");
for(i=0;i<7;i++)
diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c
index 266bfa6..13b3d99 100644
--- a/common/cmd_scsi.c
+++ b/common/cmd_scsi.c
@@ -110,7 +110,7 @@ void scsi_scan(int mode)
scsi_dev_desc[i].vendor[0]=0;
scsi_dev_desc[i].product[0]=0;
scsi_dev_desc[i].revision[0]=0;
- scsi_dev_desc[i].removable=FALSE;
+ scsi_dev_desc[i].removable = false;
scsi_dev_desc[i].if_type=IF_TYPE_SCSI;
scsi_dev_desc[i].dev=i;
scsi_dev_desc[i].part_type=PART_TYPE_UNKNOWN;
@@ -125,7 +125,7 @@ void scsi_scan(int mode)
pccb->pdata=(unsigned char *)&tempbuff;
pccb->datalen=512;
scsi_setup_inquiry(pccb);
- if(scsi_exec(pccb)!=TRUE) {
+ if (scsi_exec(pccb) != true) {
if(pccb->contr_stat==SCSI_SEL_TIME_OUT) {
debug ("Selection timeout ID %d\n",pccb->target);
continue; /* selection timeout => assuming no device present */
@@ -139,7 +139,7 @@ void scsi_scan(int mode)
continue; /* skip unknown devices */
}
if((modi&0x80)==0x80) /* drive is removable */
- scsi_dev_desc[scsi_max_devs].removable=TRUE;
+ scsi_dev_desc[scsi_max_devs].removable=true;
/* get info for this device */
scsi_ident_cpy((unsigned char *)&scsi_dev_desc[scsi_max_devs].vendor[0],
&tempbuff[8], 8);
@@ -152,8 +152,8 @@ void scsi_scan(int mode)
pccb->datalen=0;
scsi_setup_test_unit_ready(pccb);
- if(scsi_exec(pccb)!=TRUE) {
- if(scsi_dev_desc[scsi_max_devs].removable==TRUE) {
+ if (scsi_exec(pccb) != true) {
+ if (scsi_dev_desc[scsi_max_devs].removable == true) {
scsi_dev_desc[scsi_max_devs].type=perq;
goto removable;
}
@@ -404,7 +404,7 @@ static ulong scsi_read(int device, ulong blknr, lbaint_t blkcnt, void *buffer)
debug("scsi_read_ext: startblk " LBAF
", blccnt %x buffer %lx\n",
start, smallblks, buf_addr);
- if(scsi_exec(pccb)!=TRUE) {
+ if (scsi_exec(pccb) != true) {
scsi_print_error(pccb);
blkcnt-=blks;
break;
@@ -458,7 +458,7 @@ static ulong scsi_write(int device, ulong blknr,
}
debug("%s: startblk " LBAF ", blccnt %x buffer %lx\n",
__func__, start, smallblks, buf_addr);
- if (scsi_exec(pccb) != TRUE) {
+ if (scsi_exec(pccb) != true) {
scsi_print_error(pccb);
blkcnt -= blks;
break;
@@ -521,7 +521,7 @@ int scsi_read_capacity(ccb *pccb, lbaint_t *capacity, unsigned long *blksz)
pccb->msgout[0] = SCSI_IDENTIFY; /* NOT USED */
pccb->datalen = 8;
- if (scsi_exec(pccb) != TRUE)
+ if (scsi_exec(pccb) != true)
return 1;
*capacity = ((lbaint_t)pccb->pdata[0] << 24) |
@@ -547,7 +547,7 @@ int scsi_read_capacity(ccb *pccb, lbaint_t *capacity, unsigned long *blksz)
pccb->msgout[0] = SCSI_IDENTIFY; /* NOT USED */
pccb->datalen = 16;
- if (scsi_exec(pccb) != TRUE)
+ if (scsi_exec(pccb) != true)
return 1;
*capacity = ((uint64_t)pccb->pdata[0] << 56) |
diff --git a/common/dlmalloc.c b/common/dlmalloc.c
index 2a9d169..3c70d5d 100644
--- a/common/dlmalloc.c
+++ b/common/dlmalloc.c
@@ -201,7 +201,7 @@
MORECORE_FAILURE (default: -1)
The value returned upon failure of MORECORE.
MORECORE_CLEARS (default 1)
- True (1) if the routine mapped to MORECORE zeroes out memory (which
+ true (1) if the routine mapped to MORECORE zeroes out memory (which
holds for sbrk).
DEFAULT_TRIM_THRESHOLD
DEFAULT_TOP_PAD
diff --git a/common/dlmalloc.src b/common/dlmalloc.src
index 32a38bc..d86acff 100644
--- a/common/dlmalloc.src
+++ b/common/dlmalloc.src
@@ -198,7 +198,7 @@
MORECORE_FAILURE (default: -1)
The value returned upon failure of MORECORE.
MORECORE_CLEARS (default 1)
- True (1) if the routine mapped to MORECORE zeroes out memory (which
+ true (1) if the routine mapped to MORECORE zeroes out memory (which
holds for sbrk).
DEFAULT_TRIM_THRESHOLD
DEFAULT_TOP_PAD