--- old/usr/src/cmd/zoneadmd/zcons.c	Thu Feb 17 23:33:31 2022
+++ new/usr/src/cmd/zoneadmd/zcons.c	Thu Feb 17 23:33:31 2022
@@ -57,7 +57,7 @@
  *                                  |     +-[Anchor]--+
  *                                  |     |   ptem    |
  *                                  V     +-----------+
- *                           +---master---+---slave---+
+ *                           +---manager--+-subsidiary+
  *                           |                        |
  *                           |      zcons driver      |
  *                           |    zonename="myzone"   |
@@ -71,7 +71,7 @@
  *   to online new instances of zcons as needed.  Care is taken to
  *   prune and manage these appropriately; see init_console_dev() and
  *   destroy_console_dev().  The end result is the creation of the
- *   zcons(7D) instance and an open file descriptor to the master side.
+ *   zcons(7D) instance and an open file descriptor to the manager side.
  *   zcons instances are associated with zones via their zonename device
  *   property.  This the console instance to persist across reboots,
  *   and while the zone is halted.
@@ -79,7 +79,7 @@
  * - Acting as a server for 'zlogin -C' instances.  When zlogin -C is
  *   run, zlogin connects to zoneadmd via unix domain socket.  zoneadmd
  *   functions as a two-way proxy for console I/O, relaying user input
- *   to the master side of the console, and relaying output from the
+ *   to the manager side of the console, and relaying output from the
  *   zone to the user.
  */
 
@@ -265,34 +265,35 @@
 	char conspath[MAXPATHLEN];
 	di_node_t root;
 	struct cb_data cb;
-	int masterfd;
-	int slavefd;
+	int managerfd;
+	int subfd;
 
 	/*
-	 * Signal the master side to release its handle on the slave side by
-	 * issuing a ZC_RELEASESLAVE ioctl.
+	 * Signal the manager side to release its handle on the subsidiary side
+	 * by issuing a ZC_RELEASESUBSID ioctl.
 	 */
 	(void) snprintf(conspath, sizeof (conspath), "/dev/zcons/%s/%s",
-	    zone_name, ZCONS_MASTER_NAME);
-	if ((masterfd = open(conspath, O_RDWR | O_NOCTTY)) != -1) {
+	    zone_name, ZCONS_MANAGER_NAME);
+	if ((managerfd = open(conspath, O_RDWR | O_NOCTTY)) != -1) {
 		(void) snprintf(conspath, sizeof (conspath), "/dev/zcons/%s/%s",
-		    zone_name, ZCONS_SLAVE_NAME);
-		if ((slavefd = open(conspath, O_RDWR | O_NOCTTY)) != -1) {
-			if (ioctl(masterfd, ZC_RELEASESLAVE,
-			    (caddr_t)(intptr_t)slavefd) != 0)
+		    zone_name, ZCONS_SUBSIDIARY_NAME);
+		if ((subfd = open(conspath, O_RDWR | O_NOCTTY)) != -1) {
+			if (ioctl(managerfd, ZC_RELEASESUBSID,
+			    (caddr_t)(intptr_t)subfd) != 0)
 				zerror(zlogp, B_TRUE, "WARNING: error while "
-				    "releasing slave handle of zone console for"
-				    " %s", zone_name);
-			(void) close(slavefd);
+				    "releasing subsidiary handle of zone "
+				    "console for %s", zone_name);
+			(void) close(subfd);
 		} else {
-			zerror(zlogp, B_TRUE, "WARNING: could not open slave "
-			    "side of zone console for %s to release slave "
-			    "handle", zone_name);
+			zerror(zlogp, B_TRUE, "WARNING: could not open "
+			    "subsidiary side of zone console for %s to "
+			    "release subsidiary handle", zone_name);
 		}
-		(void) close(masterfd);
+		(void) close(managerfd);
 	} else {
-		zerror(zlogp, B_TRUE, "WARNING: could not open master side of "
-		    "zone console for %s to release slave handle", zone_name);
+		zerror(zlogp, B_TRUE, "WARNING: could not open manager side of "
+		    "zone console for %s to release subsidiary handle",
+		    zone_name);
 	}
 
 	bzero(&cb, sizeof (cb));
@@ -323,8 +324,8 @@
  * sanity checking, and are careful to reuse a console if one exists.
  *
  * Once the device is in the device tree, we kick devfsadm via di_init_devs()
- * to ensure that the appropriate symlinks (to the master and slave console
- * devices) are placed in /dev in the global zone.
+ * to ensure that the appropriate symlinks (to the manager and subsidiary
+ * console devices) are placed in /dev in the global zone.
  */
 static int
 init_console_dev(zlog_t *zlogp)
@@ -336,8 +337,8 @@
 	di_devlink_handle_t dl = NULL;
 	int rv = -1;
 	int ndevs;
