diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/cmd/idmap/nltest/nltest.c | 26 | ||||
-rw-r--r-- | usr/src/lib/libads/common/dsgetdc.c | 8 | ||||
-rw-r--r-- | usr/src/lib/libfakekernel/common/thread.c | 11 | ||||
-rw-r--r-- | usr/src/uts/common/sys/Makefile | 6 | ||||
-rw-r--r-- | usr/src/uts/common/sys/Makefile.syshdrs | 23 |
5 files changed, 43 insertions, 31 deletions
diff --git a/usr/src/cmd/idmap/nltest/nltest.c b/usr/src/cmd/idmap/nltest/nltest.c index 002fe0f157..b86d473f2f 100644 --- a/usr/src/cmd/idmap/nltest/nltest.c +++ b/usr/src/cmd/idmap/nltest/nltest.c @@ -11,6 +11,7 @@ /* * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + * Copyright 2021 RackTop Systems, Inc. */ @@ -184,6 +185,8 @@ cmd_dsgetdcname(char *domname) (void) printf(" DC Site Name: %s \n", dcinfo->DcSiteName); (void) printf(" Client Site Name: %s \n", dcinfo->ClientSiteName); + DsFreeDcInfo(dcinfo); + return (0); } @@ -214,7 +217,8 @@ cmd_kick(char *domname) */ static void -help(void) { +help(void) +{ (void) printf("\n"); /* * TODO: We may want to revise this help text. It's basically @@ -225,17 +229,17 @@ help(void) { (char *)getexecname()); (void) printf(gettext("where subcommands are:\n" #if 0 /* not yet */ - " dclist Lists all domain controllers in the domain.\n" - " dcname Lists the PDC or PDC emulator.\n" - " dsgetdc Queries DNS server for list of DCs and" - " their IP addresses and contacts each DC to check" - " for connectivity.\n" + " dclist Lists all domain controllers in the domain.\n" + " dcname Lists the PDC or PDC emulator.\n" + " dsgetdc Queries DNS server for list of DCs and" + " their IP addresses and contacts each DC to check" + " for connectivity.\n" #endif - " dsgetdcname returns the name of a domain controller in a" - " specified domain\n" - " help display help on specified subcommand\n" - " kick trigger domain controller re-discovery\n" - "\n")); + " dsgetdcname returns the name of a domain controller in a" + " specified domain\n" + " help display help on specified subcommand\n" + " kick trigger domain controller re-discovery\n" + "\n")); exit(1); } diff --git a/usr/src/lib/libads/common/dsgetdc.c b/usr/src/lib/libads/common/dsgetdc.c index a8b45707b9..ae2eddb24e 100644 --- a/usr/src/lib/libads/common/dsgetdc.c +++ b/usr/src/lib/libads/common/dsgetdc.c @@ -11,6 +11,7 @@ /* * Copyright 2014 Nexenta Systems, Inc. All rights reserved. + * Copyright 2021 RackTop Systems, Inc. */ /* @@ -24,7 +25,7 @@ #include <arpa/inet.h> #include "dsgetdc.h" #include "ads_priv.h" -#include <assert.h> +#include <sys/debug.h> #define DSGETDC_VALID_FLAGS ( \ DS_FORCE_REDISCOVERY | \ @@ -112,8 +113,7 @@ _DsGetDcName(const char *ComputerName, * We have taken pains to make these two the same. * DOMAIN_CONTROLLER_INFO / struct adspriv_dcinfo */ - /* LINTED E_TRUE_LOGICAL_EXPR */ - assert(sizeof (**dcinfo) == sizeof (res.DsGetDcNameRes_u.res0)); + CTASSERT(sizeof (**dcinfo) == sizeof (res.DsGetDcNameRes_u.res0)); (void) memcpy(*dcinfo, &res.DsGetDcNameRes_u.res0, sizeof (**dcinfo)); /* @@ -156,7 +156,7 @@ void DsFreeDcInfo(DOMAIN_CONTROLLER_INFO *dci) { if (dci != NULL) { - xdr_free(xdr_DsGetDcNameRes, (char *)dci); + xdr_free(xdr_adspriv_dcinfo, (char *)dci); free(dci); } } diff --git a/usr/src/lib/libfakekernel/common/thread.c b/usr/src/lib/libfakekernel/common/thread.c index 31421a723b..d20bd9b91b 100644 --- a/usr/src/lib/libfakekernel/common/thread.c +++ b/usr/src/lib/libfakekernel/common/thread.c @@ -11,13 +11,14 @@ /* * Copyright 2013 Nexenta Systems, Inc. All rights reserved. - * Copyright 2017 RackTop Systems. + * Copyright 2018 RackTop Systems. */ #include <sys/cmn_err.h> #include <sys/thread.h> #include <sys/zone.h> #include <sys/proc.h> +#include <sys/atomic.h> #define _SYNCH_H /* keep out <synch.h> */ #include <thread.h> @@ -81,6 +82,14 @@ thread_create( void thread_exit(void) { + static thread_t reap_tid; + thread_t prev; + + /* reap previous thread exit */ + prev = atomic_swap_uint(&reap_tid, thr_self()); + if (prev != 0) + (void) thr_join(prev, NULL, NULL); /* joinable thread */ + thr_exit(NULL); } diff --git a/usr/src/uts/common/sys/Makefile b/usr/src/uts/common/sys/Makefile index 258aec975e..94922f459b 100644 --- a/usr/src/uts/common/sys/Makefile +++ b/usr/src/uts/common/sys/Makefile @@ -1215,6 +1215,7 @@ CHECKHDRS= \ $(ROOTAVHDRS) \ $(ROOTCRYPTOHDRS) \ $(ROOTDCAMHDRS) \ + $(ROOTDKTPHDRS) \ $(ROOTISOHDRS) \ $(ROOTIDMHDRS) \ $(ROOTISCSIHDRS) \ @@ -1236,6 +1237,7 @@ CHECKHDRS= \ $(ROOTIBMFHDRS) \ $(ROOTOFHDRS) \ $(ROOTRDMAHDRS) \ + $(ROOTSATAGENHDRS) \ $(ROOTSOL_OFSHDRS) \ $(ROOTSOL_UMADHDRS) \ $(ROOTSOL_UVERBSHDRS) \ @@ -1251,6 +1253,7 @@ CHECKHDRS= \ $(ROOTSCSIGENHDRS) \ $(ROOTSCSIIMPLHDRS) \ $(ROOTSCSIVHCIHDRS) \ + $(ROOTSCSITARGETSHDRS) \ $(ROOTSDCARDHDRS) \ $(ROOTSYSEVENTHDRS) \ $(ROOTCONTRACTHDRS) \ @@ -1284,6 +1287,7 @@ install_h: \ $(ROOTAVHDRS) \ $(ROOTCRYPTOHDRS) \ $(ROOTDCAMHDRS) \ + $(ROOTDKTPHDRS) \ $(ROOTISOHDRS) \ $(ROOTIDMHDRS) \ $(ROOTISCSIHDRS) \ @@ -1305,6 +1309,7 @@ install_h: \ $(ROOTIBMFHDRS) \ $(ROOTOFHDRS) \ $(ROOTRDMAHDRS) \ + $(ROOTSATAGENHDRS) \ $(ROOTSOL_OFSHDRS) \ $(ROOTSOL_UMADHDRS) \ $(ROOTSOL_UVERBSHDRS) \ @@ -1320,6 +1325,7 @@ install_h: \ $(ROOTSCSIGENHDRS) \ $(ROOTSCSIIMPLHDRS) \ $(ROOTSCSIVHCIHDRS) \ + $(ROOTSCSITARGETSHDRS) \ $(ROOTSDCARDHDRS) \ $(ROOTSYSEVENTHDRS) \ $(ROOTCONTRACTHDRS) \ diff --git a/usr/src/uts/common/sys/Makefile.syshdrs b/usr/src/uts/common/sys/Makefile.syshdrs index 54a89a5e9a..b4b508cad4 100644 --- a/usr/src/uts/common/sys/Makefile.syshdrs +++ b/usr/src/uts/common/sys/Makefile.syshdrs @@ -173,19 +173,11 @@ tsol/%.check: tsol/%.h ROOTDIR= $(ROOT)/usr/include/sys -ROOTDKTPDIR= $(ROOTDIR)/dktp - -sparc_ROOTDIRS= $(ROOTDKTPDIR) $(ROOTDIR)/scsi/adapters \ - $(ROOTDIR)/scsi/targets - -i386_ROOTDIRS= $(ROOTDKTPDIR) $(ROOTDIR)/scsi/adapters \ - $(ROOTDIR)/scsi/targets \ - $(ROOTDIR)/sata - ROOTDIRS= \ $(ROOTDIR) \ $(ROOTDIR)/audio \ $(ROOTDIR)/av \ + $(ROOTDIR)/dktp \ $(ROOTDIR)/hotplug \ $(ROOTDIR)/hotplug/pci \ $(ROOTDIR)/crypto \ @@ -218,10 +210,13 @@ ROOTDIRS= \ $(ROOTDIR)/ib/clients/of/sol_ucma \ $(ROOTDIR)/idm \ $(ROOTDIR)/iscsit \ + $(ROOTDIR)/sata \ $(ROOTDIR)/scsi \ + $(ROOTDIR)/scsi/adapters \ $(ROOTDIR)/scsi/conf \ $(ROOTDIR)/scsi/generic \ $(ROOTDIR)/scsi/impl \ + $(ROOTDIR)/scsi/targets \ $(ROOTDIR)/sdcard \ $(ROOTDIR)/sysevent \ $(ROOTDIR)/contract \ @@ -290,7 +285,6 @@ ROOTSCSICONFHDRS= $(SCSICONFHDRS:%=$(ROOTDIR)/scsi/conf/%) ROOTSCSIGENHDRS= $(SCSIGENHDRS:%=$(ROOTDIR)/scsi/generic/%) ROOTSCSIIMPLHDRS= $(SCSIIMPLHDRS:%=$(ROOTDIR)/scsi/impl/%) ROOTSCSITARGETSHDRS= $(SCSITARGETSHDRS:%=$(ROOTDIR)/scsi/targets/%) -ROOTSCSICADHDRS= $(SCSICADHDRS:%=$(ROOTDIR)/scsi/adapters/%) ROOTSCSIADHDRS= $(SCSICADHDRS:%=$(ROOTDIR)/scsi/adapters/%) ROOTSCSIVHCIHDRS= $(SCSIVHCIHDRS:%=$(ROOTDIR)/scsi/adapters/%) ROOTSCSIISCSIHDRS= $(SCSIISCSIHDRS:%=$(ROOTDIR)/scsi/adapters/%) @@ -323,7 +317,6 @@ ROOT1394HDRS= $(I1394HDRS:%=$(ROOTDIR)/1394/%) ROOTRSMHDRS= $(RSMHDRS:%=$(ROOTDIR)/rsm/%) -ROOTSDKTPHDRS= $(SDKTPHDRS:%=$(ROOTDIR)/dktp/%) ROOTDKTPHDRS= $(DKTPHDRS:%=$(ROOTDIR)/dktp/%) ROOTPCHDRS= $(PCHDRS:%=$(ROOTDIR)/%) ROOTHOTPLUGHDRS= $(HOTPLUGHDRS:%=$(ROOTDIR)/hotplug/%) @@ -331,14 +324,14 @@ ROOTHOTPLUGPCIHDRS= $(HOTPLUGPCIHDRS:%=$(ROOTDIR)/hotplug/pci/%) ROOTTSOLHDRS= $(TSOLHDRS:%=$(ROOTDIR)/tsol/%) -sparc_ROOTHDRS= $(ROOTSDKTPHDRS) $(ROOTSCSICADHDRS) $(ROOTSCSITARGETSHDRS) \ +sparc_ROOTHDRS= \ $(ROOTUSBHDRS) $(ROOTUSBHUBDHDRS) \ $(ROOTUSBAUDHDRS) $(ROOTUSBHIDHDRS) $(ROOTUSBMSHDRS) \ $(ROOTUSBPRNHDRS) $(ROOTUGENHDRS) $(ROOTUSBVIDHDRS) -i386_ROOTHDRS= $(ROOTDKTPHDRS) $(ROOTPCHDRS) $(ROOTSCSITARGETSHDRS) \ - $(ROOTSCSIVHCIHDRS) $(ROOTHOTPLUGHDRS) \ - $(ROOTHOTPLUGPCIHDRS) $(ROOTSATAGENHDRS) +i386_ROOTHDRS= $(ROOTPCHDRS) \ + $(ROOTHOTPLUGHDRS) \ + $(ROOTHOTPLUGPCIHDRS) # install rules $(ROOTDIR)/%: % |