--- old/usr/src/cmd/zonecfg/zonecfg.c	Wed Oct  5 00:33:12 2016
+++ new/usr/src/cmd/zonecfg/zonecfg.c	Wed Oct  5 00:33:12 2016
@@ -80,7 +80,6 @@
 #include <libinetutil.h>
 #include <pwd.h>
 #include <inet/ip.h>
-#include <uuid/uuid.h>
 
 #include <libzonecfg.h>
 #include "zonecfg.h"
@@ -128,7 +127,7 @@
 #define	SHELP_REMOVE	"remove [-F] <resource-type> " \
 	"[ <property-name>=<property-value> ]*\n" \
 	"\t(global scope)\n" \
-	"remove [-F] <property-name> <property-value>\n" \
+	"remove <property-name> <property-value>\n" \
 	"\t(resource scope)"
 #define	SHELP_REVERT	"revert [-F]"
 #define	SHELP_SELECT	"select <resource-type> { <property-name>=" \
@@ -189,8 +188,6 @@
 	"admin",
 	"fs-allowed",
 	ALIAS_MAXPROCS,
-	ALIAS_ZFSPRI,
-	"uuid",
 	NULL
 };
 
@@ -243,7 +240,6 @@
 	"vlan-id",
 	"global-nic",
 	"property",
-	"uuid",
 	NULL
 };
 
@@ -309,7 +305,6 @@
 	"clear " ALIAS_MAXSEMIDS,
 	"clear " ALIAS_SHARES,
 	"clear " ALIAS_MAXPROCS,
-	"clear " ALIAS_ZFSPRI,
 	NULL
 };
 
@@ -360,8 +355,6 @@
 	"set hostid=",
 	"set fs-allowed=",
 	"set " ALIAS_MAXPROCS "=",
-	"set " ALIAS_ZFSPRI "=",
-	"set uuid=",
 	NULL
 };
 
@@ -394,7 +387,6 @@
 	"info admin",
 	"info fs-allowed",
 	"info max-processes",
-	"info uuid",
 	NULL
 };
 
@@ -551,7 +543,6 @@
 /* used all over the place */
 static char zone[ZONENAME_MAX];
 static char revert_zone[ZONENAME_MAX];
-static char new_uuid[UUID_PRINTABLE_STRING_LENGTH];
 
 /* global brand operations */
 static brand_handle_t brand;
@@ -558,7 +549,6 @@
 
 /* set in modifying functions, checked in read_input() */
 static boolean_t need_to_commit = B_FALSE;
-static boolean_t is_create = B_FALSE;
 boolean_t saw_error;
 
 /* set in yacc parser, checked in read_input() */
@@ -1000,8 +990,7 @@
 }
 
 static FILE *