-	int masterfd;
-	int slavefd;
+	int managerfd;
+	int subfd;
 	int i;
 
 	/*
@@ -405,23 +406,26 @@
 	}
 
 	/*
-	 * Open the master side of the console and issue the ZC_HOLDSLAVE ioctl,
-	 * which will cause the master to retain a reference to the slave.
-	 * This prevents ttymon from blowing through the slave's STREAMS anchor.
+	 * Open the manager side of the console and issue the ZC_HOLDSUBSID
+	 * ioctl, which will cause the manager to retain a reference to the
+	 * subsidiary.  This prevents ttymon from blowing through the
+	 * subsidiary's STREAMS anchor.
 	 */
 	(void) snprintf(conspath, sizeof (conspath), "/dev/zcons/%s/%s",
-	    zone_name, ZCONS_MASTER_NAME);
-	if ((masterfd = open(conspath, O_RDWR | O_NOCTTY)) == -1) {
-		zerror(zlogp, B_TRUE, "ERROR: could not open master side of "
-		    "zone console for %s to acquire slave handle", zone_name);
+	    zone_name, ZCONS_MANAGER_NAME);
+	if ((managerfd = open(conspath, O_RDWR | O_NOCTTY)) == -1) {
+		zerror(zlogp, B_TRUE, "ERROR: could not open manager side of "
+		    "zone console for %s to acquire subsidiary handle",
+		    zone_name);
 		goto error;
 	}
 	(void) snprintf(conspath, sizeof (conspath), "/dev/zcons/%s/%s",
-	    zone_name, ZCONS_SLAVE_NAME);
-	if ((slavefd = open(conspath, O_RDWR | O_NOCTTY)) == -1) {
-		zerror(zlogp, B_TRUE, "ERROR: could not open slave side of zone"
-		    " console for %s to acquire slave handle", zone_name);
-		(void) close(masterfd);
+	    zone_name, ZCONS_SUBSIDIARY_NAME);
+	if ((subfd = open(conspath, O_RDWR | O_NOCTTY)) == -1) {
+		zerror(zlogp, B_TRUE, "ERROR: could not open subsidiary side "
+		    "of zone console for %s to acquire subsidiary handle",
+		    zone_name);
+		(void) close(managerfd);
 		goto error;
 	}
 	/*
@@ -430,7 +434,7 @@
 	 * 1 sec. and retry a few times before we fail to boot the zone.
 	 */
 	for (i = 0; i < 5; i++) {
-		if (ioctl(masterfd, ZC_HOLDSLAVE, (caddr_t)(intptr_t)slavefd)
+		if (ioctl(managerfd, ZC_HOLDSUBSID, (caddr_t)(intptr_t)subfd)
 		    == 0) {
 			rv = 0;
 			break;
@@ -440,11 +444,11 @@
 		(void) sleep(1);
 	}
 	if (rv != 0)
-		zerror(zlogp, B_TRUE, "ERROR: error while acquiring slave "
-		    "handle of zone console for %s", zone_name);
+		zerror(zlogp, B_TRUE, "ERROR: error while acquiring "
+		    "subsidiary handle of zone console for %s", zone_name);
 
-	(void) close(slavefd);
-	(void) close(masterfd);
+	(void) close(subfd);
+	(void) close(managerfd);
 
 error:
 	if (ddef_hdl)
@@ -700,7 +704,7 @@
 
 /*
  * This routine drives the console I/O loop.  It polls for input from the
- * master side of the console (output to the console), and from the client
+ * manager side of the console (output to the console), and from the client
  * (input from the console user).  Additionally, it polls on the server fd,
  * and disconnects any clients that might try to hook up with the zone while
  * the console is in use.
@@ -904,17 +908,17 @@
 void
 serve_console(zlog_t *zlogp)
 {
-	int masterfd;
+	int managerfd;
 	zone_state_t zstate;
 	char conspath[MAXPATHLEN];
 
 	(void) snprintf(conspath, sizeof (conspath),
-	    "/dev/zcons/%s/%s", zone_name, ZCONS_MASTER_NAME);
+	    "/dev/zcons/%s/%s", zone_name, ZCONS_MANAGER_NAME);
 
 	for (;;) {
-		masterfd = open(conspath, O_RDWR|O_NONBLOCK|O_NOCTTY);
-		if (masterfd == -1) {
-			zerror(zlogp, B_TRUE, "failed to open console master");
+		managerfd = open(conspath, O_RDWR|O_NONBLOCK|O_NOCTTY);
+		if (managerfd == -1) {
+			zerror(zlogp, B_TRUE, "failed to open console manager");
 			(void) mutex_lock(&lock);
 			goto death;
 		}
@@ -926,14 +930,14 @@
 		 * messages, we wouldn't be able to use read(2), as it fails
 		 * (EBADMSG) when a message with a control element is received.
 		 */
-		if (ioctl(masterfd, I_SRDOPT, RNORM|RPROTDIS) == -1) {
+		if (ioctl(managerfd, I_SRDOPT, RNORM|RPROTDIS) == -1) {
 			zerror(zlogp, B_TRUE, "failed to set options on "
-			    "console master");
+			    "console manager");
 			(void) mutex_lock(&lock);
 			goto death;
 		}
 
-		do_console_io(zlogp, masterfd, serverfd);
+		do_console_io(zlogp, managerfd, serverfd);
 
 		/*
 		 * We would prefer not to do this, but hostile zone processes
@@ -942,7 +946,7 @@
 		 * we dismantle the stream and reopen the console when we
 		 * take another lap.
 		 */
-		(void) close(masterfd);
+		(void) close(managerfd);
 
 		(void) mutex_lock(&lock);
 		/*
