summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorAndy Fiddaman <omnios@citrus-it.co.uk>2019-02-18 11:46:11 +0000
committerAndy Fiddaman <omnios@citrus-it.co.uk>2019-02-20 21:18:00 +0000
commitaf34582fe571c99d9f74acf7c271e26c744fef5b (patch)
treed60eb479e1045d750301e16a2892d1f3e6077022 /usr/src
parentffe245b40fe1731e6f0ea5c097a74eb78bc839e2 (diff)
downloadillumos-joyent-af34582fe571c99d9f74acf7c271e26c744fef5b.tar.gz
10416 zoneadmd leaves trailing comma on link address
Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: C Fraire <cfraire@me.com> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Robert Mustacchi <rm@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/zoneadmd/vplat.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/usr/src/cmd/zoneadmd/vplat.c b/usr/src/cmd/zoneadmd/vplat.c
index d76fbbf9f7..4a2d94605b 100644
--- a/usr/src/cmd/zoneadmd/vplat.c
+++ b/usr/src/cmd/zoneadmd/vplat.c
@@ -23,6 +23,7 @@
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, Joyent Inc. All rights reserved.
* Copyright (c) 2015, 2016 by Delphix. All rights reserved.
+ * Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
*/
/*
@@ -137,7 +138,7 @@
#define DFSTYPES "/etc/dfs/fstypes"
#define MAXTNZLEN 2048
-#define ALT_MOUNT(mount_cmd) ((mount_cmd) != Z_MNT_BOOT)
+#define ALT_MOUNT(mount_cmd) ((mount_cmd) != Z_MNT_BOOT)
/* a reasonable estimate for the number of lwps per process */
#define LWPS_PER_PROCESS 10
@@ -1098,7 +1099,7 @@ mount_one_dev(zlog_t *zlogp, char *devpath, zone_mnt_t mount_cmd)
int err;
int retval = -1;
zone_iptype_t iptype;
- const char *curr_iptype;
+ const char *curr_iptype;
if (di_prof_init(devpath, &prof)) {
zerror(zlogp, B_TRUE, "failed to initialize profile");
@@ -1341,13 +1342,13 @@ free_fs_data(struct zone_fstab *fsarray, uint_t nelem)
* scratch zone. The Environment creation process is split up into two
* functions(build_mounted_pre_var() and build_mounted_post_var()). It
* is done this way because:
- * We need to have both /etc and /var in the root of the scratchzone.
- * We loopback mount zone's own /etc and /var into the root of the
- * scratch zone. Unlike /etc, /var can be a seperate filesystem. So we
- * need to delay the mount of /var till the zone's root gets populated.
+ * We need to have both /etc and /var in the root of the scratchzone.
+ * We loopback mount zone's own /etc and /var into the root of the
+ * scratch zone. Unlike /etc, /var can be a seperate filesystem. So we
+ * need to delay the mount of /var till the zone's root gets populated.
* So mounting of localdirs[](/etc and /var) have been moved to the
- * build_mounted_post_var() which gets called only after the zone
- * specific filesystems are mounted.
+ * build_mounted_post_var() which gets called only after the zone
+ * specific filesystems are mounted.
*
* Note that the scratch zone we set up for updating the zone (Z_MNT_UPDATE)
* does not loopback mount the zone's own /etc and /var into the root of the
@@ -2707,7 +2708,7 @@ add_net_for_linkid(zlog_t *zlogp, zoneid_t zoneid, zone_addr_list_t *start)
goto done;
/* over-write last ',' with '\0' */
- zaddr[strnlen(zaddr, zlen) + 1] = '\0';
+ zaddr[strnlen(zaddr, zlen) - 1] = '\0';
/*
* First make sure L3 protection is not already set on the link.