summaryrefslogtreecommitdiffstats
path: root/commands/tftp.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-09-15 12:51:27 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-09-22 11:30:38 +0200
commitd60230bded854fe5a357c77038cf6089defcfd24 (patch)
tree6c8b3dc4dee496cda1e1f9da5f53b1fa58a2e5ef /commands/tftp.c
parent581272f8c59a71e8f64a15b6b33bb0d1fc5ac6ba (diff)
downloadbarebox-d60230bded854fe5a357c77038cf6089defcfd24.tar.gz
convert users to %pI4
Convert users of ip_to_string() and print_IPaddr() to %pI4 and remove the now unused functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'commands/tftp.c')
-rw-r--r--commands/tftp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/commands/tftp.c b/commands/tftp.c
index 6a3121a..08366b4 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;