summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorDan McDonald <danmcd@joyent.com>2020-12-03 10:46:48 -0500
committerDan McDonald <danmcd@joyent.com>2020-12-03 10:46:49 -0500
commit84a6be98347651eeb39ef32ed6f45a91eb4b410d (patch)
tree6696c4a28f654db7560098f30a8ea2f4a4422121 /usr/src
parentd79b46fa6a6b38bd45268af896a043dde714b38a (diff)
parent8af575c0afc1d79bd23c3e1a78a546c9963e5083 (diff)
downloadillumos-joyent-84a6be98347651eeb39ef32ed6f45a91eb4b410d.tar.gz
[illumos-gate merge]
commit 8af575c0afc1d79bd23c3e1a78a546c9963e5083 13340 zoneadmd shouldn't rely on autofs commit 2e8cdddb340293882c888e83152059f02ec5d59b 13333 spellcheck1 doesn't zero table memory Conflicts: usr/src/cmd/zoneadmd/vplat.c
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/spell/Makefile18
-rw-r--r--usr/src/cmd/spell/spellin.c10
-rw-r--r--usr/src/cmd/zoneadmd/vplat.c11
3 files changed, 23 insertions, 16 deletions
diff --git a/usr/src/cmd/spell/Makefile b/usr/src/cmd/spell/Makefile
index 0aab579243..e0af91a7f0 100644
--- a/usr/src/cmd/spell/Makefile
+++ b/usr/src/cmd/spell/Makefile
@@ -113,19 +113,19 @@ htemp1: list local extra hashmk1
$(RM) $@; cat list local extra | $(_SH_) ./hashmk1 > $@
hlista: american $(HASHPROG) htemp1
- $(RM) htemp2; ./hashmk1 <american |sort -u - htemp1 >htemp2
- $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@
- $(RM) htemp2
+ $(RM) htemp2a; ./hashmk1 <american |sort -u - htemp1 >htemp2a
+ $(RM) $@; ./spellin1 `wc htemp2a|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2a >$@
+ $(RM) htemp2a
hlistb: british $(HASHPROG) htemp1
- $(RM) htemp2; ./hashmk1 <british |sort -u - htemp1 >htemp2
- $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@
- $(RM) htemp2
+ $(RM) htemp2b; ./hashmk1 <british |sort -u - htemp1 >htemp2b
+ $(RM) $@; ./spellin1 `wc htemp2b|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2b >$@
+ $(RM) htemp2b
hstop: stop $(HASHPROG)
- $(RM) htemp2; ./hashmk1 <stop | sort -u >htemp2
- $(RM) $@; ./spellin1 `wc htemp2|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2 >$@
- $(RM) htemp2
+ $(RM) htemp2s; ./hashmk1 <stop | sort -u >htemp2s
+ $(RM) $@; ./spellin1 `wc htemp2s|sed -n 's/\([^ ]\) .*/\1/p'`<htemp2s >$@
+ $(RM) htemp2s
install: all $(ROOTDIRS) $(ROOTBINF) $(ROOTSPELLF) $(ROOTVARADMF)
diff --git a/usr/src/cmd/spell/spellin.c b/usr/src/cmd/spell/spellin.c
index cfc253702b..afbdc6b0e4 100644
--- a/usr/src/cmd/spell/spellin.c
+++ b/usr/src/cmd/spell/spellin.c
@@ -25,11 +25,9 @@
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
-/* All Rights Reserved */
+/* All Rights Reserved */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -97,7 +95,7 @@ main(int argc, char **argv)
(void) fprintf(stderr, gettext("%s: arg count\n"), argv[0]);
exit(1);
}
- table = (unsigned *)malloc(ND * sizeof (*table));
+ table = (unsigned *)calloc(ND, sizeof (*table));
if (table == 0) {
(void) fprintf(stderr, gettext("%s: no space for table\n"),
argv[0]);
@@ -129,8 +127,8 @@ main(int argc, char **argv)
break;
}
if (i > B) {
- if (!(append((unsigned)(w1>>(long) (i-B)), B) &&
- append((unsigned)(w1<<(long) (B+B-i)),
+ if (!(append((unsigned)(w1>>(long)(i-B)), B) &&
+ append((unsigned)(w1<<(long)(B+B-i)),
i-B)))
ignore++;
} else
diff --git a/usr/src/cmd/zoneadmd/vplat.c b/usr/src/cmd/zoneadmd/vplat.c
index 01332d43e8..6bb818c8b9 100644
--- a/usr/src/cmd/zoneadmd/vplat.c
+++ b/usr/src/cmd/zoneadmd/vplat.c
@@ -24,6 +24,7 @@
* Copyright 2018, Joyent Inc.
* Copyright (c) 2015, 2016 by Delphix. All rights reserved.
* Copyright 2019 OmniOS Community Edition (OmniOSce) Association.
+ * Copyright 2020 RackTop Systems Inc.
*/
/*
@@ -220,10 +221,18 @@ extern int _autofssys(int, void *);
static int
autofs_cleanup(zoneid_t zoneid)
{
+ int r;
+
/*
* Ask autofs to unmount all trigger nodes in the given zone.
+ * Handle ENOSYS in the case that the autofs kernel module is not
+ * installed.
*/
- return (_autofssys(AUTOFS_UNMOUNTALL, (void *)((uintptr_t)zoneid)));
+ r = _autofssys(AUTOFS_UNMOUNTALL, (void *)((uintptr_t)zoneid));
+ if (r != 0 && errno == ENOSYS) {
+ return (0);
+ }
+ return (r);
}
static void