summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2018-05-14 12:09:31 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2018-05-14 12:09:31 +0000
commitf9b2546bbcb539268f3a40c8f3e6d32ffb2b469d (patch)
tree0cbbfaa894af1aa629fed2b04e00cf6dfc10a8a8
parent954158f9265ac07fdc3bf32148c92bdb65f72e06 (diff)
parentdfec2ecfa1713daac7f3cdf7c6dc2cf4f09a4ee3 (diff)
downloadillumos-joyent-f9b2546bbcb539268f3a40c8f3e6d32ffb2b469d.tar.gz
[illumos-gate merge]
commit dfec2ecfa1713daac7f3cdf7c6dc2cf4f09a4ee3 9525 kmem_dump_size is a corrupting influence commit 84f2736904a911587ccd1cf1e4543493fcab31f4 8454 libzpool build fails if no LINTLIB after 7431 commit 8dc6d85a3768199d9f1acfd636fa366067f4aa18 9527 assert.h: static_assert macro should be guarded by !defined(__cplusplus) commit 924d84dc7aa9fc64a9236547607679645a139d85 9469 pxeboot should default to TFTP in absence of root-path 9470 pxeboot should assume / if no path provided in root-path 9471 pxeboot.5 example ISC DHCP daemon syntax does not work commit 0b09d754d66bb2026be92bbbc38f7c8ba454cf0c 9355 truss: this statement may fall through
-rw-r--r--usr/src/boot/sys/boot/common/dev_net.c25
-rw-r--r--usr/src/cmd/mdb/common/modules/genunix/kmem.c2
-rw-r--r--usr/src/cmd/truss/expound.c10
-rw-r--r--usr/src/head/assert.h5
-rw-r--r--usr/src/lib/libzpool/Makefile.com3
-rw-r--r--usr/src/man/man5/pxeboot.513
-rw-r--r--usr/src/uts/common/fs/zfs/lua/lstrlib.c8
7 files changed, 48 insertions, 18 deletions
diff --git a/usr/src/boot/sys/boot/common/dev_net.c b/usr/src/boot/sys/boot/common/dev_net.c
index 46b5481222..1814d3e682 100644
--- a/usr/src/boot/sys/boot/common/dev_net.c
+++ b/usr/src/boot/sys/boot/common/dev_net.c
@@ -27,6 +27,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+/*
+ * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
+ */
+
#include <sys/cdefs.h>
/*
@@ -362,6 +366,8 @@ net_print(int verbose)
* If an IPv4 address has been specified, it will be stripped out and passed
* out as the return value of this function in network byte order.
*
+ * If no rootpath is present then we will default to TFTP.
+ *
* If no global default scheme has been specified and no scheme has been
* specified, we will assume that this is an NFS URL.
*
@@ -388,11 +394,15 @@ net_parse_rootpath(void)
ptr = rootpath;
/* Fallback for compatibility mode */
if (netproto == NET_NONE) {
- netproto = NET_NFS;
- (void) strsep(&ptr, ":");
- if (ptr != NULL) {
- addr = inet_addr(rootpath);
- bcopy(ptr, rootpath, strlen(ptr) + 1);
+ if (strcmp(rootpath, "/") == 0) {
+ netproto = NET_TFTP;
+ } else {
+ netproto = NET_NFS;
+ (void) strsep(&ptr, ":");
+ if (ptr != NULL) {
+ addr = inet_addr(rootpath);
+ bcopy(ptr, rootpath, strlen(ptr) + 1);
+ }
}
} else {
ptr += strlen(uri_schemes[i].scheme);
@@ -405,6 +415,11 @@ net_parse_rootpath(void)
* Also will need rework for IPv6.
*/
val = strchr(ptr, '/');
+ if (val == NULL) {
+ /* If no pathname component, default to / */
+ strlcat(rootpath, "/", sizeof (rootpath));
+ val = strchr(ptr, '/');
+ }
if (val != NULL) {
snprintf(ip, sizeof (ip), "%.*s",
(int)((uintptr_t)val - (uintptr_t)ptr),
diff --git a/usr/src/cmd/mdb/common/modules/genunix/kmem.c b/usr/src/cmd/mdb/common/modules/genunix/kmem.c
index 6efa51e3b6..1878046337 100644
--- a/usr/src/cmd/mdb/common/modules/genunix/kmem.c
+++ b/usr/src/cmd/mdb/common/modules/genunix/kmem.c
@@ -24,7 +24,7 @@
*/
/*
- * Copyright (c) 2018, Joyent, Inc. All rights reserved.
+ * Copyright 2018 Joyent, Inc. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
*/
diff --git a/usr/src/cmd/truss/expound.c b/usr/src/cmd/truss/expound.c
index ce98740cfa..6372e583ba 100644
--- a/usr/src/cmd/truss/expound.c
+++ b/usr/src/cmd/truss/expound.c
@@ -1171,8 +1171,8 @@ static const struct audio_stuff audio_sw_features[] = {
void
show_audio_features(const private_t *pri,
- const struct audio_stuff *audio_porttab, uint_t features,
- const char *name)
+ const struct audio_stuff *audio_porttab, uint_t features,
+ const char *name)
{
(void) printf("%s\t%s=", pri->pname, name);
if (features == 0) {
@@ -1195,7 +1195,7 @@ show_audio_features(const private_t *pri,
void
show_audio_ports(private_t *pri, const char *mode,
- const char *field, uint_t ports)
+ const char *field, uint_t ports)
{
const struct audio_stuff *audio_porttab;
@@ -3495,7 +3495,7 @@ show_adjtime(private_t *pri, long off1, long off2)
void
show_sockaddr(private_t *pri,
- const char *str, long addroff, long lenoff, long len)
+ const char *str, long addroff, long lenoff, long len)
{
/*
* A buffer large enough for PATH_MAX size AF_UNIX address, which is
@@ -5268,11 +5268,11 @@ expound(private_t *pri, long r0, int raw)
show_dents32(pri, (long)pri->sys_args[1], r0);
break;
}
- /* FALLTHROUGH */
#else
show_dents32(pri, (long)pri->sys_args[1], r0);
break;
#endif
+ /* FALLTHROUGH */
case SYS_getdents64:
if (err || pri->sys_nargs <= 1 || r0 <= 0)
break;
diff --git a/usr/src/head/assert.h b/usr/src/head/assert.h
index ee313af950..d2c2e154a2 100644
--- a/usr/src/head/assert.h
+++ b/usr/src/head/assert.h
@@ -25,6 +25,7 @@
/*
* Copyright 2014 Garrett D'Amore <garrett@damore.org>
* Copyright 2016 Joyent, Inc.
+ * Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
@@ -46,9 +47,9 @@ extern void __assert(const char *, const char *, int);
/*
* In C11 the static_assert macro is always defined, unlike the assert macro.
*/
-#if __STDC_VERSION__ - 0 >= 201112L
+#if __STDC_VERSION__ - 0 >= 201112L && !defined(__cplusplus)
#define static_assert _Static_assert
-#endif /* __STDC_VERSION - 0 >= 201112L */
+#endif /* __STDC_VERSION - 0 >= 201112L && !defined(__cplusplus) */
#ifdef __cplusplus
}
diff --git a/usr/src/lib/libzpool/Makefile.com b/usr/src/lib/libzpool/Makefile.com
index e6b5a43695..1faef17cd7 100644
--- a/usr/src/lib/libzpool/Makefile.com
+++ b/usr/src/lib/libzpool/Makefile.com
@@ -48,7 +48,7 @@ SRCDIR= ../common
# There should be a mapfile here
MAPFILES =
-LIBS += $(LINTLIB) $(DYNLIB)
+LIBS += $(DYNLIB) $(LINTLIB)
INCS += -I../common
INCS += -I../../../uts/common/fs/zfs
@@ -61,6 +61,7 @@ CLEANFILES += $(EXTPICS)
$(LINTLIB) := SRCS= $(SRCDIR)/$(LINTSRC)
$(LINTLIB): ../common/zfs.h
+$(LIBS): ../common/zfs.h
CSTD= $(CSTD_GNU99)
C99LMODE= -Xc99=%all
diff --git a/usr/src/man/man5/pxeboot.5 b/usr/src/man/man5/pxeboot.5
index 5e0a820420..0954d585bc 100644
--- a/usr/src/man/man5/pxeboot.5
+++ b/usr/src/man/man5/pxeboot.5
@@ -22,7 +22,9 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd May 28, 2017
+.\" Copyright 2018 OmniOS Community Edition (OmniOSce) Association.
+.\"
+.Dd Apr 13, 2018
.Dt PXEBOOT 5
.Os
.Sh NAME
@@ -52,7 +54,7 @@ The
.Nm
binary is loaded just like any other boot file,
by specifying it in the DHCP server's configuration file.
-Below is a sample configuration for the ISC DHCP v2 server:
+Below is a sample configuration for the ISC DHCP server:
.Bd -literal -offset indent
option domain-name "example.com";
option routers 10.0.0.1;
@@ -68,7 +70,7 @@ max-lease-time 120;
subnet 10.0.0.0 netmask 255.255.255.0 {
filename "pxeboot";
range 10.0.0.10 10.0.0.254;
- if exists user-class and option user-class = "illumos" {
+ if exists user-class and option user-class ~~ "illumos" {
option root-path "tftp://10.0.0.1/illumos";
}
}
@@ -114,6 +116,11 @@ defaults to using NFS if the
variable is in the
.Qq Pa ip-address Ns :/ Ns Pa path
form, otherwise TFTP is used.
+If no
+.Va root-path
+option is set in the DHCP response,
+.Nm
+defaults to using TFTP.
.Pp
.Nm
defaults to a conservative 1024 byte NFS data packet size.
diff --git a/usr/src/uts/common/fs/zfs/lua/lstrlib.c b/usr/src/uts/common/fs/zfs/lua/lstrlib.c
index eef8508c4d..82c585a5f1 100644
--- a/usr/src/uts/common/fs/zfs/lua/lstrlib.c
+++ b/usr/src/uts/common/fs/zfs/lua/lstrlib.c
@@ -34,7 +34,6 @@
*/
#define tolower(C) (((C) >= 'A' && (C) <= 'Z') ? (C) - 'A' + 'a' : (C))
#define toupper(C) (((C) >= 'a' && (C) <= 'z') ? (C) - 'a' + 'A': (C))
-#define iscntrl(C) ((((C) >= 0) && ((C) <= 0x1f)) || ((C) == 0x7f))
#define isgraph(C) ((C) >= 0x21 && (C) <= 0x7E)
#define ispunct(C) (((C) >= 0x21 && (C) <= 0x2F) || \
((C) >= 0x3A && (C) <= 0x40) || \
@@ -287,6 +286,13 @@ static const char *classend (MatchState *ms, const char *p) {
}
+static int
+iscntrl(int c)
+{
+ return ((c < 0x20) || (c == 0x7f));
+}
+
+
static int match_class (int c, int cl) {
int res;
switch (tolower(cl)) {