-pager_open(void)
-{
+pager_open(void) {
 	FILE *newfp;
 	char *pager, *space;
 
@@ -1027,8 +1016,7 @@
 }
 
 static void
-pager_close(FILE *fp)
-{
+pager_close(FILE *fp) {
 	int status;
 
 	status = pclose(fp);
@@ -1283,13 +1271,11 @@
 	if (flags & HELP_USAGE) {
 		(void) fprintf(fp, "%s:\t%s %s\n", gettext("usage"),
 		    execname, cmd_to_str(CMD_HELP));
-		(void) fprintf(fp, "\t%s {-z <zone>|-u <uuid>}\t\t\t(%s)\n",
+		(void) fprintf(fp, "\t%s -z <zone>\t\t\t(%s)\n",
 		    execname, gettext("interactive"));
-		(void) fprintf(fp, "\t%s {-z <zone>|-u <uuid>} <command>\n",
+		(void) fprintf(fp, "\t%s -z <zone> <command>\n", execname);
+		(void) fprintf(fp, "\t%s -z <zone> -f <command-file>\n",
 		    execname);
-		(void) fprintf(fp,
-		    "\t%s {-z <zone>|-u <uuid>} -f <command-file>\n",
-		    execname);
 	}
 	if (flags & HELP_SUBCMDS) {
 		(void) fprintf(fp, "%s:\n\n", gettext("Commands"));
@@ -1377,10 +1363,6 @@
 		    pt_to_str(PT_MAXSEMIDS));
 		(void) fprintf(fp, "\t%s\t%s\n", gettext("(global)"),
 		    pt_to_str(PT_SHARES));
-		(void) fprintf(fp, "\t%s\t%s\n", gettext("(global)"),
-		    pt_to_str(PT_UUID));
-		(void) fprintf(fp, "\t%s\t%s\n", gettext("(global)"),
-		    pt_to_str(PT_ZFSPRI));
 		(void) fprintf(fp, "\t%s\t\t%s, %s, %s, %s, %s\n",
 		    rt_to_str(RT_FS), pt_to_str(PT_DIR),
 		    pt_to_str(PT_SPECIAL), pt_to_str(PT_RAW),
@@ -1717,7 +1699,6 @@
 	boolean_t force = B_FALSE;
 	boolean_t attach = B_FALSE;
 	boolean_t arg_err = B_FALSE;
-	uuid_t uuid;
 
 	assert(cmd != NULL);
 
@@ -1725,7 +1706,7 @@
 	(void) strlcpy(zone_template, "SUNWdefault", sizeof (zone_template));
 
 	optind = 0;
-	while ((arg = getopt(cmd->cmd_argc, cmd->cmd_argv, "?a:bFt:X"))
+	while ((arg = getopt(cmd->cmd_argc, cmd->cmd_argv, "?a:bFt:"))
 	    != EOF) {
 		switch (arg) {
 		case '?':
@@ -1815,14 +1796,9 @@
 	}
 
 	need_to_commit = B_TRUE;
-	is_create = B_TRUE;
 	zonecfg_fini_handle(handle);
 	handle = tmphandle;
 	got_handle = B_TRUE;
-
-	/* Allocate a new uuid for this new zone */
-	uuid_generate(uuid);
-	uuid_unparse(uuid, new_uuid);
 }
 
 /*
@@ -1883,7 +1859,6 @@
 	FILE *of;
 	boolean_t autoboot;
 	zone_iptype_t iptype;
-	uuid_t uuid;
 	boolean_t need_to_close = B_FALSE;
 	boolean_t arg_err = B_FALSE;
 
@@ -1994,14 +1969,6 @@
 		    pt_to_str(PT_FS_ALLOWED), fsallowedp);
 	}
 
-	if (zonecfg_get_uuid(zone, uuid) == Z_OK && !uuid_is_null(uuid)) {
-		char suuid[UUID_PRINTABLE_STRING_LENGTH];
-
-		uuid_unparse(uuid, suuid);
-		(void) fprintf(of, "%s %s=%s\n", cmd_to_str(CMD_SET),
-		    pt_to_str(PT_UUID), suuid);
-	}
-
 	if ((err = zonecfg_setfsent(handle)) != Z_OK) {
 		zone_perror(zone, err, B_FALSE);
 		goto done;
@@ -2469,13 +2436,8 @@
 				    pt_to_str(PT_NAME));
 				goto bad;
 			}
-			if (strlcpy(np->zone_res_attr_name, cp->cp_value,
-			    sizeof (np->zone_res_attr_name)) >=
-			    sizeof (np->zone_res_attr_name)) {
-				zerr(gettext("Input for %s is too long"),
-				    pt_to_str(PT_NAME));
-				goto bad;
-			}
+			(void) strlcpy(np->zone_res_attr_name, cp->cp_value,
+			    sizeof (np->zone_res_attr_name));
 			seen_name = B_TRUE;
 			break;
 		case PT_VALUE:
@@ -2484,14 +2446,8 @@
 				    pt_to_str(PT_VALUE));
 				goto bad;
 			}
-			if (strlcpy(np->zone_res_attr_value, cp->cp_value,
-			    sizeof (np->zone_res_attr_value)) >=
-			    sizeof (np->zone_res_attr_value)) {
-				zerr(gettext("Input for %s is too long"),
-				    pt_to_str(PT_VALUE));
-				goto bad;
-			}
-
+			(void) strlcpy(np->zone_res_attr_value, cp->cp_value,
+			    sizeof (np->zone_res_attr_value));
 			seen_value = B_TRUE;
 			break;
 		default:
@@ -2667,7 +2623,7 @@
 gz_invalid_rt_property(int type)
 {
 	return (global_zone && (type == RT_ZONENAME || type == RT_ZONEPATH ||
-	    type == RT_AUTOBOOT || type == RT_LIMITPRIV || type == RT_UUID ||
+	    type == RT_AUTOBOOT || type == RT_LIMITPRIV ||
 	    type == RT_BOOTARGS || type == RT_BRAND || type == RT_SCHED ||
 	    type == RT_IPTYPE || type == RT_HOSTID || type == RT_FS_ALLOWED));
 }
@@ -2676,7 +2632,7 @@
 gz_invalid_property(int type)
 {
 	return (global_zone && (type == PT_ZONENAME || type == PT_ZONEPATH ||
-	    type == PT_AUTOBOOT || type == PT_LIMITPRIV || type == PT_UUID ||
+	    type == PT_AUTOBOOT || type == PT_LIMITPRIV ||
 	    type == PT_BOOTARGS || type == PT_BRAND || type == PT_SCHED ||
 	    type == PT_IPTYPE || type == PT_HOSTID || type == PT_FS_ALLOWED));
 }
@@ -2894,32 +2850,6 @@
 	return (zonecfg_lookup_filesystem(handle, fstab));
 }
 
-/*
- * Turn an addr that looks like f:2:0:44:5:6C into 0f:02:00:44:05:6c
- * We're expecting a dst of at least MAXMACADDRLEN size here.
- */
-static void
-normalize_mac_addr(char *dst, const char *src, int len)
-{
-	char *p, *e, *sep = "";
-	long n;
-	char buf[MAXMACADDRLEN], tmp[4];
-
-	*dst = '\0';
-	(void) strlcpy(buf, src, sizeof (buf));
-	p = strtok(buf, ":");
-	while (p != NULL) {
-		n = strtol(p, &e, 16);
-		if (*e != NULL || n > 0xff)
-			return;
-		(void) snprintf(tmp, sizeof (tmp), "%s%02x", sep, n);
-		(void) strlcat(dst, tmp, len);
-
-		sep = ":";
-		p = strtok(NULL, ":");
-	}
-}
-
 static int
 fill_in_nwiftab(cmd_t *cmd, struct zone_nwiftab *nwiftab,
     boolean_t fill_in_only)
@@ -2954,7 +2884,7 @@
 			    sizeof (nwiftab->zone_nwif_physical));
 			break;
 		case PT_MAC:
-			normalize_mac_addr(nwiftab->zone_nwif_mac,
+			(void) strlcpy(nwiftab->zone_nwif_mac,
 			    pp->pv_simple,
 			    sizeof (nwiftab->zone_nwif_mac));
 			break;
@@ -3218,8 +3148,6 @@
 	num = zonecfg_num_resources(handle, rsrc);
 
 	if (num == 0) {
-		if (force)
-			return (B_TRUE);
 		z_cmd_rt_perror(CMD_REMOVE, cmd->cmd_res_type, Z_NO_ENTRY,
 		    B_TRUE);
 		return (B_FALSE);
@@ -3248,7 +3176,7 @@
 }
 
 static void
-remove_fs(cmd_t *cmd, boolean_t force)
+remove_fs(cmd_t *cmd)
 {
 	int err;
 
@@ -3257,16 +3185,13 @@
 		struct zone_fstab fstab;
 
 		if ((err = fill_in_fstab(cmd, &fstab, B_FALSE)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_FS, err, B_TRUE);
+			z_cmd_rt_perror(CMD_REMOVE, RT_FS, err, B_TRUE);
 			return;
 		}
-		if ((err = zonecfg_delete_filesystem(handle, &fstab)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_FS, err, B_TRUE);
-		} else {
+		if ((err = zonecfg_delete_filesystem(handle, &fstab)) != Z_OK)
+			z_cmd_rt_perror(CMD_REMOVE, RT_FS, err, B_TRUE);
+		else
 			need_to_commit = B_TRUE;
-		}
 		zonecfg_free_fs_option_list(fstab.zone_fs_options);
 		return;
 	}
@@ -3285,7 +3210,7 @@
 }
 
 static void
-remove_net(cmd_t *cmd, boolean_t force)
+remove_net(cmd_t *cmd)
 {
 	int err;
 
@@ -3294,18 +3219,13 @@
 		struct zone_nwiftab nwiftab;
 
 		if ((err = fill_in_nwiftab(cmd, &nwiftab, B_FALSE)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_NET, err,
-				    B_TRUE);
+			z_cmd_rt_perror(CMD_REMOVE, RT_NET, err, B_TRUE);
 			return;
 		}
-		if ((err = zonecfg_delete_nwif(handle, &nwiftab)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_NET, err,
-				    B_TRUE);
-		} else {
+		if ((err = zonecfg_delete_nwif(handle, &nwiftab)) != Z_OK)
+			z_cmd_rt_perror(CMD_REMOVE, RT_NET, err, B_TRUE);
+		else
 			need_to_commit = B_TRUE;
-		}
 		return;
 	}
 
@@ -3323,7 +3243,7 @@
 }
 
 static void
-remove_device(cmd_t *cmd, boolean_t force)
+remove_device(cmd_t *cmd)
 {
 	int err;
 
@@ -3332,18 +3252,13 @@
 		struct zone_devtab devtab;
 
 		if ((err = fill_in_devtab(cmd, &devtab, B_FALSE)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_DEVICE, err,
-				    B_TRUE);
+			z_cmd_rt_perror(CMD_REMOVE, RT_DEVICE, err, B_TRUE);
 			return;
 		}
-		if ((err = zonecfg_delete_dev(handle, &devtab)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_DEVICE, err,
-				    B_TRUE);
-		} else {
+		if ((err = zonecfg_delete_dev(handle, &devtab)) != Z_OK)
+			z_cmd_rt_perror(CMD_REMOVE, RT_DEVICE, err, B_TRUE);
+		else
 			need_to_commit = B_TRUE;
-		}
 		return;
 	}
 
@@ -3361,7 +3276,7 @@
 }
 
 static void
-remove_attr(cmd_t *cmd, boolean_t force)
+remove_attr(cmd_t *cmd)
 {
 	int err;
 
@@ -3370,18 +3285,13 @@
 		struct zone_attrtab attrtab;
 
 		if ((err = fill_in_attrtab(cmd, &attrtab, B_FALSE)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_ATTR, err,
-				    B_TRUE);
+			z_cmd_rt_perror(CMD_REMOVE, RT_ATTR, err, B_TRUE);
 			return;
 		}
-		if ((err = zonecfg_delete_attr(handle, &attrtab)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_ATTR, err,
-				    B_TRUE);
-		} else {
+		if ((err = zonecfg_delete_attr(handle, &attrtab)) != Z_OK)
+			z_cmd_rt_perror(CMD_REMOVE, RT_ATTR, err, B_TRUE);
+		else
 			need_to_commit = B_TRUE;
-		}
 		return;
 	}
 
@@ -3399,7 +3309,7 @@
 }
 
 static void
-remove_dataset(cmd_t *cmd, boolean_t force)
+remove_dataset(cmd_t *cmd)
 {
 	int err;
 
@@ -3408,18 +3318,13 @@
 		struct zone_dstab dstab;
 
 		if ((err = fill_in_dstab(cmd, &dstab, B_FALSE)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_DATASET, err,
-				    B_TRUE);
+			z_cmd_rt_perror(CMD_REMOVE, RT_DATASET, err, B_TRUE);
 			return;
 		}
-		if ((err = zonecfg_delete_ds(handle, &dstab)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_DATASET, err,
-				    B_TRUE);
-		} else {
+		if ((err = zonecfg_delete_ds(handle, &dstab)) != Z_OK)
+			z_cmd_rt_perror(CMD_REMOVE, RT_DATASET, err, B_TRUE);
+		else
 			need_to_commit = B_TRUE;
-		}
 		return;
 	}
 
@@ -3437,7 +3342,7 @@
 }
 
 static void
-remove_rctl(cmd_t *cmd, boolean_t force)
+remove_rctl(cmd_t *cmd)
 {
 	int err;
 
@@ -3446,18 +3351,13 @@
 		struct zone_rctltab rctltab;
 
 		if ((err = fill_in_rctltab(cmd, &rctltab, B_FALSE)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_RCTL, err,
-				    B_TRUE);
+			z_cmd_rt_perror(CMD_REMOVE, RT_RCTL, err, B_TRUE);
 			return;
 		}
-		if ((err = zonecfg_delete_rctl(handle, &rctltab)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_RCTL, err,
-				    B_TRUE);
-		} else {
+		if ((err = zonecfg_delete_rctl(handle, &rctltab)) != Z_OK)
+			z_cmd_rt_perror(CMD_REMOVE, RT_RCTL, err, B_TRUE);
+		else
 			need_to_commit = B_TRUE;
-		}
 		zonecfg_free_rctl_value_list(rctltab.zone_rctl_valptr);
 		return;
 	}
@@ -3476,50 +3376,42 @@
 }
 
 static void
-remove_pset(boolean_t force)
+remove_pset()
 {
 	int err;
 	struct zone_psettab psettab;
 
 	if ((err = zonecfg_lookup_pset(handle, &psettab)) != Z_OK) {
-		if (!force)
-			z_cmd_rt_perror(CMD_REMOVE, RT_DCPU, err, B_TRUE);
+		z_cmd_rt_perror(CMD_REMOVE, RT_DCPU, err, B_TRUE);
 		return;
 	}
-	if ((err = zonecfg_delete_pset(handle)) != Z_OK) {
-		if (!force)
-			z_cmd_rt_perror(CMD_REMOVE, RT_DCPU, err, B_TRUE);
-	} else {
+	if ((err = zonecfg_delete_pset(handle)) != Z_OK)
+		z_cmd_rt_perror(CMD_REMOVE, RT_DCPU, err, B_TRUE);
+	else
 		need_to_commit = B_TRUE;
-	}
 }
 
 static void
-remove_pcap(boolean_t force)
+remove_pcap()
 {
 	int err;
 	uint64_t tmp;
 
 	if (zonecfg_get_aliased_rctl(handle, ALIAS_CPUCAP, &tmp) != Z_OK) {
-		if (!force) {
-			zerr("%s %s: %s", cmd_to_str(CMD_REMOVE),
-			    rt_to_str(RT_PCAP),
-			    zonecfg_strerror(Z_NO_RESOURCE_TYPE));
-			saw_error = B_TRUE;
-		}
+		zerr("%s %s: %s", cmd_to_str(CMD_REMOVE), rt_to_str(RT_PCAP),
+		    zonecfg_strerror(Z_NO_RESOURCE_TYPE));
+		saw_error = B_TRUE;
 		return;
 	}
 
-	if ((err = zonecfg_rm_aliased_rctl(handle, ALIAS_CPUCAP)) != Z_OK) {
-		if (!force)
-			z_cmd_rt_perror(CMD_REMOVE, RT_PCAP, err, B_TRUE);
-	} else {
+	if ((err = zonecfg_rm_aliased_rctl(handle, ALIAS_CPUCAP)) != Z_OK)
+		z_cmd_rt_perror(CMD_REMOVE, RT_PCAP, err, B_TRUE);
+	else
 		need_to_commit = B_TRUE;
-	}
 }
 
 static void
-remove_mcap(boolean_t force)
+remove_mcap()
 {
 	int err, res1, res2, res3;
 	uint64_t tmp;
@@ -3531,22 +3423,16 @@
 
 	/* if none of these exist, there is no resource to remove */
 	if (res1 != Z_OK && res2 != Z_OK && res3 != Z_OK) {
-		if (!force) {
-			zerr("%s %s: %s", cmd_to_str(CMD_REMOVE),
-			    rt_to_str(RT_MCAP),
-			    zonecfg_strerror(Z_NO_RESOURCE_TYPE));
-			saw_error = B_TRUE;
-		}
+		zerr("%s %s: %s", cmd_to_str(CMD_REMOVE), rt_to_str(RT_MCAP),
+		    zonecfg_strerror(Z_NO_RESOURCE_TYPE));
+		saw_error = B_TRUE;
 		return;
 	}
 	if (res1 == Z_OK) {
 		if ((err = zonecfg_rm_aliased_rctl(handle, ALIAS_MAXPHYSMEM))
 		    != Z_OK) {
-			if (!force) {
-				z_cmd_rt_perror(CMD_REMOVE, RT_MCAP, err,
-				    B_TRUE);
-				revert = B_TRUE;
-			}
+			z_cmd_rt_perror(CMD_REMOVE, RT_MCAP, err, B_TRUE);
+			revert = B_TRUE;
 		} else {
 			need_to_commit = B_TRUE;
 		}
@@ -3555,11 +3441,8 @@
 	if (res2 == Z_OK) {
 		if ((err = zonecfg_rm_aliased_rctl(handle, ALIAS_MAXSWAP))
 		    != Z_OK) {
-			if (!force) {
-				z_cmd_rt_perror(CMD_REMOVE, RT_MCAP, err,
-				    B_TRUE);
-				revert = B_TRUE;
-			}
+			z_cmd_rt_perror(CMD_REMOVE, RT_MCAP, err, B_TRUE);
+			revert = B_TRUE;
 		} else {
 			need_to_commit = B_TRUE;
 		}
@@ -3567,11 +3450,8 @@
 	if (res3 == Z_OK) {
 		if ((err = zonecfg_rm_aliased_rctl(handle, ALIAS_MAXLOCKEDMEM))
 		    != Z_OK) {
-			if (!force) {
-				z_cmd_rt_perror(CMD_REMOVE, RT_MCAP, err,
-				    B_TRUE);
-				revert = B_TRUE;
-			}
+			z_cmd_rt_perror(CMD_REMOVE, RT_MCAP, err, B_TRUE);
+			revert = B_TRUE;
 		} else {
 			need_to_commit = B_TRUE;
 		}
@@ -3582,7 +3462,7 @@
 }
 
 static void
-remove_admin(cmd_t *cmd, boolean_t force)
+remove_admin(cmd_t *cmd)
 {
 	int err;
 
@@ -3591,33 +3471,34 @@
 		struct zone_admintab admintab;
 
 		if ((err = fill_in_admintab(cmd, &admintab, B_FALSE)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_ADMIN, err,
-				    B_TRUE);
+			z_cmd_rt_perror(CMD_REMOVE, RT_ADMIN,
+			    err, B_TRUE);
 			return;
 		}
 		if ((err = zonecfg_delete_admin(handle, &admintab,
-		    zone)) != Z_OK) {
-			if (!force)
-				z_cmd_rt_perror(CMD_REMOVE, RT_ADMIN, err,
-				    B_TRUE);
-		} else {
+		    zone))
+		    != Z_OK)
+			z_cmd_rt_perror(CMD_REMOVE, RT_ADMIN,
+			    err, B_TRUE);
+		else
 			need_to_commit = B_TRUE;
-		}
 		return;
-	}
+	} else {
+		/*
+		 * unqualified admin removal.
+		 * remove all admins but prompt if more
+		 * than one.
+		 */
+		if (!prompt_remove_resource(cmd, "admin"))
+			return;
 
-	/*
-	 * unqualified admin removal.
-	 * remove all admins but prompt if more than one.
-	 */
-	if (!prompt_remove_resource(cmd, "admin"))
-		return;
-
-	if ((err = zonecfg_delete_admins(handle, zone)) != Z_OK)
-		z_cmd_rt_perror(CMD_REMOVE, RT_ADMIN, err, B_TRUE);
-	else
-		need_to_commit = B_TRUE;
+		if ((err = zonecfg_delete_admins(handle, zone))
+		    != Z_OK)
+			z_cmd_rt_perror(CMD_REMOVE, RT_ADMIN,
+			    err, B_TRUE);
+		else
+			need_to_commit = B_TRUE;
+	}
 }
 
 static void
