Browse Source

fix 3afirewall rename wd1 code when no cfcard and ide on board.

Change-Id: I7a1c708506aaaafed2a3d6d917cd58c46eb21688
Signed-off-by: QiaoChong <qiaochong@loongson.cn>
master
QiaoChong 9 years ago
committed by Chong Qiao
parent
commit
ae838912db
  1. 13
      Targets/Bonito3a780e/Bonito/tgt_machdep_firewall.c

13
Targets/Bonito3a780e/Bonito/tgt_machdep_firewall.c

@ -440,12 +440,15 @@ void tgt_devconfig(void)
extern struct cfdriver wd_cd;
int i;
cd = &wd_cd;
dv0 = (struct device *)(cd->cd_devs[0]);
dv1 = (struct device *)(cd->cd_devs[1]);
if(!dv0 && dv1)
if(cd->cd_ndevs)
{
printf("no cfcard, so rename %s to wd0\n", dv1->dv_xname);
strcpy(dv1->dv_xname,"wd0");
dv0 = (struct device *)(cd->cd_devs[0]);
dv1 = (struct device *)(cd->cd_devs[1]);
if(!dv0 && dv1)
{
printf("no cfcard, so rename %s to wd0\n", dv1->dv_xname);
strcpy(dv1->dv_xname,"wd0");
}
}
}
#if NMOD_VGACON >0

Loading…
Cancel
Save