changeset 12626:eba16697f6c1

6565738 zonecfg import fails when using capped-memory 6831546 zonecfg add net does not autocomplete defrouter
author Gerald Jelinek <Gerald.Jelinek@Sun.COM>
date Tue, 15 Jun 2010 14:16:12 -0700
parents 918cc39de2dd
children 14a7fd60c4c5
files usr/src/cmd/zonecfg/zonecfg.c
diffstat 1 files changed, 12 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/cmd/zonecfg/zonecfg.c	Tue Jun 15 19:09:16 2010 -0700
+++ b/usr/src/cmd/zonecfg/zonecfg.c	Tue Jun 15 14:16:12 2010 -0700
@@ -400,6 +400,7 @@
 	"info",
 	"set address=",
 	"set physical=",
+	"set defrouter=",
 	NULL
 };
 
@@ -1887,6 +1888,17 @@
 	}
 	(void) zonecfg_enddevent(handle);
 
+	if (zonecfg_getmcapent(handle, &mcaptab) == Z_OK) {
+		char buf[128];
+
+		(void) fprintf(of, "%s %s\n", cmd_to_str(CMD_ADD),
+		    rt_to_str(RT_MCAP));
+		bytes_to_units(mcaptab.zone_physmem_cap, buf, sizeof (buf));
+		(void) fprintf(of, "%s %s=%s\n", cmd_to_str(CMD_SET),
+		    pt_to_str(PT_PHYSICAL), buf);
+		(void) fprintf(of, "%s\n", cmd_to_str(CMD_END));
+	}
+
 	if ((err = zonecfg_setrctlent(handle)) != Z_OK) {
 		zone_perror(zone, err, B_FALSE);
 		goto done;
@@ -1949,17 +1961,6 @@
 		(void) fprintf(of, "%s\n", cmd_to_str(CMD_END));
 	}
 
-	if (zonecfg_getmcapent(handle, &mcaptab) == Z_OK) {
-		char buf[128];
-
-		(void) fprintf(of, "%s %s\n", cmd_to_str(CMD_ADD),
-		    rt_to_str(RT_MCAP));
-		bytes_to_units(mcaptab.zone_physmem_cap, buf, sizeof (buf));
-		(void) fprintf(of, "%s %s=%s\n", cmd_to_str(CMD_SET),
-		    pt_to_str(PT_PHYSICAL), buf);
-		(void) fprintf(of, "%s\n", cmd_to_str(CMD_END));
-	}
-
 	if ((err = zonecfg_setadminent(handle)) != Z_OK) {
 		zone_perror(zone, err, B_FALSE);
 		goto done;