shithub: riscv

Download patch

ref: c0176a50519a4a978f1d59ef78bd1c9fcfa7f66f
parent: 0ed8f6ff5f45045f487304428af106c769582dea
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Tue Feb 12 23:45:41 EST 2019

ip/ipconfig: format ipmask with %M instead of %I

--- a/sys/src/cmd/ip/ipconfig/dhcp.c
+++ b/sys/src/cmd/ip/ipconfig/dhcp.c
@@ -159,7 +159,7 @@
 dhcpquery(int needconfig, int startstate)
 {
 	if(needconfig)
-		fprint(conf.cfd, "add %I %I", IPnoaddr, IPnoaddr);
+		fprint(conf.cfd, "add %I %M", IPnoaddr, IPnoaddr);
 
 	conf.fd = openlisten();
 	if(conf.fd < 0){
@@ -192,7 +192,7 @@
 	close(conf.fd);
 
 	if(needconfig)
-		fprint(conf.cfd, "remove %I %I", IPnoaddr, IPnoaddr);
+		fprint(conf.cfd, "remove %I %M", IPnoaddr, IPnoaddr);
 
 }
 
--- a/sys/src/cmd/ip/ipconfig/main.c
+++ b/sys/src/cmd/ip/ipconfig/main.c
@@ -577,7 +577,7 @@
 
 	if(!validip(conf.mask))
 		ipmove(conf.mask, defmask(conf.laddr));
-	n += snprint(buf+n, sizeof buf-n, " %I", conf.mask);
+	n += snprint(buf+n, sizeof buf-n, " %M", conf.mask);
 
 	if(validip(conf.raddr)){
 		n += snprint(buf+n, sizeof buf-n, " %I", conf.raddr);