@@ -3626,7 +3507,6 @@
 	int type;
 	int arg;
 	boolean_t arg_err = B_FALSE;
-	boolean_t force = B_FALSE;
 
 	if ((type = cmd->cmd_res_type) == RT_UNKNOWN) {
 		long_usage(CMD_REMOVE, B_TRUE);
@@ -3641,7 +3521,6 @@
 			arg_err = B_TRUE;
 			break;
 		case 'F':
-			force = B_TRUE;
 			break;
 		default:
 			short_usage(CMD_REMOVE);
@@ -3657,34 +3536,34 @@
 
 	switch (type) {
 	case RT_FS:
-		remove_fs(cmd, force);
+		remove_fs(cmd);
 		return;
 	case RT_NET:
-		remove_net(cmd, force);
+		remove_net(cmd);
 		return;
 	case RT_DEVICE:
-		remove_device(cmd, force);
+		remove_device(cmd);
 		return;
 	case RT_RCTL:
-		remove_rctl(cmd, force);
+		remove_rctl(cmd);
 		return;
 	case RT_ATTR:
-		remove_attr(cmd, force);
+		remove_attr(cmd);
 		return;
 	case RT_DATASET:
-		remove_dataset(cmd, force);
+		remove_dataset(cmd);
 		return;
 	case RT_DCPU:
-		remove_pset(force);
+		remove_pset();
 		return;
 	case RT_PCAP:
-		remove_pcap(force);
+		remove_pcap();
 		return;
 	case RT_MCAP:
-		remove_mcap(force);
+		remove_mcap();
 		return;
 	case RT_ADMIN:
-		remove_admin(cmd, force);
+		remove_admin(cmd);
 		return;
 	default:
 		zone_perror(rt_to_str(type), Z_NO_RESOURCE_TYPE, B_TRUE);
@@ -3703,26 +3582,7 @@
 	struct zone_rctlvaltab *rctlvaltab;
 	struct zone_res_attrtab *np;
 	complex_property_ptr_t cx;
-	int arg;
-	boolean_t force = B_FALSE;
-	boolean_t arg_err = B_FALSE;
 
-	optind = 0;
-	while ((arg = getopt(cmd->cmd_argc, cmd->cmd_argv, "F")) != EOF) {
-		switch (arg) {
-		case 'F':
-			force = B_TRUE;
-			break;
-		default:
-			arg_err = B_TRUE;
-			break;
-		}
-	}
-	if (arg_err) {
-		saw_error = B_TRUE;
-		return;
-	}
-
 	res_type = resource_scope;
 	prop_type = cmd->cmd_prop_name[0];
 	if (res_type == RT_UNKNOWN || prop_type == PT_UNKNOWN) {
@@ -3763,7 +3623,7 @@
 			prop_id = pp->pv_simple;
 			err = zonecfg_remove_fs_option(&in_progress_fstab,
 			    prop_id);
-			if (err != Z_OK && !force)
+			if (err != Z_OK)
 				zone_perror(pt_to_str(prop_type), err, B_TRUE);
 		} else {
 			list_property_ptr_t list;
@@ -3775,7 +3635,7 @@
 					break;
 				err = zonecfg_remove_fs_option(
 				    &in_progress_fstab, prop_id);
-				if (err != Z_OK && !force)
+				if (err != Z_OK)
 					zone_perror(pt_to_str(prop_type), err,
 					    B_TRUE);
 			}
@@ -3828,7 +3688,7 @@
 			err = zonecfg_remove_res_attr(
 			    &(in_progress_devtab.zone_dev_attrp), np);
 		}
-		if (err != Z_OK && !force)
+		if (err != Z_OK)
 			zone_perror(pt_to_str(prop_type), err, B_TRUE);
 		return;
 	case RT_RCTL:
@@ -3879,7 +3739,7 @@
 		rctlvaltab->zone_rctlval_next = NULL;
 		err = zonecfg_remove_rctl_value(&in_progress_rctltab,
 		    rctlvaltab);
-		if (err != Z_OK && !force)
+		if (err != Z_OK)
 			zone_perror(pt_to_str(prop_type), err, B_TRUE);
 		zonecfg_free_rctl_value_list(rctlvaltab);
 		return;
@@ -4004,8 +3864,6 @@
 		/* FALLTHRU */
 	case PT_ZONEPATH:
 		/* FALLTHRU */
-	case PT_UUID:
-		/* FALLTHRU */
 	case PT_BRAND:
 		zone_perror(pt_to_str(type), Z_CLEAR_DISALLOW, B_TRUE);
 		return;
@@ -4068,9 +3926,6 @@
 	case PT_SHARES:
 		remove_aliased_rctl(PT_SHARES, ALIAS_SHARES);
 		return;
-	case PT_ZFSPRI:
-		remove_aliased_rctl(PT_ZFSPRI, ALIAS_ZFSPRI);
-		return;
 	case PT_HOSTID:
 		if ((err = zonecfg_set_hostid(handle, NULL)) != Z_OK)
 			z_cmd_rt_perror(CMD_CLEAR, RT_HOSTID, err, B_TRUE);
@@ -4561,10 +4416,6 @@
 			res_type = RT_HOSTID;
 		} else if (prop_type == PT_FS_ALLOWED) {
 			res_type = RT_FS_ALLOWED;
-		} else if (prop_type == PT_ZFSPRI) {
-			res_type = RT_ZFSPRI;
-		} else if (prop_type == PT_UUID) {
-			res_type = RT_UUID;
 		} else {
 			zerr(gettext("Cannot set a resource-specific property "
 			    "from the global scope."));
@@ -4772,9 +4623,6 @@
 	case RT_SHARES:
 		set_aliased_rctl(ALIAS_SHARES, prop_type, prop_id);
 		return;
-	case RT_ZFSPRI:
-		set_aliased_rctl(ALIAS_ZFSPRI, prop_type, prop_id);
-		return;
 	case RT_HOSTID:
 		if ((err = zonecfg_set_hostid(handle, prop_id)) != Z_OK) {
 			if (err == Z_TOO_BIG) {
@@ -4788,15 +4636,6 @@
 		}
 		need_to_commit = B_TRUE;
 		return;
-	case RT_UUID:
-		/*
-		 * We can't set here.  We have to wait until commit since the
-		 * uuid will be updating the index file and we may not have
-		 * created the zone yet.
-		 */
-		(void) strlcpy(new_uuid, prop_id, sizeof (new_uuid));
-		need_to_commit = B_TRUE;
-		return;
 	case RT_FS_ALLOWED:
 		if ((err = zonecfg_set_fs_allowed(handle, prop_id)) != Z_OK)
 			zone_perror(zone, err, B_TRUE);
@@ -4872,7 +4711,7 @@
 			    sizeof (in_progress_nwiftab.zone_nwif_physical));
 			break;
 		case PT_MAC:
-			normalize_mac_addr(in_progress_nwiftab.zone_nwif_mac,
+			(void) strlcpy(in_progress_nwiftab.zone_nwif_mac,
 			    prop_id,
 			    sizeof (in_progress_nwiftab.zone_nwif_mac));
 			break;
@@ -5397,23 +5236,6 @@
 }
 
 static void
-info_uuid(FILE *fp)
-{
-	uuid_t uuid;
-	char suuid[UUID_PRINTABLE_STRING_LENGTH];
-
-	if (new_uuid[0] != '\0') {
-		(void) fprintf(fp, "%s: %s\n", pt_to_str(PT_UUID), new_uuid);
-	} else if (zonecfg_get_uuid(zone, uuid) == Z_OK &&
-	    !uuid_is_null(uuid)) {
-		uuid_unparse(uuid, suuid);
-		(void) fprintf(fp, "%s: %s\n", pt_to_str(PT_UUID), suuid);
-	} else {
-		(void) fprintf(fp, "%s:\n", pt_to_str(PT_UUID));
-	}
-}
-
-static void
 info_fs_allowed(zone_dochandle_t handle, FILE *fp)
 {
 	char fsallowedp[ZONE_FS_ALLOWED_MAX];
@@ -5923,7 +5745,6 @@
 	uint64_t swap_limit;
 	uint64_t locked_limit;
 	uint64_t phys_limit;
-	struct stat statbuf;
 
 	assert(cmd != NULL);
 
@@ -6013,7 +5834,6 @@
 			info_iptype(handle, fp);
 			info_hostid(handle, fp);
 			info_fs_allowed(handle, fp);
-			info_uuid(fp);
 		}
 		info_aliased_rctl(handle, fp, ALIAS_MAXLWPS);
 		info_aliased_rctl(handle, fp, ALIAS_MAXPROCS);
@@ -6022,7 +5842,6 @@
 		info_aliased_rctl(handle, fp, ALIAS_MAXMSGIDS);
 		info_aliased_rctl(handle, fp, ALIAS_MAXSEMIDS);
 		info_aliased_rctl(handle, fp, ALIAS_SHARES);
-		info_aliased_rctl(handle, fp, ALIAS_ZFSPRI);
 		if (!global_zone) {
 			info_fs(handle, fp, cmd);
 			info_net(handle, fp, cmd);
@@ -6086,9 +5905,6 @@
 	case RT_SHARES:
 		info_aliased_rctl(handle, fp, ALIAS_SHARES);
 		break;
-	case RT_ZFSPRI:
-		info_aliased_rctl(handle, fp, ALIAS_ZFSPRI);
-		break;
 	case RT_FS:
 		info_fs(handle, fp, cmd);
 		break;
@@ -6119,9 +5935,6 @@
 	case RT_HOSTID:
 		info_hostid(handle, fp);
 		break;
-	case RT_UUID:
-		info_uuid(fp);
-		break;
 	case RT_ADMIN:
 		info_auth(handle, fp, cmd);
 		break;
@@ -6613,24 +6426,7 @@
 				need_to_commit = B_FALSE;
 				(void) strlcpy(revert_zone, zone,
 				    sizeof (revert_zone));
-
-				if (is_create) {
-					zonecfg_notify_create(handle);
-					is_create = B_FALSE;
-				}
 			}
-
-			/*
-			 * Commit a new uuid at this point since we now know the
-			 * zone index entry will exist.
-			 */
-			if (new_uuid[0] != '\0') {
-				if ((err = zonecfg_set_uuid(zone, zonepath,
-				    new_uuid)) != Z_OK)
-					zone_perror(zone, err, B_FALSE);
-				else
-					new_uuid[0] = '\0';
-			}
 		} else {
 			zerr(gettext("Zone %s failed to verify"), zone);
 		}
