*/
int do_get_bpip(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- bd_t *bd = gd->bd;
char *buf;
ulong crc;
char str[32];
/*
* Update whole ip-addr
*/
- bd->bi_ip_addr = ipaddr;
- sprintf(str, "%ld.%ld.%ld.%ld",
- (bd->bi_ip_addr & 0xff000000) >> 24,
- (bd->bi_ip_addr & 0x00ff0000) >> 16,
- (bd->bi_ip_addr & 0x0000ff00) >> 8,
- (bd->bi_ip_addr & 0x000000ff));
+ sprintf(str, "%pI4", &ipaddr);
setenv("ipaddr", str);
printf("Updated ip_addr from bp_eeprom to %s!\n", str);
}