summaryrefslogtreecommitdiff
path: root/usr
diff options
context:
space:
mode:
authorJordan Paige Hendricks <jordan.hendricks@joyent.com>2019-09-03 15:25:11 +0000
committerJason King <jason.king@joyent.com>2019-11-11 19:04:39 -0600
commit3b4422300b98a1be9831b52861a41c8db9440a2d (patch)
treea0ceec43dbfc4300d9641033f4da68f758ea418f /usr
parentd8849d7dee03b84a3fa281ec65eb9e3d86d3756b (diff)
downloadillumos-joyent-3b4422300b98a1be9831b52861a41c8db9440a2d.tar.gz
11946 clean up improper use of mdb_getopts
Portions contributed by: Jason King <jason.king@joyent.com> Reviewed by: Toomas Soome <tsoome@me.com> Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk> Reviewed by: John Levon <john.levon@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr')
-rw-r--r--usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c6
-rw-r--r--usr/src/cmd/mdb/common/mdb/mdb_modapi.h4
-rw-r--r--usr/src/cmd/mdb/common/modules/cpc/cpc.c5
-rw-r--r--usr/src/cmd/mdb/common/modules/fctl/fctl.c7
-rw-r--r--usr/src/cmd/mdb/common/modules/genunix/fm.c5
-rw-r--r--usr/src/cmd/mdb/common/modules/genunix/ldi.c7
-rw-r--r--usr/src/cmd/mdb/common/modules/genunix/memory.c4
-rw-r--r--usr/src/cmd/mdb/common/modules/libumem/umem.c6
-rw-r--r--usr/src/cmd/mdb/common/modules/pmcs/pmcs.c4
-rw-r--r--usr/src/cmd/mdb/common/modules/qlc/qlc.c16
-rw-r--r--usr/src/cmd/mdb/common/modules/scsi_vhci/scsi_vhci.c16
-rw-r--r--usr/src/cmd/mdb/common/modules/sctp/sctp.c4
-rw-r--r--usr/src/cmd/mdb/common/modules/sockfs/sockfs.c4
-rw-r--r--usr/src/cmd/mdb/common/modules/zfs/zfs.c10
-rw-r--r--usr/src/cmd/mdb/i86pc/modules/unix/i86mmu.c6
-rw-r--r--usr/src/cmd/mdb/intel/modules/sata/sata.c3
-rw-r--r--usr/src/cmd/mdb/intel/modules/xhci/xhci.c4
-rw-r--r--usr/src/uts/common/sys/ccompile.h7
18 files changed, 74 insertions, 44 deletions
diff --git a/usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c b/usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c
index 4b50777c14..a84fac26c2 100644
--- a/usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c
+++ b/usr/src/cmd/fm/modules/common/eversholt/eft_mdb.c
@@ -22,6 +22,8 @@
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/mdb_modapi.h>
@@ -316,8 +318,8 @@ eft_time(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
if (argc) {
if (mdb_getopts(argc, argv,
'l', MDB_OPT_UINT64, &ull,
- 'p', MDB_OPT_SETBITS, TRUE, &opt_p,
- MDB_OPT_UINT64) != argc) {
+ 'p', MDB_OPT_SETBITS, TRUE, &opt_p, MDB_OPT_UINT64,
+ NULL) != argc) {
return (DCMD_USAGE);
}
}
diff --git a/usr/src/cmd/mdb/common/mdb/mdb_modapi.h b/usr/src/cmd/mdb/common/mdb/mdb_modapi.h
index 7b4f7ecb2d..d85bba5e2a 100644
--- a/usr/src/cmd/mdb/common/mdb/mdb_modapi.h
+++ b/usr/src/cmd/mdb/common/mdb/mdb_modapi.h
@@ -22,7 +22,7 @@
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
- * Copyright (c) 2012 Joyent, Inc. All rights reserved.
+ * Copyright 2019 Joyent, Inc.
*/
#ifndef _MDB_MODAPI_H
@@ -245,7 +245,7 @@ extern int mdb_getareg(mdb_tid_t, const char *, mdb_reg_t *);
#define MDB_OPT_UINT64 5 /* uint64_t argument */
#define MDB_OPT_UINTPTR_SET 6 /* boolean_t+uintptr_t args */
-extern int mdb_getopts(int, const mdb_arg_t *, ...);
+extern int mdb_getopts(int, const mdb_arg_t *, ...) __sentinel(0);
extern u_longlong_t mdb_strtoull(const char *);
diff --git a/usr/src/cmd/mdb/common/modules/cpc/cpc.c b/usr/src/cmd/mdb/common/modules/cpc/cpc.c
index 7efcd244e6..9fc7835186 100644
--- a/usr/src/cmd/mdb/common/modules/cpc/cpc.c
+++ b/usr/src/cmd/mdb/common/modules/cpc/cpc.c
@@ -22,6 +22,8 @@
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/mdb_modapi.h>
@@ -57,7 +59,8 @@ cpc(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
int j;
uint_t opt_v = FALSE;
- if (mdb_getopts(argc, argv, 'v', MDB_OPT_SETBITS, TRUE, &opt_v) != argc)
+ if (mdb_getopts(argc, argv, 'v', MDB_OPT_SETBITS, TRUE, &opt_v, NULL) !=
+ argc)
return (DCMD_USAGE);
if ((flags & DCMD_ADDRSPEC) == 0) {
diff --git a/usr/src/cmd/mdb/common/modules/fctl/fctl.c b/usr/src/cmd/mdb/common/modules/fctl/fctl.c
index 3df25d1527..26a2f948c8 100644
--- a/usr/src/cmd/mdb/common/modules/fctl/fctl.c
+++ b/usr/src/cmd/mdb/common/modules/fctl/fctl.c
@@ -24,7 +24,7 @@
*/
/*
- * Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/mdb_modapi.h>
@@ -134,7 +134,7 @@ ports(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
}
if (mdb_getopts(argc, argv,
- 'l', MDB_OPT_SETBITS, TRUE, &longlist) != argc) {
+ 'l', MDB_OPT_SETBITS, TRUE, &longlist, NULL) != argc) {
return (DCMD_USAGE);
}
@@ -1104,7 +1104,8 @@ fc_trace_dump(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
if (mdb_getopts(argc, argv,
's', MDB_OPT_UINTPTR, &pktstart,
- 'e', MDB_OPT_UINTPTR, &pktend) != argc) {
+ 'e', MDB_OPT_UINTPTR, &pktend,
+ NULL) != argc) {
return (DCMD_USAGE);
}
diff --git a/usr/src/cmd/mdb/common/modules/genunix/fm.c b/usr/src/cmd/mdb/common/modules/genunix/fm.c
index be67161908..ada10de4bf 100644
--- a/usr/src/cmd/mdb/common/modules/genunix/fm.c
+++ b/usr/src/cmd/mdb/common/modules/genunix/fm.c
@@ -21,6 +21,8 @@
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/types.h>
@@ -158,7 +160,8 @@ ereport(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
if (!(flags & DCMD_ADDRSPEC))
return (DCMD_USAGE);
- if (mdb_getopts(argc, argv, 'v', MDB_OPT_SETBITS, TRUE, &opt_v) != argc)
+ if (mdb_getopts(argc, argv, 'v', MDB_OPT_SETBITS, TRUE, &opt_v, NULL) !=
+ argc)
return (DCMD_USAGE);
if (mdb_vread(&nvl, sizeof (nvl), addr) == -1) {
diff --git a/usr/src/cmd/mdb/common/modules/genunix/ldi.c b/usr/src/cmd/mdb/common/modules/genunix/ldi.c
index a3ceb64421..3e4f11ba28 100644
--- a/usr/src/cmd/mdb/common/modules/genunix/ldi.c
+++ b/usr/src/cmd/mdb/common/modules/genunix/ldi.c
@@ -25,7 +25,7 @@
*/
/*
- * Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/types.h>
@@ -290,7 +290,8 @@ ldi_ident(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
}
static void
-ldi_handle_header(int refs, int ident) {
+ldi_handle_header(int refs, int ident)
+{
mdb_printf("%-?s ", "HANDLE");
if (refs)
@@ -369,7 +370,7 @@ ldi_handle(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
int refs = 1;
if (mdb_getopts(argc, argv,
- 'i', MDB_OPT_SETBITS, TRUE, &ident) != argc)
+ 'i', MDB_OPT_SETBITS, TRUE, &ident, NULL) != argc)
return (DCMD_USAGE);
if (ident)
diff --git a/usr/src/cmd/mdb/common/modules/genunix/memory.c b/usr/src/cmd/mdb/common/modules/genunix/memory.c
index 3f0802f0a5..9eca436194 100644
--- a/usr/src/cmd/mdb/common/modules/genunix/memory.c
+++ b/usr/src/cmd/mdb/common/modules/genunix/memory.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright 2017 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
#include <mdb/mdb_param.h>
@@ -696,7 +696,7 @@ pagelookup(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
if (mdb_getopts(argc, argv,
'v', MDB_OPT_UINTPTR, &vp,
'o', MDB_OPT_UINT64, &offset,
- 0) != argc) {
+ NULL) != argc) {
return (DCMD_USAGE);
}
diff --git a/usr/src/cmd/mdb/common/modules/libumem/umem.c b/usr/src/cmd/mdb/common/modules/libumem/umem.c
index d6f8f5680d..018a33dd46 100644
--- a/usr/src/cmd/mdb/common/modules/libumem/umem.c
+++ b/usr/src/cmd/mdb/common/modules/libumem/umem.c
@@ -24,7 +24,7 @@
*/
/*
- * Copyright (c) 2018, Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
* Copyright (c) 2013, 2015 by Delphix. All rights reserved.
*/
@@ -4089,7 +4089,7 @@ umem_malloc_dist(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
'g', MDB_OPT_SETBITS, TRUE, &geometric,
'b', MDB_OPT_UINTPTR, &maxbuckets,
'B', MDB_OPT_UINTPTR, &minbucketsize,
- 0) != argc)
+ NULL) != argc)
return (DCMD_USAGE);
bzero(&mi, sizeof (mi));
@@ -4165,7 +4165,7 @@ umem_malloc_info(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
'g', MDB_OPT_SETBITS, TRUE, &geometric,
'b', MDB_OPT_UINTPTR, &maxbuckets,
'B', MDB_OPT_UINTPTR, &minbucketsize,
- 0) != argc)
+ NULL) != argc)
return (DCMD_USAGE);
if (dump || geometric || (maxbuckets != 0) || (minbucketsize != 0))
diff --git a/usr/src/cmd/mdb/common/modules/pmcs/pmcs.c b/usr/src/cmd/mdb/common/modules/pmcs/pmcs.c
index f88400048e..4ff1bc068f 100644
--- a/usr/src/cmd/mdb/common/modules/pmcs/pmcs.c
+++ b/usr/src/cmd/mdb/common/modules/pmcs/pmcs.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2012 Milan Jurik. All rights reserved.
+ * Copyright 2019 Joyent, Inc.
*/
#include <limits.h>
@@ -2646,7 +2647,8 @@ pmcs_tag(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
if (mdb_getopts(argc, argv,
'i', MDB_OPT_UINT64, &index,
's', MDB_OPT_UINT64, &snum,
- 't', MDB_OPT_UINT64, &tag_type) != argc)
+ 't', MDB_OPT_UINT64, &tag_type,
+ NULL) != argc)
return (DCMD_USAGE);
/*
diff --git a/usr/src/cmd/mdb/common/modules/qlc/qlc.c b/usr/src/cmd/mdb/common/modules/qlc/qlc.c
index 88bb0adaf2..f01b1630df 100644
--- a/usr/src/cmd/mdb/common/modules/qlc/qlc.c
+++ b/usr/src/cmd/mdb/common/modules/qlc/qlc.c
@@ -34,6 +34,10 @@
*
*/
+/*
+ * Copyright 2019 Joyent, Inc.
+ */
+
#pragma ident "Copyright 2010 QLogic Corporation; ql_mdb.c"
#include <sys/mdb_modapi.h>
@@ -1099,8 +1103,8 @@ qlcstate_dcmd(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
return (DCMD_USAGE);
}
- if (mdb_getopts(argc, argv, 'v', MDB_OPT_SETBITS, TRUE, &verbose) !=
- argc) {
+ if (mdb_getopts(argc, argv, 'v', MDB_OPT_SETBITS, TRUE, &verbose,
+ NULL) != argc) {
return (DCMD_USAGE);
}
@@ -1741,8 +1745,8 @@ qlc_getdump_dcmd(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
return (DCMD_USAGE);
}
- if (mdb_getopts(argc, argv, 'v', MDB_OPT_SETBITS, TRUE, &verbose) !=
- argc) {
+ if (mdb_getopts(argc, argv, 'v', MDB_OPT_SETBITS, TRUE, &verbose,
+ NULL) != argc) {
return (DCMD_USAGE);
}
@@ -3193,8 +3197,8 @@ qlc_gettrace_dcmd(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
return (DCMD_USAGE);
}
- if (mdb_getopts(argc, argv, 'v', MDB_OPT_SETBITS, TRUE, &verbose) !=
- argc) {
+ if (mdb_getopts(argc, argv, 'v', MDB_OPT_SETBITS, TRUE, &verbose,
+ NULL) != argc) {
return (DCMD_USAGE);
}
diff --git a/usr/src/cmd/mdb/common/modules/scsi_vhci/scsi_vhci.c b/usr/src/cmd/mdb/common/modules/scsi_vhci/scsi_vhci.c
index 486dcd82b1..89e3867f9b 100644
--- a/usr/src/cmd/mdb/common/modules/scsi_vhci/scsi_vhci.c
+++ b/usr/src/cmd/mdb/common/modules/scsi_vhci/scsi_vhci.c
@@ -21,10 +21,10 @@
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2019 Joyent, Inc.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
#include <sys/kmem.h>
#include <sys/proc.h>
#include <sys/time.h>
@@ -193,10 +193,10 @@ mdiclient(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
dump_condvar(value.ct_failover_cv, "ct_failover_cv");
mdb_printf("\n");
- mdb_printf("ct_failover_flags TEMP_VAR: %8d\n", value.ct_failover_flags)
-;
- mdb_printf("ct_failover_status UNUSED: %9d\n", value.ct_failover_status)
-;
+ mdb_printf("ct_failover_flags TEMP_VAR: %8d\n",
+ value.ct_failover_flags);
+ mdb_printf("ct_failover_status UNUSED: %9d\n",
+ value.ct_failover_status);
return (DCMD_OK);
}
@@ -250,7 +250,7 @@ vhciguid(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
if (flags & DCMD_ADDRSPEC)
- mdb_warn("This command doesn't use an address\n");
+ mdb_warn("This command doesn't use an address\n");
if (i_vhci_states(0, 0, 0, 0, &ss) != DCMD_OK)
return (DCMD_ERR);
@@ -517,7 +517,7 @@ i_vhci_states(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv,
}
if (sp == NULL) {
if (mdb_getopts(argc, argv,
- 'v', MDB_OPT_SETBITS, TRUE, &verbose) != argc) {
+ 'v', MDB_OPT_SETBITS, TRUE, &verbose, NULL) != argc) {
return (DCMD_USAGE);
}
}
diff --git a/usr/src/cmd/mdb/common/modules/sctp/sctp.c b/usr/src/cmd/mdb/common/modules/sctp/sctp.c
index 65f3bf11e6..aa4da4caf0 100644
--- a/usr/src/cmd/mdb/common/modules/sctp/sctp.c
+++ b/usr/src/cmd/mdb/common/modules/sctp/sctp.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/types.h>
@@ -726,7 +727,8 @@ sctp(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
'c', MDB_OPT_SETBITS, MDB_SCTP_SHOW_CLOSE, &opts,
'e', MDB_OPT_SETBITS, MDB_SCTP_SHOW_EXT, &opts,
'P', MDB_OPT_SETBITS, 1, &paddr,
- 'd', MDB_OPT_SETBITS, MDB_SCTP_DUMP_ADDRS, &opts) != argc) {
+ 'd', MDB_OPT_SETBITS, MDB_SCTP_DUMP_ADDRS, &opts,
+ NULL) != argc) {
return (DCMD_USAGE);
}
diff --git a/usr/src/cmd/mdb/common/modules/sockfs/sockfs.c b/usr/src/cmd/mdb/common/modules/sockfs/sockfs.c
index 3bc0b264d0..01e888657f 100644
--- a/usr/src/cmd/mdb/common/modules/sockfs/sockfs.c
+++ b/usr/src/cmd/mdb/common/modules/sockfs/sockfs.c
@@ -21,6 +21,8 @@
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
+ *
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/types.h>
@@ -78,7 +80,7 @@ sockparams_prt(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
*/
if (mdb_getopts(argc, argv,
'e', MDB_OPT_SETBITS, 1, &opt_e,
- 'E', MDB_OPT_SETBITS, 1, &opt_E) != argc)
+ 'E', MDB_OPT_SETBITS, 1, &opt_E, NULL) != argc)
return (DCMD_USAGE);
if (!opt_E) {
diff --git a/usr/src/cmd/mdb/common/modules/zfs/zfs.c b/usr/src/cmd/mdb/common/modules/zfs/zfs.c
index a62e70e068..2c32e1a191 100644
--- a/usr/src/cmd/mdb/common/modules/zfs/zfs.c
+++ b/usr/src/cmd/mdb/common/modules/zfs/zfs.c
@@ -22,7 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2011, 2018 by Delphix. All rights reserved.
- * Copyright (c) 2019 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
/* Portions Copyright 2010 Robert Milkowski */
@@ -948,7 +948,8 @@ dbufs(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
'n', MDB_OPT_STR, &data.osname,
'o', MDB_OPT_STR, &object,
'l', MDB_OPT_UINT64, &data.level,
- 'b', MDB_OPT_STR, &blkid) != argc) {
+ 'b', MDB_OPT_STR, &blkid,
+ NULL) != argc) {
return (DCMD_USAGE);
}
@@ -3573,7 +3574,7 @@ zfs_acl_dump(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
return (DCMD_USAGE);
if (mdb_getopts(argc, argv,
- 'v', MDB_OPT_SETBITS, TRUE, &verbose, TRUE, NULL) != argc)
+ 'v', MDB_OPT_SETBITS, TRUE, &verbose, NULL) != argc)
return (DCMD_USAGE);
if (mdb_vread(&zacl, sizeof (zfs_acl_t), addr) == -1) {
@@ -4006,7 +4007,8 @@ arc_compression_stats(uintptr_t addr, uint_t flags, int argc,
'a', MDB_OPT_SETBITS, ARC_CFLAG_ANON, &data.arc_cflags,
'b', MDB_OPT_SETBITS, ARC_CFLAG_BUFS, &data.arc_cflags,
'r', MDB_OPT_SETBITS, ARC_CFLAG_MRU, &data.arc_cflags,
- 'f', MDB_OPT_SETBITS, ARC_CFLAG_MFU, &data.arc_cflags) != argc)
+ 'f', MDB_OPT_SETBITS, ARC_CFLAG_MFU, &data.arc_cflags,
+ NULL) != argc)
return (DCMD_USAGE);
if (mdb_lookup_by_obj(ZFS_OBJ_NAME, "ARC_anon", &data.anon_sym) ||
diff --git a/usr/src/cmd/mdb/i86pc/modules/unix/i86mmu.c b/usr/src/cmd/mdb/i86pc/modules/unix/i86mmu.c
index 7aaa5d0924..b938192648 100644
--- a/usr/src/cmd/mdb/i86pc/modules/unix/i86mmu.c
+++ b/usr/src/cmd/mdb/i86pc/modules/unix/i86mmu.c
@@ -22,7 +22,7 @@
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
- * Copyright 2018 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
/*
@@ -491,7 +491,7 @@ pte_dcmd(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
return (DCMD_USAGE);
if (mdb_getopts(argc, argv,
- 'l', MDB_OPT_UINT64, &level) != argc)
+ 'l', MDB_OPT_UINT64, &level, NULL) != argc)
return (DCMD_USAGE);
if (level > mmu.max_level) {
@@ -647,7 +647,7 @@ va2pfn_dcmd(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
return (DCMD_ERR);
if (mdb_getopts(argc, argv,
- 'a', MDB_OPT_STR, &addrspace_str) != argc)
+ 'a', MDB_OPT_STR, &addrspace_str, NULL) != argc)
return (DCMD_USAGE);
if ((flags & DCMD_ADDRSPEC) == 0)
diff --git a/usr/src/cmd/mdb/intel/modules/sata/sata.c b/usr/src/cmd/mdb/intel/modules/sata/sata.c
index 1829ed2f19..5186aae7cc 100644
--- a/usr/src/cmd/mdb/intel/modules/sata/sata.c
+++ b/usr/src/cmd/mdb/intel/modules/sata/sata.c
@@ -24,6 +24,7 @@
*/
/*
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/mdb_modapi.h>
@@ -216,7 +217,7 @@ sata_rbuf_dump(uintptr_t addr, uint_t flags, int argc, const mdb_arg_t *argv)
}
if (mdb_getopts(argc, argv,
- 'a', MDB_OPT_SETBITS, TRUE, &print_pathname) != argc) {
+ 'a', MDB_OPT_SETBITS, TRUE, &print_pathname, NULL) != argc) {
return (DCMD_USAGE);
}
diff --git a/usr/src/cmd/mdb/intel/modules/xhci/xhci.c b/usr/src/cmd/mdb/intel/modules/xhci/xhci.c
index b0d3dea253..2c2ef89549 100644
--- a/usr/src/cmd/mdb/intel/modules/xhci/xhci.c
+++ b/usr/src/cmd/mdb/intel/modules/xhci/xhci.c
@@ -10,7 +10,7 @@
*/
/*
- * Copyright 2016 Joyent, Inc.
+ * Copyright 2019 Joyent, Inc.
*/
#include <sys/mdb_modapi.h>
@@ -665,7 +665,7 @@ xhci_mdb_find(uintptr_t addr, uint_t flags, int argc,
ep_set = slot_set = B_FALSE;
if (mdb_getopts(argc, argv, 'e', MDB_OPT_UINTPTR_SET, &ep_set, &ep,
- 's', MDB_OPT_UINTPTR_SET, &slot_set, &slot) != argc)
+ 's', MDB_OPT_UINTPTR_SET, &slot_set, &slot, NULL) != argc)
return (DCMD_USAGE);
if (!slot_set) {
diff --git a/usr/src/uts/common/sys/ccompile.h b/usr/src/uts/common/sys/ccompile.h
index 0cd104efef..de0031d6b0 100644
--- a/usr/src/uts/common/sys/ccompile.h
+++ b/usr/src/uts/common/sys/ccompile.h
@@ -25,6 +25,7 @@
*/
/*
* Copyright 2015 EveryCity Ltd. All rights reserved.
+ * Copyright 2019 Joyent, Inc.
*/
#ifndef _SYS_CCOMPILE_H
@@ -135,6 +136,12 @@ extern "C" {
#endif /* __ATTRIBUTE_IMPLEMENTED || __GNUC__ */
+#if __GNUC_VERSION >= 40100
+#define __sentinel(__n) __attribute__((__sentinel__(__n)))
+#else
+#define __sentinel(__n)
+#endif
+
/*
* Shorthand versions for readability
*/