diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2016-10-10 08:31:07 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-10-10 08:31:07 +0200 |
commit | bfdb14c7dacf3e50a27b749259f6660ab9e930d5 (patch) | |
tree | fe81dec7194671caee4e94ac7fb68fe6e519e6df /commands | |
parent | df75f19871d764c421cbce19f502ea863e5affd4 (diff) | |
parent | e4a45c096136deaf56a200054c46f474250cc89c (diff) | |
download | barebox-bfdb14c7dacf3e50a27b749259f6660ab9e930d5.tar.gz barebox-bfdb14c7dacf3e50a27b749259f6660ab9e930d5.tar.xz |
Merge branch 'for-next/misc'
Diffstat (limited to 'commands')
-rw-r--r-- | commands/tftp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/tftp.c b/commands/tftp.c index 6a3121ad56..08366b476f 100644 --- a/commands/tftp.c +++ b/commands/tftp.c @@ -36,6 +36,7 @@ static int do_tftpb(int argc, char *argv[]) int tftp_push = 0; int ret; IPaddr_t ip; + char ip4_str[sizeof("255.255.255.255")]; while ((opt = getopt(argc, argv, "p")) > 0) { switch(opt) { @@ -73,7 +74,8 @@ static int do_tftpb(int argc, char *argv[]) goto err_free; ip = net_get_serverip(); - ret = mount(ip_to_string(ip), "tftp", TFTP_MOUNT_PATH, NULL); + sprintf(ip4_str, "%pI4", &ip); + ret = mount(ip4_str, "tftp", TFTP_MOUNT_PATH, NULL); if (ret) goto err_rmdir; |