memset(dev, 0, sizeof *dev);
- sprintf(dev->name, "Au1X00 ethernet");
+ strcpy(dev->name, "Au1X00 ethernet");
dev->iobase = 0;
dev->priv = 0;
dev->init = au1x00_init;
dev = (struct eth_device *) malloc(sizeof *dev);
memset(dev, 0, sizeof *dev);
- sprintf(dev->name, "SCC");
+ strcpy(dev->name, "SCC");
dev->init = sec_init;
dev->halt = sec_halt;
dev->send = sec_send;
/* for FEC1 make sure that the name of the interface is the same
as the old one for compatibility reasons */
if (i == 0) {
- sprintf (dev->name, "FEC");
+ strcpy(dev->name, "FEC");
} else {
sprintf (dev->name, "FEC%d",
ether_fcc_info[i].ether_index + 1);
dev = (struct eth_device*) malloc(sizeof *dev);
memset(dev, 0, sizeof *dev);
- sprintf(dev->name, "SCC");
+ strcpy(dev->name, "SCC");
dev->iobase = 0;
dev->priv = 0;
dev->init = scc_init;
U_BOOT_VERSION, U_BOOT_DATE, U_BOOT_TIME);
video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y, info);
- sprintf (info, "(C) 2002 DENX Software Engineering");
+ strcpy(info, "(C) 2002 DENX Software Engineering");
video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y + VIDEO_FONT_HEIGHT,
info);
- sprintf (info, " Wolfgang DENK, wd@denx.de");
+ strcpy(info, " Wolfgang DENK, wd@denx.de");
video_drawstring (VIDEO_INFO_X, VIDEO_INFO_Y + VIDEO_FONT_HEIGHT * 2,
info);
sizeof(f_link));
break;
case 0x98: /* XAUI interface */
- sprintf(alias, "phy_xaui_slot1");
+ strcpy(alias, "phy_xaui_slot1");
fdt_status_okay_by_alias(fdt, alias);
- sprintf(alias, "phy_xaui_slot2");
+ strcpy(alias, "phy_xaui_slot2");
fdt_status_okay_by_alias(fdt, alias);
break;
case 0x9e: /* XAUI interface */
case 0x9a:
case 0x93:
case 0x91:
- sprintf(alias, "phy_xaui_slot1");
+ strcpy(alias, "phy_xaui_slot1");
fdt_status_okay_by_alias(fdt, alias);
break;
case 0x97: /* XAUI interface */
case 0xc3:
- sprintf(alias, "phy_xaui_slot2");
+ strcpy(alias, "phy_xaui_slot2");
fdt_status_okay_by_alias(fdt, alias);
break;
default:
bus->read = hydra_mdio_read;
bus->write = hydra_mdio_write;
bus->reset = hydra_mdio_reset;
- sprintf(bus->name, fakebusname);
+ strcpy(bus->name, fakebusname);
hmdio->realbus = miiphy_get_dev_by_name(realbusname);
bus->read = super_hydra_mdio_read;
bus->write = super_hydra_mdio_write;
bus->reset = super_hydra_mdio_reset;
- sprintf(bus->name, fakebusname);
+ strcpy(bus->name, fakebusname);
hmdio->realbus = miiphy_get_dev_by_name(realbusname);
bus->read = ls1021a_mdio_read;
bus->write = ls1021a_mdio_write;
bus->reset = ls1021a_mdio_reset;
- sprintf(bus->name, fakebusname);
+ strcpy(bus->name, fakebusname);
lsmdio->realbus = miiphy_get_dev_by_name(realbusname);
bus->read = ls1043aqds_mdio_read;
bus->write = ls1043aqds_mdio_write;
bus->reset = ls1043aqds_mdio_reset;
- sprintf(bus->name, ls1043aqds_mdio_name_for_muxval(muxval));
+ strcpy(bus->name, ls1043aqds_mdio_name_for_muxval(muxval));
pmdio->realbus = miiphy_get_dev_by_name(realbusname);
bus->read = ls2080a_qds_mdio_read;
bus->write = ls2080a_qds_mdio_write;
bus->reset = ls2080a_qds_mdio_reset;
- sprintf(bus->name, ls2080a_qds_mdio_name_for_muxval(muxval));
+ strcpy(bus->name, ls2080a_qds_mdio_name_for_muxval(muxval));
pmdio->realbus = miiphy_get_dev_by_name(realbusname);
bus->read = t1024qds_mdio_read;
bus->write = t1024qds_mdio_write;
bus->reset = t1024qds_mdio_reset;
- sprintf(bus->name, t1024qds_mdio_name_for_muxval(muxval));
+ strcpy(bus->name, t1024qds_mdio_name_for_muxval(muxval));
pmdio->realbus = miiphy_get_dev_by_name(realbusname);
bus->read = t1040_qds_mdio_read;
bus->write = t1040_qds_mdio_write;
bus->reset = t1040_qds_mdio_reset;
- sprintf(bus->name, t1040_qds_mdio_name_for_muxval(muxval));
+ strcpy(bus->name, t1040_qds_mdio_name_for_muxval(muxval));
pmdio->realbus = miiphy_get_dev_by_name(realbusname);
bus->read = t208xqds_mdio_read;
bus->write = t208xqds_mdio_write;
bus->reset = t208xqds_mdio_reset;
- sprintf(bus->name, t208xqds_mdio_name_for_muxval(muxval));
+ strcpy(bus->name, t208xqds_mdio_name_for_muxval(muxval));
pmdio->realbus = miiphy_get_dev_by_name(realbusname);
bus->read = t4240qds_mdio_read;
bus->write = t4240qds_mdio_write;
bus->reset = t4240qds_mdio_reset;
- sprintf(bus->name, t4240qds_mdio_name_for_muxval(muxval));
+ strcpy(bus->name, t4240qds_mdio_name_for_muxval(muxval));
pmdio->realbus = miiphy_get_dev_by_name(realbusname);
bus->read = ihs_mdio_read;
bus->write = ihs_mdio_write;
bus->reset = ihs_mdio_reset;
- sprintf(bus->name, info->name);
+ strcpy(bus->name, info->name);
bus->priv = info;
printf("can't get the IVM_Boardid\n");
return 1;
}
- sprintf((char *)buf, "%s", p);
+ strcpy((char *)buf, p);
setenv("boardid", (char *)buf);
printf("set boardid=%s\n", buf);
printf("can't get the IVM_HWKey\n");
return 1;
}
- sprintf((char *)buf, "%s", p);
+ strcpy((char *)buf, p);
setenv("hwkey", (char *)buf);
printf("set hwkey=%s\n", buf);
printf("Execute manually saveenv for persistent storage.\n");
s=getenv ("serial#");
#ifdef CONFIG_PIP405
if (!s || strncmp (s, "PIP405", 6)) {
- sprintf(buf,"### No HW ID - assuming PIP405");
+ strcpy(buf,"### No HW ID - assuming PIP405");
}
#endif
#ifdef CONFIG_MIP405
if (!s || strncmp (s, "MIP405", 6)) {
- sprintf(buf,"### No HW ID - assuming MIP405");
+ strcpy(buf,"### No HW ID - assuming MIP405");
}
#endif
else {
}
buf[i++] = *s;
}
- sprintf(&buf[i]," SN ");
+ strcpy(&buf[i]," SN ");
i+=4;
for (; s < e; ++s) {
buf[i++] = *s;
ctfb.modeIdent);
return;
case 1:
- sprintf (buf, "%s",CONFIG_IDENT_STRING);
+ strcpy(buf, CONFIG_IDENT_STRING);
sprintf (info, " %s", &buf[1]);
return;
}
}
/* Request soft I2C gpios */
- sprintf(buf, "soft_i2c_scl");
+ strcpy(buf, "soft_i2c_scl");
gpio_request(CONFIG_SOFT_I2C_GPIO_SCL, buf);
- sprintf(buf, "soft_i2c_sda");
+ strcpy(buf, "soft_i2c_sda");
gpio_request(CONFIG_SOFT_I2C_GPIO_SDA, buf);
check_hw_revision();
sprintf(tmp, "%s_%s", factory_dat.asn,
factory_dat.comp_version);
else
- sprintf(tmp, "QMX7.E38_4.0");
+ strcpy(tmp, "QMX7.E38_4.0");
ret = setenv("boardid", tmp);
if (ret)
/* get production data */
if (read_eeprom(&header)) {
- sprintf(model, "211");
+ strcpy(model, "211");
} else {
sprintf(model, "%d", header.SystemId);
if (header.SystemId == 215) {
(size_t)255));
} else {
tmp = getenv("bootdev");
- if (tmp)
- ptr = sprintf(build_buf, tmp);
- else
+ if (tmp) {
+ strcpy(build_buf, tmp);
+ ptr = strlen(tmp);
+ } else
printf("## VxWorks boot device not specified\n");
tmp = getenv("bootfile");
ptr += sprintf(build_buf + ptr, "tn=%s ", tmp);
tmp = getenv("othbootargs");
- if (tmp)
- ptr += sprintf(build_buf + ptr, tmp);
+ if (tmp) {
+ strcpy(build_buf + ptr, tmp);
+ ptr += strlen(tmp);
+ }
memcpy((void *)bootaddr, build_buf,
max(strlen(build_buf), (size_t)255));
return 0;
}
- sprintf(p, "mtdparts=");
+ strcpy(p, "mtdparts=");
p += 9;
list_for_each(dentry, &devices) {
break;
}
/* sprintf(info->type, "%d, pt->sys_ind); */
- sprintf ((char *)info->type, "U-Boot");
+ strcpy((char *)info->type, "U-Boot");
info->bootable = is_bootable(pt);
#ifdef CONFIG_PARTITION_UUIDS
sprintf(info->uuid, "%08x-%02x", disksig, part_num);
info->size = dev_desc->lba;
info->blksz = DOS_PART_DEFAULT_SECTOR;
info->bootable = 0;
- sprintf ((char *)info->type, "U-Boot");
+ strcpy((char *)info->type, "U-Boot");
#ifdef CONFIG_PARTITION_UUIDS
info->uuid[0] = 0;
#endif
sprintf((char *)info->name, "%s",
print_efiname(&gpt_pte[part - 1]));
- sprintf((char *)info->type, "U-Boot");
+ strcpy((char *)info->type, "U-Boot");
info->bootable = is_bootable(&gpt_pte[part - 1]);
#ifdef CONFIG_PARTITION_UUIDS
uuid_bin_to_str(gpt_pte[part - 1].unique_partition_guid.b, info->uuid,
/* the validation entry seems to be ok, now search the "partition" */
entry_num=0;
offset=0x20;
- sprintf ((char *)info->type, "U-Boot");
+ strcpy((char *)info->type, "U-Boot");
switch(dev_desc->if_type) {
case IF_TYPE_IDE:
case IF_TYPE_SATA:
if (id[162] & 1)
printf("supports DRM functions and may "
"not be fully accessable.\n");
- sprintf(revbuf, "%s", "CFA");
+ strcpy(revbuf, "CFA");
} else {
if (ata_id_has_tpm(id))
printf("supports DRM functions and may "
ncq_desc[0] = '\0';
if (ata_dev->horkage & ATA_HORKAGE_NONCQ)
- sprintf(ncq_desc, "%s", "NCQ (not used)");
+ strcpy(ncq_desc, "NCQ (not used)");
if (ap.flags & ATA_FLAG_NCQ)
ata_dev->flags |= ATA_DFLAG_NCQ;
bus->read = tse_mdio_read;
bus->write = tse_mdio_write;
- snprintf(bus->name, sizeof(bus->name), name);
+ snprintf(bus->name, sizeof(bus->name), "%s", name);
bus->priv = (void *)priv;
memset(emacfix, 0, sizeof(emac_device));
memset(dev, 0, sizeof(*dev));
- sprintf(dev->name, "emac");
+ strcpy(dev->name, "emac");
dev->iobase = iobase;
dev->priv = emacfix;
dev->init = at91emac_init;
memset (priv, 0, sizeof *priv);
- sprintf (dev->name, "ax88180");
+ strcpy(dev->name, "ax88180");
dev->iobase = AX88180_BASE;
dev->priv = priv;
dev->init = ax88180_init;
bus->read = cpsw_mdio_read;
bus->write = cpsw_mdio_write;
- sprintf(bus->name, name);
+ strcpy(bus->name, name);
mdio_register(bus);
}
return -1;
memset(dev, 0, sizeof *dev);
- sprintf(dev->name, "DaVinci-EMAC");
+ strcpy(dev->name, "DaVinci-EMAC");
dev->iobase = 0;
dev->init = davinci_eth_open;
bus->read = dw_mdio_read;
bus->write = dw_mdio_write;
- snprintf(bus->name, sizeof(bus->name), name);
+ snprintf(bus->name, sizeof(bus->name), "%s", name);
bus->priv = (void *)mac_regs_p;
dev->halt = dm9000_halt;
dev->send = dm9000_send;
dev->recv = dm9000_rx;
- sprintf(dev->name, "dm9000");
+ strcpy(dev->name, "dm9000");
eth_register(dev);
bus->read = memac_mdio_read;
bus->write = memac_mdio_write;
bus->reset = memac_mdio_reset;
- sprintf(bus->name, info->name);
+ strcpy(bus->name, info->name);
bus->priv = info->regs;
bus->read = tgec_mdio_read;
bus->write = tgec_mdio_write;
bus->reset = tgec_mdio_reset;
- sprintf(bus->name, info->name);
+ strcpy(bus->name, info->name);
bus->priv = info->regs;
bus->read = tsec_phy_read;
bus->write = tsec_phy_write;
bus->reset = fsl_pq_mdio_reset;
- sprintf(bus->name, info->name);
+ strcpy(bus->name, info->name);
bus->priv = (void *)info->regs;
memset(dev, 0, sizeof(*dev));
memset(priv, 0, sizeof(*priv));
- sprintf(dev->name, "FTGMAC100");
+ strcpy(dev->name, "FTGMAC100");
dev->iobase = CONFIG_FTGMAC100_BASE;
dev->init = ftgmac100_init;
dev->halt = ftgmac100_halt;
memset (dev, 0, sizeof (*dev));
memset (priv, 0, sizeof (*priv));
- sprintf (dev->name, "FTMAC100");
+ strcpy(dev->name, "FTMAC100");
dev->iobase = CONFIG_FTMAC100_BASE;
dev->init = ftmac100_init;
dev->halt = ftmac100_halt;
/* Make descriptor string */
if (greth->gbit_mac) {
- sprintf(dev->name, "GRETH_10/100/GB");
+ strcpy(dev->name, "GRETH_10/100/GB");
} else {
- sprintf(dev->name, "GRETH_10/100");
+ strcpy(dev->name, "GRETH_10/100");
}
/* initiate PHY, select speed/duplex depending on connected PHY */
mdio_bus->write = keystone2_mdio_write;
mdio_bus->reset = keystone2_mdio_reset;
mdio_bus->priv = (void *)EMAC_MDIO_BASE_ADDR;
- sprintf(mdio_bus->name, "ethernet-mdio");
+ strcpy(mdio_bus->name, "ethernet-mdio");
res = mdio_register(mdio_bus);
if (res)
#endif
memset(&dpmac_endpoint, 0, sizeof(struct dprc_endpoint));
- sprintf(dpmac_endpoint.type, "dpmac");
+ strcpy(dpmac_endpoint.type, "dpmac");
dpmac_endpoint.id = priv->dpmac_id;
memset(&dpni_endpoint, 0, sizeof(struct dprc_endpoint));
- sprintf(dpni_endpoint.type, "dpni");
+ strcpy(dpni_endpoint.type, "dpni");
dpni_endpoint.id = dflt_dpni->dpni_id;
err = dprc_connect(dflt_mc_io, MC_CMD_NO_FLAGS,
}
bus->read = lpc32xx_eth_phy_read;
bus->write = lpc32xx_eth_phy_write;
- sprintf(bus->name, dev->name);
+ strcpy(bus->name, dev->name);
ret = mdio_register(bus);
if (ret) {
dev->send = mpc512x_fec_send;
dev->recv = mpc512x_fec_recv;
- sprintf (dev->name, "FEC");
+ strcpy(dev->name, "FEC");
eth_register (dev);
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
dev->send = mpc5xxx_fec_send;
dev->recv = mpc5xxx_fec_recv;
- sprintf(dev->name, "FEC");
+ strcpy(dev->name, "FEC");
eth_register(dev);
#if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
}
bus->read = mvgbe_phy_read;
bus->write = mvgbe_phy_write;
- sprintf(bus->name, dev->name);
+ strcpy(bus->name, dev->name);
ret = mdio_register(bus);
if (ret) {
dev->send = ne2k_send;
dev->recv = ne2k_recv;
- sprintf(dev->name, "NE2000");
+ strcpy(dev->name, "NE2000");
return eth_register(dev);
}
bus->read = pch_gbe_mdio_read;
bus->write = pch_gbe_mdio_write;
- sprintf(bus->name, name);
+ strcpy(bus->name, name);
bus->priv = (void *)mac_regs;
dev->recv = sh_eth_recv;
eth->port_info[eth->port].dev = dev;
- sprintf(dev->name, SHETHER_NAME);
+ strcpy(dev->name, SHETHER_NAME);
/* Register Device to EtherNet subsystem */
eth_register(dev);
priv->phyaddr = tsec_info->phyaddr;
priv->flags = tsec_info->flags;
- sprintf(dev->name, tsec_info->devname);
+ strcpy(dev->name, tsec_info->devname);
priv->interface = tsec_info->interface;
priv->bus = miiphy_get_dev_by_name(tsec_info->mii_devname);
dev->iobase = 0;
req->complete = rx_handler_command;
req->length = EP_BUFFER_SIZE;
- sprintf(response, "OKAY");
+ strcpy(response, "OKAY");
fastboot_tx_write_str(response);
printf("\ndownloading of %d bytes finished\n", download_bytes);
printf("Starting download of %d bytes\n", download_size);
if (0 == download_size) {
- sprintf(response, "FAILdata invalid size");
+ strcpy(response, "FAILdata invalid size");
} else if (download_size > CONFIG_FASTBOOT_BUF_SIZE) {
download_size = 0;
- sprintf(response, "FAILdata too large");
+ strcpy(response, "FAILdata too large");
} else {
sprintf(response, "DATA%08x", download_size);
req->complete = rx_handler_dl_image;
if (i) \
sprintf(ethname, "eth%daddr", i); \
else \
- sprintf(ethname, "ethaddr"); \
+ strcpy(ethname, "ethaddr"); \
printf("Setting %s from EEPROM with %s\n", ethname, buf);\
setenv(ethname, buf); \
} \
data->targets[k] = pos->target;
k++;
} else {
- sprintf(header, " ");
+ strcpy(header, " ");
}
memcpy(buf + pos->offset, header, sizeof(header) - 1);