From 6d0f6bcf337c5261c08fabe12982178c2c489d76 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Thu, 16 Oct 2008 15:01:15 +0200 Subject: rename CFG_ macros to CONFIG_SYS Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD --- common/cmd_scsi.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'common/cmd_scsi.c') diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c index f357465..066fd80 100644 --- a/common/cmd_scsi.c +++ b/common/cmd_scsi.c @@ -59,7 +59,7 @@ static int scsi_max_devs; /* number of highest available scsi device */ static int scsi_curr_dev; /* current device */ -static block_dev_desc_t scsi_dev_desc[CFG_SCSI_MAX_DEVICE]; +static block_dev_desc_t scsi_dev_desc[CONFIG_SYS_SCSI_MAX_DEVICE]; /******************************************************************************** * forward declerations of some Setup Routines @@ -88,7 +88,7 @@ void scsi_scan(int mode) if(mode==1) { printf("scanning bus for devices...\n"); } - for(i=0;itarget=i; - for(lun=0;lunlun=lun; pccb->pdata=(unsigned char *)&tempbuff; pccb->datalen=512; @@ -195,7 +195,7 @@ void scsi_init(void) block_dev_desc_t * scsi_get_dev(int dev) { - return (dev < CFG_SCSI_MAX_DEVICE) ? &scsi_dev_desc[dev] : NULL; + return (dev < CONFIG_SYS_SCSI_MAX_DEVICE) ? &scsi_dev_desc[dev] : NULL; } @@ -217,7 +217,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) switch (argc) { case 1: - addr = CFG_LOAD_ADDR; + addr = CONFIG_SYS_LOAD_ADDR; boot_device = getenv ("bootdevice"); break; case 2: @@ -356,7 +356,7 @@ int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } if (strncmp(argv[1],"inf",3) == 0) { int i; - for (i=0; i= CFG_SCSI_MAX_DEVICE)) { + if ((scsi_curr_dev < 0) || (scsi_curr_dev >= CONFIG_SYS_SCSI_MAX_DEVICE)) { printf("\nno SCSI devices available\n"); return 1; } @@ -379,7 +379,7 @@ int do_scsi (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) } if (strncmp(argv[1],"part",4) == 0) { int dev, ok; - for (ok=0, dev=0; dev= CFG_SCSI_MAX_DEVICE) { + if (dev >= CONFIG_SYS_SCSI_MAX_DEVICE) { printf("unknown device\n"); return 1; } -- cgit v1.1