summaryrefslogtreecommitdiff
path: root/usr/src/uts/common
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2016-02-07 18:36:13 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2016-02-07 18:36:13 +0000
commitc4f6fbdceaec2d64d6bb7dba46d91ef61c0983ca (patch)
treeae4c2c23f880a979e356abde0b48b22eebc9d0e7 /usr/src/uts/common
parenta07632cea359a68576961f7b45238a6a37a82945 (diff)
parent6d6fcbbb256ba9a8fe3e6076ae8a1f493b1f1a99 (diff)
downloadillumos-joyent-c4f6fbdceaec2d64d6bb7dba46d91ef61c0983ca.tar.gz
[illumos-gate merge]
commit 6d6fcbbb256ba9a8fe3e6076ae8a1f493b1f1a99 6600 cmd/fm should use the msgfmt(1) that Makefile.master tells it to commit aeac2d873b68a43f6650e0d0f021c02f5a653a21 6606 pysolaris has no translations but pretends otherwise commit f3b6506e5de00944c5a877f02a83b5e850f37ef5 6564 F_FLOCKW and F_FLOCK are undefined symbols in SPARC build commit 238d8f47d92b5b99a374f9639e0704420d3aef77 6601 Various GLD drivers return EINVAL instead of ENOTSUP for unused mac_prop_id_t's commit 4870e0a7381ec2ec57437062574e6ddc3dd48d7f 6582 initial reorg adding sys/null.h for 5218 6487 clean up __STDC__ ifdefs in rpcsvc/dbm.h 6563 fmtmsg.h should be simplified and neither define NULL nor _NULL Conflicts: usr/src/lib/Makefile
Diffstat (limited to 'usr/src/uts/common')
-rw-r--r--usr/src/uts/common/fs/nfs/nfs_strerror.c7
-rw-r--r--usr/src/uts/common/io/hxge/hxge_main.c7
-rw-r--r--usr/src/uts/common/io/igb/igb_gld.c5
-rw-r--r--usr/src/uts/common/io/ixgbe/ixgbe_gld.c5
-rw-r--r--usr/src/uts/common/io/nxge/nxge_main.c5
-rw-r--r--usr/src/uts/common/io/vnic/vnic_dev.c3
-rw-r--r--usr/src/uts/common/os/iscsiboot_prop.c5
-rw-r--r--usr/src/uts/common/rpc/types.h7
-rw-r--r--usr/src/uts/common/sys/Makefile1
-rw-r--r--usr/src/uts/common/sys/null.h29
-rw-r--r--usr/src/uts/common/sys/param.h9
-rw-r--r--usr/src/uts/common/sys/sysevent.h9
12 files changed, 50 insertions, 42 deletions
diff --git a/usr/src/uts/common/fs/nfs/nfs_strerror.c b/usr/src/uts/common/fs/nfs/nfs_strerror.c
index 8fa36b5e93..40fdf070b0 100644
--- a/usr/src/uts/common/fs/nfs/nfs_strerror.c
+++ b/usr/src/uts/common/fs/nfs/nfs_strerror.c
@@ -24,8 +24,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* This file contains code to support better NFS error messages. Death to
* integer codes in user error messages!
@@ -35,15 +33,12 @@
*/
#include <nfs/nfs.h>
+#include <sys/null.h>
#include <sys/systm.h>
#include <sys/cmn_err.h>
#include <sys/errno.h>
#include <sys/varargs.h>
-#ifndef NULL
-#define NULL 0
-#endif
-
/* size of a temporary printf format buffer. */
#define FMT_BUF_SIZE 1024
diff --git a/usr/src/uts/common/io/hxge/hxge_main.c b/usr/src/uts/common/io/hxge/hxge_main.c
index 12e43ecedb..102b7cb285 100644
--- a/usr/src/uts/common/io/hxge/hxge_main.c
+++ b/usr/src/uts/common/io/hxge/hxge_main.c
@@ -22,6 +22,7 @@
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
* Copyright 2012 Milan Jurik. All rights reserved.
+ * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
*/
/*
@@ -3321,7 +3322,7 @@ hxge_m_getprop(void *barg, const char *pr_name, mac_prop_id_t pr_num,
break;
default:
- err = EINVAL;
+ err = ENOTSUP;
break;
}
@@ -3433,7 +3434,7 @@ hxge_set_priv_prop(p_hxge_t hxgep, const char *pr_name, uint_t pr_valsize,
err = hxge_param_set_ip_opt(hxgep, NULL, NULL, (char *)pr_val,
(caddr_t)&param_arr[param_class_opt_ipv6_sctp]);
} else {
- err = EINVAL;
+ err = ENOTSUP;
}
HXGE_DEBUG_MSG((hxgep, DLADM_CTL,
@@ -3503,7 +3504,7 @@ hxge_get_priv_prop(p_hxge_t hxgep, const char *pr_name, uint_t pr_valsize,
value = (int)param_arr[param_class_opt_ipv6_sctp].value;
} else {
- err = EINVAL;
+ err = ENOTSUP;
}
if (err == 0) {
diff --git a/usr/src/uts/common/io/igb/igb_gld.c b/usr/src/uts/common/io/igb/igb_gld.c
index a97dc5aee1..d754c79949 100644
--- a/usr/src/uts/common/io/igb/igb_gld.c
+++ b/usr/src/uts/common/io/igb/igb_gld.c
@@ -27,6 +27,7 @@
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2013, Nexenta Systems, Inc. All rights reserved.
* Copyright 2014 Pluribus Networks Inc.
+ * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
*/
#include "igb_sw.h"
@@ -1116,7 +1117,7 @@ setup_link:
err = igb_set_priv_prop(igb, pr_name, pr_valsize, pr_val);
break;
default:
- err = EINVAL;
+ err = ENOTSUP;
break;
}
@@ -1218,7 +1219,7 @@ igb_m_getprop(void *arg, const char *pr_name, mac_prop_id_t pr_num,
err = igb_get_priv_prop(igb, pr_name, pr_valsize, pr_val);
break;
default:
- err = EINVAL;
+ err = ENOTSUP;
break;
}
return (err);
diff --git a/usr/src/uts/common/io/ixgbe/ixgbe_gld.c b/usr/src/uts/common/io/ixgbe/ixgbe_gld.c
index bfce23ddd9..4501451d99 100644
--- a/usr/src/uts/common/io/ixgbe/ixgbe_gld.c
+++ b/usr/src/uts/common/io/ixgbe/ixgbe_gld.c
@@ -26,6 +26,7 @@
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
*/
#include "ixgbe_sw.h"
@@ -431,7 +432,7 @@ setup_link:
err = ixgbe_set_priv_prop(ixgbe, pr_name, pr_valsize, pr_val);
break;
default:
- err = EINVAL;
+ err = ENOTSUP;
break;
}
mutex_exit(&ixgbe->gen_lock);
@@ -504,7 +505,7 @@ ixgbe_m_getprop(void *arg, const char *pr_name, mac_prop_id_t pr_num,
pr_valsize, pr_val);
break;
default:
- err = EINVAL;
+ err = ENOTSUP;
break;
}
return (err);
diff --git a/usr/src/uts/common/io/nxge/nxge_main.c b/usr/src/uts/common/io/nxge/nxge_main.c
index e07682c932..a2ef343c76 100644
--- a/usr/src/uts/common/io/nxge/nxge_main.c
+++ b/usr/src/uts/common/io/nxge/nxge_main.c
@@ -20,6 +20,7 @@
*/
/*
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
*/
/*
@@ -5136,7 +5137,7 @@ nxge_set_priv_prop(p_nxge_t nxgep, const char *pr_name, uint_t pr_valsize,
return (err);
}
- return (EINVAL);
+ return (ENOTSUP);
}
static int
@@ -5145,7 +5146,7 @@ nxge_get_priv_prop(p_nxge_t nxgep, const char *pr_name, uint_t pr_valsize,
{
p_nxge_param_t param_arr = nxgep->param_arr;
char valstr[MAXNAMELEN];
- int err = EINVAL;
+ int err = ENOTSUP;
uint_t strsize;
NXGE_DEBUG_MSG((nxgep, NXGE_CTL,
diff --git a/usr/src/uts/common/io/vnic/vnic_dev.c b/usr/src/uts/common/io/vnic/vnic_dev.c
index 8d5af8af84..3cb7e7660a 100644
--- a/usr/src/uts/common/io/vnic/vnic_dev.c
+++ b/usr/src/uts/common/io/vnic/vnic_dev.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2015 Joyent, Inc.
+ * Copyright 2016 OmniTI Computer Consulting, Inc. All rights reserved.
*/
#include <sys/types.h>
@@ -1159,7 +1160,7 @@ vnic_m_getprop(void *arg, const char *pr_name, mac_prop_id_t pr_num,
(void) snprintf(pr_val, pr_valsize, "%d", vn->vn_ls);
break;
default:
- ret = EINVAL;
+ ret = ENOTSUP;
break;
}
diff --git a/usr/src/uts/common/os/iscsiboot_prop.c b/usr/src/uts/common/os/iscsiboot_prop.c
index e803fefc0f..6510c343bd 100644
--- a/usr/src/uts/common/os/iscsiboot_prop.c
+++ b/usr/src/uts/common/os/iscsiboot_prop.c
@@ -29,6 +29,7 @@
*/
#include <sys/types.h>
+#include <sys/null.h>
#include <sys/bootprops.h>
#include <sys/cmn_err.h>
#include <sys/socket.h>
@@ -46,10 +47,6 @@ int iscsi_print_bootprop = 0;
#define ISCSI_BOOTPROP_BUFLEN 256
-#ifndef NULL
-#define NULL 0
-#endif
-
static int replace_sp_c(unsigned char *dst, unsigned char *source, size_t n);
static void
diff --git a/usr/src/uts/common/rpc/types.h b/usr/src/uts/common/rpc/types.h
index 59258793e4..2378e8c9af 100644
--- a/usr/src/uts/common/rpc/types.h
+++ b/usr/src/uts/common/rpc/types.h
@@ -35,12 +35,11 @@
#ifndef _RPC_TYPES_H
#define _RPC_TYPES_H
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Rpc additions to <sys/types.h>
*/
#include <sys/types.h>
+#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
@@ -83,10 +82,6 @@ typedef long rpc_inline_t;
#define TRUE (1)
#endif
-#ifndef NULL
-#define NULL 0
-#endif
-
#ifndef _KERNEL
#define mem_alloc(bsize) malloc(bsize)
#define mem_free(ptr, bsize) free(ptr)
diff --git a/usr/src/uts/common/sys/Makefile b/usr/src/uts/common/sys/Makefile
index 779e388f83..abc0c72941 100644
--- a/usr/src/uts/common/sys/Makefile
+++ b/usr/src/uts/common/sys/Makefile
@@ -419,6 +419,7 @@ CHKHDRS= \
netstack.h \
nexusdefs.h \
note.h \
+ null.h \
nvpair.h \
nvpair_impl.h \
objfs.h \
diff --git a/usr/src/uts/common/sys/null.h b/usr/src/uts/common/sys/null.h
new file mode 100644
index 0000000000..da580d05c4
--- /dev/null
+++ b/usr/src/uts/common/sys/null.h
@@ -0,0 +1,29 @@
+/*
+ * This file and its contents are supplied under the terms of the
+ * Common Development and Distribution License ("CDDL"), version 1.0.
+ * You may only use this file in accordance with the terms of version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source. A copy of the CDDL is also available via the Internet at
+ * http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2014-2016 PALO, Richard.
+ */
+
+#ifndef _SYS_NULL_H
+#define _SYS_NULL_H
+
+#ifndef NULL
+
+#if defined(_LP64)
+#define NULL 0L
+#else
+#define NULL 0
+#endif
+
+#endif /* NULL */
+
+#endif /* _SYS_NULL_H */
diff --git a/usr/src/uts/common/sys/param.h b/usr/src/uts/common/sys/param.h
index 12bdc29079..ea2fdfd886 100644
--- a/usr/src/uts/common/sys/param.h
+++ b/usr/src/uts/common/sys/param.h
@@ -45,6 +45,7 @@
#include <sys/isa_defs.h>
#endif /* _ASM */
+#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
@@ -147,14 +148,6 @@ extern "C" {
#define NBPW sizeof (int) /* number of bytes in an integer */
-#ifndef NULL
-#if defined(_LP64)
-#define NULL 0L
-#else
-#define NULL 0
-#endif
-#endif
-
#define CMASK 022 /* default mask for file creation */
#define CDLIMIT (1L<<11) /* default max write address */
#define NBPS 0x20000 /* Number of bytes per segment */
diff --git a/usr/src/uts/common/sys/sysevent.h b/usr/src/uts/common/sys/sysevent.h
index 5dcaa69c6d..255e98b871 100644
--- a/usr/src/uts/common/sys/sysevent.h
+++ b/usr/src/uts/common/sys/sysevent.h
@@ -28,19 +28,12 @@
#define _SYS_SYSEVENT_H
#include <sys/nvpair.h>
+#include <sys/null.h>
#ifdef __cplusplus
extern "C" {
#endif
-#ifndef NULL
-#if defined(_LP64) && !defined(__cplusplus)
-#define NULL 0L
-#else
-#define NULL 0
-#endif
-#endif
-
/* Internal registration class and subclass */
#define EC_ALL "register_all_classes"
#define EC_SUB_ALL "register_all_subclasses"