summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2018-08-21 12:19:35 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2018-08-21 12:19:35 +0000
commitdce88dec0a5dd9849b881d131e2c0f78a5ba4c97 (patch)
tree653152535921827fa5b832bfb630be1472798678
parent2a62096fbdbe65bc486f0bb4d2a0b0c5dc85b423 (diff)
parent43f9d55fa4bea101f8b3961606dec0af0b38b2ab (diff)
downloadillumos-joyent-dce88dec0a5dd9849b881d131e2c0f78a5ba4c97.tar.gz
[illumos-gate merge]
commit 43f9d55fa4bea101f8b3961606dec0af0b38b2ab 9741 libi386: fix DEBUG messages in biosdisk commit e8fda3522f688f9e55aa251eafc9b42b78717d40 9740 libi386: use snprintf in biosdisk and style fixes commit 81a867407659fae007ac4ca95e5685c1d38fa5f1 9757 getent ipnodes has wrong exit status commit e153cda9f9660e385e8f468253f80e59f5d454d7 9754 grub: recent gcc needs -fno-reorder-functions commit d23a2a081683858fbc9fafc163b60bbd8c9ede13 9753 installgrub: hard coded partition 0 with GPT commit 74fbde0026523e948c17e57c29e2d53edad1c600 9750 pkgchk -l package list runs together commit 16b6a7e9a6f9116cc7c300e732be5000d82934e7 9737 send(3xnet) and friends are missing MSG_NOSIGNAL
-rw-r--r--usr/src/boot/sys/boot/i386/libi386/biosdisk.c14
-rw-r--r--usr/src/cmd/boot/installgrub/installgrub.c2
-rw-r--r--usr/src/cmd/getent/dogetipnodes.c14
-rw-r--r--usr/src/grub/grub-0.97/Makefile.solaris.defs1
-rw-r--r--usr/src/lib/libpkg/common/tputcfent.c26
-rw-r--r--usr/src/man/man3xnet/send.3xnet15
-rw-r--r--usr/src/man/man3xnet/sendmsg.3xnet24
-rw-r--r--usr/src/man/man3xnet/sendto.3xnet15
8 files changed, 66 insertions, 45 deletions
diff --git a/usr/src/boot/sys/boot/i386/libi386/biosdisk.c b/usr/src/boot/sys/boot/i386/libi386/biosdisk.c
index adc58dda25..a760a373fa 100644
--- a/usr/src/boot/sys/boot/i386/libi386/biosdisk.c
+++ b/usr/src/boot/sys/boot/i386/libi386/biosdisk.c
@@ -301,9 +301,8 @@ bd_print(int verbose)
('C' + bdinfo[i].bd_unit - 0x80),
(uintmax_t)bdinfo[i].bd_sectors,
bdinfo[i].bd_sectorsize);
- ret = pager_output(line);
- if (ret != 0)
- return (ret);
+ if ((ret = pager_output(line)) != 0)
+ break;
dev.dd.d_dev = &biosdisk;
dev.dd.d_unit = i;
@@ -312,11 +311,11 @@ bd_print(int verbose)
if (disk_open(&dev,
bdinfo[i].bd_sectorsize * bdinfo[i].bd_sectors,
bdinfo[i].bd_sectorsize) == 0) {
- sprintf(line, " disk%d", i);
+ snprintf(line, sizeof (line), " disk%d", i);
ret = disk_print(&dev, line, verbose);
disk_close(&dev);
if (ret != 0)
- return (ret);
+ break;
}
}
return (ret);
@@ -437,7 +436,6 @@ bd_strategy(void *devdata, int rw, daddr_t dblk, size_t size,
bcd.dv_strategy = bd_realstrategy;
bcd.dv_devdata = devdata;
bcd.dv_cache = BD(dev).bd_bcache;
-
return (bcache_strategy(&bcd, rw, dblk + dev->d_offset, size,
buf, rsize));
}
@@ -477,7 +475,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, size_t size,
* while translating block count to bytes.
*/
if (size > INT_MAX) {
- DEBUG("requested read: %zu too large", size);
+ DEBUG("too large I/O: %zu bytes", size);
return (EIO);
}
@@ -513,7 +511,7 @@ bd_realstrategy(void *devdata, int rw, daddr_t dblk, size_t size,
if (dblk + blks >= dev->d_offset + disk_blocks) {
blks = dev->d_offset + disk_blocks - dblk;
size = blks * BD(dev).bd_sectorsize;
- DEBUG("short read %d", blks);
+ DEBUG("short I/O %d", blks);
}
if (V86_IO_BUFFER_SIZE / BD(dev).bd_sectorsize == 0)
diff --git a/usr/src/cmd/boot/installgrub/installgrub.c b/usr/src/cmd/boot/installgrub/installgrub.c
index 9d95b37274..09c03fd1f4 100644
--- a/usr/src/cmd/boot/installgrub/installgrub.c
+++ b/usr/src/cmd/boot/installgrub/installgrub.c
@@ -741,8 +741,8 @@ get_start_sector(ig_device_t *device)
device->start_sector = vtoc->efi_parts[device->slice].p_start;
/* GPT doesn't use traditional slice letters */
+ device->partition = device->slice;
device->slice = 0xff;
- device->partition = 0;
efi_free(vtoc);
goto found_part;
diff --git a/usr/src/cmd/getent/dogetipnodes.c b/usr/src/cmd/getent/dogetipnodes.c
index 5196889870..a07852027a 100644
--- a/usr/src/cmd/getent/dogetipnodes.c
+++ b/usr/src/cmd/getent/dogetipnodes.c
@@ -19,9 +19,9 @@
*
* CDDL HEADER END
*/
-#ident "%Z%%M% %I% %E% SMI"
/*
+ * Copyright (c) 2018 Peter Tribble.
* Copyright (c) 1994-1999, by Sun Microsystems, Inc.
*/
@@ -56,7 +56,7 @@ puthostent(const struct hostent *hp, FILE *fp)
if (hp->h_addrtype == AF_INET6) {
if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)*p)) {
IN6_V4MAPPED_TO_INADDR((struct in6_addr *)*p,
- &in4);
+ &in4);
af = AF_INET;
addr = &in4;
} else {
@@ -99,8 +99,7 @@ dogetipnodes(const char **list)
int err_ret;
if (list == NULL || *list == NULL) {
- (void) fprintf(stdout,
- "Enumeration not supported on ipnodes\n");
+ rc = EXC_ENUM_NOT_SUPPORTED;
} else {
for (; *list != NULL; list++) {
if (strchr(*list, ':') != 0) {
@@ -115,11 +114,8 @@ dogetipnodes(const char **list)
if (inet_pton(af, *list, addr) == 1)
hp = getipnodebyaddr(addr, len, af, &err_ret);
else
- hp = getipnodebyname(
- *list,
- AF_INET6,
- AI_V4MAPPED|AI_ALL,
- &err_ret);
+ hp = getipnodebyname(*list, AF_INET6,
+ AI_V4MAPPED|AI_ALL, &err_ret);
if (hp == NULL)
rc = EXC_NAME_NOT_FOUND;
else
diff --git a/usr/src/grub/grub-0.97/Makefile.solaris.defs b/usr/src/grub/grub-0.97/Makefile.solaris.defs
index 6635364191..a7e68a5239 100644
--- a/usr/src/grub/grub-0.97/Makefile.solaris.defs
+++ b/usr/src/grub/grub-0.97/Makefile.solaris.defs
@@ -76,6 +76,7 @@ LINK = $(CCLD) $(LINKFLAGS) $(LDFLAGS)
DEFS = -DHAVE_CONFIG_H -DSOLARIS_NETBOOT
OPTFLAGS = -falign-jumps=1 -falign-loops=1 -falign-functions=1
+OPTFLAGS += -fno-reorder-functions
#WARNFLAGS = -Wall -Wmissing-prototypes -Wunused -Wshadow \
# -Wpointer-arith -Wundef
diff --git a/usr/src/lib/libpkg/common/tputcfent.c b/usr/src/lib/libpkg/common/tputcfent.c
index 11601ded9e..3b613a29c6 100644
--- a/usr/src/lib/libpkg/common/tputcfent.c
+++ b/usr/src/lib/libpkg/common/tputcfent.c
@@ -57,36 +57,36 @@ tputcfent(struct cfent *ept, FILE *fp)
(void) fprintf(fp, pkg_gt("Type: "));
switch (ept->ftype) {
- case 'f':
+ case 'f':
(void) fputs(pkg_gt("regular file\n"), fp);
break;
- case 'd':
+ case 'd':
(void) fputs(pkg_gt("directory\n"), fp);
break;
- case 'x':
+ case 'x':
(void) fputs(pkg_gt("exclusive directory\n"), fp);
break;
- case 'v':
+ case 'v':
(void) fputs(pkg_gt("volatile file\n"), fp);
break;
- case 'e':
+ case 'e':
(void) fputs(pkg_gt("editted file\n"), fp);
break;
- case 'p':
+ case 'p':
(void) fputs(pkg_gt("named pipe\n"), fp);
break;
- case 'i':
+ case 'i':
(void) fputs(pkg_gt("installation file\n"), fp);
break;
- case 'c':
- case 'b':
+ case 'c':
+ case 'b':
(void) fprintf(fp, pkg_gt("%s special device\n"),
(ept->ftype == 'b') ? pkg_gt("block") :
pkg_gt("character"));
@@ -107,21 +107,21 @@ tputcfent(struct cfent *ept, FILE *fp)
break;
- case 'l':
+ case 'l':
(void) fputs(pkg_gt("linked file\n"), fp);
pt = (ept->ainfo.local ? ept->ainfo.local :
(char *)pkg_gt("(unknown)"));
(void) fprintf(fp, pkg_gt("Source of link: %s\n"), pt);
break;
- case 's':
+ case 's':
(void) fputs(pkg_gt("symbolic link\n"), fp);
pt = (ept->ainfo.local ? ept->ainfo.local :
(char *)pkg_gt("(unknown)"));
(void) fprintf(fp, pkg_gt("Source of link: %s\n"), pt);
break;
- default:
+ default:
(void) fputs(pkg_gt("unknown\n"), fp);
break;
}
@@ -174,7 +174,7 @@ tputcfent(struct cfent *ept, FILE *fp)
*/
if (pinfo->status == '!')
status++;
- (void) fprintf(fp, "%-15s", pinfo->pkg);
+ (void) fprintf(fp, "%-14s ", pinfo->pkg);
if ((++count % 5) == 0) {
(void) fputc('\n', fp);
(void) fputc('\t', fp);
diff --git a/usr/src/man/man3xnet/send.3xnet b/usr/src/man/man3xnet/send.3xnet
index 90ed5523f6..63174c8f28 100644
--- a/usr/src/man/man3xnet/send.3xnet
+++ b/usr/src/man/man3xnet/send.3xnet
@@ -43,7 +43,7 @@
.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
.\" Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
.\"
-.TH SEND 3XNET "Dec 3, 2014"
+.TH SEND 3XNET "Aug 16, 2018"
.SH NAME
send \- send a message on a socket
.SH SYNOPSIS
@@ -109,6 +109,16 @@ Sends out-of-band data on sockets that support out-of-band communications. The
significance and semantics of out-of-band data are protocol-specific.
.RE
+.sp
+.ne 2
+.na
+\fB\fBMSG_NOSIGNAL\fR\fR
+.ad
+.RS 11n
+Don't generate the \fBSIGPIPE\fR signal when a stream-oriented socket is no
+longer connected.
+.RE
+
.RE
.SH DESCRIPTION
@@ -256,7 +266,8 @@ or more of the values set in \fIflags\fR.
.RS 16n
The socket is shut down for writing, or the socket is connection-mode and is no
longer connected. In the latter case, and if the socket is of type
-\fBSOCK_STREAM\fR, the \fBSIGPIPE\fR signal is generated to the calling thread.
+\fBSOCK_STREAM\fR, the \fBSIGPIPE\fR signal is generated to the calling thread
+unless the \fBMSG_NOSIGNAL\fR flag is set.
.RE
.sp
diff --git a/usr/src/man/man3xnet/sendmsg.3xnet b/usr/src/man/man3xnet/sendmsg.3xnet
index a5c9298bf8..381db99348 100644
--- a/usr/src/man/man3xnet/sendmsg.3xnet
+++ b/usr/src/man/man3xnet/sendmsg.3xnet
@@ -43,7 +43,7 @@
.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
.\" Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
.\"
-.TH SENDMSG 3XNET "Nov 1, 2003"
+.TH SENDMSG 3XNET "Aug 16, 2018"
.SH NAME
sendmsg \- send a message on a socket using a message structure
.SH SYNOPSIS
@@ -56,7 +56,6 @@ sendmsg \- send a message on a socket using a message structure
.fi
.SH PARAMETERS
-.sp
.LP
The function takes the following arguments:
.sp
@@ -107,10 +106,19 @@ Sends out-of-band data on sockets that support out-of-bound data. The
significance and semantics of out-of-band data are protocol-specific.
.RE
+.sp
+.ne 2
+.na
+\fB\fBMSG_NOSIGNAL\fR\fR
+.ad
+.RS 11n
+Don't generate the \fBSIGPIPE\fR signal when a stream-oriented socket is no
+longer connected.
+.RE
+
.RE
.SH DESCRIPTION
-.sp
.LP
The \fBsendmsg()\fR function sends a message through a connection-mode or
connectionless-mode socket. If the socket is connectionless-mode, the message
@@ -147,18 +155,15 @@ broadcast address for the socket protocol, \fBsendmsg()\fR will fail if the
The socket in use may require the process to have appropriate privileges to use
the \fBsendmsg()\fR function.
.SH USAGE
-.sp
.LP
The \fBselect\fR(3C) and \fBpoll\fR(2) functions can be used to determine when
it is possible to send more data.
.SH RETURN VALUES
-.sp
.LP
Upon successful completion, \fBsendmsg()\fR function returns the number of
bytes sent. Otherwise, \(mi1 is returned and \fBerrno\fR is set to indicate
the error.
.SH ERRORS
-.sp
.LP
The \fBsendmsg()\fR function will fail if:
.sp
@@ -278,8 +283,9 @@ or more of the values set in \fIflags\fR.
.ad
.RS 16n
The socket is shut down for writing, or the socket is connection-mode and is no
-longer connected. In the latter case, and if the socket is of type SOCK_STREAM,
-the \fBSIGPIPE\fR signal is generated to the calling thread.
+longer connected. In the latter case, and if the socket is of type
+\fBSOCK_STREAM\fR, the \fBSIGPIPE\fR signal is generated to the calling thread
+unless the \fBMSG_NOSIGNAL\fR flag is set.
.RE
.sp
@@ -447,7 +453,6 @@ length exceeds \fIPATH_MAX\fR.
.RE
.SH ATTRIBUTES
-.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp
@@ -465,7 +470,6 @@ MT-Level MT-Safe
.TE
.SH SEE ALSO
-.sp
.LP
\fBpoll\fR(2) \fBgetsockopt\fR(3XNET), \fBrecv\fR(3XNET),
\fBrecvfrom\fR(3XNET), \fBrecvmsg\fR(3XNET), \fBselect\fR(3C),
diff --git a/usr/src/man/man3xnet/sendto.3xnet b/usr/src/man/man3xnet/sendto.3xnet
index 0c2d9febda..b311a3f05c 100644
--- a/usr/src/man/man3xnet/sendto.3xnet
+++ b/usr/src/man/man3xnet/sendto.3xnet
@@ -43,7 +43,7 @@
.\" Copyright (c) 1992, X/Open Company Limited. All Rights Reserved.
.\" Portions Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved.
.\"
-.TH SENDTO 3XNET "Nov 1, 2003"
+.TH SENDTO 3XNET "Aug 16, 2018"
.SH NAME
sendto \- send a message on a socket
.SH SYNOPSIS
@@ -144,6 +144,16 @@ Sends out-of-band data on sockets that support out-of-band data. The
significance and semantics of out-of-band data are protocol-specific.
.RE
+.sp
+.ne 2
+.na
+\fB\fBMSG_NOSIGNAL\fR\fR
+.ad
+.RS 11n
+Don't generate the \fBSIGPIPE\fR signal when a stream-oriented socket is no
+longer connected.
+.RE
+
.RE
.sp
@@ -281,7 +291,8 @@ or more of the values set in \fIflags\fR.
.RS 16n
The socket is shut down for writing, or the socket is connection-mode and is no
longer connected. In the latter case, and if the socket is of type
-\fBSOCK_STREAM\fR, the \fBSIGPIPE\fR signal is generated to the calling thread.
+\fBSOCK_STREAM\fR, the \fBSIGPIPE\fR signal is generated to the calling thread
+unless the \fBMSG_NOSIGNAL\fR flag is set.
.RE
.sp