@@ -7680,10 +7476,8 @@
 int
 main(int argc, char *argv[])
 {
-	int err, arg, uflag = 0, zflag = 0;
+	int err, arg;
 	struct stat st;
-	uuid_t uuidin;
-	char zonename[ZONENAME_MAX + 1];
 
 	/* This must be before anything goes to stdout. */
 	setbuf(stdout, NULL);
@@ -7710,7 +7504,7 @@
 		exit(Z_OK);
 	}
 
-	while ((arg = getopt(argc, argv, "?f:R:z:u:")) != EOF) {
+	while ((arg = getopt(argc, argv, "?f:R:z:")) != EOF) {
 		switch (arg) {
 		case '?':
 			if (optopt == '?')
@@ -7737,21 +7531,6 @@
 			}
 			zonecfg_set_root(optarg);
 			break;
-		case 'u':
-			if (uuid_parse((char *)optarg, uuidin) == -1)
-				return (Z_INVALID_PROPERTY);
-
-			if (zonecfg_get_name_by_uuid(uuidin, zonename,
-			    ZONENAME_MAX) != Z_OK) {
-				zone_perror(optarg, Z_BOGUS_ZONE_NAME, B_TRUE);
-				usage(B_FALSE, HELP_SYNTAX);
-				exit(Z_USAGE);
-			}
-
-			(void) strlcpy(zone, zonename, sizeof (zone));
-			(void) strlcpy(revert_zone, zonename, sizeof (zone));
-			uflag = 1;
-			break;
 		case 'z':
 			if (strcmp(optarg, GLOBAL_ZONENAME) == 0) {
 				global_zone = B_TRUE;
@@ -7762,7 +7541,6 @@
 			}
 			(void) strlcpy(zone, optarg, sizeof (zone));
 			(void) strlcpy(revert_zone, optarg, sizeof (zone));
-			zflag = 1;
 			break;
 		default:
 			usage(B_FALSE, HELP_USAGE);
@@ -7770,7 +7548,7 @@
 		}
 	}
 
-	if (optind > argc || strcmp(zone, "") == 0 || (uflag && zflag)) {
+	if (optind > argc || strcmp(zone, "") == 0) {
 		usage(B_FALSE, HELP_USAGE);
 		exit(Z_USAGE);
 	}
