changeset 13181:88e527ca878f

sync with onnv-gate 13149:b23a4dab3d50 Reviewed by: garrett@nexenta.com, gwr@nexenta.com Approved by: garrett@nexenta.com
author Richard Lowe <richlowe@richlowe.net>
date Thu, 09 Sep 2010 11:46:43 -0400
parents 5f6c3c121560 (diff) b23a4dab3d50 (current diff)
children 35bf26976d42
files
diffstat 517 files changed, 26648 insertions(+), 72907 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,46 @@
+Illumos Gate README - July 29, 2010.
+
+This is the Illumos gate.  It contains the following subdirectories:
+
+        - usr/src -- this is a clone (with changes) of the Oracle ONNV gate.
+          We should avoid making too many disruptive changes here.  It
+          will be periodically synced with ONNV.
+
+        - usr/illumos -- this is the set of bits that we deliver, which are not
+          yet integrated into the onnv tree.  This may include various
+          testing bits, etc.  These bits (for whatever reason), are things
+          that we think are inappropriate for inclusion in the upstream and
+	  really are specific to illumos.
+
+Integration Rules:
+
+        All changes must have been reviewed, and (for the interim only!)
+        approved by the gatekeeper (below).  A code review may be performed
+        by someone other than the gatekeeper, but the final integration should
+        still be approved by the gatekeeper.  (Think CRT advocate for now.)
+        The gatekeeper will want to see your webrev and hg outgoing -v.
+
+        All changes must adhere to typical ON style and quality rules.
+        For example, pass full cstyle, applicable lint rules, etc.
+
+        All commits must include either a CDDL or BSD/MIT license, unless
+        approved otherwise by the gatekeeper.  CDDL licensed changes must
+        be backed by a Sun Contributor Agreement, so that the changes can
+        be contributed to the upstream OpenSolaris consolidation.
+
+        Hg commits should have comments of the following form:
+
+        1234 This is a sample bug report synopsis
+        4567 If you have a second bug synopsis...
+        Reviewed by: codereviewer@somewhere.net
+        Approved by: gatekeeper@somewhere.else.com
+
+Branches:
+
+        Please talk to the gatekeeper about personal branches.  In general,
+        they will be allowed as long as we don't go *too* wild on them.
+
+Gatekeeper:     garrett@nexenta.com  (Interim)
+IRC channel:    #illumos on irc.freenode.net
+Mailing list:   developer@lists.illumos.org
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TODO	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,71 @@
+
+These are the following bits that were closed source, for which we need
+open replacements:
+
+libc_i18n --    This is probably the most critical part.  We should be able to
+                leverage code from one of the BSDs.
+
+drivers --
+                glm             Legacy Symbios/NCR SCSI
+                ncrs            Legacy Symbios/NCR SCSI (EOF?  Merge with glm?)
+                mpt             LSI 1068 style SCSI
+                bcm_sata        Broadcom HT-1000 SATA
+                marvell88sx     Marvell SATA
+                iprb            Intel Pro/100 ethernet
+                ixgb            Intel 10GbE (1st gen?)
+                pcn             AMD PC-Net (questionable value)
+                spwr            SMC EPIC/100 (questionable value)
+                lsimega         Mega-RAID
+                acpi_toshiba    Toshiba Tecra M-series ACPI extensions
+                intel_nhm
+                intel_nhmex
+                intel_nb5000
+                adpu320         ADP UltraSCSI 320
+                bmc             IPMI BMC controller -- (OpenIPMI instead?)
+                bnx             Broadcom 1GbE
+                bnxe            Broadcom 10GbE (not sure the difference)
+                pcser           PCMCIA Serial support (questionable value)
+                se              Serial support on legacy SPARC h/w
+                ce              Cassini gigE
+                ge              Sun GEM gigE (derive from eri)
+                cpqary3         Compaq HBA?
+                klmmod          NFS lock manager
+                usbser_edge     Edgeport USB serial
+                llc2            LLC2 STREAMS module (not needed?)
+                Others?
+
+Platform support:
+                Various SPARC platform bits
+
+Crypto:
+                kcfd -- the crypto framework daemon, implements module signing
+                ike -- maybe ikev2 (Racoon)
+
+Commands:
+                more
+                sed
+                tail
+                patch
+                printf
+                pax             (Not critical?)
+                others?
+		localedef
+		iconv
+		snmpd ?
+		labeld ?
+		fwflash modules
+
+Others?
+                raidcfg plugins?
+
+
+There are other tasks we would like to see done:
+
+	* Support for alternative compilers (gcc, including boot up)
+	* Self hosting (be able to compile with minimal cross dependencies)
+	* Increase lint coverage
+	* Increase 64-bit cleanliness
+	* Overall Makefile cleanup
+
+Some of these tasks may conflict with overall goals to minimize differences
+with upstream.  So that will need to be discussed.
--- a/exception_lists/copyright	Wed Aug 18 15:52:48 2010 -0600
+++ b/exception_lists/copyright	Thu Sep 09 11:46:43 2010 -0400
@@ -19,6 +19,7 @@
 # CDDL HEADER END
 #
 # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
 #
 
 syntax: glob
@@ -315,7 +316,7 @@
 usr/src/lib/libkmsagent/common/SOAP/*.*
 usr/src/lib/librstp/common/*.[ch]
 usr/src/lib/librstp/common/[CRT]*
-usr/src/uts/intel/os/solaris.xpm
+usr/src/uts/intel/os/splashimage.xpm
 usr/src/uts/common/gssapi/mechs/krb5/crypto/block_size.c
 usr/src/uts/common/gssapi/mechs/krb5/crypto/checksum_length.c
 usr/src/uts/common/gssapi/mechs/krb5/crypto/des/f_parity.c
--- a/exception_lists/hdrchk	Wed Aug 18 15:52:48 2010 -0600
+++ b/exception_lists/hdrchk	Thu Sep 09 11:46:43 2010 -0400
@@ -16,6 +16,9 @@
 usr/src/cmd/krb5/ldap_util/kdb5_ldap_services.h
 usr/src/cmd/krb5/ldap_util/kdb5_ldap_util.h
 usr/src/cmd/krb5/slave/kprop.h
+usr/src/cmd/mklocale/collate/common.h
+usr/src/cmd/mklocale/ctype/extern.h
+usr/src/cmd/mklocale/ctype/ldef.h
 usr/src/common/openssl/crypto/krb5/krb5_asn.h
 usr/src/lib/gss_mechs/mech_krb5/et/error_table.h
 usr/src/lib/gss_mechs/mech_krb5/et/internal.h
--- a/exception_lists/mapfilechk	Wed Aug 18 15:52:48 2010 -0600
+++ b/exception_lists/mapfilechk	Thu Sep 09 11:46:43 2010 -0400
@@ -43,5 +43,6 @@
 usr/src/lib/README.mapfiles
 usr/src/lib/fm/topo/maps/Makefile.map
 usr/src/cmd/perl/*
+usr/src/cmd/mklocale/*
 usr/src/tools/onbld/Checks/Mapfile*
 usr/src/tools/scripts/*
--- a/exception_lists/packaging.open	Wed Aug 18 15:52:48 2010 -0600
+++ b/exception_lists/packaging.open	Thu Sep 09 11:46:43 2010 -0400
@@ -36,3 +36,30 @@
 kernel/drv/sparcv9/dprov	sparc
 
 usr/has/bin/pfksh
+
+#
+# we don't deliver these closed bits anymore... this
+# list can go away once we purge closed from illumos entirely.
+#
+# llc2
+etc/init.d/llc2
+etc/llc2
+etc/llc2/default
+etc/llc2/llc2_start.default
+etc/rc0.d/K52llc2
+etc/rc1.d/K52llc2
+etc/rc2.d/S40llc2
+etc/rcS.d/K52llc2
+usr/kernel/drv/llc2		i386
+usr/kernel/drv/amd64/llc2	i386
+usr/kernel/drv/sparcv9/llc2	sparc
+usr/kernel/drv/llc2.conf
+usr/lib/llc2
+usr/lib/llc2/llc2_autoconfig
+usr/lib/llc2/llc2_config
+usr/lib/llc2/llc2_loop2
+usr/lib/llc2/llc2_loop3
+usr/lib/llc2/llc2_loop4
+usr/lib/llc2/llc2_stats
+usr/lib/llc2/llc2_tcap
+usr/lib/llc2/llc2_tparser
--- a/usr/src/Makefile.lint	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/Makefile.lint	Thu Sep 09 11:46:43 2010 -0400
@@ -294,6 +294,7 @@
 	cmd/th_tools \
 	cmd/tip \
 	cmd/touch \
+	cmd/tr \
 	cmd/truss \
 	cmd/tty \
 	cmd/tzreload \
@@ -307,7 +308,6 @@
 	cmd/vrrpadm \
 	cmd/vt \
 	cmd/wall \
-	cmd/wbem \
 	cmd/who \
 	cmd/whodo \
 	cmd/wracct \
@@ -477,7 +477,6 @@
 	$(CLOSED)/cmd/pax \
 	$(CLOSED)/cmd/sed_xpg4 \
 	$(CLOSED)/cmd/tail \
-	$(CLOSED)/cmd/tr_xpg4 \
 	$(CLOSED)/lib/libc_i18n
 
 i386_SUBDIRS= \
--- a/usr/src/cmd/Adm/sun/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/Adm/sun/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -20,6 +20,7 @@
 #
 #
 # Copyright (c) 1990, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
 #
 
 ETCFILES= ioctl.syscon passwd shadow motd
@@ -51,8 +52,8 @@
 
 motd:	FRC
 	@-$(ECHO) "rebuilding motd"
-	@$(RELEASE_BUILD)-$(ECHO) "Oracle Corporation\tSunOS $(RELEASE)\t$(VERSION)\t$(RELEASE_DATE)" > motd
-	@$(NOT_RELEASE_BUILD)-$(ECHO) "Oracle Corporation\tSunOS $(RELEASE)\t$(VERSION)\t`date +'%h. %d, %Y'`" > motd
+	@$(RELEASE_BUILD)-$(ECHO) "The Illumos Project\tSunOS $(RELEASE)\t$(VERSION)\t$(RELEASE_DATE)" > motd
+	@$(NOT_RELEASE_BUILD)-$(ECHO) "The Illumos Project\tSunOS $(RELEASE)\t$(VERSION)\t`date +'%h. %d, %Y'`" > motd
 	@$(NOT_RELEASE_BUILD)-$(ECHO) $(DEV_CM) | sed -e "s/@(#)//" >> motd
 	@-$(CAT) release_info >> motd
 
--- a/usr/src/cmd/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -254,6 +254,7 @@
 	mkdir		\
 	mkfifo		\
 	mkfile		\
+	mklocale	\
 	mkmsgs		\
 	mknod		\
 	mkpwdict	\
@@ -406,6 +407,7 @@
 	touch		\
 	tplot		\
 	tput		\
+	tr		\
 	trapstat	\
 	troff		\
 	true		\
@@ -434,7 +436,6 @@
 	vt		\
 	w		\
 	wall		\
-	wbem		\
 	which		\
 	who		\
 	whodo		\
@@ -465,7 +466,6 @@
 $(CLOSED_BUILD)COMMON_SUBDIRS += \
 	$(CLOSED)/cmd/iconv	\
 	$(CLOSED)/cmd/ksh	\
-	$(CLOSED)/cmd/llc2	\
 	$(CLOSED)/cmd/localedef	\
 	$(CLOSED)/cmd/more_xpg4	\
 	$(CLOSED)/cmd/mtst	\
@@ -475,8 +475,7 @@
 	$(CLOSED)/cmd/printf	\
 	$(CLOSED)/cmd/sed	\
 	$(CLOSED)/cmd/sed_xpg4	\
-	$(CLOSED)/cmd/tail	\
-	$(CLOSED)/cmd/tr_xpg4
+	$(CLOSED)/cmd/tail
 
 i386_SUBDIRS=		\
 	acpihpd		\
@@ -731,7 +730,6 @@
 	vrrpadm		\
 	vscan		\
 	w		\
-	wbem		\
 	who		\
 	whodo		\
 	wracct		\
@@ -753,7 +751,6 @@
 $(CLOSED_BUILD)MSGSUBDIRS += \
 	$(CLOSED)/cmd/iconv	\
 	$(CLOSED)/cmd/ksh	\
-	$(CLOSED)/cmd/llc2	\
 	$(CLOSED)/cmd/localedef	\
 	$(CLOSED)/cmd/more_xpg4	\
 	$(CLOSED)/cmd/od	\
@@ -762,8 +759,7 @@
 	$(CLOSED)/cmd/printf	\
 	$(CLOSED)/cmd/sed	\
 	$(CLOSED)/cmd/sed_xpg4	\
-	$(CLOSED)/cmd/tail	\
-	$(CLOSED)/cmd/tr_xpg4
+	$(CLOSED)/cmd/tail
 
 sparc_MSGSUBDIRS=	\
 	fruadm		\
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -45,7 +45,6 @@
 SERVER_JAR= 		dhcpsvc.jar
 SERVER_JARFILES=	com/sun/dhcpmgr/server/*.class \
 			com/sun/dhcpmgr/bridge/*.class \
-			com/sun/dhcpmgr/server/*.properties \
 			com/sun/dhcpmgr/bridge/*.properties
 
 
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/bin/dhcpmgr.sh	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/bin/dhcpmgr.sh	Thu Sep 09 11:46:43 2010 -0400
@@ -25,14 +25,10 @@
 DMDIR=/usr/sadm/admin/dhcpmgr
 DLDIR=/usr/lib/inet/dhcp/svcadm
 L10NDIR=/usr/share/lib/locale
-WBEMDIR=/usr/sadm/lib/wbem
 
-CLASSPATH=${L10NDIR}:${DMDIR}/dhcpmgr.jar:${DMDIR}/SUNWfiles.jar:${DMDIR}/SUNWbinfiles.jar:${DLDIR}/dhcpsvc.jar:${DLDIR}/dhcpcommon.jar:${WBEMDIR}/providerutility.jar
+CLASSPATH=${L10NDIR}:${DMDIR}/dhcpmgr.jar:${DMDIR}/SUNWfiles.jar:${DMDIR}/SUNWbinfiles.jar:${DLDIR}/dhcpsvc.jar:${DLDIR}/dhcpcommon.jar
 export CLASSPATH
 
-LD_LIBRARY_PATH=${WBEMDIR}
-export LD_LIBRARY_PATH
-
 # add /usr/dt/bin so sdtwebclient will be available for help
 PATH=${PATH}:/usr/dt/bin
 export PATH
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/dhcpconfig/ConfigureDhcp.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/dhcpconfig/ConfigureDhcp.java	Thu Sep 09 11:46:43 2010 -0400
@@ -45,8 +45,6 @@
      */
     static final int supportedOptions[] = {
 	DhcpCfg.NON_NEGOTIABLE_LEASE,
-	DhcpCfg.HOSTS_RESOURCE,
-	DhcpCfg.HOSTS_DOMAIN,
 	DhcpCfg.LEASE_LENGTH,
 	DhcpCfg.DNS_ADDRESSES,
 	DhcpCfg.DNS_DOMAIN,
@@ -130,41 +128,6 @@
 	    return (DhcpCfg.FAILURE);
 	}
 
-	// Retrieve the hosts resource and domain options and validate.
-	//
-	String hostsResource = options.valueOf(DhcpCfg.HOSTS_RESOURCE);
-	String hostsDomain = options.valueOf(DhcpCfg.HOSTS_DOMAIN);
-
-	if (hostsResource == null) {
-	    if (hostsDomain != null) {
-		String msg = getString("config_requires_hosts_resource_error");
-		throw new IllegalArgumentException(msg);
-	    }
-        } else if (hostsResource.equals(DhcpdOptions.DSVC_CV_DNS)) {
-            if (hostsDomain == null) {
-                Object [] arguments = new Object[1];
-                arguments[0] = hostsResource;
-                printErrMessage(
-                    getString("config_requires_hosts_domain_error"),
-                    arguments);
-                return (DhcpCfg.FAILURE);
-            }
-	} else if (hostsResource.equals(DhcpdOptions.DSVC_CV_FILES)) {
-	    if (hostsDomain != null) {
-		Object [] arguments = new Object[1];
-		arguments[0] = hostsResource;
-		printErrMessage(getString("config_hosts_domain_ignored_error"),
-		    arguments);
-		return (DhcpCfg.FAILURE);
-	    }
-	} else {
-	    Object [] arguments = new Object[1];
-	    arguments[0] = hostsResource;
-	    printErrMessage(getString("config_invalid_hosts_resource_error"),
-		arguments);
-	    return (DhcpCfg.FAILURE);
-	}
-
 	// Retrieve the leaseLength option and check its validity.
 	// The default (3600*24 = 1 day) should be defined as static somewhere.
 	//
@@ -238,12 +201,6 @@
 	DhcpdOptions dhcpdOptions = new DhcpdOptions();
 	dhcpdOptions.setDaemonEnabled(true);
 	dhcpdOptions.setDhcpDatastore(getDhcpDatastore());
-	if (hostsResource != null) {
-	    dhcpdOptions.setHostsResource(hostsResource);
-	}
-	if (hostsDomain != null) {
-	    dhcpdOptions.setHostsDomain(hostsDomain);
-	}
 	try {
 	    getSvcMgr().writeDefaults(dhcpdOptions);
 	    printMessage(getString("config_create_conf_progress"));
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/dhcpconfig/ConvertDataStore.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/dhcpconfig/ConvertDataStore.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright (c) 2001 by Sun Microsystems, Inc.
  * All rights reserved.
  */
@@ -73,7 +71,7 @@
 		options.valueOf(DhcpCfg.RESOURCE)));
 	    getDhcpDatastore().setLocation(options.valueOf(DhcpCfg.PATH));
 	    getDhcpDatastore().setConfig(
-	        options.valueOf(DhcpCfg.RESOURCE_CONFIG));
+		options.valueOf(DhcpCfg.RESOURCE_CONFIG));
 	} catch (Throwable e) {
 	    // resource will not be valid
 	}
@@ -218,8 +216,7 @@
 	    for (int i = 0; i < networks.length; ++i) {
 		String netString = networks[i].toString();
 		try {
-		    getNetMgr().deleteNetwork(netString, false, false,
-			oldDatastore);
+		    getNetMgr().deleteNetwork(netString, false, oldDatastore);
 		    Object [] arguments = new Object[1];
 		    arguments[0] = netString;
 		    printMessage(getString("convert_delete_network_progress"),
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/dhcpconfig/DhcpCfg.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/dhcpconfig/DhcpCfg.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright 2001-2002 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -36,7 +34,7 @@
  * This class represents the entry point to the DHCP CLI dhcp configuration
  * administration.
  */
-public class DhcpCfg 
+public class DhcpCfg
     extends DhcpCliProgram {
 
     /**
@@ -48,7 +46,7 @@
      * The valid options for all DhcpCfg administration.
      */
     private static String optString =
-	"DUCnfxbkgh;I:R:N:X:r;p:u:l:d;a:m:t:y:s:o:P;Seq";
+	"DUCnfxbkgI:R:N:X:r;p:u:l:d;a:m:t:y:s:o:P;Seq";
 
     public static final int CONFIGURE_DHCP		= 'D';
     public static final int CONFIGURE_BOOTP		= 'R';
@@ -66,8 +64,6 @@
     public static final int DELETE_TABLES		= 'x';
     public static final int KEEP_TABLES			= 'k';
     public static final int POINT_TO_POINT		= 'b';
-    public static final int HOSTS_RESOURCE		= 'h';
-    public static final int DELETE_HOSTS		= 'h';
     public static final int RESOURCE			= 'r';
     public static final int RESOURCE_CONFIG		= 'u';
     public static final int PATH			= 'p';
@@ -82,7 +78,6 @@
     public static final int OPTION_LIST			= 'o';
     public static final int ROUTER_ADDRESSES		= 't';
     public static final int NIS_DOMAIN			= 'y';
-    public static final int HOSTS_DOMAIN		= 'y';
     public static final int SIGHUP			= 'g';
     public static final int SERVICE_ENABLE		= 'e';
     public static final int SERVICE_REENABLE		= 'r';
@@ -177,7 +172,7 @@
      * @param value the option value(if any)
      * @exception IllegalArgumentException if an invalid argument was entered
      */
-    public void processArg(int option, String value) 
+    public void processArg(int option, String value)
 	throws IllegalArgumentException {
 
     	switch (option) {
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/dhcpconfig/ResourceBundle.properties	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/dhcpconfig/ResourceBundle.properties	Thu Sep 09 11:46:43 2010 -0400
@@ -1,5 +1,3 @@
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
@@ -32,10 +30,7 @@
 config_null_datastore_error=Error - cannot configure without resource and path options.
 config_invalid_resource_error=Error - {0} is not a valid resource.
 config_make_location_error=Error - creating location: {0}.
-config_requires_hosts_domain_error=Error - host resource requires a host domain.
 config_hosts_domain_ignored_error=Error - host domain does not make sense for a host resource type - {0}
-config_invalid_hosts_resource_error=Error - host resource is invalid - {0}
-config_requires_hosts_resource_error=Error - host domain requires a host resource.
 config_lease_error=Error - the lease value specified is not valid.
 config_lease_zero_error=Error - a lease value of zero is not valid.
 config_dns_error=Error - DNS domain or server information is incomplete.
@@ -141,7 +136,7 @@
 #
 dhcpcfg_invalid_arg=Invalid argument - {0}
 dhcpcfg_no_function_error=Error - must specify one of 'D', 'R', 'U', 'N', 'C', 'X', 'I', 'P' or 'S'.
-dhcpcfg_usage=dhcpconfig (options)\n\nWhere (options) is one of:\n\n -D -r (resource) -p (path)  Configure the DHCP service. Sub-options:\n                             [-u (uninterpreted data)]\n                             [-h (host resource)]\n                             [-y (host domain)]\n                             [-l (lease length)]\n                             [-n]    Leases are not negotiable\n                             [-d (DNS domain)]\n                             [-a (DNS servers)]\n\n -R (server addresses) Configure BOOTP relay service.\n\n -U                    Unconfigure DHCP or BOOTP relay service. Sub-options:\n                       [-f]     No confirmation prompt\n                       [-x]     Delete dhcptab and network tables\n                       [-h]     Delete host entries\n\n -N (network address)  Configure network. Sub-options:\n                       [-m (subnet mask)]\n                       [-t (router addresses)]\n                       [-y (NIS domain)]\n                       [-a (NIS addreses)]\n                       [-b]     Network is point-to-point\n                       [-g]     Signal daemon\n\n -C -r (resource) -p (path)  Convert to new data store. Sub-options:\n                             [-u (uninterpreted data)]\n                             [-f]     No confirmation prompt\n                             [-k]     Do not delete original files\n\n -X (export filename)  Export data. Sub-options:\n                       [-m (macro list)]\n                       [-o (option list)]\n                       [-a (network addresses)]\n                       [-f]     Overwrite an existing export file\n                       [-x]     Delete exported data\n                       [-g]     Signal daemon\n\n -I (import filename)  Import data. Sub-options:\n                       [-f]     Overwrite existing data\n                       [-g]     Signal daemon\n\n -P [parameter[=value]]  Configure or print DHCP server parameters.\n\n -S                    Control the DHCP server. Sub-options:\n                       [-e]     Enable and start the DHCP server\n                       [-d]     Disable and stop the DHCP server\n                       [-r]     Re-enable the DHCP server\n                       [-q]     Query the DHCP server status\n
+dhcpcfg_usage=dhcpconfig (options)\n\nWhere (options) is one of:\n\n -D -r (resource) -p (path)  Configure the DHCP service. Sub-options:\n                             [-u (uninterpreted data)]\n                             [-l (lease length)]\n                             [-n]    Leases are not negotiable\n                             [-d (DNS domain)]\n                             [-a (DNS servers)]\n\n -R (server addresses) Configure BOOTP relay service.\n\n -U                    Unconfigure DHCP or BOOTP relay service. Sub-options:\n                       [-f]     No confirmation prompt\n                       [-x]     Delete dhcptab and network tables\n\n -N (network address)  Configure network. Sub-options:\n                       [-m (subnet mask)]\n                       [-t (router addresses)]\n                       [-y (NIS domain)]\n                       [-a (NIS addreses)]\n                       [-b]     Network is point-to-point\n                       [-g]     Signal daemon\n\n -C -r (resource) -p (path)  Convert to new data store. Sub-options:\n                             [-u (uninterpreted data)]\n                             [-f]     No confirmation prompt\n                             [-k]     Do not delete original files\n\n -X (export filename)  Export data. Sub-options:\n                       [-m (macro list)]\n                       [-o (option list)]\n                       [-a (network addresses)]\n                       [-f]     Overwrite an existing export file\n                       [-x]     Delete exported data\n                       [-g]     Signal daemon\n\n -I (import filename)  Import data. Sub-options:\n                       [-f]     Overwrite existing data\n                       [-g]     Signal daemon\n\n -P [parameter[=value]]  Configure or print DHCP server parameters.\n\n -S                    Control the DHCP server. Sub-options:\n                       [-e]     Enable and start the DHCP server\n                       [-d]     Disable and stop the DHCP server\n                       [-r]     Re-enable the DHCP server\n                       [-q]     Query the DHCP server status\n
 
 #
 # ServerParameter errors.
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/dhcpconfig/UnconfigureDhcp.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/dhcpconfig/UnconfigureDhcp.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright (c) 2001 by Sun Microsystems, Inc.
  * All rights reserved.
  */
@@ -45,8 +43,7 @@
      */
     static final int supportedOptions[] = {
 	DhcpCfg.FORCE,
-	DhcpCfg.DELETE_TABLES,
-	DhcpCfg.DELETE_HOSTS
+	DhcpCfg.DELETE_TABLES
     };
 
     /**
@@ -119,10 +116,6 @@
 	//
 	boolean deleteTables = options.isSet(DhcpCfg.DELETE_TABLES);
 
-	// Should we delete the host entries?
-	//
-	boolean deleteHosts = options.isSet(DhcpCfg.DELETE_HOSTS);
-	
 	// If this server is just acting as a relay then we don't need to
 	// clean up the dhcptab or the networks.
 	//
@@ -164,8 +157,7 @@
 		for (int i = 0; i < networks.length; ++i) {
 		    String netString = networks[i].toString();
 		    try {
-			getNetMgr().deleteNetwork(netString, false,
-			    deleteHosts);
+			getNetMgr().deleteNetwork(netString, false);
 			Object [] arguments = new Object[1];
 			arguments[0] = netString;
 			printMessage(getString("unconfigure_network_progress"),
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/AddClientEntry.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/AddClientEntry.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright 2001-2002 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -48,7 +46,6 @@
 	PntAdm.COMMENT,
 	PntAdm.LEASE_EXPIRATION,
 	PntAdm.FLAGS,
-	PntAdm.HOST_NAME,
 	PntAdm.CLIENTID,
 	PntAdm.CONVERT_CLIENTID,
 	PntAdm.MACRO_NAME,
@@ -85,7 +82,7 @@
 
     /**
      * Executes the "add client" functionality.
-     * @return PntAdm.SUCCESS, PntAdm.EXISTS, PntAdm.WARNING, or 
+     * @return PntAdm.SUCCESS, PntAdm.EXISTS, PntAdm.WARNING, or
      * PntAdm.CRITICAL
      */
     public int execute()
@@ -116,15 +113,6 @@
 		dhcpClientRecord.setFlags(flags);
 	    }
 
-	    String clientName = options.valueOf(PntAdm.HOST_NAME);
-	    if (clientName != null) {
-		if (isHostsManaged()) {
-		    dhcpClientRecord.setClientName(clientName);
-		} else {
-		    returnCode = PntAdm.WARNING;
-		}
-	    }
-
 	    String serverIP = options.valueOf(PntAdm.SERVER);
 	    if (serverIP == null) {
 		serverIP = getSvcMgr().getServerName();
@@ -143,7 +131,7 @@
 		    String msg = getString("no_macro_specified");
 		    throw new IllegalArgumentException(msg);
 		}
-		
+
 		// Create a Macro entry so that we can check to see if it
 		// exists in the dhcptab.
 		//
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/DeleteClientEntry.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/DeleteClientEntry.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright (c) 2001 by Sun Microsystems, Inc.
  * All rights reserved.
  */
@@ -43,7 +41,6 @@
      * The valid options associated with deleting a client entry.
      */
     static final int supportedOptions[] = {
-	PntAdm.DELETE_HOST,
 	PntAdm.RESOURCE,
 	PntAdm.RESOURCE_CONFIG,
 	PntAdm.PATH
@@ -83,14 +80,6 @@
 
 	int returnCode = PntAdm.SUCCESS;
 
-	// Check to see if the user wants the host deleted.
-	//
-	boolean deleteHost = options.isSet(PntAdm.DELETE_HOST);
-	if (deleteHost && !isHostsManaged()) {
-		deleteHost = false;
-		returnCode = PntAdm.WARNING;
-	}
-
 	// Build up a DhcpClientRecord from the user specified options.
 	//
 	try {
@@ -108,7 +97,7 @@
 	    // if requested.
 	    //
 	    getNetMgr().deleteClient(dhcpClientRecord, network.toString(),
-		deleteHost, getDhcpDatastore());
+		getDhcpDatastore());
 
 	} catch (NoEntryException e) {
 	    printErrMessage(getMessage(e));
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/ModifyClientEntry.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/ModifyClientEntry.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright 2001-2002 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -49,7 +47,6 @@
 	PntAdm.COMMENT,
 	PntAdm.LEASE_EXPIRATION,
 	PntAdm.FLAGS,
-	PntAdm.HOST_NAME,
 	PntAdm.CLIENTID,
 	PntAdm.CONVERT_CLIENTID,
 	PntAdm.MACRO_NAME,
@@ -146,15 +143,6 @@
 		newDhcpClientRecord.setFlags(flags);
 	    }
 
-	    String clientName = options.valueOf(PntAdm.HOST_NAME);
-	    if (clientName != null) {
-		if (isHostsManaged()) {
-		    newDhcpClientRecord.setClientName(clientName);
-		} else {
-		    returnCode = PntAdm.WARNING;
-		}
-	    }
-
 	    String serverIP = options.valueOf(PntAdm.SERVER);
 	    if (serverIP == null) {
 		serverIP = getSvcMgr().getServerName();
@@ -173,7 +161,7 @@
 		    String msg = getString("no_macro_specified");
 		    throw new IllegalArgumentException(msg);
 		}
-		
+
 		// Create a Macro entry so that we can check to see if it
 		// exists in the dhcptab.
 		//
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/PntAdm.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/PntAdm.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright (c) 2001 by Sun Microsystems, Inc.
  * All rights reserved.
  */
@@ -46,7 +44,7 @@
     /**
      * The valid options for all PntAdm administration.
      */
-    private static String optString = "LPCRyavxA:D:M:r:p:u:s:i:f:e:h:m:c:n:B;";
+    private static String optString = "LPCRyavxA:D:M:r:p:u:s:i:f:e:m:c:n:B;";
 
     public static final int ADD_CLIENT_ENTRY		= 'A';
     public static final int MODIFY_CLIENT_ENTRY		= 'M';
@@ -58,7 +56,6 @@
     public static final int BATCH_EXECUTION		= 'B';
 
     public static final int VERIFY_MACRO	= 'y';
-    public static final int DELETE_HOST		= 'y';
     public static final int CONVERT_CLIENTID	= 'a';
     public static final int RAW			= 'x';
     public static final int VERBOSE		= 'v';
@@ -69,7 +66,6 @@
     public static final int CLIENTID		= 'i';
     public static final int FLAGS		= 'f';
     public static final int LEASE_EXPIRATION	= 'e';
-    public static final int HOST_NAME		= 'h';
     public static final int MACRO_NAME		= 'm';
     public static final int COMMENT		= 'c';
     public static final int NEW_IP		= 'n';
@@ -186,7 +182,7 @@
 	    DhcpCliPrint.printErrMessage(msg.toString());
 	    returnCode = CRITICAL;
 	}
-	
+
 	return (returnCode);
 
     } // execute
@@ -197,7 +193,7 @@
      * @param value the option value(if any)
      * @exception IllegalArgumentException if an invalid argument was entered
      */
-    public void processArg(int option, String value) 
+    public void processArg(int option, String value)
 	throws IllegalArgumentException {
 
     	switch (option) {
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/RemoveNetworkTable.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/RemoveNetworkTable.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright (c) 2001 by Sun Microsystems, Inc.
  * All rights reserved.
  */
@@ -87,7 +85,7 @@
 
 	    // Delete the network table.
 	    //
-	    getNetMgr().deleteNetwork(network.toString(), false, false,
+	    getNetMgr().deleteNetwork(network.toString(), false,
 		getDhcpDatastore());
 	} catch (NoTableException e) {
 	    printErrMessage(getMessage(e));
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/ResourceBundle.properties	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/pntadm/ResourceBundle.properties	Thu Sep 09 11:46:43 2010 -0400
@@ -1,5 +1,3 @@
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
 #
 # Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
@@ -95,4 +93,4 @@
 #
 # Usage
 #
-usage=pntadm [-r (resource)] [-p (path)] [-u (uninterpreted data)] (options) [(network ip or name)]\n\nWhere (options) is one of:\n\n -C                     Create the named table\n\n -A (client ip or name) Add client entry. Sub-options:\n                        [-c (comment)]\n                        [-e (lease expiration)]\n                        [-f (flags)]\n                        [-h (client host name)]\n                        [-i (client identifier)[-a]]\n                        [-m (dhcptab macro reference)[-y]]\n                        [-s (server ip or name)]\n\n -M (client ip or name) Modify client entry. Sub-options:\n                        [-c (new comment)]\n                        [-e (new lease expiration)]\n                        [-f (new flags)]\n                        [-h (new client host name)]\n                        [-i (new client identifier)[-a]]\n                        [-m (new dhcptab macro reference)[-y]]\n                        [-n (new client ip)]\n                        [-s (new server ip or name)]\n\n -D (client ip or name) Delete client entry. Sub-options:\n                        [-y]    Remove hosts table entry\n\n -R                     Remove the named table\n\n -P                     Display the named table. Sub-options:\n                        [-v]    Display lease time in full format.\n                        [-x]    Display lease time in raw format.\n\n -L                     List the configured DHCP networks\n\n -B [batchfile]         Run command in batch input mode. Sub-options:\n                        [-v]    Output commands as they are processed.\n\n The network ip or name argument is required for all options except -L and -B\n
+usage=pntadm [-r (resource)] [-p (path)] [-u (uninterpreted data)] (options) [(network ip or name)]\n\nWhere (options) is one of:\n\n -C                     Create the named table\n\n -A (client ip or name) Add client entry. Sub-options:\n                        [-c (comment)]\n                        [-e (lease expiration)]\n                        [-f (flags)]\n                        [-i (client identifier)[-a]]\n                        [-m (dhcptab macro reference)[-y]]\n                        [-s (server ip or name)]\n\n -M (client ip or name) Modify client entry. Sub-options:\n                        [-c (new comment)]\n                        [-e (new lease expiration)]\n                        [-f (new flags)]\n                        [-i (new client identifier)[-a]]\n                        [-m (new dhcptab macro reference)[-y]]\n                        [-n (new client ip)]\n                        [-s (new server ip or name)]\n\n -D (client ip or name) Delete client entry.\n\n -R                     Remove the named table\n\n -P                     Display the named table. Sub-options:\n                        [-v]    Display lease time in full format.\n                        [-x]    Display lease time in raw format.\n\n -L                     List the configured DHCP networks\n\n -B [batchfile]         Run command in batch input mode. Sub-options:\n                        [-v]    Output commands as they are processed.\n\n The network ip or name argument is required for all options except -L and -B\n
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/tests/cfgdhcp.san	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/cli/tests/cfgdhcp.san	Thu Sep 09 11:46:43 2010 -0400
@@ -21,8 +21,6 @@
 # CDDL HEADER END
 #
 #
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
 # Copyright (c) 2001 by Sun Microsystems, Inc.
 # All rights reserved.
 #
@@ -119,7 +117,6 @@
 #
 SRVNAME=`uname -n`
 SRVADDR=`get_server_ip`
-DHCPHOSTS_RSRC=files
 DHCP_DEFAULTS=/etc/inet/dhcpsvc.conf
 
 #
@@ -136,7 +133,7 @@
 #
 # Config.
 #
-/usr/sbin/dhcpconfig -D -r ${DHCPRSRC} -p ${DHCPPATH} -h ${DHCPHOSTS_RSRC} >>${OUTFILE} 2>&1
+/usr/sbin/dhcpconfig -D -r ${DHCPRSRC} -p ${DHCPPATH} >>${OUTFILE} 2>&1
 RET=$?
 if [ "${RET}" != "0" ]
 then
@@ -189,17 +186,6 @@
 fi
 
 #
-# Verify that the hosts resource was defined in the defaults file
-#
-DEFLINE=`grep "HOSTS_RESOURCE=${DHCPHOSTS_RSRC}" ${DHCP_DEFAULTS}`
-if [ -z "${DEFLINE}" ]
-then
-    echo "HOSTS_RESOURCE not set correctly in ${DHCP_DEFAULTS}"
-    echo "${TESTNAME} - Test failed!"
-    exit 1
-fi
-
-#
 # Verify that the dhcptab data was created.
 #
 DATAFILE=/tmp/${TESTNAME}.data.$$
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/AddressWizard.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/AddressWizard.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -57,8 +55,6 @@
     private String server = DataManager.get().getShortServerName();
     private IPAddress serverIP;
     private IPAddress startAddress;
-    private boolean generateNames = false;
-    private String baseName = DataManager.get().getShortServerName();
     private String macro = DataManager.get().getShortServerName();
     private boolean unusable = false;
     private boolean dynamic = true;
@@ -68,26 +64,26 @@
     class Address {
 	IPAddress addr;
 	String name;
-	
+
 	public Address() {
 	    addr = null;
 	    name = "";
 	}
-	
+
 	public Address(int a, String n) {
 	    name = n;
 	    setAddr(a);
 	}
-	
+
 	public Address(String a, String n) {
 	    name = n;
 	    setAddr(a);
 	}
-	
+
 	public void setAddr(int a) {
 	    addr = new IPAddress(a);
 	}
-	
+
 	public void setAddr(String a) {
 	    try {
 		addr = new IPAddress(a);
@@ -95,7 +91,7 @@
 		// Do nothing
 	    }
 	}
-	
+
 	public String toString() {
 	    return addr.getHostAddress();
 	}
@@ -103,15 +99,15 @@
 
     class WizardTableModel extends AbstractTableModel {
 	private Vector addrs = new Vector();
-	
+
 	public int getRowCount() {
 	    return addrs.size();
 	}
-	
+
 	public int getColumnCount() {
 	    return 2;
 	}
-	
+
 	public Object getValueAt(int row, int column) {
 	    if (column == 0) {
 		return ((Address)addrs.elementAt(row)).addr;
@@ -119,7 +115,7 @@
 		return ((Address)addrs.elementAt(row)).name;
 	    }
 	}
-	
+
 	public Class getColumnClass(int column) {
 	    if (column == 0) {
 		return IPAddress.class;
@@ -127,7 +123,7 @@
 		return String.class;
 	    }
 	}
-	
+
 	public String getColumnName(int column) {
 	    if (column == 0) {
 		return ResourceStrings.getString("address_column");
@@ -135,7 +131,7 @@
 		return ResourceStrings.getString("client_name_column");
 	    }
 	}
-	
+
 	public long generateAddresses() {
 	    if (!network.containsAddress(startAddress)) {
 		return 0;
@@ -190,14 +186,7 @@
 		}
 		if (searchAddress != address) {
 		    // found an empty slot; create the address
-		    Address addr;
-		    if (generateNames) {
-			addr  = new Address((int)address,
-			    baseName + "-" + String.valueOf(index));
-		    } else {
-			addr  = new Address((int)address, "");
-		    }
-		    addrs.addElement(addr);
+		    addrs.addElement(new Address((int)address, ""));
 		    ++count;
 		}
 		++index;
@@ -207,34 +196,34 @@
 	    fireTableDataChanged();
 	    return count;
 	}
-	
+
 	public Address getAddressAt(int index) {
 	    return (Address)addrs.elementAt(index);
 	}
     }
-    
+
     // This step selects the number of addresses and a comment
     class NumberStep implements WizardStep {
 	private Box stepBox;
 	private IntegerField addressCount;
 	private JTextField commentField;
-	
+
 	public NumberStep() {
 	    stepBox = Box.createVerticalBox();
-	    
+
 	    // Explanatory text at the top
 	    stepBox.add(Wizard.createTextArea(
 		ResourceStrings.getString("add_wiz_explain"), 4, 45));
 	    stepBox.add(Box.createVerticalStrut(10));
 	    stepBox.add(Box.createVerticalGlue());
-	    
+
 	    // Get the number of addresses to create
 	    stepBox.add(Wizard.createTextArea(
 		ResourceStrings.getString("add_wiz_count_explain"), 1, 45));
 
 	    Mnemonic mnCount =
                 new Mnemonic(ResourceStrings.getString("add_wiz_count_label"));
-    	    JLabel label = new JLabel(mnCount.getString());
+	    JLabel label = new JLabel(mnCount.getString());
             addressCount = new IntegerField(); // Ensure numeric input
             addressCount.setMaximumSize(addressCount.getPreferredSize());
 
@@ -249,7 +238,7 @@
 	    box.add(addressCount);
 	    box.add(Box.createHorizontalGlue());
 	    stepBox.add(box);
-	    
+
 	    stepBox.add(Box.createVerticalStrut(10));
 	    stepBox.add(Box.createVerticalGlue());
 	    stepBox.add(Wizard.createTextArea(
@@ -274,7 +263,7 @@
 	    box.add(commentField);
 	    stepBox.add(box);
 	    stepBox.add(Box.createVerticalGlue());
-	    
+
 	    /*
 	     * This listener ensures that the forward button is enabled only
 	     * when there is a count of addresses in the addressCount field.
@@ -292,21 +281,21 @@
 		}
 	    });
 	}
-	
+
 	public String getDescription() {
 	    return ResourceStrings.getString("add_wiz_number_desc");
 	}
-	
+
 	public Component getComponent() {
 	    return stepBox;
 	}
-	
+
 	public void setActive(int direction) {
 	    addressCount.setValue(number);
 	    commentField.setText(comment);
 	    setForwardEnabled(addressCount.getValue() != 0);
 	}
-	
+
 	public boolean setInactive(int direction) {
 	    number = addressCount.getValue();
 	    if (number == 0) {
@@ -329,17 +318,15 @@
     class ServerStep implements WizardStep {
 	private Box stepBox;
 	private IPAddressField startField;
-	private HostnameField baseNameField;
-	private JCheckBox generateNamesBox;
 	private HostnameField serverField;
-	
+
 	public ServerStep() {
 	    stepBox = Box.createVerticalBox();
-	    
+
 	    // Explanatory text at the top
 	    stepBox.add(Wizard.createTextArea(
 		ResourceStrings.getString("add_wiz_server_explain"), 1, 45));
-	    
+
 	    // Server to own these addresses
 	    Mnemonic mnMan =
                 new Mnemonic(ResourceStrings.getString("add_wiz_server_label"));
@@ -350,17 +337,17 @@
             serverField = new HostnameField("", 15);
             jl.setLabelFor(serverField);
             jl.setToolTipText(mnMan.getString());
-	    jl.setDisplayedMnemonic(mnMan.getMnemonic()); 
+	    jl.setDisplayedMnemonic(mnMan.getMnemonic());
 
 	    serverField.setMaximumSize(serverField.getPreferredSize());
 	    box.add(serverField);
 	    box.add(Box.createHorizontalGlue());
 	    stepBox.add(box);
-	    
+
 	    // Add some spacing
 	    stepBox.add(Box.createVerticalStrut(5));
 	    stepBox.add(Box.createVerticalGlue());
-	    
+
 	    // Starting address
 	    stepBox.add(Wizard.createTextArea(
 		ResourceStrings.getString("add_wiz_start_explain"), 2, 45));
@@ -379,60 +366,7 @@
 	    startField.setMaximumSize(startField.getPreferredSize());
 	    box.add(startField);
 	    stepBox.add(box);
-	    
-	    // Add some more spacing, and an explanation of generating names
-	    stepBox.add(Box.createVerticalStrut(5));
-	    stepBox.add(Box.createVerticalGlue());
-	    stepBox.add(Wizard.createTextArea(
-		ResourceStrings.getString("add_wiz_generate_explain"), 4, 45));
 
-	    // Control to indicate whether names should be generated
-	    JPanel panel = new JPanel(new GridLayout(2, 1, 0, 0));
-	    generateNamesBox = new JCheckBox(
-		ResourceStrings.getString("add_wiz_generate_label"));
-	    generateNamesBox.setToolTipText(
-	        ResourceStrings.getString("add_wiz_generate_label"));
-	    panel.add(generateNamesBox);
-
-	    generateNamesBox.setEnabled(true);
-	    try {
-		DhcpdOptions opts =
-		    DataManager.get().getDhcpServiceMgr().readDefaults();
-		if (opts.getHostsResource() == null) {
-		    generateNamesBox.setEnabled(false);		
-		}
-	    } catch (BridgeException e) {
-		// Assume set
-	    }
-
-	    baseNameField = new HostnameField();
-	    baseNameField.setEnabled(false);
-	    baseNameField.setMaximumSize(baseNameField.getPreferredSize());
-	    box = Box.createHorizontalBox();
-	    box.add(Box.createHorizontalStrut(17));
-
-	    Mnemonic mnRoot =
-                new Mnemonic(ResourceStrings.getString(
-		    "add_wiz_rootname_label"));
-            JLabel rootNameLbl = new JLabel(mnRoot.getString());
-            box.add(rootNameLbl);
-            rootNameLbl.setLabelFor(baseNameField);
-            rootNameLbl.setToolTipText(mnRoot.getString());
-	    rootNameLbl.setDisplayedMnemonic(mnRoot.getMnemonic());
-
-	    box.add(Box.createHorizontalStrut(5));
-	    box.add(baseNameField);
-	    panel.add(box);
-	    stepBox.add(panel);
-	    stepBox.add(Box.createVerticalGlue());
-	    
-	    // Only enable the text input if name generation is requested
-	    generateNamesBox.addActionListener(new ActionListener() {
-		public void actionPerformed(ActionEvent e) {
-		    baseNameField.setEnabled(generateNamesBox.isSelected());
-		}
-	    });
-	    
 	    DocumentListener docListener = new DocumentListener() {
 		public void insertUpdate(DocumentEvent e) {
 		    setForwardEnabled((startField.getText().length() != 0)
@@ -445,27 +379,25 @@
 		    insertUpdate(e);
 		}
 	    };
-	    
+
 	    startField.getDocument().addDocumentListener(docListener);
 	    serverField.getDocument().addDocumentListener(docListener);
 	}
-	
+
 	public String getDescription() {
 	    return ResourceStrings.getString("add_wiz_server_desc");
 	}
-	
+
 	public Component getComponent() {
 	    return stepBox;
 	}
-	
+
 	public void setActive(int direction) {
 	    serverField.setText(server);
 	    startField.setValue(startAddress);
-	    baseNameField.setText(baseName);
-	    generateNamesBox.setSelected(generateNames);
 	    setForwardEnabled(true);
 	}
-		
+
 	public boolean setInactive(int direction) {
 	    if (direction == FORWARD) {
 		// Validate that address is on the network we're working on
@@ -514,30 +446,28 @@
 	    }
 	    server = serverField.getText();
 	    startAddress = startField.getValue();
-	    generateNames = generateNamesBox.isSelected();
-	    baseName = baseNameField.getText();
 	    return true;
 	}
     }
-    
+
     // This step confirms the list of addresses to be generated
     class ConfirmStep implements WizardStep {
 	private JPanel stepPanel;
 	private JTable addressTable;
-	
+
 	public ConfirmStep() {
 	    stepPanel = new JPanel(new BorderLayout(10, 10));
-	    
+
 	    // Explanatory text at the top
 	    stepPanel.add(Wizard.createTextArea(
 		ResourceStrings.getString("add_wiz_confirm_explain"), 3, 45),
 		BorderLayout.NORTH);
-	    
+
 	    // Label the table
-       	    JPanel panel = new JPanel(new BorderLayout());
+	    JPanel panel = new JPanel(new BorderLayout());
             panel.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15));
 	    Mnemonic mnIP =
-	        new Mnemonic(ResourceStrings.getString(
+		new Mnemonic(ResourceStrings.getString(
 		    "add_wiz_confirm_label"));
             JLabel label = new JLabel(mnIP.getString());
             panel.add(label, BorderLayout.NORTH);
@@ -562,15 +492,15 @@
 	    panel.add(scrollPane, BorderLayout.CENTER);
 	    stepPanel.add(panel, BorderLayout.CENTER);
 	}
-	
+
 	public String getDescription() {
 	    return ResourceStrings.getString("add_wiz_confirm_desc");
 	}
-	
+
 	public Component getComponent() {
 	    return stepPanel;
 	}
-	
+
 	public void setActive(int direction) {
 	    /*
 	     * If we're activating coming from the previous step,
@@ -608,12 +538,12 @@
 		setForwardEnabled(true);
 	    }
 	}
-	
+
 	public boolean setInactive(int direction) {
 	    return true; // Nothing to do when leaving
 	}
     }
-    
+
     // This step selects the macro and flags
     class ConfigureStep implements WizardStep {
 
@@ -622,7 +552,7 @@
 		implements ComboBoxModel {
 	    private Object currentValue;
 	    private Macro data[] = null;
-	
+
 	    public int getSize() {
 		if (data == null) {
 		    try {
@@ -641,7 +571,7 @@
 		    return data.length+1;
 		}
 	    }
-	    
+
 	    public Object getElementAt(int index) {
 		if (data == null) {
 		    try {
@@ -659,7 +589,7 @@
 		    return data[index-1].getKey();
 		}
 	    }
-	    
+
 	    public void setSelectedItem(Object anItem) {
 		currentValue = noMacro.getKey();
 		for (int i = 0; data != null && i < data.length; i++) {
@@ -669,11 +599,11 @@
 		}
 		fireContentsChanged(this, -1, -1);
 	    }
-	    
+
 	    public Object getSelectedItem() {
 		return currentValue;
 	    }
-	    
+
 	    public Macro getMacroAt(int index) {
 		if (index == 0) {
 		    return noMacro;
@@ -682,13 +612,13 @@
 		}
 	    }
 	}
-	
+
 	private Box stepBox;
 	private JComboBox macroBox;
 	private MacroListModel macroBoxModel;
 	private JButton viewButton;
 	private JCheckBox unusableBox;
-	
+
 	public ConfigureStep() {
 	    stepBox = Box.createVerticalBox();
 
@@ -699,7 +629,7 @@
 	    stepBox.add(component);
 	    // Add some spacing
 	    stepBox.add(Box.createVerticalStrut(10));
-	    
+
 	    // Let 'em select the macro to use
 	    Mnemonic mnConf =
                 new Mnemonic(ResourceStrings.getString("add_wiz_macro_label"));
@@ -717,16 +647,16 @@
 	    panel.add(macroBox);
 	    // Button to view the contents of the selected macro
 
-	    Mnemonic mnView = 
-	        new Mnemonic(ResourceStrings.getString("add_wiz_view_button"));
+	    Mnemonic mnView =
+		new Mnemonic(ResourceStrings.getString("add_wiz_view_button"));
 	    viewButton = new JButton(mnView.getString());
 	    viewButton.setToolTipText(mnView.getString());
-	    viewButton.setMnemonic(mnView.getMnemonic()); 
+	    viewButton.setMnemonic(mnView.getMnemonic());
 
 	    panel.add(viewButton);
 	    panel.setAlignmentX(Component.LEFT_ALIGNMENT);
 	    stepBox.add(panel);
-	    
+
 	    // Give the option to mark them unusable for now
 	    component = Wizard.createTextArea(
 		ResourceStrings.getString("add_wiz_flag_explain"), 2, 45);
@@ -737,7 +667,7 @@
 	    unusableBox.setAlignmentX(Component.LEFT_ALIGNMENT);
 	    stepBox.add(unusableBox);
 	    stepBox.add(Box.createVerticalGlue());
-	    
+
 	    // When user presses View, show the macro's contents
 	    viewButton.addActionListener(new ActionListener() {
 		public void actionPerformed(ActionEvent e) {
@@ -747,51 +677,51 @@
 		     * context with the task.
 		     */
 		    ViewMacroDialog d = new ViewMacroDialog(
-		        AddressWizard.this, viewButton,
+			AddressWizard.this, viewButton,
 			macroBoxModel.getMacroAt(macroBox.getSelectedIndex()));
 		    d.pack();
 		    d.setVisible(true);
 		}
 	    });
 	}
-	
+
 	public String getDescription() {
 	    return ResourceStrings.getString("add_wiz_configure_desc");
 	}
-	
+
 	public Component getComponent() {
 	    return stepBox;
 	}
-	
+
 	public void setActive(int direction) {
 	    macroBox.setSelectedItem(macro);
 	    unusableBox.setSelected(unusable);
 	    setForwardEnabled(true);
 	}
-	
+
 	public boolean setInactive(int direction) {
 	    macro = (String)macroBox.getSelectedItem();
 	    unusable = unusableBox.isSelected();
 	    return true;
 	}
     }
-    
+
     // This step selects the lease type
     class LeaseStep implements WizardStep {
 	private Box stepBox;
 	private JRadioButton dynamicButton, permanentButton;
 	private ButtonGroup buttonGroup;
-	
+
 	public LeaseStep() {
 	    stepBox = Box.createVerticalBox();
-	    
+
 	    // Start with explanatory text
 	    JComponent component = Wizard.createTextArea(
 		ResourceStrings.getString("add_wiz_lease_explain"), 0, 45);
 	    component.setAlignmentX(Component.LEFT_ALIGNMENT);
 	    stepBox.add(component);
 	    stepBox.add(Box.createVerticalStrut(10));
-	    
+
 	    // User has choice of dynamic or permanent leases
 	    Mnemonic mnLease =
                 new Mnemonic(ResourceStrings.getString("add_wiz_lease_label"));
@@ -816,26 +746,26 @@
 	    stepBox.add(panel);
 	    stepBox.add(Box.createVerticalGlue());
 	}
-	
+
 	public String getDescription() {
 	    return ResourceStrings.getString("add_wiz_lease_desc");
 	}
-	
+
 	public Component getComponent() {
 	    return stepBox;
 	}
-	
+
 	public void setActive(int direction) {
 	    dynamicButton.setSelected(dynamic);
 	    setForwardEnabled(true);
 	}
-	
+
 	public boolean setInactive(int direction) {
 	    dynamic = dynamicButton.isSelected();
 	    return true;
 	}
     }
-    
+
     // Last chance to check work before committing to it
     class ReviewStep implements WizardStep {
 	private Box stepBox;
@@ -847,15 +777,15 @@
 	private JLabel macroLabel;
 	private JLabel flagLabel;
 	private JLabel leaseLabel;
-	
+
 	public ReviewStep() {
 	    stepBox = Box.createVerticalBox();
 	    stepBox.add(Wizard.createTextArea(
 		ResourceStrings.getString("add_wiz_review_explain"), 4, 45));
-	    
+
 	    panel = new JPanel(new FieldLayout());
 	    JLabel tmpL;
-	    
+
 	    tmpL = addLabelMnemonic("add_wiz_count_label");
 	    numberLabel = addField("20");
 	    tmpL.setLabelFor(numberLabel);
@@ -876,17 +806,17 @@
 	    flagLabel = addField("Yes");
 	    tmpL.setLabelFor(flagLabel);
 	    tmpL.setToolTipText(
-	        ResourceStrings.getString("add_wiz_review_unusable"));
-	    
+		ResourceStrings.getString("add_wiz_review_unusable"));
+
 	    tmpL = addLabelMnemonic("add_wiz_lease_label");
 	    leaseLabel = addField(ResourceStrings.getString("dynamic"));
 	    tmpL.setLabelFor(leaseLabel);
-	    
+
 	    panel.setAlignmentX(Component.LEFT_ALIGNMENT);
 	    stepBox.add(panel);
-	    
+
 	    stepBox.add(Box.createVerticalStrut(5));
-	   
+
 	    Mnemonic mnAdd =
                 new Mnemonic(ResourceStrings.getString(
 		    "add_wiz_confirm_label"));
@@ -912,9 +842,9 @@
 	    stepBox.add(scrollPane);
 	    stepBox.add(Box.createVerticalGlue());
 	}
-	
+
 	private JLabel addLabel(String s) {
-	    JLabel l = new JLabel(ResourceStrings.getString(s)); 
+	    JLabel l = new JLabel(ResourceStrings.getString(s));
 	    panel.add(FieldLayout.LABEL, l);
 	    return l;
 	}
@@ -927,22 +857,22 @@
             panel.add(FieldLayout.LABEL, l);
             return l;
         }
-	
+
 	private JLabel addField(String s) {
 	    JLabel l = new JLabel(s);
 	    l.setForeground(Color.black);
 	    panel.add(FieldLayout.FIELD, l);
 	    return l;
 	}
-	
+
 	public String getDescription() {
 	    return ResourceStrings.getString("add_wiz_review_desc");
 	}
-	
+
 	public Component getComponent() {
 	    return stepBox;
 	}
-	
+
 	public void setActive(int direction) {
 	    // Use number of addresses actually generated, not requested
 	    numberLabel.setText(
@@ -962,21 +892,21 @@
 	    }
 	    setFinishEnabled(true);
 	}
-	
+
 	public boolean setInactive(int direction) {
 	    // Nothing to do
 	    return true;
 	}
     }
-     
+
     public AddressWizard(Frame owner, Network net) {
 	super(owner, "");
 	setTitle(MessageFormat.format(
 	    ResourceStrings.getString("address_wizard_title"), net.toString()));
-	
+
 	network = net;
 	startAddress = network.getAddress();
-	
+
 	try {
 	    noMacro = new Macro(ResourceStrings.getString("no_macro_item"));
 	} catch (ValidationException e) {
@@ -994,7 +924,7 @@
 	addStep(new ReviewStep());
 	showFirstStep();
     }
-    
+
     public void doFinish() {
 	/*
 	 * Method here is as follows:
@@ -1036,7 +966,7 @@
 			rec.setMacro(macro);
 		}
 		rec.setComment(comment);
-		
+
 		// This is final so it can be used in the errorDisplay Runnable
 		final ErrorTable failedTable = new ErrorTable(
 		    ResourceStrings.getString("address_column"),
@@ -1052,12 +982,12 @@
 			rec.setClientIP(addr.addr);
 			rec.setClientName(addr.name);
 			server.addClient(rec, network.toString());
-		    	progress.update(i+1, addr.addr.toString());
+			progress.update(i+1, addr.addr.toString());
 		    } catch (InterruptedException e) {
-		        SwingUtilities.invokeLater(finisher);
+			SwingUtilities.invokeLater(finisher);
 			return;
 		    } catch (Throwable e) {
-		        // Pick the best message for the exception thrown
+			// Pick the best message for the exception thrown
 			String msg;
 			if (e instanceof ExistsException) {
 			    msg = ResourceStrings.getString("address_exists");
@@ -1069,33 +999,33 @@
 			failedTable.addError(addr.addr, msg);
 		    }
 		}
-			
+
 		// If any errors occurred, display them all at once.
 		if (!failedTable.isEmpty()) {
 		    Runnable errorDisplay = new Runnable() {
-		        public void run() {
+			public void run() {
 			    Object [] objs = new Object[2];
 			    objs[0] =
-			        ResourceStrings.getString("add_wiz_error");
+				ResourceStrings.getString("add_wiz_error");
 			    JScrollPane scrollPane =
-			        new JScrollPane(failedTable);
+				new JScrollPane(failedTable);
 			    // Resize the table to something kind of small
 			    Dimension d =
-			        failedTable.
+				failedTable.
 				getPreferredScrollableViewportSize();
 			    d.height = 80;
 			    failedTable.setPreferredScrollableViewportSize(d);
 			    objs[1] = scrollPane;
 			    JOptionPane.showMessageDialog(AddressWizard.this,
-			        objs,
-			        ResourceStrings.getString("server_error_title"),
-			        JOptionPane.ERROR_MESSAGE);
-		    	}
+				objs,
+				ResourceStrings.getString("server_error_title"),
+				JOptionPane.ERROR_MESSAGE);
+			}
 		    };
 		    try {
-		        SwingUtilities.invokeAndWait(errorDisplay);
+			SwingUtilities.invokeAndWait(errorDisplay);
 		    } catch (Throwable e) {
-		    	e.printStackTrace();
+			e.printStackTrace();
 		    }
 		}
 		SwingUtilities.invokeLater(finisher);
@@ -1103,7 +1033,7 @@
 	};
 	addThread.start();
     }
-    
+
     protected void reallyFinish() {
         super.doFinish();
     }
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/ConfigWizard.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/ConfigWizard.java	Thu Sep 09 11:46:43 2010 -0400
@@ -64,347 +64,6 @@
 	ResourceStrings.getString("cfg_wiz_days"),
 	ResourceStrings.getString("cfg_wiz_weeks") };
     private static final int [] unitMultiples = { 60*60, 24*60*60, 7*24*60*60 };
-    private HostResource hostResource = null;
-
-    /**
-     * This class defines a host resource component.
-     */
-    private class HostResource extends Box {
-
-	/**
-	 * The host resource(eg., files, dns).
-	 */
-	private String resource = null;
-
-	/**
-	 * The description of the resource.
-	 */
-	private String description = null;
-
-	/**
-	 * The button for the resource.
-	 */
-	private HostButton hostButton = null;
-
-	/**
-	 * The domain field for the resource (if any)
-	 */
-	private NoSpaceField domainField = null;
-
-	/**
-	 * The constructor.
-	 * @param resource the resource value for the config file
-	 * @param description description of the resource
-	 * @param defaultdomain default domain (if any) for the resource
-	 * @param enabled determines whether resource is selectable
-	 */
-	public HostResource(String resource, String description,
-	    String defaultDomain, String domainDescription, boolean enabled) {
-
-	    super(BoxLayout.X_AXIS);
-
-	    this.resource = resource;
-	    this.description = description;
-
-	    // Every host resource needs a button even if the resource
-	    // isn't one that will be selectable.
-	    //
-	    hostButton = new HostButton(this, false);
-	    hostButton.setAlignmentX(Component.LEFT_ALIGNMENT);
-	    add(hostButton);
-	    if (!enabled) {
-		hostButton.setEnabled(false);
-		defaultDomain = new String();
-	    }
-
-	    // If the defaultDomain is null, then the host resource
-	    // does not require a domain. Otherwise, the resource
-	    // must have a text field so that the user can supply
-	    // a domain.
-	    //
-	    if (defaultDomain != null) {
-		add(Box.createHorizontalStrut(20));
-
-		Box domainBox = Box.createHorizontalBox();
-
-		JLabel label = new JLabel(domainDescription);
-		label.setForeground(Color.black);
-		domainBox.add(label);
-
-		domainField = new NoSpaceField(defaultDomain, 10);
-		domainField.setEnabled(false);
-		domainField.setMaximumSize(domainField.getPreferredSize());
-
-		label.setLabelFor(domainField);
-		domainBox.add(domainField);
-		label.setToolTipText(description);
-
-		add(domainBox);
-
-		if (!enabled) {
-		    domainField.setEditable(false);
-		    label.setEnabled(false);
-		} else {
-		    // Disable the forward button if domain empty.
-		    DocumentListener listener = new DocumentListener() {
-			public void insertUpdate(DocumentEvent e) {
-			    setForwardEnabled(
-				domainField.getText().length() != 0);
-			}
-			public void changedUpdate(DocumentEvent e) {
-			    insertUpdate(e);
-			}
-			public void removeUpdate(DocumentEvent e) {
-			    insertUpdate(e);
-			}
-		    };
-		    domainField.getDocument().addDocumentListener(listener);
-		}
-
-	    }
-
-	} // constructor
-
-	/**
-	 * Sets or unsets the host resource.
-	 * @param isSelected if true, sets the resource, else unsets it
-	 */
-	public void setSelected(boolean isSelected) {
-	    if (isSelected) {
-		setHostResource(this);
-		if (!hostButton.isSelected()) {
-		    hostButton.setSelected(true);
-		}
-		if (domainField != null) {
-		    domainField.setEnabled(true);
-		    setForwardEnabled(domainField.getText().length() != 0);
-		} else {
-		    setForwardEnabled(true);
-		}
-	    } else {
-		if (domainField != null) {
-		    domainField.setEnabled(false);
-		}
-	    }
-	} // setSelected
-
-	/**
-	 * Returns the host resource.
-	 * @return the host resource.
-	 */
-	public String getResource() {
-	    return resource;
-	} // getResource
-
-	/**
-	 * Returns the resource description.
-	 * @return the resource description.
-	 */
-	public String getDescription() {
-	    return description;
-	} // getDescription
-
-	/**
-	 * Returns the domain for this component.
-	 * @return the domain for this component.
-	 */
-	public String getDomain() {
-	    if (domainField == null) {
-		return null;
-	    } else {
-		return domainField.getText();
-	    }
-	} // getDomain
-
-	/**
-	 * Returns the HostButton contained in this component.
-	 * @return the HostButton contained in this component.
-	 */
-	public HostButton getHostButton() {
-	    return hostButton;
-	} // getHostButton
-
-    } // hostResource
-
-    /**
-     * This class maps a radio button to its HostResource
-     */
-    private class HostButton extends JRadioButton {
-
-	/**
-	 * The HostResource to link to the radio button.
-	 */
-	private HostResource hostResource = null;
-
-	/**
-	 * Constructs a HostButton from a HostResource and determines
-	 * whether the button should be selected using the boolean argument.
-	 * @param hostResource the HostResource to map to the radio button.
-	 * @param selected select the radio button?
-	 */
-	public HostButton(HostResource hostResource, boolean selected) {
-	    super(hostResource.getDescription(), selected);
-	    this.hostResource = hostResource;
-	} // constructor
-
-	/**
-	 * Returns the HostResource mapped to the radio button.
-	 * @return the HostResource mapped to the radio button.
-	 */
-	public HostResource getHostResource() {
-	    return hostResource;
-	} // getHostResource
-
-    } // HostButton
-
-    // Select where host data will be stored.
-    class HostDataStep implements WizardStep {
-
-	/**
-	 * The component provided to the wizard.
-	 */
-	private Box stepBox;
-
-	/**
-	 * The basic constructor for the wizard step.
-	 */
-	public HostDataStep() {
-
-	    stepBox = Box.createVerticalBox();
-
-	    // Explanatory step text
-	    //
-	    JComponent c = Wizard.createTextArea(
-		ResourceStrings.getString("cfg_wiz_host_explain"), 2, 45);
-	    c.setAlignmentX(Component.LEFT_ALIGNMENT);
-	    stepBox.add(c);
-	    stepBox.add(Box.createVerticalStrut(5));
-
-	    // Create button listener, that will set the selected
-	    // host resource when the button is selected.
-	    //
-	    ChangeListener buttonListener = new ChangeListener() {
-		public void stateChanged(ChangeEvent e) {
-		    HostButton button = (HostButton)e.getSource();
-		    HostResource hostResource = button.getHostResource();
-		    hostResource.setSelected(button.isSelected());
-		}
-	    };
-
-	    // Create panel that will contain the buttons.
-	    //
-	    JPanel boxPanel = new JPanel();
-	    boxPanel.setAlignmentX(Component.LEFT_ALIGNMENT);
-	    boxPanel.setLayout(new GridLayout(4, 1));
-
-	    // List the host resource choices.
-	    //
-	    ButtonGroup buttonGroup = new ButtonGroup();
-
-	    // The "do not manage hosts" option.
-	    //
-	    String hostDescription =
-		ResourceStrings.getString("cfg_wiz_no_host_management");
-	    HostResource hostResource = new HostResource(null,
-		hostDescription, null, null, true);
-	    HostButton hbMgt = hostResource.getHostButton();
-            hbMgt.setToolTipText(hostDescription);
-	    hostResource.setSelected(true);
-	    hostResource.getHostButton().addChangeListener(buttonListener);
-	    buttonGroup.add(hostResource.getHostButton());
-	    boxPanel.add(hostResource);
-
-	    // The "files" option.
-	    //
-	    hostDescription =
-		ResourceStrings.getString("cfg_wiz_files");
-	    hostResource = new HostResource(DhcpConfigOpts.DSVC_CV_FILES,
-		hostDescription, null, null, true);
-	    HostButton hb = hostResource.getHostButton();
-	    hb.setToolTipText(hostDescription);
-	    hostResource.getHostButton().addChangeListener(buttonListener);
-	    buttonGroup.add(hostResource.getHostButton());
-	    boxPanel.add(hostResource);
-
-	    // The "dns" option. Only enabled if it can be managed
-	    // from the selected server.
-	    //
-	    String domainDefault = null;
-	    boolean enabled = false;
-	    String domainDescription =
-		ResourceStrings.getString("cfg_wiz_domain") + " ";
-	    try {
-		domainDefault =
-		    server.getStringOption(StandardOptions.CD_DNSDOMAIN, "");
-	    } catch (Throwable e) {
-		domainDefault = new String();
-	    }
-
-	    try {
-		enabled =
-		    server.isHostsValid(DhcpConfigOpts.DSVC_CV_DNS, "");
-	    } catch (Throwable e) {
-		enabled = false;
-	    }
-
-	    hostDescription =
-		ResourceStrings.getString("cfg_wiz_dns");
-
-	    hostResource = new HostResource(DhcpConfigOpts.DSVC_CV_DNS,
-		hostDescription, domainDefault, domainDescription, enabled);
-	    HostButton hbDNS = hostResource.getHostButton();
-            hbDNS.setToolTipText(hostDescription);
-	    hostResource.getHostButton().addChangeListener(buttonListener);
-	    buttonGroup.add(hostResource.getHostButton());
-	    boxPanel.add(hostResource);
-
-	    // Add the panel to the stepBox component.
-	    //
-	    stepBox.add(boxPanel);
-	    stepBox.add(Box.createVerticalStrut(10));
-	    stepBox.add(Box.createVerticalGlue());
-
-	} // constructor
-
-	public String getDescription() {
-	    return ResourceStrings.getString("cfg_wiz_hostdata_desc");
-	} // getDescription
-
-	public Component getComponent() {
-	    return stepBox;
-	} // getComponent
-
-	public void setActive(int direction) {
-	    setForwardEnabled(true);
-	} // setActive
-
-	public boolean setInactive(int direction) {
-
-	    // If moving forward, validate that the host resource/domain
-	    // input by the user is manageable from the selected server.
-	    //
-	    boolean valid = true;
-	    if (direction == FORWARD) {
-		String resource = getHostResource().getResource();
-		String domain = getHostResource().getDomain();
-		if (resource != null) {
-		    try {
-			valid = server.isHostsValid(resource, domain);
-		    } catch (Throwable e) {
-			valid = false;
-		    }
-		}
-		if (!valid) {
-		    JOptionPane.showMessageDialog(ConfigWizard.this,
-			ResourceStrings.getString("cfg_wiz_invalid_host"),
-			ResourceStrings.getString("input_error"),
-			JOptionPane.ERROR_MESSAGE);
-		}
-	    }
-	    return (valid);
-	} // setInactive
-
-    } // HostDataStep
 
     // This step specifies lease length and renewal policies for the server
     class LeaseStep implements WizardStep {
@@ -1161,7 +820,6 @@
 
     class ReviewStep implements WizardStep {
 	private JLabel storeLabel;
-	private JLabel hostLabel;
 	private JLabel leaseLabel;
 	private JLabel networkLabel;
 	private JLabel netTypeLabel;
@@ -1193,9 +851,6 @@
 		addLabel("cfg_wiz_datastore");
 		storeLabel = addField("uninitialized");
 
-		addLabel("cfg_wiz_hosts_resource");
-		hostLabel = addField("uninitialized");
-
 		jlTmp = addLabelMnemonic("cfg_wiz_lease_length");
 		leaseLabel = addField("1 day");
 
@@ -1276,7 +931,6 @@
 	    setFinishEnabled(true);
 	    if (fullConfig) {
 		storeLabel.setText(getDsconf().getModule().getDescription());
-		hostLabel.setText(getHostResource().getDescription());
 
 		// Display lease length, reducing to largest units possible
 		int lengthVal = 0;
@@ -1378,7 +1032,6 @@
 		ResourceStrings.getString("cfg_wiz_explain"),
 		ResourceStrings.getString("cfg_wiz_store_explain")));
 	    addStep(new DatastoreModuleStep());
-	    addStep(new HostDataStep());
 	    addStep(new LeaseStep());
 	    addStep(new DnsStep());
 	}
@@ -1428,12 +1081,6 @@
 	    DhcpdOptions options = new DhcpdOptions();
 	    options.setDaemonEnabled(true);
 	    options.setDhcpDatastore(getDsconf().getDS());
-	    if (getHostResource().getResource() != null) {
-		options.setHostsResource(getHostResource().getResource());
-	    }
-	    if (getHostResource().getDomain() != null) {
-		options.setHostsDomain(getHostResource().getDomain());
-	    }
 	    try {
 		server.writeDefaults(options);
 	    } catch (Throwable e) {
@@ -1537,21 +1184,4 @@
 	    DhcpmgrApplet.showHelp("network_wizard");
 	}
     }
-
-    /**
-     * Sets hostResource.
-     * @param hostResource the host resource value.
-     */
-    public void setHostResource(HostResource hostResource) {
-	this.hostResource = hostResource;
-    } // setHostResource
-
-    /**
-     * Returns the hostResource.
-     * @return the hostResource.
-     */
-    public HostResource getHostResource() {
-	return hostResource;
-    } // getHostResource
-
 }
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/ConvertWizard.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/ConvertWizard.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright 2001-2002 by Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -120,7 +118,7 @@
             saveTables = new JCheckBox(
                 ResourceStrings.getString("cvt_wiz_save_label"), false);
 	    saveTables.setToolTipText(
-	        ResourceStrings.getString("cvt_wiz_save_label"));
+		ResourceStrings.getString("cvt_wiz_save_label"));
             saveTables.setAlignmentX(Component.LEFT_ALIGNMENT);
             stepBox.add(saveTables);
             stepBox.add(Box.createVerticalGlue());
@@ -193,7 +191,7 @@
 	    stepBox.add(Wizard.createTextArea(
 		ResourceStrings.getString("cvt_wiz_review_explain"),
 		    3, 45));
-	    
+
 	    panel = new JPanel(new FieldLayout());
 
 	    addLabel("cvt_wiz_old_datastore").setToolTipText(
@@ -223,12 +221,12 @@
 	 * @param s the label string.
 	 */
 	private JLabel addLabel(String s) {
-	    JLabel addLbl = 
+	    JLabel addLbl =
 		new JLabel(ResourceStrings.getString(s));
 	    panel.add(FieldLayout.LABEL, addLbl);
 	    return addLbl;
 	} // addLabel
-	
+
 	/**
 	 * Adds a field to the review panel.
 	 * @param s the field value.
@@ -240,15 +238,15 @@
 	    panel.add(FieldLayout.FIELD, l);
 	    return l;
 	} // addField
-	
+
 	public String getDescription() {
 	    return ResourceStrings.getString("cvt_wiz_review_desc");
 	} // getDescription
-	
+
 	public Component getComponent() {
 	    return stepBox;
 	} // getComponent
-	
+
 	public void setActive(int direction) {
 
 	    setFinishEnabled(true);
@@ -274,17 +272,17 @@
 		message = ResourceStrings.getString("no");
 	    }
 	    saveLabel.setText(message);
-	    
+
 	} // setActive
-	
+
 	public boolean setInactive(int direction) {
 	    return true;
 	} // setInactive
 
     } // ReviewStep
-    
+
     /**
-     * Constructor for the ConvertWizard. 
+     * Constructor for the ConvertWizard.
      * @param owner owner of the wizard.
      * @param title title of the wizard.
      */
@@ -343,7 +341,7 @@
 	addStep(new ReviewStep());
 	showFirstStep();
     }
-    
+
     public void doFinish() {
 	/*
 	 * To convert the data store, we have to do the following items:
@@ -438,7 +436,7 @@
 	//
 	Thread convertThread = new Thread() {
 	    public void run() {
-	
+
 		String message = null;
 		MessageFormat form;
 		MessageFormat errForm;
@@ -446,7 +444,7 @@
 		boolean saveTables =
 		    saveTablesStep.isSaveTablesSelected();
 
-		// This is final so it can be used in the 
+		// This is final so it can be used in the
 		// errorDisplay Runnable.
 		//
 		final ErrorTable failedTable = new ErrorTable(
@@ -556,7 +554,7 @@
 			String netString = networks[i].toString();
 			args[0] = netString;
 			try {
-			    netServer.deleteNetwork(netString, false, false,
+			    netServer.deleteNetwork(netString, false,
 				oldDhcpDatastore);
 			    message = form.format(args);
 			} catch (Throwable e) {
@@ -609,7 +607,7 @@
 			message = ResourceStrings.getString(
 			    "cvt_wiz_server_started");
 		    } catch (Throwable e) {
-		        message =
+			message =
 			    ResourceStrings.getString("cvt_wiz_start_err");
 			failedTable.addError("", e.getMessage());
 		    } finally {
@@ -645,12 +643,12 @@
 				objs,
 				ResourceStrings.getString("server_error_title"),
 				JOptionPane.ERROR_MESSAGE);
-		    	}
+			}
 		    };
 		    try {
 			SwingUtilities.invokeAndWait(errorDisplay);
 		    } catch (Throwable e) {
-		    	e.printStackTrace();
+			e.printStackTrace();
 		    }
 		}
 		SwingUtilities.invokeLater(finisher);
@@ -658,7 +656,7 @@
 	};
 	convertThread.start();
     }
-    
+
     public void doHelp() {
 	DhcpmgrApplet.showHelp("convert_wizard");
     }
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/CreateAddressDialog.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/CreateAddressDialog.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright 1998-2002 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -58,11 +56,11 @@
 	private Object currentValue;
 	private Macro [] data = null;
 	private String noMacro;
-	
+
 	public MacroListModel() {
 	    try {
 		noMacro = ResourceStrings.getString("no_macro_item");
-	        DhcptabMgr server = DataManager.get().getDhcptabMgr();
+		DhcptabMgr server = DataManager.get().getDhcptabMgr();
 		data = server.getMacros();
 	    } catch (NoTableException e) {
 		// can function without table
@@ -70,14 +68,14 @@
 		e.printStackTrace();
 	    }
 	}
-	
+
 	public int getSize() {
 	    if (data == null)
 		return 1;
 	    else
 		return data.length+1;
 	}
-	
+
 	public Object getElementAt(int index) {
 	    if (index == 0) {
 		return noMacro;
@@ -85,12 +83,12 @@
 		return data[index-1].getKey();
 	    }
 	}
-	
+
 	public void setSelectedItem(Object anItem) {
 	    currentValue = anItem;
 	    fireContentsChanged(this, -1, -1);
 	}
-	
+
 	public Object getSelectedItem() {
 	    return currentValue;
 	}
@@ -99,11 +97,10 @@
     public static final int CREATE = 0;
     public static final int EDIT = 1;
     public static final int DUPLICATE = 2;
-    
+
     private int mode = EDIT;
     private Network network;
     private IPAddressField address;
-    private HostnameField name;
     private JTextField server;
     private JComboBox macro;
     private JTextField clientId;
@@ -120,7 +117,7 @@
     private Vector listeners;
     private DateFormat dateFormat =
 	DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT);
-    
+
     public CreateAddressDialog(Frame f, int mode, DhcpClientRecord rec,
 	    Network net) {
 	super(f);
@@ -142,11 +139,11 @@
 	default:
 	    break;
 	}
-	
+
 	getContentPane().setLayout(new BorderLayout());
-	
+
 	JTabbedPane tabbedPane = new JTabbedPane();
-	
+
 	GridBagLayout bag = new GridBagLayout();
 	JPanel mainPanel = new JPanel(bag);
 	GridBagConstraints c = new GridBagConstraints();
@@ -155,7 +152,7 @@
 	c.fill = GridBagConstraints.HORIZONTAL;
 	c.insets = new Insets(5, 5, 5, 5);
 	c.weightx = c.weighty = 1.0;
-	
+
 	// Label and text field for address
 	Mnemonic mnIP =
             new Mnemonic(ResourceStrings.getString("ip_address_label"));
@@ -173,35 +170,6 @@
 	++c.gridx;
 	bag.setConstraints(address, c);
 	mainPanel.add(address);
-	
-	// Label and text field for name
-	Mnemonic mnClient =
-            new Mnemonic(ResourceStrings.getString("hostname_label"));
-        l = new JLabel(mnClient.getString(), SwingConstants.RIGHT);
-        ++c.gridy;
-        c.gridx = 0;
-        bag.setConstraints(l, c);
-        mainPanel.add(l);
-        name = new HostnameField();
-
-        l.setLabelFor(name);
-        l.setToolTipText(mnClient.getString());
-	l.setDisplayedMnemonic(mnClient.getMnemonic());
-
-	++c.gridx;
-	bag.setConstraints(name, c);
-	mainPanel.add(name);
-	
-	name.setEditable(true);
-	try {
-	    DhcpdOptions opts =
-	    DataManager.get().getDhcpServiceMgr().readDefaults();
-	    if (opts.getHostsResource() == null) {
-		name.setEditable(false);
-	    }
-	} catch (BridgeException e) {
-	    // Assume set
-	}
 
 	// label and field for owning server
 	Mnemonic mnOwn =
@@ -220,7 +188,7 @@
 	++c.gridx;
 	bag.setConstraints(server, c);
 	mainPanel.add(server);
-	
+
 	// label and combo box for macro
 	Mnemonic mnMacro =
             new Mnemonic(ResourceStrings.getString("config_macro_label"));
@@ -240,7 +208,7 @@
 	++c.gridx;
 	bag.setConstraints(macro, c);
 	mainPanel.add(macro);
-	
+
 	// Comment
 	Mnemonic mnComm =
             new Mnemonic(ResourceStrings.getString("comment_label"));
@@ -258,13 +226,13 @@
 	++c.gridx;
 	bag.setConstraints(comment, c);
 	mainPanel.add(comment);
-	
+
 	// Create first panel of tabs
 	tabbedPane.addTab(ResourceStrings.getString("address_tab_label"),
 	    mainPanel);
-	
+
 	mainPanel = new JPanel(new BorderLayout(5, 5));
-	
+
 	// Client ID
 	Mnemonic mnID =
             new Mnemonic(ResourceStrings.getString("client_id_label"));
@@ -277,14 +245,14 @@
         l.setToolTipText(mnID.getString());
 	l.setDisplayedMnemonic(mnID.getMnemonic());
 	idPanel.add(clientId);
-	
+
 	manual = new JCheckBox(ResourceStrings.getString("manual_checkbox"));
 	idPanel.add(manual);
 	manual.setToolTipText(
 	    ResourceStrings.getString("manual_checkbox"));
 
 	mainPanel.add(idPanel, BorderLayout.NORTH);
-	
+
 	// radio buttons for lease state
 	bag = new GridBagLayout();
 	JPanel leasePanel = new JPanel(bag);
@@ -297,11 +265,11 @@
 	    BorderFactory.createLineBorder(Color.black));
 	leasePanel.setBorder(BorderFactory.createTitledBorder(b,
 	    ResourceStrings.getString("lease_policy_label")));
-	
+
 	// Reset constraints
 	c.gridx = c.gridy = 0;
 	c.gridwidth = 1;
-	
+
 	buttonGroup = new ButtonGroup();
 	temporary = new JRadioButton();
 	buttonGroup.add(temporary);
@@ -316,7 +284,7 @@
 	c.weightx = 1.0;
 	bag.setConstraints(l, c);
 	leasePanel.add(l);
-	
+
 	expirationDate = new JTextField(30);
 
         l.setLabelFor(expirationDate);
@@ -326,7 +294,7 @@
 	++c.gridy;
 	bag.setConstraints(expirationDate, c);
 	leasePanel.add(expirationDate);
-	
+
 	permanent = new JRadioButton();
 	buttonGroup.add(permanent);
 	++c.gridy;
@@ -348,43 +316,43 @@
 	leasePanel.add(l);
 
 	mainPanel.add(leasePanel, BorderLayout.CENTER);
-		
+
 	// Flag checkboxes
 	JPanel southPanel = new JPanel(new BorderLayout(5, 5));
 	southPanel.setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
 	bootp = new JCheckBox(ResourceStrings.getString("bootp_checkbox"));
 
 	bootp.setToolTipText(
-	    ResourceStrings.getString("bootp_checkbox")); 
+	    ResourceStrings.getString("bootp_checkbox"));
 
 	bootp.setHorizontalAlignment(SwingConstants.LEFT);
 	southPanel.add(bootp, BorderLayout.CENTER);
-	
+
 	unusable = new JCheckBox(
 	    ResourceStrings.getString("unusable_checkbox"));
 
         unusable.setToolTipText(
-            ResourceStrings.getString("unusable_checkbox"));            
+            ResourceStrings.getString("unusable_checkbox"));
 
 	unusable.setHorizontalAlignment(SwingConstants.LEFT);
 	southPanel.add(unusable, BorderLayout.SOUTH);
-	
+
 	mainPanel.add(southPanel, BorderLayout.SOUTH);
-	
+
 	tabbedPane.addTab(ResourceStrings.getString("lease_tab_label"),
 	    mainPanel);
 	JPanel borderPanel = new JPanel(new BorderLayout());
 	borderPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
 	borderPanel.add(tabbedPane, BorderLayout.CENTER);
-	
+
 	getContentPane().add(borderPanel, BorderLayout.CENTER);
-	
+
 	buttonPanel = new ButtonPanel(true);
 	buttonPanel.addButtonPanelListener(this);
 	getContentPane().add(buttonPanel, BorderLayout.SOUTH);
-	
+
 	setClient(rec);
-	
+
 	DocumentListener docListener = new DocumentListener() {
 	    public void insertUpdate(DocumentEvent e) {
 		buttonPanel.setOkEnabled(address.getDocument().getLength() != 0
@@ -400,32 +368,23 @@
 
 	address.getDocument().addDocumentListener(docListener);
 	server.getDocument().addDocumentListener(docListener);
-	
+
 	if (mode == EDIT) {
 	    buttonPanel.setOkEnabled(true);
 	}
     }
-    
+
     public void setClient(DhcpClientRecord c) {
 	originalClient = (DhcpClientRecord)c.clone();
 	client = c;
 	resetValues();
     }
-    
+
     private void resetValues() {
 	if (mode == DUPLICATE) {
 	    address.setText("");
-	    name.setText("");
 	} else {
-	    String a = client.getClientIPAddress();
-	    String n = client.getClientName();
-	    address.setText(a);
-	    if (a.equals(n)) {
-		// If name == address, there is no name, so leave it blank
-		name.setText("");
-	    } else {
-		name.setText(n);
-	    }
+	    address.setText(client.getClientIPAddress());
 	}
 	if (mode == CREATE && (client.getServerName() == null ||
 		client.getServerName().length() == 0)) {
@@ -455,14 +414,14 @@
 	    expirationDate.setText(dateFormat.format(d));
 	}
     }
-    
+
     public void buttonPressed(int buttonId) {
 	switch (buttonId) {
 	case OK:
 	    IPAddress addr = address.getValue();
 	    if (addr == null) {
-	    	// Bad IP address
-	        MessageFormat form = new MessageFormat(
+		// Bad IP address
+		MessageFormat form = new MessageFormat(
 		    ResourceStrings.getString("invalid_address"));
 		Object [] args = new Object[] { address.getText() };
 		JOptionPane.showMessageDialog(this, form.format(args),
@@ -471,7 +430,7 @@
 		return;
 	    }
 	    if (!network.containsAddress(addr)) {
-	    	// Address is not on the network we're editing
+		// Address is not on the network we're editing
 		MessageFormat form = new MessageFormat(
 		    ResourceStrings.getString("bad_network_address"));
 		Object [] args = new Object[] {
@@ -484,23 +443,11 @@
 		return;
 	    }
 	    try {
-	    	client.setClientIP(address.getValue());
+		client.setClientIP(address.getValue());
 	    } catch (ValidationException e) {
-	        // This shouldn't happen, should have caught any problem already
+		// This shouldn't happen, should have caught any problem already
 	    }
 
-	    // This logic is needed because if the original client name
-	    // was equal to its IP address, then this really means that
-	    // that the name was not set. If this is the case and the
-	    // name field is empty, then no change was made. In all other
-	    // cases we can be assured that the client name was changed
-	    // or is valid.
-	    //
-	    if (!(name.getText().length() == 0 &&
-		originalClient.getClientIPAddress().equals(
-		originalClient.getClientName()))) {
-		client.setClientName(name.getText());
-	    }
 	    try {
 		if (!server.getText().equals(client.getServerName())) {
 		    // Don't bother resetting if it hasn't changed
@@ -508,7 +455,7 @@
 		}
 	    } catch (ValidationException e) {
 		// Bad server name
-	        MessageFormat form = new MessageFormat(
+		MessageFormat form = new MessageFormat(
 		    ResourceStrings.getString("invalid_server"));
 		Object [] args = new Object[] { server.getText() };
 		JOptionPane.showMessageDialog(this, form.format(args),
@@ -524,10 +471,10 @@
 	    }
 	    client.setComment(comment.getText());
 	    try {
-	    	client.setClientId(clientId.getText());
+		client.setClientId(clientId.getText());
 	    } catch (ValidationException e) {
-	    	// Bad client ID
-	        MessageFormat form = new MessageFormat(
+		// Bad client ID
+		MessageFormat form = new MessageFormat(
 		    ResourceStrings.getString("invalid_client_id"));
 		Object [] args = new Object[] { clientId.getText() };
 		JOptionPane.showMessageDialog(this, form.format(args),
@@ -547,8 +494,8 @@
 		    client.setExpiration(d);
 		}
 	    } catch (ParseException e) {
-	    	// Bad date/time entered
-	    	MessageFormat form = new MessageFormat(
+		// Bad date/time entered
+		MessageFormat form = new MessageFormat(
 		    ResourceStrings.getString("invalid_date"));
 		Object [] args = new Object[] {
 		    expirationDate.getText(),
@@ -564,7 +511,7 @@
 		DhcpNetMgr server = DataManager.get().getDhcpNetMgr();
 		if (mode == EDIT) {
 		    server.modifyClient(originalClient, client,
-		        network.toString());
+			network.toString());
 		} else {
 		    server.addClient(client, network.toString());
 		}
@@ -623,15 +570,15 @@
 	    break;
 	}
     }
-    
+
     public void addActionListener(ActionListener l) {
 	listeners.addElement(l);
     }
-    
+
     public void removeActionListener(ActionListener l) {
 	listeners.removeElement(l);
     }
-    
+
     protected void fireActionPerformed() {
 	String command = null;
 	switch (mode) {
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/DeleteAddressDialog.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/DeleteAddressDialog.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright 1998-2002 by Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -44,10 +42,9 @@
  */
 
 public class DeleteAddressDialog extends MultipleOperationDialog {
-    private JCheckBox hostsBox;
     private DhcpClientRecord [] recs;
     private String table;
-    
+
     // Model for the list of addresses to be deleted
     class AddressTableModel extends AbstractTableModel {
 	public int getRowCount() {
@@ -57,11 +54,11 @@
 		return recs.length;
 	    }
 	}
-	
+
 	public int getColumnCount() {
 	    return 2;
 	}
-	
+
 	public Object getValueAt(int row, int column) {
 	    if (column == 0) {
 		return recs[row].getClientIP();
@@ -75,7 +72,7 @@
 		}
 	    }
 	}
-	    
+
 	public Class getColumnClass(int column) {
 	    if (column == 0) {
 		return IPAddress.class;
@@ -91,8 +88,8 @@
 		return ResourceStrings.getString("client_name_column");
 	    }
 	}
-    }    
-    
+    }
+
     public DeleteAddressDialog(Frame f, DhcpClientRecord [] clients,
 	    String table) {
 	// Create the dialog without a reset button
@@ -100,7 +97,7 @@
 	recs = clients;
 	this.table = table;
     }
-    
+
     public String getTitle() {
 	return ResourceStrings.getString("delete_address_title");
     }
@@ -108,7 +105,7 @@
     protected JPanel getMainPanel() {
 	JPanel mainPanel = new JPanel(new BorderLayout(10, 10));
 	mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
-	
+
 	// Place a message at the top of the display
 	JLabel message = new JLabel(
 	    ResourceStrings.getString("delete_address_confirm"));
@@ -118,7 +115,7 @@
 	    ResourceStrings.getString("delete_address_confirm"));
 
 	mainPanel.add(message, BorderLayout.NORTH);
-	
+
 	// Now show the list of addresses to be deleted in a table in the middle
 	JTable addressTable = new JTable(new AddressTableModel());
 	JScrollPane scrollPane = new JScrollPane(addressTable);
@@ -128,27 +125,6 @@
 	addressTable.setDefaultRenderer(IPAddress.class,
 	    new ExtendedCellRenderer());
 	mainPanel.add(scrollPane, BorderLayout.CENTER);
-	
-	// Allow user to specify if hosts records will be deleted, too
-	hostsBox = new JCheckBox(
-	    ResourceStrings.getString("delete_hosts_checkbox"), true);
-	hostsBox.setToolTipText(
-	    ResourceStrings.getString("delete_hosts_checkbox"));
-
-	hostsBox.setHorizontalAlignment(SwingConstants.CENTER);
-	mainPanel.add(hostsBox, BorderLayout.SOUTH);
-
-	hostsBox.setEnabled(true);
-	try {
-	    DhcpdOptions opts =
-	    DataManager.get().getDhcpServiceMgr().readDefaults();
-	    if (opts.getHostsResource() == null) {
-		hostsBox.setEnabled(false);
-		hostsBox.setSelected(false);
-	    }
-	} catch (BridgeException e) {
-	    // Assume set
-	}
 
 	buttonPanel.setOkEnabled(true);
 	return mainPanel;
@@ -175,24 +151,16 @@
         return new Thread() {
 	    public void run() {
 		DhcpNetMgr server = DataManager.get().getDhcpNetMgr();
-		boolean deleteHosts = hostsBox.isSelected();
 		for (int i = 0; i < recs.length; ++i) {
 		    try {
-			server.deleteClient(recs[i], table, deleteHosts);
+			server.deleteClient(recs[i], table);
 			updateProgress(i+1, recs[i].getClientIPAddress());
 		    } catch (InterruptedException e) {
 			// User asked us to stop
 			closeDialog();
 			return;
 		    } catch (Throwable e) {
-			if (e.getMessage().equals("hosts")) {
-			    // Failure was in deleting hosts entry
-			    addError(recs[i].getClientIP(),
-				ResourceStrings.getString(
-				    "hosts_entry_missing"));
-			} else {
-			    addError(recs[i].getClientIP(), e.getMessage());
-			}
+                        addError(recs[i].getClientIP(), e.getMessage());
 		    }
 		}
 		// Errors occurred, display them
@@ -200,7 +168,7 @@
 		    displayErrors(
 			ResourceStrings.getString("delete_address_error"));
 		}
-	    	closeDialog();
+		closeDialog();
 	    }
 	};
     }
@@ -208,7 +176,7 @@
     protected String getHelpKey() {
 	return "delete_address";
     }
-    
+
     protected void fireActionPerformed() {
 	fireActionPerformed(this, DialogActions.DELETE);
     }
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/DeleteNetworksDialog.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/DeleteNetworksDialog.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright 1998-2002 by Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -46,19 +44,19 @@
  * A dialog to remove one or more networks from the DHCP configuration.
  */
 public class DeleteNetworksDialog extends MultipleOperationDialog {
-    
+
     class NetworkListModel extends AbstractListModel {
 	private Vector networks;
-	
+
 	public NetworkListModel() {
 	    networks = new Vector();
 	}
-	
+
 	public void setNetworks(Network [] nets) {
 	    networks.removeAllElements();
 	    addNetworks(nets);
 	}
-	
+
 	public void addNetworks(Object [] nets) {
 	    if (nets != null) {
 		for (int i = 0; i < nets.length; ++i) {
@@ -67,28 +65,27 @@
 	    }
 	    fireContentsChanged(this, 0, networks.size()-1);
 	}
-	
+
 	public void deleteNetworks(Object [] nets) {
 	    for (int i = 0; i < nets.length; ++i) {
 		networks.removeElement((Network)nets[i]);
 	    }
 	    fireContentsChanged(this, 0, networks.size()-1);
 	}
-	
+
 	public Object getElementAt(int index) {
 	    return networks.elementAt(index);
 	}
-	
+
 	public int getSize() {
 	    return networks.size();
-	}	
+	}
     }
-    
+
     private JList keepNets, deleteNets;
-    private JCheckBox deleteHosts;
     private LeftButton leftButton;
     private RightButton rightButton;
-    
+
     public DeleteNetworksDialog(Frame f) {
 	// We want a reset button
 	super(f, true);
@@ -101,7 +98,7 @@
     protected JPanel getMainPanel() {
 	JPanel mainPanel = new JPanel(new BorderLayout());
 	mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
-		
+
 	JPanel netBox = new JPanel(new ProportionalLayout());
 	JPanel panel = new JPanel(new BorderLayout(5, 5));
 
@@ -119,7 +116,7 @@
 	JScrollPane scrollPane = new JScrollPane(keepNets);
 	panel.add(scrollPane, BorderLayout.CENTER);
 	netBox.add("2", panel);
-	
+
 	panel = new JPanel(new VerticalButtonLayout());
 	leftButton = new LeftButton();
 	rightButton = new RightButton();
@@ -128,7 +125,7 @@
 	panel.add(rightButton);
 	panel.add(leftButton);
 	netBox.add("1", panel);
-	
+
 	panel = new JPanel(new BorderLayout(5, 5));
 
 	Mnemonic mnDel =
@@ -147,29 +144,9 @@
 	scrollPane = new JScrollPane(deleteNets);
 	panel.add(scrollPane, BorderLayout.CENTER);
 	netBox.add("2", panel);
-	
-	mainPanel.add(netBox, BorderLayout.CENTER);
-	
-	deleteHosts = new JCheckBox(
-	    ResourceStrings.getString("delete_networks_delete_hosts"));
-	deleteHosts.setToolTipText(
-	    ResourceStrings.getString("delete_networks_delete_hosts"));
-
-	panel = new JPanel();
-	panel.add(deleteHosts);
-	mainPanel.add(panel, BorderLayout.SOUTH);
 
-	deleteHosts.setEnabled(true);
-	try {
-	    DhcpdOptions opts =
-	    DataManager.get().getDhcpServiceMgr().readDefaults();
-	    if (opts.getHostsResource() == null) {
-		deleteHosts.setEnabled(false);		
-	    }
-	} catch (BridgeException e) {
-	    // Assume set
-	}
-	
+	mainPanel.add(netBox, BorderLayout.CENTER);
+
 	// Handle enable and disable of buttons based on selection state
 	keepNets.addListSelectionListener(new ListSelectionListener() {
 	    public void valueChanged(ListSelectionEvent e) {
@@ -179,7 +156,7 @@
 		}
 	    }
 	});
-	
+
 	deleteNets.addListSelectionListener(new ListSelectionListener() {
 	    public void valueChanged(ListSelectionEvent e) {
 		leftButton.setEnabled(!deleteNets.isSelectionEmpty());
@@ -188,7 +165,7 @@
 		}
 	    }
 	});
-	
+
 	// Handle button presses
 	rightButton.addActionListener(new ActionListener() {
 	    public void actionPerformed(ActionEvent e) {
@@ -205,7 +182,7 @@
 		keepNets.clearSelection();
 	    }
 	});
-	
+
 	leftButton.addActionListener(new ActionListener() {
 	    public void actionPerformed(ActionEvent e) {
 		Object [] nets = deleteNets.getSelectedValues();
@@ -226,11 +203,10 @@
 
 	return mainPanel;
     }
-    
+
     protected void doReset() {
 	try {
 	    buttonPanel.setOkEnabled(false);
-	    deleteHosts.setSelected(false);
 	    ((NetworkListModel)deleteNets.getModel()).setNetworks(null);
 	    ((NetworkListModel)keepNets.getModel()).setNetworks(
 		DataManager.get().getNetworks(false));
@@ -247,7 +223,7 @@
     protected int getProgressLength() {
         return deleteNets.getModel().getSize();
     }
-    
+
     protected String getErrorHeading() {
     	return ResourceStrings.getString("network_column");
     }
@@ -255,13 +231,13 @@
     protected Thread getOperationThread() {
     	return new Thread() {
 	    public void run() {
-	        NetworkListModel model =
+		NetworkListModel model =
 		    (NetworkListModel)deleteNets.getModel();
 		for (int i = 0; i < model.getSize(); ++i) {
 		    Network net = (Network)model.getElementAt(i);
 		    try {
 			DataManager.get().getDhcpNetMgr().deleteNetwork(
-			    net.toString(), true, deleteHosts.isSelected());
+			    net.toString(), true);
 			updateProgress(i+1, net.toString());
 		    } catch (InterruptedException e) {
 			// User asked us to stop
@@ -273,7 +249,7 @@
 		}
 		if (errorsOccurred()) {
 		    displayErrors(
-		        ResourceStrings.getString("delete_networks_error"));
+			ResourceStrings.getString("delete_networks_error"));
     		}
 		closeDialog();
 	    }
@@ -283,7 +259,7 @@
     protected String getHelpKey() {
     	return "delete_network";
     }
-    
+
     protected void fireActionPerformed() {
 	fireActionPerformed(this, DialogActions.OK);
     }
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/ResourceBundle.properties	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/ResourceBundle.properties	Thu Sep 09 11:46:43 2010 -0400
@@ -247,7 +247,6 @@
 address_tab_label=Address
 lease_tab_label=Lease
 ip_address_label=&IP Address:
-hostname_label=C&lient Name:
 owning_server_label=O&wned by Server:
 config_macro_label=Configuration &Macro:
 client_id_label=C&lient ID:
@@ -265,8 +264,6 @@
 #
 delete_address_title=Delete Address
 delete_address_confirm=OK to delete the following addresses?
-delete_hosts_checkbox=Delete from hosts table
-hosts_entry_missing=No entry was found in the server's hosts table, address was not deleted.
 
 delete_address_error=The following errors occurred while deleting addresses:
 delete_addr_progress=Deleting address:
@@ -290,9 +287,6 @@
 add_wiz_server_label=&Managed by Server:
 add_wiz_start_explain=What is the first IP number of the range of addresses you want to add?
 add_wiz_start_label=S&tarting IP Address:
-add_wiz_generate_explain=Would you like this program to generate a list of client names for you? For example, if you specify the root name "sales", client names will be sales-1, sales-2, etc.
-add_wiz_generate_label=Generate Client Names
-add_wiz_rootname_label=&Root Name:
 add_wiz_invalid_address={0} is not a valid IP address.  Please enter a correctly formatted IP address.
 
 add_wiz_confirm_desc=Confirm the IP address list.
@@ -372,14 +366,6 @@
 cfg_wiz_explain=This wizard will help you configure the system as a DHCP server.
 cfg_wiz_store_explain=Where would you like to store the DHCP configuration data?
 
-cfg_wiz_host_explain=Which of the following nameservices should be used to store hosts records?
-cfg_wiz_no_host_management=Do not manage hosts records
-cfg_wiz_files=/etc/hosts
-cfg_wiz_dns=DNS
-cfg_wiz_hostdata_desc=Select hosts nameservice
-cfg_wiz_domain=Domain:
-cfg_wiz_invalid_host=Unable to manage defined hosts table
-
 cfg_wiz_lease_explain=How long can clients use the IP addresses assigned by this server?
 cfg_wiz_lease_length=&Length of Lease:
 cfg_wiz_negotiable_explain=Check the box below to enable clients to renew their leases prior to expiration.  If you uncheck it, clients will be forced to reboot to obtain a new address when the lease expires.
@@ -537,7 +523,6 @@
 delete_networks_title=Delete Networks
 delete_networks_keep=&Keep Networks:
 delete_networks_delete=&Delete Networks:
-delete_networks_delete_hosts=Delete hosts table entries
 delete_networks_error=The following networks were not deleted:
 network_column=Network
 delete_networks_progress=Deleting network:
@@ -551,7 +536,6 @@
 unconfigure_bootp=Are you sure it is OK to unconfigure the BOOTP relay service?  This may cause clients to be unable to access the network.
 unconfigure_shutdown=DHCP Manager will exit once the service has been unconfigured.
 unconfigure_delete_tables=Remove the dhcptab and all DHCP network tables
-unconfigure_delete_hosts=Remove all hosts table entries for DHCP addresses
 
 unconfigure_progress=Unconfiguring the service
 unconfigure_error_heading=Operation
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/UnconfigureDialog.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/client/UnconfigureDialog.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright 1998-2002 by Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
@@ -47,7 +45,7 @@
  * A dialog to confirm the user's request to unconfigure the service.
  */
 public class UnconfigureDialog extends MultipleOperationDialog {
-    private JCheckBox deleteTables, deleteHosts;
+    private JCheckBox deleteTables;
     private int networkCount = 0;
     private Network [] nets = new Network[0];
 
@@ -61,12 +59,12 @@
     }
 
     protected JPanel getMainPanel() {
-	
+
 	JPanel mainPanel = new JPanel();
 	mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
-	
+
 	Box box = Box.createVerticalBox();
-	
+
 	if (!DhcpmgrApplet.modeIsRelay) {
 	    JComponent c = Wizard.createTextArea(
 		ResourceStrings.getString("unconfigure_dhcp"), 4, 30);
@@ -76,41 +74,10 @@
 	    deleteTables = new JCheckBox(
 		ResourceStrings.getString("unconfigure_delete_tables"), false);
 	    deleteTables.setToolTipText(
-	        ResourceStrings.getString("unconfigure_delete_tables"));
+		ResourceStrings.getString("unconfigure_delete_tables"));
 	    deleteTables.setAlignmentX(Component.LEFT_ALIGNMENT);
 	    box.add(deleteTables);
 	    box.add(Box.createVerticalStrut(10));
-	    deleteHosts = new JCheckBox(
-		ResourceStrings.getString("unconfigure_delete_hosts"), false);
-	    deleteHosts.setToolTipText(
-	        ResourceStrings.getString("unconfigure_delete_hosts"));
-	    deleteHosts.setAlignmentX(Component.LEFT_ALIGNMENT);
-	    deleteHosts.setEnabled(false);
-	    box.add(deleteHosts);
-	    deleteTables.addActionListener(new ActionListener() {
-		public void actionPerformed(ActionEvent e) {
-
-		    if (!deleteTables.isSelected()) {
-			deleteHosts.setEnabled(false);
-			return;
-		    }
-
-		    // If the host resource is set in the configuration
-		    // file (or we can't tell), then enable the deleteHosts
-		    // checkbox.
-		    try {
-			DhcpServiceMgr serviceMgr =
-			    DataManager.get().getDhcpServiceMgr();
-			DhcpdOptions opts = serviceMgr.readDefaults();
-			if (opts.getHostsResource() != null) {
-			    deleteHosts.setEnabled(true);
-			}
-		    } catch (BridgeException ex) {
-			// Assume set
-			deleteHosts.setEnabled(true);
-		    }
-		}
-	    });
 	} else {
 	    JComponent c = Wizard.createTextArea(
 		ResourceStrings.getString("unconfigure_bootp"), 4, 30);
@@ -126,7 +93,7 @@
 	buttonPanel.setOkEnabled(true);
     	return mainPanel;
     }
-    
+
     protected String getProgressMessage() {
 	return ResourceStrings.getString("unconfigure_progress");
     }
@@ -138,12 +105,12 @@
 	    // Add one for deleting defaults file, and one for deleting macro
 	    length += 2;
 	    if (deleteTables.isSelected()) {
-	    	try {
+		try {
 		    nets = DataManager.get().getNetworks(false);
-	    	} catch (Throwable t) {
-	    	    // Ignore
-	    	}
-	    	length += nets.length + 1; // Add one for dhcptab
+		} catch (Throwable t) {
+		    // Ignore
+		}
+		length += nets.length + 1; // Add one for dhcptab
 	    }
 	}
 	return length;
@@ -156,7 +123,7 @@
     protected Thread getOperationThread() {
 	return new Thread() {
 	    public void run() {
-	    	int checkpoint = 0;
+		int checkpoint = 0;
 		DhcpServiceMgr serviceMgr =
 		    DataManager.get().getDhcpServiceMgr();
 		// Shut down the server
@@ -164,7 +131,7 @@
 		    serviceMgr.shutdown();
 		} catch (Throwable e) {
 		    addError(
-		    	ResourceStrings.getString("unconfigure_error_shutdown"),
+			ResourceStrings.getString("unconfigure_error_shutdown"),
 			e.getMessage());
 		}
 		try {
@@ -175,24 +142,24 @@
 		    return;
 		}
 
-	    	// If this was a relay we're done
-	    	if (!DhcpmgrApplet.modeIsRelay) {
+		// If this was a relay we're done
+		if (!DhcpmgrApplet.modeIsRelay) {
 		    // Remove the server macro
 		    try {
-		    	DataManager.get().getDhcptabMgr().deleteRecord(
+			DataManager.get().getDhcptabMgr().deleteRecord(
 			    new Macro(DataManager.get().getShortServerName()),
 			    false);
 		    } catch (Throwable e) {
 			addError(ResourceStrings.getString(
 			    "unconfigure_error_macro"),
-		    	    e.getMessage());
+			    e.getMessage());
 		    }
 		    try {
 			updateProgress(++checkpoint, ResourceStrings.getString(
 			    "unconfigure_macro_deleted"));
 		    } catch (InterruptedException e) {
 			closeDialog();
-		    	return;
+			return;
 		    }
 
 		    // Delete all the network tables and the dhcptab
@@ -210,8 +177,7 @@
 				args[0] = netString;
 				try {
 				    DataManager.get().getDhcpNetMgr().
-					deleteNetwork(netString, true,
-					deleteHosts.isSelected());
+					deleteNetwork(netString, true);
 				} catch (Throwable e) {
 				    addError(errForm.format(args),
 					e.getMessage());
@@ -219,19 +185,19 @@
 				try {
 				    updateProgress(++checkpoint,
 					progForm.format(args));
-			    	} catch (InterruptedException e) {
+				} catch (InterruptedException e) {
 				    closeDialog();
 				    return;
 				}
 			    }
 			}
-		    	try {
+			try {
 			    DataManager.get().getDhcptabMgr().deleteDhcptab();
-		    	} catch (Throwable e) {
+			} catch (Throwable e) {
 			    addError(ResourceStrings.getString(
-			    	"unconfigure_error_dhcptab"),
+				"unconfigure_error_dhcptab"),
 				e.getMessage());
-		    	}
+			}
 			try {
 			    updateProgress(++checkpoint,
 				ResourceStrings.getString(
@@ -262,7 +228,7 @@
 		    displayErrors(ResourceStrings.getString(
 			"unconfigure_error_messages"));
 		}
-    	    	closeDialog();
+		closeDialog();
 	    }
 	};
     }
@@ -274,7 +240,7 @@
 	    return "unconfigure_server";
 	}
     }
-    
+
     protected void fireActionPerformed() {
 	fireActionPerformed(this, DialogActions.OK);
     }
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/common/ExportController.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/common/ExportController.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright (c) 2001 by Sun Microsystems, Inc.
  * All rights reserved.
  */
@@ -195,7 +193,7 @@
 		// Load network list
 		setNetworks(server.getNetMgr().getNetworks());
 	    } catch (Exception e) {
-		displayException(e, 
+		displayException(e,
 		    ResourceStrings.getString("exp_err_loading_networks"));
 		return false;
 	    }
@@ -264,7 +262,7 @@
 		    ResourceStrings.getString("exp_exporting_options"));
 	    }
 	    try {
-	    	server.exportOptions(ref, allOptions, options);
+		server.exportOptions(ref, allOptions, options);
 	    } catch (BridgeException e) {
 		displayException(e,
 		    ResourceStrings.getString("exp_err_exporting_options"));
@@ -280,7 +278,7 @@
 
 	    // Now export the macros
 	    try {
-	    	server.exportMacros(ref, allMacros, macros);
+		server.exportMacros(ref, allMacros, macros);
 	    } catch (BridgeException e) {
 		displayException(e,
 		    ResourceStrings.getString("exp_err_exporting_macros"));
@@ -363,7 +361,7 @@
 		    nets[0] = networks[i].toString();
 		    exporter.updateProgress(progress, form.format(nets));
 		    try {
-		    	server.getNetMgr().deleteNetwork(nets[0], false, true);
+			server.getNetMgr().deleteNetwork(nets[0], false);
 		    } catch (BridgeException e) {
 			errList.add(new ActionError(nets[0], e));
 		    }
@@ -410,7 +408,7 @@
 	} finally {
 	    // Always close before leaving; display any resulting errors
 	    try {
-	    	server.closeExportFile(ref, deleteFile);
+		server.closeExportFile(ref, deleteFile);
 	    } catch (IOException e) {
 		displayException(e,
 		    ResourceStrings.getString("exp_err_closing_file"));
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/DhcpHostsTable.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,338 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-package com.sun.dhcpmgr.server;
-
-import com.sun.dhcpmgr.bridge.*;
-import com.sun.dhcpmgr.data.*;
-import com.sun.wbem.utility.directorytable.*;
-
-import java.net.*;
-
-/**
- * This class provides the capabilities for managing the hosts table.
- */
-public class DhcpHostsTable {
-
-    /**
-     * This is the handle to the host table as defined by the config file
-     * Access to this handle is synchronized.
-     */
-    private static DhcpHostsTable cfgHostsTable = null;
-
-    private DirectoryTable hostsTable;
-    private int addrColumn = 0;
-    private int cnameColumn = 0;
-    private int aliasesColumn = 0;
-    private int commentColumn = 0;
-
-    /**
-     * Create a new DhcpHostsTable of type resource in the specified domain
-     * @param resource the host resource(eg., files, dns)
-     * @param domain the domain (if any) for the host resource
-     */
-    public DhcpHostsTable(String resource, String domain)
-	throws BridgeException {
-
-	// Determine the local host name. Directory table url requires it.
-	//
-	String server = null;
-	try {
-	    server = InetAddress.getLocalHost().getHostName();
-	} catch (Throwable e) {
-	    throw new BridgeException(
-		ResourceStrings.getString("get_host_err"));
-	}
-
-	// Build the url.
-	//
-	StringBuffer url = new StringBuffer();
-	if (resource.equals(DhcpConfigOpts.DSVC_CV_FILES)) {
-	    url.append("file");
-	} else {
-	    url.append(resource);
-	}
-	url.append(":/");
-	url.append(server);
-	url.append("/");
-	if (resource.equals(DhcpConfigOpts.DSVC_CV_FILES)) {
-	    url.append(server);
-	} else {
-	    url.append(domain);
-	}
-	try {
-	    DirectoryTableFactory factory = new DirectoryTableFactory();
-	    hostsTable = factory.getDirectoryTableInstance(url.toString());
-
-	    TableDefinitions defs = hostsTable.getTableDefinitionsInstance();
-	    defs.loadTableDefinitions(TableDefinitions.TN_HOSTS);
-	    addrColumn =
-		defs.getColumnNumber(TableDefinitions.CN_HOSTS_ADDR);
-	    cnameColumn =
-		defs.getColumnNumber(TableDefinitions.CN_HOSTS_CNAME);
-	    aliasesColumn =
-		defs.getColumnNumber(TableDefinitions.CN_HOSTS_ALIASES);
-	    commentColumn =
-		defs.getColumnNumber(TableDefinitions.CN_HOSTS_COMMENT);
-	} catch (Throwable e) {
-	    throw new BridgeException(
-		ResourceStrings.getString("hosts_access_err"));
-	}
-
-    } // end constructor
-
-    /**
-     * Checks access on the host table.
-     * @param requestedAccess the desired access
-     * @return true if the desired access can be granted
-     */
-    public synchronized boolean canAccessTable(int requestedAccess)
-	throws BridgeException {
-
-	int access = DirectoryTable.NO_ACCESS;
-
-	try {
-	    access = hostsTable.access(TableDefinitions.TN_HOSTS);
-	} catch (Throwable e) {
-	    // No access apparently
-	}
-
-	return ((access & requestedAccess) == requestedAccess);
-    } // openTable
-
-    /**
-     * Opens the host table.
-     */
-    public synchronized void openTable()
-	throws BridgeException {
-
-	try {
-	    hostsTable.open(TableDefinitions.TN_HOSTS);
-	} catch (Throwable e) {
-	    throw new BridgeException(
-		ResourceStrings.getString("hosts_open_err"));
-	}
-
-    } // openTable
-
-    /**
-     * Closes the host table.
-     */
-    public synchronized void closeTable()
-	throws BridgeException {
-
-	try {
-	    hostsTable.close();
-	} catch (Throwable e) {
-	    throw new BridgeException(
-		ResourceStrings.getString("hosts_close_err"));
-	}
-
-    } // closeTable
-
-
-    /**
-     * Finds a host entry by name and returns its address.
-     * @param name host name
-     * @return address of entry or null if entry does not exist.
-     */
-    public synchronized String getHostAddress(String name) {
-
-	String address = null;
-	try {
-	    DirectoryRow record = hostsTable.getRowInstance();
-	    record.putColumn(addrColumn, "");
-	    record.putColumn(cnameColumn, name);
-	    record.putColumn(aliasesColumn, "");
-	    record.putColumn(commentColumn, "");
-
-	    record = hostsTable.getFirstRow(record);
-
-	    address = record.getColumn(addrColumn);
-
-	} catch (Throwable e) {
-	    // Nothing to do
-	}
-
-	return address;
-    }
-
-    /**
-     * Finds a host entry by address and returns its name.
-     * @param address host address
-     * @return name of entry or null if entry does not exist.
-     */
-    public synchronized String getHostName(String address) {
-
-	String name = null;
-	try {
-	    DirectoryRow record = hostsTable.getRowInstance();
-	    record.putColumn(addrColumn, address);
-	    record.putColumn(cnameColumn, "");
-	    record.putColumn(aliasesColumn, "");
-	    record.putColumn(commentColumn, "");
-
-	    record = hostsTable.getFirstRow(record);
-
-	    name = record.getColumn(cnameColumn);
-
-	} catch (Throwable e) {
-	    // Nothing to do
-	}
-
-	return name;
-    }
-
-    /**
-     * Add an entry to the hosts table.
-     * @param addr host address
-     * @param name host name
-     * @param comment comment for host entry
-     */
-    public synchronized void createHostsRecord(String addr, String name,
-	String comment) throws BridgeException {
-
-	if (getHostName(addr) != null) {
-	    throw new HostExistsException(addr);
-	}
-
-	if (getHostAddress(name) != null) {
-	    throw new HostExistsException(name);
-	}
-
-	try {
-	    DirectoryRow record = hostsTable.getRowInstance();
-
-	    record.putColumn(addrColumn, addr);
-	    record.putColumn(cnameColumn, name);
-	    record.putColumn(aliasesColumn, "");
-	    record.putColumn(commentColumn, comment);
-
-	    hostsTable.addRow(record);
-	} catch (Throwable e) {
-	    throw new BridgeException(
-		ResourceStrings.getString("hosts_add_err"));
-	}
-
-    } // createHostsRecord
-
-    /**
-     * Remove an entry from the hosts table
-     * @param addr host address of entry to remove
-     */
-    public synchronized void deleteHostsRecord(String addr)
-	throws BridgeException {
-
-	try {
-	    DirectoryRow record = hostsTable.getRowInstance();
-	    record.putColumn(addrColumn, addr);
-	    hostsTable.deleteRow(record);
-	} catch (DirectoryTableRowNotFoundException e) {
-	    throw new NoHostsEntryException(addr);
-	} catch (Throwable e) {
-	    throw new BridgeException(
-		ResourceStrings.getString("hosts_remove_err"));
-	}
-
-    } // deleteHostsRecord
-
-    /**
-     * Modify an entry on the hosts table.
-     * @param oldAddr host address of entry to modify
-     * @param newAddr new host address for entry
-     * @param name new host name
-     * @param comment new comment for host entry
-     */
-    public synchronized void modifyHostsRecord(String oldAddr, String newAddr,
-	String name, String comment) throws BridgeException {
-
-	if (getHostAddress(name) != null) {
-	    throw new HostExistsException(name);
-	}
-
-	try {
-	    DirectoryRow oldRecord = hostsTable.getRowInstance();
-	    oldRecord.putColumn(addrColumn, oldAddr);
-
-	    DirectoryRow newRecord = hostsTable.getRowInstance();
-	    newRecord.putColumn(addrColumn, newAddr);
-	    newRecord.putColumn(cnameColumn, name);
-	    newRecord.putColumn(aliasesColumn, "");
-	    newRecord.putColumn(commentColumn, comment);
-
-	    hostsTable.modifyRow(oldRecord, newRecord);
-	} catch (DirectoryTableRowNotFoundException e) {
-	    throw new NoHostsEntryException(oldAddr);
-	} catch (Throwable e) {
-	    throw new BridgeException(
-		ResourceStrings.getString("hosts_modify_err"));
-	}
-    } // modifyHostsRecord
-
-    /**
-     * Determines the whether or not the hosts table under a given
-     * name service can be managed.
-     * @param resource name service resource (files, dns)
-     * @param domain the name service domain (ignored for files)
-     * @return true if the user can manage the table
-     */
-    public static boolean isHostsValid(String resource, String domain) {
-
-	boolean result = false;
-	try {
-	    DhcpHostsTable hostsTable = new DhcpHostsTable(resource, domain);
-	    result = hostsTable.canAccessTable(DirectoryTable.MODIFY_ACCESS);
-	} catch (Throwable e) {
-	    // No access apparently
-	}
-	return (result);
-    } // isHostsManageable
-
-    /**
-     * Constructs a DhcpHostsTable as defined by the DHCP config file.
-     * This object is a singleton (only one will ever be created and will
-     * be cached).
-     * @param bridge the bridge object to the native library
-     * @return the DhcpHostsTable
-     */
-    public static synchronized DhcpHostsTable getCfgHostsTable(Bridge bridge)
-	throws BridgeException {
-
-	if (cfgHostsTable == null) {
-	    try {
-		DhcpdOptions options = bridge.readDefaults();
-		String resource = options.getHostsResource();
-		if (resource != null) {
-		    String domain = options.getHostsDomain();
-		    cfgHostsTable = new DhcpHostsTable(resource, domain);
-		}
-	    } catch (Throwable e) {
-		throw new BridgeException(e.getMessage());
-	    }
-	}
-	return cfgHostsTable;
-
-    } // getCfgHostsTable
-
-} // DhcpHostsTable
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/DhcpMgrImpl.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/DhcpMgrImpl.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright (c) 1998-2001 by Sun Microsystems, Inc.
  * All rights reserved.
  */
@@ -44,25 +42,25 @@
     private static final File lockFile = new File(LOCK_FILE);
     private File currentlyOpenFile = null;
     private Object currentStream = null;
-    
+
     public DhcpMgrImpl() {
 	bridge = new Bridge();
     }
-    
+
     public DhcpNetMgr getNetMgr()  {
 	if (netMgr == null) {
 	    netMgr = new DhcpNetMgrImpl(bridge);
 	}
 	return netMgr;
     }
-    
+
     public DhcptabMgr getDhcptabMgr()  {
 	if (dtMgr == null) {
 	    dtMgr = new DhcptabMgrImpl(bridge);
 	}
 	return dtMgr;
     }
-    
+
     public DhcpServiceMgr getDhcpServiceMgr()  {
 	if (srvMgr == null) {
 	    srvMgr = new DhcpServiceMgrImpl(bridge);
@@ -166,7 +164,7 @@
     } // openExportFile
 
     /**
-     * Close an export file, delete it if need be 
+     * Close an export file, delete it if need be
      * @param ref Reference to the open file, returned from openExportFile
      * @param delete true if file is to be deleted on close, false otherwise.
      */
@@ -218,9 +216,9 @@
 	// Return reference caller can use to actually do the import
 	return file;
     }
-    
+
     /**
-     * Close an import file, delete it if need be 
+     * Close an import file, delete it if need be
      * @param ref Reference to the open file, returned from openImportFile
      * @param delete true if file is to be deleted on close, false otherwise.
      */
@@ -276,23 +274,23 @@
 	}
 	return recArr;
     }
-	
+
     /**
      * Export a list of macros specified by name to a file.
      * @param ref A reference to the file, acquired from openExportFile()
      * @param allMacros true if all macros are to be exported
      * @param names names of macros to be exported if allMacros is false
      */
-    public void exportMacros(Object ref, boolean allMacros, String [] names) 
-    	    throws BridgeException, IOException {
+    public void exportMacros(Object ref, boolean allMacros, String [] names)
+	    throws BridgeException, IOException {
 	if (!isFileOpen((File)ref)) {
-    	    // throw an exception that this is a bad reference
+	    // throw an exception that this is a bad reference
 	    throw new FileNotFoundException(((File)ref).getName());
 	}
-	
+
 	Macro [] macros = getDhcptabMgr().getMacros();
 	if (!allMacros) {
-    	    // Grab only the ones we want
+	    // Grab only the ones we want
 	    ArrayList macArr = getSelectedRecs(names, macros);
 	    macros = (Macro [])macArr.toArray(new Macro[0]);
 	}
@@ -313,7 +311,7 @@
 	    // throw an exception that this is a bad reference
 	    throw new FileNotFoundException(((File)ref).getName());
 	}
-	
+
 	Option [] options = getDhcptabMgr().getOptions();
 	if (!allOptions) {
 	    // Grab only the ones we want
@@ -333,10 +331,10 @@
     public void exportNetwork(Object ref, Network net)
 	    throws BridgeException, IOException {
 	if (!isFileOpen((File)ref)) {
-    	    // throw an exception that this is a bad reference
+	    // throw an exception that this is a bad reference
 	    throw new FileNotFoundException(((File)ref).getName());
 	}
-	
+
 	// Get clients from database
 	DhcpClientRecord [] clients =
 	    getNetMgr().loadNetworkCompletely(net.toString());
@@ -362,7 +360,7 @@
 	DhcptabRecord [] recs = new DhcptabRecord[0];
 
 	if (!isFileOpen((File)ref)) {
-    	    // No such file open; throw an exception
+	    // No such file open; throw an exception
 	    throw new FileNotFoundException(((File)ref).getName());
 	}
 	ObjectInputStream ois = (ObjectInputStream)currentStream;
@@ -415,7 +413,7 @@
      * @return An array of errors in the import process; empty if all OK
      */
     public ActionError [] importOptions(Object ref, boolean overwrite)
-   	    throws IOException, OptionalDataException, ClassNotFoundException {
+	    throws IOException, OptionalDataException, ClassNotFoundException {
 	return importDhcptabRecs(DhcptabRecord.OPTION, ref, overwrite);
     }
 
@@ -426,7 +424,7 @@
      * @return An array of errors in the import process; empty if all OK
      */
     public ActionError [] importMacros(Object ref, boolean overwrite)
-   	    throws IOException, OptionalDataException, ClassNotFoundException {
+	    throws IOException, OptionalDataException, ClassNotFoundException {
 	return importDhcptabRecs(DhcptabRecord.MACRO, ref, overwrite);
     }
 
@@ -441,10 +439,10 @@
      */
     public ActionError [] importNetwork(Network net, Object ref,
 	    boolean overwrite) throws IOException, OptionalDataException,
-    	    ClassNotFoundException, BridgeException {
+	    ClassNotFoundException, BridgeException {
 
 	if (!isFileOpen((File)ref)) {
-    	    // No such file open; throw an exception
+	    // No such file open; throw an exception
 	    throw new FileNotFoundException(((File)ref).getName());
 	}
 
@@ -478,7 +476,7 @@
 	    if (overwrite && netExisted) {
 		try {
 		    /*
-   		     * Hack alert!  We reset the signature to a default value
+		     * Hack alert!  We reset the signature to a default value
 		     * that the datastores will not interpret.  This allows us
 		     * to forcibly delete the record, even if it came from a
 		     * previous attempt to import this record.  Without this
@@ -491,7 +489,7 @@
 		     * in the mix which uses serialization, such as RMI.
 		     */
 		    clients[i].setSignature(DhcpClientRecord.DEFAULT_SIGNATURE);
-		    mgr.deleteClient(clients[i], networkName, true);
+		    mgr.deleteClient(clients[i], networkName);
 		} catch (Throwable t) {
 		    // Ignore delete error, we'll probably have an error on add
 		}
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/DhcpNetMgr.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/DhcpNetMgr.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright (c) 1998-2001 by Sun Microsystems, Inc.
  * All rights reserved.
  */
@@ -58,10 +56,10 @@
     public void addClient(DhcpClientRecord client, String table)
 	throws BridgeException;
     public void deleteClient(DhcpClientRecord client, String table,
-	boolean deleteHosts, DhcpDatastore datastore)
+	DhcpDatastore datastore)
 	throws BridgeException;
-    public void deleteClient(DhcpClientRecord client, String table,
-	boolean deleteHosts) throws BridgeException;
+    public void deleteClient(DhcpClientRecord client, String table)
+        throws BridgeException;
     public DhcpClientRecord getClient(DhcpClientRecord client, String table,
 	DhcpDatastore datastore) throws BridgeException;
     public void cvtNetwork(String network,
@@ -71,8 +69,8 @@
     public void createNetwork(String network)
 	throws BridgeException;
     public void deleteNetwork(String network, boolean deleteMacro,
-	boolean deleteHosts, DhcpDatastore datastore)
+	DhcpDatastore datastore)
 	throws BridgeException;
-    public void deleteNetwork(String network, boolean deleteMacro,
-	boolean deleteHosts) throws BridgeException;
+    public void deleteNetwork(String network, boolean deleteMacro)
+        throws BridgeException;
 }
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/DhcpNetMgrImpl.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/DhcpNetMgrImpl.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright (c) 1998-2001 by Sun Microsystems, Inc.
  * All rights reserved.
  */
@@ -30,8 +28,6 @@
 import com.sun.dhcpmgr.bridge.*;
 import com.sun.dhcpmgr.data.*;
 
-import com.sun.wbem.utility.directorytable.*;
-
 import java.net.InetAddress;
 import java.net.UnknownHostException;
 
@@ -45,7 +41,7 @@
     public DhcpNetMgrImpl(Bridge bridge) {
 	this.bridge = bridge;
     }
-    
+
     /**
      * Return the Network corresponding to the network string
      * @return a Network
@@ -68,7 +64,7 @@
 	throws BridgeException {
 	return bridge.getNetworks(datastore);
     }
-    
+
     /**
      * Return the list of addresses managed by DHCP on a given network
      * @param network the dotted-decimal representation of the network address
@@ -78,7 +74,7 @@
 	throws BridgeException {
 	return loadNetwork(network, null);
     }
-    
+
     /**
      * Return the list of addresses managed by DHCP on a given network
      * @param network the dotted-decimal representation of the network address
@@ -96,8 +92,8 @@
      * @param network the dotted-decimal representation of the network address
      * @return an array of records for the addresses defined on that network
      */
-    public DhcpClientRecord [] loadNetworkCompletely(String network) 
-    	    throws BridgeException {
+    public DhcpClientRecord [] loadNetworkCompletely(String network)
+	    throws BridgeException {
 	DhcpClientRecord [] clients = loadNetwork(network);
 	// Force loading of client name for each client
 	for (int i = 0; i < clients.length; ++i) {
@@ -105,7 +101,7 @@
 	}
 	return clients;
     }
-    
+
     /**
      * Modify an existing client record, and update the associated hosts
      * record if needed.
@@ -131,54 +127,11 @@
 	DhcpClientRecord newClient, String table, DhcpDatastore datastore)
 	throws BridgeException {
 
-	boolean nameChanged = !oldClient.getClientName().equals(
-	    newClient.getClientName());
-	boolean commentChanged = !oldClient.getComment().equals(
-	    newClient.getComment());
-	/*
-	 * If the name changed, need to update hosts.  If comment changed,
-	 * hosts is only updated if there was already a hosts record.
-	 */
-	if (nameChanged) {
-	    /*
-	     * If new name is empty, delete the hosts entry.  Otherwise
-	     * try to modify it.
-	     */
-	    if (newClient.getClientName().length() == 0) {
-		try {
-		    deleteHostsRecord(newClient.getClientIPAddress());
-		} catch (Throwable e) {
-		    throw new NoHostsEntryException(
-			newClient.getClientIPAddress());
-		}
-	    } else {
-		try {
-		    modifyHostsRecord(oldClient.getClientIPAddress(),
-			newClient.getClientIPAddress(),
-			newClient.getClientName(), newClient.getComment());
-		} catch (NoHostsEntryException e) {
-		    // Must not be one, so create it instead
-		    createHostsRecord(newClient.getClientIPAddress(),
-		   	newClient.getClientName(), newClient.getComment());
-		}
-	    }
-	} else if (commentChanged) {
-	    // Try to modify, but toss all exceptions as this isn't a big deal
-	    try {
-		modifyHostsRecord(oldClient.getClientIPAddress(),
-		    newClient.getClientIPAddress(), newClient.getClientName(),
-		    newClient.getComment());
-	    } catch (Throwable e) {
-		// Ignore
-	    }
-	}
-
 	// Update the network table record
 	bridge.modifyDhcpClientRecord(oldClient, newClient,
 	    table, datastore);
+    }
 
-    }
-    
     /**
      * Create a new record in the given table, and create a hosts record.
      * @param client the client to create
@@ -199,32 +152,21 @@
     public void addClient(DhcpClientRecord client, String table,
 	DhcpDatastore datastore) throws BridgeException {
 
-	/*
-	 * If a name was supplied and we can't resolve it to this address,
-	 * create a hosts record.
-	 */
-	if (client.getClientName().length() != 0
-	    && !client.getClientName().equals(client.getClientIPAddress())) {
-	    createHostsRecord(client.getClientIPAddress(),
-		client.getClientName(), client.getComment());
-	}
-
 	// Create the record in the per-network table
 	bridge.createDhcpClientRecord(client, table, datastore);
 
     }
-    
+
     /**
      * Delete a record from the given table, and delete the associated hosts
      * record if requested.
      * @param client the client to delete
      * @param table the network to delete the client from
-     * @param deleteHosts true if the hosts record should be removed as well
      */
-    public void deleteClient(DhcpClientRecord client, String table,
-	boolean deleteHosts) throws BridgeException {
+    public void deleteClient(DhcpClientRecord client, String table)
+        throws BridgeException {
 
-		deleteClient(client, table, deleteHosts, null);
+		deleteClient(client, table, null);
 	}
 
     /**
@@ -232,26 +174,16 @@
      * record if requested.
      * @param client the client to delete
      * @param table the network to delete the client from
-     * @param deleteHosts true if the hosts record should be removed as well
      * @param datastore user-supplied datastore attributes
      */
     public void deleteClient(DhcpClientRecord client, String table,
-	boolean deleteHosts, DhcpDatastore datastore)
+	DhcpDatastore datastore)
 	throws BridgeException {
 
 	// Delete the client record from the per-network table
 	bridge.deleteDhcpClientRecord(client, table, datastore);
+    }
 
-	// Delete hosts if requested
-	if (deleteHosts) {
-	    try {
-		deleteHostsRecord(client.getClientIPAddress());
-	    } catch (NoEntryException e) {
-		throw new NoEntryException("hosts");
-	    }
-	}
-    }
-    
 
     /**
      * Retrieve a client record from the given table.
@@ -268,7 +200,7 @@
 
 	return clientRecord;
     }
-    
+
     /**
      * Create a new per-network table for the given network by converting the
      * one from the server's data store into a new data store.
@@ -279,7 +211,7 @@
 	DhcpDatastore datastore) throws BridgeException {
 	bridge.cvtNetwork(network, datastore);
     }
-    
+
     /**
      * Create a new per-network table for the given network.
      * @param network the network number in dotted-decimal form.
@@ -299,17 +231,16 @@
 	DhcpDatastore datastore) throws BridgeException {
 	bridge.createDhcpNetwork(network, datastore);
     }
-    
+
     /**
      * Delete a per-network table, the macro associated with the network number,
      * and optionally deleting the associated hosts records.
      * @param network the network number in dotted-decimal form.
      * @param deleteMacro true if the network macro should be deleted
-     * @param deleteHosts true if the associated hosts records should be deleted
      */
-    public void deleteNetwork(String network, boolean deleteMacro,
-	boolean deleteHosts) throws BridgeException {
-	deleteNetwork(network, deleteMacro, deleteHosts, null);
+    public void deleteNetwork(String network, boolean deleteMacro)
+        throws BridgeException {
+	deleteNetwork(network, deleteMacro, null);
     }
 
     /**
@@ -317,108 +248,21 @@
      * and optionally deleting the associated hosts records.
      * @param network the network number in dotted-decimal form.
      * @param deleteMacro true if the network macro should be deleted
-     * @param deleteHosts true if the associated hosts records should be deleted
      * @param datastore user-supplied datastore attributes
      */
     public void deleteNetwork(String network, boolean deleteMacro,
-	boolean deleteHosts, DhcpDatastore datastore)
+	DhcpDatastore datastore)
 	throws BridgeException {
 
-	// If we're supposed to clean up hosts, do so
-	if (deleteHosts) {
-	    DhcpClientRecord [] recs =
-		bridge.loadNetwork(network, datastore);
-	    if (recs != null) {
-		for (int i = 0; i < recs.length; ++i) {
-		    try {
-			deleteHostsRecord(recs[i].getClientIPAddress());
-		    } catch (Throwable e) {
-			// Ignore errors here; they're not important
-		    }
-		}
-	    }
-	}
-
 	// Delete network table, then the macro for the network
 	bridge.deleteDhcpNetwork(network, datastore);
 	try {
 	    if (deleteMacro) {
-		bridge.deleteDhcptabRecord(new Macro(network), 
+		bridge.deleteDhcptabRecord(new Macro(network),
 		    datastore);
 	    }
 	} catch (Throwable e) {
 	    // All the errors here are ignorable
 	}
     }
-
-    /**
-     * Add a record to the hosts table.
-     * @param addr address of entry to add to the hosts table
-     * @param name alias for the entry
-     * @param comment comment for the entry
-     */
-    private void createHostsRecord(String addr, String name,
-	String comment)	throws BridgeException {
-
-	DhcpHostsTable hostsTable = null;
-	try {
-	    hostsTable = DhcpHostsTable.getCfgHostsTable(bridge);
-	    if (hostsTable != null) {
-		hostsTable.openTable();
-		hostsTable.createHostsRecord(addr, name, comment);
-	    }
-	} finally {
-	    if (hostsTable != null) {
-		hostsTable.closeTable();
-	    }
-	}
-
-    } // createHostsRecord
-
-    /**
-     * Delete a record from the hosts table.
-     * @param addr address of entry to remove from the hosts table
-     */
-    private void deleteHostsRecord(String addr)
-	throws BridgeException {
-
-	DhcpHostsTable hostsTable = null;
-	try {
-	    hostsTable = DhcpHostsTable.getCfgHostsTable(bridge);
-	    if (hostsTable != null) {
-		hostsTable.openTable();
-		hostsTable.deleteHostsRecord(addr);
-	    }
-	} finally {
-	    if (hostsTable != null) {
-		hostsTable.closeTable();
-	    }
-	}
-
-    } // deleteHostsRecord
-
-    /**
-     * Modify a record in the hosts table.
-     * @param oldAddr address of entry to modify in the hosts table
-     * @param newAddr new address of entry
-     * @param name alias for the entry
-     * @param comment comment for the entry
-     */
-    private void modifyHostsRecord(String oldAddr,
-	String newAddr, String name, String comment) throws BridgeException {
-
-	DhcpHostsTable hostsTable = null;
-	try {
-	    hostsTable = DhcpHostsTable.getCfgHostsTable(bridge);
-	    if (hostsTable != null) {
-		hostsTable.openTable();
-		hostsTable.modifyHostsRecord(oldAddr, newAddr, name, comment);
-	    }
-	} finally {
-	    if (hostsTable != null) {
-		hostsTable.closeTable();
-	    }
-	}
-
-    } // modifyHostsRecord
 }
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/DhcpServiceMgr.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/DhcpServiceMgr.java	Thu Sep 09 11:46:43 2010 -0400
@@ -20,8 +20,6 @@
  * CDDL HEADER END
  */
 /*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
  * Copyright (c) 1998-2001 by Sun Microsystems, Inc.
  * All rights reserved.
  */
@@ -64,6 +62,4 @@
 	throws BridgeException;
     public boolean isServerRunning() throws BridgeException;
     public boolean isVersionCurrent() throws BridgeException;
-    public boolean isHostsValid(String resource, String domain)
-	throws BridgeException;
 }
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/DhcpServiceMgrImpl.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/DhcpServiceMgrImpl.java	Thu Sep 09 11:46:43 2010 -0400
@@ -236,17 +236,4 @@
     public boolean isServerRunning() throws BridgeException {
 	return bridge.isServerRunning();
     }
-
-    /**
-     * Determines the whether or not the hosts table under a given
-     * name service can be managed.
-     * @param resource name service resource (files, dns)
-     * @param domain the name service domain (ignored for files)
-     * @return true if the user can manage the table
-     */
-    public boolean isHostsValid(String resource, String domain) {
-
-	return DhcpHostsTable.isHostsValid(resource, domain);
-
-    } // isHostsManageable
 }
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -19,8 +19,7 @@
 #
 # CDDL HEADER END
 #
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
+
 #
 # Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
@@ -33,15 +32,12 @@
 CLASSFILES = 	DhcpMgrImpl.class \
 		DhcpNetMgrImpl.class \
 		DhcpServiceMgrImpl.class \
-		DhcptabMgrImpl.class \
-		DhcpHostsTable.class \
-		ResourceStrings.class
+		DhcptabMgrImpl.class
 
 
 include		$(SRC)/lib/Makefile.lib
 
-DIRTABLE_JAR =	/usr/sadm/lib/wbem/providerutility.jar
-CLASSPATH=	$(SRC)/cmd/cmd-inet/usr.sadm/dhcpmgr:$(DIRTABLE_JAR)
+CLASSPATH=	$(SRC)/cmd/cmd-inet/usr.sadm/dhcpmgr
 
 JAVAFILES =	$(CLASSFILES:.class=.java)
 
@@ -52,8 +48,6 @@
 		$(ROOT)/usr/share/lib/locale/com/sun/dhcpmgr \
 		$(MSGDIR)
 
-MSGFILES =	ResourceBundle.properties
-MSGS =		$(MSGFILES:%=$(MSGDIR)/%)
 
 CLEANFILES=	*.class
 CLOBBERFILES=
@@ -64,12 +58,6 @@
 
 install: all
 
-_msg: $(MSGDIRS) $(MSGS)
-
-$(MSGDIR)/%: %
-	$(INS.file)
-
-$(MSGDIRS):
-	$(INS.dir)
+_msg: 
 
 include $(SRC)/lib/Makefile.targ
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/com/sun/dhcpmgr/server/ResourceBundle.properties	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-get_host_err=Internal error, obtaining local host name
-hosts_access_err=Error accessing host table
-hosts_open_err=Error opening host table
-hosts_close_err=Error closing host table
-hosts_add_err=Error adding entry to hosts table
-hosts_remove_err=Error removing entry from hosts table
-hosts_modify_err=Error modifying hosts table table entry
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/help/dhcp_addr_del.html	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/help/dhcp_addr_del.html	Thu Sep 09 11:46:43 2010 -0400
@@ -1,5 +1,4 @@
 <!--
-  -- ident	"%W%	%E% SMI"
   --
     CDDL HEADER START
 
@@ -21,7 +20,7 @@
 
     CDDL HEADER END
 
- -- Copyright (c) 2000-2001 by Sun Microsystems, Inc.
+  -- Copyright (c) 2000-2001 by Sun Microsystems, Inc.
   -- All rights reserved.
   -->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
@@ -116,8 +115,6 @@
 
 Click OK to remove the selected addresses
 from the  network table. <P>
-Click Delete From Hosts Table to also remove the entries associated 
-with these addresses from the <tt>hosts</tt> table. 
 
 <p>&nbsp;</p>
 
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/help/dhcp_addr_mod.html	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/help/dhcp_addr_mod.html	Thu Sep 09 11:46:43 2010 -0400
@@ -1,5 +1,4 @@
 <!--
-  -- ident	"%W%	%E% SMI"
   --
     CDDL HEADER START
 
@@ -67,7 +66,6 @@
 	&nbsp;&nbsp;<A HREF="dhcp_addr_dup.html">Duplicate</A><BR>
 <IMG SRC="art/tip2.gif" WIDTH=12 HEIGHT=10 BORDER=0 ALT="">Modify<BR>
 	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#ip"><EM>Address</EM></a><BR>
-		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#name"><EM>Name</EM></a><BR>
 		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#server"><EM>Server</EM></a><BR>
 		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#macro"><EM>Macro</EM></a><BR>
 		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#comment"><EM>Comment</EM></a><BR>
@@ -149,13 +147,6 @@
 
 	
 	<tr>
-	<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><A NAME="name"><STRONG>Client Name</STRONG></A> (optional)</td>
-	<td valign="top">Specify the host name of the client. If you use this option, the DHCP Manager will
-attempt to create an entry in the <tt>hosts</tt>
-table.</td> 	
-	</tr>
-	
-	<tr>
 	<TD WIDTH="100" ALIGN="LEFT" VALIGN="TOP"><a name="server"><STRONG>Owned By Server</STRONG></a></td> 
 	<td valign="top">Specify the IP address of the DHCP server 
 	that owns the new IP address. This server is 
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/help/dhcp_addr_wiz.html	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/help/dhcp_addr_wiz.html	Thu Sep 09 11:46:43 2010 -0400
@@ -1,5 +1,4 @@
 <!--
-  -- ident	"%W%	%E% SMI"
   --
     CDDL HEADER START
 
@@ -153,14 +152,6 @@
 	</tr>
 
 	<tr>
-	<td valign="top" width=125><A NAME="name"><STRONG>Generate Names</STRONG></A></td>
-	<td valign="top">Enter a root name for generated client names.<P> You can 
-	generate a list of client names for each allocated address. The names will be entered in the server's <tt>hosts</tt> table.  Each new 
-	client name will use the root name and add an incremental number.<P>
-	</td>
-	</tr>
-	
-	<tr>
 	<td valign="top" width=125><A NAME="confirm"><STRONG>Confirm Address List</STRONG></A></td>
 	<td valign="top">You can view the information that you have entered.<P>
 	If you want to add or modify addresses, use the <A HREF="dhcp_addr_create.html">Create Address</A> or <A HREF="dhcp_addr_mod.html">Modify Address</A> options in the Edit menu.<P>
--- a/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/help/dhcp_config_wiz.html	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/cmd-inet/usr.sadm/dhcpmgr/help/dhcp_config_wiz.html	Thu Sep 09 11:46:43 2010 -0400
@@ -59,7 +59,6 @@
 	<STRONG><A HREF="dhcp_relay_ref.html">Servers and Relays</A></STRONG><BR>
 	<IMG SRC="art/tip2.gif" WIDTH=12 HEIGHT=10 BORDER=0 ALT="">DHCP Config<BR>
 	&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#store"><EM>Data Store</EM></A><BR>
-   &nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#dspath"><EM>Path</EM></A><BR>
    &nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#hostnmserv"><EM>Hosts Name Service</EM></A><BR>
 	&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#lease"><EM>Lease Policy</EM></A><BR>
 	&nbsp;&nbsp;&nbsp;&nbsp;<A HREF="#dns"><EM>DNS Domain/Server</EM></A><BR>
@@ -139,36 +138,6 @@
 </tr>
 <!-- end data store row -->
 	<tr>
-<td width=125 valign="top"><A NAME="dspath"><STRONG>Data store path</STRONG></A><br>
-</td>
-<td>If you chose text files or binary files as your data store, enter the path to the 
-	data (default=<tt>/var/dhcp</tt>).<p>
-	<P> </td></tr>
-
-	
-<tr>
-	<td width=125 valign="top"><A NAME="hostnmserv"><STRONG>Hosts name service</STRONG></A><br>
-	</td>
-	<td valign="top">Select the name service that the DHCP server should use to register host names associated with IP addresses that it allocates to clients. 
- <table cellspacing=3 cellpadding=3>
-		<tr>
-		<td width=90 valign="top"><em>Do not manage hosts records</em></td>
-		<td valign="top">The DHCP server will not attempt to add host name entries to any name service. An administrator should add the names manually to a name service. </td>
-		</tr>
-<tr>
-		<td width=90 valign="top"><em>/etc/hosts</em></td>
-		<td valign="top">The DHCP server will add host name entries to the servers /etc/hosts table. </td>
-		</tr>
-<tr>
-		<td width=90 valign="top"><em>DNS</em></td>
-		<td valign="top">The DHCP server will add host name entries to DNS if the DHCP daemon and DNS daemon are running on the same system.  You must supply the DNS domain name. </td>
-		</tr>
-</table>
-
-	</td> 
-	</tr>
-<!-- End of Hosts name service row -->
-	<tr>
 	<td width=125 valign="top"><A NAME="lease"><STRONG>Lease Policy</STRONG></A><br>
 	</td>
 	<td valign="top">Enter the length of time before a lease expires. 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,42 @@
+#
+# 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 version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+#
+
+PROG= mklocale
+
+include ../Makefile.cmd
+
+SUBDIRS = ctype collate messages monetary numeric time
+
+all:=		TARGET=	all
+install:=	TARGET=	install
+clean:=		TARGET=	clean
+clobber:=	TARGET= clobber
+lint:=		TARGET=	lint
+check:=		TARGET=	check
+
+.KEEP_STATE:
+
+.PARALLEL:	$(SUBDIRS)
+
+all clean install lint check clobber: $(SUBDIRS)
+
+# We don't deliver any programs, so we don't deliver messaging
+# data for them either.
+_msg:
+
+$(SUBDIRS):	FRC
+	cd $@; pwd; $(MAKE) $(TARGET)
+
+FRC:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/Makefile.common	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,43 @@
+#
+# 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 version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+#
+
+include $(SRC)/cmd/Makefile.cmd
+
+LOCALES=	\
+	en_AU.ISO8859-1 en_AU.ISO8859-15 en_AU.US-ASCII en_AU.UTF-8 \
+	en_CA.ISO8859-1 en_CA.ISO8859-15 en_CA.US-ASCII en_CA.UTF-8 \
+	en_GB.ISO8859-1 en_GB.ISO8859-15 en_GB.US-ASCII en_GB.UTF-8 \
+	en_IE.UTF-8 \
+	en_NZ.ISO8859-1 en_NZ.ISO8859-15 en_NZ.US-ASCII en_NZ.UTF-8 \
+	en_US.ISO8859-1 en_US.ISO8859-15 en_US.US-ASCII en_US.UTF-8
+
+MACHLOCALES=$(LOCALES:%=$(MACH)/%)
+
+ROOTLOCALE=$(ROOT)/usr/lib/locale
+
+ROOTLOCDIRS=\
+	$(ROOT)/usr .WAIT \
+	$(ROOT)/usr/lib .WAIT \
+	$(ROOT)/usr/lib/locale .WAIT \
+	$(LOCALES:%=$(ROOTLOCALE)/%) .WAIT \
+	$(LOCALES:%=$(ROOTLOCALE)/%/$(CATEGORY))
+
+ROOTLOCDATA=\
+	$(LOCALES:%=$(ROOTLOCALE)/%/$(CATEGORY)/LCL_DATA)
+
+$(ROOTLOCDATA)	:=	FILEMODE=0444
+
+HASHSTRIP	=	$(GREP) -v '^$(POUND_SIGN)'
+INS.nohash	=	$(RM) $@; $(GREP) -v '^$(POUND_SIGN)' $< > $@
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/Makefile.targ	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,42 @@
+#
+# 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 version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+#
+
+include $(SRC)/cmd/Makefile.targ
+
+install: all $(ROOTLOCDIRS) .WAIT $(ROOTLOCDATA)
+
+$(MACH) $(ROOTLOCDIRS):
+	$(INS.dir)
+
+$(MACH)/%.o:	%.c $(MACH)
+	$(COMPILE.c) -o $@ $<
+
+$(ROOTLOCALE)/%/LC_CTYPE/LCL_DATA:	$(MACH)/%
+	$(INS.rename)
+
+$(ROOTLOCALE)/%/LC_COLLATE/LCL_DATA:	$(MACH)/%
+	$(INS.rename)
+
+$(ROOTLOCALE)/%/LC_MESSAGES/LCL_DATA:	$(MACH)/%
+	$(INS.rename)
+
+$(ROOTLOCALE)/%/LC_MONETARY/LCL_DATA:	$(MACH)/%
+	$(INS.rename)
+
+$(ROOTLOCALE)/%/LC_NUMERIC/LCL_DATA:	$(MACH)/%
+	$(INS.rename)
+
+$(ROOTLOCALE)/%/LC_TIME/LCL_DATA:	$(MACH)/%
+	$(INS.rename)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/README.locale_name	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,8 @@
+
+Locale name string format must be compliant with XPG3 and
+using following format.
+	<locale name>   ::= <language>_<territory>.<encoding>
+	<language>      ::= based on ISO 639
+	<territory>     ::= based on ISO 3166 (country code)
+	<encoding>      ::= X11 codeset preferred
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,89 @@
+#
+# 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 version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+#
+
+PROG= mkcollate
+CATEGORY=LC_COLLATE
+
+include ../Makefile.common
+
+CPPFLAGS += -I$(SRC)/lib/libc/port/locale -D_FILE_OFFSET_BITS=64
+YFLAGS	= -d -b mkcollate_yacc
+LFLAGS	= -t
+
+OBJS = $(MACH)/mkcollate_lex.o $(MACH)/mkcollate_yacc.tab.o
+HDRS = common.h
+CLEANFILES =	mkcollate_yacc.tab.c mkcollate_yacc.tab.h mkcollate_lex.c
+
+en_COMMON = en_AU en_CA en_GB en_NZ en_US
+en_ASCII = $(en_COMMON:%=%.US-ASCII)
+en_LATIN1 = $(en_COMMON:%=%.ISO8859-1)
+en_LATIN15 = $(en_COMMON:%=%.ISO8859-15)
+en_UTF8 = $(en_COMMON:%=%.UTF-8) en_IE.UTF-8
+en_LOCALES = $(en_ASCII) $(en_LATIN1) $(en_LATIN15) $(en_UTF8)
+
+.KEEP_STATE:
+
+all: $(MACH)/$(PROG) $(MACHLOCALES)
+
+$(MACH)/$(PROG):	$(OBJS)
+	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
+	$(POST_PROCESS)
+
+$(en_LATIN1:%=$(MACH)/%): 	$(MACH)/en.ISO8859-1
+	$(RM) $@
+	$(LN) $(MACH)/en.ISO8859-1 $@
+
+$(en_LATIN15:%=$(MACH)/%): 	$(MACH)/en.ISO8859-15
+	$(RM) $@
+	$(LN) $(MACH)/en.ISO8859-15 $@
+
+$(en_ASCII:%=$(MACH)/%):	$(MACH)/en.US-ASCII
+	$(RM) $@
+	$(LN) $(MACH)/en.US-ASCII $@
+
+$(en_UTF8:%=$(MACH)/%):		$(MACH)/en.UTF-8
+	$(RM) $@
+	$(LN) $(MACH)/en.UTF-8 $@
+
+mkcollate_lex.c:	mkcollate_lex.l	mkcollate_yacc.tab.h $(HDRS)
+	$(FLEX) $(LFLAGS) mkcollate_lex.l > $@
+
+mkcollate_yacc.tab.c mkcollate_yacc.tab.h:	mkcollate_yacc.y $(HDRS)
+	$(YACC) $(YFLAGS) mkcollate_yacc.y
+
+clean:
+	$(RM) $(OBJS) $(CLEANFILES)
+	$(RM) -r $(MACH)
+
+#
+# Lint does nothing for us, because yacc and lex outputs are themselves
+# not lint clean.  This is something that it would be good to address.
+#
+lint:
+
+#
+# Likewise, the yacc and lex outputs are not cstyle clean.
+#
+check:
+	$(CSTYLE) -cPp $(HDRS)
+
+
+#
+# Rules for building encoding data files.
+#
+$(MACH)/%: data/%.src $(MACH)/$(PROG)
+	$(MACH)/$(PROG) -o $@ -I data $(@:$(MACH)/%=data/%.src)
+
+include ../Makefile.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/THIRDPARTYLICENSE	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,24 @@
+Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
+		at Electronni Visti IA, Kiev, Ukraine.
+			All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/THIRDPARTYLICENSE.descrip	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,1 @@
+MKCOLLATE UTILITY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/common.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,8 @@
+
+#define CHARMAP_SYMBOL_LEN 64
+#define BUFSIZE 80
+
+extern int line_no;
+
+extern uchar_t charmap_table[UCHAR_MAX + 1][CHARMAP_SYMBOL_LEN];
+extern char map_name[FILENAME_MAX];
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/en.ISO8859-1.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,36 @@
+# latin1 (backward compatible with ASCII)
+#
+charmap map.ISO8859-1
+order \
+# controls
+	<NU>;...;<US>;<PA>;...;<AC>;\
+#
+	<NS>;<SP>;!;<!I>;\";<<<>;</>/>>;<Nb>;\
+	<Cu>;<Ct>;<DO>;<Pd>;<Ye>;\
+	%;&;<',>;';\(;\);*;+;<+->;<-:>;<*X>;\,;<-->;-;.;/;\
+# digits
+	(0,<14>,<12>,<34>);(1,<1S>);(2,<2S>);(3,<3S>);4;...;9;\
+#
+	:;\;;\<;=;>;?;<?I>;<SE>;<PI>;<Co>;<Rg>;<At>;\
+# capital
+	(A,<A'>,<A!>,<A/>>,<AA>,<A:>,<A?>,<AE>);\
+	B;(C,<C,>);D;(E,<E'>,<E!>,<E/>>,<E:>);\
+	F;G;H;(I,<I'>,<I!>,<I/>>,<I:>);\
+	J;...;M;(N,<N?>);(O,<O'>,<O!>,<O/>>,<O:>,<O?>,<O//>);\
+	P;...;T;(U,<U'>,<U!>,<U/>>,<U:>);\
+	V;W;X;(Y,<Y'>);Z;\
+	<D->;<TH>;\
+#
+	[;\\;];^;<':>;_;<'m>;<''>;`;\
+# small
+	(a,<a'>,<a!>,<a/>>,<aa>,<a:>,<a?>,<ae>);\
+	b;(c,<c,>);d;(e,<e'>,<e!>,<e/>>,<e:>);\
+	f;g;h;(i,<i'>,<i!>,<i/>>,<i:>);\
+	j;...;m;(n,<n?>);(o,<o'>,<o!>,<o/>>,<o:>,<o?>,<o//>);\
+	p;...;t;(u,<u'>,<u!>,<u/>>,<u:>);\
+	v;w;x;(y,<y'>,<y:>);z;\
+	<d->;<th>;<ss>;\
+#
+	\{;<NO>;|;<BB>;\};~;<.M>;<DG>;<My>;<DT>;\
+# remains
+	<-a>;<-o>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/en.ISO8859-15.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,36 @@
+# latin1 (backward compatible with ASCII)
+#
+charmap map.ISO8859-15
+order \
+# controls
+	<NU>;...;<US>;<PA>;...;<AC>;\
+#
+	<NS>;<SP>;!;<!I>;\";<<<>;</>/>>;<Nb>;\
+	<Eu>;<Ct>;<DO>;<Pd>;<Ye>;\
+	%;&;';\(;\);*;+;<+->;<-:>;<*X>;\,;<-->;-;.;/;\
+# digits
+	0;(1,<1S>);(2,<2S>);(3,<3S>);4;...;9;\
+#
+	:;\;;\<;=;>;?;<?I>;<SE>;<PI>;<Co>;<Rg>;<At>;\
+# capital
+	(A,<A'>,<A!>,<A/>>,<AA>,<A:>,<A?>,<AE>);\
+	B;(C,<C,>);D;(E,<E'>,<E!>,<E/>>,<E:>);\
+	F;G;H;(I,<I'>,<I!>,<I/>>,<I:>);\
+	J;...;M;(N,<N?>);(O,<O'>,<O!>,<O/>>,<O:>,<O?>,<O//>,<OE>);\
+	P;...;R;(S,<S<>);T;(U,<U'>,<U!>,<U/>>,<U:>);\
+	V;W;X;(Y,<Y'>,<Y:>);(Z,<Z<>);\
+	<D->;<TH>;\
+#
+	[;\\;];^;_;<'m>;`;\
+# small
+	(a,<a'>,<a!>,<a/>>,<aa>,<a:>,<a?>,<ae>);\
+	b;(c,<c,>);d;(e,<e'>,<e!>,<e/>>,<e:>);\
+	f;g;h;(i,<i'>,<i!>,<i/>>,<i:>);\
+	j;...;m;(n,<n?>);(o,<o'>,<o!>,<o/>>,<o:>,<o?>,<o//>,<oe>);\
+	p;...;r;(s,<s<>);t;(u,<u'>,<u!>,<u/>>,<u:>);\
+	v;w;x;(y,<y'>,<y:>);(z,<z<>);\
+	<d->;<th>;<ss>;\
+#
+	\{;<NO>;|;\};~;<.M>;<DG>;<My>;<DT>;\
+# remains
+	<-a>;<-o>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/en.US-ASCII.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,6 @@
+#
+# English locales are already in correct sorted order for the following
+# encodings: US-ASCII, ISO8859-1, ISO8859-15, and UTF-8. 
+#
+order \
+	\x00;...;\xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/en.UTF-8.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,6 @@
+#
+# English locales are already in correct sorted order for the following
+# encodings: US-ASCII, ISO8859-1, ISO8859-15, and UTF-8. 
+#
+order \
+	\x00;...;\xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.ARMSCII-8	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,143 @@
+#
+# map.ARMSCII-8 defined by Vahe Khachikyan <vahe@khachikyan.de>
+# 
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+armeternity	\xA1
+armew		\xA2
+armfullstop	\xA3
+armparenright	\xA4
+armparenleft	\xA5
+armquotright	\xA6
+armquotleft	\xA7
+armemdash	\xA8
+armdot		\xA9
+armsep		\xAA
+armcomma	\xAB
+armendash	\xAC
+armyentamna	\xAD
+armellipsis	\xAE
+armexclam	\xAF
+armaccent	\xB0
+armquestion	\xB1
+Armayb		\xB2
+armayb		\xB3
+Armben		\xB4
+armben		\xB5
+Armgim		\xB6
+armgim		\xB7
+Armda		\xB8
+armda		\xB9
+Armyech		\xBA
+armyech		\xBB
+Armza		\xBC
+armza		\xBD
+Arme		\xBE
+arme		\xBF
+Armat		\xC0
+armat		\xC1
+Armto		\xC2
+armto		\xC3
+Armzhe		\xC4
+armzhe		\xC5
+Armini		\xC6
+armini		\xC7
+Armlyun		\xC8
+armlyun		\xC9
+Armkhe		\xCA
+armkhe		\xCB
+Armtsa		\xCC
+armtsa		\xCD
+Armken		\xCE
+armken		\xCF
+Armho		\xD0
+armho		\xD1
+Armdza		\xD2
+armdza		\xD3
+Armghat		\xD4
+armghat		\xD5
+Armtche		\xD6
+armtche		\xD7
+Armmen		\xD8
+armmen		\xD9
+Armhi		\xDA
+armhi		\xDB
+Armnu		\xDC
+armnu		\xDD
+Armsha		\xDE
+armsha		\xDF
+Armvo		\xE0
+armvo		\xE1
+Armcha		\xE2
+armcha		\xE3
+Armpe		\xE4
+armpe		\xE5
+Armje		\xE6
+armje		\xE7
+Armra		\xE8
+armra		\xE9
+Armse		\xEA
+armse		\xEB
+Armvev		\xEC
+armvev		\xED
+Armtyun		\xEE
+armtyun		\xEF
+Armre		\xF0
+armre		\xF1
+Armtso		\xF2
+armtso		\xF3
+Armvyun		\xF4
+armvyun		\xF5
+Armpyur		\xF6
+armpyur		\xF7
+Armke		\xF8
+armke		\xF9
+Armo		\xFA
+armo		\xFB
+Armfe		\xFC
+armfe		\xFD
+armapostrophe	\xFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.CP1131	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+A= \x80
+B= \x81
+V= \x82
+G= \x83
+D= \x84
+E= \x85
+Z% \x86
+Z= \x87
+I= \x88
+J= \x89
+K= \x8a
+L= \x8b
+M= \x8c
+N= \x8d
+O= \x8e
+P= \x8f
+R= \x90
+S= \x91
+T= \x92
+U= \x93
+F= \x94
+H= \x95
+C= \x96
+C% \x97
+S% \x98
+Sc \x99
+=" \x9a
+Y= \x9b
+%" \x9c
+JE \x9d
+JU \x9e
+JA \x9f
+a= \xa0
+b= \xa1
+v= \xa2
+g= \xa3
+d= \xa4
+e= \xa5
+z% \xa6
+z= \xa7
+i= \xa8
+j= \xa9
+k= \xaa
+l= \xab
+m= \xac
+n= \xad
+o= \xae
+p= \xaf
+.S \xb0
+:S \xb1
+?S \xb2
+vv \xb3
+vl \xb4
+vL \xb5
+Vl \xb6
+Dl \xb7
+dL \xb8
+VL \xb9
+VV \xba
+LD \xbb
+UL \xbc
+Ul \xbd
+uL \xbe
+dl \xbf
+ur \xc0
+uh \xc1
+dh \xc2
+vr \xc3
+hh \xc4
+vh \xc5
+vR \xc6
+Vr \xc7
+UR \xc8
+DR \xc9
+UH \xca
+DH \xcb
+VR \xcc
+HH \xcd
+VH \xce
+uH \xcf
+Uh \xd0
+dH \xd1
+Dh \xd2
+Ur \xd3
+uR \xd4
+dR \xd5
+Dr \xd6
+Vh \xd7
+vH \xd8
+ul \xd9
+dr \xda
+FB \xdb
+LB \xdc
+lB \xdd
+RB \xde
+TB \xdf
+r= \xe0
+s= \xe1
+t= \xe2
+u= \xe3
+f= \xe4
+h= \xe5
+c= \xe6
+c% \xe7
+s% \xe8
+sc \xe9
+=' \xea
+y= \xeb
+%' \xec
+je \xed
+ju \xee
+ja \xef
+IO \xf0
+io \xf1
+IE \xf2
+ie \xf3
+YI \xf4
+yi \xf5
+V% \xf6
+v% \xf7
+II \xf8
+ii \xf9
+.M \xfa
+Cu \xfb
+G3 \xfc
+g3 \xfd
+Sb \xfe
+NS \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.CP1251	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,256 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+! \x21
+" \x22
+Nb \x23
+DO \x24
+% \x25
+& \x26
+' \x27
+( \x28
+) \x29
+* \x2a
++ \x2b
+, \x2c
+- \x2d
+. \x2e
+/ \x2f
+0 \x30
+1 \x31
+2 \x32
+3 \x33
+4 \x34
+5 \x35
+6 \x36
+7 \x37
+8 \x38
+9 \x39
+: \x3a
+; \x3b
+< \x3c
+= \x3d
+> \x3e
+? \x3f
+At \x40
+A \x41
+B \x42
+C \x43
+D \x44
+E \x45
+F \x46
+G \x47
+H \x48
+I \x49
+J \x4a
+K \x4b
+L \x4c
+M \x4d
+N \x4e
+O \x4f
+P \x50
+Q \x51
+R \x52
+S \x53
+T \x54
+U \x55
+V \x56
+W \x57
+X \x58
+Y \x59
+Z \x5a
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+_ \x5f
+'! \x60
+a \x61
+b \x62
+c \x63
+d \x64
+e \x65
+f \x66
+g \x67
+h \x68
+i \x69
+j \x6a
+k \x6b
+l \x6c
+m \x6d
+n \x6e
+o \x6f
+p \x70
+q \x71
+r \x72
+s \x73
+t \x74
+u \x75
+v \x76
+w \x77
+x \x78
+y \x79
+z \x7a
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+D% \x80
+G% \x81
+.9 \x82
+g% \x83
+:9 \x84
+.3 \x85
+/- \x86
+/= \x87
+Eu \x88
+%0 \x89
+LJ \x8a
+<1 \x8b
+NJ \x8c
+KJ \x8d
+Ts \x8e
+DZ \x8f
+d% \x90
+'6 \x91
+'9 \x92
+"6 \x93
+"9 \x94
+sb \x95
+-N \x96
+-M \x97
+FB \x98
+TM \x99
+lj \x9a
+>1 \x9b
+nj \x9c
+kj \x9d
+ts \x9e
+dz \x9f
+NS \xa0
+V% \xa1
+v% \xa2
+J% \xa3
+Cu \xa4
+G3 \xa5
+BB \xa6
+SE \xa7
+IO \xa8
+Co \xa9
+IE \xaa
+<< \xab
+NO \xac
+-- \xad
+Rg \xae
+YI \xaf
+DG \xb0
++- \xb1
+II \xb2
+ii \xb3
+g3 \xb4
+My \xb5
+PI \xb6
+.M \xb7
+io \xb8
+N0 \xb9
+ie \xba
+>> \xbb
+j% \xbc
+DS \xbd
+ds \xbe
+yi \xbf
+A= \xc0
+B= \xc1
+V= \xc2
+G= \xc3
+D= \xc4
+E= \xc5
+Z% \xc6
+Z= \xc7
+I= \xc8
+J= \xc9
+K= \xca
+L= \xcb
+M= \xcc
+N= \xcd
+O= \xce
+P= \xcf
+R= \xd0
+S= \xd1
+T= \xd2
+U= \xd3
+F= \xd4
+H= \xd5
+C= \xd6
+C% \xd7
+S% \xd8
+Sc \xd9
+=" \xda
+Y= \xdb
+%" \xdc
+JE \xdd
+JU \xde
+JA \xdf
+a= \xe0
+b= \xe1
+v= \xe2
+g= \xe3
+d= \xe4
+e= \xe5
+z% \xe6
+z= \xe7
+i= \xe8
+j= \xe9
+k= \xea
+l= \xeb
+m= \xec
+n= \xed
+o= \xee
+p= \xef
+r= \xf0
+s= \xf1
+t= \xf2
+u= \xf3
+f= \xf4
+h= \xf5
+c= \xf6
+c% \xf7
+s% \xf8
+sc \xf9
+=' \xfa
+y= \xfb
+%' \xfc
+je \xfd
+ju \xfe
+ja \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.CP866	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+A= \x80
+B= \x81
+V= \x82
+G= \x83
+D= \x84
+E= \x85
+Z% \x86
+Z= \x87
+I= \x88
+J= \x89
+K= \x8a
+L= \x8b
+M= \x8c
+N= \x8d
+O= \x8e
+P= \x8f
+R= \x90
+S= \x91
+T= \x92
+U= \x93
+F= \x94
+H= \x95
+C= \x96
+C% \x97
+S% \x98
+Sc \x99
+=" \x9a
+Y= \x9b
+%" \x9c
+JE \x9d
+JU \x9e
+JA \x9f
+a= \xa0
+b= \xa1
+v= \xa2
+g= \xa3
+d= \xa4
+e= \xa5
+z% \xa6
+z= \xa7
+i= \xa8
+j= \xa9
+k= \xaa
+l= \xab
+m= \xac
+n= \xad
+o= \xae
+p= \xaf
+.S \xb0
+:S \xb1
+?S \xb2
+vv \xb3
+vl \xb4
+vL \xb5
+Vl \xb6
+Dl \xb7
+dL \xb8
+VL \xb9
+VV \xba
+LD \xbb
+UL \xbc
+Ul \xbd
+uL \xbe
+dl \xbf
+ur \xc0
+uh \xc1
+dh \xc2
+vr \xc3
+hh \xc4
+vh \xc5
+vR \xc6
+Vr \xc7
+UR \xc8
+DR \xc9
+UH \xca
+DH \xcb
+VR \xcc
+HH \xcd
+VH \xce
+uH \xcf
+Uh \xd0
+dH \xd1
+Dh \xd2
+Ur \xd3
+uR \xd4
+dR \xd5
+Dr \xd6
+Vh \xd7
+vH \xd8
+ul \xd9
+dr \xda
+FB \xdb
+LB \xdc
+lB \xdd
+RB \xde
+TB \xdf
+r= \xe0
+s= \xe1
+t= \xe2
+u= \xe3
+f= \xe4
+h= \xe5
+c= \xe6
+c% \xe7
+s% \xe8
+sc \xe9
+=' \xea
+y= \xeb
+%' \xec
+je \xed
+ju \xee
+ja \xef
+IO \xf0
+io \xf1
+IE \xf2
+ie \xf3
+YI \xf4
+yi \xf5
+V% \xf6
+v% \xf7
+DG \xf8
+Sb \xf9
+.M \xfa
+RT \xfb
+N0 \xfc
+Cu \xfd
+fS \xfe
+NS \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.ISCII-DEV	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,163 @@
+NU 							 \x00
+SH 							 \x01
+SX 							 \x02
+EX 							 \x03
+ET 							 \x04
+EQ 							 \x05
+AK 							 \x06
+BL 							 \x07
+BS 							 \x08
+HT 							 \x09
+LF 							 \x0a
+VT 							 \x0b
+FF 							 \x0c
+CR 							 \x0d
+SO 							 \x0e
+SI 							 \x0f
+DL 							 \x10
+D1 							 \x11
+D2 							 \x12
+D3 							 \x13
+D4 							 \x14
+NK 							 \x15
+SY 							 \x16
+EB 							 \x17
+CN 							 \x18
+EM 							 \x19
+SB 							 \x1a
+EC 							 \x1b
+FS 							 \x1c
+GS 							 \x1d
+RS 							 \x1e
+US 							 \x1f
+SP 							 \x20
+Nb 							 \x23
+DO 							 \x24
+At 							 \x40
+<( 							 \x5b
+// 							 \x5c
+)> 							 \x5d
+'> 							 \x5e
+'! 							 \x60
+(! 							 \x7b
+!! 							 \x7c
+!) 							 \x7d
+'? 							 \x7e
+DT 							 \x7f
+PA 							 \x80
+HO 							 \x81
+BH 							 \x82
+NH 							 \x83
+IN 							 \x84
+NL 							 \x85
+SA 							 \x86
+ES 							 \x87
+HS 							 \x88
+HJ 							 \x89
+VS 							 \x8a
+PD 							 \x8b
+PU 							 \x8c
+RI 							 \x8d
+S2 							 \x8e
+S3 							 \x8f
+DC 							 \x90
+P1 							 \x91
+P2 							 \x92
+TS 							 \x93
+CC 							 \x94
+MW 							 \x95
+SG 							 \x96
+EG 							 \x97
+SS 							 \x98
+GC 							 \x99
+SC 							 \x9a
+CI 							 \x9b
+ST 							 \x9c
+OC 							 \x9d
+PM 							 \x9e
+AC 							 \x9f
+NS 							 \xa0             
+Vowel-modifier-Chandrabindu                              ¡
+Vowel-modifier-Anuswar                                   ¢
+Vowel-modifier-Visarg                                    £
+Vowel-A                                                  ¤
+Vowel-AA                                                 ¥
+Vowel-I                                                  ¦
+Vowel-II                                                 §
+Vowel-U                                                  ¨
+Vowel-UU                                                 ©
+Vowel-RI                                                 ª
+Vowel-E                                                  «
+Vowel-EY                                                 ¬
+Vowel-AI                                                 ­
+Vowel-AYE                                                ®
+Vowel-O                                                  ¯
+Vowel-OW                                                 °
+Vowel-AU                                                 ±
+Vowel-AWE                                                ²
+Consonant-KA                                             ³
+Consonant-KHA                                            ´
+Consonant-GA                                             µ
+Consonant-GHA                                            ¶
+Consonant-NGA                                            ·
+Consonant-CHA                                            ¸
+Consonant-CHHA                                           ¹
+Consonant-JA                                             º
+Consonant-JHA                                            »
+Consonant-JNA                                            ¼
+Consonant-Hard-TA                                        ½
+Consonant-Hard-THA                                       ¾
+Consonant-Hard-DA                                        ¿
+Consonant-Hard-DHA                                       À
+Consonant-Hard-NA                                        Á
+Consonant-Soft-TA                                        Â
+Consonant-Soft-THA                                       Ã
+Consonant-Soft-DA                                        Ä
+Consonant-Soft-DHA                                       Å
+Consonant-Soft-NA                                        Æ
+Consonant-NA-Tamil                                       Ç
+Consonant-PA                                             È
+Consonant-PHA                                            É
+Consonant-BA                                             Ê
+Consonant-BHA                                            Ë
+Consonant-MA                                             Ì
+Consonant-YA                                             Í
+Consonant-JYA                                            Î
+Consonant-RA                                             Ï
+Consonant-Hard-RA                                        Ð
+Consonant-LA                                             Ñ
+Consonant-Hard-LA                                        Ò
+Consonant-ZHA-Tamil                                      Ó
+Consonant-VA                                             Ô
+Consonant-SHA                                            Õ
+Consonant-Hard-SHA                                       Ö
+Consonant-SA                                             ×
+Consonant-HA                                             Ø
+Consonant-invisible                                      Ù
+Vowel-sign-AA                                            Ú
+Vowel-sign-I                                             Û
+Vowel-sign-II                                            Ü
+Vowel-sign-U                                             Ý
+Vowel-sign-UU                                            Þ
+Vowel-sign-RI                                            ß
+Vowel-sign-E                                             à
+Vowel-sign-EY                                            á
+Vowel-sign-AI                                            â
+Vowel-sign-AYE                                           ã
+Vowel-sign-O                                             ä
+Vowel-sign-OW                                            å
+Vowel-sign-AU                                            æ
+Vowel-sign-AWE                                           ç
+Vowel-omission-sign                                      è
+Diacritic-sign-Nukta                                     é
+Full-Stop-Viram                                          ê
+Digit-0                                                  ñ
+Digit-1                                                  ò
+Digit-2                                                  ó
+Digit-3                                                  ô
+Digit-4                                                  õ
+Digit-5                                                  ö
+Digit-6                                                  ÷
+Digit-7                                                  ø
+Digit-8                                                  ù
+Digit-9							 ú
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.ISO8859-1	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+PA \x80
+HO \x81
+BH \x82
+NH \x83
+IN \x84
+NL \x85
+SA \x86
+ES \x87
+HS \x88
+HJ \x89
+VS \x8a
+PD \x8b
+PU \x8c
+RI \x8d
+S2 \x8e
+S3 \x8f
+DC \x90
+P1 \x91
+P2 \x92
+TS \x93
+CC \x94
+MW \x95
+SG \x96
+EG \x97
+SS \x98
+GC \x99
+SC \x9a
+CI \x9b
+ST \x9c
+OC \x9d
+PM \x9e
+AC \x9f
+NS \xa0
+!I \xa1
+Ct \xa2
+Pd \xa3
+Cu \xa4
+Ye \xa5
+BB \xa6
+SE \xa7
+': \xa8
+Co \xa9
+-a \xaa
+<< \xab
+NO \xac
+-- \xad
+Rg \xae
+'m \xaf
+DG \xb0
++- \xb1
+2S \xb2
+3S \xb3
+'' \xb4
+My \xb5
+PI \xb6
+.M \xb7
+', \xb8
+1S \xb9
+-o \xba
+>> \xbb
+14 \xbc
+12 \xbd
+34 \xbe
+?I \xbf
+A! \xc0
+A' \xc1
+A> \xc2
+A? \xc3
+A: \xc4
+AA \xc5
+AE \xc6
+C, \xc7
+E! \xc8
+E' \xc9
+E> \xca
+E: \xcb
+I! \xcc
+I' \xcd
+I> \xce
+I: \xcf
+D- \xd0
+N? \xd1
+O! \xd2
+O' \xd3
+O> \xd4
+O? \xd5
+O: \xd6
+*X \xd7
+O/ \xd8
+U! \xd9
+U' \xda
+U> \xdb
+U: \xdc
+Y' \xdd
+TH \xde
+ss \xdf
+a! \xe0
+a' \xe1
+a> \xe2
+a? \xe3
+a: \xe4
+aa \xe5
+ae \xe6
+c, \xe7
+e! \xe8
+e' \xe9
+e> \xea
+e: \xeb
+i! \xec
+i' \xed
+i> \xee
+i: \xef
+d- \xf0
+n? \xf1
+o! \xf2
+o' \xf3
+o> \xf4
+o? \xf5
+o: \xf6
+-: \xf7
+o/ \xf8
+u! \xf9
+u' \xfa
+u> \xfb
+u: \xfc
+y' \xfd
+th \xfe
+y: \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.ISO8859-13	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+PA \x80
+HO \x81
+BH \x82
+NH \x83
+IN \x84
+NL \x85
+SA \x86
+ES \x87
+HS \x88
+HJ \x89
+VS \x8a
+PD \x8b
+PU \x8c
+RI \x8d
+S2 \x8e
+S3 \x8f
+DC \x90
+P1 \x91
+P2 \x92
+TS \x93
+CC \x94
+MW \x95
+SG \x96
+EG \x97
+SS \x98
+GC \x99
+SC \x9a
+CI \x9b
+ST \x9c
+OC \x9d
+PM \x9e
+AC \x9f
+NS \xa0
+"" \xa1
+Ct \xa2
+Pd \xa3
+Cu \xa4
+,, \xa5
+BB \xa6
+SE \xa7
+O/ \xa8
+Co \xa9
+R, \xaa
+<< \xab
+NO \xac
+-- \xad
+Rg \xae
+AE \xaf
+DG \xb0
++- \xb1
+2S \xb2
+3S \xb3
+`` \xb4
+My \xb5
+PI \xb6
+.M \xb7
+o/ \xb8
+1S \xb9
+r, \xba
+>> \xbb
+14 \xbc
+12 \xbd
+34 \xbe
+ae \xbf
+A; \xc0
+I; \xc1
+A- \xc2
+C' \xc3
+A: \xc4
+AA \xc5
+E; \xc6
+E- \xc7
+C< \xc8
+E' \xc9
+Z' \xca
+E. \xcb
+G, \xcc
+K, \xcd
+I- \xce
+L, \xcf
+S< \xd0
+N' \xd1
+N, \xd2
+O' \xd3
+O- \xd4
+O? \xd5
+O: \xd6
+*X \xd7
+U; \xd8
+L/ \xd9
+S' \xda
+U- \xdb
+U: \xdc
+Z. \xdd
+Z< \xde
+ss \xdf
+a; \xe0
+i; \xe1
+a- \xe2
+c' \xe3
+a: \xe4
+aa \xe5
+e; \xe6
+e- \xe7
+c< \xe8
+e' \xe9
+z' \xea
+e. \xeb
+g, \xec
+k, \xed
+i- \xee
+l, \xef
+s< \xf0
+n' \xf1
+n, \xf2
+o' \xf3
+o- \xf4
+o? \xf5
+o: \xf6
+-: \xf7
+u; \xf8
+l/ \xf9
+s' \xfa
+u- \xfb
+u: \xfc
+z. \xfd
+z< \xfe
+'. \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.ISO8859-15	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+PA \x80
+HO \x81
+BH \x82
+NH \x83
+IN \x84
+NL \x85
+SA \x86
+ES \x87
+HS \x88
+HJ \x89
+VS \x8a
+PD \x8b
+PU \x8c
+RI \x8d
+S2 \x8e
+S3 \x8f
+DC \x90
+P1 \x91
+P2 \x92
+TS \x93
+CC \x94
+MW \x95
+SG \x96
+EG \x97
+SS \x98
+GC \x99
+SC \x9a
+CI \x9b
+ST \x9c
+OC \x9d
+PM \x9e
+AC \x9f
+NS \xa0
+!I \xa1
+Ct \xa2
+Pd \xa3
+Eu \xa4
+Ye \xa5
+S< \xa6
+SE \xa7
+s< \xa8
+Co \xa9
+-a \xaa
+<< \xab
+NO \xac
+-- \xad
+Rg \xae
+'m \xaf
+DG \xb0
++- \xb1
+2S \xb2
+3S \xb3
+Z< \xb4
+My \xb5
+PI \xb6
+.M \xb7
+z< \xb8
+1S \xb9
+-o \xba
+>> \xbb
+OE \xbc
+oe \xbd
+Y: \xbe
+?I \xbf
+A! \xc0
+A' \xc1
+A> \xc2
+A? \xc3
+A: \xc4
+AA \xc5
+AE \xc6
+C, \xc7
+E! \xc8
+E' \xc9
+E> \xca
+E: \xcb
+I! \xcc
+I' \xcd
+I> \xce
+I: \xcf
+D- \xd0
+N? \xd1
+O! \xd2
+O' \xd3
+O> \xd4
+O? \xd5
+O: \xd6
+*X \xd7
+O/ \xd8
+U! \xd9
+U' \xda
+U> \xdb
+U: \xdc
+Y' \xdd
+TH \xde
+ss \xdf
+a! \xe0
+a' \xe1
+a> \xe2
+a? \xe3
+a: \xe4
+aa \xe5
+ae \xe6
+c, \xe7
+e! \xe8
+e' \xe9
+e> \xea
+e: \xeb
+i! \xec
+i' \xed
+i> \xee
+i: \xef
+d- \xf0
+n? \xf1
+o! \xf2
+o' \xf3
+o> \xf4
+o? \xf5
+o: \xf6
+-: \xf7
+o/ \xf8
+u! \xf9
+u' \xfa
+u> \xfb
+u: \xfc
+y' \xfd
+th \xfe
+y: \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.ISO8859-2	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+PA \x80
+HO \x81
+BH \x82
+NH \x83
+IN \x84
+NL \x85
+SA \x86
+ES \x87
+HS \x88
+HJ \x89
+VS \x8a
+PD \x8b
+PU \x8c
+RI \x8d
+S2 \x8e
+S3 \x8f
+DC \x90
+P1 \x91
+P2 \x92
+TS \x93
+CC \x94
+MW \x95
+SG \x96
+EG \x97
+SS \x98
+GC \x99
+SC \x9a
+CI \x9b
+ST \x9c
+OC \x9d
+PM \x9e
+AC \x9f
+NS \xa0
+A; \xa1
+'( \xa2
+L/ \xa3
+Cu \xa4
+L< \xa5
+S' \xa6
+SE \xa7
+': \xa8
+S< \xa9
+S, \xaa
+T< \xab
+Z' \xac
+-- \xad
+Z< \xae
+Z. \xaf
+DG \xb0
+a; \xb1
+'; \xb2
+l/ \xb3
+'' \xb4
+l< \xb5
+s' \xb6
+'< \xb7
+', \xb8
+s< \xb9
+s, \xba
+t< \xbb
+z' \xbc
+'" \xbd
+z< \xbe
+z. \xbf
+R' \xc0
+A' \xc1
+A> \xc2
+A( \xc3
+A: \xc4
+L' \xc5
+C' \xc6
+C, \xc7
+C< \xc8
+E' \xc9
+E; \xca
+E: \xcb
+E< \xcc
+I' \xcd
+I> \xce
+D< \xcf
+D/ \xd0
+N' \xd1
+N< \xd2
+O' \xd3
+O> \xd4
+O" \xd5
+O: \xd6
+*X \xd7
+R< \xd8
+U0 \xd9
+U' \xda
+U" \xdb
+U: \xdc
+Y' \xdd
+T, \xde
+ss \xdf
+r' \xe0
+a' \xe1
+a> \xe2
+a( \xe3
+a: \xe4
+l' \xe5
+c' \xe6
+c, \xe7
+c< \xe8
+e' \xe9
+e; \xea
+e: \xeb
+e< \xec
+i' \xed
+i> \xee
+d< \xef
+d/ \xf0
+n' \xf1
+n< \xf2
+o' \xf3
+o> \xf4
+o" \xf5
+o: \xf6
+-: \xf7
+r< \xf8
+u0 \xf9
+u' \xfa
+u" \xfb
+u: \xfc
+y' \xfd
+t, \xfe
+'. \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.ISO8859-4	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+PA \x80
+HO \x81
+BH \x82
+NH \x83
+IN \x84
+NL \x85
+SA \x86
+ES \x87
+HS \x88
+HJ \x89
+VS \x8a
+PD \x8b
+PU \x8c
+RI \x8d
+S2 \x8e
+S3 \x8f
+DC \x90
+P1 \x91
+P2 \x92
+TS \x93
+CC \x94
+MW \x95
+SG \x96
+EG \x97
+SS \x98
+GC \x99
+SC \x9a
+CI \x9b
+ST \x9c
+OC \x9d
+PM \x9e
+AC \x9f
+NS \xa0
+A; \xa1
+kk \xa2
+R, \xa3
+Cu \xa4
+I? \xa5
+L, \xa6
+SE \xa7
+': \xa8
+S< \xa9
+E- \xaa
+G, \xab
+T/ \xac
+-- \xad
+Z< \xae
+'m \xaf
+DG \xb0
+a; \xb1
+'; \xb2
+r, \xb3
+'' \xb4
+i? \xb5
+l, \xb6
+'< \xb7
+', \xb8
+s< \xb9
+e- \xba
+g, \xbb
+t/ \xbc
+NG \xbd
+z< \xbe
+ng \xbf
+A- \xc0
+A' \xc1
+A> \xc2
+A? \xc3
+A: \xc4
+AA \xc5
+AE \xc6
+I; \xc7
+C< \xc8
+E' \xc9
+E; \xca
+E: \xcb
+E. \xcc
+I' \xcd
+I> \xce
+I- \xcf
+D/ \xd0
+N, \xd1
+O- \xd2
+K, \xd3
+O> \xd4
+O? \xd5
+O: \xd6
+*X \xd7
+O/ \xd8
+U; \xd9
+U' \xda
+U> \xdb
+U: \xdc
+U? \xdd
+U- \xde
+ss \xdf
+a- \xe0
+a' \xe1
+a> \xe2
+a? \xe3
+a: \xe4
+aa \xe5
+ae \xe6
+i; \xe7
+c< \xe8
+e' \xe9
+e; \xea
+e: \xeb
+e. \xec
+i' \xed
+i> \xee
+i- \xef
+d/ \xf0
+n, \xf1
+o- \xf2
+k, \xf3
+o> \xf4
+o? \xf5
+o: \xf6
+-: \xf7
+o/ \xf8
+u; \xf9
+u' \xfa
+u> \xfb
+u: \xfc
+u? \xfd
+u- \xfe
+'. \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.ISO8859-5	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+PA \x80
+HO \x81
+BH \x82
+NH \x83
+IN \x84
+NL \x85
+SA \x86
+ES \x87
+HS \x88
+HJ \x89
+VS \x8a
+PD \x8b
+PU \x8c
+RI \x8d
+S2 \x8e
+S3 \x8f
+DC \x90
+P1 \x91
+P2 \x92
+TS \x93
+CC \x94
+MW \x95
+SG \x96
+EG \x97
+SS \x98
+GC \x99
+SC \x9a
+CI \x9b
+ST \x9c
+OC \x9d
+PM \x9e
+AC \x9f
+NS \xa0
+IO \xa1
+D% \xa2
+G% \xa3
+IE \xa4
+DS \xa5
+II \xa6
+YI \xa7
+J% \xa8
+LJ \xa9
+NJ \xaa
+Ts \xab
+KJ \xac
+-- \xad
+V% \xae
+DZ \xaf
+A= \xb0
+B= \xb1
+V= \xb2
+G= \xb3
+D= \xb4
+E= \xb5
+Z% \xb6
+Z= \xb7
+I= \xb8
+J= \xb9
+K= \xba
+L= \xbb
+M= \xbc
+N= \xbd
+O= \xbe
+P= \xbf
+R= \xc0
+S= \xc1
+T= \xc2
+U= \xc3
+F= \xc4
+H= \xc5
+C= \xc6
+C% \xc7
+S% \xc8
+Sc \xc9
+=" \xca
+Y= \xcb
+%" \xcc
+JE \xcd
+JU \xce
+JA \xcf
+a= \xd0
+b= \xd1
+v= \xd2
+g= \xd3
+d= \xd4
+e= \xd5
+z% \xd6
+z= \xd7
+i= \xd8
+j= \xd9
+k= \xda
+l= \xdb
+m= \xdc
+n= \xdd
+o= \xde
+p= \xdf
+r= \xe0
+s= \xe1
+t= \xe2
+u= \xe3
+f= \xe4
+h= \xe5
+c= \xe6
+c% \xe7
+s% \xe8
+sc \xe9
+=' \xea
+y= \xeb
+%' \xec
+je \xed
+ju \xee
+ja \xef
+N0 \xf0
+io \xf1
+d% \xf2
+g% \xf3
+ie \xf4
+ds \xf5
+ii \xf6
+yi \xf7
+j% \xf8
+lj \xf9
+nj \xfa
+ts \xfb
+kj \xfc
+SE \xfd
+v% \xfe
+dz \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.ISO8859-7	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+PA \x80
+HO \x81
+BH \x82
+NH \x83
+IN \x84
+NL \x85
+SA \x86
+ES \x87
+HS \x88
+HJ \x89
+VS \x8a
+PD \x8b
+PU \x8c
+RI \x8d
+S2 \x8e
+S3 \x8f
+DC \x90
+P1 \x91
+P2 \x92
+TS \x93
+CC \x94
+MW \x95
+SG \x96
+EG \x97
+SS \x98
+GC \x99
+SC \x9a
+CI \x9b
+ST \x9c
+OC \x9d
+PM \x9e
+AC \x9f
+NS \xa0
+9' \xa1
+'9 \xa2
+Pd \xa3
+IE \xa4
+DS \xa5
+BB \xa6
+SE \xa7
+': \xa8
+Co \xa9
+NJ \xaa
+<< \xab
+NO \xac
+-- \xad
+V% \xae
+-M \xaf
+DG \xb0
++- \xb1
+2S \xb2
+3S \xb3
+'' \xb4
+'% \xb5
+A% \xb6
+.M \xb7
+E% \xb8
+Y% \xb9
+I% \xba
+>> \xbb
+O% \xbc
+12 \xbd
+U% \xbe
+W% \xbf
+i3 \xc0
+A* \xc1
+B* \xc2
+G* \xc3
+D* \xc4
+E* \xc5
+Z* \xc6
+Y* \xc7
+H* \xc8
+I* \xc9
+K* \xca
+L* \xcb
+M* \xcc
+N* \xcd
+C* \xce
+O* \xcf
+P* \xd0
+R* \xd1
+v= \xd2
+S* \xd3
+T* \xd4
+U* \xd5
+F* \xd6
+X* \xd7
+Q* \xd8
+W* \xd9
+J* \xda
+V* \xdb
+a% \xdc
+e% \xdd
+y% \xde
+i% \xdf
+u3 \xe0
+a* \xe1
+b* \xe2
+g* \xe3
+d* \xe4
+e* \xe5
+z* \xe6
+y* \xe7
+h* \xe8
+i* \xe9
+k* \xea
+l* \xeb
+m* \xec
+n* \xed
+c* \xee
+o* \xef
+p* \xf0
+r* \xf1
+*s \xf2
+s* \xf3
+t* \xf4
+u* \xf5
+f* \xf6
+x* \xf7
+q* \xf8
+w* \xf9
+j* \xfa
+v* \xfb
+o% \xfc
+u% \xfd
+w% \xfe
+dz \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.ISO8859-9	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+PA \x80
+HO \x81
+BH \x82
+NH \x83
+IN \x84
+NL \x85
+SA \x86
+ES \x87
+HS \x88
+HJ \x89
+VS \x8a
+PD \x8b
+PU \x8c
+RI \x8d
+S2 \x8e
+S3 \x8f
+DC \x90
+P1 \x91
+P2 \x92
+TS \x93
+CC \x94
+MW \x95
+SG \x96
+EG \x97
+SS \x98
+GC \x99
+SC \x9a
+CI \x9b
+ST \x9c
+OC \x9d
+PM \x9e
+AC \x9f
+NS \xa0
+!I \xa1
+Ct \xa2
+Pd \xa3
+Cu \xa4
+Ye \xa5
+BB \xa6
+SE \xa7
+': \xa8
+Co \xa9
+-a \xaa
+<< \xab
+NO \xac
+-- \xad
+Rg \xae
+'m \xaf
+DG \xb0
++- \xb1
+2S \xb2
+3S \xb3
+'' \xb4
+My \xb5
+PI \xb6
+.M \xb7
+', \xb8
+1S \xb9
+-o \xba
+>> \xbb
+14 \xbc
+12 \xbd
+34 \xbe
+?I \xbf
+A! \xc0
+A' \xc1
+A> \xc2
+A? \xc3
+A: \xc4
+AA \xc5
+AE \xc6
+C, \xc7
+E! \xc8
+E' \xc9
+E> \xca
+E: \xcb
+I! \xcc
+I' \xcd
+I> \xce
+I: \xcf
+G( \xd0
+N? \xd1
+O! \xd2
+O' \xd3
+O> \xd4
+O? \xd5
+O: \xd6
+*X \xd7
+O/ \xd8
+U! \xd9
+U' \xda
+U> \xdb
+U: \xdc
+I. \xdd
+S, \xde
+ss \xdf
+a! \xe0
+a' \xe1
+a> \xe2
+a? \xe3
+a: \xe4
+aa \xe5
+ae \xe6
+c, \xe7
+e! \xe8
+e' \xe9
+e; \xea
+e: \xeb
+e. \xec
+i' \xed
+i> \xee
+i- \xef
+g( \xf0
+n? \xf1
+o! \xf2
+o' \xf3
+o> \xf4
+o? \xf5
+o: \xf6
+-: \xf7
+o/ \xf8
+u! \xf9
+u' \xfa
+u> \xfb
+u: \xfc
+i. \xfd
+s, \xfe
+y: \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.KOI8-R	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+hh \x80
+vv \x81
+dr \x82
+dl \x83
+ur \x84
+ul \x85
+vr \x86
+vl \x87
+dh \x88
+uh \x89
+vh \x8a
+TB \x8b
+LB \x8c
+FB \x8d
+lB \x8e
+RB \x8f
+.S \x90
+:S \x91
+?S \x92
+Iu \x93
+fS \x94
+Sb \x95
+RT \x96
+?2 \x97
+=< \x98
+>= \x99
+NS \x9a
+Il \x9b
+DG \x9c
+2S \x9d
+.M \x9e
+-: \x9f
+HH \xa0
+VV \xa1
+dR \xa2
+io \xa3
+Dr \xa4
+DR \xa5
+dL \xa6
+Dl \xa7
+LD \xa8
+uR \xa9
+Ur \xaa
+UR \xab
+uL \xac
+Ul \xad
+UL \xae
+vR \xaf
+Vr \xb0
+VR \xb1
+vL \xb2
+IO \xb3
+Vl \xb4
+VL \xb5
+dH \xb6
+Dh \xb7
+DH \xb8
+uH \xb9
+Uh \xba
+UH \xbb
+vH \xbc
+Vh \xbd
+VH \xbe
+Co \xbf
+ju \xc0
+a= \xc1
+b= \xc2
+c= \xc3
+d= \xc4
+e= \xc5
+f= \xc6
+g= \xc7
+h= \xc8
+i= \xc9
+j= \xca
+k= \xcb
+l= \xcc
+m= \xcd
+n= \xce
+o= \xcf
+p= \xd0
+ja \xd1
+r= \xd2
+s= \xd3
+t= \xd4
+u= \xd5
+z% \xd6
+v= \xd7
+%' \xd8
+y= \xd9
+z= \xda
+s% \xdb
+je \xdc
+sc \xdd
+c% \xde
+=' \xdf
+JU \xe0
+A= \xe1
+B= \xe2
+C= \xe3
+D= \xe4
+E= \xe5
+F= \xe6
+G= \xe7
+H= \xe8
+I= \xe9
+J= \xea
+K= \xeb
+L= \xec
+M= \xed
+N= \xee
+O= \xef
+P= \xf0
+JA \xf1
+R= \xf2
+S= \xf3
+T= \xf4
+U= \xf5
+Z% \xf6
+V= \xf7
+%" \xf8
+Y= \xf9
+Z= \xfa
+S% \xfb
+JE \xfc
+Sc \xfd
+C% \xfe
+=" \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.KOI8-U	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+Nb \x23
+DO \x24
+At \x40
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+'! \x60
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+hh \x80
+vv \x81
+dr \x82
+dl \x83
+ur \x84
+ul \x85
+vr \x86
+vl \x87
+dh \x88
+uh \x89
+vh \x8a
+TB \x8b
+LB \x8c
+FB \x8d
+lB \x8e
+RB \x8f
+.S \x90
+:S \x91
+?S \x92
+Iu \x93
+fS \x94
+Sb \x95
+RT \x96
+?2 \x97
+=< \x98
+>= \x99
+NS \x9a
+Il \x9b
+DG \x9c
+2S \x9d
+.M \x9e
+-: \x9f
+HH \xa0
+VV \xa1
+dR \xa2
+io \xa3
+ie \xa4
+DR \xa5
+ii \xa6
+yi \xa7
+LD \xa8
+uR \xa9
+Ur \xaa
+UR \xab
+uL \xac
+g3 \xad
+UL \xae
+vR \xaf
+Vr \xb0
+VR \xb1
+vL \xb2
+IO \xb3
+IE \xb4
+VL \xb5
+II \xb6
+YI \xb7
+DH \xb8
+uH \xb9
+Uh \xba
+UH \xbb
+vH \xbc
+G3 \xbd
+VH \xbe
+Co \xbf
+ju \xc0
+a= \xc1
+b= \xc2
+c= \xc3
+d= \xc4
+e= \xc5
+f= \xc6
+g= \xc7
+h= \xc8
+i= \xc9
+j= \xca
+k= \xcb
+l= \xcc
+m= \xcd
+n= \xce
+o= \xcf
+p= \xd0
+ja \xd1
+r= \xd2
+s= \xd3
+t= \xd4
+u= \xd5
+z% \xd6
+v= \xd7
+%' \xd8
+y= \xd9
+z= \xda
+s% \xdb
+je \xdc
+sc \xdd
+c% \xde
+=' \xdf
+JU \xe0
+A= \xe1
+B= \xe2
+C= \xe3
+D= \xe4
+E= \xe5
+F= \xe6
+G= \xe7
+H= \xe8
+I= \xe9
+J= \xea
+K= \xeb
+L= \xec
+M= \xed
+N= \xee
+O= \xef
+P= \xf0
+JA \xf1
+R= \xf2
+S= \xf3
+T= \xf4
+U= \xf5
+Z% \xf6
+V= \xf7
+%" \xf8
+Y= \xf9
+Z= \xfa
+S% \xfb
+JE \xfc
+Sc \xfd
+C% \xfe
+=" \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/data/map.PT154	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,257 @@
+# Birsh T <birsh@mail.kz>, 2003-12-12
+NU \x00
+SH \x01
+SX \x02
+EX \x03
+ET \x04
+EQ \x05
+AK \x06
+BL \x07
+BS \x08
+HT \x09
+LF \x0a
+VT \x0b
+FF \x0c
+CR \x0d
+SO \x0e
+SI \x0f
+DL \x10
+D1 \x11
+D2 \x12
+D3 \x13
+D4 \x14
+NK \x15
+SY \x16
+EB \x17
+CN \x18
+EM \x19
+SB \x1a
+EC \x1b
+FS \x1c
+GS \x1d
+RS \x1e
+US \x1f
+SP \x20
+! \x21
+" \x22
+Nb \x23
+DO \x24
+% \x25
+& \x26
+' \x27
+( \x28
+) \x29
+* \x2a
++ \x2b
+, \x2c
+- \x2d
+. \x2e
+/ \x2f
+0 \x30
+1 \x31
+2 \x32
+3 \x33
+4 \x34
+5 \x35
+6 \x36
+7 \x37
+8 \x38
+9 \x39
+: \x3a
+; \x3b
+< \x3c
+= \x3d
+> \x3e
+? \x3f
+At \x40
+A \x41
+B \x42
+C \x43
+D \x44
+E \x45
+F \x46
+G \x47
+H \x48
+I \x49
+J \x4a
+K \x4b
+L \x4c
+M \x4d
+N \x4e
+O \x4f
+P \x50
+Q \x51
+R \x52
+S \x53
+T \x54
+U \x55
+V \x56
+W \x57
+X \x58
+Y \x59
+Z \x5a
+<( \x5b
+// \x5c
+)> \x5d
+'> \x5e
+_ \x5f
+'! \x60
+a \x61
+b \x62
+c \x63
+d \x64
+e \x65
+f \x66
+g \x67
+h \x68
+i \x69
+j \x6a
+k \x6b
+l \x6c
+m \x6d
+n \x6e
+o \x6f
+p \x70
+q \x71
+r \x72
+s \x73
+t \x74
+u \x75
+v \x76
+w \x77
+x \x78
+y \x79
+z \x7a
+(! \x7b
+!! \x7c
+!) \x7d
+'? \x7e
+DT \x7f
+Z. \x80
+G- \x81
+U' \x82
+g- \x83
+:9 \x84
+.3 \x85
+C. \x86
+Y" \x87
+H% \x88
+y" \x89
+BK \x8a
+I' \x8b
+N% \x8c
+K% \x8d
+HH \x8e
+C! \x8f
+z. \x90
+'6 \x91
+'9 \x92
+"6 \x93
+"9 \x94
+sb \x95
+-N \x96
+-M \x97
+h% \x98
+c. \x99
+bk \x9a
+i' \x9b
+n% \x9c
+k% \x9d
+hh \x9e
+c! \x9f
+NS \xa0
+V% \xa1
+v% \xa2
+J% \xa3
+O- \xa4
+X% \xa5
+Y- \xa6
+SE \xa7
+IO \xa8
+Co \xa9
+HW \xaa
+<< \xab
+NO \xac
+u' \xad
+Rg \xae
+K! \xaf
+DG \xb0
+y- \xb1
+II \xb2
+ii \xb3
+x% \xb4
+o- \xb5
+PI \xb6
+.M \xb7
+io \xb8
+N0 \xb9
+hw \xba
+>> \xbb
+j% \xbc
+DS \xbd
+ds \xbe
+k! \xbf
+A= \xc0
+B= \xc1
+V= \xc2
+G= \xc3
+D= \xc4
+E= \xc5
+Z% \xc6
+Z= \xc7
+I= \xc8
+J= \xc9
+K= \xca
+L= \xcb
+M= \xcc
+N= \xcd
+O= \xce
+P= \xcf
+R= \xd0
+S= \xd1
+T= \xd2
+U= \xd3
+F= \xd4
+H= \xd5
+C= \xd6
+C% \xd7
+S% \xd8
+Sc \xd9
+=" \xda
+Y= \xdb
+%" \xdc
+JE \xdd
+JU \xde
+JA \xdf
+a= \xe0
+b= \xe1
+v= \xe2
+g= \xe3
+d= \xe4
+e= \xe5
+z% \xe6
+z= \xe7
+i= \xe8
+j= \xe9
+k= \xea
+l= \xeb
+m= \xec
+n= \xed
+o= \xee
+p= \xef
+r= \xf0
+s= \xf1
+t= \xf2
+u= \xf3
+f= \xf4
+h= \xf5
+c= \xf6
+c% \xf7
+s% \xf8
+sc \xf9
+=' \xfa
+y= \xfb
+%' \xfc
+je \xfd
+ju \xfe
+ja \xff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/mkcollate_lex.l	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,285 @@
+%x string name charmap defn nchar subs subs2
+%option noyywrap
+%{
+/*
+ * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
+ *		at Electronni Visti IA, Kiev, Ukraine.
+ *			All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+#include <ctype.h>
+#include <err.h>
+#include <limits.h>
+#include <unistd.h>
+#include <string.h>
+#include <sysexits.h>
+#include "common.h"
+#include "mkcollate_yacc.tab.h"
+
+int line_no = 1, save_no, fromsubs;
+uchar_t buf[BUFSIZE], *ptr;
+FILE *map_fp;
+YY_BUFFER_STATE main_buf, map_buf;
+#ifdef FLEX_DEBUG
+YYSTYPE yylval;
+#endif /* FLEX_DEBUG */
+int yylex(void);
+%}
+%%
+<INITIAL,charmap,nchar,subs,subs2>[ \t]+      ;
+<subs2>\"               { ptr = buf; BEGIN(string); }
+<subs>\<                { ptr = buf; fromsubs = 1; BEGIN(name); }
+<INITIAL>\<             { ptr = buf; fromsubs = 0; BEGIN(name); }
+^#.*\n			line_no++;
+^\n			line_no++;
+<INITIAL>\\\n           line_no++;
+<INITIAL,nchar,subs>\\t      { yylval.ch = '\t'; return CHAR; }
+<INITIAL,nchar,subs>\\n      { yylval.ch = '\n'; return CHAR; }
+<INITIAL,nchar,subs>\\b      { yylval.ch = '\b'; return CHAR; }
+<INITIAL,nchar,subs>\\f      { yylval.ch = '\f'; return CHAR; }
+<INITIAL,nchar,subs>\\v      { yylval.ch = '\v'; return CHAR; }
+<INITIAL,nchar,subs>\\r      { yylval.ch = '\r'; return CHAR; }
+<INITIAL,nchar,subs>\\a      { yylval.ch = '\a'; return CHAR; }
+<subs2>\n               {
+	line_no++;
+	BEGIN(INITIAL);
+	return '\n';
+}
+<INITIAL,nchar>\n       {
+	line_no++;
+	if (map_fp != NULL) {
+		ptr = buf;
+		BEGIN(defn);
+	}
+	return '\n';
+}
+<INITIAL>[;,{}()]       return *yytext;
+<INITIAL>substitute     { BEGIN(subs); return SUBSTITUTE; }
+<subs>with              { BEGIN(subs2); return WITH; }
+<INITIAL>order          return ORDER;
+<INITIAL>charmap        BEGIN(charmap);
+<INITIAL>;[ \t]*\.\.\.[ \t]*;   return RANGE;
+<INITIAL,nchar,subs>\\[0-7]{3}       {
+	u_int v;
+
+	sscanf(&yytext[1], "%o", &v);
+	yylval.ch = (uchar_t)v;
+	return CHAR;
+}
+<INITIAL,nchar,subs>\\x[0-9a-fA-F]{2}   {
+	u_int v;
+
+	sscanf(&yytext[2], "%x", &v);
+	yylval.ch = (uchar_t)v;
+	return CHAR;
+}
+<INITIAL,nchar,subs>\\. { yylval.ch = yytext[1]; return CHAR; }
+<INITIAL,nchar,subs>.   { yylval.ch = *yytext; return CHAR; }
+<defn>^#.*\n            line_no++;
+<defn>[ \t]+            {
+	if (ptr == buf)
+		errx(EX_UNAVAILABLE, "map expected near line %u of %s",
+		     line_no, map_name);
+	*ptr = '\0';
+	strcpy((char *)yylval.str, (char *)buf);
+	BEGIN(nchar);
+	return DEFN;
+}
+<name>\/\/              {
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "name buffer overflow near line %u, character '/'",
+		     line_no);
+	*ptr++ = '/';
+}
+<name>\/\>              {
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "name buffer overflow near line %u, character '>'",
+		     line_no);
+	*ptr++ = '>';
+}
+<string>\\\"		{
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\"'",
+		     line_no);
+	*ptr++ = '"';
+}
+<name>\>		{
+	u_int i;
+
+	if (ptr == buf)
+		errx(EX_UNAVAILABLE, "non-empty name expected near line %u",
+		     line_no);
+	*ptr = '\0';
+	for (i = 0; i <= UCHAR_MAX; i++) {
+		if (strcmp((char *)charmap_table[i], (char *)buf) == 0)
+			goto findit;
+	}
+	errx(EX_UNAVAILABLE, "name <%s> not 'charmap'-defined near line %u",
+		buf, line_no);
+ findit:
+	yylval.ch = i;
+	if (fromsubs)
+		BEGIN(subs);
+	else
+		BEGIN(INITIAL);
+	return CHAR;
+}
+<string>\"		{
+	*ptr = '\0';
+	strcpy((char *)yylval.str, (char *)buf);
+	BEGIN(subs2);
+	return STRING;
+}
+<name,defn>.            {
+	const char *s = (map_fp != NULL) ? map_name : "input";
+
+	if (!isascii(*yytext) || !isprint(*yytext))
+		errx(EX_UNAVAILABLE, "non-ASCII or non-printable character 0x%02x not allowed in the map/name near line %u of %s",
+		     *yytext, line_no, s);
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "map/name buffer overflow near line %u of %s, character '%c'",
+		     line_no, s, *yytext);
+	*ptr++ = *yytext;
+}
+<string>\\t             {
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\t'",
+		     line_no);
+	*ptr++ = '\t';
+}
+<string>\\b             {
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\b'",
+		     line_no);
+	*ptr++ = '\b';
+}
+<string>\\f             {
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\f'",
+		     line_no);
+	*ptr++ = '\f';
+}
+<string>\\v             {
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\v'",
+		     line_no);
+	*ptr++ = '\v';
+}
+<string>\\n             {
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\n'",
+		     line_no);
+	*ptr++ = '\n';
+}
+<string>\\r             {
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\r'",
+		     line_no);
+	*ptr++ = '\r';
+}
+<string>\\a             {
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '\\a'",
+		     line_no);
+	*ptr++ = '\a';
+}
+<name,string,defn>\n            {
+	const char *s = (map_fp != NULL) ? map_name : "input";
+
+	errx(EX_UNAVAILABLE, "unterminated map/name/string near line %u of %s", line_no, s);
+}
+<name,string,nchar><<EOF>>      {
+	const char *s = (map_fp != NULL) ? map_name : "input";
+
+	errx(EX_UNAVAILABLE, "premature EOF in the name/string/char near line %u of %s", line_no, s);
+}
+<string>\\x[0-9a-f]{2}          {
+	u_int v;
+
+	sscanf(&yytext[2], "%x", &v);
+	*ptr++ = (uchar_t)v;
+}
+<string>\\[0-7]{3}              {
+	u_int v;
+
+	sscanf(&yytext[1], "%o", &v);
+	*ptr++ = (uchar_t)v;
+}
+<string>\\.             {
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '%c'",
+		     line_no, yytext[1]);
+	*ptr++ = yytext[1];
+}
+<string>.               {
+	if(ptr >= buf + sizeof(buf) - 1)
+		errx(EX_UNAVAILABLE, "string buffer overflow near line %u, character '%c'",
+		     line_no, *yytext);
+	*ptr++ = *yytext;
+}
+<charmap>[^ \t\n]+	{
+	strcat(map_name, "/");
+	strcat(map_name, yytext);
+	if((map_fp = fopen(map_name, "r")) == NULL)
+		err(EX_UNAVAILABLE, "can't open 'charmap' file %s",
+		    map_name);
+	save_no = line_no;
+	line_no = 1;
+	map_buf = yy_new_buffer(map_fp, YY_BUF_SIZE);
+	main_buf = YY_CURRENT_BUFFER;
+	yy_switch_to_buffer(map_buf);
+	ptr = buf;
+	BEGIN(defn);
+}
+<charmap>\n             {
+	errx(EX_UNAVAILABLE, "'charmap' file name expected near line %u",
+	     line_no);
+}
+<charmap><<EOF>>        {
+	errx(EX_UNAVAILABLE, "'charmap' file name expected near line %u",
+	     line_no);
+}
+<INITIAL,defn><<EOF>>                 {
+	if(map_fp != NULL) {
+		if (ptr != buf)
+			errx(EX_UNAVAILABLE, "premature EOF in the map near line %u of %s", line_no, map_name);
+		yy_switch_to_buffer(main_buf);
+		yy_delete_buffer(map_buf);
+		fclose(map_fp);
+		map_fp = NULL;
+		line_no = save_no;
+		BEGIN(INITIAL);
+	} else
+		yyterminate();
+}
+%%
+#ifdef FLEX_DEBUG
+main()
+{
+	while(yylex())
+		;
+	return 0;
+}
+#endif /* FLEX_DEBUG */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/collate/mkcollate_yacc.y	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,381 @@
+%{
+/*
+ * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
+ *		at Electronni Visti IA, Kiev, Ukraine.
+ *			All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+#include <arpa/inet.h>
+#include <err.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sysexits.h>
+#include "collate.h"
+#include "common.h"
+
+extern FILE *yyin;
+void yyerror(const char *fmt, ...);
+int yyparse(void);
+int yylex(void);
+static void usage(void);
+static void collate_print_tables(void);
+
+char map_name[FILENAME_MAX] = ".";
+char curr_chain[STR_LEN];
+
+char __collate_version[STR_LEN];
+u_char charmap_table[UCHAR_MAX + 1][CHARMAP_SYMBOL_LEN];
+
+#undef __collate_substitute_table
+u_char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN];
+#undef __collate_char_pri_table
+struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1];
+struct __collate_st_chain_pri *__collate_chain_pri_table;
+
+int chain_index = 0;
+int prim_pri = 1, sec_pri = 1;
+#ifdef COLLATE_DEBUG
+int debug;
+#endif
+
+const char *out_file = "LC_COLLATE";
+%}
+%union {
+	u_char ch;
+	u_char str[BUFSIZE];
+}
+%token SUBSTITUTE WITH ORDER RANGE
+%token <str> STRING
+%token <str> DEFN
+%token <ch> CHAR
+%%
+collate : statment_list
+;
+statment_list : statment
+	| statment_list '\n' statment
+;
+statment :
+	| charmap
+	| substitute
+	| order
+;
+charmap : DEFN CHAR {
+	if (strlen((char *)$1) + 1 > CHARMAP_SYMBOL_LEN)
+		yyerror("Charmap symbol name '%s' is too long", $1);
+	strcpy((char *)charmap_table[$2], (char *)$1);
+}
+;
+substitute : SUBSTITUTE CHAR WITH STRING {
+	if ($2 == '\0')
+		yyerror("NUL character can't be substituted");
+	if (strchr((char *)$4, $2) != NULL)
+		yyerror("Char 0x%02x substitution is recursive", $2);
+	if (strlen((char *)$4) + 1 > STR_LEN)
+		yyerror("Char 0x%02x substitution is too long", $2);
+	strcpy((char *)__collate_substitute_table[$2], (char *)$4);
+}
+;
+order : ORDER order_list {
+	FILE *fp;
+	int ch, substed, ordered;
+	uint32_t u32;
+
+	for (ch = 0; ch < UCHAR_MAX + 1; ch++) {
+		substed = (__collate_substitute_table[ch][0] != ch);
+		ordered = !!__collate_char_pri_table[ch].prim;
+		if (!ordered && !substed)
+			yyerror("Char 0x%02x not found", ch);
+		if (substed && ordered)
+			yyerror("Char 0x%02x can't be ordered since substituted", ch);
+	}
+
+	if ((__collate_chain_pri_table = realloc(__collate_chain_pri_table,
+	     sizeof(*__collate_chain_pri_table) * (chain_index + 1))) == NULL)
+		yyerror("can't grow chain table");
+	(void)memset(&__collate_chain_pri_table[chain_index], 0,
+		     sizeof(__collate_chain_pri_table[0]));
+	chain_index++;
+
+#ifdef COLLATE_DEBUG
+	if (debug)
+		collate_print_tables();
+#endif
+	if ((fp = fopen(out_file, "w")) == NULL)
+		err(EX_UNAVAILABLE, "can't open destination file %s",
+		    out_file);
+
+	strcpy(__collate_version, COLLATE_VERSION1_2);
+	if (fwrite(__collate_version, sizeof(__collate_version), 1, fp) != 1)
+		err(EX_IOERR,
+		"IO error writting collate version to destination file %s",
+		    out_file);
+	u32 = htonl(chain_index);
+	if (fwrite(&u32, sizeof(u32), 1, fp) != 1)
+		err(EX_IOERR,
+		"IO error writting chains number to destination file %s",
+		    out_file);
+	if (fwrite(__collate_substitute_table,
+		   sizeof(__collate_substitute_table), 1, fp) != 1)
+		err(EX_IOERR,
+		"IO error writting substitute table to destination file %s",
+		    out_file);
+	for (ch = 0; ch < UCHAR_MAX + 1; ch++) {
+		__collate_char_pri_table[ch].prim =
+		    htonl(__collate_char_pri_table[ch].prim);
+		__collate_char_pri_table[ch].sec =
+		    htonl(__collate_char_pri_table[ch].sec);
+	}
+	if (fwrite(__collate_char_pri_table,
+		   sizeof(__collate_char_pri_table), 1, fp) != 1)
+		err(EX_IOERR,
+		"IO error writting char table to destination file %s",
+		    out_file);
+	for (ch = 0; ch < chain_index; ch++) {
+		__collate_chain_pri_table[ch].prim =
+		    htonl(__collate_chain_pri_table[ch].prim);
+		__collate_chain_pri_table[ch].sec =
+		    htonl(__collate_chain_pri_table[ch].sec);
+	}
+	if (fwrite(__collate_chain_pri_table,
+		   sizeof(*__collate_chain_pri_table), chain_index, fp) !=
+		   (size_t)chain_index)
+		err(EX_IOERR,
+		"IO error writting chain table to destination file %s",
+		    out_file);
+	if (fclose(fp) != 0)
+		err(EX_IOERR, "IO error closing destination file %s",
+		    out_file);
+	exit(EX_OK);
+}
+;
+order_list : item
+	| order_list ';' item
+;
+chain : CHAR CHAR {
+	curr_chain[0] = $1;
+	curr_chain[1] = $2;
+	if (curr_chain[0] == '\0' || curr_chain[1] == '\0')
+		yyerror("\\0 can't be chained");
+	curr_chain[2] = '\0';
+}
+	| chain CHAR {
+	static char tb[2];
+
+	tb[0] = $2;
+	if (tb[0] == '\0')
+		yyerror("\\0 can't be chained");
+	if (strlen(curr_chain) + 2 > STR_LEN)
+		yyerror("Chain '%s' grows too long", curr_chain);
+	(void)strcat(curr_chain, tb);
+}
+;
+item :  CHAR {
+	if (__collate_char_pri_table[$1].prim)
+		yyerror("Char 0x%02x duplicated", $1);
+	__collate_char_pri_table[$1].prim = prim_pri++;
+}
+	| chain {
+	if ((__collate_chain_pri_table = realloc(__collate_chain_pri_table,
+	     sizeof(*__collate_chain_pri_table) * (chain_index + 1))) == NULL)
+		yyerror("can't grow chain table");
+	(void)memset(&__collate_chain_pri_table[chain_index], 0,
+		     sizeof(__collate_chain_pri_table[0]));
+	(void)strcpy(__collate_chain_pri_table[chain_index].str, curr_chain);
+	__collate_chain_pri_table[chain_index].prim = prim_pri++;
+	chain_index++;
+}
+	| CHAR RANGE CHAR {
+	u_int i;
+
+	if ($3 <= $1)
+		yyerror("Illegal range 0x%02x -- 0x%02x", $1, $3);
+
+	for (i = $1; i <= $3; i++) {
+		if (__collate_char_pri_table[(u_char)i].prim)
+			yyerror("Char 0x%02x duplicated", (u_char)i);
+		__collate_char_pri_table[(u_char)i].prim = prim_pri++;
+	}
+}
+	| '{' prim_order_list '}' {
+	prim_pri++;
+}
+	| '(' sec_order_list ')' {
+	prim_pri++;
+	sec_pri = 1;
+}
+;
+prim_order_list : prim_sub_item
+	| prim_order_list ',' prim_sub_item 
+;
+sec_order_list : sec_sub_item
+	| sec_order_list ',' sec_sub_item 
+;
+prim_sub_item : CHAR {
+	if (__collate_char_pri_table[$1].prim)
+		yyerror("Char 0x%02x duplicated", $1);
+	__collate_char_pri_table[$1].prim = prim_pri;
+}
+	| CHAR RANGE CHAR {
+	u_int i;
+
+	if ($3 <= $1)
+		yyerror("Illegal range 0x%02x -- 0x%02x",
+			$1, $3);
+
+	for (i = $1; i <= $3; i++) {
+		if (__collate_char_pri_table[(u_char)i].prim)
+			yyerror("Char 0x%02x duplicated", (u_char)i);
+		__collate_char_pri_table[(u_char)i].prim = prim_pri;
+	}
+}
+	| chain {
+	if ((__collate_chain_pri_table = realloc(__collate_chain_pri_table,
+	     sizeof(*__collate_chain_pri_table) * (chain_index + 1))) == NULL)
+		yyerror("can't grow chain table");
+	(void)memset(&__collate_chain_pri_table[chain_index], 0,
+		     sizeof(__collate_chain_pri_table[0]));
+	(void)strcpy(__collate_chain_pri_table[chain_index].str, curr_chain);
+	__collate_chain_pri_table[chain_index].prim = prim_pri;
+	chain_index++;
+}
+;
+sec_sub_item : CHAR {
+	if (__collate_char_pri_table[$1].prim)
+		yyerror("Char 0x%02x duplicated", $1);
+	__collate_char_pri_table[$1].prim = prim_pri;
+	__collate_char_pri_table[$1].sec = sec_pri++;
+}
+	| CHAR RANGE CHAR {
+	u_int i;
+
+	if ($3 <= $1)
+		yyerror("Illegal range 0x%02x -- 0x%02x",
+			$1, $3);
+
+	for (i = $1; i <= $3; i++) {
+		if (__collate_char_pri_table[(u_char)i].prim)
+			yyerror("Char 0x%02x duplicated", (u_char)i);
+		__collate_char_pri_table[(u_char)i].prim = prim_pri;
+		__collate_char_pri_table[(u_char)i].sec = sec_pri++;
+	}
+}
+	| chain {
+	if ((__collate_chain_pri_table = realloc(__collate_chain_pri_table,
+	     sizeof(*__collate_chain_pri_table) * (chain_index + 1))) == NULL)
+		yyerror("can't grow chain table");
+	(void)memset(&__collate_chain_pri_table[chain_index], 0,
+		     sizeof(__collate_chain_pri_table[0]));
+	(void)strcpy(__collate_chain_pri_table[chain_index].str, curr_chain);
+	__collate_chain_pri_table[chain_index].prim = prim_pri;
+	__collate_chain_pri_table[chain_index].sec = sec_pri++;
+	chain_index++;
+}
+;
+%%
+int
+main(int ac, char **av)
+{
+	int ch;
+
+#ifdef COLLATE_DEBUG
+	while((ch = getopt(ac, av, ":do:I:")) != -1) {
+#else
+	while((ch = getopt(ac, av, ":o:I:")) != -1) {
+#endif
+		switch (ch)
+		{
+#ifdef COLLATE_DEBUG
+		  case 'd':
+			debug++;
+			break;
+#endif
+		  case 'o':
+			out_file = optarg;
+			break;
+
+		  case 'I':
+			strlcpy(map_name, optarg, sizeof(map_name));
+			break;
+
+		  default:
+			usage();
+		}
+	}
+	ac -= optind;
+	av += optind;
+	if (ac > 0) {
+		if ((yyin = fopen(*av, "r")) == NULL)
+			err(EX_UNAVAILABLE, "can't open source file %s", *av);
+	}
+	for (ch = 0; ch <= UCHAR_MAX; ch++)
+		__collate_substitute_table[ch][0] = ch;
+	yyparse();
+	return 0;
+}
+
+static void
+usage(void)
+{
+	fprintf(stderr, "usage: colldef [-I map_dir] [-o out_file] [filename]\n");
+	exit(EX_USAGE);
+}
+
+void
+yyerror(const char *fmt, ...)
+{
+	va_list ap;
+	char msg[128];
+
+	va_start(ap, fmt);
+	vsnprintf(msg, sizeof(msg), fmt, ap);
+	va_end(ap);
+	errx(EX_UNAVAILABLE, "%s near line %d", msg, line_no);
+}
+
+#ifdef COLLATE_DEBUG
+static void
+collate_print_tables(void)
+{
+	int i;
+
+	printf("Substitute table:\n");
+	for (i = 0; i < UCHAR_MAX + 1; i++)
+	    if (i != *__collate_substitute_table[i])
+		printf("\t'%c' --> \"%s\"\n", i,
+		       __collate_substitute_table[i]);
+	printf("Chain priority table:\n");
+	for (i = 0; i < chain_index - 1; i++)
+		printf("\t\"%s\" : %d %d\n",
+		    __collate_chain_pri_table[i].str,
+		    __collate_chain_pri_table[i].prim,
+		    __collate_chain_pri_table[i].sec);
+	printf("Char priority table:\n");
+	for (i = 0; i < UCHAR_MAX + 1; i++)
+		printf("\t'%c' : %d %d\n", i, __collate_char_pri_table[i].prim,
+		       __collate_char_pri_table[i].sec);
+}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/ctype/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,92 @@
+#
+# 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 version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+#
+
+PROG= mkctype
+CATEGORY=LC_CTYPE
+
+include ../Makefile.common
+
+CPPFLAGS += -I$(SRC)/lib/libc/port/locale -D_FILE_OFFSET_BITS=64
+YFLAGS	= -d -b mkctype_yacc
+LFLAGS	= -t
+
+OBJS = $(MACH)/mkctype_lex.o $(MACH)/mkctype_yacc.tab.o
+HDRS = ldef.h extern.h
+CLEANFILES =	mkctype_yacc.tab.c mkctype_yacc.tab.h mkctype_lex.c
+
+en_COMMON =	en_AU en_CA en_GB en_NZ en_US
+
+ASCII =		$(en_COMMON:%=%.US-ASCII)
+
+LATIN1 =	$(en_COMMON:%=%.ISO8859-1)
+
+LATIN15 =	$(en_COMMON:%=%.ISO8859-15)
+
+UTF8 =		$(en_COMMON:%=%.UTF-8) en_IE.UTF-8
+
+.KEEP_STATE:
+
+all: $(MACH)/$(PROG) $(MACHLOCALES)
+
+$(MACH)/$(PROG):	$(OBJS)
+	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
+	$(POST_PROCESS)
+
+$(ASCII:%=$(MACH)/%):	$(MACH)/US-ASCII
+	$(RM) $@
+	$(LN) $(MACH)/US-ASCII $@
+
+$(LATIN1:%=$(MACH)/%):	$(MACH)/ISO8859-1
+	$(RM) $@
+	$(LN) $(MACH)/ISO8859-1 $@
+
+$(LATIN15:%=$(MACH)/%):	$(MACH)/ISO8859-15
+	$(RM) $@
+	$(LN) $(MACH)/ISO8859-15 $@
+
+$(UTF8:%=$(MACH)/%):	$(MACH)/UTF-8
+	$(RM) $@
+	$(LN) $(MACH)/UTF-8 $@
+
+mkctype_lex.c:	mkctype_lex.l	mkctype_yacc.tab.h $(HDRS)
+	$(LEX) $(LFLAGS) mkctype_lex.l > $@
+
+mkctype_yacc.tab.c mkctype_yacc.tab.h:	mkctype_yacc.y $(HDRS)
+	$(YACC) $(YFLAGS) mkctype_yacc.y
+
+clean:
+	$(RM) $(OBJS) $(CLEANFILES)
+	$(RM) -r $(MACH)
+
+#
+# Lint does nothing for us, because yacc and lex outputs are themselves
+# not lint clean.  This is something that it would be good to address.
+#
+lint:
+
+#
+# Likewise, the yacc and lex outputs are not cstyle clean.
+#
+check:
+	$(CSTYLE) -cPp $(HDRS)
+
+
+#
+# Rules for building encoding data files.
+#
+$(MACH)/%: data/%.src $(MACH)/$(PROG)
+	$(MACH)/$(PROG) -o $@ $(@:$(MACH)/%=data/%.src)
+
+include ../Makefile.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/ctype/THIRDPARTYLICENSE	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,33 @@
+Copyright (c) 1993
+	The Regents of the University of California.  All rights reserved.
+
+This code is derived from software contributed to Berkeley by
+Paul Borman at Krystal Technologies.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+	This product includes software developed by the University of
+	California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/ctype/THIRDPARTYLICENSE.descrip	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,1 @@
+MKCTYPE UTILITY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/ctype/data/ISO8859-1.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,38 @@
+/*
+ * Standard LOCALE_CTYPE for the ISO 8859-1 Locale
+ */
+ENCODING	"NONE"
+VARIABLE        ISO 8859-1 Latin-1 character set
+
+#
+# This is a comment
+#
+ALPHA           'A' - 'Z' 'a' - 'z' 0xc0 - 0xd6 0xd8 - 0xf6 0xf8 - 0xff
+CONTROL		0x00 - 0x1f 0x7f - 0x9f
+DIGIT		'0' - '9'
+GRAPH		0x21 - 0x7e 0xa1 - 0xff
+LOWER           'a' - 'z' 0xdf - 0xf6 0xf8 - 0xff
+PUNCT           0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e 0xa1 - 0xbf 0xd7 0xf7
+SPACE           0x09 - 0x0d ' ' 0xa0
+UPPER           'A' - 'Z' 0xc0 - 0xd6 0xd8 - 0xde
+XDIGIT          '0' - '9' 'a' - 'f' 'A' - 'F'
+BLANK		' ' '\t' 0xa0
+PRINT		0x20 - 0x7e 0xa0 - 0xff
+
+MAPLOWER       	<'A' - 'Z' : 'a'>
+MAPLOWER       	<'a' - 'z' : 'a'>
+MAPLOWER        <0xc0 - 0xd6 : 0xe0>
+MAPLOWER        <0xd8 - 0xde : 0xf8>
+MAPLOWER        <0xdf - 0xf6 : 0xdf>
+MAPLOWER        <0xf8 - 0xff : 0xf8>
+
+MAPUPPER       	<'A' - 'Z' : 'A'>
+MAPUPPER       	<'a' - 'z' : 'A'>
+MAPUPPER        <0xc0 - 0xd6 : 0xc0>
+MAPUPPER        <0xd8 - 0xde : 0xd8>
+MAPUPPER        <0xe0 - 0xf6 : 0xc0>
+MAPUPPER        <0xf8 - 0xfe : 0xd8>
+
+TODIGIT       	<'0' - '9' : 0>
+TODIGIT       	<'A' - 'F' : 10>
+TODIGIT       	<'a' - 'f' : 10>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/ctype/data/ISO8859-15.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,46 @@
+/*
+ * Standard LOCALE_CTYPE for the ISO 8859-15 Locale
+ */
+ENCODING	"NONE"
+VARIABLE        ISO 8859-15 Latin-9 character set
+
+#
+# This is a comment
+#
+ALPHA		'A' - 'Z' 'a' - 'z' 0xa6 0xa8 0xb4 0xb8 0xbc - 0xbe 0xc0 - 0xd6 0xd8 - 0xf6 0xf8 - 0xff
+CONTROL		0x00 - 0x1f 0x7f - 0x9f
+DIGIT		'0' - '9'
+GRAPH		0x21 - 0x7e 0xa1 - 0xff
+LOWER		'a' - 'z' 0xa8 0xb8 0xbd 0xdf - 0xf6 0xf8 - 0xff
+PUNCT		0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e 0xa1 - 0xa5 0xa7 0xa9 - 0xb3 0xb5 - 0xb7 0xb9 - 0xbb 0xbf 0xd7 0xf7
+SPACE		0x09 - 0x0d ' ' 0xa0
+UPPER		'A' - 'Z' 0xa6 0xb4 0xbc 0xbe 0xc0 - 0xd6 0xd8 - 0xde
+XDIGIT		'0' - '9' 'a' - 'f' 'A' - 'F'
+BLANK		' ' '\t' 0xa0
+PRINT		0x20 - 0x7e 0xa0 - 0xff
+
+MAPLOWER	<'A' - 'Z' : 'a'>
+MAPLOWER	<'a' - 'z' : 'a'>
+MAPLOWER	<0xa6 - 0xa6 : 0xa8>
+MAPLOWER	<0xb4 - 0xb4 : 0xb8>
+MAPLOWER	<0xbc - 0xbc : 0xbd>
+MAPLOWER	<0xbe - 0xbe : 0xff>
+MAPLOWER	<0xc0 - 0xd6 : 0xe0>
+MAPLOWER	<0xd8 - 0xde : 0xf8>
+MAPLOWER	<0xdf - 0xf6 : 0xdf>
+MAPLOWER	<0xf8 - 0xff : 0xf8>
+
+MAPUPPER	<'A' - 'Z' : 'A'>
+MAPUPPER	<'a' - 'z' : 'A'>
+MAPUPPER	<0xa8 - 0xa8 : 0xa6>
+MAPUPPER	<0xb8 - 0xb8 : 0xb4>
+MAPUPPER	<0xbd - 0xbd : 0xbc>
+MAPUPPER	<0xc0 - 0xd6 : 0xc0>
+MAPUPPER	<0xd8 - 0xde : 0xd8>
+MAPUPPER	<0xe0 - 0xf6 : 0xc0>
+MAPUPPER	<0xf8 - 0xfe : 0xd8>
+MAPUPPER	<0xff - 0xff : 0xbe>
+
+TODIGIT		<'0' - '9' : 0>
+TODIGIT		<'A' - 'F' : 10>
+TODIGIT		<'a' - 'f' : 10>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/ctype/data/US-ASCII.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,27 @@
+/*
+ * Standard LOCALE_CTYPE for the US-ASCII Locale
+ */
+ENCODING        "ASCII"
+VARIABLE        Strict 7bit US-ASCII locale
+
+ALPHA		'A' - 'Z' 'a' - 'z'
+CONTROL		0x00 - 0x1f 0x7f
+DIGIT		'0' - '9'
+GRAPH		0x21 - 0x7e
+LOWER		'a' - 'z'
+PUNCT		0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e
+SPACE		0x09 - 0x0d 0x20
+UPPER		'A' - 'Z'
+XDIGIT          '0' - '9' 'a' - 'f' 'A' - 'F'
+BLANK		' ' '\t'
+PRINT		0x20 - 0x7e
+
+MAPLOWER       	<'A' - 'Z' : 'a'>
+MAPLOWER       	<'a' - 'z' : 'a'>
+
+MAPUPPER       	<'A' - 'Z' : 'A'>
+MAPUPPER       	<'a' - 'z' : 'A'>
+
+TODIGIT       	<'0' - '9' : 0>
+TODIGIT       	<'A' - 'F' : 10>
+TODIGIT       	<'a' - 'f' : 10>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/ctype/data/UTF-8.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,2398 @@
+/*
+ * Unicode 3.2 ctypes table
+ *
+ * Generated by Hye-Shik Chang <perky@FreeBSD.org>
+ *
+ * WARNING: UCS-4 used here as the internal representation, not UTF-8.
+ * See lib/libc/locale/utf8.c.
+ */
+
+/*
+ * UCD(Unicode Character Database) Terms of Use
+ *
+ * Disclaimer
+ *
+ * The Unicode Character Database is provided as is by Unicode, Inc. No claims
+ * are made as to fitness for any particular purpose. No warranties of any kind
+ * are expressed or implied. The recipient agrees to determine applicability of
+ * information provided. If this file has been purchased on magnetic or optical
+ * media from Unicode, Inc., the sole remedy for any claim will be exchange of
+ * defective media within 90 days of receipt.
+ *
+ * This disclaimer is applicable for all other data files accompanying the
+ * Unicode Character Database, some of which have been compiled by the Unicode
+ * Consortium, and some of which have been supplied by other sources.
+ *
+ * Limitations on Rights to Redistribute This Data
+ *
+ * Recipient is granted the right to make copies in any form for internal
+ * distribution and to freely use the information supplied in the creation of
+ * products supporting the UnicodeTM Standard. The files in the Unicode
+ * Character Database can be redistributed to third parties or other
+ * organizations (whether for profit or not) as long as this notice and the
+ * disclaimer notice are retained. Information can be extracted from these
+ * files and used in documentation or programs, as long as there is an
+ * accompanying notice indicating the source.
+ */
+
+ENCODING	"UTF-8"
+VARIABLE	Unicode 3.2 Character Types
+
+
+/*
+ * U+0000 - U+007F : Basic Latin
+ */
+
+ALPHA     'A' - 'Z'  'a' - 'z'
+CONTROL   0x0000 - 0x001f  0x007f
+DIGIT     '0' - '9'
+GRAPH     0x0021 - 0x007e
+LOWER     'a' - 'z'
+PUNCT     0x0021 - 0x002f  0x003a - 0x0040  0x005b - 0x0060  0x007b - 0x007e
+SPACE     0x0009 - 0x000d  0x0020
+UPPER     'A' - 'Z'
+XDIGIT    '0' - '9'  'A' - 'F'  'a' - 'f'
+BLANK     0x0009  0x000b  0x0020
+PRINT     0x0020 - 0x007e
+SWIDTH1   0x0020 - 0x007e
+
+MAPUPPER  < 'a' - 'z' : 'A' >
+MAPLOWER  < 'A' - 'Z' : 'a' >
+TODIGIT   < '0' - '9' : 0x0000 >
+TODIGIT   < 'A' - 'F' : 10 > < 'a' - 'f' : 10 >
+
+
+/*
+ * U+0080 - U+00FF : Latin-1 Supplement
+ */
+
+ALPHA     0x00aa  0x00b5  0x00ba  0x00c0 - 0x00d6  0x00d8 - 0x00f6
+ALPHA     0x00f8 - 0x00ff
+CONTROL   0x0080 - 0x009f
+GRAPH     0x00a1 - 0x00ff
+LOWER     0x00aa  0x00b5  0x00ba  0x00df - 0x00f6  0x00f8 - 0x00ff
+PUNCT     0x00a1 - 0x00a9  0x00ab - 0x00b1  0x00b4  0x00b6 - 0x00b8
+PUNCT     0x00bb  0x00bf  0x00d7  0x00f7
+SPACE     0x0085  0x00a0
+UPPER     0x00c0 - 0x00d6  0x00d8 - 0x00de
+BLANK     0x00a0
+PRINT     0x00a0 - 0x00ff
+SPECIAL   0x00b2  0x00b3  0x00b9  0x00bc - 0x00be
+SWIDTH1   0x00a0 - 0x00ff
+
+MAPUPPER  < 0x00b5 0x039c >
+MAPUPPER  < 0x00e0 - 0x00f6 : 0x00c0 >
+MAPUPPER  < 0x00f8 - 0x00fe : 0x00d8 >
+MAPUPPER  < 0x00ff 0x0178 >
+MAPLOWER  < 0x00c0 - 0x00d6 : 0x00e0 >
+MAPLOWER  < 0x00d8 - 0x00de : 0x00f8 >
+
+
+/*
+ * U+0100 - U+017F : Latin Extended-A
+ */
+
+ALPHA     0x0100 - 0x017f
+GRAPH     0x0100 - 0x017f
+LOWER     0x0101  0x0103  0x0105  0x0107  0x0109  0x010b  0x010d
+LOWER     0x010f  0x0111  0x0113  0x0115  0x0117  0x0119  0x011b
+LOWER     0x011d  0x011f  0x0121  0x0123  0x0125  0x0127  0x0129
+LOWER     0x012b  0x012d  0x012f  0x0131  0x0133  0x0135  0x0137  0x0138
+LOWER     0x013a  0x013c  0x013e  0x0140  0x0142  0x0144  0x0146
+LOWER     0x0148  0x0149  0x014b  0x014d  0x014f  0x0151  0x0153
+LOWER     0x0155  0x0157  0x0159  0x015b  0x015d  0x015f  0x0161
+LOWER     0x0163  0x0165  0x0167  0x0169  0x016b  0x016d  0x016f
+LOWER     0x0171  0x0173  0x0175  0x0177  0x017a  0x017c  0x017e  0x017f
+UPPER     0x0100  0x0102  0x0104  0x0106  0x0108  0x010a  0x010c
+UPPER     0x010e  0x0110  0x0112  0x0114  0x0116  0x0118  0x011a
+UPPER     0x011c  0x011e  0x0120  0x0122  0x0124  0x0126  0x0128
+UPPER     0x012a  0x012c  0x012e  0x0130  0x0132  0x0134  0x0136
+UPPER     0x0139  0x013b  0x013d  0x013f  0x0141  0x0143  0x0145
+UPPER     0x0147  0x014a  0x014c  0x014e  0x0150  0x0152  0x0154
+UPPER     0x0156  0x0158  0x015a  0x015c  0x015e  0x0160  0x0162
+UPPER     0x0164  0x0166  0x0168  0x016a  0x016c  0x016e  0x0170
+UPPER     0x0172  0x0174  0x0176  0x0178  0x0179  0x017b  0x017d
+PRINT     0x0100 - 0x017f
+SWIDTH1   0x0100 - 0x017f
+
+MAPUPPER  < 0x0101 0x0100 >
+MAPUPPER  < 0x0103 0x0102 >
+MAPUPPER  < 0x0105 0x0104 >
+MAPUPPER  < 0x0107 0x0106 >
+MAPUPPER  < 0x0109 0x0108 >
+MAPUPPER  < 0x010b 0x010a >
+MAPUPPER  < 0x010d 0x010c >
+MAPUPPER  < 0x010f 0x010e >
+MAPUPPER  < 0x0111 0x0110 >
+MAPUPPER  < 0x0113 0x0112 >
+MAPUPPER  < 0x0115 0x0114 >
+MAPUPPER  < 0x0117 0x0116 >
+MAPUPPER  < 0x0119 0x0118 >
+MAPUPPER  < 0x011b 0x011a >
+MAPUPPER  < 0x011d 0x011c >
+MAPUPPER  < 0x011f 0x011e >
+MAPUPPER  < 0x0121 0x0120 >
+MAPUPPER  < 0x0123 0x0122 >
+MAPUPPER  < 0x0125 0x0124 >
+MAPUPPER  < 0x0127 0x0126 >
+MAPUPPER  < 0x0129 0x0128 >
+MAPUPPER  < 0x012b 0x012a >
+MAPUPPER  < 0x012d 0x012c >
+MAPUPPER  < 0x012f 0x012e >
+MAPUPPER  < 0x0131 'I' >
+MAPUPPER  < 0x0133 0x0132 >
+MAPUPPER  < 0x0135 0x0134 >
+MAPUPPER  < 0x0137 0x0136 >
+MAPUPPER  < 0x013a 0x0139 >
+MAPUPPER  < 0x013c 0x013b >
+MAPUPPER  < 0x013e 0x013d >
+MAPUPPER  < 0x0140 0x013f >
+MAPUPPER  < 0x0142 0x0141 >
+MAPUPPER  < 0x0144 0x0143 >
+MAPUPPER  < 0x0146 0x0145 >
+MAPUPPER  < 0x0148 0x0147 >
+MAPUPPER  < 0x014b 0x014a >
+MAPUPPER  < 0x014d 0x014c >
+MAPUPPER  < 0x014f 0x014e >
+MAPUPPER  < 0x0151 0x0150 >
+MAPUPPER  < 0x0153 0x0152 >
+MAPUPPER  < 0x0155 0x0154 >
+MAPUPPER  < 0x0157 0x0156 >
+MAPUPPER  < 0x0159 0x0158 >
+MAPUPPER  < 0x015b 0x015a >
+MAPUPPER  < 0x015d 0x015c >
+MAPUPPER  < 0x015f 0x015e >
+MAPUPPER  < 0x0161 0x0160 >
+MAPUPPER  < 0x0163 0x0162 >
+MAPUPPER  < 0x0165 0x0164 >
+MAPUPPER  < 0x0167 0x0166 >
+MAPUPPER  < 0x0169 0x0168 >
+MAPUPPER  < 0x016b 0x016a >
+MAPUPPER  < 0x016d 0x016c >
+MAPUPPER  < 0x016f 0x016e >
+MAPUPPER  < 0x0171 0x0170 >
+MAPUPPER  < 0x0173 0x0172 >
+MAPUPPER  < 0x0175 0x0174 >
+MAPUPPER  < 0x0177 0x0176 >
+MAPUPPER  < 0x017a 0x0179 >
+MAPUPPER  < 0x017c 0x017b >
+MAPUPPER  < 0x017e 0x017d >
+MAPUPPER  < 0x017f 'S' >
+MAPLOWER  < 0x0100 0x0101 >
+MAPLOWER  < 0x0102 0x0103 >
+MAPLOWER  < 0x0104 0x0105 >
+MAPLOWER  < 0x0106 0x0107 >
+MAPLOWER  < 0x0108 0x0109 >
+MAPLOWER  < 0x010a 0x010b >
+MAPLOWER  < 0x010c 0x010d >
+MAPLOWER  < 0x010e 0x010f >
+MAPLOWER  < 0x0110 0x0111 >
+MAPLOWER  < 0x0112 0x0113 >
+MAPLOWER  < 0x0114 0x0115 >
+MAPLOWER  < 0x0116 0x0117 >
+MAPLOWER  < 0x0118 0x0119 >
+MAPLOWER  < 0x011a 0x011b >
+MAPLOWER  < 0x011c 0x011d >
+MAPLOWER  < 0x011e 0x011f >
+MAPLOWER  < 0x0120 0x0121 >
+MAPLOWER  < 0x0122 0x0123 >
+MAPLOWER  < 0x0124 0x0125 >
+MAPLOWER  < 0x0126 0x0127 >
+MAPLOWER  < 0x0128 0x0129 >
+MAPLOWER  < 0x012a 0x012b >
+MAPLOWER  < 0x012c 0x012d >
+MAPLOWER  < 0x012e 0x012f >
+MAPLOWER  < 0x0130 'i' >
+MAPLOWER  < 0x0132 0x0133 >
+MAPLOWER  < 0x0134 0x0135 >
+MAPLOWER  < 0x0136 0x0137 >
+MAPLOWER  < 0x0139 0x013a >
+MAPLOWER  < 0x013b 0x013c >
+MAPLOWER  < 0x013d 0x013e >
+MAPLOWER  < 0x013f 0x0140 >
+MAPLOWER  < 0x0141 0x0142 >
+MAPLOWER  < 0x0143 0x0144 >
+MAPLOWER  < 0x0145 0x0146 >
+MAPLOWER  < 0x0147 0x0148 >
+MAPLOWER  < 0x014a 0x014b >
+MAPLOWER  < 0x014c 0x014d >
+MAPLOWER  < 0x014e 0x014f >
+MAPLOWER  < 0x0150 0x0151 >
+MAPLOWER  < 0x0152 0x0153 >
+MAPLOWER  < 0x0154 0x0155 >
+MAPLOWER  < 0x0156 0x0157 >
+MAPLOWER  < 0x0158 0x0159 >
+MAPLOWER  < 0x015a 0x015b >
+MAPLOWER  < 0x015c 0x015d >
+MAPLOWER  < 0x015e 0x015f >
+MAPLOWER  < 0x0160 0x0161 >
+MAPLOWER  < 0x0162 0x0163 >
+MAPLOWER  < 0x0164 0x0165 >
+MAPLOWER  < 0x0166 0x0167 >
+MAPLOWER  < 0x0168 0x0169 >
+MAPLOWER  < 0x016a 0x016b >
+MAPLOWER  < 0x016c 0x016d >
+MAPLOWER  < 0x016e 0x016f >
+MAPLOWER  < 0x0170 0x0171 >
+MAPLOWER  < 0x0172 0x0173 >
+MAPLOWER  < 0x0174 0x0175 >
+MAPLOWER  < 0x0176 0x0177 >
+MAPLOWER  < 0x0178 0x00ff >
+MAPLOWER  < 0x0179 0x017a >
+MAPLOWER  < 0x017b 0x017c >
+MAPLOWER  < 0x017d 0x017e >
+
+
+/*
+ * U+0180 - U+024F : Latin Extended-B
+ */
+
+ALPHA     0x0180 - 0x01ba  0x01bc - 0x01bf  0x01c4 - 0x0220  0x0222 - 0x0233
+GRAPH     0x0180 - 0x0220  0x0222 - 0x0233
+LOWER     0x0180  0x0183  0x0185  0x0188  0x018c  0x018d  0x0192
+LOWER     0x0195  0x0199 - 0x019b  0x019e  0x01a1  0x01a3  0x01a5
+LOWER     0x01a8  0x01aa  0x01ab  0x01ad  0x01b0  0x01b4  0x01b6
+LOWER     0x01b9  0x01ba  0x01bd - 0x01bf  0x01c6  0x01c9  0x01cc
+LOWER     0x01ce  0x01d0  0x01d2  0x01d4  0x01d6  0x01d8  0x01da
+LOWER     0x01dc  0x01dd  0x01df  0x01e1  0x01e3  0x01e5  0x01e7
+LOWER     0x01e9  0x01eb  0x01ed  0x01ef  0x01f0  0x01f3  0x01f5
+LOWER     0x01f9  0x01fb  0x01fd  0x01ff  0x0201  0x0203  0x0205
+LOWER     0x0207  0x0209  0x020b  0x020d  0x020f  0x0211  0x0213
+LOWER     0x0215  0x0217  0x0219  0x021b  0x021d  0x021f  0x0223
+LOWER     0x0225  0x0227  0x0229  0x022b  0x022d  0x022f  0x0231
+LOWER     0x0233
+UPPER     0x0181  0x0182  0x0184  0x0186  0x0187  0x0189 - 0x018b
+UPPER     0x018e - 0x0191  0x0193  0x0194  0x0196 - 0x0198  0x019c  0x019d
+UPPER     0x019f  0x01a0  0x01a2  0x01a4  0x01a6  0x01a7  0x01a9
+UPPER     0x01ac  0x01ae  0x01af  0x01b1 - 0x01b3  0x01b5  0x01b7  0x01b8
+UPPER     0x01bc  0x01c4  0x01c7  0x01ca  0x01cd  0x01cf  0x01d1
+UPPER     0x01d3  0x01d5  0x01d7  0x01d9  0x01db  0x01de  0x01e0
+UPPER     0x01e2  0x01e4  0x01e6  0x01e8  0x01ea  0x01ec  0x01ee
+UPPER     0x01f1  0x01f4  0x01f6 - 0x01f8  0x01fa  0x01fc  0x01fe
+UPPER     0x0200  0x0202  0x0204  0x0206  0x0208  0x020a  0x020c
+UPPER     0x020e  0x0210  0x0212  0x0214  0x0216  0x0218  0x021a
+UPPER     0x021c  0x021e  0x0220  0x0222  0x0224  0x0226  0x0228
+UPPER     0x022a  0x022c  0x022e  0x0230  0x0232
+PRINT     0x0180 - 0x0220  0x0222 - 0x0233
+SWIDTH1   0x0180 - 0x0220  0x0222 - 0x0233
+
+MAPUPPER  < 0x0183 0x0182 >
+MAPUPPER  < 0x0185 0x0184 >
+MAPUPPER  < 0x0188 0x0187 >
+MAPUPPER  < 0x018c 0x018b >
+MAPUPPER  < 0x0192 0x0191 >
+MAPUPPER  < 0x0195 0x01f6 >
+MAPUPPER  < 0x0199 0x0198 >
+MAPUPPER  < 0x019e 0x0220 >
+MAPUPPER  < 0x01a1 0x01a0 >
+MAPUPPER  < 0x01a3 0x01a2 >
+MAPUPPER  < 0x01a5 0x01a4 >
+MAPUPPER  < 0x01a8 0x01a7 >
+MAPUPPER  < 0x01ad 0x01ac >
+MAPUPPER  < 0x01b0 0x01af >
+MAPUPPER  < 0x01b4 0x01b3 >
+MAPUPPER  < 0x01b6 0x01b5 >
+MAPUPPER  < 0x01b9 0x01b8 >
+MAPUPPER  < 0x01bd 0x01bc >
+MAPUPPER  < 0x01bf 0x01f7 >
+MAPUPPER  < 0x01c5 0x01c4 >
+MAPUPPER  < 0x01c6 0x01c4 >
+MAPUPPER  < 0x01c8 0x01c7 >
+MAPUPPER  < 0x01c9 0x01c7 >
+MAPUPPER  < 0x01cb 0x01ca >
+MAPUPPER  < 0x01cc 0x01ca >
+MAPUPPER  < 0x01ce 0x01cd >
+MAPUPPER  < 0x01d0 0x01cf >
+MAPUPPER  < 0x01d2 0x01d1 >
+MAPUPPER  < 0x01d4 0x01d3 >
+MAPUPPER  < 0x01d6 0x01d5 >
+MAPUPPER  < 0x01d8 0x01d7 >
+MAPUPPER  < 0x01da 0x01d9 >
+MAPUPPER  < 0x01dc 0x01db >
+MAPUPPER  < 0x01dd 0x018e >
+MAPUPPER  < 0x01df 0x01de >
+MAPUPPER  < 0x01e1 0x01e0 >
+MAPUPPER  < 0x01e3 0x01e2 >
+MAPUPPER  < 0x01e5 0x01e4 >
+MAPUPPER  < 0x01e7 0x01e6 >
+MAPUPPER  < 0x01e9 0x01e8 >
+MAPUPPER  < 0x01eb 0x01ea >
+MAPUPPER  < 0x01ed 0x01ec >
+MAPUPPER  < 0x01ef 0x01ee >
+MAPUPPER  < 0x01f2 0x01f1 >
+MAPUPPER  < 0x01f3 0x01f1 >
+MAPUPPER  < 0x01f5 0x01f4 >
+MAPUPPER  < 0x01f9 0x01f8 >
+MAPUPPER  < 0x01fb 0x01fa >
+MAPUPPER  < 0x01fd 0x01fc >
+MAPUPPER  < 0x01ff 0x01fe >
+MAPUPPER  < 0x0201 0x0200 >
+MAPUPPER  < 0x0203 0x0202 >
+MAPUPPER  < 0x0205 0x0204 >
+MAPUPPER  < 0x0207 0x0206 >
+MAPUPPER  < 0x0209 0x0208 >
+MAPUPPER  < 0x020b 0x020a >
+MAPUPPER  < 0x020d 0x020c >
+MAPUPPER  < 0x020f 0x020e >
+MAPUPPER  < 0x0211 0x0210 >
+MAPUPPER  < 0x0213 0x0212 >
+MAPUPPER  < 0x0215 0x0214 >
+MAPUPPER  < 0x0217 0x0216 >
+MAPUPPER  < 0x0219 0x0218 >
+MAPUPPER  < 0x021b 0x021a >
+MAPUPPER  < 0x021d 0x021c >
+MAPUPPER  < 0x021f 0x021e >
+MAPUPPER  < 0x0223 0x0222 >
+MAPUPPER  < 0x0225 0x0224 >
+MAPUPPER  < 0x0227 0x0226 >
+MAPUPPER  < 0x0229 0x0228 >
+MAPUPPER  < 0x022b 0x022a >
+MAPUPPER  < 0x022d 0x022c >
+MAPUPPER  < 0x022f 0x022e >
+MAPUPPER  < 0x0231 0x0230 >
+MAPUPPER  < 0x0233 0x0232 >
+MAPLOWER  < 0x0181 0x0253 >
+MAPLOWER  < 0x0182 0x0183 >
+MAPLOWER  < 0x0184 0x0185 >
+MAPLOWER  < 0x0186 0x0254 >
+MAPLOWER  < 0x0187 0x0188 >
+MAPLOWER  < 0x0189 - 0x018a : 0x0256 >
+MAPLOWER  < 0x018b 0x018c >
+MAPLOWER  < 0x018e 0x01dd >
+MAPLOWER  < 0x018f 0x0259 >
+MAPLOWER  < 0x0190 0x025b >
+MAPLOWER  < 0x0191 0x0192 >
+MAPLOWER  < 0x0193 0x0260 >
+MAPLOWER  < 0x0194 0x0263 >
+MAPLOWER  < 0x0196 0x0269 >
+MAPLOWER  < 0x0197 0x0268 >
+MAPLOWER  < 0x0198 0x0199 >
+MAPLOWER  < 0x019c 0x026f >
+MAPLOWER  < 0x019d 0x0272 >
+MAPLOWER  < 0x019f 0x0275 >
+MAPLOWER  < 0x01a0 0x01a1 >
+MAPLOWER  < 0x01a2 0x01a3 >
+MAPLOWER  < 0x01a4 0x01a5 >
+MAPLOWER  < 0x01a6 0x0280 >
+MAPLOWER  < 0x01a7 0x01a8 >
+MAPLOWER  < 0x01a9 0x0283 >
+MAPLOWER  < 0x01ac 0x01ad >
+MAPLOWER  < 0x01ae 0x0288 >
+MAPLOWER  < 0x01af 0x01b0 >
+MAPLOWER  < 0x01b1 - 0x01b2 : 0x028a >
+MAPLOWER  < 0x01b3 0x01b4 >
+MAPLOWER  < 0x01b5 0x01b6 >
+MAPLOWER  < 0x01b7 0x0292 >
+MAPLOWER  < 0x01b8 0x01b9 >
+MAPLOWER  < 0x01bc 0x01bd >
+MAPLOWER  < 0x01c4 0x01c6 >
+MAPLOWER  < 0x01c5 0x01c6 >
+MAPLOWER  < 0x01c7 0x01c9 >
+MAPLOWER  < 0x01c8 0x01c9 >
+MAPLOWER  < 0x01ca 0x01cc >
+MAPLOWER  < 0x01cb 0x01cc >
+MAPLOWER  < 0x01cd 0x01ce >
+MAPLOWER  < 0x01cf 0x01d0 >
+MAPLOWER  < 0x01d1 0x01d2 >
+MAPLOWER  < 0x01d3 0x01d4 >
+MAPLOWER  < 0x01d5 0x01d6 >
+MAPLOWER  < 0x01d7 0x01d8 >
+MAPLOWER  < 0x01d9 0x01da >
+MAPLOWER  < 0x01db 0x01dc >
+MAPLOWER  < 0x01de 0x01df >
+MAPLOWER  < 0x01e0 0x01e1 >
+MAPLOWER  < 0x01e2 0x01e3 >
+MAPLOWER  < 0x01e4 0x01e5 >
+MAPLOWER  < 0x01e6 0x01e7 >
+MAPLOWER  < 0x01e8 0x01e9 >
+MAPLOWER  < 0x01ea 0x01eb >
+MAPLOWER  < 0x01ec 0x01ed >
+MAPLOWER  < 0x01ee 0x01ef >
+MAPLOWER  < 0x01f1 0x01f3 >
+MAPLOWER  < 0x01f2 0x01f3 >
+MAPLOWER  < 0x01f4 0x01f5 >
+MAPLOWER  < 0x01f6 0x0195 >
+MAPLOWER  < 0x01f7 0x01bf >
+MAPLOWER  < 0x01f8 0x01f9 >
+MAPLOWER  < 0x01fa 0x01fb >
+MAPLOWER  < 0x01fc 0x01fd >
+MAPLOWER  < 0x01fe 0x01ff >
+MAPLOWER  < 0x0200 0x0201 >
+MAPLOWER  < 0x0202 0x0203 >
+MAPLOWER  < 0x0204 0x0205 >
+MAPLOWER  < 0x0206 0x0207 >
+MAPLOWER  < 0x0208 0x0209 >
+MAPLOWER  < 0x020a 0x020b >
+MAPLOWER  < 0x020c 0x020d >
+MAPLOWER  < 0x020e 0x020f >
+MAPLOWER  < 0x0210 0x0211 >
+MAPLOWER  < 0x0212 0x0213 >
+MAPLOWER  < 0x0214 0x0215 >
+MAPLOWER  < 0x0216 0x0217 >
+MAPLOWER  < 0x0218 0x0219 >
+MAPLOWER  < 0x021a 0x021b >
+MAPLOWER  < 0x021c 0x021d >
+MAPLOWER  < 0x021e 0x021f >
+MAPLOWER  < 0x0220 0x019e >
+MAPLOWER  < 0x0222 0x0223 >
+MAPLOWER  < 0x0224 0x0225 >
+MAPLOWER  < 0x0226 0x0227 >
+MAPLOWER  < 0x0228 0x0229 >
+MAPLOWER  < 0x022a 0x022b >
+MAPLOWER  < 0x022c 0x022d >
+MAPLOWER  < 0x022e 0x022f >
+MAPLOWER  < 0x0230 0x0231 >
+MAPLOWER  < 0x0232 0x0233 >
+
+
+/*
+ * U+0250 - U+02AF : IPA Extensions
+ */
+
+ALPHA     0x0250 - 0x02ad
+GRAPH     0x0250 - 0x02ad
+LOWER     0x0250 - 0x02ad
+PRINT     0x0250 - 0x02ad
+SWIDTH1   0x0250 - 0x02ad
+
+MAPUPPER  < 0x0253 0x0181 >
+MAPUPPER  < 0x0254 0x0186 >
+MAPUPPER  < 0x0256 - 0x0257 : 0x0189 >
+MAPUPPER  < 0x0259 0x018f >
+MAPUPPER  < 0x025b 0x0190 >
+MAPUPPER  < 0x0260 0x0193 >
+MAPUPPER  < 0x0263 0x0194 >
+MAPUPPER  < 0x0268 0x0197 >
+MAPUPPER  < 0x0269 0x0196 >
+MAPUPPER  < 0x026f 0x019c >
+MAPUPPER  < 0x0272 0x019d >
+MAPUPPER  < 0x0275 0x019f >
+MAPUPPER  < 0x0280 0x01a6 >
+MAPUPPER  < 0x0283 0x01a9 >
+MAPUPPER  < 0x0288 0x01ae >
+MAPUPPER  < 0x028a - 0x028b : 0x01b1 >
+MAPUPPER  < 0x0292 0x01b7 >
+
+
+/*
+ * U+02B0 - U+02FF : Spacing Modifier Letters
+ */
+
+GRAPH     0x02b0 - 0x02ee
+PUNCT     0x02b9  0x02ba  0x02c2 - 0x02cf  0x02d2 - 0x02df  0x02e5 - 0x02ed
+PRINT     0x02b0 - 0x02ee
+SWIDTH1   0x02b0 - 0x02ee
+
+
+/*
+ * U+0300 - U+036F : Combining Diacritical Marks
+ */
+
+GRAPH     0x0300 - 0x034E  0x0350 - 0x036f
+PRINT     0x0300 - 0x034E  0x0350 - 0x036f
+SWIDTH0   0x0300 - 0x034E  0x0350 - 0x036f
+
+MAPUPPER  < 0x0345 0x0399 >
+
+
+/*
+ * U+0370 - U+03FF : Greek and Coptic
+ */
+
+ALPHA     0x0386  0x0388 - 0x038a  0x038c  0x038e - 0x03a1  0x03a3 - 0x03ce
+ALPHA     0x03d0 - 0x03f5
+GRAPH     0x0374  0x0375  0x037a  0x037e  0x0384 - 0x038a  0x038c
+GRAPH     0x038e - 0x03a1  0x03a3 - 0x03ce  0x03d0 - 0x03f6
+LOWER     0x0390  0x03ac - 0x03ce  0x03d0  0x03d1  0x03d5 - 0x03d7
+LOWER     0x03d9  0x03db  0x03dd  0x03df  0x03e1  0x03e3  0x03e5
+LOWER     0x03e7  0x03e9  0x03eb  0x03ed  0x03ef - 0x03f3  0x03f5
+PUNCT     0x0374  0x0375  0x037e  0x0384  0x0385  0x0387  0x03f6
+UPPER     0x0386  0x0388 - 0x038a  0x038c  0x038e  0x038f  0x0391 - 0x03a1
+UPPER     0x03a3 - 0x03ab  0x03d2 - 0x03d4  0x03d8  0x03da  0x03dc
+UPPER     0x03de  0x03e0  0x03e2  0x03e4  0x03e6  0x03e8  0x03ea
+UPPER     0x03ec  0x03ee  0x03f4
+PRINT     0x0374  0x0375  0x037a  0x037e  0x0384 - 0x038a  0x038c
+PRINT     0x038e - 0x03a1  0x03a3 - 0x03ce  0x03d0 - 0x03f6
+SWIDTH1   0x0374  0x0375  0x037a  0x037e  0x0384 - 0x038a  0x038c
+SWIDTH1   0x038e - 0x03a1  0x03a3 - 0x03ce  0x03d0 - 0x03f6
+
+MAPUPPER  < 0x03ac 0x0386 >
+MAPUPPER  < 0x03ad - 0x03af : 0x0388 >
+MAPUPPER  < 0x03b1 - 0x03c1 : 0x0391 >
+MAPUPPER  < 0x03c2 0x03a3 >
+MAPUPPER  < 0x03c3 - 0x03cb : 0x03a3 >
+MAPUPPER  < 0x03cc 0x038c >
+MAPUPPER  < 0x03cd - 0x03ce : 0x038e >
+MAPUPPER  < 0x03d0 0x0392 >
+MAPUPPER  < 0x03d1 0x0398 >
+MAPUPPER  < 0x03d5 0x03a6 >
+MAPUPPER  < 0x03d6 0x03a0 >
+MAPUPPER  < 0x03d9 0x03d8 >
+MAPUPPER  < 0x03db 0x03da >
+MAPUPPER  < 0x03dd 0x03dc >
+MAPUPPER  < 0x03df 0x03de >
+MAPUPPER  < 0x03e1 0x03e0 >
+MAPUPPER  < 0x03e3 0x03e2 >
+MAPUPPER  < 0x03e5 0x03e4 >
+MAPUPPER  < 0x03e7 0x03e6 >
+MAPUPPER  < 0x03e9 0x03e8 >
+MAPUPPER  < 0x03eb 0x03ea >
+MAPUPPER  < 0x03ed 0x03ec >
+MAPUPPER  < 0x03ef 0x03ee >
+MAPUPPER  < 0x03f0 0x039a >
+MAPUPPER  < 0x03f1 0x03a1 >
+MAPUPPER  < 0x03f2 0x03a3 >
+MAPUPPER  < 0x03f5 0x0395 >
+MAPLOWER  < 0x0386 0x03ac >
+MAPLOWER  < 0x0388 - 0x038a : 0x03ad >
+MAPLOWER  < 0x038c 0x03cc >
+MAPLOWER  < 0x038e - 0x038f : 0x03cd >
+MAPLOWER  < 0x0391 - 0x03a1 : 0x03b1 >
+MAPLOWER  < 0x03a3 - 0x03ab : 0x03c3 >
+MAPLOWER  < 0x03d8 0x03d9 >
+MAPLOWER  < 0x03da 0x03db >
+MAPLOWER  < 0x03dc 0x03dd >
+MAPLOWER  < 0x03de 0x03df >
+MAPLOWER  < 0x03e0 0x03e1 >
+MAPLOWER  < 0x03e2 0x03e3 >
+MAPLOWER  < 0x03e4 0x03e5 >
+MAPLOWER  < 0x03e6 0x03e7 >
+MAPLOWER  < 0x03e8 0x03e9 >
+MAPLOWER  < 0x03ea 0x03eb >
+MAPLOWER  < 0x03ec 0x03ed >
+MAPLOWER  < 0x03ee 0x03ef >
+MAPLOWER  < 0x03f4 0x03b8 >
+
+
+/*
+ * U+0400 - U+04FF : Cyrillic
+ */
+
+ALPHA     0x0400 - 0x0481  0x048a - 0x04ce  0x04d0 - 0x04f5  0x04f8  0x04f9
+GRAPH     0x0400 - 0x0486  0x0488 - 0x04ce  0x04d0 - 0x04f5  0x04f8  0x04f9
+LOWER     0x0430 - 0x045f  0x0461  0x0463  0x0465  0x0467  0x0469
+LOWER     0x046b  0x046d  0x046f  0x0471  0x0473  0x0475  0x0477
+LOWER     0x0479  0x047b  0x047d  0x047f  0x0481  0x048b  0x048d
+LOWER     0x048f  0x0491  0x0493  0x0495  0x0497  0x0499  0x049b
+LOWER     0x049d  0x049f  0x04a1  0x04a3  0x04a5  0x04a7  0x04a9
+LOWER     0x04ab  0x04ad  0x04af  0x04b1  0x04b3  0x04b5  0x04b7
+LOWER     0x04b9  0x04bb  0x04bd  0x04bf  0x04c2  0x04c4  0x04c6
+LOWER     0x04c8  0x04ca  0x04cc  0x04ce  0x04d1  0x04d3  0x04d5
+LOWER     0x04d7  0x04d9  0x04db  0x04dd  0x04df  0x04e1  0x04e3
+LOWER     0x04e5  0x04e7  0x04e9  0x04eb  0x04ed  0x04ef  0x04f1
+LOWER     0x04f3  0x04f5  0x04f7  0x04f9
+PUNCT     0x0482
+UPPER     0x0400 - 0x042f  0x0460  0x0462  0x0464  0x0466  0x0468
+UPPER     0x046a  0x046c  0x046e  0x0470  0x0472  0x0474  0x0476
+UPPER     0x0478  0x047a  0x047c  0x047e  0x0480  0x048a  0x048c
+UPPER     0x048e  0x0490  0x0492  0x0494  0x0496  0x0498  0x049a
+UPPER     0x049c  0x049e  0x04a0  0x04a2  0x04a4  0x04a6  0x04a8
+UPPER     0x04aa  0x04ac  0x04ae  0x04b0  0x04b2  0x04b4  0x04b6
+UPPER     0x04b8  0x04ba  0x04bc  0x04be  0x04c0  0x04c1  0x04c3
+UPPER     0x04c5  0x04c7  0x04c9  0x04cb  0x04cd  0x04d0  0x04d2
+UPPER     0x04d4  0x04d6  0x04d8  0x04da  0x04dc  0x04de  0x04e0
+UPPER     0x04e2  0x04e4  0x04e6  0x04e8  0x04ea  0x04ec  0x04ee
+UPPER     0x04f0  0x04f2  0x04f4  0x04f6  0x04f8
+PRINT     0x0400 - 0x0486  0x0488 - 0x04ce  0x04d0 - 0x04f9
+SWIDTH0   0x0483 - 0x0486  0x0488 - 0x0489
+SWIDTH1   0x0400 - 0x0482  0x048a - 0x04ce  0x04d0 - 0x04f9
+
+MAPUPPER  < 0x0430 - 0x044f : 0x0410 >
+MAPUPPER  < 0x0450 - 0x045f : 0x0400 >
+MAPUPPER  < 0x0461 0x0460 >
+MAPUPPER  < 0x0463 0x0462 >
+MAPUPPER  < 0x0465 0x0464 >
+MAPUPPER  < 0x0467 0x0466 >
+MAPUPPER  < 0x0469 0x0468 >
+MAPUPPER  < 0x046b 0x046a >
+MAPUPPER  < 0x046d 0x046c >
+MAPUPPER  < 0x046f 0x046e >
+MAPUPPER  < 0x0471 0x0470 >
+MAPUPPER  < 0x0473 0x0472 >
+MAPUPPER  < 0x0475 0x0474 >
+MAPUPPER  < 0x0477 0x0476 >
+MAPUPPER  < 0x0479 0x0478 >
+MAPUPPER  < 0x047b 0x047a >
+MAPUPPER  < 0x047d 0x047c >
+MAPUPPER  < 0x047f 0x047e >
+MAPUPPER  < 0x0481 0x0480 >
+MAPUPPER  < 0x048b 0x048a >
+MAPUPPER  < 0x048d 0x048c >
+MAPUPPER  < 0x048f 0x048e >
+MAPUPPER  < 0x0491 0x0490 >
+MAPUPPER  < 0x0493 0x0492 >
+MAPUPPER  < 0x0495 0x0494 >
+MAPUPPER  < 0x0497 0x0496 >
+MAPUPPER  < 0x0499 0x0498 >
+MAPUPPER  < 0x049b 0x049a >
+MAPUPPER  < 0x049d 0x049c >
+MAPUPPER  < 0x049f 0x049e >
+MAPUPPER  < 0x04a1 0x04a0 >
+MAPUPPER  < 0x04a3 0x04a2 >
+MAPUPPER  < 0x04a5 0x04a4 >
+MAPUPPER  < 0x04a7 0x04a6 >
+MAPUPPER  < 0x04a9 0x04a8 >
+MAPUPPER  < 0x04ab 0x04aa >
+MAPUPPER  < 0x04ad 0x04ac >
+MAPUPPER  < 0x04af 0x04ae >
+MAPUPPER  < 0x04b1 0x04b0 >
+MAPUPPER  < 0x04b3 0x04b2 >
+MAPUPPER  < 0x04b5 0x04b4 >
+MAPUPPER  < 0x04b7 0x04b6 >
+MAPUPPER  < 0x04b9 0x04b8 >
+MAPUPPER  < 0x04bb 0x04ba >
+MAPUPPER  < 0x04bd 0x04bc >
+MAPUPPER  < 0x04bf 0x04be >
+MAPUPPER  < 0x04c2 0x04c1 >
+MAPUPPER  < 0x04c4 0x04c3 >
+MAPUPPER  < 0x04c6 0x04c5 >
+MAPUPPER  < 0x04c8 0x04c7 >
+MAPUPPER  < 0x04ca 0x04c9 >
+MAPUPPER  < 0x04cc 0x04cb >
+MAPUPPER  < 0x04ce 0x04cd >
+MAPUPPER  < 0x04d1 0x04d0 >
+MAPUPPER  < 0x04d3 0x04d2 >
+MAPUPPER  < 0x04d5 0x04d4 >
+MAPUPPER  < 0x04d7 0x04d6 >
+MAPUPPER  < 0x04d9 0x04d8 >
+MAPUPPER  < 0x04db 0x04da >
+MAPUPPER  < 0x04dd 0x04dc >
+MAPUPPER  < 0x04df 0x04de >
+MAPUPPER  < 0x04e1 0x04e0 >
+MAPUPPER  < 0x04e3 0x04e2 >
+MAPUPPER  < 0x04e5 0x04e4 >
+MAPUPPER  < 0x04e7 0x04e6 >
+MAPUPPER  < 0x04e9 0x04e8 >
+MAPUPPER  < 0x04eb 0x04ea >
+MAPUPPER  < 0x04ed 0x04ec >
+MAPUPPER  < 0x04ef 0x04ee >
+MAPUPPER  < 0x04f1 0x04f0 >
+MAPUPPER  < 0x04f3 0x04f2 >
+MAPUPPER  < 0x04f5 0x04f4 >
+MAPUPPER  < 0x04f7 0x04f6 >
+MAPUPPER  < 0x04f9 0x04f8 >
+MAPLOWER  < 0x0400 - 0x040f : 0x0450 >
+MAPLOWER  < 0x0410 - 0x042f : 0x0430 >
+MAPLOWER  < 0x0460 0x0461 >
+MAPLOWER  < 0x0462 0x0463 >
+MAPLOWER  < 0x0464 0x0465 >
+MAPLOWER  < 0x0466 0x0467 >
+MAPLOWER  < 0x0468 0x0469 >
+MAPLOWER  < 0x046a 0x046b >
+MAPLOWER  < 0x046c 0x046d >
+MAPLOWER  < 0x046e 0x046f >
+MAPLOWER  < 0x0470 0x0471 >
+MAPLOWER  < 0x0472 0x0473 >
+MAPLOWER  < 0x0474 0x0475 >
+MAPLOWER  < 0x0476 0x0477 >
+MAPLOWER  < 0x0478 0x0479 >
+MAPLOWER  < 0x047a 0x047b >
+MAPLOWER  < 0x047c 0x047d >
+MAPLOWER  < 0x047e 0x047f >
+MAPLOWER  < 0x0480 0x0481 >
+MAPLOWER  < 0x048a 0x048b >
+MAPLOWER  < 0x048c 0x048d >
+MAPLOWER  < 0x048e 0x048f >
+MAPLOWER  < 0x0490 0x0491 >
+MAPLOWER  < 0x0492 0x0493 >
+MAPLOWER  < 0x0494 0x0495 >
+MAPLOWER  < 0x0496 0x0497 >
+MAPLOWER  < 0x0498 0x0499 >
+MAPLOWER  < 0x049a 0x049b >
+MAPLOWER  < 0x049c 0x049d >
+MAPLOWER  < 0x049e 0x049f >
+MAPLOWER  < 0x04a0 0x04a1 >
+MAPLOWER  < 0x04a2 0x04a3 >
+MAPLOWER  < 0x04a4 0x04a5 >
+MAPLOWER  < 0x04a6 0x04a7 >
+MAPLOWER  < 0x04a8 0x04a9 >
+MAPLOWER  < 0x04aa 0x04ab >
+MAPLOWER  < 0x04ac 0x04ad >
+MAPLOWER  < 0x04ae 0x04af >
+MAPLOWER  < 0x04b0 0x04b1 >
+MAPLOWER  < 0x04b2 0x04b3 >
+MAPLOWER  < 0x04b4 0x04b5 >
+MAPLOWER  < 0x04b6 0x04b7 >
+MAPLOWER  < 0x04b8 0x04b9 >
+MAPLOWER  < 0x04ba 0x04bb >
+MAPLOWER  < 0x04bc 0x04bd >
+MAPLOWER  < 0x04be 0x04bf >
+MAPLOWER  < 0x04c1 0x04c2 >
+MAPLOWER  < 0x04c3 0x04c4 >
+MAPLOWER  < 0x04c5 0x04c6 >
+MAPLOWER  < 0x04c7 0x04c8 >
+MAPLOWER  < 0x04c9 0x04ca >
+MAPLOWER  < 0x04cb 0x04cc >
+MAPLOWER  < 0x04cd 0x04ce >
+MAPLOWER  < 0x04d0 0x04d1 >
+MAPLOWER  < 0x04d2 0x04d3 >
+MAPLOWER  < 0x04d4 0x04d5 >
+MAPLOWER  < 0x04d6 0x04d7 >
+MAPLOWER  < 0x04d8 0x04d9 >
+MAPLOWER  < 0x04da 0x04db >
+MAPLOWER  < 0x04dc 0x04dd >
+MAPLOWER  < 0x04de 0x04df >
+MAPLOWER  < 0x04e0 0x04e1 >
+MAPLOWER  < 0x04e2 0x04e3 >
+MAPLOWER  < 0x04e4 0x04e5 >
+MAPLOWER  < 0x04e6 0x04e7 >
+MAPLOWER  < 0x04e8 0x04e9 >
+MAPLOWER  < 0x04ea 0x04eb >
+MAPLOWER  < 0x04ec 0x04ed >
+MAPLOWER  < 0x04ee 0x04ef >
+MAPLOWER  < 0x04f0 0x04f1 >
+MAPLOWER  < 0x04f2 0x04f3 >
+MAPLOWER  < 0x04f4 0x04f5 >
+MAPLOWER  < 0x04f6 0x04f7 >
+MAPLOWER  < 0x04f8 0x04f9 >
+
+
+/*
+ * U+0500 - U+052F : Cyrillic Supplementary
+ */
+
+ALPHA     0x0500 - 0x050f
+GRAPH     0x0500 - 0x050f
+LOWER     0x0501  0x0503  0x0505  0x0507  0x0509  0x050b  0x050d
+LOWER     0x050f
+UPPER     0x0500  0x0502  0x0504  0x0506  0x0508  0x050a  0x050c
+UPPER     0x050e
+PRINT     0x0500 - 0x050f
+SWIDTH1   0x0500 - 0x050f
+
+MAPUPPER  < 0x0501 0x0500 >
+MAPUPPER  < 0x0503 0x0502 >
+MAPUPPER  < 0x0505 0x0504 >
+MAPUPPER  < 0x0507 0x0506 >
+MAPUPPER  < 0x0509 0x0508 >
+MAPUPPER  < 0x050b 0x050a >
+MAPUPPER  < 0x050d 0x050c >
+MAPUPPER  < 0x050f 0x050e >
+MAPLOWER  < 0x0500 0x0501 >
+MAPLOWER  < 0x0502 0x0503 >
+MAPLOWER  < 0x0504 0x0505 >
+MAPLOWER  < 0x0506 0x0507 >
+MAPLOWER  < 0x0508 0x0509 >
+MAPLOWER  < 0x050a 0x050b >
+MAPLOWER  < 0x050c 0x050d >
+MAPLOWER  < 0x050e 0x050f >
+
+
+/*
+ * U+0530 - U+058F : Armenian
+ */
+
+ALPHA     0x0531 - 0x0556  0x0561 - 0x0587
+GRAPH     0x0531 - 0x0556  0x0559 - 0x055f  0x0561 - 0x0587  0x0589  0x058a
+LOWER     0x0561 - 0x0587
+PUNCT     0x055a - 0x055f  0x0589  0x058a
+UPPER     0x0531 - 0x0556
+PRINT     0x0531 - 0x0556  0x0559 - 0x055f  0x0561 - 0x0587  0x0589  0x058a
+SWIDTH1   0x0531 - 0x0556  0x0559 - 0x055f  0x0561 - 0x0587  0x0589  0x058a
+
+MAPUPPER  < 0x0561 - 0x0586 : 0x0531 >
+MAPLOWER  < 0x0531 - 0x0556 : 0x0561 >
+
+
+/*
+ * U+0590 - U+05FF : Hebrew
+ */
+
+GRAPH     0x0591 - 0x05a1  0x05a3 - 0x05b9  0x05bb - 0x05c4  0x05d0 - 0x05ea
+GRAPH     0x05f0 - 0x05f4
+PUNCT     0x05be  0x05c0  0x05c3  0x05f3  0x05f4
+PRINT     0x0591 - 0x05a1  0x05a3 - 0x05b9  0x05bb - 0x05c4  0x05d0 - 0x05ea
+PRINT     0x05f0 - 0x05f4
+SWIDTH1   0x0591 - 0x05a1  0x05a3 - 0x05b9  0x05bb - 0x05c4  0x05d0 - 0x05ea
+SWIDTH1   0x05f0 - 0x05f4
+
+
+/*
+ * U+0600 - U+06FF : Arabic
+ */
+
+CONTROL   0x06dd
+GRAPH     0x060c  0x061b  0x061f  0x0621 - 0x063a  0x0640 - 0x0655
+GRAPH     0x0660 - 0x06dc  0x06de - 0x06ed  0x06f0 - 0x06fe
+PUNCT     0x060c  0x061b  0x061f  0x066a - 0x066d  0x06d4  0x06e9
+PUNCT     0x06fd  0x06fe
+PRINT     0x060c  0x061b  0x061f  0x0621 - 0x063a  0x0640 - 0x0655
+PRINT     0x0660 - 0x06dc  0x06de - 0x06ed  0x06f0 - 0x06fe
+SWIDTH1   0x060c  0x061b  0x061f  0x0621 - 0x063a  0x0640 - 0x0655
+SWIDTH1   0x0660 - 0x06dc  0x06de - 0x06ed  0x06f0 - 0x06fe
+
+
+/*
+ * U+0700 - U+074F : Syriac
+ */
+
+CONTROL   0x070f
+GRAPH     0x0700 - 0x070d  0x0710 - 0x072c  0x0730 - 0x074a
+PUNCT     0x0700 - 0x070d
+PRINT     0x0700 - 0x070d  0x0710 - 0x072c  0x0730 - 0x074a
+SWIDTH1   0x0700 - 0x070d  0x0710 - 0x072c  0x0730 - 0x074a
+
+
+/*
+ * U+0780 - U+07BF : Thaana
+ */
+
+GRAPH     0x0780 - 0x07b1
+PRINT     0x0780 - 0x07b1
+SWIDTH1   0x0780 - 0x07b1
+
+
+/*
+ * U+0900 - U+097F : Devanagari
+ */
+
+GRAPH     0x0901 - 0x0903  0x0905 - 0x0939  0x093c - 0x094d  0x0950 - 0x0954
+GRAPH     0x0958 - 0x0970
+PUNCT     0x0964  0x0965  0x0970
+PRINT     0x0901 - 0x0903  0x0905 - 0x0939  0x093c - 0x094d  0x0950 - 0x0954
+PRINT     0x0958 - 0x0970
+SWIDTH1   0x0901 - 0x0903  0x0905 - 0x0939  0x093c - 0x094d  0x0950 - 0x0954
+SWIDTH1   0x0958 - 0x0970
+
+
+/*
+ * U+0980 - U+09FF : Bengali
+ */
+
+GRAPH     0x0981 - 0x0983  0x0985 - 0x098c  0x098f  0x0990  0x0993 - 0x09a8
+GRAPH     0x09aa - 0x09b0  0x09b2  0x09b6 - 0x09b9  0x09bc  0x09be - 0x09c4
+GRAPH     0x09c7  0x09c8  0x09cb - 0x09cd  0x09d7  0x09dc  0x09dd
+GRAPH     0x09df - 0x09e3  0x09e6 - 0x09fa
+PUNCT     0x09f2  0x09f3  0x09fa
+PRINT     0x0981 - 0x0983  0x0985 - 0x098c  0x098f  0x0990  0x0993 - 0x09a8
+PRINT     0x09aa - 0x09b0  0x09b2  0x09b6 - 0x09b9  0x09bc  0x09be - 0x09c4
+PRINT     0x09c7  0x09c8  0x09cb - 0x09cd  0x09d7  0x09dc  0x09dd
+PRINT     0x09df - 0x09e3  0x09e6 - 0x09fa
+SPECIAL   0x09f4 - 0x09f9
+SWIDTH1   0x0981 - 0x0983  0x0985 - 0x098c  0x098f  0x0990  0x0993 - 0x09a8
+SWIDTH1   0x09aa - 0x09b0  0x09b2  0x09b6 - 0x09b9  0x09bc  0x09be - 0x09c4
+SWIDTH1   0x09c7  0x09c8  0x09cb - 0x09cd  0x09d7  0x09dc  0x09dd
+SWIDTH1   0x09df - 0x09e3  0x09e6 - 0x09fa
+
+
+/*
+ * U+0A00 - U+0A7F : Gurmukhi
+ */
+
+GRAPH     0x0a02  0x0a05 - 0x0a0a  0x0a0f  0x0a10  0x0a13 - 0x0a28
+GRAPH     0x0a2a - 0x0a30  0x0a32  0x0a33  0x0a35  0x0a36  0x0a38  0x0a39
+GRAPH     0x0a3c  0x0a3e - 0x0a42  0x0a47  0x0a48  0x0a4b - 0x0a4d
+GRAPH     0x0a59 - 0x0a5c  0x0a5e  0x0a66 - 0x0a74
+PRINT     0x0a02  0x0a05 - 0x0a0a  0x0a0f  0x0a10  0x0a13 - 0x0a28
+PRINT     0x0a2a - 0x0a30  0x0a32  0x0a33  0x0a35  0x0a36  0x0a38  0x0a39
+PRINT     0x0a3c  0x0a3e - 0x0a42  0x0a47  0x0a48  0x0a4b - 0x0a4d
+PRINT     0x0a59 - 0x0a5c  0x0a5e  0x0a66 - 0x0a74
+SWIDTH1   0x0a02  0x0a05 - 0x0a0a  0x0a0f  0x0a10  0x0a13 - 0x0a28
+SWIDTH1   0x0a2a - 0x0a30  0x0a32  0x0a33  0x0a35  0x0a36  0x0a38  0x0a39
+SWIDTH1   0x0a3c  0x0a3e - 0x0a42  0x0a47  0x0a48  0x0a4b - 0x0a4d
+SWIDTH1   0x0a59 - 0x0a5c  0x0a5e  0x0a66 - 0x0a74
+
+
+/*
+ * U+0A80 - U+0AFF : Gujarati
+ */
+
+GRAPH     0x0a81 - 0x0a83  0x0a85 - 0x0a8b  0x0a8d  0x0a8f - 0x0a91
+GRAPH     0x0a93 - 0x0aa8  0x0aaa - 0x0ab0  0x0ab2  0x0ab3  0x0ab5 - 0x0ab9
+GRAPH     0x0abc - 0x0ac5  0x0ac7 - 0x0ac9  0x0acb - 0x0acd  0x0ad0
+GRAPH     0x0ae0  0x0ae6 - 0x0aef
+PRINT     0x0a81 - 0x0a83  0x0a85 - 0x0a8b  0x0a8d  0x0a8f - 0x0a91
+PRINT     0x0a93 - 0x0aa8  0x0aaa - 0x0ab0  0x0ab2  0x0ab3  0x0ab5 - 0x0ab9
+PRINT     0x0abc - 0x0ac5  0x0ac7 - 0x0ac9  0x0acb - 0x0acd  0x0ad0
+PRINT     0x0ae0  0x0ae6 - 0x0aef
+SWIDTH1   0x0a81 - 0x0a83  0x0a85 - 0x0a8b  0x0a8d  0x0a8f - 0x0a91
+SWIDTH1   0x0a93 - 0x0aa8  0x0aaa - 0x0ab0  0x0ab2  0x0ab3  0x0ab5 - 0x0ab9
+SWIDTH1   0x0abc - 0x0ac5  0x0ac7 - 0x0ac9  0x0acb - 0x0acd  0x0ad0
+SWIDTH1   0x0ae0  0x0ae6 - 0x0aef
+
+
+/*
+ * U+0B00 - U+0B7F : Oriya
+ */
+
+GRAPH     0x0b01 - 0x0b03  0x0b05 - 0x0b0c  0x0b0f  0x0b10  0x0b13 - 0x0b28
+GRAPH     0x0b2a - 0x0b30  0x0b32  0x0b33  0x0b36 - 0x0b39  0x0b3c - 0x0b43
+GRAPH     0x0b47  0x0b48  0x0b4b - 0x0b4d  0x0b56  0x0b57  0x0b5c  0x0b5d
+GRAPH     0x0b5f - 0x0b61  0x0b66 - 0x0b70
+PUNCT     0x0b70
+PRINT     0x0b01 - 0x0b03  0x0b05 - 0x0b0c  0x0b0f  0x0b10  0x0b13 - 0x0b28
+PRINT     0x0b2a - 0x0b30  0x0b32  0x0b33  0x0b36 - 0x0b39  0x0b3c - 0x0b43
+PRINT     0x0b47  0x0b48  0x0b4b - 0x0b4d  0x0b56  0x0b57  0x0b5c  0x0b5d
+PRINT     0x0b5f - 0x0b61  0x0b66 - 0x0b70
+SWIDTH1   0x0b01 - 0x0b03  0x0b05 - 0x0b0c  0x0b0f  0x0b10  0x0b13 - 0x0b28
+SWIDTH1   0x0b2a - 0x0b30  0x0b32  0x0b33  0x0b36 - 0x0b39  0x0b3c - 0x0b43
+SWIDTH1   0x0b47  0x0b48  0x0b4b - 0x0b4d  0x0b56  0x0b57  0x0b5c  0x0b5d
+SWIDTH1   0x0b5f - 0x0b61  0x0b66 - 0x0b70
+
+
+/*
+ * U+0B80 - U+0BFF : Tamil
+ */
+
+GRAPH     0x0b82  0x0b83  0x0b85 - 0x0b8a  0x0b8e - 0x0b90  0x0b92 - 0x0b95
+GRAPH     0x0b99  0x0b9a  0x0b9c  0x0b9e  0x0b9f  0x0ba3  0x0ba4
+GRAPH     0x0ba8 - 0x0baa  0x0bae - 0x0bb5  0x0bb7 - 0x0bb9  0x0bbe - 0x0bc2
+GRAPH     0x0bc6 - 0x0bc8  0x0bca - 0x0bcd  0x0bd7  0x0be7 - 0x0bf2
+PRINT     0x0b82  0x0b83  0x0b85 - 0x0b8a  0x0b8e - 0x0b90  0x0b92 - 0x0b95
+PRINT     0x0b99  0x0b9a  0x0b9c  0x0b9e  0x0b9f  0x0ba3  0x0ba4
+PRINT     0x0ba8 - 0x0baa  0x0bae - 0x0bb5  0x0bb7 - 0x0bb9  0x0bbe - 0x0bc2
+PRINT     0x0bc6 - 0x0bc8  0x0bca - 0x0bcd  0x0bd7  0x0be7 - 0x0bf2
+SPECIAL   0x0bf0 - 0x0bf2
+SWIDTH1   0x0b82  0x0b83  0x0b85 - 0x0b8a  0x0b8e - 0x0b90  0x0b92 - 0x0b95
+SWIDTH1   0x0b99  0x0b9a  0x0b9c  0x0b9e  0x0b9f  0x0ba3  0x0ba4
+SWIDTH1   0x0ba8 - 0x0baa  0x0bae - 0x0bb5  0x0bb7 - 0x0bb9  0x0bbe - 0x0bc2
+SWIDTH1   0x0bc6 - 0x0bc8  0x0bca - 0x0bcd  0x0bd7  0x0be7 - 0x0bf2
+
+
+/*
+ * U+0C00 - U+0C7F : Telugu
+ */
+
+GRAPH     0x0c01 - 0x0c03  0x0c05 - 0x0c0c  0x0c0e - 0x0c10  0x0c12 - 0x0c28
+GRAPH     0x0c2a - 0x0c33  0x0c35 - 0x0c39  0x0c3e - 0x0c44  0x0c46 - 0x0c48
+GRAPH     0x0c4a - 0x0c4d  0x0c55  0x0c56  0x0c60  0x0c61  0x0c66 - 0x0c6f
+PRINT     0x0c01 - 0x0c03  0x0c05 - 0x0c0c  0x0c0e - 0x0c10  0x0c12 - 0x0c28
+PRINT     0x0c2a - 0x0c33  0x0c35 - 0x0c39  0x0c3e - 0x0c44  0x0c46 - 0x0c48
+PRINT     0x0c4a - 0x0c4d  0x0c55  0x0c56  0x0c60  0x0c61  0x0c66 - 0x0c6f
+SWIDTH1   0x0c01 - 0x0c03  0x0c05 - 0x0c0c  0x0c0e - 0x0c10  0x0c12 - 0x0c28
+SWIDTH1   0x0c2a - 0x0c33  0x0c35 - 0x0c39  0x0c3e - 0x0c44  0x0c46 - 0x0c48
+SWIDTH1   0x0c4a - 0x0c4d  0x0c55  0x0c56  0x0c60  0x0c61  0x0c66 - 0x0c6f
+
+
+/*
+ * U+0C80 - U+0CFF : Kannada
+ */
+
+GRAPH     0x0c82  0x0c83  0x0c85 - 0x0c8c  0x0c8e - 0x0c90  0x0c92 - 0x0ca8
+GRAPH     0x0caa - 0x0cb3  0x0cb5 - 0x0cb9  0x0cbe - 0x0cc4  0x0cc6 - 0x0cc8
+GRAPH     0x0cca - 0x0ccd  0x0cd5  0x0cd6  0x0cde  0x0ce0  0x0ce1
+GRAPH     0x0ce6 - 0x0cef
+PRINT     0x0c82  0x0c83  0x0c85 - 0x0c8c  0x0c8e - 0x0c90  0x0c92 - 0x0ca8
+PRINT     0x0caa - 0x0cb3  0x0cb5 - 0x0cb9  0x0cbe - 0x0cc4  0x0cc6 - 0x0cc8
+PRINT     0x0cca - 0x0ccd  0x0cd5  0x0cd6  0x0cde  0x0ce0  0x0ce1
+PRINT     0x0ce6 - 0x0cef
+SWIDTH1   0x0c82  0x0c83  0x0c85 - 0x0c8c  0x0c8e - 0x0c90  0x0c92 - 0x0ca8
+SWIDTH1   0x0caa - 0x0cb3  0x0cb5 - 0x0cb9  0x0cbe - 0x0cc4  0x0cc6 - 0x0cc8
+SWIDTH1   0x0cca - 0x0ccd  0x0cd5  0x0cd6  0x0cde  0x0ce0  0x0ce1
+SWIDTH1   0x0ce6 - 0x0cef
+
+
+/*
+ * U+0D00 - U+0D7F : Malayalam
+ */
+
+GRAPH     0x0d02  0x0d03  0x0d05 - 0x0d0c  0x0d0e - 0x0d10  0x0d12 - 0x0d28
+GRAPH     0x0d2a - 0x0d39  0x0d3e - 0x0d43  0x0d46 - 0x0d48  0x0d4a - 0x0d4d
+GRAPH     0x0d57  0x0d60  0x0d61  0x0d66 - 0x0d6f
+PRINT     0x0d02  0x0d03  0x0d05 - 0x0d0c  0x0d0e - 0x0d10  0x0d12 - 0x0d28
+PRINT     0x0d2a - 0x0d39  0x0d3e - 0x0d43  0x0d46 - 0x0d48  0x0d4a - 0x0d4d
+PRINT     0x0d57  0x0d60  0x0d61  0x0d66 - 0x0d6f
+SWIDTH1   0x0d02  0x0d03  0x0d05 - 0x0d0c  0x0d0e - 0x0d10  0x0d12 - 0x0d28
+SWIDTH1   0x0d2a - 0x0d39  0x0d3e - 0x0d43  0x0d46 - 0x0d48  0x0d4a - 0x0d4d
+SWIDTH1   0x0d57  0x0d60  0x0d61  0x0d66 - 0x0d6f
+
+
+/*
+ * U+0D80 - U+0DFF : Sinhala
+ */
+
+GRAPH     0x0d82  0x0d83  0x0d85 - 0x0d96  0x0d9a - 0x0db1  0x0db3 - 0x0dbb
+GRAPH     0x0dbd  0x0dc0 - 0x0dc6  0x0dca  0x0dcf - 0x0dd4  0x0dd6
+GRAPH     0x0dd8 - 0x0ddf  0x0df2 - 0x0df4
+PUNCT     0x0df4
+PRINT     0x0d82  0x0d83  0x0d85 - 0x0d96  0x0d9a - 0x0db1  0x0db3 - 0x0dbb
+PRINT     0x0dbd  0x0dc0 - 0x0dc6  0x0dca  0x0dcf - 0x0dd4  0x0dd6
+PRINT     0x0dd8 - 0x0ddf  0x0df2 - 0x0df4
+SWIDTH1   0x0d82  0x0d83  0x0d85 - 0x0d96  0x0d9a - 0x0db1  0x0db3 - 0x0dbb
+SWIDTH1   0x0dbd  0x0dc0 - 0x0dc6  0x0dca  0x0dcf - 0x0dd4  0x0dd6
+SWIDTH1   0x0dd8 - 0x0ddf  0x0df2 - 0x0df4
+
+
+/*
+ * U+0E00 - U+0E7F : Thai
+ */
+
+GRAPH     0x0e01 - 0x0e3a  0x0e3f - 0x0e5b
+PUNCT     0x0e3f  0x0e4f  0x0e5a  0x0e5b
+PRINT     0x0e01 - 0x0e3a  0x0e3f - 0x0e5b
+SWIDTH0   0x0e31   0x0e34 - 0x0e3a  0x0e47 - 0x0e4e
+SWIDTH1   0x0e01 - 0x0e30  0x0e32 - 0x0e33  0x0e3f - 0x0e46  0x0e4f - 0x0e5b
+
+
+/*
+ * U+0E80 - U+0EFF : Lao
+ */
+
+GRAPH     0x0e81  0x0e82  0x0e84  0x0e87  0x0e88  0x0e8a  0x0e8d
+GRAPH     0x0e94 - 0x0e97  0x0e99 - 0x0e9f  0x0ea1 - 0x0ea3  0x0ea5
+GRAPH     0x0ea7  0x0eaa  0x0eab  0x0ead - 0x0eb9  0x0ebb - 0x0ebd
+GRAPH     0x0ec0 - 0x0ec4  0x0ec6  0x0ec8 - 0x0ecd  0x0ed0 - 0x0ed9
+GRAPH     0x0edc  0x0edd
+PRINT     0x0e81  0x0e82  0x0e84  0x0e87  0x0e88  0x0e8a  0x0e8d
+PRINT     0x0e94 - 0x0e97  0x0e99 - 0x0e9f  0x0ea1 - 0x0ea3  0x0ea5
+PRINT     0x0ea7  0x0eaa  0x0eab  0x0ead - 0x0eb9  0x0ebb - 0x0ebd
+PRINT     0x0ec0 - 0x0ec4  0x0ec6  0x0ec8 - 0x0ecd  0x0ed0 - 0x0ed9
+PRINT     0x0edc  0x0edd
+SWIDTH1   0x0e81  0x0e82  0x0e84  0x0e87  0x0e88  0x0e8a  0x0e8d
+SWIDTH1   0x0e94 - 0x0e97  0x0e99 - 0x0e9f  0x0ea1 - 0x0ea3  0x0ea5
+SWIDTH1   0x0ea7  0x0eaa  0x0eab  0x0ead - 0x0eb9  0x0ebb - 0x0ebd
+SWIDTH1   0x0ec0 - 0x0ec4  0x0ec6  0x0ec8 - 0x0ecd  0x0ed0 - 0x0ed9
+SWIDTH1   0x0edc  0x0edd
+
+
+/*
+ * U+0F00 - U+0FFF : Tibetan
+ */
+
+GRAPH     0x0f00 - 0x0f47  0x0f49 - 0x0f6a  0x0f71 - 0x0f8b  0x0f90 - 0x0f97
+GRAPH     0x0f99 - 0x0fbc  0x0fbe - 0x0fcc  0x0fcf
+PUNCT     0x0f01 - 0x0f17  0x0f1a - 0x0f1f  0x0f34  0x0f36  0x0f38
+PUNCT     0x0f3a - 0x0f3d  0x0f85  0x0fbe - 0x0fc5  0x0fc7 - 0x0fcc
+PUNCT     0x0fcf
+PRINT     0x0f00 - 0x0f47  0x0f49 - 0x0f6a  0x0f71 - 0x0f8b  0x0f90 - 0x0f97
+PRINT     0x0f99 - 0x0fbc  0x0fbe - 0x0fcc  0x0fcf
+SPECIAL   0x0f2a - 0x0f33
+PHONOGRAM 0x0f00
+SWIDTH1   0x0f00 - 0x0f47  0x0f49 - 0x0f6a  0x0f71 - 0x0f8b  0x0f90 - 0x0f97
+SWIDTH1   0x0f99 - 0x0fbc  0x0fbe - 0x0fcc  0x0fcf
+
+
+/*
+ * U+1000 - U+109F : Myanmar
+ */
+
+GRAPH     0x1000 - 0x1021  0x1023 - 0x1027  0x1029  0x102a  0x102c - 0x1032
+GRAPH     0x1036 - 0x1039  0x1040 - 0x1059
+PUNCT     0x104a - 0x104f
+PRINT     0x1000 - 0x1021  0x1023 - 0x1027  0x1029  0x102a  0x102c - 0x1032
+PRINT     0x1036 - 0x1039  0x1040 - 0x1059
+SWIDTH1   0x1000 - 0x1021  0x1023 - 0x1027  0x1029  0x102a  0x102c - 0x1032
+SWIDTH1   0x1036 - 0x1039  0x1040 - 0x1059
+
+
+/*
+ * U+10A0 - U+10FF : Georgian
+ */
+
+ALPHA     0x10a0 - 0x10c5
+GRAPH     0x10a0 - 0x10c5  0x10d0 - 0x10f8  0x10fb
+PUNCT     0x10fb
+UPPER     0x10a0 - 0x10c5
+PRINT     0x10a0 - 0x10c5  0x10d0 - 0x10f8  0x10fb
+SWIDTH1   0x10a0 - 0x10c5  0x10d0 - 0x10f8  0x10fb
+
+
+/*
+ * U+1100 - U+11FF : Hangul Jamo
+ */
+
+GRAPH     0x1100 - 0x1159  0x115f - 0x11a2  0x11a8 - 0x11f9
+PRINT     0x1100 - 0x1159  0x115f - 0x11a2  0x11a8 - 0x11f9
+SWIDTH1   0x1160 - 0x11a2  0x11a8 - 0x11f9
+SWIDTH2   0x1100 - 0x1159  0x115f
+
+
+/*
+ * U+1200 - U+137F : Ethiopic
+ */
+
+GRAPH     0x1200 - 0x1206  0x1208 - 0x1246  0x1248  0x124a - 0x124d
+GRAPH     0x1250 - 0x1256  0x1258  0x125a - 0x125d  0x1260 - 0x1286
+GRAPH     0x1288  0x128a - 0x128d  0x1290 - 0x12ae  0x12b0  0x12b2 - 0x12b5
+GRAPH     0x12b8 - 0x12be  0x12c0  0x12c2 - 0x12c5  0x12c8 - 0x12ce
+GRAPH     0x12d0 - 0x12d6  0x12d8 - 0x12ee  0x12f0 - 0x130e  0x1310
+GRAPH     0x1312 - 0x1315  0x1318 - 0x131e  0x1320 - 0x1346  0x1348 - 0x135a
+GRAPH     0x1361 - 0x137c
+PUNCT     0x1361 - 0x1368
+PRINT     0x1200 - 0x1206  0x1208 - 0x1246  0x1248  0x124a - 0x124d
+PRINT     0x1250 - 0x1256  0x1258  0x125a - 0x125d  0x1260 - 0x1286
+PRINT     0x1288  0x128a - 0x128d  0x1290 - 0x12ae  0x12b0  0x12b2 - 0x12b5
+PRINT     0x12b8 - 0x12be  0x12c0  0x12c2 - 0x12c5  0x12c8 - 0x12ce
+PRINT     0x12d0 - 0x12d6  0x12d8 - 0x12ee  0x12f0 - 0x130e  0x1310
+PRINT     0x1312 - 0x1315  0x1318 - 0x131e  0x1320 - 0x1346  0x1348 - 0x135a
+PRINT     0x1361 - 0x137c
+SPECIAL   0x1372 - 0x137c
+PHONOGRAM 0x1200 - 0x1206  0x1208 - 0x1246  0x1248  0x124a - 0x124d
+PHONOGRAM 0x1250 - 0x1256  0x1258  0x125a - 0x125d  0x1260 - 0x1286
+PHONOGRAM 0x1288  0x128a - 0x128d  0x1290 - 0x12ae  0x12b0  0x12b2 - 0x12b5
+PHONOGRAM 0x12b8 - 0x12be  0x12c0  0x12c2 - 0x12c5  0x12c8 - 0x12ce
+PHONOGRAM 0x12d0 - 0x12d6  0x12d8 - 0x12ee  0x12f0 - 0x130e  0x1310
+PHONOGRAM 0x1312 - 0x1315  0x1318 - 0x131e  0x1320 - 0x1346  0x1348 - 0x135a
+SWIDTH1   0x1200 - 0x1206  0x1208 - 0x1246  0x1248  0x124a - 0x124d
+SWIDTH1   0x1250 - 0x1256  0x1258  0x125a - 0x125d  0x1260 - 0x1286
+SWIDTH1   0x1288  0x128a - 0x128d  0x1290 - 0x12ae  0x12b0  0x12b2 - 0x12b5
+SWIDTH1   0x12b8 - 0x12be  0x12c0  0x12c2 - 0x12c5  0x12c8 - 0x12ce
+SWIDTH1   0x12d0 - 0x12d6  0x12d8 - 0x12ee  0x12f0 - 0x130e  0x1310
+SWIDTH1   0x1312 - 0x1315  0x1318 - 0x131e  0x1320 - 0x1346  0x1348 - 0x135a
+SWIDTH1   0x1361 - 0x137c
+
+
+/*
+ * U+13A0 - U+13FF : Cherokee
+ */
+
+GRAPH     0x13a0 - 0x13f4
+PRINT     0x13a0 - 0x13f4
+SWIDTH1   0x13a0 - 0x13f4
+
+
+/*
+ * U+1400 - U+167F : Unified Canadian Aboriginal Syllabics
+ */
+
+GRAPH     0x1401 - 0x1676
+PUNCT     0x166d  0x166e
+PRINT     0x1401 - 0x1676
+PHONOGRAM 0x1401 - 0x166c  0x166f - 0x1676
+SWIDTH1   0x1401 - 0x1676
+
+
+/*
+ * U+1680 - U+169F : Ogham
+ */
+
+GRAPH     0x1681 - 0x169c
+PUNCT     0x169b  0x169c
+SPACE     0x1680
+BLANK     0x1680
+PRINT     0x1680 - 0x169c
+SWIDTH1   0x1680 - 0x169c
+
+
+/*
+ * U+16A0 - U+16FF : Runic
+ */
+
+GRAPH     0x16a0 - 0x16f0
+PUNCT     0x16eb - 0x16ed
+PRINT     0x16a0 - 0x16f0
+SPECIAL   0x16ee - 0x16f0
+SWIDTH1   0x16a0 - 0x16f0
+
+
+/*
+ * U+1700 - U+171F : Tagalog
+ */
+
+GRAPH     0x1700 - 0x170c  0x170e - 0x1714
+PRINT     0x1700 - 0x170c  0x170e - 0x1714
+SWIDTH1   0x1700 - 0x170c  0x170e - 0x1714
+
+
+/*
+ * U+1720 - U+173F : Hanunoo
+ */
+
+GRAPH     0x1720 - 0x1736
+PUNCT     0x1735  0x1736
+PRINT     0x1720 - 0x1736
+SWIDTH1   0x1720 - 0x1736
+
+
+/*
+ * U+1740 - U+175F : Buhid
+ */
+
+GRAPH     0x1740 - 0x1753
+PRINT     0x1740 - 0x1753
+SWIDTH1   0x1740 - 0x1753
+
+
+/*
+ * U+1760 - U+177F : Tagbanwa
+ */
+
+GRAPH     0x1760 - 0x176c  0x176e - 0x1770  0x1772  0x1773
+PRINT     0x1760 - 0x176c  0x176e - 0x1770  0x1772  0x1773
+SWIDTH1   0x1760 - 0x176c  0x176e - 0x1770  0x1772  0x1773
+
+
+/*
+ * U+1780 - U+17FF : Khmer
+ */
+
+GRAPH     0x1780 - 0x17dc  0x17e0 - 0x17e9
+PUNCT     0x17d4 - 0x17d6  0x17d8 - 0x17db
+PRINT     0x1780 - 0x17dc  0x17e0 - 0x17e9
+SWIDTH1   0x1780 - 0x17dc  0x17e0 - 0x17e9
+
+
+/*
+ * U+1800 - U+18AF : Mongolian
+ */
+
+CONTROL   0x180e
+GRAPH     0x1800 - 0x180d  0x1810 - 0x1819  0x1820 - 0x1877  0x1880 - 0x18a9
+PUNCT     0x1800 - 0x180a
+PRINT     0x1800 - 0x180d  0x1810 - 0x1819  0x1820 - 0x1877  0x1880 - 0x18a9
+SWIDTH1   0x1800 - 0x180d  0x1810 - 0x1819  0x1820 - 0x1877  0x1880 - 0x18a9
+
+
+/*
+ * U+1DC0 - U+1DFF : Combining Diacritical Marks Supplement
+ */
+
+GRAPH     0x1DC0 - 0x1DC3
+PRINT     0x1DC0 - 0x1DC3
+SWIDTH0   0x1DC0 - 0x1DC3
+
+
+/*
+ * U+1E00 - U+1EFF : Latin Extended Additional
+ */
+
+ALPHA     0x1e00 - 0x1e9b  0x1ea0 - 0x1ef9
+GRAPH     0x1e00 - 0x1e9b  0x1ea0 - 0x1ef9
+LOWER     0x1e01  0x1e03  0x1e05  0x1e07  0x1e09  0x1e0b  0x1e0d
+LOWER     0x1e0f  0x1e11  0x1e13  0x1e15  0x1e17  0x1e19  0x1e1b
+LOWER     0x1e1d  0x1e1f  0x1e21  0x1e23  0x1e25  0x1e27  0x1e29
+LOWER     0x1e2b  0x1e2d  0x1e2f  0x1e31  0x1e33  0x1e35  0x1e37
+LOWER     0x1e39  0x1e3b  0x1e3d  0x1e3f  0x1e41  0x1e43  0x1e45
+LOWER     0x1e47  0x1e49  0x1e4b  0x1e4d  0x1e4f  0x1e51  0x1e53
+LOWER     0x1e55  0x1e57  0x1e59  0x1e5b  0x1e5d  0x1e5f  0x1e61
+LOWER     0x1e63  0x1e65  0x1e67  0x1e69  0x1e6b  0x1e6d  0x1e6f
+LOWER     0x1e71  0x1e73  0x1e75  0x1e77  0x1e79  0x1e7b  0x1e7d
+LOWER     0x1e7f  0x1e81  0x1e83  0x1e85  0x1e87  0x1e89  0x1e8b
+LOWER     0x1e8d  0x1e8f  0x1e91  0x1e93  0x1e95 - 0x1e9b  0x1ea1
+LOWER     0x1ea3  0x1ea5  0x1ea7  0x1ea9  0x1eab  0x1ead  0x1eaf
+LOWER     0x1eb1  0x1eb3  0x1eb5  0x1eb7  0x1eb9  0x1ebb  0x1ebd
+LOWER     0x1ebf  0x1ec1  0x1ec3  0x1ec5  0x1ec7  0x1ec9  0x1ecb
+LOWER     0x1ecd  0x1ecf  0x1ed1  0x1ed3  0x1ed5  0x1ed7  0x1ed9
+LOWER     0x1edb  0x1edd  0x1edf  0x1ee1  0x1ee3  0x1ee5  0x1ee7
+LOWER     0x1ee9  0x1eeb  0x1eed  0x1eef  0x1ef1  0x1ef3  0x1ef5
+LOWER     0x1ef7  0x1ef9
+UPPER     0x1e00  0x1e02  0x1e04  0x1e06  0x1e08  0x1e0a  0x1e0c
+UPPER     0x1e0e  0x1e10  0x1e12  0x1e14  0x1e16  0x1e18  0x1e1a
+UPPER     0x1e1c  0x1e1e  0x1e20  0x1e22  0x1e24  0x1e26  0x1e28
+UPPER     0x1e2a  0x1e2c  0x1e2e  0x1e30  0x1e32  0x1e34  0x1e36
+UPPER     0x1e38  0x1e3a  0x1e3c  0x1e3e  0x1e40  0x1e42  0x1e44
+UPPER     0x1e46  0x1e48  0x1e4a  0x1e4c  0x1e4e  0x1e50  0x1e52
+UPPER     0x1e54  0x1e56  0x1e58  0x1e5a  0x1e5c  0x1e5e  0x1e60
+UPPER     0x1e62  0x1e64  0x1e66  0x1e68  0x1e6a  0x1e6c  0x1e6e
+UPPER     0x1e70  0x1e72  0x1e74  0x1e76  0x1e78  0x1e7a  0x1e7c
+UPPER     0x1e7e  0x1e80  0x1e82  0x1e84  0x1e86  0x1e88  0x1e8a
+UPPER     0x1e8c  0x1e8e  0x1e90  0x1e92  0x1e94  0x1ea0  0x1ea2
+UPPER     0x1ea4  0x1ea6  0x1ea8  0x1eaa  0x1eac  0x1eae  0x1eb0
+UPPER     0x1eb2  0x1eb4  0x1eb6  0x1eb8  0x1eba  0x1ebc  0x1ebe
+UPPER     0x1ec0  0x1ec2  0x1ec4  0x1ec6  0x1ec8  0x1eca  0x1ecc
+UPPER     0x1ece  0x1ed0  0x1ed2  0x1ed4  0x1ed6  0x1ed8  0x1eda
+UPPER     0x1edc  0x1ede  0x1ee0  0x1ee2  0x1ee4  0x1ee6  0x1ee8
+UPPER     0x1eea  0x1eec  0x1eee  0x1ef0  0x1ef2  0x1ef4  0x1ef6
+UPPER     0x1ef8
+PRINT     0x1e00 - 0x1e9b  0x1ea0 - 0x1ef9
+SWIDTH1   0x1e00 - 0x1e9b  0x1ea0 - 0x1ef9
+
+MAPUPPER  < 0x1e01 0x1e00 >
+MAPUPPER  < 0x1e03 0x1e02 >
+MAPUPPER  < 0x1e05 0x1e04 >
+MAPUPPER  < 0x1e07 0x1e06 >
+MAPUPPER  < 0x1e09 0x1e08 >
+MAPUPPER  < 0x1e0b 0x1e0a >
+MAPUPPER  < 0x1e0d 0x1e0c >
+MAPUPPER  < 0x1e0f 0x1e0e >
+MAPUPPER  < 0x1e11 0x1e10 >
+MAPUPPER  < 0x1e13 0x1e12 >
+MAPUPPER  < 0x1e15 0x1e14 >
+MAPUPPER  < 0x1e17 0x1e16 >
+MAPUPPER  < 0x1e19 0x1e18 >
+MAPUPPER  < 0x1e1b 0x1e1a >
+MAPUPPER  < 0x1e1d 0x1e1c >
+MAPUPPER  < 0x1e1f 0x1e1e >
+MAPUPPER  < 0x1e21 0x1e20 >
+MAPUPPER  < 0x1e23 0x1e22 >
+MAPUPPER  < 0x1e25 0x1e24 >
+MAPUPPER  < 0x1e27 0x1e26 >
+MAPUPPER  < 0x1e29 0x1e28 >
+MAPUPPER  < 0x1e2b 0x1e2a >
+MAPUPPER  < 0x1e2d 0x1e2c >
+MAPUPPER  < 0x1e2f 0x1e2e >
+MAPUPPER  < 0x1e31 0x1e30 >
+MAPUPPER  < 0x1e33 0x1e32 >
+MAPUPPER  < 0x1e35 0x1e34 >
+MAPUPPER  < 0x1e37 0x1e36 >
+MAPUPPER  < 0x1e39 0x1e38 >
+MAPUPPER  < 0x1e3b 0x1e3a >
+MAPUPPER  < 0x1e3d 0x1e3c >
+MAPUPPER  < 0x1e3f 0x1e3e >
+MAPUPPER  < 0x1e41 0x1e40 >
+MAPUPPER  < 0x1e43 0x1e42 >
+MAPUPPER  < 0x1e45 0x1e44 >
+MAPUPPER  < 0x1e47 0x1e46 >
+MAPUPPER  < 0x1e49 0x1e48 >
+MAPUPPER  < 0x1e4b 0x1e4a >
+MAPUPPER  < 0x1e4d 0x1e4c >
+MAPUPPER  < 0x1e4f 0x1e4e >
+MAPUPPER  < 0x1e51 0x1e50 >
+MAPUPPER  < 0x1e53 0x1e52 >
+MAPUPPER  < 0x1e55 0x1e54 >
+MAPUPPER  < 0x1e57 0x1e56 >
+MAPUPPER  < 0x1e59 0x1e58 >
+MAPUPPER  < 0x1e5b 0x1e5a >
+MAPUPPER  < 0x1e5d 0x1e5c >
+MAPUPPER  < 0x1e5f 0x1e5e >
+MAPUPPER  < 0x1e61 0x1e60 >
+MAPUPPER  < 0x1e63 0x1e62 >
+MAPUPPER  < 0x1e65 0x1e64 >
+MAPUPPER  < 0x1e67 0x1e66 >
+MAPUPPER  < 0x1e69 0x1e68 >
+MAPUPPER  < 0x1e6b 0x1e6a >
+MAPUPPER  < 0x1e6d 0x1e6c >
+MAPUPPER  < 0x1e6f 0x1e6e >
+MAPUPPER  < 0x1e71 0x1e70 >
+MAPUPPER  < 0x1e73 0x1e72 >
+MAPUPPER  < 0x1e75 0x1e74 >
+MAPUPPER  < 0x1e77 0x1e76 >
+MAPUPPER  < 0x1e79 0x1e78 >
+MAPUPPER  < 0x1e7b 0x1e7a >
+MAPUPPER  < 0x1e7d 0x1e7c >
+MAPUPPER  < 0x1e7f 0x1e7e >
+MAPUPPER  < 0x1e81 0x1e80 >
+MAPUPPER  < 0x1e83 0x1e82 >
+MAPUPPER  < 0x1e85 0x1e84 >
+MAPUPPER  < 0x1e87 0x1e86 >
+MAPUPPER  < 0x1e89 0x1e88 >
+MAPUPPER  < 0x1e8b 0x1e8a >
+MAPUPPER  < 0x1e8d 0x1e8c >
+MAPUPPER  < 0x1e8f 0x1e8e >
+MAPUPPER  < 0x1e91 0x1e90 >
+MAPUPPER  < 0x1e93 0x1e92 >
+MAPUPPER  < 0x1e95 0x1e94 >
+MAPUPPER  < 0x1e9b 0x1e60 >
+MAPUPPER  < 0x1ea1 0x1ea0 >
+MAPUPPER  < 0x1ea3 0x1ea2 >
+MAPUPPER  < 0x1ea5 0x1ea4 >
+MAPUPPER  < 0x1ea7 0x1ea6 >
+MAPUPPER  < 0x1ea9 0x1ea8 >
+MAPUPPER  < 0x1eab 0x1eaa >
+MAPUPPER  < 0x1ead 0x1eac >
+MAPUPPER  < 0x1eaf 0x1eae >
+MAPUPPER  < 0x1eb1 0x1eb0 >
+MAPUPPER  < 0x1eb3 0x1eb2 >
+MAPUPPER  < 0x1eb5 0x1eb4 >
+MAPUPPER  < 0x1eb7 0x1eb6 >
+MAPUPPER  < 0x1eb9 0x1eb8 >
+MAPUPPER  < 0x1ebb 0x1eba >
+MAPUPPER  < 0x1ebd 0x1ebc >
+MAPUPPER  < 0x1ebf 0x1ebe >
+MAPUPPER  < 0x1ec1 0x1ec0 >
+MAPUPPER  < 0x1ec3 0x1ec2 >
+MAPUPPER  < 0x1ec5 0x1ec4 >
+MAPUPPER  < 0x1ec7 0x1ec6 >
+MAPUPPER  < 0x1ec9 0x1ec8 >
+MAPUPPER  < 0x1ecb 0x1eca >
+MAPUPPER  < 0x1ecd 0x1ecc >
+MAPUPPER  < 0x1ecf 0x1ece >
+MAPUPPER  < 0x1ed1 0x1ed0 >
+MAPUPPER  < 0x1ed3 0x1ed2 >
+MAPUPPER  < 0x1ed5 0x1ed4 >
+MAPUPPER  < 0x1ed7 0x1ed6 >
+MAPUPPER  < 0x1ed9 0x1ed8 >
+MAPUPPER  < 0x1edb 0x1eda >
+MAPUPPER  < 0x1edd 0x1edc >
+MAPUPPER  < 0x1edf 0x1ede >
+MAPUPPER  < 0x1ee1 0x1ee0 >
+MAPUPPER  < 0x1ee3 0x1ee2 >
+MAPUPPER  < 0x1ee5 0x1ee4 >
+MAPUPPER  < 0x1ee7 0x1ee6 >
+MAPUPPER  < 0x1ee9 0x1ee8 >
+MAPUPPER  < 0x1eeb 0x1eea >
+MAPUPPER  < 0x1eed 0x1eec >
+MAPUPPER  < 0x1eef 0x1eee >
+MAPUPPER  < 0x1ef1 0x1ef0 >
+MAPUPPER  < 0x1ef3 0x1ef2 >
+MAPUPPER  < 0x1ef5 0x1ef4 >
+MAPUPPER  < 0x1ef7 0x1ef6 >
+MAPUPPER  < 0x1ef9 0x1ef8 >
+MAPLOWER  < 0x1e00 0x1e01 >
+MAPLOWER  < 0x1e02 0x1e03 >
+MAPLOWER  < 0x1e04 0x1e05 >
+MAPLOWER  < 0x1e06 0x1e07 >
+MAPLOWER  < 0x1e08 0x1e09 >
+MAPLOWER  < 0x1e0a 0x1e0b >
+MAPLOWER  < 0x1e0c 0x1e0d >
+MAPLOWER  < 0x1e0e 0x1e0f >
+MAPLOWER  < 0x1e10 0x1e11 >
+MAPLOWER  < 0x1e12 0x1e13 >
+MAPLOWER  < 0x1e14 0x1e15 >
+MAPLOWER  < 0x1e16 0x1e17 >
+MAPLOWER  < 0x1e18 0x1e19 >
+MAPLOWER  < 0x1e1a 0x1e1b >
+MAPLOWER  < 0x1e1c 0x1e1d >
+MAPLOWER  < 0x1e1e 0x1e1f >
+MAPLOWER  < 0x1e20 0x1e21 >
+MAPLOWER  < 0x1e22 0x1e23 >
+MAPLOWER  < 0x1e24 0x1e25 >
+MAPLOWER  < 0x1e26 0x1e27 >
+MAPLOWER  < 0x1e28 0x1e29 >
+MAPLOWER  < 0x1e2a 0x1e2b >
+MAPLOWER  < 0x1e2c 0x1e2d >
+MAPLOWER  < 0x1e2e 0x1e2f >
+MAPLOWER  < 0x1e30 0x1e31 >
+MAPLOWER  < 0x1e32 0x1e33 >
+MAPLOWER  < 0x1e34 0x1e35 >
+MAPLOWER  < 0x1e36 0x1e37 >
+MAPLOWER  < 0x1e38 0x1e39 >
+MAPLOWER  < 0x1e3a 0x1e3b >
+MAPLOWER  < 0x1e3c 0x1e3d >
+MAPLOWER  < 0x1e3e 0x1e3f >
+MAPLOWER  < 0x1e40 0x1e41 >
+MAPLOWER  < 0x1e42 0x1e43 >
+MAPLOWER  < 0x1e44 0x1e45 >
+MAPLOWER  < 0x1e46 0x1e47 >
+MAPLOWER  < 0x1e48 0x1e49 >
+MAPLOWER  < 0x1e4a 0x1e4b >
+MAPLOWER  < 0x1e4c 0x1e4d >
+MAPLOWER  < 0x1e4e 0x1e4f >
+MAPLOWER  < 0x1e50 0x1e51 >
+MAPLOWER  < 0x1e52 0x1e53 >
+MAPLOWER  < 0x1e54 0x1e55 >
+MAPLOWER  < 0x1e56 0x1e57 >
+MAPLOWER  < 0x1e58 0x1e59 >
+MAPLOWER  < 0x1e5a 0x1e5b >
+MAPLOWER  < 0x1e5c 0x1e5d >
+MAPLOWER  < 0x1e5e 0x1e5f >
+MAPLOWER  < 0x1e60 0x1e61 >
+MAPLOWER  < 0x1e62 0x1e63 >
+MAPLOWER  < 0x1e64 0x1e65 >
+MAPLOWER  < 0x1e66 0x1e67 >
+MAPLOWER  < 0x1e68 0x1e69 >
+MAPLOWER  < 0x1e6a 0x1e6b >
+MAPLOWER  < 0x1e6c 0x1e6d >
+MAPLOWER  < 0x1e6e 0x1e6f >
+MAPLOWER  < 0x1e70 0x1e71 >
+MAPLOWER  < 0x1e72 0x1e73 >
+MAPLOWER  < 0x1e74 0x1e75 >
+MAPLOWER  < 0x1e76 0x1e77 >
+MAPLOWER  < 0x1e78 0x1e79 >
+MAPLOWER  < 0x1e7a 0x1e7b >
+MAPLOWER  < 0x1e7c 0x1e7d >
+MAPLOWER  < 0x1e7e 0x1e7f >
+MAPLOWER  < 0x1e80 0x1e81 >
+MAPLOWER  < 0x1e82 0x1e83 >
+MAPLOWER  < 0x1e84 0x1e85 >
+MAPLOWER  < 0x1e86 0x1e87 >
+MAPLOWER  < 0x1e88 0x1e89 >
+MAPLOWER  < 0x1e8a 0x1e8b >
+MAPLOWER  < 0x1e8c 0x1e8d >
+MAPLOWER  < 0x1e8e 0x1e8f >
+MAPLOWER  < 0x1e90 0x1e91 >
+MAPLOWER  < 0x1e92 0x1e93 >
+MAPLOWER  < 0x1e94 0x1e95 >
+MAPLOWER  < 0x1ea0 0x1ea1 >
+MAPLOWER  < 0x1ea2 0x1ea3 >
+MAPLOWER  < 0x1ea4 0x1ea5 >
+MAPLOWER  < 0x1ea6 0x1ea7 >
+MAPLOWER  < 0x1ea8 0x1ea9 >
+MAPLOWER  < 0x1eaa 0x1eab >
+MAPLOWER  < 0x1eac 0x1ead >
+MAPLOWER  < 0x1eae 0x1eaf >
+MAPLOWER  < 0x1eb0 0x1eb1 >
+MAPLOWER  < 0x1eb2 0x1eb3 >
+MAPLOWER  < 0x1eb4 0x1eb5 >
+MAPLOWER  < 0x1eb6 0x1eb7 >
+MAPLOWER  < 0x1eb8 0x1eb9 >
+MAPLOWER  < 0x1eba 0x1ebb >
+MAPLOWER  < 0x1ebc 0x1ebd >
+MAPLOWER  < 0x1ebe 0x1ebf >
+MAPLOWER  < 0x1ec0 0x1ec1 >
+MAPLOWER  < 0x1ec2 0x1ec3 >
+MAPLOWER  < 0x1ec4 0x1ec5 >
+MAPLOWER  < 0x1ec6 0x1ec7 >
+MAPLOWER  < 0x1ec8 0x1ec9 >
+MAPLOWER  < 0x1eca 0x1ecb >
+MAPLOWER  < 0x1ecc 0x1ecd >
+MAPLOWER  < 0x1ece 0x1ecf >
+MAPLOWER  < 0x1ed0 0x1ed1 >
+MAPLOWER  < 0x1ed2 0x1ed3 >
+MAPLOWER  < 0x1ed4 0x1ed5 >
+MAPLOWER  < 0x1ed6 0x1ed7 >
+MAPLOWER  < 0x1ed8 0x1ed9 >
+MAPLOWER  < 0x1eda 0x1edb >
+MAPLOWER  < 0x1edc 0x1edd >
+MAPLOWER  < 0x1ede 0x1edf >
+MAPLOWER  < 0x1ee0 0x1ee1 >
+MAPLOWER  < 0x1ee2 0x1ee3 >
+MAPLOWER  < 0x1ee4 0x1ee5 >
+MAPLOWER  < 0x1ee6 0x1ee7 >
+MAPLOWER  < 0x1ee8 0x1ee9 >
+MAPLOWER  < 0x1eea 0x1eeb >
+MAPLOWER  < 0x1eec 0x1eed >
+MAPLOWER  < 0x1eee 0x1eef >
+MAPLOWER  < 0x1ef0 0x1ef1 >
+MAPLOWER  < 0x1ef2 0x1ef3 >
+MAPLOWER  < 0x1ef4 0x1ef5 >
+MAPLOWER  < 0x1ef6 0x1ef7 >
+MAPLOWER  < 0x1ef8 0x1ef9 >
+
+
+/*
+ * U+1F00 - U+1FFF : Greek Extended
+ */
+
+ALPHA     0x1f00 - 0x1f15  0x1f18 - 0x1f1d  0x1f20 - 0x1f45  0x1f48 - 0x1f4d
+ALPHA     0x1f50 - 0x1f57  0x1f59  0x1f5b  0x1f5d  0x1f5f - 0x1f7d
+ALPHA     0x1f80 - 0x1fb4  0x1fb6 - 0x1fbc  0x1fbe  0x1fc2 - 0x1fc4
+ALPHA     0x1fc6 - 0x1fcc  0x1fd0 - 0x1fd3  0x1fd6 - 0x1fdb  0x1fe0 - 0x1fec
+ALPHA     0x1ff2 - 0x1ff4  0x1ff6 - 0x1ffc
+GRAPH     0x1f00 - 0x1f15  0x1f18 - 0x1f1d  0x1f20 - 0x1f45  0x1f48 - 0x1f4d
+GRAPH     0x1f50 - 0x1f57  0x1f59  0x1f5b  0x1f5d  0x1f5f - 0x1f7d
+GRAPH     0x1f80 - 0x1fb4  0x1fb6 - 0x1fc4  0x1fc6 - 0x1fd3  0x1fd6 - 0x1fdb
+GRAPH     0x1fdd - 0x1fef  0x1ff2 - 0x1ff4  0x1ff6 - 0x1ffe
+LOWER     0x1f00 - 0x1f07  0x1f10 - 0x1f15  0x1f20 - 0x1f27  0x1f30 - 0x1f37
+LOWER     0x1f40 - 0x1f45  0x1f50 - 0x1f57  0x1f60 - 0x1f67  0x1f70 - 0x1f7d
+LOWER     0x1f80 - 0x1f87  0x1f90 - 0x1f97  0x1fa0 - 0x1fa7  0x1fb0 - 0x1fb4
+LOWER     0x1fb6  0x1fb7  0x1fbe  0x1fc2 - 0x1fc4  0x1fc6  0x1fc7
+LOWER     0x1fd0 - 0x1fd3  0x1fd6  0x1fd7  0x1fe0 - 0x1fe7  0x1ff2 - 0x1ff4
+LOWER     0x1ff6  0x1ff7
+PUNCT     0x1fbd  0x1fbf - 0x1fc1  0x1fcd - 0x1fcf  0x1fdd - 0x1fdf
+PUNCT     0x1fed - 0x1fef  0x1ffd  0x1ffe
+UPPER     0x1f08 - 0x1f0f  0x1f18 - 0x1f1d  0x1f28 - 0x1f2f  0x1f38 - 0x1f3f
+UPPER     0x1f48 - 0x1f4d  0x1f59  0x1f5b  0x1f5d  0x1f5f  0x1f68 - 0x1f6f
+UPPER     0x1fb8 - 0x1fbb  0x1fc8 - 0x1fcb  0x1fd8 - 0x1fdb  0x1fe8 - 0x1fec
+UPPER     0x1ff8 - 0x1ffb
+PRINT     0x1f00 - 0x1f15  0x1f18 - 0x1f1d  0x1f20 - 0x1f45  0x1f48 - 0x1f4d
+PRINT     0x1f50 - 0x1f57  0x1f59  0x1f5b  0x1f5d  0x1f5f - 0x1f7d
+PRINT     0x1f80 - 0x1fb4  0x1fb6 - 0x1fc4  0x1fc6 - 0x1fd3  0x1fd6 - 0x1fdb
+PRINT     0x1fdd - 0x1fef  0x1ff2 - 0x1ff4  0x1ff6 - 0x1ffe
+SWIDTH1   0x1f00 - 0x1f15  0x1f18 - 0x1f1d  0x1f20 - 0x1f45  0x1f48 - 0x1f4d
+SWIDTH1   0x1f50 - 0x1f57  0x1f59  0x1f5b  0x1f5d  0x1f5f - 0x1f7d
+SWIDTH1   0x1f80 - 0x1fb4  0x1fb6 - 0x1fc4  0x1fc6 - 0x1fd3  0x1fd6 - 0x1fdb
+SWIDTH1   0x1fdd - 0x1fef  0x1ff2 - 0x1ff4  0x1ff6 - 0x1ffe
+
+MAPUPPER  < 0x1f00 - 0x1f07 : 0x1f08 >
+MAPUPPER  < 0x1f10 - 0x1f15 : 0x1f18 >
+MAPUPPER  < 0x1f20 - 0x1f27 : 0x1f28 >
+MAPUPPER  < 0x1f30 - 0x1f37 : 0x1f38 >
+MAPUPPER  < 0x1f40 - 0x1f45 : 0x1f48 >
+MAPUPPER  < 0x1f51 0x1f59 >
+MAPUPPER  < 0x1f53 0x1f5b >
+MAPUPPER  < 0x1f55 0x1f5d >
+MAPUPPER  < 0x1f57 0x1f5f >
+MAPUPPER  < 0x1f60 - 0x1f67 : 0x1f68 >
+MAPUPPER  < 0x1f70 - 0x1f71 : 0x1fba >
+MAPUPPER  < 0x1f72 - 0x1f75 : 0x1fc8 >
+MAPUPPER  < 0x1f76 - 0x1f77 : 0x1fda >
+MAPUPPER  < 0x1f78 - 0x1f79 : 0x1ff8 >
+MAPUPPER  < 0x1f7a - 0x1f7b : 0x1fea >
+MAPUPPER  < 0x1f7c - 0x1f7d : 0x1ffa >
+MAPUPPER  < 0x1f80 - 0x1f87 : 0x1f88 >
+MAPUPPER  < 0x1f90 - 0x1f97 : 0x1f98 >
+MAPUPPER  < 0x1fa0 - 0x1fa7 : 0x1fa8 >
+MAPUPPER  < 0x1fb0 - 0x1fb1 : 0x1fb8 >
+MAPUPPER  < 0x1fb3 0x1fbc >
+MAPUPPER  < 0x1fbe 0x0399 >
+MAPUPPER  < 0x1fc3 0x1fcc >
+MAPUPPER  < 0x1fd0 - 0x1fd1 : 0x1fd8 >
+MAPUPPER  < 0x1fe0 - 0x1fe1 : 0x1fe8 >
+MAPUPPER  < 0x1fe5 0x1fec >
+MAPUPPER  < 0x1ff3 0x1ffc >
+MAPLOWER  < 0x1f08 - 0x1f0f : 0x1f00 >
+MAPLOWER  < 0x1f18 - 0x1f1d : 0x1f10 >
+MAPLOWER  < 0x1f28 - 0x1f2f : 0x1f20 >
+MAPLOWER  < 0x1f38 - 0x1f3f : 0x1f30 >
+MAPLOWER  < 0x1f48 - 0x1f4d : 0x1f40 >
+MAPLOWER  < 0x1f59 0x1f51 >
+MAPLOWER  < 0x1f5b 0x1f53 >
+MAPLOWER  < 0x1f5d 0x1f55 >
+MAPLOWER  < 0x1f5f 0x1f57 >
+MAPLOWER  < 0x1f68 - 0x1f6f : 0x1f60 >
+MAPLOWER  < 0x1f88 - 0x1f8f : 0x1f80 >
+MAPLOWER  < 0x1f98 - 0x1f9f : 0x1f90 >
+MAPLOWER  < 0x1fa8 - 0x1faf : 0x1fa0 >
+MAPLOWER  < 0x1fb8 - 0x1fb9 : 0x1fb0 >
+MAPLOWER  < 0x1fba - 0x1fbb : 0x1f70 >
+MAPLOWER  < 0x1fbc 0x1fb3 >
+MAPLOWER  < 0x1fc8 - 0x1fcb : 0x1f72 >
+MAPLOWER  < 0x1fcc 0x1fc3 >
+MAPLOWER  < 0x1fd8 - 0x1fd9 : 0x1fd0 >
+MAPLOWER  < 0x1fda - 0x1fdb : 0x1f76 >
+MAPLOWER  < 0x1fe8 - 0x1fe9 : 0x1fe0 >
+MAPLOWER  < 0x1fea - 0x1feb : 0x1f7a >
+MAPLOWER  < 0x1fec 0x1fe5 >
+MAPLOWER  < 0x1ff8 - 0x1ff9 : 0x1f78 >
+MAPLOWER  < 0x1ffa - 0x1ffb : 0x1f7c >
+MAPLOWER  < 0x1ffc 0x1ff3 >
+
+
+/*
+ * U+2000 - U+206F : General Punctuation
+ */
+
+CONTROL   0x200c - 0x200f  0x202a - 0x202e  0x2060 - 0x2063  0x206a - 0x206f
+GRAPH     0x2010 - 0x2027  0x2030 - 0x2052  0x2057
+PUNCT     0x2010 - 0x2027  0x2030 - 0x2052  0x2057
+SPACE     0x2000 - 0x200b  0x2028  0x2029  0x202f  0x205f
+BLANK     0x2000 - 0x200b  0x202f  0x205f
+PRINT     0x2000 - 0x200b  0x2010 - 0x2029  0x202f - 0x2052  0x2057
+PRINT     0x205f
+SWIDTH1   0x2000 - 0x200b  0x2010 - 0x2029  0x202f - 0x2052  0x2057
+SWIDTH1   0x205f
+
+
+/*
+ * U+2070 - U+209F : Superscripts and Subscripts
+ */
+
+ALPHA     0x2071  0x207f
+GRAPH     0x2070  0x2071  0x2074 - 0x208e
+LOWER     0x2071  0x207f
+PUNCT     0x207a - 0x207e  0x208a - 0x208e
+PRINT     0x2070  0x2071  0x2074 - 0x208e
+SPECIAL   0x2070  0x2074 - 0x2079  0x2080 - 0x2089
+SWIDTH1   0x2070  0x2071  0x2074 - 0x208e
+
+
+/*
+ * U+20A0 - U+20CF : Currency Symbols
+ */
+
+GRAPH     0x20a0 - 0x20b1
+PUNCT     0x20a0 - 0x20b1
+PRINT     0x20a0 - 0x20b1
+SWIDTH1   0x20a0 - 0x20b1
+
+
+/*
+ * U+20D0 - U+20FF : Combining Diacritical Marks for Symbols
+ */
+
+GRAPH     0x20d0 - 0x20eb
+PRINT     0x20d0 - 0x20eb
+SWIDTH0   0x20d0 - 0x20eb
+
+
+/*
+ * U+2100 - U+214F : Letterlike Symbols
+ */
+
+ALPHA     0x2102  0x2107  0x210a - 0x2113  0x2115  0x2119 - 0x211d
+ALPHA     0x2124  0x2126  0x2128  0x212a - 0x212d  0x212f - 0x2131
+ALPHA     0x2133  0x2134  0x2139  0x213d - 0x213f  0x2145 - 0x2149
+GRAPH     0x2100 - 0x213a  0x213d - 0x214b
+LOWER     0x210a  0x210e  0x210f  0x2113  0x212f  0x2134  0x2139
+LOWER     0x213d  0x2146 - 0x2149
+PUNCT     0x2100  0x2101  0x2103 - 0x2106  0x2108  0x2109  0x2114
+PUNCT     0x2116 - 0x2118  0x211e - 0x2123  0x2125  0x2127  0x2129
+PUNCT     0x212e  0x2132  0x213a  0x2140 - 0x2144  0x214a  0x214b
+UPPER     0x2102  0x2107  0x210b - 0x210d  0x2110 - 0x2112  0x2115
+UPPER     0x2119 - 0x211d  0x2124  0x2126  0x2128  0x212a - 0x212d
+UPPER     0x2130  0x2131  0x2133  0x213e  0x213f  0x2145
+PRINT     0x2100 - 0x213a  0x213d - 0x214b
+SWIDTH1   0x2100 - 0x213a  0x213d - 0x214b
+
+MAPLOWER  < 0x2126 0x03c9 >
+MAPLOWER  < 0x212a 'k' >
+MAPLOWER  < 0x212b 0x00e5 >
+
+
+/*
+ * U+2150 - U+218F : Number Forms
+ */
+
+GRAPH     0x2153 - 0x2183
+PRINT     0x2153 - 0x2183
+SPECIAL   0x2153 - 0x2183
+SWIDTH1   0x2153 - 0x2183
+
+MAPUPPER  < 0x2170 - 0x217f : 0x2160 >
+MAPLOWER  < 0x2160 - 0x216f : 0x2170 >
+
+
+/*
+ * U+2190 - U+21FF : Arrows
+ */
+
+GRAPH     0x2190 - 0x21ff
+PUNCT     0x2190 - 0x21ff
+PRINT     0x2190 - 0x21ff
+SWIDTH1   0x2190 - 0x21ff
+
+
+/*
+ * U+2200 - U+22FF : Mathematical Operators
+ */
+
+GRAPH     0x2200 - 0x22ff
+PUNCT     0x2200 - 0x22ff
+PRINT     0x2200 - 0x22ff
+SWIDTH1   0x2200 - 0x22ff
+
+
+/*
+ * U+2300 - U+23FF : Miscellaneous Technical
+ */
+
+GRAPH     0x2300 - 0x23ce
+PUNCT     0x2300 - 0x23ce
+PRINT     0x2300 - 0x23ce
+SWIDTH1   0x2300 - 0x2328  0x232b - 0x23ce
+SWIDTH2   0x2329  0x232a
+
+
+/*
+ * U+2400 - U+243F : Control Pictures
+ */
+
+GRAPH     0x2400 - 0x2426
+PUNCT     0x2400 - 0x2426
+PRINT     0x2400 - 0x2426
+SWIDTH1   0x2400 - 0x2426
+
+
+/*
+ * U+2440 - U+245F : Optical Character Recognition
+ */
+
+GRAPH     0x2440 - 0x244a
+PUNCT     0x2440 - 0x244a
+PRINT     0x2440 - 0x244a
+SWIDTH1   0x2440 - 0x244a
+
+
+/*
+ * U+2460 - U+24FF : Enclosed Alphanumerics
+ */
+
+GRAPH     0x2460 - 0x24fe
+PUNCT     0x249c - 0x24e9
+PRINT     0x2460 - 0x24fe
+SPECIAL   0x2460 - 0x249b  0x24ea - 0x24fe
+SWIDTH1   0x2460 - 0x24fe
+
+MAPUPPER  < 0x24d0 - 0x24e9 : 0x24b6 >
+MAPLOWER  < 0x24b6 - 0x24cf : 0x24d0 >
+
+
+/*
+ * U+2500 - U+257F : Box Drawing
+ */
+
+GRAPH     0x2500 - 0x257f
+PUNCT     0x2500 - 0x257f
+PRINT     0x2500 - 0x257f
+SWIDTH1   0x2500 - 0x257f
+
+
+/*
+ * U+2580 - U+259F : Block Elements
+ */
+
+GRAPH     0x2580 - 0x259f
+PUNCT     0x2580 - 0x259f
+PRINT     0x2580 - 0x259f
+SWIDTH1   0x2580 - 0x259f
+
+
+/*
+ * U+25A0 - U+25FF : Geometric Shapes
+ */
+
+GRAPH     0x25a0 - 0x25ff
+PUNCT     0x25a0 - 0x25ff
+PRINT     0x25a0 - 0x25ff
+SWIDTH1   0x25a0 - 0x25ff
+
+
+/*
+ * U+2600 - U+26FF : Miscellaneous Symbols
+ */
+
+GRAPH     0x2600 - 0x2613  0x2616  0x2617  0x2619 - 0x267d  0x2680 - 0x2689
+PUNCT     0x2600 - 0x2613  0x2616  0x2617  0x2619 - 0x267d  0x2680 - 0x2689
+PRINT     0x2600 - 0x2613  0x2616  0x2617  0x2619 - 0x267d  0x2680 - 0x2689
+SWIDTH1   0x2600 - 0x2613  0x2616  0x2617  0x2619 - 0x267d  0x2680 - 0x2689
+
+
+/*
+ * U+2700 - U+27BF : Dingbats
+ */
+
+GRAPH     0x2701 - 0x2704  0x2706 - 0x2709  0x270c - 0x2727  0x2729 - 0x274b
+GRAPH     0x274d  0x274f - 0x2752  0x2756  0x2758 - 0x275e  0x2761 - 0x2794
+GRAPH     0x2798 - 0x27af  0x27b1 - 0x27be
+PUNCT     0x2701 - 0x2704  0x2706 - 0x2709  0x270c - 0x2727  0x2729 - 0x274b
+PUNCT     0x274d  0x274f - 0x2752  0x2756  0x2758 - 0x275e  0x2761 - 0x2775
+PUNCT     0x2794  0x2798 - 0x27af  0x27b1 - 0x27be
+PRINT     0x2701 - 0x2704  0x2706 - 0x2709  0x270c - 0x2727  0x2729 - 0x274b
+PRINT     0x274d  0x274f - 0x2752  0x2756  0x2758 - 0x275e  0x2761 - 0x2794
+PRINT     0x2798 - 0x27af  0x27b1 - 0x27be
+SPECIAL   0x2776 - 0x2793
+SWIDTH1   0x2701 - 0x2704  0x2706 - 0x2709  0x270c - 0x2727  0x2729 - 0x274b
+SWIDTH1   0x274d  0x274f - 0x2752  0x2756  0x2758 - 0x275e  0x2761 - 0x2794
+SWIDTH1   0x2798 - 0x27af  0x27b1 - 0x27be
+
+
+/*
+ * U+27C0 - U+27EF : Miscellaneous Mathematical Symbols-A
+ */
+
+GRAPH     0x27d0 - 0x27eb
+PUNCT     0x27d0 - 0x27eb
+PRINT     0x27d0 - 0x27eb
+SWIDTH1   0x27d0 - 0x27eb
+
+
+/*
+ * U+27F0 - U+27FF : Supplemental Arrows-A
+ */
+
+GRAPH     0x27f0 - 0x27ff
+PUNCT     0x27f0 - 0x27ff
+PRINT     0x27f0 - 0x27ff
+SWIDTH1   0x27f0 - 0x27ff
+
+
+/*
+ * U+2800 - U+28FF : Braille Patterns
+ */
+
+GRAPH     0x2800 - 0x28ff
+PUNCT     0x2800 - 0x28ff
+PRINT     0x2800 - 0x28ff
+SWIDTH1   0x2800 - 0x28ff
+
+
+/*
+ * U+2900 - U+297F : Supplemental Arrows-B
+ */
+
+GRAPH     0x2900 - 0x297f
+PUNCT     0x2900 - 0x297f
+PRINT     0x2900 - 0x297f
+SWIDTH1   0x2900 - 0x297f
+
+
+/*
+ * U+2980 - U+29FF : Miscellaneous Mathematical Symbols-B
+ */
+
+GRAPH     0x2980 - 0x29ff
+PUNCT     0x2980 - 0x29ff
+PRINT     0x2980 - 0x29ff
+SWIDTH1   0x2980 - 0x29ff
+
+
+/*
+ * U+2A00 - U+2AFF : Supplemental Mathematical Operators
+ */
+
+GRAPH     0x2a00 - 0x2aff
+PUNCT     0x2a00 - 0x2aff
+PRINT     0x2a00 - 0x2aff
+SWIDTH1   0x2a00 - 0x2aff
+
+
+/*
+ * U+2E80 - U+2EFF : CJK Radicals Supplement
+ */
+
+GRAPH     0x2e80 - 0x2e99  0x2e9b - 0x2ef3
+PUNCT     0x2e80 - 0x2e99  0x2e9b - 0x2ef3
+PRINT     0x2e80 - 0x2e99  0x2e9b - 0x2ef3
+SWIDTH2   0x2e80 - 0x2e99  0x2e9b - 0x2ef3
+
+
+/*
+ * U+2F00 - U+2FDF : Kangxi Radicals
+ */
+
+GRAPH     0x2f00 - 0x2fd5
+PUNCT     0x2f00 - 0x2fd5
+PRINT     0x2f00 - 0x2fd5
+SWIDTH2   0x2f00 - 0x2fd5
+
+
+/*
+ * U+2FF0 - U+2FFF : Ideographic Description Characters
+ */
+
+GRAPH     0x2ff0 - 0x2ffb
+PUNCT     0x2ff0 - 0x2ffb
+PRINT     0x2ff0 - 0x2ffb
+SWIDTH2   0x2ff0 - 0x2ffb
+
+
+/*
+ * U+3000 - U+303F : CJK Symbols and Punctuation
+ */
+
+GRAPH     0x3001 - 0x303f
+PUNCT     0x3001 - 0x3004  0x3008 - 0x3020  0x3030  0x3036  0x3037
+PUNCT     0x303d - 0x303f
+SPACE     0x3000
+BLANK     0x3000
+PRINT     0x3000 - 0x303f
+IDEOGRAM  0x3006
+SPECIAL   0x3007  0x3021 - 0x3029  0x3038 - 0x303a
+SWIDTH1   0x303f
+SWIDTH2   0x3000 - 0x303e
+
+
+/*
+ * U+3040 - U+309F : Hiragana
+ */
+
+GRAPH     0x3041 - 0x3096  0x3099 - 0x309f
+PUNCT     0x309b  0x309c
+PRINT     0x3041 - 0x3096  0x3099 - 0x309f
+PHONOGRAM 0x3041 - 0x3096  0x309f
+SWIDTH0   0x3099 - 0x309a
+SWIDTH2   0x3041 - 0x3096  0x309b - 0x309f
+
+
+/*
+ * U+30A0 - U+30FF : Katakana
+ */
+
+GRAPH     0x30a0 - 0x30ff
+PUNCT     0x30a0  0x30fb
+PRINT     0x30a0 - 0x30ff
+PHONOGRAM 0x30a1 - 0x30fa  0x30ff
+SWIDTH2   0x30a0 - 0x30ff
+
+
+/*
+ * U+3100 - U+312F : Bopomofo
+ */
+
+GRAPH     0x3105 - 0x312c
+PRINT     0x3105 - 0x312c
+SWIDTH2   0x3105 - 0x312c
+
+
+/*
+ * U+3130 - U+318F : Hangul Compatibility Jamo
+ */
+
+GRAPH     0x3131 - 0x318e
+PRINT     0x3131 - 0x318e
+PHONOGRAM 0x3131 - 0x3163  0x3165 - 0x318e
+SWIDTH2   0x3131 - 0x318e
+
+
+/*
+ * U+3190 - U+319F : Kanbun
+ */
+
+GRAPH     0x3190 - 0x319f
+PUNCT     0x3190  0x3191  0x3196 - 0x319f
+PRINT     0x3190 - 0x319f
+SPECIAL   0x3192 - 0x3195
+SWIDTH2   0x3190 - 0x319f
+
+
+/*
+ * U+31A0 - U+31BF : Bopomofo Extended
+ */
+
+GRAPH     0x31a0 - 0x31b7
+PRINT     0x31a0 - 0x31b7
+SWIDTH2   0x31a0 - 0x31b7
+
+
+/*
+ * U+31F0 - U+31FF : Katakana Phonetic Extensions
+ */
+
+GRAPH     0x31f0 - 0x31ff
+PRINT     0x31f0 - 0x31ff
+PHONOGRAM 0x31f0 - 0x31ff
+SWIDTH2   0x31f0 - 0x31ff
+
+
+/*
+ * U+3200 - U+32FF : Enclosed CJK Letters and Months
+ */
+
+GRAPH     0x3200 - 0x321c  0x3220 - 0x3243  0x3251 - 0x327b  0x327f - 0x32cb
+GRAPH     0x32d0 - 0x32fe
+PUNCT     0x3200 - 0x321c  0x322a - 0x3243  0x3260 - 0x327b  0x327f
+PUNCT     0x328a - 0x32b0  0x32c0 - 0x32cb  0x32d0 - 0x32fe
+PRINT     0x3200 - 0x321c  0x3220 - 0x3243  0x3251 - 0x327b  0x327f - 0x32cb
+PRINT     0x32d0 - 0x32fe
+SPECIAL   0x3220 - 0x3229  0x3251 - 0x325f  0x3280 - 0x3289  0x32b1 - 0x32bf
+SWIDTH2   0x3200 - 0x321c  0x3220 - 0x3243  0x3251 - 0x327b  0x327f - 0x32cb
+SWIDTH2   0x32d0 - 0x32fe
+
+
+/*
+ * U+3300 - U+33FF : CJK Compatibility
+ */
+
+GRAPH     0x3300 - 0x3376  0x337b - 0x33dd  0x33e0 - 0x33fe
+PUNCT     0x3300 - 0x3376  0x337b - 0x33dd  0x33e0 - 0x33fe
+PRINT     0x3300 - 0x3376  0x337b - 0x33dd  0x33e0 - 0x33fe
+SWIDTH2   0x3300 - 0x3376  0x337b - 0x33dd  0x33e0 - 0x33fe
+
+
+/*
+ * U+3400 - U+4DBF : CJK Unified Ideographs Extension A
+ */
+
+GRAPH     0x3400 - 0x4db5
+PRINT     0x3400 - 0x4db5
+IDEOGRAM  0x3400 - 0x4db5
+SWIDTH2   0x3400 - 0x4db5
+
+
+/*
+ * U+4E00 - U+9FFF : CJK Unified Ideographs
+ */
+
+GRAPH     0x4e00 - 0x9fa5
+PRINT     0x4e00 - 0x9fa5
+IDEOGRAM  0x4e00 - 0x9fa5
+SWIDTH2   0x4e00 - 0x9fa5
+
+
+/*
+ * U+A000 - U+A48F : Yi Syllables
+ */
+
+GRAPH     0xa000 - 0xa48c
+PRINT     0xa000 - 0xa48c
+PHONOGRAM 0xa000 - 0xa48c
+SWIDTH2   0xa000 - 0xa48c
+
+
+/*
+ * U+A490 - U+A4CF : Yi Radicals
+ */
+
+GRAPH     0xa490 - 0xa4c6
+PUNCT     0xa490 - 0xa4c6
+PRINT     0xa490 - 0xa4c6
+SWIDTH2   0xa490 - 0xa4c6
+
+
+/*
+ * U+AC00 - U+D7AF : Hangul Syllables
+ */
+
+GRAPH     0xac00 - 0xd7a3
+PRINT     0xac00 - 0xd7a3
+PHONOGRAM 0xac00 - 0xd7a3
+SWIDTH2   0xac00 - 0xd7a3
+
+
+/*
+ * U+D800 - U+DB7F : High Surrogates
+ */
+
+PRINT     0xd800 - 0xdb7f
+SWIDTH1   0xd800 - 0xdb7f
+
+
+/*
+ * U+DB80 - U+DBFF : High Private Use Surrogates
+ */
+
+PRINT     0xdb80 - 0xdbff
+SWIDTH1   0xdb80 - 0xdbff
+
+
+/*
+ * U+DC00 - U+DFFF : Low Surrogates
+ */
+
+PRINT     0xdc00 - 0xdfff
+SWIDTH1   0xdc00 - 0xdfff
+
+
+/*
+ * U+E000 - U+F8FF : Private Use Area
+ */
+
+GRAPH     0xe000 - 0xf8ff
+PRINT     0xe000 - 0xf8ff
+SWIDTH1   0xe000 - 0xf8ff
+
+
+/*
+ * U+F900 - U+FAFF : CJK Compatibility Ideographs
+ */
+
+GRAPH     0xf900 - 0xfa2d  0xfa30 - 0xfa6a
+PRINT     0xf900 - 0xfa2d  0xfa30 - 0xfa6a
+IDEOGRAM  0xf900 - 0xfa2d  0xfa30 - 0xfa6a
+SWIDTH2   0xf900 - 0xfa2d  0xfa30 - 0xfa6a
+
+
+/*
+ * U+FB00 - U+FB4F : Alphabetic Presentation Forms
+ */
+
+ALPHA     0xfb00 - 0xfb06  0xfb13 - 0xfb17
+GRAPH     0xfb00 - 0xfb06  0xfb13 - 0xfb17  0xfb1d - 0xfb36  0xfb38 - 0xfb3c
+GRAPH     0xfb3e  0xfb40  0xfb41  0xfb43  0xfb44  0xfb46 - 0xfb4f
+LOWER     0xfb00 - 0xfb06  0xfb13 - 0xfb17
+PUNCT     0xfb29
+PRINT     0xfb00 - 0xfb06  0xfb13 - 0xfb17  0xfb1d - 0xfb36  0xfb38 - 0xfb3c
+PRINT     0xfb3e  0xfb40  0xfb41  0xfb43  0xfb44  0xfb46 - 0xfb4f
+SWIDTH1   0xfb00 - 0xfb06  0xfb13 - 0xfb17  0xfb1d - 0xfb36  0xfb38 - 0xfb3c
+SWIDTH1   0xfb3e  0xfb40  0xfb41  0xfb43  0xfb44  0xfb46 - 0xfb4f
+
+
+/*
+ * U+FB50 - U+FDFF : Arabic Presentation Forms-A
+ */
+
+GRAPH     0xfb50 - 0xfbb1  0xfbd3 - 0xfd3f  0xfd50 - 0xfd8f  0xfd92 - 0xfdc7
+GRAPH     0xfdf0 - 0xfdfc
+PUNCT     0xfd3e  0xfd3f  0xfdfc
+PRINT     0xfb50 - 0xfbb1  0xfbd3 - 0xfd3f  0xfd50 - 0xfd8f  0xfd92 - 0xfdc7
+PRINT     0xfdf0 - 0xfdfc
+SWIDTH1   0xfb50 - 0xfbb1  0xfbd3 - 0xfd3f  0xfd50 - 0xfd8f  0xfd92 - 0xfdc7
+SWIDTH1   0xfdf0 - 0xfdfc
+
+
+/*
+ * U+FE00 - U+FE0F : Variation Selectors
+ */
+
+GRAPH     0xfe00 - 0xfe0f
+PRINT     0xfe00 - 0xfe0f
+SWIDTH1   0xfe00 - 0xfe0f
+
+
+/*
+ * U+FE20 - U+FE2F : Combining Half Marks
+ */
+
+GRAPH     0xfe20 - 0xfe23
+PRINT     0xfe20 - 0xfe23
+SWIDTH0   0xfe20 - 0xfe23
+
+
+/*
+ * U+FE30 - U+FE4F : CJK Compatibility Forms
+ */
+
+GRAPH     0xfe30 - 0xfe46  0xfe49 - 0xfe4f
+PUNCT     0xfe30 - 0xfe46  0xfe49 - 0xfe4f
+PRINT     0xfe30 - 0xfe46  0xfe49 - 0xfe4f
+SWIDTH2   0xfe30 - 0xfe46  0xfe49 - 0xfe4f
+
+
+/*
+ * U+FE50 - U+FE6F : Small Form Variants
+ */
+
+GRAPH     0xfe50 - 0xfe52  0xfe54 - 0xfe66  0xfe68 - 0xfe6b
+PUNCT     0xfe50 - 0xfe52  0xfe54 - 0xfe66  0xfe68 - 0xfe6b
+PRINT     0xfe50 - 0xfe52  0xfe54 - 0xfe66  0xfe68 - 0xfe6b
+SWIDTH2   0xfe50 - 0xfe52  0xfe54 - 0xfe66  0xfe68 - 0xfe6b
+
+
+/*
+ * U+FE70 - U+FEFF : Arabic Presentation Forms-B
+ */
+
+CONTROL   0xfeff
+GRAPH     0xfe70 - 0xfe74  0xfe76 - 0xfefc
+PRINT     0xfe70 - 0xfe74  0xfe76 - 0xfefc
+SWIDTH1   0xfe70 - 0xfe74  0xfe76 - 0xfefc
+
+
+/*
+ * U+FF00 - U+FFEF : Halfwidth and Fullwidth Forms
+ */
+
+ALPHA     0xff21 - 0xff3a  0xff41 - 0xff5a
+GRAPH     0xff01 - 0xffbe  0xffc2 - 0xffc7  0xffca - 0xffcf  0xffd2 - 0xffd7
+GRAPH     0xffda - 0xffdc  0xffe0 - 0xffe6  0xffe8 - 0xffee
+LOWER     0xff41 - 0xff5a
+PUNCT     0xff01 - 0xff0f  0xff1a - 0xff20  0xff3b - 0xff40  0xff5b - 0xff65
+PUNCT     0xffe0 - 0xffe6  0xffe8 - 0xffee
+UPPER     0xff21 - 0xff3a
+PRINT     0xff01 - 0xffbe  0xffc2 - 0xffc7  0xffca - 0xffcf  0xffd2 - 0xffd7
+PRINT     0xffda - 0xffdc  0xffe0 - 0xffe6  0xffe8 - 0xffee
+PHONOGRAM 0xff66 - 0xff6f  0xff71 - 0xff9d  0xffa1 - 0xffbe  0xffc2 - 0xffc7
+PHONOGRAM 0xffca - 0xffcf  0xffd2 - 0xffd7  0xffda - 0xffdc
+SWIDTH1   0xff61 - 0xffbe  0xffc2 - 0xffc7  0xffca - 0xffcf  0xffd2 - 0xffd7
+SWIDTH1   0xffda - 0xffdc  0xffe8 - 0xffee
+SWIDTH2   0xff01 - 0xff60  0xffe0 - 0xffe6
+
+MAPUPPER  < 0xff41 - 0xff5a : 0xff21 >
+MAPLOWER  < 0xff21 - 0xff3a : 0xff41 >
+
+
+/*
+ * U+FFF0 - U+FFFF : Specials
+ */
+
+CONTROL   0xfff9 - 0xfffb
+GRAPH     0xfffc  0xfffd
+PUNCT     0xfffc  0xfffd
+PRINT     0xfffc  0xfffd
+SWIDTH1   0xfffc  0xfffd
+
+
+/*
+ * U+10300 - U+1032F : Old Italic
+ */
+
+GRAPH     0x10300 - 0x1031e  0x10320 - 0x10323
+PRINT     0x10300 - 0x1031e  0x10320 - 0x10323
+SPECIAL   0x10320 - 0x10323
+SWIDTH1   0x10300 - 0x1031e  0x10320 - 0x10323
+
+
+/*
+ * U+10330 - U+1034F : Gothic
+ */
+
+GRAPH     0x10330 - 0x1034a
+PRINT     0x10330 - 0x1034a
+SPECIAL   0x1034a
+SWIDTH1   0x10330 - 0x1034a
+
+
+/*
+ * U+10400 - U+1044F : Deseret
+ */
+
+ALPHA     0x10400 - 0x10425  0x10428 - 0x1044d
+GRAPH     0x10400 - 0x10425  0x10428 - 0x1044d
+LOWER     0x10428 - 0x1044d
+UPPER     0x10400 - 0x10425
+PRINT     0x10400 - 0x10425  0x10428 - 0x1044d
+SWIDTH1   0x10400 - 0x10425  0x10428 - 0x1044d
+
+MAPUPPER  < 0x10428 - 0x1044d : 0x10400 >
+MAPLOWER  < 0x10400 - 0x10425 : 0x10428 >
+
+
+/*
+ * U+1D000 - U+1D0FF : Byzantine Musical Symbols
+ */
+
+GRAPH     0x1d000 - 0x1d0f5
+PUNCT     0x1d000 - 0x1d0f5
+PRINT     0x1d000 - 0x1d0f5
+SWIDTH1   0x1d000 - 0x1d0f5
+
+
+/*
+ * U+1D100 - U+1D1FF : Musical Symbols
+ */
+
+CONTROL   0x1d173 - 0x1d17a
+GRAPH     0x1d100 - 0x1d126  0x1d12a - 0x1d172  0x1d17b - 0x1d1dd
+PUNCT     0x1d100 - 0x1d126  0x1d12a - 0x1d164  0x1d16a - 0x1d16c
+PUNCT     0x1d183  0x1d184  0x1d18c - 0x1d1a9  0x1d1ae - 0x1d1dd
+PRINT     0x1d100 - 0x1d126  0x1d12a - 0x1d158  0x1d15a - 0x1d172
+PRINT     0x1d17b - 0x1d1dd
+SWIDTH0   0x1d165 - 0x1d169  0x1d16d - 0x1d172  0x1d17b - 0x1d182
+SWIDTH0   0x1d185 - 0x1d18b  0x1d1aa - 0x1d1ad
+SWIDTH1   0x1d100 - 0x1d126  0x1d12a - 0x1d158  0x1d15a - 0x1d164
+SWIDTH1   0x1d16a - 0x1d16c  0x1d183   0x1d184  0x1d18c - 0x1d1a9
+SWIDTH1   0x1d1ae - 0x1d1dd
+
+
+/*
+ * U+1D400 - U+1D7FF : Mathematical Alphanumeric Symbols
+ */
+
+ALPHA     0x1d400 - 0x1d454  0x1d456 - 0x1d49c  0x1d49e  0x1d49f
+ALPHA     0x1d4a2  0x1d4a5  0x1d4a6  0x1d4a9 - 0x1d4ac  0x1d4ae - 0x1d4b9
+ALPHA     0x1d4bb  0x1d4bd - 0x1d4c0  0x1d4c2  0x1d4c3  0x1d4c5 - 0x1d505
+ALPHA     0x1d507 - 0x1d50a  0x1d50d - 0x1d514  0x1d516 - 0x1d51c
+ALPHA     0x1d51e - 0x1d539  0x1d53b - 0x1d53e  0x1d540 - 0x1d544
+ALPHA     0x1d546  0x1d54a - 0x1d550  0x1d552 - 0x1d6a3  0x1d6a8 - 0x1d6c0
+ALPHA     0x1d6c2 - 0x1d6da  0x1d6dc - 0x1d6fa  0x1d6fc - 0x1d714
+ALPHA     0x1d716 - 0x1d734  0x1d736 - 0x1d74e  0x1d750 - 0x1d76e
+ALPHA     0x1d770 - 0x1d788  0x1d78a - 0x1d7a8  0x1d7aa - 0x1d7c2
+ALPHA     0x1d7c4 - 0x1d7c9
+GRAPH     0x1d400 - 0x1d454  0x1d456 - 0x1d49c  0x1d49e  0x1d49f
+GRAPH     0x1d4a2  0x1d4a5  0x1d4a6  0x1d4a9 - 0x1d4ac  0x1d4ae - 0x1d4b9
+GRAPH     0x1d4bb  0x1d4bd - 0x1d4c0  0x1d4c2  0x1d4c3  0x1d4c5 - 0x1d505
+GRAPH     0x1d507 - 0x1d50a  0x1d50d - 0x1d514  0x1d516 - 0x1d51c
+GRAPH     0x1d51e - 0x1d539  0x1d53b - 0x1d53e  0x1d540 - 0x1d544
+GRAPH     0x1d546  0x1d54a - 0x1d550  0x1d552 - 0x1d6a3  0x1d6a8 - 0x1d7c9
+GRAPH     0x1d7ce - 0x1d7ff
+LOWER     0x1d41a - 0x1d433  0x1d44e - 0x1d454  0x1d456 - 0x1d467
+LOWER     0x1d482 - 0x1d49b  0x1d4b6 - 0x1d4b9  0x1d4bb  0x1d4bd - 0x1d4c0
+LOWER     0x1d4c2  0x1d4c3  0x1d4c5 - 0x1d4cf  0x1d4ea - 0x1d503
+LOWER     0x1d51e - 0x1d537  0x1d552 - 0x1d56b  0x1d586 - 0x1d59f
+LOWER     0x1d5ba - 0x1d5d3  0x1d5ee - 0x1d607  0x1d622 - 0x1d63b
+LOWER     0x1d656 - 0x1d66f  0x1d68a - 0x1d6a3  0x1d6c2 - 0x1d6da
+LOWER     0x1d6dc - 0x1d6e1  0x1d6fc - 0x1d714  0x1d716 - 0x1d71b
+LOWER     0x1d736 - 0x1d74e  0x1d750 - 0x1d755  0x1d770 - 0x1d788
+LOWER     0x1d78a - 0x1d78f  0x1d7aa - 0x1d7c2  0x1d7c4 - 0x1d7c9
+PUNCT     0x1d6c1  0x1d6db  0x1d6fb  0x1d715  0x1d735  0x1d74f
+PUNCT     0x1d76f  0x1d789  0x1d7a9  0x1d7c3
+UPPER     0x1d400 - 0x1d419  0x1d434 - 0x1d44d  0x1d468 - 0x1d481
+UPPER     0x1d49c  0x1d49e  0x1d49f  0x1d4a2  0x1d4a5  0x1d4a6
+UPPER     0x1d4a9 - 0x1d4ac  0x1d4ae - 0x1d4b5  0x1d4d0 - 0x1d4e9
+UPPER     0x1d504  0x1d505  0x1d507 - 0x1d50a  0x1d50d - 0x1d514
+UPPER     0x1d516 - 0x1d51c  0x1d538  0x1d539  0x1d53b - 0x1d53e
+UPPER     0x1d540 - 0x1d544  0x1d546  0x1d54a - 0x1d550  0x1d56c - 0x1d585
+UPPER     0x1d5a0 - 0x1d5b9  0x1d5d4 - 0x1d5ed  0x1d608 - 0x1d621
+UPPER     0x1d63c - 0x1d655  0x1d670 - 0x1d689  0x1d6a8 - 0x1d6c0
+UPPER     0x1d6e2 - 0x1d6fa  0x1d71c - 0x1d734  0x1d756 - 0x1d76e
+UPPER     0x1d790 - 0x1d7a8
+PRINT     0x1d400 - 0x1d454  0x1d456 - 0x1d49c  0x1d49e  0x1d49f
+PRINT     0x1d4a2  0x1d4a5  0x1d4a6  0x1d4a9 - 0x1d4ac  0x1d4ae - 0x1d4b9
+PRINT     0x1d4bb  0x1d4bd - 0x1d4c0  0x1d4c2  0x1d4c3  0x1d4c5 - 0x1d505
+PRINT     0x1d507 - 0x1d50a  0x1d50d - 0x1d514  0x1d516 - 0x1d51c
+PRINT     0x1d51e - 0x1d539  0x1d53b - 0x1d53e  0x1d540 - 0x1d544
+PRINT     0x1d546  0x1d54a - 0x1d550  0x1d552 - 0x1d6a3  0x1d6a8 - 0x1d7c9
+PRINT     0x1d7ce - 0x1d7ff
+SWIDTH1   0x1d400 - 0x1d454  0x1d456 - 0x1d49c  0x1d49e  0x1d49f
+SWIDTH1   0x1d4a2  0x1d4a5  0x1d4a6  0x1d4a9 - 0x1d4ac  0x1d4ae - 0x1d4b9
+SWIDTH1   0x1d4bb  0x1d4bd - 0x1d4c0  0x1d4c2  0x1d4c3  0x1d4c5 - 0x1d505
+SWIDTH1   0x1d507 - 0x1d50a  0x1d50d - 0x1d514  0x1d516 - 0x1d51c
+SWIDTH1   0x1d51e - 0x1d539  0x1d53b - 0x1d53e  0x1d540 - 0x1d544
+SWIDTH1   0x1d546  0x1d54a - 0x1d550  0x1d552 - 0x1d6a3  0x1d6a8 - 0x1d7c9
+SWIDTH1   0x1d7ce - 0x1d7ff
+
+
+/*
+ * U+20000 - U+2A6DF : CJK Unified Ideographs Extension B
+ */
+
+GRAPH     0x20000 - 0x2a6d6
+PRINT     0x20000 - 0x2a6d6
+IDEOGRAM  0x20000 - 0x2a6d6
+SWIDTH2   0x20000 - 0x2a6d6
+
+
+/*
+ * U+2F800 - U+2FA1F : CJK Compatibility Ideographs Supplement
+ */
+
+GRAPH     0x2f800 - 0x2fa1d
+PRINT     0x2f800 - 0x2fa1d
+IDEOGRAM  0x2f800 - 0x2fa1d
+SWIDTH2   0x2f800 - 0x2fa1d
+
+
+/*
+ * U+E0000 - U+E007F : Tags
+ */
+
+CONTROL   0xe0001  0xe0020 - 0xe007f
+
+
+/*
+ * U+F0000 - U+FFFFF : Supplementary Private Use Area-A
+ */
+
+GRAPH     0xf0000 - 0xffffd
+PRINT     0xf0000 - 0xffffd
+SWIDTH1   0xf0000 - 0xffffd
+
+
+/*
+ * U+100000 - U+10FFFF : Supplementary Private Use Area-B
+ */
+
+GRAPH     0x100000 - 0x10fffd
+PRINT     0x100000 - 0x10fffd
+SWIDTH1   0x100000 - 0x10fffd
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/ctype/extern.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+int yylex(void);
+int yyparse(void);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/ctype/ldef.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+#include "runefile.h"
+#include "_ctype.h"
+#include "wctype.h"
+
+/*
+ * This should look a LOT like a _RuneEntry
+ */
+typedef struct rune_list {
+    int32_t		min;
+    int32_t 		max;
+    int32_t 		map;
+    uint32_t		*types;
+    struct rune_list	*next;
+} rune_list;
+
+typedef struct rune_map {
+    uint32_t		map[_CACHED_RUNES];
+    rune_list		*root;
+} rune_map;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/ctype/mkctype_lex.l	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,169 @@
+%{
+/*-
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "ldef.h"
+#include "mkctype_yacc.tab.h"
+#include "extern.h"
+%}
+
+ODIGIT	[0-7]
+DIGIT	[0-9]
+XDIGIT	[0-9a-fA-F]
+W	[\t\n\r ]
+
+%%
+\'.\'				{ yylval.rune = (unsigned char)yytext[1];
+				  return(RUNE); }
+
+'\\a'				{ yylval.rune = '\a';
+				  return(RUNE); }
+'\\b'				{ yylval.rune = '\b';
+				  return(RUNE); }
+'\\f'				{ yylval.rune = '\f';
+				  return(RUNE); }
+'\\n'				{ yylval.rune = '\n';
+				  return(RUNE); }
+'\\r'				{ yylval.rune = '\r';
+				  return(RUNE); }
+'\\t'				{ yylval.rune = '\t';
+				  return(RUNE); }
+'\\v'				{ yylval.rune = '\v';
+				  return(RUNE); }
+
+0x{XDIGIT}+			{ yylval.rune = strtol(yytext, 0, 16);
+				  return(RUNE); }
+0{ODIGIT}+			{ yylval.rune = strtol(yytext, 0, 8);
+				  return(RUNE); }
+{DIGIT}+			{ yylval.rune = strtol(yytext, 0, 10);
+				  return(RUNE); }
+
+
+MAPLOWER			{ return(MAPLOWER); }
+MAPUPPER			{ return(MAPUPPER); }
+TODIGIT				{ return(DIGITMAP); }
+INVALID				{ return(INVALID); }
+
+ALPHA				{ yylval.i = _CTYPE_A|_CTYPE_R|_CTYPE_G; 
+				  return(LIST); }
+CONTROL				{ yylval.i = _ISCNTRL;
+				  return(LIST); }
+DIGIT				{ yylval.i = _ISDIGIT|_ISPRINT|_ISGRAPH;
+				  return(LIST); }
+GRAPH				{ yylval.i = _ISGRAPH|_ISPRINT;
+				  return(LIST); }
+LOWER				{ yylval.i = _ISLOWER|_ISPRINT|_ISGRAPH;
+				  return(LIST); }
+PUNCT				{ yylval.i = _ISPUNCT|_ISPRINT|_ISGRAPH;
+				  return(LIST); }
+SPACE				{ yylval.i = _ISSPACE;
+				  return(LIST); }
+UPPER				{ yylval.i = _ISUPPER|_ISPRINT|_ISGRAPH;
+				  return(LIST); }
+XDIGIT				{ yylval.i = _ISXDIGIT|_ISPRINT|_ISGRAPH;
+				  return(LIST); }
+BLANK				{ yylval.i = _ISBLANK;
+				  return(LIST); }
+PRINT				{ yylval.i = _ISPRINT;
+				  return(LIST); }
+IDEOGRAM			{ yylval.i = _E2|_ISPRINT|_ISGRAPH;
+				  return(LIST); }
+SPECIAL				{ yylval.i = _E5|_ISPRINT|_ISGRAPH;
+				  return(LIST); }
+PHONOGRAM			{ yylval.i = _E1|_ISPRINT|_ISGRAPH;
+				  return(LIST); }
+SWIDTH0				{ yylval.i = _CTYPE_SW0; return(LIST); }
+SWIDTH1				{ yylval.i = _CTYPE_SW1; return(LIST); }
+SWIDTH2				{ yylval.i = _CTYPE_SW2; return(LIST); }
+SWIDTH3				{ yylval.i = _CTYPE_SW3; return(LIST); }
+
+VARIABLE[\t ]			{ static char vbuf[1024];
+				  char *v = vbuf;
+				  while (((*v = input()) != 0) && (*v != '\n'))
+					++v;
+                                  if (*v) {
+					unput(*v);
+					*v = 0;
+				  }
+				  yylval.str = vbuf;
+				  return(VARIABLE);
+				}
+
+ENCODING			{ return(ENCODING); }
+
+\".*\"				{ char *e = yytext + 1;
+				  yylval.str = e;
+				  while (*e && *e != '"')
+					++e;
+				  *e = 0;
+				  return(STRING); }
+
+\<|\(|\[			{ return(LBRK); }
+
+\>|\)|\]			{ return(RBRK); }
+
+\-				{ return(THRU); }
+\.\.\.				{ return(THRU); }
+
+\:				{ return(':'); }
+
+{W}+				;
+
+^\#.*\n				;
+\/\*				{ char lc = 0;
+				  do {
+				    while ((lc) != '*')
+					if ((lc = input()) == 0)
+					    break;
+				  } while((lc = input()) != '/');
+				}
+
+\\$				;
+.				{ (void) printf("Lex is skipping '%s'\n",
+				  yytext); }
+%%
+
+#if	!defined(yywrap)
+int
+yywrap(void)
+{
+	return(1);
+}
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/ctype/mkctype_yacc.y	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,848 @@
+%{
+/*-
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <arpa/inet.h>
+
+#include <ctype.h>
+#include <err.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "ldef.h"
+#include "extern.h"
+#include "runefile.h"
+
+static void *xmalloc(unsigned int sz);
+static uint32_t *xlalloc(unsigned int sz);
+void yyerror(const char *s);
+static uint32_t *xrelalloc(uint32_t *old, unsigned int sz);
+static void dump_tables(void);
+static void cleanout(void);
+
+const char	*locale_file = "<stdout>";
+
+rune_map	maplower = { { 0 }, NULL };
+rune_map	mapupper = { { 0 }, NULL };
+rune_map	types = { { 0 }, NULL };
+
+_FileRuneLocale	new_locale = { 0 };
+char		*variable = NULL;
+
+void set_map(rune_map *, rune_list *, uint32_t);
+void add_map(rune_map *, rune_list *, uint32_t);
+static void usage(void);
+%}
+
+%union	{
+    int32_t	rune;
+    int		i;
+    char	*str;
+
+    rune_list	*list;
+}
+
+%token	<rune>	RUNE
+%token		LBRK
+%token		RBRK
+%token		THRU
+%token		MAPLOWER
+%token		MAPUPPER
+%token		DIGITMAP
+%token	<i>	LIST
+%token	<str>	VARIABLE
+%token		ENCODING
+%token		INVALID
+%token	<str>	STRING
+
+%type	<list>	list
+%type	<list>	map
+
+
+%%
+
+locale	:	/* empty */
+	|	table
+	    	{ dump_tables(); }
+	;
+
+table	:	entry
+	|	table entry
+	;
+
+entry	:	ENCODING STRING
+		{ if (strcmp($2, "NONE") &&
+		      strcmp($2, "ASCII") &&
+		      strcmp($2, "UTF-8") &&
+		      strcmp($2, "EUC") &&
+		      strcmp($2, "GBK") &&
+		      strcmp($2, "GB18030") &&
+		      strcmp($2, "GB2312") &&
+		      strcmp($2, "BIG5") &&
+		      strcmp($2, "MSKanji"))
+			warnx("ENCODING %s is not supported by libc", $2);
+		(void) strncpy(new_locale.encoding, $2,
+		    sizeof(new_locale.encoding)); }
+	|	VARIABLE
+		{ new_locale.variable_len = strlen($1) + 1;
+		  variable = xmalloc(new_locale.variable_len);
+		  (void) strcpy(variable, $1);
+		}
+	|	INVALID RUNE
+		{ warnx("the INVALID keyword is deprecated"); }
+	|	LIST list
+		{ set_map(&types, $2, $1); }
+	|	MAPLOWER map
+		{ set_map(&maplower, $2, 0); }
+	|	MAPUPPER map
+		{ set_map(&mapupper, $2, 0); }
+	|	DIGITMAP map
+		{ if (debug)
+			warnx("this system does not support DIGITMAP");
+		}
+	;
+
+list	:	RUNE
+		{
+		    $$ = (rune_list *)xmalloc(sizeof(rune_list));
+		    $$->min = $1;
+		    $$->max = $1;
+		    $$->next = 0;
+		}
+	|	RUNE THRU RUNE
+		{
+		    $$ = (rune_list *)xmalloc(sizeof(rune_list));
+		    $$->min = $1;
+		    $$->max = $3;
+		    $$->next = 0;
+		}
+	|	list RUNE
+		{
+		    $$ = (rune_list *)xmalloc(sizeof(rune_list));
+		    $$->min = $2;
+		    $$->max = $2;
+		    $$->next = $1;
+		}
+	|	list RUNE THRU RUNE
+		{
+		    $$ = (rune_list *)xmalloc(sizeof(rune_list));
+		    $$->min = $2;
+		    $$->max = $4;
+		    $$->next = $1;
+		}
+	;
+
+map	:	LBRK RUNE RUNE RBRK
+		{
+		    $$ = (rune_list *)xmalloc(sizeof(rune_list));
+		    $$->min = $2;
+		    $$->max = $2;
+		    $$->map = $3;
+		    $$->next = 0;
+		}
+	|	map LBRK RUNE RUNE RBRK
+		{
+		    $$ = (rune_list *)xmalloc(sizeof(rune_list));
+		    $$->min = $3;
+		    $$->max = $3;
+		    $$->map = $4;
+		    $$->next = $1;
+		}
+	|	LBRK RUNE THRU RUNE ':' RUNE RBRK
+		{
+		    $$ = (rune_list *)xmalloc(sizeof(rune_list));
+		    $$->min = $2;
+		    $$->max = $4;
+		    $$->map = $6;
+		    $$->next = 0;
+		}
+	|	map LBRK RUNE THRU RUNE ':' RUNE RBRK
+		{
+		    $$ = (rune_list *)xmalloc(sizeof(rune_list));
+		    $$->min = $3;
+		    $$->max = $5;
+		    $$->map = $7;
+		    $$->next = $1;
+		}
+	;
+%%
+
+int debug;
+FILE *fp;
+
+static void
+cleanout(void)
+{
+    if (fp != NULL)
+	(void) unlink(locale_file);
+}
+
+int
+main(int ac, char *av[])
+{
+    int x;
+
+    fp = stdout;
+
+    while ((x = getopt(ac, av, "do:")) != -1) {
+	switch(x) {
+	case 'd':
+	    debug = 1;
+	    break;
+	case 'o':
+	    locale_file = optarg;
+	    if ((fp = fopen(locale_file, "w")) == NULL)
+		err(1, "%s", locale_file);
+	    (void) atexit(cleanout);
+	    break;
+	default:
+	    usage();
+	}
+    }
+
+    switch (ac - optind) {
+    case 0:
+	break;
+    case 1:
+	if (freopen(av[optind], "r", stdin) == 0)
+	    err(1, "%s", av[optind]);
+	break;
+    default:
+	usage();
+    }
+    for (x = 0; x < _CACHED_RUNES; ++x) {
+	mapupper.map[x] = x;
+	maplower.map[x] = x;
+    }
+    (void) memcpy(new_locale.magic, _FILE_RUNE_MAGIC_1,
+	sizeof(new_locale.magic));
+
+    (void) yyparse();
+
+    return(0);
+}
+
+static void
+usage(void)
+{
+    (void) fprintf(stderr, "usage: mklocale [-d] [-o output] [source]\n");
+    exit(1);
+}
+
+void
+yyerror(const char *s)
+{
+    (void) fprintf(stderr, "%s\n", s);
+}
+
+static void *
+xmalloc(unsigned int sz)
+{
+    void *r = malloc(sz);
+    if (!r)
+	errx(1, "xmalloc");
+    return(r);
+}
+
+static uint32_t *
+xlalloc(unsigned int sz)
+{
+    uint32_t *r = (uint32_t *)malloc(sz * sizeof(uint32_t));
+    if (!r)
+	errx(1, "xlalloc");
+    return(r);
+}
+
+static uint32_t *
+xrelalloc(uint32_t *old, unsigned int sz)
+{
+    uint32_t *r = (uint32_t *)realloc((char *)old,
+						sz * sizeof(uint32_t));
+    if (!r)
+	errx(1, "xrelalloc");
+    return(r);
+}
+
+void
+set_map(rune_map *map, rune_list *list, uint32_t flag)
+{
+    while (list) {
+	rune_list *nlist = list->next;
+	add_map(map, list, flag);
+	list = nlist;
+    }
+}
+
+void
+add_map(rune_map *map, rune_list *list, uint32_t flag)
+{
+    int32_t i;
+    rune_list *lr = 0;
+    rune_list *r;
+    int32_t run;
+
+    while (list->min < _CACHED_RUNES && list->min <= list->max) {
+	if (flag)
+	    map->map[list->min++] |= flag;
+	else
+	    map->map[list->min++] = list->map++;
+    }
+
+    if (list->min > list->max) {
+	free(list);
+	return;
+    }
+
+    run = list->max - list->min + 1;
+
+    if (!(r = map->root) || (list->max < r->min - 1)
+			 || (!flag && list->max == r->min - 1)) {
+	if (flag) {
+	    list->types = xlalloc(run);
+	    for (i = 0; i < run; ++i)
+		list->types[i] = flag;
+	}
+	list->next = map->root;
+	map->root = list;
+	return;
+    }
+
+    for (r = map->root; r && r->max + 1 < list->min; r = r->next)
+	lr = r;
+
+    if (!r) {
+	/*
+	 * We are off the end.
+	 */
+	if (flag) {
+	    list->types = xlalloc(run);
+	    for (i = 0; i < run; ++i)
+		list->types[i] = flag;
+	}
+	list->next = 0;
+	lr->next = list;
+	return;
+    }
+
+    if (list->max < r->min - 1) {
+	/*
+	 * We come before this range and we do not intersect it.
+	 * We are not before the root node, it was checked before the loop
+	 */
+	if (flag) {
+	    list->types = xlalloc(run);
+	    for (i = 0; i < run; ++i)
+		list->types[i] = flag;
+	}
+	list->next = lr->next;
+	lr->next = list;
+	return;
+    }
+
+    /*
+     * At this point we have found that we at least intersect with
+     * the range pointed to by `r', we might intersect with one or
+     * more ranges beyond `r' as well.
+     */
+
+    if (!flag && list->map - list->min != r->map - r->min) {
+	/*
+	 * There are only two cases when we are doing case maps and
+	 * our maps needn't have the same offset.  When we are adjoining
+	 * but not intersecting.
+	 */
+	if (list->max + 1 == r->min) {
+	    lr->next = list;
+	    list->next = r;
+	    return;
+	}
+	if (list->min - 1 == r->max) {
+	    list->next = r->next;
+	    r->next = list;
+	    return;
+	}
+	errx(1, "error: conflicting map entries");
+    }
+
+    if (list->min >= r->min && list->max <= r->max) {
+	/*
+	 * Subset case.
+	 */
+
+	if (flag) {
+	    for (i = list->min; i <= list->max; ++i)
+		r->types[i - r->min] |= flag;
+	}
+	free(list);
+	return;
+    }
+    if (list->min <= r->min && list->max >= r->max) {
+	/*
+	 * Superset case.  Make him big enough to hold us.
+	 * We might need to merge with the guy after him.
+	 */
+	if (flag) {
+	    list->types = xlalloc(list->max - list->min + 1);
+
+	    for (i = list->min; i <= list->max; ++i)
+		list->types[i - list->min] = flag;
+
+	    for (i = r->min; i <= r->max; ++i)
+		list->types[i - list->min] |= r->types[i - r->min];
+
+	    free(r->types);
+	    r->types = list->types;
+	} else {
+	    r->map = list->map;
+	}
+	r->min = list->min;
+	r->max = list->max;
+	free(list);
+    } else if (list->min < r->min) {
+	/*
+	 * Our tail intersects his head.
+	 */
+	if (flag) {
+	    list->types = xlalloc(r->max - list->min + 1);
+
+	    for (i = r->min; i <= r->max; ++i)
+		list->types[i - list->min] = r->types[i - r->min];
+
+	    for (i = list->min; i < r->min; ++i)
+		list->types[i - list->min] = flag;
+
+	    for (i = r->min; i <= list->max; ++i)
+		list->types[i - list->min] |= flag;
+
+	    free(r->types);
+	    r->types = list->types;
+	} else {
+	    r->map = list->map;
+	}
+	r->min = list->min;
+	free(list);
+	return;
+    } else {
+	/*
+	 * Our head intersects his tail.
+	 * We might need to merge with the guy after him.
+	 */
+	if (flag) {
+	    r->types = xrelalloc(r->types, list->max - r->min + 1);
+
+	    for (i = list->min; i <= r->max; ++i)
+		r->types[i - r->min] |= flag;
+
+	    for (i = r->max+1; i <= list->max; ++i)
+		r->types[i - r->min] = flag;
+	}
+	r->max = list->max;
+	free(list);
+    }
+
+    /*
+     * Okay, check to see if we grew into the next guy(s)
+     */
+    while (((lr = r->next) != 0) && r->max >= lr->min) {
+	if (flag) {
+	    if (r->max >= lr->max) {
+		/*
+		 * Good, we consumed all of him.
+		 */
+		for (i = lr->min; i <= lr->max; ++i)
+		    r->types[i - r->min] |= lr->types[i - lr->min];
+	    } else {
+		/*
+		 * "append" him on to the end of us.
+		 */
+		r->types = xrelalloc(r->types, lr->max - r->min + 1);
+
+		for (i = lr->min; i <= r->max; ++i)
+		    r->types[i - r->min] |= lr->types[i - lr->min];
+
+		for (i = r->max+1; i <= lr->max; ++i)
+		    r->types[i - r->min] = lr->types[i - lr->min];
+
+		r->max = lr->max;
+	    }
+	} else {
+	    if (lr->max > r->max)
+		r->max = lr->max;
+	}
+
+	r->next = lr->next;
+
+	if (flag)
+	    free(lr->types);
+	free(lr);
+    }
+}
+
+static void
+dump_tables(void)
+{
+    int x, first_d, curr_d;
+    rune_list *list;
+
+    /*
+     * See if we can compress some of the istype arrays
+     */
+    for(list = types.root; list; list = list->next) {
+	list->map = list->types[0];
+	for (x = 1; x < list->max - list->min + 1; ++x) {
+	    if ((int32_t)list->types[x] != list->map) {
+		list->map = 0;
+		break;
+	    }
+	}
+    }
+
+    first_d = curr_d = -1;
+    for (x = 0; x < _CACHED_RUNES; ++x) {
+	uint32_t r = types.map[x];
+
+	if (r & _CTYPE_D) {
+		if (first_d < 0)
+			first_d = curr_d = x;
+		else if (x != curr_d + 1)
+			errx(1, "error: DIGIT range is not contiguous");
+		else if (x - first_d > 9)
+			errx(1, "error: DIGIT range is too big");
+		else
+			curr_d++;
+		if (!(r & _CTYPE_X))
+			errx(1,
+			"error: DIGIT range is not a subset of XDIGIT range");
+	}
+    }
+    if (first_d < 0)
+	errx(1, "error: no DIGIT range defined in the single byte area");
+    else if (curr_d - first_d < 9)
+	errx(1, "error: DIGIT range is too small in the single byte area");
+
+    /*
+     * Fill in our tables.  Do this in network order so that
+     * diverse machines have a chance of sharing data.
+     * (Machines like Crays cannot share with little machines due to
+     *  word size.  Sigh.  We tried.)
+     */
+    for (x = 0; x < _CACHED_RUNES; ++x) {
+	new_locale.runetype[x] = htonl(types.map[x]);
+	new_locale.maplower[x] = htonl(maplower.map[x]);
+	new_locale.mapupper[x] = htonl(mapupper.map[x]);
+    }
+
+    /*
+     * Count up how many ranges we will need for each of the extents.
+     */
+    list = types.root;
+
+    while (list) {
+	new_locale.runetype_ext_nranges++;
+	list = list->next;
+    }
+    new_locale.runetype_ext_nranges =
+         htonl(new_locale.runetype_ext_nranges);
+
+    list = maplower.root;
+
+    while (list) {
+	new_locale.maplower_ext_nranges++;
+	list = list->next;
+    }
+    new_locale.maplower_ext_nranges =
+        htonl(new_locale.maplower_ext_nranges);
+
+    list = mapupper.root;
+
+    while (list) {
+	new_locale.mapupper_ext_nranges++;
+	list = list->next;
+    }
+    new_locale.mapupper_ext_nranges =
+        htonl(new_locale.mapupper_ext_nranges);
+
+    new_locale.variable_len = htonl(new_locale.variable_len);
+
+    /*
+     * Okay, we are now ready to write the new locale file.
+     */
+
+    /*
+     * PART 1: The _FileRuneLocale structure
+     */
+    if (fwrite((char *)&new_locale, sizeof(new_locale), 1, fp) != 1) {
+	perror(locale_file);
+	exit(1);
+    }
+    /*
+     * PART 2: The runetype_ext structures (not the actual tables)
+     */
+    list = types.root;
+
+    while (list) {
+	_FileRuneEntry re;
+
+	re.min = htonl(list->min);
+	re.max = htonl(list->max);
+	re.map = htonl(list->map);
+
+	if (fwrite((char *)&re, sizeof(re), 1, fp) != 1) {
+	    perror(locale_file);
+	    exit(1);
+	}
+
+        list = list->next;
+    }
+    /*
+     * PART 3: The maplower_ext structures
+     */
+    list = maplower.root;
+
+    while (list) {
+	_FileRuneEntry re;
+
+	re.min = htonl(list->min);
+	re.max = htonl(list->max);
+	re.map = htonl(list->map);
+
+	if (fwrite((char *)&re, sizeof(re), 1, fp) != 1) {
+	    perror(locale_file);
+	    exit(1);
+	}
+
+        list = list->next;
+    }
+    /*
+     * PART 4: The mapupper_ext structures
+     */
+    list = mapupper.root;
+
+    while (list) {
+	_FileRuneEntry re;
+
+	re.min = htonl(list->min);
+	re.max = htonl(list->max);
+	re.map = htonl(list->map);
+
+	if (fwrite((char *)&re, sizeof(re), 1, fp) != 1) {
+	    perror(locale_file);
+	    exit(1);
+	}
+
+        list = list->next;
+    }
+    /*
+     * PART 5: The runetype_ext tables
+     */
+    list = types.root;
+
+    while (list) {
+	for (x = 0; x < list->max - list->min + 1; ++x)
+	    list->types[x] = htonl(list->types[x]);
+
+	if (!list->map) {
+	    if (fwrite((char *)list->types,
+		       (list->max - list->min + 1) * sizeof(uint32_t),
+		       1, fp) != 1) {
+		perror(locale_file);
+		exit(1);
+	    }
+	}
+        list = list->next;
+    }
+    /*
+     * PART 6: And finally the variable data
+     */
+    if (new_locale.variable_len != 0 &&
+	fwrite(variable, ntohl(new_locale.variable_len), 1, fp) != 1) {
+	perror(locale_file);
+	exit(1);
+    }
+    if (fclose(fp) != 0) {
+	perror(locale_file);
+	exit(1);
+    }
+    fp = NULL;
+
+    if (!debug)
+	return;
+
+    if (new_locale.encoding[0])
+	(void) fprintf(stderr, "ENCODING	%s\n", new_locale.encoding);
+    if (variable)
+	(void) fprintf(stderr, "VARIABLE	%s\n", variable);
+
+    (void) fprintf(stderr, "\nMAPLOWER:\n\n");
+
+    for (x = 0; x < _CACHED_RUNES; ++x) {
+	if (isprint(maplower.map[x]))
+	    (void) fprintf(stderr, " '%c'", (int)maplower.map[x]);
+	else if (maplower.map[x])
+	    (void) fprintf(stderr, "%04x", maplower.map[x]);
+	else
+	    (void) fprintf(stderr, "%4x", 0);
+	if ((x & 0xf) == 0xf)
+	    (void) fprintf(stderr, "\n");
+	else
+	    (void) fprintf(stderr, " ");
+    }
+    (void) fprintf(stderr, "\n");
+
+    for (list = maplower.root; list; list = list->next)
+	(void) fprintf(stderr, "\t%04x - %04x : %04x\n",
+	    list->min, list->max, list->map);
+
+    (void) fprintf(stderr, "\nMAPUPPER:\n\n");
+
+    for (x = 0; x < _CACHED_RUNES; ++x) {
+	if (isprint(mapupper.map[x]))
+	    (void) fprintf(stderr, " '%c'", (int)mapupper.map[x]);
+	else if (mapupper.map[x])
+	    (void) fprintf(stderr, "%04x", mapupper.map[x]);
+	else
+	    (void) fprintf(stderr, "%4x", 0);
+	if ((x & 0xf) == 0xf)
+	    (void) fprintf(stderr, "\n");
+	else
+	    (void) fprintf(stderr, " ");
+    }
+    (void) fprintf(stderr, "\n");
+
+    for (list = mapupper.root; list; list = list->next)
+	(void) fprintf(stderr, "\t%04x - %04x : %04x\n",
+	    list->min, list->max, list->map);
+
+
+    (void) fprintf(stderr, "\nTYPES:\n\n");
+
+    for (x = 0; x < _CACHED_RUNES; ++x) {
+	uint32_t r = types.map[x];
+
+	if (r) {
+	    if (isprint(x))
+		(void) fprintf(stderr, " '%c': %2d", x, (int)(r & 0xff));
+	    else
+		(void) fprintf(stderr, "%04x: %2d", x, (int)(r & 0xff));
+
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_A) ? "alph" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_C) ? "ctrl" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_D) ? "dig" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_G) ? "graf" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_L) ? "low" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_P) ? "punc" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_S) ? "spac" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_U) ? "upp" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_X) ? "xdig" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_B) ? "blnk" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_R) ? "prnt" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_I) ? "ideo" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_T) ? "spec" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_Q) ? "phon" : "");
+	    (void) fprintf(stderr, "\n");
+	}
+    }
+
+    for (list = types.root; list; list = list->next) {
+	if (list->map && list->min + 3 < list->max) {
+	    uint32_t r = list->map;
+
+	    (void) fprintf(stderr, "%04x: %2d",
+		(uint32_t)list->min, (int)(r & 0xff));
+
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_A) ? "alph" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_C) ? "ctrl" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_D) ? "dig" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_G) ? "graf" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_L) ? "low" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_P) ? "punc" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_S) ? "spac" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_U) ? "upp" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_X) ? "xdig" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_B) ? "blnk" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_R) ? "prnt" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_I) ? "ideo" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_T) ? "spec" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_Q) ? "phon" : "");
+	    (void) fprintf(stderr, "\n...\n");
+
+	    (void) fprintf(stderr, "%04x: %2d",
+		(uint32_t)list->max, (int)(r & 0xff));
+
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_A) ? "alph" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_C) ? "ctrl" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_D) ? "dig" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_G) ? "graf" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_L) ? "low" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_P) ? "punc" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_S) ? "spac" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_U) ? "upp" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_X) ? "xdig" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_B) ? "blnk" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_R) ? "prnt" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_I) ? "ideo" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_T) ? "spec" : "");
+	    (void) fprintf(stderr, " %4s", (r & _CTYPE_Q) ? "phon" : "");
+	    (void) fprintf(stderr, "\n");
+	} else 
+	for (x = list->min; x <= list->max; ++x) {
+	    uint32_t r = ntohl(list->types[x - list->min]);
+
+	    if (r) {
+		(void) fprintf(stderr, "%04x: %2d", x, (int)(r & 0xff));
+
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_A) ? "alph" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_C) ? "ctrl" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_D) ? "dig" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_G) ? "graf" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_L) ? "low" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_P) ? "punc" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_S) ? "spac" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_U) ? "upp" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_X) ? "xdig" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_B) ? "blnk" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_R) ? "prnt" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_I) ? "ideo" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_T) ? "spec" : "");
+		(void) fprintf(stderr, " %4s", (r & _CTYPE_Q) ? "phon" : "");
+		(void) fprintf(stderr, "\n");
+	    }
+	}
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/messages/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,54 @@
+#
+# 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 version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+#
+
+CATEGORY=LC_MESSAGES
+
+include ../Makefile.common
+
+en_COMMON =	en_AU en_CA en_GB en_NZ en_US
+
+en_ASCII =	$(en_COMMON:%=%.US-ASCII)
+en_LATIN1 =	$(en_COMMON:%=%.ISO8859-1)
+en_LATIN15 =	$(en_COMMON:%=%.ISO8859-15)
+en_UTF8 =	$(en_COMMON:%=%.UTF-8) en_IE.UTF-8
+en_LOCALES =	$(en_ASCII) $(en_LATIN1) $(en_LATIN15) $(en_UTF8)
+
+.KEEP_STATE:
+
+all: $(MACH) .WAIT $(MACHLOCALES)
+
+$(ASCII:%=$(MACH)/%):	$(MACH)/US-ASCII
+	$(RM) $@
+	$(LN) $(MACH)/US-ASCII $@
+
+$(en_LOCALES:%=$(MACH)/%):	$(MACH)/en
+	$(RM) $@
+	$(LN) $(MACH)/en $@
+
+clean:
+	$(RM) $(OBJS) $(CLEANFILES)
+	$(RM) -r $(MACH)
+
+lint:
+check:
+
+
+#
+# Rules for building encoding data files.
+#
+$(MACH)/%:	data/%.src $(MACH)
+	$(INS.nohash)
+
+include ../Makefile.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/messages/data/en.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,16 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# Note: FreeBSD had customizations for CA and US to add French and Spanish
+# prefixes, but that that really isn't appropriate for an English locale.
+#
+# yesexpr
+^[yY].*
+# noexpr
+^[nN].*
+# yesstr
+yes
+# nostr
+no
+# EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/monetary/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,66 @@
+#
+# 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 version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+#
+
+CATEGORY=LC_MONETARY
+
+include ../Makefile.common
+
+en_AU =		en_AU.ISO8859-1 en_AU.ISO8859-15 en_AU.US-ASCII en_AU.UTF-8
+en_CA =		en_CA.ISO8859-1 en_CA.ISO8859-15 en_CA.US-ASCII en_CA.UTF-8
+en_GB =		en_GB.ISO8859-1 en_GB.ISO8859-15 en_GB.US-ASCII en_GB.UTF-8
+en_IE =		en_IE.UTF-8
+en_NZ =		en_NZ.ISO8859-1 en_NZ.ISO8859-15 en_NZ.US-ASCII en_NZ.UTF-8
+en_US =		en_US.ISO8859-1 en_US.ISO8859-15 en_US.US-ASCII en_US.UTF-8
+
+.KEEP_STATE:
+
+all: $(MACH) .WAIT $(MACHLOCALES)
+
+clean:
+	$(RM) $(OBJS) $(CLEANFILES)
+	$(RM) -r $(MACH)
+
+lint:
+check:
+
+#
+# Rules for building encoding data files.
+#
+
+$(en_AU:%=$(MACH)/%):	data/en_AU.src
+	$(RM) $@; $(HASHSTRIP) data/en_AU.src > $@
+
+$(en_CA:%=$(MACH)/%):	data/en_CA.src
+	$(RM) $@; $(HASHSTRIP) data/en_CA.src > $@
+
+$(en_NZ:%=$(MACH)/%):	data/en_NZ.src
+	$(RM) $@; $(HASHSTRIP) data/en_NZ.src > $@
+
+$(en_US:%=$(MACH)/%):	data/en_US.src
+	$(RM) $@; $(HASHSTRIP) data/en_US.src > $@
+
+$(MACH)/en_IE.UTF-8:	data/en_IE.UTF-8.src
+	$(RM) $@; $(HASHSTRIP) data/en_IE.UTF-8.src > $@
+
+$(MACH)/en_GB.UTF-8:	data/en_GB.UTF-8.src
+	$(RM) $@; $(HASHSTRIP) data/en_GB.UTF-8.src > $@
+
+$(MACH)/en_GB.ISO8859-1 $(MACH)/en_GB.ISO8859-15:	data/en_GB.LATIN.src
+	$(RM) $@; $(HASHSTRIP) data/en_GB.LATIN.src > $@
+
+$(MACH)/en_GB.US-ASCII	data/en_GB.ASCII.src:
+	$(RM) $@; $(HASHSTRIP) data/en_GB.ASCII.src > $@
+
+include ../Makefile.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/monetary/data/en_AU.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,47 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# int_curr_symbol (last character always SPACE)
+AUD 
+# currency_symbol
+$
+# mon_decimal_point
+.
+# mon_thousands_sep
+,
+# mon_grouping, separated by ;
+3;3
+# positive_sign
+
+# negative_sign
+-
+# int_frac_digits
+2
+# frac_digits
+2
+# p_cs_precedes
+1
+# p_sep_by_space
+0
+# n_cs_precedes
+1
+# n_sep_by_space
+0
+# p_sign_posn
+1
+# n_sign_posn
+1
+# int_p_cs_precedes
+1
+# int_n_cs_precedes;
+1
+# int_p_sep_by_space;
+0
+# int_n_sep_by_space;
+0
+# int_p_sign_posn;
+1
+# int_n_sign_posn;
+1
+# EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/monetary/data/en_CA.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,35 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# int_curr_symbol (last character always SPACE)
+CAD 
+# currency_symbol
+$
+# mon_decimal_point
+.
+# mon_thousands_sep
+,
+# mon_grouping, separated by ;
+3;3
+# positive_sign
+
+# negative_sign
+-
+# int_frac_digits
+2
+# frac_digits
+2
+# p_cs_precedes
+1
+# p_sep_by_space
+0
+# n_cs_precedes
+1
+# n_sep_by_space
+0
+# p_sign_posn
+1
+# n_sign_posn
+1
+# EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/monetary/data/en_GB.ASCII.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,35 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# int_curr_symbol (last character always SPACE)
+GBP 
+# currency_symbol
+GBP 
+# mon_decimal_point
+.
+# mon_thousands_sep
+,
+# mon_grouping, separated by ;
+3;3
+# positive_sign
+
+# negative_sign
+-
+# int_frac_digits
+2
+# frac_digits
+2
+# p_cs_precedes
+1
+# p_sep_by_space
+0
+# n_cs_precedes
+1
+# n_sep_by_space
+0
+# p_sign_posn
+1
+# n_sign_posn
+1
+# EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/monetary/data/en_GB.LATIN.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,35 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# int_curr_symbol (last character always SPACE)
+GBP 
+# currency_symbol

+# mon_decimal_point
+.
+# mon_thousands_sep
+,
+# mon_grouping, separated by ;
+3;3
+# positive_sign
+
+# negative_sign
+-
+# int_frac_digits
+2
+# frac_digits
+2
+# p_cs_precedes
+1
+# p_sep_by_space
+0
+# n_cs_precedes
+1
+# n_sep_by_space
+0
+# p_sign_posn
+1
+# n_sign_posn
+1
+# EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/monetary/data/en_GB.UTF-8.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,35 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# int_curr_symbol (last character always SPACE)
+GBP 
+# currency_symbol
+£
+# mon_decimal_point
+.
+# mon_thousands_sep
+,
+# mon_grouping, separated by ;
+3;3
+# positive_sign
+
+# negative_sign
+-
+# int_frac_digits
+2
+# frac_digits
+2
+# p_cs_precedes
+1
+# p_sep_by_space
+0
+# n_cs_precedes
+1
+# n_sep_by_space
+0
+# p_sign_posn
+1
+# n_sign_posn
+1
+# EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/monetary/data/en_IE.UTF-8.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,35 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# int_curr_symbol (last character always SPACE)
+EUR 
+# currency_symbol
+€
+# mon_decimal_point
+.
+# mon_thousands_sep
+,
+# mon_grouping, separated by ;
+3;3
+# positive_sign
+
+# negative_sign
+-
+# int_frac_digits
+2
+# frac_digits
+2
+# p_cs_precedes
+1
+# p_sep_by_space
+0
+# n_cs_precedes
+1
+# n_sep_by_space
+0
+# p_sign_posn
+1
+# n_sign_posn
+1
+# EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/monetary/data/en_NZ.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,35 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# int_curr_symbol (last character always SPACE)
+NZD 
+# currency_symbol
+$
+# mon_decimal_point
+.
+# mon_thousands_sep
+,
+# mon_grouping, separated by ;
+3;3
+# positive_sign
+
+# negative_sign
+-
+# int_frac_digits
+2
+# frac_digits
+2
+# p_cs_precedes
+1
+# p_sep_by_space
+0
+# n_cs_precedes
+1
+# n_sep_by_space
+0
+# p_sign_posn
+1
+# n_sign_posn
+1
+# EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/monetary/data/en_US.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,35 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# int_curr_symbol (last character always SPACE)
+USD 
+# currency_symbol
+$
+# mon_decimal_point
+.
+# mon_thousands_sep
+,
+# mon_grouping, separated by ;
+3;3
+# positive_sign
+
+# negative_sign
+-
+# int_frac_digits
+2
+# frac_digits
+2
+# p_cs_precedes
+1
+# p_sep_by_space
+0
+# n_cs_precedes
+1
+# n_sep_by_space
+0
+# p_sign_posn
+1
+# n_sign_posn
+1
+# EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/numeric/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,54 @@
+#
+# 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 version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+#
+
+CATEGORY=LC_NUMERIC
+
+include ../Makefile.common
+
+en_COMMON =	en_AU en_CA en_GB en_NZ en_US
+
+en_ASCII =	$(en_COMMON:%=%.US-ASCII)
+en_LATIN1 =	$(en_COMMON:%=%.ISO8859-1)
+en_LATIN15 =	$(en_COMMON:%=%.ISO8859-15)
+en_UTF8 =	$(en_COMMON:%=%.UTF-8) en_IE.UTF-8
+en_LOCALES =	$(en_ASCII) $(en_LATIN1) $(en_LATIN15) $(en_UTF8)
+
+.KEEP_STATE:
+
+all: $(MACH) .WAIT $(MACHLOCALES)
+
+$(ASCII:%=$(MACH)/%):	$(MACH)/US-ASCII
+	$(RM) $@
+	$(LN) $(MACH)/US-ASCII $@
+
+$(en_LOCALES:%=$(MACH)/%):	$(MACH)/en
+	$(RM) $@
+	$(LN) $(MACH)/en $@
+
+clean:
+	$(RM) $(OBJS) $(CLEANFILES)
+	$(RM) -r $(MACH)
+
+lint:
+check:
+
+
+#
+# Rules for building encoding data files.
+#
+$(MACH)/%:	data/%.src $(MACH)
+	$(INS.nohash)
+
+include ../Makefile.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/numeric/data/en.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,11 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# decimal_point
+.
+# thousands_sep
+,
+# grouping, separated by ;
+3;3
+# EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/time/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,50 @@
+#
+# 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 version
+# 1.0 of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+#
+
+CATEGORY=LC_TIME
+
+include ../Makefile.common
+
+# Apparently only the US uses month/day/year.  Other English speaking
+# countries place day/month/year.
+en_GB = en_AU.ISO8859-1 en_AU.ISO8859-15 en_AU.US-ASCII en_AU.UTF-8 \
+	en_CA.ISO8859-1 en_CA.ISO8859-15 en_CA.US-ASCII en_CA.UTF-8 \
+	en_GB.ISO8859-1 en_GB.ISO8859-15 en_GB.US-ASCII en_GB.UTF-8 \
+	en_IE.UTF-8 \
+	en_NZ.ISO8859-1 en_NZ.ISO8859-15 en_NZ.US-ASCII en_NZ.UTF-8
+en_US =	en_US.ISO8859-1 en_US.ISO8859-15 en_US.US-ASCII en_US.UTF-8
+
+.KEEP_STATE:
+
+all: $(MACH) .WAIT $(MACHLOCALES)
+
+clean:
+	$(RM) $(OBJS) $(CLEANFILES)
+	$(RM) -r $(MACH)
+
+lint:
+check:
+
+#
+# Rules for building encoding data files.
+#
+
+$(en_GB:%=$(MACH)/%):	data/en_GB.src
+	$(RM) $@; $(HASHSTRIP) data/en_GB.src > $@
+
+$(en_US:%=$(MACH)/%):	data/en_US.src
+	$(RM) $@; $(HASHSTRIP) data/en_US.src > $@
+
+include ../Makefile.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/time/data/en_GB.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,101 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# Short month names
+#
+Jan
+Feb
+Mar
+Apr
+May
+Jun
+Jul
+Aug
+Sep
+Oct
+Nov
+Dec
+#
+# Long month names (as in a date)
+#
+January
+February
+March
+April
+May
+June
+July
+August
+September
+October
+November
+December
+#
+# Short weekday names
+#
+Sun
+Mon
+Tue
+Wed
+Thu
+Fri
+Sat
+#
+# Long weekday names
+#
+Sunday
+Monday
+Tuesday
+Wednesday
+Thursday
+Friday
+Saturday
+#
+# X_fmt
+#
+%H:%M:%S
+#
+# x_fmt
+#
+%d/%m/%Y
+#
+# c_fmt
+#
+%a %e %b %X %Y
+#
+# am
+#
+AM
+#
+# pm
+#
+PM
+#
+# date_fmt
+#
+%a %e %b %Y %X %Z
+#
+# Long month names (without case ending)
+#
+January
+February
+March
+April
+May
+June
+July
+August
+September
+October
+November
+December
+#
+# md_order
+#
+dm
+#
+# ampm_fmt
+#
+%I:%M:%S %p
+# EOF
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/mklocale/time/data/en_US.src	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,101 @@
+#
+# WARNING: spaces may be essential at the end of lines
+# WARNING: empty lines are essential too
+#
+# Short month names
+#
+Jan
+Feb
+Mar
+Apr
+May
+Jun
+Jul
+Aug
+Sep
+Oct
+Nov
+Dec
+#
+# Long month names (as in a date)
+#
+January
+February
+March
+April
+May
+June
+July
+August
+September
+October
+November
+December
+#
+# Short weekday names
+#
+Sun
+Mon
+Tue
+Wed
+Thu
+Fri
+Sat
+#
+# Long weekday names
+#
+Sunday
+Monday
+Tuesday
+Wednesday
+Thursday
+Friday
+Saturday
+#
+# X_fmt
+#
+%H:%M:%S
+#
+# x_fmt
+#
+%m/%d/%Y
+#
+# c_fmt
+#
+%a %b %e %X %Y
+#
+# am
+#
+AM
+#
+# pm
+#
+PM
+#
+# date_fmt
+#
+%a %b %e %X %Z %Y
+#
+# Long month names (without case ending)
+#
+January
+February
+March
+April
+May
+June
+July
+August
+September
+October
+November
+December
+#
+# md_order
+#
+md
+#
+# ampm_fmt
+#
+%I:%M:%S %p
+# EOF
--- a/usr/src/cmd/perl/skel/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/cmd/perl/skel/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -74,7 +74,7 @@
 			cd $(STAGE); \
 			find . \( -name ".packlist" -o -name "perllocal.pod" \) \
 				-exec $(RM) {} \; ; \
-			/usr/bin/pax -rwpe ./*  ${ROOT} ; \
+			/usr/bin/pax -rw -pe ./*  ${ROOT} ; \
 			) \
 		else \
 			/bin/false; \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/tr/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,70 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+#
+#
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
+
+
+PROG=		tr
+XPG4PROG=	$(PROG)
+XPG6PROG=	$(PROG)
+
+OBJS=		tr.o str.o cset.o cmap.o
+SRCS=	 	$(OBJS:%.o=%.c)
+
+include ../Makefile.cmd
+
+CLOBBERFILES=	$(PROG)
+
+
+C99MODE=	-xc99=%all
+C99LMODE=	-Xc99=%all
+CPPFLAGS +=	-D_ILLUMOS_PRIVATE -I.
+LINTFLAGS +=	-D_ILLUMOS_PRIVATE -I.
+
+# install rules
+$(ROOTINC)/% : %
+	$(INS.file)
+
+.KEEP_STATE:
+
+.PARALLEL: $(OBJS)
+
+all:		$(PROG) 
+
+$(PROG):	$(OBJS)
+	$(LINK.c) $(OBJS) -o $@ $(LDLIBS)
+	$(POST_PROCESS)
+
+install: all .WAIT $(ROOTPROG) $(ROOTXPG4PROG) $(ROOTXPG6PROG)
+
+$(ROOTXPG4PROG) $(ROOTXPG6PROG):
+	-$(RM) $@
+	-$(LN) -s ../../bin/$(PROG) $@
+
+lint: 	lint_SRCS
+
+clean:
+	$(RM) $(OBJS)
+
+include ../Makefile.targ
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/tr/THIRDPARTYLICENSE	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,88 @@
+
+Copyright (c) 2004 Tim J. Robbins.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+
+Copyright (c) 1991, 1993
+	The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+	This product includes software developed by the University of
+	California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+
+Copyright (c) 1988, 1993
+	The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. All advertising materials mentioning features or use of this software
+   must display the following acknowledgement:
+	This product includes software developed by the University of
+	California, Berkeley and its contributors.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/tr/THIRDPARTYLICENSE.descrip	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,1 @@
+TR UTILITY
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/tr/cmap.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/*
+ * "Character map" ADT. Stores mappings between pairs of characters in a
+ * splay tree, with a lookup table cache to simplify looking up the first
+ * bunch of characters (which are presumably more common than others).
+ */
+
+#include <assert.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include "cmap.h"
+
+static struct cmapnode *cmap_splay(struct cmapnode *, wint_t);
+
+/*
+ * cmap_alloc --
+ *	Allocate a character map.
+ */
+struct cmap *
+cmap_alloc(void)
+{
+	struct cmap *cm;
+
+	cm = malloc(sizeof (*cm));
+	if (cm == NULL)
+		return (NULL);
+	cm->cm_root = NULL;
+	cm->cm_def = CM_DEF_SELF;
+	cm->cm_havecache = false;
+	cm->cm_min = cm->cm_max = 0;
+	return (cm);
+}
+
+/*
+ * cmap_add --
+ *	Add a mapping from "from" to "to" to the map.
+ */
+bool
+cmap_add(struct cmap *cm, wint_t from, wint_t to)
+{
+	struct cmapnode *cmn, *ncmn;
+
+	cm->cm_havecache = false;
+
+	if (cm->cm_root == NULL) {
+		cmn = malloc(sizeof (*cmn));
+		if (cmn == NULL)
+			return (false);
+		cmn->cmn_from = from;
+		cmn->cmn_to = to;
+		cmn->cmn_left = cmn->cmn_right = NULL;
+		cm->cm_root = cmn;
+		cm->cm_min = cm->cm_max = from;
+		return (true);
+	}
+
+	cmn = cm->cm_root = cmap_splay(cm->cm_root, from);
+
+	if (cmn->cmn_from == from) {
+		cmn->cmn_to = to;
+		return (true);
+	}
+
+	ncmn = malloc(sizeof (*ncmn));
+	if (ncmn == NULL)
+		return (false);
+	ncmn->cmn_from = from;
+	ncmn->cmn_to = to;
+	if (from < cmn->cmn_from) {
+		ncmn->cmn_left = cmn->cmn_left;
+		ncmn->cmn_right = cmn;
+		cmn->cmn_left = NULL;
+	} else {
+		ncmn->cmn_right = cmn->cmn_right;
+		ncmn->cmn_left = cmn;
+		cmn->cmn_right = NULL;
+	}
+	if (from < cm->cm_min)
+		cm->cm_min = from;
+	if (from > cm->cm_max)
+		cm->cm_max = from;
+	cm->cm_root = ncmn;
+
+	return (true);
+}
+
+/*
+ * cmap_lookup_hard --
+ *	Look up the mapping for a character without using the cache.
+ */
+wint_t
+cmap_lookup_hard(struct cmap *cm, wint_t ch)
+{
+
+	if (cm->cm_root != NULL) {
+		cm->cm_root = cmap_splay(cm->cm_root, ch);
+		if (cm->cm_root->cmn_from == ch)
+			return (cm->cm_root->cmn_to);
+	}
+	return (cm->cm_def == CM_DEF_SELF ? ch : cm->cm_def);
+}
+
+/*
+ * cmap_cache --
+ *	Update the cache.
+ */
+void
+cmap_cache(struct cmap *cm)
+{
+	wint_t ch;
+
+	for (ch = 0; ch < CM_CACHE_SIZE; ch++)
+		cm->cm_cache[ch] = cmap_lookup_hard(cm, ch);
+
+	cm->cm_havecache = true;
+}
+
+/*
+ * cmap_default --
+ *	Change the value that characters without mappings map to, and
+ *	return the old value. The special character value CM_MAP_SELF
+ *	means characters map to themselves.
+ */
+wint_t
+cmap_default(struct cmap *cm, wint_t def)
+{
+	wint_t old;
+
+	old = cm->cm_def;
+	cm->cm_def = def;
+	cm->cm_havecache = false;
+	return (old);
+}
+
+static struct cmapnode *
+cmap_splay(struct cmapnode *t, wint_t ch)
+{
+	struct cmapnode N, *l, *r, *y;
+
+	/*
+	 * Based on public domain code from Sleator.
+	 */
+
+	assert(t != NULL);
+
+	N.cmn_left = N.cmn_right = NULL;
+	l = r = &N;
+	for (;;) {
+		if (ch < t->cmn_from) {
+			if (t->cmn_left != NULL &&
+			    ch < t->cmn_left->cmn_from) {
+				y = t->cmn_left;
+				t->cmn_left = y->cmn_right;
+				y->cmn_right = t;
+				t = y;
+			}
+			if (t->cmn_left == NULL)
+				break;
+			r->cmn_left = t;
+			r = t;
+			t = t->cmn_left;
+		} else if (ch > t->cmn_from) {
+			if (t->cmn_right != NULL &&
+			    ch > t->cmn_right->cmn_from) {
+				y = t->cmn_right;
+				t->cmn_right = y->cmn_left;
+				y->cmn_left = t;
+				t = y;
+			}
+			if (t->cmn_right == NULL)
+				break;
+			l->cmn_right = t;
+			l = t;
+			t = t->cmn_right;
+		} else
+			break;
+	}
+	l->cmn_right = t->cmn_left;
+	r->cmn_left = t->cmn_right;
+	t->cmn_left = N.cmn_right;
+	t->cmn_right = N.cmn_left;
+	return (t);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/tr/cmap.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef CMAP_H
+#define	CMAP_H
+
+#include <limits.h>
+#include <stdbool.h>
+#include <wchar.h>
+
+struct cmapnode {
+	wint_t		cmn_from;
+	wint_t		cmn_to;
+	struct cmapnode	*cmn_left;
+	struct cmapnode	*cmn_right;
+};
+
+struct cmap {
+#define	CM_CACHE_SIZE	128
+	wint_t		cm_cache[CM_CACHE_SIZE];
+	bool		cm_havecache;
+	struct cmapnode	*cm_root;
+#define	CM_DEF_SELF	-2
+	wint_t		cm_def;
+	wint_t		cm_min;
+	wint_t		cm_max;
+};
+
+struct cmap 	*cmap_alloc(void);
+bool		cmap_add(struct cmap *, wint_t, wint_t);
+wint_t		cmap_lookup_hard(struct cmap *, wint_t);
+void		cmap_cache(struct cmap *);
+wint_t		cmap_default(struct cmap *, wint_t);
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/tr/cset.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,287 @@
+/*
+ * Copyright (c) 2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/*
+ * "Set of characters" ADT implemented as a splay tree of extents, with
+ * a lookup table cache to simplify looking up the first bunch of
+ * characters (which are presumably more common than others).
+ */
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <wctype.h>
+#include "cset.h"
+
+static struct csnode	*cset_delete(struct csnode *, wchar_t);
+static int		cset_rangecmp(struct csnode *, wchar_t);
+static struct csnode	*cset_splay(struct csnode *, wchar_t);
+
+/*
+ * cset_alloc --
+ *	Allocate a set of characters.
+ */
+struct cset *
+cset_alloc(void)
+{
+	struct cset *cs;
+
+	if ((cs = malloc(sizeof (*cs))) == NULL)
+		return (NULL);
+	cs->cs_root = NULL;
+	cs->cs_classes = NULL;
+	cs->cs_havecache = false;
+	cs->cs_invert = false;
+	return (cs);
+}
+
+/*
+ * cset_add --
+ *	Add a character to the set.
+ */
+bool
+cset_add(struct cset *cs, wchar_t ch)
+{
+	struct csnode *csn, *ncsn;
+	wchar_t oval;
+
+	cs->cs_havecache = false;
+
+	/*
+	 * Inserting into empty tree; new item becomes the root.
+	 */
+	if (cs->cs_root == NULL) {
+		csn = malloc(sizeof (*cs->cs_root));
+		if (csn == NULL)
+			return (false);
+		csn->csn_left = csn->csn_right = NULL;
+		csn->csn_min = csn->csn_max = ch;
+		cs->cs_root = csn;
+		return (true);
+	}
+
+	/*
+	 * Splay to check whether the item already exists, and otherwise,
+	 * where we should put it.
+	 */
+	csn = cs->cs_root = cset_splay(cs->cs_root, ch);
+
+	/*
+	 * Avoid adding duplicate nodes.
+	 */
+	if (cset_rangecmp(csn, ch) == 0)
+		return (true);
+
+	/*
+	 * Allocate a new node and make it the new root.
+	 */
+	ncsn = malloc(sizeof (*ncsn));
+	if (ncsn == NULL)
+		return (false);
+	ncsn->csn_min = ncsn->csn_max = ch;
+	if (cset_rangecmp(csn, ch) < 0) {
+		ncsn->csn_left = csn->csn_left;
+		ncsn->csn_right = csn;
+		csn->csn_left = NULL;
+	} else {
+		ncsn->csn_right = csn->csn_right;
+		ncsn->csn_left = csn;
+		csn->csn_right = NULL;
+	}
+	cs->cs_root = ncsn;
+
+	/*
+	 * Coalesce with left and right neighbours if possible.
+	 */
+	if (ncsn->csn_left != NULL) {
+		ncsn->csn_left = cset_splay(ncsn->csn_left, ncsn->csn_min - 1);
+		if (ncsn->csn_left->csn_max == ncsn->csn_min - 1) {
+			oval = ncsn->csn_left->csn_min;
+			ncsn->csn_left = cset_delete(ncsn->csn_left,
+			    ncsn->csn_left->csn_min);
+			ncsn->csn_min = oval;
+		}
+	}
+	if (ncsn->csn_right != NULL) {
+		ncsn->csn_right = cset_splay(ncsn->csn_right,
+		    ncsn->csn_max + 1);
+		if (ncsn->csn_right->csn_min == ncsn->csn_max + 1) {
+			oval = ncsn->csn_right->csn_max;
+			ncsn->csn_right = cset_delete(ncsn->csn_right,
+			    ncsn->csn_right->csn_min);
+			ncsn->csn_max = oval;
+		}
+	}
+
+	return (true);
+}
+
+/*
+ * cset_in_hard --
+ *	Determine whether a character is in the set without using
+ *	the cache.
+ */
+bool
+cset_in_hard(struct cset *cs, wchar_t ch)
+{
+	struct csclass *csc;
+
+	for (csc = cs->cs_classes; csc != NULL; csc = csc->csc_next)
+		if ((csc->csc_invert ^ iswctype(ch, csc->csc_type)) != 0)
+			return (cs->cs_invert ^ true);
+	if (cs->cs_root != NULL) {
+		cs->cs_root = cset_splay(cs->cs_root, ch);
+		return ((cs->cs_invert ^ cset_rangecmp(cs->cs_root, ch)) == 0);
+	}
+	return (cs->cs_invert ^ false);
+}
+
+/*
+ * cset_cache --
+ *	Update the cache.
+ */
+void
+cset_cache(struct cset *cs)
+{
+	wchar_t i;
+
+	for (i = 0; i < CS_CACHE_SIZE; i++)
+		cs->cs_cache[i] = cset_in_hard(cs, i);
+
+	cs->cs_havecache = true;
+}
+
+/*
+ * cset_invert --
+ *	Invert the character set.
+ */
+void
+cset_invert(struct cset *cs)
+{
+
+	cs->cs_invert ^= true;
+	cs->cs_havecache = false;
+}
+
+/*
+ * cset_addclass --
+ *	Add a wctype()-style character class to the set, optionally
+ *	inverting it.
+ */
+bool
+cset_addclass(struct cset *cs, wctype_t type, bool invert)
+{
+	struct csclass *csc;
+
+	csc = malloc(sizeof (*csc));
+	if (csc == NULL)
+		return (false);
+	csc->csc_type = type;
+	csc->csc_invert = invert;
+	csc->csc_next = cs->cs_classes;
+	cs->cs_classes = csc;
+	cs->cs_havecache = false;
+	return (true);
+}
+
+static int
+cset_rangecmp(struct csnode *t, wchar_t ch)
+{
+
+	if (ch < t->csn_min)
+		return (-1);
+	if (ch > t->csn_max)
+		return (1);
+	return (0);
+}
+
+static struct csnode *
+cset_splay(struct csnode *t, wchar_t ch)
+{
+	struct csnode N, *l, *r, *y;
+
+	/*
+	 * Based on public domain code from Sleator.
+	 */
+
+	assert(t != NULL);
+
+	N.csn_left = N.csn_right = NULL;
+	l = r = &N;
+	for (;;) {
+		if (cset_rangecmp(t, ch) < 0) {
+			if (t->csn_left != NULL &&
+			    cset_rangecmp(t->csn_left, ch) < 0) {
+				y = t->csn_left;
+				t->csn_left = y->csn_right;
+				y->csn_right = t;
+				t = y;
+			}
+			if (t->csn_left == NULL)
+				break;
+			r->csn_left = t;
+			r = t;
+			t = t->csn_left;
+		} else if (cset_rangecmp(t, ch) > 0) {
+			if (t->csn_right != NULL &&
+			    cset_rangecmp(t->csn_right, ch) > 0) {
+				y = t->csn_right;
+				t->csn_right = y->csn_left;
+				y->csn_left = t;
+				t = y;
+			}
+			if (t->csn_right == NULL)
+				break;
+			l->csn_right = t;
+			l = t;
+			t = t->csn_right;
+		} else
+			break;
+	}
+	l->csn_right = t->csn_left;
+	r->csn_left = t->csn_right;
+	t->csn_left = N.csn_right;
+	t->csn_right = N.csn_left;
+	return (t);
+}
+
+static struct csnode *
+cset_delete(struct csnode *t, wchar_t ch)
+{
+	struct csnode *x;
+
+	assert(t != NULL);
+	t = cset_splay(t, ch);
+	assert(cset_rangecmp(t, ch) == 0);
+	if (t->csn_left == NULL)
+		x = t->csn_right;
+	else {
+		x = cset_splay(t->csn_left, ch);
+		x->csn_right = t->csn_right;
+	}
+	free(t);
+	return (x);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/tr/cset.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,63 @@
+/*
+ * Copyright (c) 2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef CSET_H
+#define	CSET_H
+
+#include <stdbool.h>
+#include <wchar.h>
+#include <wctype.h>
+
+struct csnode {
+	wchar_t		csn_min;
+	wchar_t		csn_max;
+	struct csnode	*csn_left;
+	struct csnode	*csn_right;
+};
+
+struct csclass {
+	wctype_t	csc_type;
+	bool		csc_invert;
+	struct csclass	*csc_next;
+};
+
+struct cset {
+#define	CS_CACHE_SIZE	256
+	bool		cs_cache[CS_CACHE_SIZE];
+	bool		cs_havecache;
+	struct csclass	*cs_classes;
+	struct csnode	*cs_root;
+	bool		cs_invert;
+};
+
+bool			cset_addclass(struct cset *, wctype_t, bool);
+struct cset 		*cset_alloc(void);
+bool 			cset_add(struct cset *, wchar_t);
+void			cset_invert(struct cset *);
+bool			cset_in_hard(struct cset *, wchar_t);
+void			cset_cache(struct cset *);
+
+#endif	/* CSET_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/tr/extern.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <limits.h>
+
+#define	NCHARS_SB	(UCHAR_MAX + 1)	/* Number of single-byte characters. */
+#define	OOBCH		-1		/* Out of band character value. */
+
+typedef struct {
+	enum { STRING1, STRING2 } which;
+	enum { EOS, INFINITE, NORMAL, RANGE, SEQUENCE,
+	    CCLASS, CCLASS_UPPER, CCLASS_LOWER, SET } state;
+	int		cnt;		/* character count */
+	wint_t		lastch;		/* last character */
+	wctype_t	cclass;		/* character class from wctype() */
+	wint_t		equiv[NCHARS_SB];	/* equivalence set */
+	wint_t		*set;		/* set of characters */
+	char		*str;		/* user's string */
+} STR;
+
+wint_t	 next(STR *);
+int charcoll(const void *, const void *);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/tr/str.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,399 @@
+/*
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+
+#include <ctype.h>
+#include <err.h>
+#include <errno.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#include "extern.h"
+
+static int	backslash(STR *, int *);
+static int	bracket(STR *);
+static void	genclass(STR *);
+static void	genequiv(STR *);
+static int	genrange(STR *, int);
+static void	genseq(STR *);
+
+wint_t
+next(s)
+	STR *s;
+{
+	int is_octal;
+	wint_t ch;
+	wchar_t wch;
+	size_t clen;
+
+	switch (s->state) {
+	case EOS:
+		return (0);
+	case INFINITE:
+		return (1);
+	case NORMAL:
+		switch (*s->str) {
+		case '\0':
+			s->state = EOS;
+			return (0);
+		case '\\':
+			s->lastch = backslash(s, &is_octal);
+			break;
+		case '[':
+			if (bracket(s))
+				return (next(s));
+			/* FALLTHROUGH */
+		default:
+			clen = mbrtowc(&wch, s->str, MB_LEN_MAX, NULL);
+			if (clen == (size_t)-1 || clen == (size_t)-2 ||
+			    clen == 0) {
+				(void) fprintf(stderr, "Illegal seqeunce.\n");
+				exit(1);
+			}
+			is_octal = 0;
+			s->lastch = wch;
+			s->str += clen;
+			break;
+		}
+
+		/* We can start a range at any time. */
+		if (s->str[0] == '-' && genrange(s, is_octal))
+			return (next(s));
+		return (1);
+	case RANGE:
+		if (s->cnt-- == 0) {
+			s->state = NORMAL;
+			return (next(s));
+		}
+		++s->lastch;
+		return (1);
+	case SEQUENCE:
+		if (s->cnt-- == 0) {
+			s->state = NORMAL;
+			return (next(s));
+		}
+		return (1);
+	case CCLASS:
+	case CCLASS_UPPER:
+	case CCLASS_LOWER:
+		s->cnt++;
+		ch = nextwctype(s->lastch, s->cclass);
+		if (ch == -1) {
+			s->state = NORMAL;
+			return (next(s));
+		}
+		s->lastch = ch;
+		return (1);
+	case SET:
+		if ((ch = s->set[s->cnt++]) == OOBCH) {
+			s->state = NORMAL;
+			return (next(s));
+		}
+		s->lastch = ch;
+		return (1);
+	default:
+		return (0);
+	}
+	/* NOTREACHED */
+}
+
+static int
+bracket(s)
+	STR *s;
+{
+	char *p;
+
+	switch (s->str[1]) {
+	case ':':				/* "[:class:]" */
+		if ((p = strchr(s->str + 2, ']')) == NULL)
+			return (0);
+		if (*(p - 1) != ':' || p - s->str < 4)
+			goto repeat;
+		*(p - 1) = '\0';
+		s->str += 2;
+		genclass(s);
+		s->str = p + 1;
+		return (1);
+	case '=':				/* "[=equiv=]" */
+		if ((p = strchr(s->str + 2, ']')) == NULL)
+			return (0);
+		if (*(p - 1) != '=' || p - s->str < 4)
+			goto repeat;
+		s->str += 2;
+		genequiv(s);
+		return (1);
+	default:				/* "[\###*n]" or "[#*n]" */
+	repeat:
+		if ((p = strpbrk(s->str + 2, "*]")) == NULL)
+			return (0);
+		if (p[0] != '*' || index(p, ']') == NULL)
+			return (0);
+		s->str += 1;
+		genseq(s);
+		return (1);
+	}
+	/* NOTREACHED */
+}
+
+static void
+genclass(s)
+	STR *s;
+{
+
+	if ((s->cclass = wctype(s->str)) == 0)
+		errx(1, "unknown class %s", s->str);
+	s->cnt = 0;
+	s->lastch = -1;		/* incremented before check in next() */
+	if (strcmp(s->str, "upper") == 0)
+		s->state = CCLASS_UPPER;
+	else if (strcmp(s->str, "lower") == 0)
+		s->state = CCLASS_LOWER;
+	else
+		s->state = CCLASS;
+}
+
+static void
+genequiv(s)
+	STR *s;
+{
+	int i, p, pri;
+	char src[2], dst[3];
+	size_t clen;
+	wchar_t wc;
+
+	if (*s->str == '\\') {
+		s->equiv[0] = backslash(s, NULL);
+		if (*s->str != '=')
+			errx(1, "misplaced equivalence equals sign");
+		s->str += 2;
+	} else {
+		clen = mbrtowc(&wc, s->str, MB_LEN_MAX, NULL);
+		if (clen == (size_t)-1 || clen == (size_t)-2 || clen == 0) {
+			errno = EILSEQ;
+			err(1, NULL);
+		}
+		s->equiv[0] = wc;
+		if (s->str[clen] != '=')
+			errx(1, "misplaced equivalence equals sign");
+		s->str += clen + 2;
+	}
+
+	/*
+	 * Calculate the set of all characters in the same equivalence class
+	 * as the specified character (they will have the same primary
+	 * collation weights).
+	 * XXX Knows too much about how strxfrm() is implemented. Assumes
+	 * it fills the string with primary collation weight bytes. Only one-
+	 * to-one mappings are supported.
+	 * XXX Equivalence classes not supported in multibyte locales.
+	 */
+	src[0] = (char)s->equiv[0];
+	src[1] = '\0';
+	if (MB_CUR_MAX == 1 && strxfrm(dst, src, sizeof (dst)) == 1) {
+		pri = (unsigned char)*dst;
+		for (p = 1, i = 1; i < NCHARS_SB; i++) {
+			*src = i;
+			if (strxfrm(dst, src, sizeof (dst)) == 1 && pri &&
+			    pri == (unsigned char)*dst)
+				s->equiv[p++] = i;
+		}
+		s->equiv[p] = OOBCH;
+	}
+
+	s->cnt = 0;
+	s->state = SET;
+	s->set = s->equiv;
+}
+
+static int
+genrange(STR *s, int was_octal)
+{
+	int stopval, octal;
+	char *savestart;
+	int n, cnt, *p;
+	size_t clen;
+	wchar_t wc;
+
+	octal = 0;
+	savestart = s->str;
+	if (*++s->str == '\\')
+		stopval = backslash(s, &octal);
+	else {
+		clen = mbrtowc(&wc, s->str, MB_LEN_MAX, NULL);
+		if (clen == (size_t)-1 || clen == (size_t)-2) {
+			errno = EILSEQ;
+			err(1, NULL);
+		}
+		stopval = wc;
+		s->str += clen;
+	}
+	/*
+	 * XXX Characters are not ordered according to collating sequence in
+	 * multibyte locales.
+	 */
+	if (octal || was_octal || MB_CUR_MAX > 1) {
+		if (stopval < s->lastch) {
+			s->str = savestart;
+			return (0);
+		}
+		s->cnt = stopval - s->lastch + 1;
+		s->state = RANGE;
+		--s->lastch;
+		return (1);
+	}
+	if (charcoll((const void *)&stopval, (const void *)&(s->lastch)) < 0) {
+		s->str = savestart;
+		return (0);
+	}
+	p = malloc((NCHARS_SB + 1) * sizeof (int));
+	if ((s->set = (void *)p) == NULL)
+		err(1, "genrange() malloc");
+	for (cnt = 0; cnt < NCHARS_SB; cnt++)
+		if (charcoll((const void *)&cnt, (const void *)&(s->lastch)) >=
+		    0 &&
+		    charcoll((const void *)&cnt, (const void *)&stopval) <= 0)
+			*p++ = cnt;
+	*p = OOBCH;
+	n = (int *)p - (int *)s->set;
+
+	s->cnt = 0;
+	s->state = SET;
+	if (n > 1)
+		qsort(s->set, n, sizeof (*(s->set)), charcoll);
+	return (1);
+}
+
+static void
+genseq(s)
+	STR *s;
+{
+	char *ep;
+	wchar_t wc;
+	size_t clen;
+
+	if (s->which == STRING1)
+		errx(1, "sequences only valid in string2");
+
+	if (*s->str == '\\')
+		s->lastch = backslash(s, NULL);
+	else {
+		clen = mbrtowc(&wc, s->str, MB_LEN_MAX, NULL);
+		if (clen == (size_t)-1 || clen == (size_t)-2) {
+			errno = EILSEQ;
+			err(1, NULL);
+		}
+		s->lastch = wc;
+		s->str += clen;
+	}
+	if (*s->str != '*')
+		errx(1, "misplaced sequence asterisk");
+
+	switch (*++s->str) {
+	case '\\':
+		s->cnt = backslash(s, NULL);
+		break;
+	case ']':
+		s->cnt = 0;
+		++s->str;
+		break;
+	default:
+		if (isdigit((uchar_t)*s->str)) {
+			s->cnt = strtol(s->str, &ep, 0);
+			if (*ep == ']') {
+				s->str = ep + 1;
+				break;
+			}
+		}
+		errx(1, "illegal sequence count");
+		/* NOTREACHED */
+	}
+
+	s->state = s->cnt ? SEQUENCE : INFINITE;
+}
+
+/*
+ * Translate \??? into a character.  Up to 3 octal digits, if no digits either
+ * an escape code or a literal character.
+ */
+static int
+backslash(STR *s, int *is_octal)
+{
+	int ch, cnt, val;
+
+	if (is_octal != NULL)
+		*is_octal = 0;
+	for (cnt = val = 0; ; ) {
+		ch = (uchar_t)*++s->str;
+		if (!isdigit(ch) || ch > '7')
+			break;
+		val = val * 8 + ch - '0';
+		if (++cnt == 3) {
+			++s->str;
+			break;
+		}
+	}
+	if (cnt) {
+		if (is_octal != NULL)
+			*is_octal = 1;
+		return (val);
+	}
+	if (ch != '\0')
+		++s->str;
+	switch (ch) {
+	case 'a':			/* escape characters */
+		return ('\7');
+	case 'b':
+		return ('\b');
+	case 'f':
+		return ('\f');
+	case 'n':
+		return ('\n');
+	case 'r':
+		return ('\r');
+	case 't':
+		return ('\t');
+	case 'v':
+		return ('\13');
+	case '\0':			/*  \" -> \ */
+		s->state = EOS;
+		return ('\\');
+	default:			/* \x" -> x */
+		return (ch);
+	}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/cmd/tr/tr.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,386 @@
+/*
+ * Copyright (c) 1988, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/types.h>
+
+#include <ctype.h>
+#include <err.h>
+#include <limits.h>
+#include <locale.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#include "cmap.h"
+#include "cset.h"
+#include "extern.h"
+
+STR s1 = { STRING1, NORMAL, 0, OOBCH, 0, { 0, OOBCH }, NULL, NULL };
+STR s2 = { STRING2, NORMAL, 0, OOBCH, 0, { 0, OOBCH }, NULL, NULL };
+
+static struct cset *setup(char *, STR *, int, int);
+static void usage(void);
+
+static wint_t
+cmap_lookup(struct cmap *cm, wint_t from)
+{
+
+        if (from < CM_CACHE_SIZE && cm->cm_havecache)
+		return (cm->cm_cache[from]);
+        return (cmap_lookup_hard(cm, from));
+}
+
+static wint_t
+cmap_max(struct cmap *cm)
+{
+	return (cm->cm_max);
+}
+
+static inline bool
+cset_in(struct cset *cs, wchar_t ch)
+{
+
+ 	if (ch < CS_CACHE_SIZE && cs->cs_havecache)
+		return (cs->cs_cache[ch]);
+	return (cset_in_hard(cs, ch));
+}
+
+int
+main(int argc, char **argv)
+{
+	static int carray[NCHARS_SB];
+	struct cmap *map;
+	struct cset *delete, *squeeze;
+	int n, *p;
+	int Cflag, cflag, dflag, sflag, isstring2;
+	wint_t ch, cnt, lastch;
+
+	(void) setlocale(LC_ALL, "");
+
+	Cflag = cflag = dflag = sflag = 0;
+	while ((ch = getopt(argc, argv, "Ccdsu")) != -1)
+		switch ((char)ch) {
+		case 'C':
+			Cflag = 1;
+			cflag = 0;
+			break;
+		case 'c':
+			cflag = 1;
+			Cflag = 0;
+			break;
+		case 'd':
+			dflag = 1;
+			break;
+		case 's':
+			sflag = 1;
+			break;
+		case 'u':
+			setbuf(stdout, (char *)NULL);
+			break;
+		case '?':
+		default:
+			usage();
+		}
+	argc -= optind;
+	argv += optind;
+
+	switch (argc) {
+	case 0:
+	default:
+		usage();
+		/* NOTREACHED */
+	case 1:
+		isstring2 = 0;
+		break;
+	case 2:
+		isstring2 = 1;
+		break;
+	}
+
+	/*
+	 * tr -ds [-Cc] string1 string2
+	 * Delete all characters (or complemented characters) in string1.
+	 * Squeeze all characters in string2.
+	 */
+	if (dflag && sflag) {
+		if (!isstring2)
+			usage();
+
+		delete = setup(argv[0], &s1, cflag, Cflag);
+		squeeze = setup(argv[1], &s2, 0, 0);
+
+		for (lastch = OOBCH; (ch = getwchar()) != WEOF; )
+			if (!cset_in(delete, ch) &&
+			    (lastch != ch || !cset_in(squeeze, ch))) {
+				lastch = ch;
+				(void) putwchar(ch);
+			}
+		if (ferror(stdin))
+			err(1, NULL);
+		exit(0);
+	}
+
+	/*
+	 * tr -d [-Cc] string1
+	 * Delete all characters (or complemented characters) in string1.
+	 */
+	if (dflag) {
+		if (isstring2)
+			usage();
+
+		delete = setup(argv[0], &s1, cflag, Cflag);
+
+		while ((ch = getwchar()) != WEOF)
+			if (!cset_in(delete, ch))
+				(void) putwchar(ch);
+		if (ferror(stdin))
+			err(1, NULL);
+		exit(0);
+	}
+
+	/*
+	 * tr -s [-Cc] string1
+	 * Squeeze all characters (or complemented characters) in string1.
+	 */
+	if (sflag && !isstring2) {
+		squeeze = setup(argv[0], &s1, cflag, Cflag);
+
+		for (lastch = OOBCH; (ch = getwchar()) != WEOF; )
+			if (lastch != ch || !cset_in(squeeze, ch)) {
+				lastch = ch;
+				(void) putwchar(ch);
+			}
+		if (ferror(stdin))
+			err(1, NULL);
+		exit(0);
+	}
+
+	/*
+	 * tr [-Ccs] string1 string2
+	 * Replace all characters (or complemented characters) in string1 with
+	 * the character in the same position in string2.  If the -s option is
+	 * specified, squeeze all the characters in string2.
+	 */
+	if (!isstring2)
+		usage();
+
+	map = cmap_alloc();
+	if (map == NULL)
+		err(1, NULL);
+	squeeze = cset_alloc();
+	if (squeeze == NULL)
+		err(1, NULL);
+
+	s1.str = argv[0];
+
+	if (Cflag || cflag) {
+		(void) cmap_default(map, OOBCH);
+		if ((s2.str = strdup(argv[1])) == NULL)
+			errx(1, "strdup(argv[1])");
+	} else
+		s2.str = argv[1];
+
+	if (!next(&s2))
+		errx(1, "empty string2");
+
+	/*
+	 * For -s result will contain only those characters defined
+	 * as the second characters in each of the toupper or tolower
+	 * pairs.
+	 */
+
+	/* If string2 runs out of characters, use the last one specified. */
+	while (next(&s1)) {
+	again:
+		if (s1.state == CCLASS_LOWER &&
+		    s2.state == CCLASS_UPPER &&
+		    s1.cnt == 1 && s2.cnt == 1) {
+			do {
+				ch = towupper(s1.lastch);
+				(void) cmap_add(map, s1.lastch, ch);
+				if (sflag && iswupper(ch))
+					(void) cset_add(squeeze, ch);
+				if (!next(&s1))
+					goto endloop;
+			} while (s1.state == CCLASS_LOWER && s1.cnt > 1);
+			/* skip upper set */
+			do {
+				if (!next(&s2))
+					break;
+			} while (s2.state == CCLASS_UPPER && s2.cnt > 1);
+			goto again;
+		} else if (s1.state == CCLASS_UPPER &&
+		    s2.state == CCLASS_LOWER &&
+		    s1.cnt == 1 && s2.cnt == 1) {
+			do {
+				ch = towlower(s1.lastch);
+				(void) cmap_add(map, s1.lastch, ch);
+				if (sflag && iswlower(ch))
+					(void) cset_add(squeeze, ch);
+				if (!next(&s1))
+					goto endloop;
+			} while (s1.state == CCLASS_UPPER && s1.cnt > 1);
+			/* skip lower set */
+			do {
+				if (!next(&s2))
+					break;
+			} while (s2.state == CCLASS_LOWER && s2.cnt > 1);
+			goto again;
+		} else {
+			(void) cmap_add(map, s1.lastch, s2.lastch);
+			if (sflag)
+				(void) cset_add(squeeze, s2.lastch);
+		}
+		(void) next(&s2);
+	}
+endloop:
+	if (cflag || (Cflag && MB_CUR_MAX > 1)) {
+		/*
+		 * This is somewhat tricky: since the character set is
+		 * potentially huge, we need to avoid allocating a map
+		 * entry for every character. Our strategy is to set the
+		 * default mapping to the last character of string #2
+		 * (= the one that gets automatically repeated), then to
+		 * add back identity mappings for characters that should
+		 * remain unchanged. We don't waste space on identity mappings
+		 * for non-characters with the -C option; those are simulated
+		 * in the I/O loop.
+		 */
+		s2.str = argv[1];
+		s2.state = NORMAL;
+		for (cnt = 0; cnt < WCHAR_MAX; cnt++) {
+			if (Cflag && !iswrune(cnt))
+				continue;
+			if (cmap_lookup(map, cnt) == OOBCH) {
+				if (next(&s2))
+					(void) cmap_add(map, cnt, s2.lastch);
+				if (sflag)
+					(void) cset_add(squeeze, s2.lastch);
+			} else
+				(void) cmap_add(map, cnt, cnt);
+			if ((s2.state == EOS || s2.state == INFINITE) &&
+			    cnt >= cmap_max(map))
+				break;
+		}
+		(void) cmap_default(map, s2.lastch);
+	} else if (Cflag) {
+		for (p = carray, cnt = 0; cnt < NCHARS_SB; cnt++) {
+			if (cmap_lookup(map, cnt) == OOBCH && iswrune(cnt))
+				*p++ = cnt;
+			else
+				(void) cmap_add(map, cnt, cnt);
+		}
+		n = p - carray;
+		if (Cflag && n > 1)
+			(void) qsort(carray, n, sizeof (*carray), charcoll);
+
+		s2.str = argv[1];
+		s2.state = NORMAL;
+		for (cnt = 0; cnt < n; cnt++) {
+			(void) next(&s2);
+			(void) cmap_add(map, carray[cnt], s2.lastch);
+			/*
+			 * Chars taken from s2 can be different this time
+			 * due to lack of complex upper/lower processing,
+			 * so fill string2 again to not miss some.
+			 */
+			if (sflag)
+				(void) cset_add(squeeze, s2.lastch);
+		}
+	}
+
+	cset_cache(squeeze);
+	cmap_cache(map);
+
+	if (sflag)
+		for (lastch = OOBCH; (ch = getwchar()) != WEOF; ) {
+			if (!Cflag || iswrune(ch))
+				ch = cmap_lookup(map, ch);
+			if (lastch != ch || !cset_in(squeeze, ch)) {
+				lastch = ch;
+				(void) putwchar(ch);
+			}
+		}
+	else
+		while ((ch = getwchar()) != WEOF) {
+			if (!Cflag || iswrune(ch))
+				ch = cmap_lookup(map, ch);
+			(void) putwchar(ch);
+		}
+	if (ferror(stdin))
+		err(1, NULL);
+	exit(0);
+}
+
+static struct cset *
+setup(char *arg, STR *str, int cflag, int Cflag)
+{
+	struct cset *cs;
+
+	cs = cset_alloc();
+	if (cs == NULL)
+		err(1, NULL);
+	str->str = arg;
+	while (next(str))
+		(void) cset_add(cs, str->lastch);
+	if (Cflag)
+		(void) cset_addclass(cs, wctype("rune"), true);
+	if (cflag || Cflag)
+		cset_invert(cs);
+	cset_cache(cs);
+	return (cs);
+}
+
+int
+charcoll(const void *a, const void *b)
+{
+	static char sa[2], sb[2];
+
+	sa[0] = *(const int *)a;
+	sb[0] = *(const int *)b;
+	return (strcoll(sa, sb));
+}
+
+static void
+usage(void)
+{
+	(void) fprintf(stderr, "%s\n%s\n%s\n%s\n",
+	    "usage: tr [-Ccsu] string1 string2",
+	    "       tr [-Ccu] -d string1",
+	    "       tr [-Ccu] -s string1",
+	    "       tr [-Ccu] -ds string1 string2");
+	exit(1);
+}
--- a/usr/src/cmd/wbem/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-# include global definitions
-include ./Makefile.wbem
-
-SUBDIRS=	provider
-
-all:=		TARGET=	all
-install:=	TARGET=	install
-clean:=		TARGET=	clean
-clobber:=	TARGET=	clobber
-check:=		TARGET=	check
-lint:=		TARGET= lint
-_msg:=		TARGET= _msg
-
-.KEEP_STATE:
-
-all install clean clobber check lint _msg:	$(SUBDIRS)
-
-$(SUBDIRS): FRC
-	cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
--- a/usr/src/cmd/wbem/Makefile.cmd	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# cmd/wbem/Makefile.cmd
-#
-# Definitions common to command source for wbem provider helper commands.
-#
-# include global definitions; SRC should be defined in the shell.
-# SRC is needed until RFE 1026993 is implemented.
-
-
-include $(SRC)/cmd/wbem/Makefile.com
-
-ROOTWBEM32=     $(ROOTWBEM)/$(MACH32)
-ROOTWBEM64=     $(ROOTWBEM)/$(MACH64)
-
-ROOTWBEMPROG32= $(PROG:%=$(ROOTWBEM32)/%)
-ROOTWBEMPROG64= $(PROG:%=$(ROOTWBEM64)/%)
-
-WBEMTOOLDIRS=	$(ROOTWBEM32)
-WBEMTOOLDIRS += $(BUILD64)$(ROOTWBEM64)
-
-$(ROOTWBEM32) $(ROOTWBEM64): $(ROOTWBEMDIRS)
-	$(INS.dir)
-
-DIRMODE= 755
-FILEMODE= 755
-
-$(ROOTWBEM32)/%: %
-	$(INS.file)
-
-$(ROOTWBEM64)/%: %
-	$(INS.file)
--- a/usr/src/cmd/wbem/Makefile.com	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# cmd/wbem/Makefile.com
-#
-# Definitions common to both helper commands and providers.
-#
-
-include $(SRC)/cmd/Makefile.cmd
-
-ROOTSADM=       $(ROOT)/usr/sadm
-ROOTMOF=    	$(ROOTSADM)/mof
-ROOTSADMLIB=    $(ROOTSADM)/lib
-ROOTWBEM=       $(ROOTSADMLIB)/wbem
-ROOTWBEMINC=	/usr/sadm/lib/wbem/include
-ROOTUSRMENU=	$(ROOT)/usr/lib/locale/C
-
-ROOTWBEMPROG=   $(PROG:%=$(ROOTWBEM)/%)
-ROOTMOFPROG=	$(PROG:%=$(ROOTMOF)/%)
-
-ROOTWBEMDIRS=	$(ROOTSADM) $(ROOTSADMLIB) $(ROOTWBEM) $(ROOTMOF)
-
-DIRMODE= 755
-FILEMODE= 755
-
-$(ROOTMOFPROG) := FILEMODE= 644
-
-$(ROOTWBEMDIRS):
-	$(INS.dir)
-
-$(ROOTWBEM)/%: %
-	$(INS.file)
-
-$(ROOTMOF)/%: %
-	$(INS.file)
--- a/usr/src/cmd/wbem/Makefile.wbem	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# cmd/wbem/Makefile.wbem
-#
-# Definitions common to provider implementations.
-# The WBEM Services runtime and SDK are assumed to be installed.
-#
-# Copyright (c) 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-
-include $(SRC)/cmd/wbem/Makefile.com
-
-PLATFORM = solaris
-TARG_SYS= $(MACH)
-
-# for classpath: root of the com.sun.wbem hieararchy in the source tree
-PROVIDERSRC= $(SRC)/cmd/wbem/provider
-
-# for classpath: where the /usr/sadm/lib directory should be read from
-USRSADMLIB= /usr/sadm/lib
-
-# for classpath: where the /usr/sadm/lib/wbem directory should be read from
-USRSADMLIBWBEM= $(USRSADMLIB)/wbem
-
-CLASSPATH       = .:$(PROVIDERSRC):$(USRSADMLIBWBEM)/cimapi.jar:$(USRSADMLIBWBEM)/solarisprovider.jar:$(USRSADMLIB)/wbem.jar:$(USRSADMLIBWBEM)/providerutility.jar:$(USRSADMLIB)/xml.jar 
-
-INCLUDE		= $(JAVA_HOME)/include
-LIB		= $(JAVA_HOME)/lib
-
-# tell jstyle to ignore contents of block comments
-JSTYLE_TAIL	= -C
--- a/usr/src/cmd/wbem/provider/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2001-2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-# cmd/wbem/provider/Makefile
-#
-
-# include global definitions
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-SUBDIRS= com tools c
-POSUBDIRS= c
-
-# make only these for 'check'
-CHECK_SUBDIRS=	com c
-
-# make only these for 'lint'
-LINT_SUBDIRS=	tools c
-
-all:=		TARGET=	all
-install:=	TARGET=	install
-clean:=		TARGET=	clean
-clobber:=	TARGET=	clobber
-check:=		TARGET=	check
-lint:=		TARGET= lint
-_msg:=		TARGET= _msg
-
-.KEEP_STATE:
-
-all install clean clobber: $(SUBDIRS)
-
-_msg: $(POSUBDIRS)
-
-lint: $(LINT_SUBDIRS)
-
-check:	$(CHECK_SUBDIRS)
-
-$(SUBDIRS) : FRC
-	cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
--- a/usr/src/cmd/wbem/provider/c/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-
-
-COMMON_SUBDIRS  = wbem_disk \
-		  filesystems
-
-SUBDIRS         = $(COMMON_SUBDIRS) $($(ARCH)_SUBDIRS)
-
-
-all:=		TARGET = all
-clean:=		TARGET = clean
-clobber:=	TARGET = clobber
-install:=	TARGET = install
-lint:=		TARGET = lint
-check:=		TARGET = check
-_msg:=		TARGET = _msg
-
-.KEEP_STATE:
-
-all clean clobber lint _msg: ${SUBDIRS}
-
-FRC:
-
-${SUBDIRS}: FRC
-	cd $@; pwd; $(MAKE) $(TARGET)
-
-check: ${SUBDIRS} 
-	cd include; pwd; $(MAKE) $(TARGET)
-
-install: ${SUBDIRS} 
-	cd mof; pwd; $(MAKE) $(TARGET)
--- a/usr/src/cmd/wbem/provider/c/filesystems/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-SUBDIRS =	common \
-		wbem_nfs
-
-MSGSUBDIRS = wbem_nfs
-
-all:=		TARGET = all
-clean:=		TARGET = clean
-clobber:=	TARGET = clobber
-install:=	TARGET = install
-lint:=		TARGET = lint
-check:=		TARGET = check
-_msg:=		TARGET = _msg
-
-.KEEP_STATE:
-
-all install clean clobber lint: ${SUBDIRS}
-
-_msg: $(MSGSUBDIRS)
-
-FRC:
-
-${SUBDIRS}: FRC
-	cd $@; pwd; $(MAKE) $(TARGET)
-
-.WAIT:	
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-sparc_SUBDIRS =
-
-i386_SUBDIRS =
-
-ppc_SUBDIRS =
-
-COMMON_SUBDIRS =	cmdgeneration \
-			mount_methods
-
-SUBDIRS		=	$(COMMON_SUBDIRS) $($(ARCH)_SUBDIRS)
-
-all:=		TARGET = all
-clean:=		TARGET = clean
-clobber:=	TARGET = clobber
-install:=	TARGET = install
-lint:=		TARGET = lint
-check:=		TARGET = check
-
-.KEEP_STATE:
-
-all install clean clobber lint: ${SUBDIRS}
-
-FRC:
-
-${SUBDIRS}:	FRC
-		cd $@; pwd; $(MAKE) $(TARGET)
-
-.WAIT:	
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-sparc_SUBDIRS =
-
-i386_SUBDIRS =
-
-ppc_SUBDIRS =
-
-COMMON_SUBDIRS =	mount \
-			umount \
-			share \
-			unshare
-
-SUBDIRS	=		$(COMMON_SUBDIRS) $($(ARCH)_SUBDIRS)
-
-OBJECTS	=	cmdgen.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL =	. \
-		$(ROOTWBEMINC) \
-		$(SRC)/cmd/wbem/provider/c/include \
-		$(SRC)/cmd/wbem/provider/c/wbem_disk/common \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/include
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILES		= $(OBJECTS:%.o=%.po)
-
-all:=		TARGET = all
-clean:=		TARGET = clean
-clobber:=	TARGET = clobber
-install:=	TARGET = install
-lint:=		TARGET = lint
-check:=		TARGET = check
-
-.KEEP_STATE:
-
-all:		$(OBJECTS) ${SUBDIRS}
-
-catalog:	$(POFILES) ${SUBDIRS}
-
-check:		${SUBDIRS}
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-clean:		${SUBDIRS}
-		$(RM) $(OBJECTS) $(LINT_OBJS) *.po
-
-install:	all
-
-lint:		$(LINT_OBJS) ${SUBDIRS}
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-FRC:
-
-${SUBDIRS}:	FRC
-		cd $@; pwd; $(MAKE) $(TARGET)
-
-.WAIT:
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/cmdgen.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <errno.h>
-#include "cmdgen.h"
-#include "nfs_provider_names.h"
-#include "util.h"
-#include "cmdgen_include.h"
-
-/*
- * Public methods
- */
-
-/*
- * Method: cmdgen_generate_command
- *
- * Description: Routes the calls to the command generator to the appropriate
- * methods depending on the command type passed in.
- *
- * Parameters:
- *	- int cmd_type - The command type to execute.  This command type must
- *	be one of those defined in cmdgen.h.
- *	- CCIMInstance *inst - The instance used to form the command.
- *	- CCIMObjectPath *objPath - The object path used to form the command.
- *	- CCIMPropertyList *paramList - The parameter list used to form the
- *	command.
- *	- int *errp - The error pointer.
- *
- * Returns:
- *	- char * - the command formed from the input parameters.
- *	- NULL if an error occurred.
- */
-
-char *
-cmdgen_generate_command(int cmd_type, CCIMInstance *inst,
-	CCIMObjectPath *objPath, CCIMPropertyList *paramList, int *errp) {
-
-	char *cmd = NULL;
-	int err;
-
-	if (inst == NULL && objPath == NULL && paramList == NULL) {
-		util_handleError(COMMAND_GEN, CIM_ERR_INVALID_PARAMETER,
-			NULL, NULL, &err);
-		*errp = EINVAL;
-		return (NULL);
-	}
-
-	*errp = 0;
-	switch (cmd_type) {
-		case CMDGEN_MOUNTALL:
-			cmd = cmdgen_mountall(paramList, errp);
-			break;
-		case CMDGEN_NFS_MOUNT:
-			cmd = cmdgen_mount(CMDGEN_NFS, inst, objPath, errp);
-			break;
-		case CMDGEN_NFS_UMOUNT:
-			cmd = cmdgen_umount(inst, objPath, errp);
-			break;
-		case CMDGEN_NFS_SHARE:
-			cmd = cmdgen_share(CMDGEN_NFS, inst, objPath, errp);
-			break;
-		case CMDGEN_NFS_UNSHARE:
-			cmd = cmdgen_unshare(CMDGEN_NFS, inst, objPath, errp);
-			break;
-		case CMDGEN_SHAREALL:
-			cmd = cmdgen_shareall(paramList, errp);
-			break;
-		case CMDGEN_UNSHAREALL:
-			cmd = cmdgen_unshareall(paramList, errp);
-			break;
-		case CMDGEN_UMOUNTALL:
-			cmd = cmdgen_umountall(paramList, errp);
-			break;
-		default:
-			*errp = EINVAL;
-
-	}
-	return (cmd);
-} /* cmdgen_generate_command */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/cmdgen.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMDGEN_H
-#define	_CMDGEN_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-
-/*
- * Public data type declaration
- */
-
-/*
- * The supported command types.
- */
-#define	CMDGEN_NFS_MOUNT	0
-#define	CMDGEN_MOUNTALL		1
-#define	CMDGEN_NFS_UMOUNT	2
-#define	CMDGEN_UMOUNTALL	3
-#define	CMDGEN_NFS_SHARE	4
-#define	CMDGEN_NFS_UNSHARE	5
-#define	CMDGEN_SHAREALL		6
-#define	CMDGEN_UNSHAREALL	7
-
-char *cmdgen_generate_command(int cmd_type, CCIMInstance *inst,
-	CCIMObjectPath *objPath, CCIMPropertyList *paramList, int *errp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMDGEN_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/cmdgen_include.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CMDGEN_INCLUDE_H
-#define	_CMDGEN_INCLUDE_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <errno.h>
-
-/*
- * Public data type declarations
- */
-
-/*
- * Supported fstypes
- */
-#define	CMDGEN_NFS	0
-
-/*
- * Method declarations
- */
-char	*cmdgen_mount(int fstype, CCIMInstance *inst, CCIMObjectPath *objPath,
-		int *errp);
-char	*cmdgen_mountall(CCIMPropertyList *paramList, int *errp);
-char	*cmdgen_mount_nfs(CCIMInstance *inst, CCIMObjectPath *objPath,
-		int *errp);
-char	*cmdgen_share(int fstype, CCIMInstance *inst, CCIMObjectPath *objPath,
-		int *errp);
-char	*cmdgen_shareall(CCIMPropertyList *paramList, int *errp);
-char	*cmdgen_share_nfs(CCIMInstance *inst, CCIMObjectPath *objPath,
-		int *errp);
-char	*cmdgen_umount(CCIMInstance *inst, CCIMObjectPath *objPath, int *errp);
-char	*cmdgen_umountall(CCIMPropertyList *paramList, int *errp);
-char	*cmdgen_unshare(int fstype, CCIMInstance *inst, CCIMObjectPath *objPath,
-		int *errp);
-char	*cmdgen_unshareall(CCIMPropertyList *paramList, int *errp);
-char	*cmdgen_unshare_nfs(CCIMInstance *inst, CCIMObjectPath *objPath,
-		int *errp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CMDGEN_INCLUDE_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/mount/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,91 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-sparc_SUBDIRS =
-
-i386_SUBDIRS =
-
-ppc_SUBDIRS =
-
-COMMON_SUBDIRS = nfs
-
-SUBDIRS =	$(COMMON_SUBDIRS) $($(ARCH)_SUBDIRS)
-
-OBJECTS	=	cmdgen_mount.o \
-		cmdgen_mountall.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/cmd/wbem/provider/c/filesystems/common/cmdgeneration 
-
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILES		= $(OBJECTS:%.o=%.po)
-
-all:=		TARGET = all
-clean:=		TARGET = clean
-clobber:=	TARGET = clobber
-install:=	TARGET = install
-lint:=		TARGET = lint
-check:=		TARGET = check
-
-.KEEP_STATE:
-
-all:		$(OBJECTS) ${SUBDIRS}
-
-catalog:	$(POFILES) ${SUBDIRS}
-
-check:		${SUBDIRS}
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-clean:		${SUBDIRS}
-		$(RM) $(OBJECTS) $(LINT_OBJS) *.po
-
-install:	all
-
-lint:		$(LINT_OBJS) ${SUBDIRS}
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-FRC:
-
-${SUBDIRS}: 	FRC
-		cd $@; pwd; $(MAKE) $(TARGET)
-
-.WAIT:
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/mount/cmdgen_mount.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "cmdgen_include.h"
-
-/*
- * Public methods
- */
-
-/*
- * Method: cmdgen_mount
- *
- * Description: Routes the calls to the mount command generator to the
- * appropriate code for the different mount types.
- *
- * Parameters:
- *	- int fstype - The file system type being mounted.
- *	- CCIMInstance *inst - The instance containing the properties of the
- *	file system to be mounted.
- *	- CCIMObjectPath *objPath - The object containing the properties of the
- *	file system to be mounted.
- *
- * Returns:
- *	- char * - The command generated.
- */
-char *
-cmdgen_mount(int fstype, CCIMInstance *inst, CCIMObjectPath *objPath,
-	int *errp) {
-
-	char *cmd = NULL;
-
-	*errp = 0;
-	switch (fstype) {
-		case CMDGEN_NFS:
-			cmd = cmdgen_mount_nfs(inst, objPath, errp);
-			break;
-		default:
-			*errp = EINVAL;
-	}
-	return (cmd);
-} /* cmdgen_mount */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/mount/cmdgen_mountall.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "cmdgen_include.h"
-
-#define	MNTALL_CMD "/usr/sbin/mountall"
-#define	FSTYPE_FLAG "-F"
-#define	LOCAL_FLAG "-l"
-#define	REMOTE_FLAG "-r"
-#define	SPACE " "
-
-/*
- * Public methods
- */
-/*
- * The -g flag is a project-private interface for pxfs and is not documented in
- * the mountall man page.  Therefore, we will not support it with this public
- * interface.
- */
-/*
- * Method: cmdgen_mountall
- *
- * Description: Forms the mountall command with the options given.
- *
- * Parameters:
- *	- CCIMPropertyList *paramList - The property list containing the
- *	options to form the mountall command.
- *	- int *errp - The error indicator.  Upon error, this will be set to a
- *	value != 0.
- *
- * Returns:
- *	- char * - The mountall command.
- *	- NULL if an error occurred.
- */
-char *
-cmdgen_mountall(CCIMPropertyList *paramList, int *errp) {
-	CCIMPropertyList	*currentParam;
-	CCIMProperty		*fstypeProp = NULL;
-	CCIMProperty		*onlyLocalProp = NULL;
-	CCIMProperty		*onlyRemoteProp = NULL;
-	CCIMProperty		*fileProp = NULL;
-	char			*cmd = NULL;
-	int			cmdLen;
-
-	*errp = 0;
-	cmd = strdup(MNTALL_CMD);
-	if (cmd == NULL) {
-		*errp = errno;
-		return (NULL);
-	}
-
-	cim_logDebug("cmdgen_mountall", "Set command to: %s", cmd);
-	/*
-	 * In parameters are as follows:
-	 * 1. String fstype,
-	 * 2. Boolean onlyLocalFileSystems,
-	 * 3. Boolean onlyRemoteFileSystems,
-	 * 4. String fstable
-	 *
-	 * They are expected to always be in this order in the property list.
-	 */
-	/*
-	 * Check if a file system type was passed in.  If one was we will
-	 * use this in forming the command.
-	 */
-	currentParam = paramList;
-	fstypeProp = currentParam->mDataObject;
-	if (fstypeProp != NULL && fstypeProp->mValue != NULL &&
-		strlen(fstypeProp->mValue) != 0) {
-
-		cim_logDebug("cmdgen_mountall", "Adding the -F flag");
-		/*
-		 * Add -F <fstype> to the command
-		 */
-		cmdLen = strlen(cmd) + strlen(SPACE) + strlen(FSTYPE_FLAG) +
-			strlen(SPACE) + strlen(fstypeProp->mValue) + 1;
-		cmd = realloc(cmd, (size_t)(cmdLen * sizeof (char)));
-		if (cmd == NULL) {
-			*errp = errno;
-			return (NULL);
-		}
-		(void) snprintf(cmd, cmdLen, "%s%s%s%s%s", cmd, SPACE,
-		    FSTYPE_FLAG, SPACE, fstypeProp->mValue);
-	}
-
-	currentParam = currentParam->mNext;
-	onlyLocalProp = currentParam->mDataObject;
-
-	if (onlyLocalProp != NULL && onlyLocalProp->mValue != NULL) {
-		if (strcmp(onlyLocalProp->mValue, "1") == 0 ||
-			strcasecmp(onlyLocalProp->mValue, "true") == 0) {
-
-			cim_logDebug("cmdgen_mountall", "Adding the -l flag");
-			/*
-			 * Add the -l flag to the command.
-			 */
-			cmdLen = strlen(cmd) + strlen(SPACE) +
-				strlen(LOCAL_FLAG) + 1;
-
-			cmd = realloc(cmd, (size_t)(cmdLen * sizeof (char)));
-			if (cmd == NULL) {
-				*errp = errno;
-				return (NULL);
-			}
-			(void) snprintf(cmd, cmdLen, "%s%s%s", cmd,
-			    SPACE, LOCAL_FLAG);
-		}
-	}
-
-	currentParam = currentParam->mNext;
-	onlyRemoteProp = currentParam->mDataObject;
-
-	cim_logDebug("cmdgen_mountall", "Checking onlyRemoteProp");
-	if (onlyRemoteProp != NULL && onlyRemoteProp->mValue != NULL) {
-		if (strcmp(onlyRemoteProp->mValue, "1") == 0 ||
-			strcasecmp(onlyRemoteProp->mValue, "true") == 0) {
-
-			cim_logDebug("cmdgen_mountall", "Adding the -r flag");
-
-			/*
-			 * Add the -r flag to the command.
-			 */
-			cmdLen = strlen(cmd) + strlen(SPACE) +
-				strlen(REMOTE_FLAG) + 1;
-			cmd = realloc(cmd, (size_t)(cmdLen * sizeof (char)));
-			if (cmd == NULL) {
-				*errp = errno;
-				return (NULL);
-			}
-			(void) snprintf(cmd, cmdLen, "%s%s%s", cmd, SPACE,
-				REMOTE_FLAG);
-		}
-	}
-
-	currentParam = currentParam->mNext;
-	fileProp = currentParam->mDataObject;
-
-	if (fileProp != NULL && fileProp->mValue != NULL &&
-		strlen(fileProp->mValue) != 0) {
-
-		cim_logDebug("cmdgen_mountall", "Adding the fstable");
-		/*
-		 * Add the file to the command.
-		 */
-		cmdLen = strlen(cmd) + strlen(SPACE) +
-			strlen(fileProp->mValue) + 1;
-		cmd = realloc(cmd, (size_t)(cmdLen * sizeof (char)));
-		if (cmd == NULL) {
-			*errp = errno;
-			return (NULL);
-		}
-		(void) snprintf(cmd, cmdLen, "%s%s%s", cmd, SPACE,
-			fileProp->mValue);
-	}
-
-	/*
-	 * The caller must free the memory allocated to the return value
-	 * using free().
-	 */
-	cim_logDebug("cmdgen_mountall", "The return command is: %s", cmd);
-	return (cmd);
-} /* cmdgen_mountall */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/mount/nfs/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	cmdgen_mount_nfs.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/cmd/wbem/provider/c/include \
-		$(SRC)/cmd/wbem/provider/c/wbem_disk/common \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/include \
-		$(SRC)/cmd/wbem/provider/c/filesystems/common/cmdgeneration
-
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILES		= $(OBJECTS:%.o=%.po)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-catalog:	$(POFILES)
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) *.po
-install:	all
-lint:		$(LINT_OBJS)
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/mount/nfs/cmdgen_mount_nfs.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,488 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "cmdgen_include.h"
-#include "nfs_keys.h"
-#include "util.h"
-#include "messageStrings.h"
-#include "Solaris_NFSMount.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/types.h>
-
-/*
- * Private variables
- */
-#define	NFS_MNT_CMD	"mount -F nfs\0"
-#define	SPACE		" "
-#define	SPEC_OPT_FLAG	"-o"
-
-/*
- * Private method declarations
- */
-char	*add_property_to_optstring(char *opt_string, CCIMProperty *prop,
-		int element, int *errp);
-char	*add_to_mntopts(char *mntopt_string, char *attribute, char *value,
-			int *errp);
-char	*create_command(char *resource, char *mntpnt, boolean_t mflag,
-			boolean_t Oflag, boolean_t spec_option_flag,
-			char *mntopt, int *errp);
-char	*create_option_string(CCIMInstance *inst, int *errp);
-
-/*
- * Public methods
- */
-/*
- * Method: cmdgen_mount_nfs
- *
- * Description: Creates the nfs mount command with the options from the
- * CCIMInstance passed in.
- *
- * Parameters:
- *	- CCIMInstance *inst - The instance containing the properties of the
- *	mount.
- *	- CCIMObjectPath *objPath - The object path containing properties of
- *	the mount.
- *	- int *errp - The error indicator.  Upon error, a value != 0 will be
- *	set.
- *
- * Returns:
- *	- char * - The nfs mount command generated.
- *	- NULL if an error occurred.
- */
-/* ARGSUSED */
-char *
-cmdgen_mount_nfs(CCIMInstance *inst, CCIMObjectPath *objPath, int *errp) {
-	boolean_t mflag; /* NoMnttabEntry flag */
-	boolean_t Oflag; /* Overlay flag */
-	boolean_t spec_option_flag; /* "-o" */
-	char *cmd;
-	char *resource;
-	char *mntpnt;
-	char *mntopt;
-	CCIMProperty *mnt_prop;
-
-	*errp = 0;
-	if (inst == NULL) {
-		*errp = EINVAL;
-		return (NULL);
-	}
-
-	/*
-	 * First, get the resource and mount point from the Dependent
-	 * and Antecedent properties, respectively.
-	 */
-	mnt_prop = cim_getProperty(inst, nfsMountProps[ANT].name);
-	if (mnt_prop == NULL) {
-		*errp = EINVAL;
-		return (NULL);
-	} else {
-		CCIMPropertyList *ant_proplist;
-		char *tmp;
-
-		ant_proplist = mnt_prop->mObjPathValue->mKeyProperties;
-
-		tmp = util_getKeyValue(ant_proplist, string,
-			NAME, errp);
-		if (tmp == NULL || *errp != 0) {
-			return (NULL);
-		}
-
-		mntpnt = strdup(tmp);
-		if (mntpnt == NULL) {
-			*errp = ENOMEM;
-			return (NULL);
-		}
-		cim_freeProperty(mnt_prop);
-	}
-
-	mnt_prop = cim_getProperty(inst, nfsMountProps[DEP].name);
-	if (mnt_prop == NULL) {
-		*errp = EINVAL;
-		return (NULL);
-	} else {
-		CCIMPropertyList *dep_proplist;
-		char *tmp;
-
-		dep_proplist = mnt_prop->mObjPathValue->mKeyProperties;
-		/*
-		 * We expect the resource to be in the
-		 * form of "resource\=<resource>" or
-		 * just "<resource>".  Determine which
-		 * format we have.
-		 */
-		tmp = util_getKeyValue(dep_proplist, string, NAME, errp);
-		if (tmp == NULL || *errp != 0) {
-			return (NULL);
-		}
-
-		resource = strdup(tmp);
-		if (resource == NULL) {
-			*errp = ENOMEM;
-			free(mntpnt);
-			return (NULL);
-		}
-
-		cim_freeProperty(mnt_prop);
-	}
-
-	/*
-	 * Next get the mount attributes which are set with flags.
-	 * For NFS those are:
-	 * -r (read only) ** We don't check for this one since it
-	 * can be added w/ the "ro" option.
-	 * -m:(no mnttab entry)
-	 * -O:(overlay)
-	 */
-	mflag = B_FALSE;
-	mnt_prop = cim_getProperty(inst, nfsMountProps[NOMNTTABENT].name);
-	if (mnt_prop != NULL && mnt_prop->mValue != NULL) {
-		if ((strcmp(mnt_prop->mValue, "1") == 0))
-			mflag = B_TRUE;
-
-		cim_freeProperty(mnt_prop);
-	}
-
-	Oflag = B_FALSE;
-	mnt_prop = cim_getProperty(inst, nfsMountProps[OVERLAY].name);
-	if (mnt_prop != NULL && mnt_prop->mValue != NULL) {
-		/*
-		 * Determine the value of the property.
-		 */
-		cim_logDebug("cmdgen_mount_nfs", "nfsMountProps[OVERLAY] = %s",
-			mnt_prop->mValue);
-		if ((strcmp(mnt_prop->mValue, "1") == 0))
-			Oflag = B_TRUE;
-
-		cim_freeProperty(mnt_prop);
-	}
-
-	/*
-	 * Now check if the MountOptions property is populated.
-	 * If yes, create the mount with the options defined in that
-	 * string.  No other property values will need to be checked.
-	 */
-
-	mnt_prop = cim_getProperty(inst, nfsMountProps[MNTOPTS].name);
-	if (mnt_prop != NULL && (strlen(mnt_prop->mValue) != 0)) {
-		cim_logDebug("cmdgen_mount_nfs",
-			"MountOptions =%s", mnt_prop->mValue);
-		spec_option_flag = B_TRUE;
-		cmd = create_command(resource, mntpnt, mflag, Oflag,
-			spec_option_flag, mnt_prop->mValue, errp);
-		free(resource);
-		free(mntpnt);
-		if (cmd == NULL) {
-			return (NULL);
-		}
-		cim_freeProperty(mnt_prop);
-
-	} else {
-		mntopt = create_option_string(inst, errp);
-		/*
-		 * If mntopt is NULL we either don't have any options,
-		 * or we ran into an error.
-		 */
-		if (mntopt == NULL) {
-			if (*errp != 0) {
-				free(resource);
-				free(mntpnt);
-				return (NULL);
-			}
-			spec_option_flag = B_FALSE;
-		} else {
-			spec_option_flag = B_TRUE;
-		}
-		cmd = create_command(resource, mntpnt, mflag, Oflag,
-				    spec_option_flag, mntopt, errp);
-		free(resource);
-		free(mntpnt);
-		free(mntopt);
-		if (cmd == NULL) {
-			return (NULL);
-		}
-	}
-
-	return (cmd);
-} /* cmdgen_mount_nfs */
-
-/*
- * Private methods
- */
-
-char *
-add_property_to_optstring(char *opt_string, CCIMProperty *prop, int element,
-	int *errp) {
-
-	char	*ret_val = NULL;
-
-	*errp = 0;
-	if (prop->mType == boolean) {
-		if (strcmp(prop->mValue, "1") == 0) {
-			if (nfsMountProps[element].true_opt_value != NULL) {
-				ret_val = add_to_mntopts(opt_string,
-					nfsMountProps[element].true_opt_value,
-					NULL, errp);
-				if (ret_val == NULL && *errp != 0) {
-					return (NULL);
-				}
-			}
-		} else {
-			if (nfsMountProps[element].false_opt_value != NULL) {
-				ret_val = add_to_mntopts(opt_string,
-					nfsMountProps[element].false_opt_value,
-					NULL, errp);
-				if (ret_val == NULL && *errp != 0) {
-					return (NULL);
-				}
-			}
-		}
-	} else {
-		if ((nfsMountProps[element].string_opt_value != NULL) &&
-			(strlen(prop->mValue) != 0)) {
-			ret_val = add_to_mntopts(opt_string,
-				nfsMountProps[element].string_opt_value,
-				prop->mValue, errp);
-			if (ret_val == NULL && *errp != 0) {
-				return (NULL);
-			}
-		}
-	}
-
-	return (ret_val);
-} /* add_property_to_optstring */
-
-/*
- * Method: add_to_mntopts
- *
- * Description: Adds the passed in mount option to the option list.
- *
- * Parameters:
- *	- char *mntopt_string - The option string to add the mount option to.
- *	A NULL value may be passed in if the option is the first one in the
- *	mount option string.
- *	- char *attribute - The mount option being added to the option string.
- *	- char *value - The value of the mount option.  This only applies to
- *	mount options having an '=' character.  Example: acdirmax=
- *	A NULL value will be passed in if the option does not require a value.
- *	- int *errp - The error indicator.  If an error occurred the value will
- *	be != 0 upon return.
- *
- * Returns: The mount option string, as passed in with mntopt_string,
- * concatenated with the passed in attribute, and value, if one exists.
- *
- * NOTE: The caller will have to free the space allocated for the returned
- * string.
- */
-char *
-add_to_mntopts(char *mntopt_string, char *attribute, char *value, int *errp) {
-	int len;
-	char *ret_val;
-	char *tmp = NULL;
-
-	/*
-	 * Check if value is not NULL.  If it isn't we need to
-	 * concatenate attribute with value.
-	 */
-	if (value != NULL) {
-		tmp = (char *)calloc((size_t)(strlen(attribute) +
-			strlen(value) + 1), (size_t)sizeof (char));
-		if (tmp == NULL) {
-			*errp = ENOMEM;
-			return (NULL);
-		}
-		(void) snprintf(tmp, (size_t)(strlen(attribute) +
-			strlen(value) + 1), "%s%s", attribute, value);
-	} else {
-		tmp = strdup(attribute);
-		if (tmp == NULL) {
-			*errp = ENOMEM;
-			return (NULL);
-		}
-	}
-
-	/*
-	 * If mntopt_string is NULL, this is the very first attribute in the
-	 * mount option list.
-	 */
-	if (mntopt_string == NULL) {
-		ret_val = strdup(tmp);
-		if (ret_val == NULL) {
-			free(tmp);
-			*errp = ENOMEM;
-			return (NULL);
-		}
-
-	} else {
-		len = (strlen(mntopt_string) + strlen(tmp) + 2);
-		ret_val = (char *)calloc((size_t)len, (size_t)sizeof (char));
-		if (ret_val == NULL)
-		{
-			free(tmp);
-			*errp = ENOMEM;
-			return (NULL);
-		}
-		(void) snprintf(ret_val, (size_t)len, "%s%s%s",
-		    mntopt_string, ",", tmp);
-	}
-	free(tmp);
-	*errp = 0;
-	return (ret_val);
-} /* add_to_mntopts */
-
-/*
- * Method: create_command
- *
- * Description: Creates the nfs mount command out of the properties passed in.
- *
- * Parameters:
- *	- char *resource - The resource to be mounted.
- *	- char *mntpnt - The mount point.
- *	- boolean_t mflag - Whether or not to add the '-m' flag.
- *	- boolean_t Oflag - Whether or not to add the '-O' flag.
- *	- boolean_t spec_option_flag - Whether or not to add the '-o' flag.
- *	- char *mntopts - The mount option string.
- *	- int *errp - The error indicator.  Upon error, this will be set to a
- *	value != 0.
- *
- * Returns:
- *	- char * - The command generated.
- *	- NULL if an error occurred.
- */
-char *
-create_command(char *resource, char *mntpnt, boolean_t mflag, boolean_t Oflag,
-	boolean_t spec_option_flag, char *mntopts, int *errp) {
-
-	char	*cmd = NULL;
-	int	cmdMaxLen;
-
-	*errp = 0;
-	cmdMaxLen = strlen(NFS_MNT_CMD) + strlen(resource) + strlen(mntpnt) +
-		MAXSIZE;
-
-	if (mntopts != NULL) {
-		cmdMaxLen = cmdMaxLen + strlen(mntopts);
-	}
-
-	/*
-	 * Allocate a space we know will be big enough for the command.
-	 */
-	cmd = calloc((size_t)cmdMaxLen, (size_t)sizeof (char));
-	if (cmd == NULL) {
-		*errp = errno;
-		return (NULL);
-	}
-
-	(void) snprintf(cmd, cmdMaxLen, "%s", NFS_MNT_CMD);
-
-	if (mflag == B_TRUE)
-		(void) snprintf(cmd, cmdMaxLen, "%s%s%s", cmd, SPACE,
-			NFS_NOMNTTABENT_TRUE);
-
-	if (Oflag == B_TRUE)
-		(void) snprintf(cmd, cmdMaxLen, "%s%s%s", cmd, SPACE,
-		    NFS_OVERLAY);
-
-	if (spec_option_flag == B_TRUE)
-		(void) snprintf(cmd, cmdMaxLen, "%s%s%s%s%s", cmd, SPACE,
-			SPEC_OPT_FLAG, SPACE, mntopts);
-
-	(void) snprintf(cmd, cmdMaxLen, "%s%s%s%s%s", cmd, SPACE,
-	    resource, SPACE, mntpnt);
-
-	return (cmd);
-} /* create_command */
-
-/*
- * Method: create_option_string
- *
- * Description: Creates the mount command understandable option string from the
- * passed in Solaris_NFSMount instance.
- *
- * Parameters:
- *	- CCIMInstance *inst - The Solaris_NFSMount instance containing all of
- *	the properties of the mount to be created.
- *	- int *errp - The error indicator.  Upon error, this will be set to a
- *	value != 0.
- *
- * Returns:
- *	- char * - The mount option string.
- *	- NULL if an error occurred.
- */
-char *
-create_option_string(CCIMInstance *inst, int *errp) {
-	CCIMProperty	*mnt_prop;
-	char		*mntopt_string = NULL;
-	char		*tmp;
-	int		currentElement;
-
-	*errp = 0;
-	for (currentElement = 0; currentElement < PROPCOUNT; currentElement++) {
-		mnt_prop = cim_getProperty(inst,
-			nfsMountProps[currentElement].name);
-		if (mnt_prop == NULL) {
-			*errp = EINVAL;
-			free(mntopt_string);
-			return (NULL);
-		}
-
-		/*
-		 * Handle special "vers=highest" case.
-		 */
-		if ((strcmp(mnt_prop->mName, "Version") == 0) &&
-			(strcasecmp(mnt_prop->mValue, "highest") == 0)) {
-			cim_freeProperty(mnt_prop);
-			continue;
-		}
-
-		tmp = add_property_to_optstring(mntopt_string, mnt_prop,
-			currentElement, errp);
-		if (tmp == NULL) {
-			if (*errp != 0) {
-				free(mntopt_string);
-				return (NULL);
-			}
-		} else {
-
-			free(mntopt_string);
-			mntopt_string = strdup(tmp);
-			if (mntopt_string == NULL) {
-				*errp = errno;
-				free(tmp);
-				return (NULL);
-			}
-
-			free(tmp);
-		}
-		cim_freeProperty(mnt_prop);
-	}
-
-	return (mntopt_string);
-} /* create_option_string */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/share/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-sparc_SUBDIRS =
-
-i386_SUBDIRS =
-
-ppc_SUBDIRS =
-
-COMMON_SUBDIRS = nfs
-
-SUBDIRS =	$(COMMON_SUBDIRS) $($(ARCH)_SUBDIRS)
-
-OBJECTS	=	cmdgen_share.o cmdgen_shareall.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-WBEM_PROV =	cmd/wbem/provider/c
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/$(WBEM_PROV)/filesystems/wbem_nfs/nfs_share \
-		$(SRC)/$(WBEM_PROV)/filesystems/wbem_nfs/include \
-		$(SRC)/$(WBEM_PROV)/filesystems/common/cmdgeneration
-
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILES		= $(OBJECTS:%.o=%.po)
-
-all:=		TARGET = all
-clean:=		TARGET = clean
-clobber:=	TARGET = clobber
-install:=	TARGET = install
-lint:=		TARGET = lint
-check:=		TARGET = check
-
-.KEEP_STATE:
-
-all:		$(OBJECTS) ${SUBDIRS}
-
-catalog:	$(POFILES) ${SUBDIRS}
-
-check:		${SUBDIRS}
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-clean:		${SUBDIRS}
-		$(RM) $(OBJECTS) $(LINT_OBJS) *.po
-
-install:	all
-
-lint:		$(LINT_OBJS) ${SUBDIRS}
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-FRC:
-
-${SUBDIRS}: 	FRC
-		cd $@; pwd; $(MAKE) $(TARGET)
-
-.WAIT:
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/share/cmdgen_share.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "cmdgen_include.h"
-
-/*
- * Private data type declaration
- */
-
-/*
- * Public methods
- */
-char *
-cmdgen_share(int fstype, CCIMInstance *inst, CCIMObjectPath *objPath,
-	    int *errp) {
-	char *cmd = NULL;
-
-	switch (fstype) {
-		case CMDGEN_NFS:
-			cmd = cmdgen_share_nfs(inst, objPath, errp);
-			break;
-	}
-	return (cmd);
-} /* cmdgen_share */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/share/cmdgen_shareall.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "cmdgen_include.h"
-
-#define	NFS_SHAREALL_CMD	"/usr/sbin/shareall"
-#define	FSTYPE_FLAG		"-F"
-#define	SPACE			" "
-
-/*
- * Public methods
- */
-char *
-cmdgen_shareall(CCIMPropertyList *paramList, int *errp) {
-
-	CCIMPropertyList	*tmpParamList;
-	CCIMProperty		*fstype;
-	CCIMProperty		*filename;
-	char			*cmd = NULL;
-	int			cmdLen;
-
-	/*
-	 * In parameters are as follows:
-	 * 1. String fstype,
-	 * 2. String filename
-	 *
-	 * They are expected to always be in this order in the property list.
-	 */
-	if (paramList == NULL) {
-		*errp = EINVAL;
-	} else {
-		/*
-		 * Check if a file system type and/or a filename was
-		 * passed in.  These we will be used in forming the
-		 * command.
-		 */
-		tmpParamList = paramList;
-		fstype = tmpParamList->mDataObject;
-		tmpParamList = tmpParamList->mNext;
-		filename = tmpParamList->mDataObject;
-		if (fstype != NULL && fstype->mValue != NULL &&
-		    strlen(fstype->mValue) != 0) {
-			cmdLen = strlen(NFS_SHAREALL_CMD) +
-			    strlen(fstype->mValue) + 5;
-				/*
-				 * Added two bytes for spaces, two bytes
-				 * for the "-F" filesystem type flag, and
-				 * a byte for the string terminator.
-				 */
-			cmd = malloc((size_t)(cmdLen * sizeof (char)));
-			if (cmd == NULL) {
-				*errp = errno;
-				return (NULL);
-			}
-			(void) snprintf(cmd, cmdLen, "%s %s %s",
-			    NFS_SHAREALL_CMD, FSTYPE_FLAG,
-			    fstype->mValue);
-		}
-
-		if (filename != NULL && filename->mValue != NULL &&
-		    strlen(filename->mValue) != 0) {
-			cmdLen = strlen(NFS_SHAREALL_CMD) +
-			    strlen(filename->mValue) + 2;
-				/*
-				 * Added one byte for a space and one for
-				 * the string terminator.
-				 */
-			cmd = malloc((size_t)(cmdLen * sizeof (char)));
-			if (cmd == NULL) {
-				*errp = errno;
-				return (NULL);
-			}
-			(void) snprintf(cmd, cmdLen, "%s %s",
-			    cmd, filename->mValue);
-		} else {
-			cmd = strdup(NFS_SHAREALL_CMD);
-			if (cmd == NULL) {
-				*errp = errno;
-			}
-		}
-	}
-	return (cmd);
-} /* cmdgen_shareall */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/share/nfs/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	cmdgen_share_nfs.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-WBEM_PROV =	cmd/wbem/provider/c
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/$(WBEM_PROV)/filesystems/wbem_nfs/include \
-		$(SRC)/$(WBEM_PROV)/filesystems/wbem_nfs/nfs_share \
-		$(SRC)/$(WBEM_PROV)/filesystems/common/cmdgeneration
-
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILES		= $(OBJECTS:%.o=%.po)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-catalog:	$(POFILES)
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) *.po
-install:	all
-lint:		$(LINT_OBJS)
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/share/nfs/cmdgen_share_nfs.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,356 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <errno.h>
-#include "cmdgen_include.h"
-#include "nfs_share_attr.h"
-#include "nfs_sharesecurity_attr.h"
-#include "Solaris_NFSShare.h"
-
-
-/*
- * Private data type declaration
- */
-#define	NFS_SHARE_CMD	"share -F nfs"
-#define	SPEC_OPT_FLAG	"-o"
-
-/*
- * Private method declarations
- */
-static char *create_shareopt_string(CCIMInstance *, int *);
-static char *add_option_string(char *, char *, int *);
-static char *create_sharesec_optstring(CCIMInstance *, int *);
-
-/*
- * Public methods
- */
-/*
- * generates the share command string
- * memory returned must be freed by the caller.
- */
-/* ARGSUSED */
-char *
-cmdgen_share_nfs(CCIMInstance *inst, CCIMObjectPath *objPath, int *error)
-{
-
-	CCIMProperty *share_Prop;
-	char *share_desc;
-	char *cmd;
-	char *shareopts;
-	char *sharesecopts;
-	size_t len;
-
-	cim_logDebug("cmdgen_share_nfs", "Just entering...");
-	if (inst != NULL) {
-		/*
-		 * Create the share command using the properties
-		 * passed in from inst.
-		 */
-
-		/*
-		 * Get the share description attribute if the "-d"
-		 * flag is set.
-		 */
-
-		share_Prop = cim_getProperty(inst,
-		    nfsShareProps[DESCRIPTION].name);
-		if (share_Prop != NULL && strcmp(share_Prop->mValue, "") != 0) {
-			len = strlen(share_Prop->mValue) + 4;
-			share_desc = (char *)calloc(len, sizeof (char));
-			(void) snprintf(share_desc, len, "-d %s",
-			    share_Prop->mValue);
-		} else {
-			share_desc = strdup("");
-		}
-
-		share_Prop =
-		    cim_getProperty(inst, nfsShareProps[SHAREDNAME].name);
-		if (share_Prop == NULL) {
-			free(share_desc);
-			*error = EINVAL;
-			return ((char *)NULL);
-		}
-		shareopts = create_shareopt_string(inst, error);
-		sharesecopts = create_sharesec_optstring(inst, error);
-
-		shareopts = add_option_string(shareopts, sharesecopts, error);
-		free(sharesecopts);
-
-		if (shareopts == NULL) {
-			len = strlen(NFS_SHARE_CMD) +
-			    strlen(SPEC_OPT_FLAG) + strlen(share_desc) +
-			    strlen(share_Prop->mValue) + 3;
-			cmd = (char *)calloc(len, sizeof (char));
-			(void) snprintf(cmd, len, "%s %s %s", NFS_SHARE_CMD,
-			    share_desc, share_Prop->mValue);
-		} else {
-			len = strlen(NFS_SHARE_CMD) + strlen(SPEC_OPT_FLAG) +
-			    strlen(shareopts) + strlen(share_desc) +
-			    strlen(share_Prop->mValue) + 5;
-			cmd = (char *)calloc(len, sizeof (char));
-			(void) snprintf(cmd, len, "%s %s %s %s %s",
-			    NFS_SHARE_CMD, SPEC_OPT_FLAG, shareopts, share_desc,
-			    share_Prop->mValue);
-		}
-		cim_freeProperty(share_Prop);
-		free(share_desc);
-		if (shareopts != NULL) {
-			free(shareopts);
-		}
-		cim_logDebug("cmdgen_share_nfs", "Returning command: %s",
-		    cmd);
-		return (cmd);
-	} else {
-		cmd = NULL;
-		return ((char *)cmd);
-	}
-	/*
-	 * Not reached
-	 */
-}
-
-/*
- * Private methods
- */
-
-/*
- * creates and returns the options string by gathering the vaious share
- * options from the instance attributes.
- */
-static char *
-create_shareopt_string(CCIMInstance *inst, int *error)
-{
-	CCIMProperty *share_Prop;
-	char *shareopts = NULL;
-
-	shareopts = NULL;
-
-	cim_logDebug("create_shareopt_string", "Just entering...");
-	/*
-	 * Check AllowAccessControll
-	 */
-	share_Prop =
-	    cim_getProperty(inst, nfsShareProps[ALLOWACCESSCONTROL].name);
-	if (share_Prop != NULL) {
-		if (strcmp(share_Prop->mValue, "0") != 0 &&
-		    strcmp(share_Prop->mValue, "") != 0) {
-			/*
-			 * add the "aclok" attribute to the shareopt string.
-			 */
-			shareopts = add_option_string(shareopts,
-			    ALLOWACCESSCONTROL_TRUE, error);
-			if (shareopts == NULL)
-				return (NULL);
-		}
-		cim_freeProperty(share_Prop);
-	}
-	/*
-	 * Check EffectiveUID
-	 */
-	share_Prop = cim_getProperty(inst, nfsShareProps[EFFECTIVEUID].name);
-	if (share_Prop != NULL) {
-		if (strcmp(share_Prop->mValue, "0") != 0 &&
-		    strcmp(share_Prop->mValue, "") != 0) {
-			char *tmp;
-			size_t len;
-
-			len = strlen(share_Prop->mValue) + 7;
-			tmp = (char *)calloc(len, sizeof (char));
-			(void) snprintf(tmp, len, "%s%s", EFFECTIVEUID_SET,
-			    share_Prop->mValue);
-			/*
-			 * add "anon=" attribute and value to shareopt sting.
-			 */
-			shareopts = add_option_string(shareopts, tmp, error);
-			free(tmp);
-			if (shareopts == NULL)
-				return (NULL);
-		}
-		cim_freeProperty(share_Prop);
-	}
-
-	/*
-	 * Check IgnoreSetID
-	 */
-	share_Prop = cim_getProperty(inst, nfsShareProps[IGNORESETID].name);
-	if (share_Prop != NULL) {
-		if (strcmp(share_Prop->mValue, "0") != 0 &&
-		    strcmp(share_Prop->mValue, "") != 0) {
-			/*
-			 * add "nosuid" attribute to shareopt sting.
-			 */
-			shareopts = add_option_string(shareopts,
-			    IGNORESETID_TRUE, error);
-			if (shareopts == NULL)
-				return (NULL);
-		}
-		cim_freeProperty(share_Prop);
-	}
-
-	/*
-	 * Check LogFileTag
-	 */
-	share_Prop = cim_getProperty(inst, nfsShareProps[LOGFILETAG].name);
-	if (share_Prop != NULL) {
-		if (strcmp(share_Prop->mValue, "") != 0) {
-			char *tmp;
-			size_t len;
-
-			len = strlen(share_Prop->mValue) + 5;
-			tmp = (char *)calloc(len, sizeof (char));
-			(void) snprintf(tmp, len, "%s%s", LOGFILETAG_SET,
-			    share_Prop->mValue);
-			/*
-			 * add "log=" attribute and value to shareopt sting.
-			 */
-			shareopts = add_option_string(shareopts, tmp, error);
-			free(tmp);
-			if (shareopts == NULL)
-				return (NULL);
-		}
-		cim_freeProperty(share_Prop);
-	}
-
-	/*
-	 * Check PreventSubdirMount
-	 */
-	share_Prop =
-	    cim_getProperty(inst, nfsShareProps[PREVENTSUBDIRMOUNT].name);
-	if (share_Prop != NULL) {
-		if (strcmp(share_Prop->mValue, "0") != 0 &&
-		    strcmp(share_Prop->mValue, "") != 0) {
-			/*
-			 * add "nosub" attribute to shareopt sting.
-			 */
-			shareopts = add_option_string(shareopts,
-			    PREVENTSUBDIRMOUNT_TRUE, error);
-			if (shareopts == NULL)
-				return (NULL);
-		}
-		cim_freeProperty(share_Prop);
-	}
-
-	/*
-	 * Check Public
-	 */
-	share_Prop = cim_getProperty(inst, nfsShareProps[PUBLIC].name);
-	if (share_Prop != NULL) {
-		if (strcmp(share_Prop->mValue, "0") != 0 &&
-		    strcmp(share_Prop->mValue, "") != 0) {
-			/*
-			 * add "public" attribute to shareopt sting.
-			 */
-			shareopts = add_option_string(shareopts, PUBLIC_TRUE,
-			    error);
-			if (shareopts == NULL)
-				return (NULL);
-		}
-		cim_freeProperty(share_Prop);
-	}
-
-	if (shareopts != NULL) {
-		cim_logDebug("create_shareopt_string",
-		    "The share opts string is: %s", shareopts);
-	} else {
-		cim_logDebug("create_shareopt_string",
-		    "The share opts string is NULL");
-	}
-	return (shareopts);
-}
-
-/*
- * Adds the option to the existing option string. The existing option
- * string may be reallocated. In either case, the new pointer to
- * the complete string is returned.
- */
-static char *
-add_option_string(char *str, char *opt, int *error)
-{
-	char *ret_val;
-	size_t len;
-
-	if (opt == NULL)
-		ret_val = str;
-	else if (str == NULL) {
-		ret_val = strdup(opt);
-		if (ret_val == NULL)
-			*error = ENOMEM;
-	} else {
-		len = strlen(str) + strlen(opt) + 2;
-		ret_val = realloc(str, len);
-		if (ret_val == NULL) {
-			free(str);
-			*error = ENOMEM;
-		} else
-			(void) snprintf(ret_val, len, "%s,%s", str, opt);
-	}
-
-	return (ret_val);
-}
-
-/*
- * creates and returns the security options string
- */
-static char *
-create_sharesec_optstring(CCIMInstance *inst, int *err)
-{
-	CCIMProperty	*shareProp;
-	char 		**securityStrings;
-	char		*optstring;
-	int		number_of_strings;
-	optstring = NULL;
-
-	shareProp = cim_getProperty(inst, SECOPTS);
-	if (shareProp == NULL || strcmp(shareProp->mValue, "") == 0) {
-		/*
-		 * No security options specified.
-		 */
-		return (NULL);
-	}
-	securityStrings =
-	    cim_decodeStringArray(shareProp->mValue, &number_of_strings);
-	if (securityStrings != NULL) {
-		int i;
-
-		for (i = 0; i < number_of_strings; i++) {
-			optstring = add_option_string(optstring,
-			    securityStrings[i], err);
-			if (optstring == NULL)
-				return (NULL);
-		}
-		cim_freeStringArray(securityStrings);
-	}
-	if (optstring != NULL) {
-		cim_logDebug("create_sharesec_optstring",
-		    "The share security opts string is: %s", optstring);
-	} else {
-		cim_logDebug("create_sharesec_optstring",
-		    "The share security opts string is NULL");
-	}
-	return (optstring);
-}
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/share/nfs/nfs_share_attr.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_NFS_SHARE_ATTR_H
-#define	_NFS_SHARE_ATTR_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * NFS Share attributes
- */
-#define	ALLOWACCESSCONTROL_TRUE "aclok"
-#define	EFFECTIVEUID_SET "anon="
-#define	IGNORESETID_TRUE "nosuid"
-#define	LOGFILETAG_SET "log="
-#define	PREVENTSUBDIRMOUNT_TRUE "nosub"
-#define	PUBLIC_TRUE "public"
-#define	DESCRIPTION_FLAG "-d"
-#define	SECOPTS "SecurityOptions" /* string array with all security options */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _NFS_SHARE_ATTR_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/share/nfs/nfs_sharesecurity_attr.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_NFS_SHARESECURITY_ATTR_H
-#define	_NFS_SHARESECURITY_ATTR_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * NFS Share Security attributes
- */
-
-#define	MAXLIFE "MaxLife"
-#define	READONLY "ReadOnly"
-#define	READWRITELIST "ReadWriteList"
-#define	READONLYLIST "ReadOnlyList"
-#define	ROOTSERVERS "RootServers"
-#define	PATH "SettingID" /* This is the Setting ID */
-#define	SEC_MODE "Mode"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _NFS_SHARESECURITY_ATTR_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/umount/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	cmdgen_umount.o \
-		cmdgen_umountall.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/cmd/wbem/provider/c/include \
-		$(SRC)/cmd/wbem/provider/c/wbem_disk/common \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/include \
-		$(SRC)/cmd/wbem/provider/c/filesystems/common/cmdgeneration
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILES		= $(OBJECTS:%.o=%.po)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-catalog:	$(POFILES)
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) *.po
-install:	all
-lint:		$(LINT_OBJS)
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/umount/cmdgen_umount.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "cmdgen_include.h"
-#include "nfs_keys.h"
-#include "util.h"
-#include <errno.h>
-
-/*
- * Private variables and constants.
- */
-#define	UMOUNT_CMD	"umount"
-#define	SPACE		" "
-
-/*
- * Private method declaration
- */
-
-/*
- * Public methods
- */
-/*
- * Method: cmdgen_umount
- *
- * Description: Forms the umount command with the given options.
- *
- * Parameters:
- *	- CCIMInstance *inst - Not used.
- *	- CCIMObjectPath *objPath - The object path containing the options to
- *	be used when forming the command.
- *	- int *errp - The error indicator.  Upon error, this will be set to a
- *	value != 0.
- *
- * Returns:
- *	- char * - The formed umount command.
- *	- NULL if an error occurred.
- */
-/* ARGSUSED */
-char *
-cmdgen_umount(CCIMInstance *inst, CCIMObjectPath *objPath, int *errp) {
-	int err;
-	char *mount_point;
-	char *cmd;
-	CCIMObjectPath *depOP;
-
-	if (objPath == NULL) {
-		*errp = EINVAL;
-		return (NULL);
-	}
-
-	/*
-	 * Create the umount command with properties from the Solaris_NFSMount
-	 * CCIMObjectPath passed in.
-	 */
-	/*
-	 * We need to get the mount point from the Antecedent Key of the
-	 * Solaris_NFSMount CCIMObjectPath.
-	 */
-	depOP = util_getKeyValue(objPath->mKeyProperties, reference, ANTECEDENT,
-		&err);
-
-	mount_point = util_getKeyValue(depOP->mKeyProperties, string, NAME,
-		&err);
-
-	cmd = (char *)calloc((size_t)(strlen(mount_point) + strlen(UMOUNT_CMD)
-		+ 2), (size_t)sizeof (char));
-	if (cmd == NULL) {
-		*errp = ENOMEM;
-		return (NULL);
-	}
-
-	(void) snprintf(cmd, (size_t)(strlen(mount_point) + strlen(UMOUNT_CMD)
-	    + 2), "%s%s%s", UMOUNT_CMD, SPACE, mount_point);
-
-	*errp = 0;
-	return (cmd);
-} /* cmdgen_umount */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/umount/cmdgen_umountall.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,240 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "cmdgen_include.h"
-
-/*
- * Public data type declaration
- */
-#define	UMNTALL_CMD "/usr/sbin/umountall"
-#define	FSTYPE_FLAG "-F"
-#define	HOST_FLAG "-h"
-#define	KILL_FLAG "-k"
-#define	LOCAL_FLAG "-l"
-#define	NO_PARALLEL_FLAG "-s"
-#define	REMOTE_FLAG "-r"
-#define	SPACE " "
-
-
-/*
- * Public methods
- */
-/*
- * Method: cmdgen_umountall
- *
- * Description: Forms the umountall command with the options given.
- *
- * Parameters:
- *	- CCIMPropertyList *paramList - The parameter list containing the
- *	options for the umountall command.
- *	- int *errp - The error indicator.  Upon error, this will get set to a
- *	value != 0.
- *
- * Returns:
- *	- char * - The formed umounall command.
- *	- NULL if an error occurred.
- */
-char *
-cmdgen_umountall(CCIMPropertyList *paramList, int *errp) {
-	CCIMPropertyList	*currentParam;
-	CCIMProperty		*fstypeProp = NULL;
-	CCIMProperty		*hostProp = NULL;
-	CCIMProperty		*onlyLocalProp = NULL;
-	CCIMProperty		*onlyRemoteProp = NULL;
-	CCIMProperty		*killProcessesProp = NULL;
-	CCIMProperty		*inParallelProp = NULL;
-	char			*cmd = NULL;
-	int			cmdLen;
-
-	cmd = strdup(UMNTALL_CMD);
-	if (cmd == NULL) {
-		*errp = errno;
-		return (NULL);
-	}
-
-	/*
-	 * In parameters in the paramList are as follows:
-	 * 1. String fstype,
-	 * 2. String host,
-	 * 3. Boolean onlyLocalFileSystems,
-	 * 4. Boolean onlyRemoteFileSystems,
-	 * 5. Boolean killProcesses,
-	 * 6. Boolean umountInParallel
-	 *
-	 * They are expected to always be in this order in the property list.
-	 */
-	/*
-	 * Check if a file system type was passed in.  If one was we will
-	 * use this in forming the command.
-	 */
-	currentParam = paramList;
-	fstypeProp = currentParam->mDataObject;
-	if (fstypeProp != NULL && fstypeProp->mValue != NULL &&
-		strlen(fstypeProp->mValue) != 0) {
-
-		cim_logDebug("cmdgen_umountall", "Adding the -F flag");
-		/*
-		 * Add -F <fstype> to the command
-		 */
-		cmdLen = strlen(cmd) + strlen(SPACE) + strlen(FSTYPE_FLAG) +
-			strlen(SPACE) + strlen(fstypeProp->mValue) + 1;
-		cmd = realloc(cmd, (size_t)(cmdLen * sizeof (char)));
-		if (cmd == NULL) {
-			*errp = errno;
-			return (NULL);
-		}
-		(void) snprintf(cmd, cmdLen, "%s%s%s%s%s", cmd, SPACE,
-		    FSTYPE_FLAG, SPACE, fstypeProp->mValue);
-	}
-
-	/*
-	 * Check if a host was passed in.
-	 */
-	currentParam = currentParam->mNext;
-	hostProp = currentParam->mDataObject;
-	if (hostProp != NULL && hostProp->mValue != NULL &&
-		strlen(hostProp->mValue) != 0) {
-
-		cim_logDebug("cmdgen_umountall", "Adding the -h flag");
-		/*
-		 * Add -h <host> to the command.
-		 */
-		cmdLen = strlen(cmd) + strlen(SPACE) + strlen(HOST_FLAG) +
-			strlen(SPACE) + strlen(hostProp->mValue) + 1;
-		cmd = realloc(cmd, (size_t)(cmdLen * sizeof (char)));
-		if (cmd == NULL) {
-			*errp = errno;
-			return (NULL);
-		}
-		(void) snprintf(cmd, cmdLen, "%s%s%s%s%s", cmd, SPACE,
-		    HOST_FLAG, SPACE, hostProp->mValue);
-	}
-
-	currentParam = currentParam->mNext;
-	onlyLocalProp = currentParam->mDataObject;
-	if (onlyLocalProp != NULL && onlyLocalProp->mValue != NULL) {
-		if (strcmp(onlyLocalProp->mValue, "1") == 0 ||
-			strcasecmp(onlyLocalProp->mValue, "true") == 0) {
-
-			cim_logDebug("cmdgen_umountall",
-				"Adding the -l flag");
-			/*
-			 * Add the -l flag to the command.
-			 */
-			cmdLen = strlen(cmd) + strlen(SPACE) +
-				strlen(LOCAL_FLAG) + 1;
-
-			cmd = realloc(cmd, (size_t)(cmdLen * sizeof (char)));
-			if (cmd == NULL) {
-				*errp = errno;
-				return (NULL);
-			}
-			(void) snprintf(cmd, cmdLen, "%s%s%s", cmd, SPACE,
-				LOCAL_FLAG);
-		}
-	}
-
-	currentParam = currentParam->mNext;
-	onlyRemoteProp = currentParam->mDataObject;
-	if (onlyRemoteProp != NULL && onlyRemoteProp->mValue != NULL) {
-		if (strcmp(onlyRemoteProp->mValue, "1") == 0 ||
-			strcasecmp(onlyRemoteProp->mValue, "true") == 0) {
-
-			/*
-			 * Add the -r flag to the command.
-			 */
-			cim_logDebug("cmdgen_umountall",
-				"Adding the -r flag");
-
-			cmdLen = strlen(cmd) + strlen(SPACE) +
-				strlen(REMOTE_FLAG) + 1;
-			cmd = realloc(cmd, (size_t)(cmdLen * sizeof (char)));
-			if (cmd == NULL) {
-				*errp = errno;
-				return (NULL);
-			}
-			(void) snprintf(cmd, cmdLen, "%s%s%s", cmd, SPACE,
-				REMOTE_FLAG);
-		}
-	}
-
-	currentParam = currentParam->mNext;
-	killProcessesProp = currentParam->mDataObject;
-	if (killProcessesProp != NULL && killProcessesProp->mValue != NULL) {
-		if (strcmp(killProcessesProp->mValue, "1") == 0 ||
-			strcasecmp(killProcessesProp->mValue, "true") == 0) {
-
-			/*
-			 * Add the -k flag to the command.
-			 */
-			cim_logDebug("cmdgen_umountall",
-				"Adding the -k flag");
-			cmdLen = strlen(cmd) + strlen(SPACE) +
-				strlen(KILL_FLAG) + 1;
-			cmd = realloc(cmd, (size_t)(cmdLen * sizeof (char)));
-			if (cmd == NULL) {
-				*errp = errno;
-				return (NULL);
-			}
-			(void) snprintf(cmd, cmdLen, "%s%s%s", cmd, SPACE,
-			    KILL_FLAG);
-		}
-	}
-
-	currentParam = currentParam->mNext;
-	inParallelProp = currentParam->mDataObject;
-	if (inParallelProp != NULL && inParallelProp->mValue != NULL) {
-		if (strcmp(inParallelProp->mValue, "0") == 0 ||
-			strcasecmp(inParallelProp->mValue, "false") == 0) {
-
-			/*
-			 * Add the -s flag (do not perform umount operation in
-			 * parallel) to the command.
-			 */
-			cim_logDebug("cmdgen_umountall",
-				"Adding the -s flag");
-			cmdLen = strlen(cmd) + strlen(SPACE) +
-				strlen(NO_PARALLEL_FLAG) + 1;
-			cmd = realloc(cmd, (size_t)(cmdLen * sizeof (char)));
-			if (cmd == NULL) {
-				*errp = errno;
-				return (NULL);
-			}
-			(void) snprintf(cmd, cmdLen, "%s%s%s", cmd, SPACE,
-				NO_PARALLEL_FLAG);
-		}
-	}
-
-	/*
-	 * The caller must free the memory allocated to the return value
-	 * using free().
-	 */
-	cim_logDebug("cmdgen_umountall", "Returning command: %s", cmd);
-	*errp = 0;
-	return (cmd);
-} /* cmdgen_umountall */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/unshare/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-sparc_SUBDIRS =
-
-i386_SUBDIRS =
-
-ppc_SUBDIRS =
-
-COMMON_SUBDIRS = nfs
-
-SUBDIRS =	$(COMMON_SUBDIRS) $($(ARCH)_SUBDIRS)
-
-OBJECTS	=	cmdgen_unshare.o cmdgen_unshareall.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-WBEM_PROV =	cmd/wbem/provider/c
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/$(WBEM_PROV)/filesystems/wbem_nfs/nfs_share \
-		$(SRC)/$(WBEM_PROV)/filesystems/wbem_nfs/include \
-		$(SRC)/$(WBEM_PROV)/filesystems/common/cmdgeneration
-
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILES		= $(OBJECTS:%.o=%.po)
-
-all:=		TARGET = all
-clean:=		TARGET = clean
-clobber:=	TARGET = clobber
-install:=	TARGET = install
-lint:=		TARGET = lint
-check:=		TARGET = check
-
-.KEEP_STATE:
-
-all:		$(OBJECTS) ${SUBDIRS}
-
-catalog:	$(POFILES) ${SUBDIRS}
-
-check:		${SUBDIRS}
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-clean:		${SUBDIRS}
-		$(RM) $(OBJECTS) $(LINT_OBJS) *.po
-
-install:	all
-
-lint:		$(LINT_OBJS) ${SUBDIRS}
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-FRC:
-
-${SUBDIRS}: 	FRC
-		cd $@; pwd; $(MAKE) $(TARGET)
-
-.WAIT:
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/unshare/cmdgen_unshare.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "cmdgen_include.h"
-
-/*
- * Private data type declaration
- */
-
-/*
- * Public methods
- */
-char *
-cmdgen_unshare(int fstype, CCIMInstance *inst, CCIMObjectPath *objPath,
-	    int *errp) {
-	char *cmd = NULL;
-
-	switch (fstype) {
-		case CMDGEN_NFS:
-			cmd = cmdgen_unshare_nfs(inst, objPath, errp);
-			break;
-	}
-	return (cmd);
-} /* cmdgen_unshare */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/unshare/cmdgen_unshareall.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "cmdgen_include.h"
-
-#define	NFS_UNSHAREALL_CMD	"/usr/sbin/unshareall"
-#define	FSTYPE_FLAG		"-F"
-#define	SPACE			" "
-
-/*
- * Public methods
- */
-char *
-cmdgen_unshareall(CCIMPropertyList *paramList, int *errp) {
-	CCIMPropertyList	*currentParam;
-	CCIMProperty		*fstype;
-	char			*cmd;
-	int			cmdLen;
-
-	if (paramList == NULL) {
-		*errp = EINVAL;
-		return (NULL);
-	}
-
-	/*
-	 * In parameters are as follows:
-	 * 1. String fstype
-	 */
-	/*
-	 * If a filesystem type was passed in, add it to
-	 * the command line.
-	 */
-	currentParam = paramList;
-	fstype = currentParam->mDataObject;
-	if (fstype != NULL && fstype->mValue != NULL &&
-	    strlen(fstype->mValue) != 0) {
-		/*
-		 * Add two bytes for spaces, two bytes for
-		 * the "-F" filesystem type flag, and a
-		 * byte for the string terminator.
-		 */
-		cmdLen = strlen(NFS_UNSHAREALL_CMD) +
-		    strlen(fstype->mValue) + 5;
-		cmd = (char *)malloc((size_t)(cmdLen * sizeof (char)));
-		if (cmd == NULL) {
-			*errp = ENOMEM;
-		}
-		(void) snprintf(cmd, cmdLen, "%s %s %s", NFS_UNSHAREALL_CMD,
-		    FSTYPE_FLAG, fstype->mValue);
-	} else {
-		cmd = strdup(NFS_UNSHAREALL_CMD);
-		if (cmd == NULL) {
-			*errp = ENOMEM;
-		}
-	}
-	return (cmd);
-} /* cmdgen_unshareall */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/unshare/nfs/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	cmdgen_unshare_nfs.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-WBEM_PROV =	cmd/wbem/provider/c
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/$(WBEM_PROV)/include \
-		$(SRC)/$(WBEM_PROV)/wbem_disk/common \
-		$(SRC)/$(WBEM_PROV)/filesystems/wbem_nfs/include \
-		$(SRC)/$(WBEM_PROV)/filesystems/wbem_nfs/nfs_share \
-		$(SRC)/$(WBEM_PROV)/filesystems/common/cmdgeneration
-
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILES		= $(OBJECTS:%.o=%.po)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-catalog:	$(POFILES)
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) *.po
-install:	all
-lint:		$(LINT_OBJS)
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/cmdgeneration/unshare/nfs/cmdgen_unshare_nfs.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "cmdgen_include.h"
-#include "nfs_keys.h"
-#include "util.h"
-#include <errno.h>
-
-
-
-/*
- * Private data type declaration
- */
-#define	NFS_UNSHARE_CMD	"unshare "
-
-/*
- * Private method declarations
- */
-
-/*
- * Public methods
- */
-/*
- * generates the share command string
- * memory returned must be freed by the caller.
- */
-/* ARGSUSED */
-char *
-cmdgen_unshare_nfs(CCIMInstance *inst, CCIMObjectPath *objPath, int *error)
-{
-	char *propValue;
-	char *cmd;
-	size_t len;
-
-	if (objPath != NULL) {
-		/*
-		 * Create the unshare command using the properties
-		 * passed in from inst.
-		 */
-
-		propValue = util_getKeyValue(objPath->mKeyProperties, string,
-		    NAME, error);
-		if (propValue == NULL) {
-			*error = EINVAL;
-			cim_logDebug("cmdgen_unshare_nfs",
-			    "SHAREDNAME is NULL");
-			return ((char *)NULL);
-		}
-		len = strlen(NFS_UNSHARE_CMD) + strlen(propValue) + 2;
-		cmd = (char *)calloc(len, sizeof (char));
-		(void) snprintf(cmd, len, "%s %s", NFS_UNSHARE_CMD, propValue);
-	} else {
-		cim_logDebug("cmdgen_unshare_nfs", "objPath is NULL");
-		cmd = NULL;
-	}
-	return (cmd);
-}
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/mount_methods/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	mountprov_methods.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/lib/libfsmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include \
-		$(SRC)/cmd/wbem/provider/c/wbem_disk/common \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/common \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/include
-
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILES		= $(OBJECTS:%.o=%.po)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-catalog:	$(POFILES)
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) *.po
-install:	all
-lint:		$(LINT_OBJS)
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/mount_methods/mountprov_methods.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,323 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "mountprov_methods.h"
-#include "nfsprov_methods.h"
-#include "util.h"
-#include "libfsmgt.h"
-#include "nfs_providers_msgstrings.h"
-#include "nfs_provider_names.h"
-#include <errno.h>
-
-#define	SHOWEXPORTS "/usr/sbin/showmount -e "
-
-/*
- * Private methods
- */
-static char **create_export_array(char *exportList_in_string_form,
-	int *num_elements, int *errp);
-
-/*
- * Public methods
- */
-/*
- * Method: delete_vfstab_entry
- *
- * Description: Deletes the /etc/vfstab entry with the corresponding resource
- * and mount point as passed in with inParams.
- *
- * Parameters:
- *	- CCIMPropertyList *inParams - The input parameters to the method.
- *	The property list is expected to contain two elements in the following
- *	order:
- *	1.) string resource - the resource that is listed in the device to
- *	mount column of /etc/vfstab.  Example: /dev/dsk/c0t0d0s5
- *	2.) string mount point
- *
- * Returns:
- *	- CCIMProperty * - A value telling the success or failure of the method.
- */
-CCIMProperty *
-delete_vfstab_entry(CCIMPropertyList *inParams) {
-	fs_mntdefaults_t	*vfstabEnts, *vfstabEntToDelete;
-	CCIMPropertyList	*currentParam;
-	CCIMProperty		*resourceProp;
-	CCIMProperty		*mountPointProp;
-	char			*resource;
-	char			*mountPoint;
-	int			err = 0;
-
-	if (inParams == NULL) {
-		util_handleError(DELETE_VFSTAB_ENT, CIM_ERR_INVALID_PARAMETER,
-			NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	/*
-	 * The inParams are expected to contain two elements in this order:
-	 * 1.) string resource
-	 * 2.) string mountPoint
-	 */
-	currentParam = inParams;
-
-	resourceProp = currentParam->mDataObject;
-	if (resourceProp == NULL || resourceProp->mValue == NULL) {
-		util_handleError(DELETE_VFSTAB_ENT, CIM_ERR_INVALID_PARAMETER,
-			NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	resource = resourceProp->mValue;
-
-	currentParam = currentParam->mNext;
-
-	mountPointProp = currentParam->mDataObject;
-	if (mountPointProp == NULL || mountPointProp->mValue == NULL) {
-		util_handleError(DELETE_VFSTAB_ENT, CIM_ERR_INVALID_PARAMETER,
-			NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	mountPoint = mountPointProp->mValue;
-
-	vfstabEntToDelete = calloc(1, sizeof (fs_mntdefaults_t));
-
-	vfstabEntToDelete->resource = strdup(resource);
-	vfstabEntToDelete->mountp = strdup(mountPoint);
-
-	vfstabEnts = fs_del_mount_default_ent(vfstabEntToDelete, &err);
-	if (vfstabEnts == NULL) {
-		util_handleError(DELETE_VFSTAB_ENT, CIM_ERR_FAILED,
-			FS_DEL_MNT_DEFAULT_FAILURE, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	cim_logDebug("delete_vfstab_entry", "After fs_del_mount_default_ent");
-	fs_free_mntdefaults_list(vfstabEnts);
-	fs_free_mntdefaults_list(vfstabEntToDelete);
-	return (cim_createProperty("Status", sint32, "0", NULL, cim_false));
-} /* delete_vfstab_entry */
-
-/*
- * Method: show_exports
- *
- * Description: Shows the list of shared file systems on a certain host by
- * executing the showmount command.
- *
- * Parameters:
- *	- CCIMPropertyList *inParams - The input parameters to the method.
- *	The property list is expected to contain one element, a string value
- *	representing the host to show exports on.
- *	- CCIMPropertyList *outParams - The output of the showmount command.
- *
- * Returns:
- *	- CCIMProperty * - A value telling the success or failure of the method.
- *
- * NOTE: This is a deprecated method, but is supported until the EOL process
- * is done.  That date is TBD.
- */
-CCIMProperty *
-show_exports(CCIMPropertyList *inParams, CCIMPropertyList *outParams) {
-	CCIMProperty	*hostProp;
-	char		*showExportsCommand;
-	char		*cmd_return;
-	char		*host;
-	int		commandLen;
-	int		err = 0;
-
-	if (inParams == NULL) {
-		util_handleError(SHOW_EXPORTS, CIM_ERR_INVALID_PARAMETER,
-			NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	/*
-	 * The inParams are expected to contain one element being:
-	 * 1.) string host
-	 */
-	hostProp = inParams->mDataObject;
-	if (hostProp == NULL || hostProp->mValue == NULL) {
-		util_handleError(SHOW_EXPORTS, CIM_ERR_INVALID_PARAMETER,
-			NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	host = hostProp->mValue;
-
-	commandLen = strlen(SHOWEXPORTS) + strlen(host) + 1;
-
-	showExportsCommand = calloc(commandLen, sizeof (char));
-	if (showExportsCommand == NULL) {
-		util_handleError(SHOW_EXPORTS, CIM_ERR_LOW_ON_MEMORY,
-			NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	(void) snprintf(showExportsCommand, commandLen, "%s%s", SHOWEXPORTS,
-	    host);
-	cmd_return = cmd_execute_command_and_retrieve_string(showExportsCommand,
-		&err);
-	if (err != 0) {
-		cim_logDebug(SHOW_EXPORTS, "err =%d", err);
-		outParams = NULL;
-		if (cmd_return != NULL) {
-			cim_logDebug(SHOW_EXPORTS, "Command return =%s",
-				cmd_return);
-			util_handleError(SHOW_EXPORTS, CIM_ERR_FAILED,
-				cmd_return, NULL, &err);
-			free(cmd_return);
-		} else {
-			util_handleError(SHOW_EXPORTS, CIM_ERR_FAILED,
-				CMD_EXEC_RETR_STR_FAILURE, NULL, &err);
-		}
-
-		free(showExportsCommand);
-		return ((CCIMProperty *)NULL);
-	}
-
-	if (cmd_return != NULL) {
-		char	**export_array;
-		int	num_elements = 0;
-
-		cim_logDebug("show_exports", "Output =%s", cmd_return);
-
-		export_array = create_export_array(cmd_return, &num_elements,
-			&err);
-		if (export_array == NULL) {
-			cim_logDebug("show_exports", "export_array == NULL");
-			if (err != 0) {
-				util_handleError(SHOW_EXPORTS,
-					CIM_ERR_LOW_ON_MEMORY, NULL, NULL,
-					&err);
-			}
-			return ((CCIMProperty *)NULL);
-		}
-
-		create_outParams_list(outParams, export_array, num_elements,
-			NULL);
-		fileutil_free_string_array(export_array, num_elements);
-	}
-
-	free(showExportsCommand);
-	return (cim_createProperty("Status", sint32, "0", NULL, cim_false));
-} /* show_exports */
-
-
-/*
- * Private methods
- */
-
-/*
- * Method: create_export_array
- *
- * Description: Creates an array from the export list given in string form.
- *
- * Parameters:
- *	- char *exportList_in_string_form - The export list from the showmount
- *	command.
- *	- int *num_elements - The element counter which keeps track of the
- *	number of elements returned in the string array.
- *	- int *errp - The error pointer which gets set upon error.
- *
- * Returns:
- *	- char ** - The string array containing the individual elements from
- *	the showmount export list.
- *	- NULL if an error occurred.
- */
-static char **
-create_export_array(char *exportList_in_string_form, int *num_elements,
-	int *errp) {
-
-	char	*endOfLine = "\n";
-	char	*export;
-	char	*listCopy;
-	char	**export_array = NULL;
-	int	i = 0;
-
-
-	listCopy = strdup(exportList_in_string_form);
-	if (listCopy == NULL) {
-		*errp = errno;
-		*num_elements = 0;
-		return (NULL);
-	}
-
-	/*
-	 * Ignore the first line.  It is a header that is always printed out
-	 * when using showmounts -e.
-	 */
-	export = strtok(listCopy, endOfLine);
-
-	/*
-	 * Count the number of elements to be in the array.
-	 */
-	*num_elements = 0;
-	for (export = strtok(NULL, endOfLine); export != NULL;
-		export = strtok(NULL, endOfLine)) {
-		*num_elements = *num_elements + 1;
-	}
-
-	export_array = calloc((size_t)*num_elements, (size_t)sizeof (char *));
-	if (export_array == NULL) {
-		*errp = errno;
-		*num_elements = 0;
-		free(listCopy);
-		return (NULL);
-	}
-
-	free(listCopy);
-	listCopy = strdup(exportList_in_string_form);
-	if (listCopy == NULL) {
-		*errp = errno;
-		*num_elements = 0;
-		fileutil_free_string_array(export_array, *num_elements);
-		return (NULL);
-	}
-
-	export = strtok(listCopy, endOfLine);
-
-	for (i = 0; i < *num_elements; i++) {
-
-		export = strtok(NULL, endOfLine);
-
-		if (export != NULL) {
-			export_array[i] = strdup(export);
-			if (export_array[i] == NULL) {
-				*errp = errno;
-				free(listCopy);
-				fileutil_free_string_array(export_array,
-					*num_elements);
-				*num_elements = 0;
-				return (NULL);
-			}
-		}
-	}
-
-	free(listCopy);
-	return (export_array);
-} /* create_export_array */
--- a/usr/src/cmd/wbem/provider/c/filesystems/common/mount_methods/mountprov_methods.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_MOUNTPROV_METHODS_H
-#define	_MOUNTPROV_METHODS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-
-/*
- * Method declarations
- */
-CCIMProperty	*delete_vfstab_entry(CCIMPropertyList *inParams);
-CCIMProperty	*show_exports(CCIMPropertyList *inParams,
-			CCIMPropertyList *outParams);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _MOUNTPROV_METHODS_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-COMMON_SUBDIRS =	common \
-			nfs_filesystem \
-			nfs_share \
-			assoc \
-			nfs_mount
-
-COMMON_SUBDIR_2 =	lib
-
-SUBDIRS =		$(COMMON_SUBDIRS) $(COMMON_SUBDIR_2)
-
-POFILE =	wbem_nfs.po
-POFILES =	$(SUBDIRS:%=%/_%.po)
-
-all:=		TARGET = all
-clean:=		TARGET = clean
-clobber:=	TARGET = clobber
-install:=	TARGET = install
-lint:=		TARGET = lint
-check:=		TARGET = check
-_msg:=		TARGET = catalog
-
-.KEEP_STATE:
-
-all clean install lint check: $(COMMON_SUBDIRS) .WAIT $(COMMON_SUBDIR_2)
-
-clobber: $(SUBDIRS)
-	$(RM) $(POFILE)
-
-FRC:
-
-${SUBDIRS}: FRC
-	cd $@; pwd; $(MAKE) $(TARGET)
-
-$(POFILE): $(POFILES)
-	$(BUILDPO.pofiles)
-
-_msg: $(SUBDIRS) .WAIT $(MSGDOMAINPOFILE)
-
-
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	Solaris_NFSMount.o \
-		Solaris_PersistentShareForSystem.o \
-		Solaris_HostedShare.o \
-		Solaris_SharedFileSystem.o \
-		Solaris_NFSShareEntry.o \
-		Solaris_NFSShareSecurityModes.o \
-		common_functions.o
-
-LINT_OBJS =	$(OBJECTS:%.o=%.ln)
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/lib/libfsmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include \
-		$(SRC)/cmd/wbem/provider/c/filesystems/common/cmdgeneration \
-		$(SRC)/cmd/wbem/provider/c/filesystems/common/mount_methods \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/common \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/include
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _assoc.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-
-install:	all
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_HostedShare.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1086 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "Solaris_HostedShare.h"
-#include "nfs_keys.h"
-#include "nfs_providers_msgstrings.h"
-#include "messageStrings.h"
-#include "nfs_provider_names.h"
-#include "util.h"
-#include "libfsmgt.h"
-#include "common_functions.h"
-#include "createprop_methods.h"
-
-/*
- * Private method declarations
- */
-static CIMBool		does_share_exist(char *dir);
-static CCIMObjectPath*	get_Antecedent();
-
-/*
- * Public methods
- */
-
-/*
- * Instance provider methods
- */
-
-/*
- * Method: cp_createInstance_Solaris_HostedShare
- *
- * Description: This method is not supported.  It is not supported because in
- * order for a Solaris_HostedShare association to exist a corresponding
- * Solaris_NFSShare and Solaris_ComputerSystem must exist.
- *
- * Parameters:
- *	- CCIMObjectPath *hostedShareOP - An object path containing the name of
- *	the class of which to create an instance of.
- *	- CCIMInstance *hostedShareInst - Not used.
- *
- * Returns:
- *	- Always returns NULL because the method is not supported.
- */
-/* ARGSUSED */
-CCIMObjectPath *
-cp_createInstance_Solaris_HostedShare(CCIMObjectPath *hostedShareOP,
-	CCIMInstance *hostedShareInst) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_HOSTEDSHARE::CREATE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMObjectPath *)NULL);
-} /* cp_createInstance_Solaris_HostedShare */
-
-/*
- * Method: cp_deleteInstance_Solaris_HostedShare
- *
- * Description: This method is not supported.  It is not supported because in
- * order for it to be actually deleted the corresponding Solaris_NFSShare would
- * need to be deleted.  That action is not appropriate for this provider.
- *
- * Parameters:
- *	- CCIMObjectPath *hostedShareOP - An object path containing the
- *	information about the class of which to delete the instance of.
- *
- * Returns:
- *	- Always returns cim_false because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_HostedShare(CCIMObjectPath *hostedShareOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_HOSTEDSHARE::DELETE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_deleteInstance_Solaris_HostedShare */
-
-/*
- * Method: cp_enumInstances_Solaris_HostedShare
- *
- * Description: Enumerates the instances of Solaris_HostedShare on a host.
- * An instance of Solaris_HostedShare is an association that links a share to
- * the hosting machine.
- *
- * Parameters:
- *	- CCIMObjectPath *hostedShareOP - An object path containing the name of
- *	the class of which to enumerate the instances of.
- *
- * Returns:
- *	- A pointer to a list of Solaris_HostedShare instances.
- *	- NULL if an error occurred or if there are no instances of
- *	Solaris_HostedShare on the host.  In the case of an error, the error
- *	will be logged.
- */
-CCIMInstanceList *
-cp_enumInstances_Solaris_HostedShare(CCIMObjectPath* hostedShareOP) {
-	CCIMInstanceList	*hostedShareInstList;
-	CCIMObjectPath		*nfsShareOP;
-	CCIMObjectPathList	*nfsShareOPList, *currentShareOP;
-	CCIMObjectPath		*antOP;
-	CCIMException		*ex;
-	int			err = 0;
-
-	/*
-	 * The Antecedent property is a Solaris_ComputerSystem reference.
-	 * The Dependent property is a Solaris_NFSShare reference.
-	 */
-	if (hostedShareOP == NULL) {
-		util_handleError("SOLARIS_HOSTEDSHARE::ENUM_INSTANCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareOP = cim_createEmptyObjectPath(SOLARIS_NFSSHARE);
-	if (nfsShareOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_HOSTEDSHARE::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CREATE_EMPTY_OBJPATH_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Enumerate all of the Solaris_NFSShare object paths on the system.
-	 */
-	nfsShareOPList = cimom_enumerateInstanceNames(nfsShareOP, cim_false);
-
-	/*
-	 * A NULL return value indicates an error, an empty list does not.
-	 */
-	if (nfsShareOPList == NULL) {
-		cim_logDebug("cp_enumInstances_Solaris_HostedShare",
-			"nfsShareOPList = NULL");
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_HOSTEDSHARE::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CIMOM_ENUM_INSTNAMES_FAILURE, ex, &err);
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMInstanceList *)NULL);
-
-	}
-
-	cim_freeObjectPath(nfsShareOP);
-
-	if (nfsShareOPList->mDataObject == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	antOP = get_Antecedent();
-	if (antOP == NULL) {
-		/*
-		 * The error was logged in get_Antecedent.
-		 */
-		cim_freeObjectPathList(nfsShareOPList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	hostedShareInstList = cim_createInstanceList();
-	if (hostedShareInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_HOSTEDSHARE::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		cim_freeObjectPathList(nfsShareOPList);
-		cim_freeObjectPath(antOP);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Each share on the system will be associated with the same
-	 * Solaris_ComputerSystem object path.
-	 */
-	for (currentShareOP = nfsShareOPList; currentShareOP != NULL;
-		currentShareOP = currentShareOP->mNext) {
-
-		CCIMInstance	*hostedShareInst;
-		cimchar		*propValue;
-
-		hostedShareInst = cim_createInstance(SOLARIS_HOSTEDSHARE);
-		if (hostedShareInst == NULL) {
-			ex = cim_getLastError();
-			util_handleError("SOLARIS_HOSTEDSHARE::ENUM_INSTANCES",
-				CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex,
-				&err);
-			cim_freeInstanceList(hostedShareInstList);
-			cim_freeObjectPath(antOP);
-			cim_freeObjectPathList(nfsShareOPList);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		propValue = NULL;
-		if (add_property_to_instance(
-			hostedShareProps[ANT].name, hostedShareProps[ANT].type,
-			propValue, antOP, hostedShareProps[ANT].isKey,
-			hostedShareInst) == cim_false) {
-
-			cim_freeInstance(hostedShareInst);
-			cim_freeInstanceList(hostedShareInstList);
-			cim_freeObjectPathList(nfsShareOPList);
-			cim_freeObjectPath(antOP);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		if (add_property_to_instance(hostedShareProps[DEP].name,
-			hostedShareProps[DEP].type, propValue,
-			currentShareOP->mDataObject,
-			hostedShareProps[DEP].isKey, hostedShareInst)
-			== cim_false) {
-
-			cim_freeInstance(hostedShareInst);
-			cim_freeInstanceList(hostedShareInstList);
-			cim_freeObjectPathList(nfsShareOPList);
-			cim_freeObjectPath(antOP);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		hostedShareInstList = cim_addInstance(hostedShareInstList,
-			hostedShareInst);
-		if (hostedShareInstList == NULL) {
-			ex = cim_getLastError();
-			util_handleError("SOLARIS_HOSTEDSHARE::ENUM_INSTANCES",
-				CIM_ERR_FAILED, ADD_INSTANCE_FAILURE, ex, &err);
-			cim_freeInstance(hostedShareInst);
-			cim_freeObjectPathList(nfsShareOPList);
-			cim_freeObjectPath(antOP);
-			return ((CCIMInstanceList *)NULL);
-		}
-	}
-
-	cim_freeObjectPath(antOP);
-	cim_freeObjectPathList(nfsShareOPList);
-
-	return (hostedShareInstList);
-} /* cp_enumInstances_Solaris_HostedShare */
-
-/*
- * Method: cp_enumInstanceNames_Solaris_HostedShare
- *
- * Description: Enumerates the instances of Solaris_HostedShare on the host.
- *
- * Parameters:
- *	- CCIMObjectPath *hostedShareOP - An object path containing the name of
- *	the class of which to enumerate the instance names of.
- *
- * Returns:
- *	- A list of object paths corresponding to the instances of
- *	Solaris_HostedShare on the host.
- *	- NULL if an error occurred or if there are no instances of
- *	Solaris_HostedShare on the host.  In the case of an error, the error
- *	will be logged.
- */
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_HostedShare(CCIMObjectPath *hostedShareOP) {
-	CCIMInstanceList	*hostedShareInstList;
-	CCIMObjectPathList	*hostedShareOPList;
-	int			err = 0;
-
-	if (hostedShareOP == NULL) {
-		util_handleError("SOLARIS_HOSTEDSHARE::ENUM_INSTANCENAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	hostedShareInstList =
-		cp_enumInstances_Solaris_HostedShare(hostedShareOP);
-	if (hostedShareInstList == NULL) {
-		/*
-		 * An error occurred in enumInstances or there are simply
-		 * no Solaris_HostedShare instances to enumerate.  In the case,
-		 * of an error, the error would have been handled in the
-		 * cp_enumInstances_Solaris_HostedShare function.
-		 */
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	hostedShareOPList = cim_createObjectPathList(hostedShareInstList);
-
-	cim_freeInstanceList(hostedShareInstList);
-	/*
-	 * If an error occurred it will be handled in cim_createObjectPathList.
-	 */
-	return (hostedShareOPList);
-} /* cp_enumInstanceNames_Solaris_HostedShare */
-
-/*
- * Method: cp_execQuery_Solaris_HostedShare
- *
- * Description: Queries the host to find those Solaris_HostedShare instances
- * that meet the search criteria.
- *
- * Parameters:
- *	- CCIMObjectPath *hostedShareOP - An object path containing the name of
- *	the class of which to query.
- *	- char *selectClause - Not used.
- *	- char *nonJoinExp - Not used.
- *	- char *queryExp - Not used.
- *	- char *queryLang - Not used.
- *
- * Returns:
- *      - A pointer to a list of Solaris_HostedShare instances that match the
- *      criteria.
- *      - NULL if an error occurred or if there are no Solaris_HostedShare
- *      instances that match the criteria.  In the case of an error, the error
- *      will be logged.
- *
- * NOTE: Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_execQuery_Solaris_HostedShare(CCIMObjectPath *hostedShareOP,
-	char *selectClause, char *nonJoinExp, char *queryExp, char *queryLang) {
-
-	CCIMInstance		*emptyInst;
-	CCIMInstanceList	*hostedShareInstList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (hostedShareOP == NULL) {
-		util_handleError("SOLARIS_HOSTEDSHARE::EXEC_QUERY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	hostedShareInstList = cp_enumInstances_Solaris_HostedShare(
-		hostedShareOP);
-	if (hostedShareInstList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_HOSTEDSHARE::EXEC_QUERY",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstanceList(hostedShareInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	hostedShareInstList = cim_prependInstance(hostedShareInstList,
-		emptyInst);
-
-	if (hostedShareInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_HOSTEDSHARE::EXEC_QUERY",
-			CIM_ERR_FAILED, PREPEND_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstance(emptyInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (hostedShareInstList);
-} /* cp_execQuery_Solaris_HostedShare */
-
-/*
- * Method: cp_getInstance_Solaris_HostedShare
- *
- * Description: Gets the instance corresponding to the passed in object path.
- *
- * Parameters:
- *	- CCIMObjectPath *hostedShareOP - The object path containing all the
- *	keys of the instance that is supposed to be returned.
- *
- * Returns:
- *	- A pointer to the instance of Solaris_HostedShare corresponding to
- *	hostedShareOP.
- *	- NULL if an error occurred or if the instance doesn't exist on the
- *	host.  In the case of an error, the error will be logged.
- */
-CCIMInstance *
-cp_getInstance_Solaris_HostedShare(CCIMObjectPath *hostedShareOP) {
-	CCIMInstance		*inst;
-	CCIMInstanceList	*instList;
-	CCIMPropertyList	*hsPropList;
-	CCIMObjectPath		*depOP;
-	CCIMObjectPath		*antOP;
-	int			err = 0;
-
-	if (hostedShareOP == NULL || hostedShareOP->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_HOSTEDSHARE::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Get the Dependent and Antecedent properties.
-	 */
-	hsPropList = hostedShareOP->mKeyProperties;
-	depOP = util_getKeyValue(hsPropList, hostedShareProps[DEP].type,
-		hostedShareProps[DEP].name, &err);
-	antOP = util_getKeyValue(hsPropList, hostedShareProps[ANT].type,
-		hostedShareProps[ANT].name, &err);
-
-	/*
-	 * Check if we have the Antecedent and Dependent properties.
-	 */
-	if (depOP == NULL || antOP == NULL ||
-		depOP->mKeyProperties == NULL ||
-		antOP->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_HOSTEDSHARE::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_HostedShare(hostedShareOP);
-	if (instList == NULL) {
-		return ((CCIMInstance *)NULL);
-	}
-
-	inst = cim_getInstance(instList, hostedShareOP);
-
-	cim_freeInstanceList(instList);
-	return (inst);
-} /* cp_getInstance_Solaris_HostedShare */
-
-/*
- * Method: cp_setInstance_Solaris_HostedShare
- *
- * Description: This method is not supported.  It is not supported because in
- * order to change a Solaris_HostedShare instance the underlying share and
- * computer system must be modified.  Those actions must be done on the
- * appropriate share and computer system objects, not here.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of the class
- *	of which to set the instance.
- *	- CCIMInstance *pInst - Not used.
- *
- * Returns:
- *	- Always returns cim_false, because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_HostedShare(CCIMObjectPath *pOP, CCIMInstance *pInst) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_HOSTEDSHARE::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstance_Solaris_HostedShare */
-
-/*
- * Method: cp_setInstanceWithList_Solaris_HostedShare
- *
- * Description: This method is not supported.  It is not supported because in
- * order to change a Solaris_HostedShare instance the underlying share and
- * computer system must be modified.  Those actions must be done on the
- * appropriate share and computer system objects, not here.
- *
- * Parameters:
- *	- CCIMObjectPath *hostedShareOP - The object path containing the name
- *	of the class of which to set the instance.
- *	- CCIMInstance *hostedShareInst - Not used.
- *	- char **props - Not used.
- *	- int num_props - Not used.
- *
- * Returns:
- *      - Always returns cim_false, because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_HostedShare(CCIMObjectPath *hostedShareOP,
-	CCIMInstance *hostedShareInst, char **props, int num_props) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_HOSTEDSHARE::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstanceWithList_Solaris_HostedShare */
-
-/*
- * Association provider methods
- */
-
-/*
- * Method: cp_associators_Solaris_HostedShare
- *
- * Description: Returns the instances associated, via the Solaris_HostedShare
- * association, to the pObjectName parameter.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing the name of
- *	the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path containing information
- *	(Class Name, Key Properties) about the object whose associated objects
- *	are to be returned.
- *	- char *pResultClass - If specified, only return instances that are of
- *	this class type.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *	- char *pResultRole - If specified, only return instances that are
- *	playing this role in the association.
- *
- * Returns:
- *	- A list of Solaris_NFSShare (if pRole == Antecedent && pObjectName is
- *	a Solaris_ComputerSystem object path) or Solaris_ComputerSystem (if
- *	pRole == Dependent && pObjectName is a Solaris_NFSShare object path)
- *	instances which are associated to the pObjectName parameter.
- *	- NULL if an error occurred or if there are no instances associated to
- *	the pObjectName passed in.  In the case of an error, the error will be
- *	logged.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_HostedShare(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*returnInstList = NULL;
-	CCIMPropertyList	*propList;
-	CCIMObjectPath		*resultOP;
-	CCIMException		*ex;
-	CIMBool			pDeep, pLocalOnly, pIncludeQualifiers,
-				pIncludeClassOrigin, pUseInternal;
-	cimchar			*resultClassName;
-	char			*name;
-	char			**pPropertyList;
-	unsigned int		pNumProps;
-	int			err = 0;
-	/*
-	 * Check if the needed parameters are NULL.
-	 */
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_HOSTEDSHARE::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * The Name key property is the defining property for each the
-	 * Antecedent (Solaris_ComputerSystem) and the Dependent
-	 * (Solaris_NFSShare) so retrieve that property.
-	 */
-	propList = pObjectName->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(propList, string, NAME, &err);
-
-	if (name == NULL || err != 0) {
-		/*
-		 * We don't have the appropriate information.
-		 */
-		util_handleError("SOLARIS_HOSTEDSHARE::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Determine whether the pObjectName is the Antecedent or the Dependent
-	 * of the association.  Antecedent == Solaris_ComputerSystem,
-	 * Dependent == Solaris_NFSShare
-	 */
-	if ((strcasecmp(pObjectName->mName, COMPUTER_SYSTEM) == 0)) {
-		char	*hostname;
-
-		resultClassName = SOLARIS_NFSSHARE;
-
-		/*
-		 * If a value was passed in with pRole and it does not match
-		 * the role that pObjectName actually is then log an invalid
-		 * param error.
-		 */
-		if (pRole != NULL && (strcasecmp(pRole, ANTECEDENT) != 0)) {
-			util_handleError("SOLARIS_NFSMOUNT::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Get the current host name and compare it to the name
-		 * property of the passed in pObjectName.
-		 */
-		hostname = sys_get_hostname(&err);
-		if (hostname == NULL) {
-			util_handleError("SOLARIS_HOSTEDSHARE::ASSOCIATORS",
-				CIM_ERR_FAILED, GET_HOSTNAME_FAILURE, NULL,
-				&err);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		if ((strcmp(name, hostname) != 0)) {
-			/*
-			 * We can only determine shares on the current host.
-			 * The providers are not distributed.
-			 */
-			util_handleError("SOLARIS_HOSTEDSHARE::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			free(hostname);
-			return ((CCIMInstanceList *)NULL);
-		}
-		free(hostname);
-	} else if ((strcasecmp(pObjectName->mName, SOLARIS_NFSSHARE) == 0)) {
-		CIMBool	shareExists;
-
-		resultClassName = COMPUTER_SYSTEM;
-
-		/*
-		 * pObjectName is the Dependent (Solaris_NFSShare) so determine
-		 * if the share actually exists by comparing the Name property
-		 * of pObjectName, which is populated with the shared directory,
-		 * to existing nfs shares on the system.
-		 */
-		shareExists = does_share_exist(name);
-		if (shareExists == cim_false) {
-			return ((CCIMInstanceList *)NULL);
-		}
-	} else {
-		util_handleError("SOLARIS_HOSTEDSHARE::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	resultOP = cim_createEmptyObjectPath(resultClassName);
-	if (resultOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_HOSTEDSHARE::ASSOCIATORS",
-			CIM_ERR_FAILED, CREATE_EMPTY_OBJPATH_FAILURE,
-			ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	pDeep = cim_false;
-	pLocalOnly = cim_false;
-	pIncludeQualifiers = cim_false;
-	pIncludeClassOrigin = cim_false;
-	pUseInternal = cim_false;
-	pPropertyList = NULL;
-	pNumProps = 0;
-	returnInstList = cimom_enumerateInstances(resultOP, pDeep,
-		pLocalOnly, pIncludeQualifiers, pIncludeClassOrigin,
-		pUseInternal, pPropertyList, pNumProps);
-	/*
-	 * A NULL return value indicates an error, an empty list
-	 * doesn't.
-	 */
-	if (returnInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_HOSTEDSHARE::ASSOCIATORS",
-			CIM_ERR_FAILED, CIMOM_ENUM_INST_FAILURE, ex,
-			&err);
-		cim_freeObjectPath(resultOP);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	cim_freeObjectPath(resultOP);
-
-	if (returnInstList->mDataObject == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (returnInstList);
-} /* cp_associators_Solaris_HostedShare */
-
-/*
- * Method: cp_associatorNames_Solaris_HostedShare
- *
- * Description: Returns the object paths of the instances on the other side of
- * the association which are associated via the Solaris_HostedShare association
- * and having the passed in parameter, pObjectName, as the opposite key.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pResultClass - If specified, only return instances that are of
- *	this class type.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *	- char *pResultRole - If specified, only return instances that are
- *	playing this role in the association.
- *
- * Returns:
- *	- A list of Solaris_NFSShare (if pRole == Antecedent && pObjectName is
- *      a Solaris_ComputerSystem object path) or Solaris_ComputerSystem (if
- *      pRole == Dependent && pObjectName is a Solaris_NFSShare object path)
- *      object paths which are associated to the pObjectName parameter.
- *      - NULL if an error occurred or if there are no instances associated to
- *      the pObjectName passed in.  In the case of an error, the error will be
- *      logged.
- */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_HostedShare(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList = NULL;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_HOSTEDSHARE::ASSOCIATOR_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList = cp_associators_Solaris_HostedShare(pAssocName, pObjectName,
-		pResultClass, pRole, pResultRole);
-	if (instList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	objPathList = cim_createObjectPathList(instList);
-	cim_freeInstanceList(instList);
-
-	return (objPathList);
-} /* cp_associatorNames_Solaris_HostedShare */
-
-/*
- * Method: cp_references_Solaris_HostedShare
- *
- * Description: Returns the Solaris_HostedShare instances that have the passed
- * in parameter, pObjectName, as one of it's keys.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *      about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *	- A pointer to a list of Solaris_HostedShare instances.
- *	- NULL if an error occurred or if there are no Solaris_HostedShare
- *	instances having pObjectName as one of it's keys.
- */
-CCIMInstanceList *
-cp_references_Solaris_HostedShare(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList;
-	char			*pObjectNameRole;
-	char			*objPathListRole;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_HOSTEDSHARE::REFERENCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Get everything that is related to the pObjectName passed in.
-	 */
-	objPathList = cp_associatorNames_Solaris_HostedShare(pAssocName,
-		pObjectName, NULL, pRole, NULL);
-	if (objPathList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Now use the object paths in the object path list and the pObjectName
-	 * variable to create the association instances.
-	 */
-	if ((strcasecmp(pObjectName->mName, SOLARIS_NFSSHARE) == 0)) {
-		/*
-		 * pObjectName is the Dependent.
-		 */
-		pObjectNameRole = DEPENDENT;
-		objPathListRole = ANTECEDENT;
-		instList = create_association_instList(SOLARIS_HOSTEDSHARE,
-			pObjectName, pObjectNameRole, objPathList,
-			objPathListRole, &err);
-	} else {
-		/*
-		 * pObjectName is the Antecedent.
-		 */
-		pObjectNameRole = ANTECEDENT;
-		objPathListRole = DEPENDENT;
-		instList = create_association_instList(SOLARIS_HOSTEDSHARE,
-			pObjectName, pObjectNameRole, objPathList,
-			objPathListRole, &err);
-	}
-	cim_freeObjectPathList(objPathList);
-
-	return (instList);
-} /* cp_references_Solaris_HostedShare */
-
-/*
- * Method: cp_referenceNames_Solaris_HostedShare
- *
- * Description: Returns the Solaris_HostedShare object paths of the instances
- * that have the passed in parameter, pObjectName, as one of it's keys.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *	- A pointer to a list of Solaris_HostedShare object paths.
- *	- NULL if an error occurred or if there are no Solaris_HostedShare
- *	instances having pObjectName as one of it's keys.
- */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_HostedShare(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*hostedShareInstList;
-	CCIMObjectPathList	*hostedShareOPList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_HOSTEDSHARE::REFERENCE_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	hostedShareInstList = cp_references_Solaris_HostedShare(pAssocName,
-		pObjectName, pRole);
-
-	if (hostedShareInstList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	hostedShareOPList = cim_createObjectPathList(hostedShareInstList);
-
-	cim_freeInstanceList(hostedShareInstList);
-	/*
-	 * If an error occurred it will be handled in cim_createObjectPathList.
-	 */
-	return (hostedShareOPList);
-} /* cp_referenceNames_Solaris_HostedShare */
-
-/*
- * Property provider methods
- */
-
-/*
- * Method: cp_getProperty_Solaris_HostedShare
- *
- * Description: Retrieves a certain property from the instance of
- * Solaris_HostedShare on the host that is described by the parameter
- * hostedShareOP.
- *
- * Parameters:
- *	- CCIMObjectPath *hostedShareOP - The object path containing all the
- *	information needed to find the instance in which the property is to
- *	be returned.
- *	- cimchar *pPropName - The name of the property to be found.
- *
- * Returns:
- *	- A pointer to the property corresponding to the name passed in with
- *	pPropName.
- *	- NULL if an error occurred or if the property doesn't exist.  In the
- *	case of an error, the error will be logged.
- */
-CCIMProperty *
-cp_getProperty_Solaris_HostedShare(CCIMObjectPath *hostedShareOP,
-	cimchar *pPropName) {
-
-	CCIMInstance	*hostedShareInst;
-	CCIMProperty	*hostedShareProp;
-	int		err = 0;
-
-	if (hostedShareOP == NULL) {
-		util_handleError("SOLARIS_HOSTEDSHARE::GET_PROPERTY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	hostedShareInst = cp_getInstance_Solaris_HostedShare(hostedShareOP);
-	if (hostedShareInst == NULL) {
-		return ((CCIMProperty *)NULL);
-	}
-
-	hostedShareProp = cim_getProperty(hostedShareInst, pPropName);
-	cim_freeInstance(hostedShareInst);
-
-	return (hostedShareProp);
-
-} /* cp_getProperty_Solaris_HostedShare */
-
-/*
- * Method: cp_setProperty_Solaris_HostedShare
- *
- * Description: This method is not supported.  It is not supported because in
- * order to change the properties of a Solaris_HostedShare instance, the
- * underlying classes being associated must be changed.  This provider isn't
- * the appropriate place to be changing other things on the host.
- *
- * Parameters:
- *      - CCIMObjectPath *hostedShareOP - Not used.
- *      - CCIMProperty *pProp - Not used.
- *
- * Returns:
- *	- Always returns cim_false because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_HostedShare(CCIMObjectPath *hostedShareOP,
-	CCIMProperty *pProp) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_HOSTEDSHARE::SET_PROPERTY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setProperty_Solaris_HostedShare */
-
-/*
- * Method provider methods
- */
-
-/*
- * Method: cp_invokeMethod_Solaris_HostedShare
- *
- * Description: This method is not supported because the provider doesn't have
- * any methods.
- *
- * Parameters:
- *	- CCIMObjectPath* op - Not used.
- *	- cimchar* methodName - Not used.
- *	- CCIMPropertyList* inParams - Not used.
- *	- CCIMPropertyList* outParams - Not used.
- *
- * Returns:
- *	- Always returns null because the method is not supported.
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_HostedShare(CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams) {
-
-	return ((CCIMProperty *)NULL);
-} /* cp_invokeMethod_Solaris_HostedShare */
-
-/*
- * Private methods
- */
-
-/*
- * Method: does_share_exist
- *
- * Description: Determines if a given share exists on the host.
- *
- * Parameters:
- *	- char *dir - The name of the directory to see if it is shared.
- *
- * Returns:
- *	- An integer corresponding to the existence of the share on the system.
- *	1 is returned if the share exists, 0 is returned if the share does not
- *	exist.
- */
-static CIMBool
-does_share_exist(char *dir) {
-	fs_sharelist_t	*share_list;
-	fs_sharelist_t	*currentShare;
-	CIMBool		return_val = cim_false;
-	int		err = 0;
-
-	share_list = fs_get_share_list(&err);
-	if (share_list == NULL) {
-		/*
-		 * Either there was an error or there are no shares on the
-		 * system.  If there was an error err should be a non-zero
-		 * value.
-		 */
-		if (err != 0) {
-			util_handleError("SOLARIS_HOSTEDSHARE::SHARE_EXISTS",
-				CIM_ERR_FAILED, FS_GET_SHARE_FAILURE, NULL,
-				&err);
-		}
-
-		return (return_val);
-	}
-
-	currentShare = share_list;
-	while (currentShare != NULL && return_val == cim_false) {
-		if ((strcmp(currentShare->path, dir) == 0)) {
-			return_val = cim_true;
-		}
-
-		currentShare = currentShare->next;
-	}
-
-	fs_free_share_list(share_list);
-	return (return_val);
-
-} /* does_share_exist */
-
-/*
- * Method: get_Antecedent
- *
- * Description: Retrieves a reference property of the host's
- * Solaris_ComputerSystem class.
- *
- * Parameters:
- *	- NONE
- * Returns:
- *	- A pointer to a property which is a reference property of the host's
- *	Solaris_ComputerSystem instance.
- *	- Upon error, NULL is returned and the error is logged.
- */
-static CCIMObjectPath *
-get_Antecedent() {
-	CCIMInstance	*compSysInst;
-	CCIMObjectPath	*compSysOP;
-	CCIMException	*ex;
-	char		*hostname;
-	int		err = 0;
-
-	compSysInst = cim_createInstance(COMPUTER_SYSTEM);
-	if (compSysInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_HOSTEDSHARE::GET_ANT",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	/*
-	 * Create the key properties on the Solaris_ComputerSystem instance.
-	 *
-	 * The Solaris_ComputerSystem keys are as follows:
-	 * CreationClassName = "Solaris_ComputerSystem"
-	 * Name = < host name >
-	 */
-	if (add_property_to_instance(CREATION_CLASS, string, COMPUTER_SYSTEM,
-		NULL, cim_true, compSysInst) == cim_false) {
-
-		cim_freeInstance(compSysInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	hostname = sys_get_hostname(&err);
-	if (hostname == NULL) {
-		util_handleError("SOLARIS_HOSTEDSHARE::GET_ANT",
-			CIM_ERR_FAILED, GET_HOSTNAME_FAILURE, NULL, &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	if (add_property_to_instance(NAME, string, hostname, NULL,
-		cim_true, compSysInst) == cim_false) {
-
-		free(hostname);
-		cim_freeInstance(compSysInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-	free(hostname);
-
-	compSysOP = cim_createObjectPath(compSysInst);
-	if (compSysOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_HOSTEDSHARE::GET_ANT",
-			CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE,
-			ex, &err);
-		cim_freeInstance(compSysInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	return (compSysOP);
-} /* get_Antecedent */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_HostedShare.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_HOSTEDSHARE_H
-#define	_SOLARIS_HOSTEDSHARE_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimomhandle.h>
-#include "nfsprov_include.h"
-
-#define	PROPCOUNT 2
-
-static nfs_prov_prop_t hostedShareProps[] = {
-#define	ANT 0
-	{"Antecedent", cim_true, reference},
-#define	DEP (ANT + 1)
-	{"Dependent", cim_true, reference}
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_HOSTEDSHARE_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_NFSMount.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,2467 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "Solaris_NFSMount.h"
-#include "nfs_keys.h"
-#include "nfs_providers_msgstrings.h"
-#include "messageStrings.h"
-#include "nfs_provider_names.h"
-#include "libfsmgt.h"
-#include "cmdgen.h"
-#include "util.h"
-#include "nfsprov_methods.h"
-#include "mountprov_methods.h"
-#include "createprop_methods.h"
-#include <sys/types.h>
-#include <string.h>
-#include <errno.h>
-
-/*
- * Constants
- */
-#define	DELETE_VFSTAB_ENT_METHOD "deleteVfstabEntry"
-#define	GET_DEF_SECMODE_METHOD "getDefaultNfsSecMode"
-#define	GET_NET_CFG_LIST_METHOD "getNetCfgList"
-#define	GET_NFS_SEC_LIST_METHOD "getNfsSecList"
-#define	SHOW_EXPORTS_METHOD "showExports"
-/*
- * Private method declarations
- */
-
-static CCIMInstanceList * create_nfsMount_associations(nfs_mntlist_t *mountList,
-				int *errp);
-static CCIMInstanceList * enumerate_mounts();
-static CCIMObjectPath * get_Antecedent(cimchar *mount_point);
-static CCIMInstanceList * get_associated_instances(nfs_mntlist_t *mountList,
-				boolean_t resultIsAnt);
-static nfs_mntlist_t *get_associated_nfs_mntlist(boolean_t isAntecedent,
-			char *nameKeyValue);
-static CCIMObjectPath * get_Dependent(nfs_mntlist_t *nfs_mount);
-static char *get_devid(char *keyValue, int *errp);
-static char *get_resource(char *keyValue, int *errp);
-static CCIMPropertyList * populate_property_list(nfs_mntlist_t *nfs_mount);
-static CIMBool populate_property_values(nfs_mntlist_t *nfs_mount,
-		cimchar **propValues);
-
-/*
- * Public methods
- */
-
-/*
- * Instance provider methods
- */
-
-/*
- * Method: cp_enumInstances_Solaris_NFSMount
- *
- * Description: Enumerates all of the nfs mounts on the host.  NFS mounts with
- * "ignore" in the option string are ignored.
- *
- * Parameters:
- *	- CCIMObjectPath* mountOP - The object path containing the name of the
- *	class to which the instance to be enumerated belongs.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFSMount instances.
- *	- NULL if an error occurred or if there are no NFS mounts on the host.
- *	In the case of an error, the error will be logged.
- */
-CCIMInstanceList *
-cp_enumInstances_Solaris_NFSMount(CCIMObjectPath* mountOP) {
-	CCIMInstanceList *instList;
-	int	err = 0;
-
-	/*
-	 * First check if the CCIMObjectPath passed in is null.
-	 */
-	if (mountOP == NULL) {
-		util_handleError(
-			"SOLARIS_NFSMOUNT::ENUM_INSTANCES",
-			CIM_ERR_INVALID_PARAMETER, NULL,
-			NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = enumerate_mounts();
-	if (instList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (instList);
-} /* cp_enumInstances_Solaris_NFSMount */
-
-/*
- * Method: cp_getInstance_Solaris_NFSMount
- *
- * Description: Gets the instance corresponding to the Solaris_NFSMount
- * object path passed in.
- *
- * Parameters:
- *	- CCIMObjectPath* mountOP - An object path containing all the keys of
- *	the instance that is supposed to be returned.
- *
- * Returns:
- *	- A pointer to the Solaris_NFSMount instance corresponding to the object
- *	path parameter.
- *	- NULL if an error occurred or if the instance doesn't exist.  In the
- *	case of an error, the error will be logged.
- */
-CCIMInstance *
-cp_getInstance_Solaris_NFSMount(CCIMObjectPath* mountOP) {
-	CCIMInstanceList	*instList;
-	CCIMInstance		*inst;
-	CCIMPropertyList	*mountPropList;
-	CCIMObjectPath		*antOP, *depOP;
-	int			err;
-
-	if (mountOP == NULL || mountOP->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	mountPropList = mountOP->mKeyProperties;
-	depOP = util_getKeyValue(mountPropList, nfsMountProps[DEP].type,
-		nfsMountProps[DEP].name, &err);
-	antOP = util_getKeyValue(mountPropList, nfsMountProps[ANT].type,
-		nfsMountProps[ANT].name, &err);
-
-	if (depOP == NULL || antOP == NULL ||
-		depOP->mKeyProperties == NULL ||
-		antOP->mKeyProperties == NULL) {
-
-		util_handleError("SOLARIS_NFSMOUNT::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_NFSMount(mountOP);
-	if (instList == NULL) {
-		/*
-		 * Either an error occurred or we simply don't have any
-		 * instances of Solaris_NFSMount on the system.  In the case,
-		 * that an error occurred, it will be handled in
-		 * cp_enumInstances_Solaris_NFSMount.
-		 */
-		return ((CCIMInstance *)NULL);
-	}
-
-	inst = cim_getInstance(instList, mountOP);
-
-	cim_freeInstanceList(instList);
-	return (inst);
-} /* cp_getInstance_Solaris_NFSMount */
-
-/*
- * Method: cp_createInstance_Solaris_NFSMount
- *
- * Description:
- * Creates an instance of the Solaris_NFSMount class.
- * A create instance will actually mount a file system on the current host by
- * calling the cmd interface's cmd_execute_command_and_retrieve_string function.
- *
- * Parameters:
- *	- CCIMObjectPath* nfsOP - An object path containing the information
- *	needed about the class of which to have an instance created.
- *	- CCIMInstance* nfsInst - The instance to be created.
- *
- * Returns:
- *	- A pointer to a Solaris_NFSMount CCIMObjectPath which corresponds to
- *	the mount that was created.
- *	- Upon error, NULL is returned and the error will be logged.
- */
-CCIMObjectPath *
-cp_createInstance_Solaris_NFSMount(CCIMObjectPath* nfsOP,
-	CCIMInstance* nfsInst) {
-
-	char			*cmd_return = NULL;
-	char			*cmd;
-	char			*resource;
-	char			*mountp;
-	char			*mntoptsParam, *timeParam;
-	boolean_t		findOverlayParam;
-	int			err = 0;
-	nfs_mntlist_t		*mount;
-	CCIMObjectPath		*nfsMountOP = NULL;
-	CCIMObjectPath		*opParam;
-	CCIMPropertyList	*propListParam;
-	CCIMInstanceList	*nfsMountInstList;
-	CCIMInstanceList	*currentInst;
-	CCIMProperty		*mnt_prop;
-	CCIMException		*ex;
-
-	/*
-	 * First check if the CCIMInstance or CCIMObjectPath is null.
-	 */
-	if (nfsOP == NULL || nfsInst == NULL) {
-		util_handleError(
-			"SOLARIS_NFSMOUNT::CREATE_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	/*
-	 * Get the properties from the instance parameter in order to create
-	 * an instance as defined. The properties will be used to create a
-	 * mount command to execute.
-	 */
-
-	/*
-	 * The only properties required are resource and mount point.
-	 * All other properties are not needed.  The defaults will be used.
-	 */
-	err = 0;
-	opParam = NULL;
-	propListParam = NULL;
-	cmd = cmdgen_generate_command(CMDGEN_NFS_MOUNT, nfsInst, opParam,
-		propListParam, &err);
-	if (cmd == NULL || err != 0) {
-		util_handleError("SOLARIS_NFSMOUNT::CREATE_INSTANCE",
-			CIM_ERR_FAILED, CMDGEN_GEN_CMD_FAILURE, NULL, &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	cim_logDebug("cp_createInstance_Solaris_NFSMount",
-		"cmd =%s", cmd);
-	err = 0;
-	cmd_return = cmd_execute_command_and_retrieve_string(cmd, &err);
-	if (err != 0) {
-		cim_logDebug("cp_createInstance_Solaris_NFSMount",
-			"cmd_return =%s", cmd_return);
-		/*
-		 * An error occurred in executing the command.
-		 */
-		if (cmd_return != NULL) {
-			util_handleError("SOLARIS_NFSMOUNT::CREATE_INSTANCE",
-				CIM_ERR_FAILED, CMD_EXEC_RETR_STR_FAILURE,
-				NULL, &err);
-			free(cmd);
-			free(cmd_return);
-			return ((CCIMObjectPath *)NULL);
-		} else {
-			util_handleError("SOLARIS_NFSMOUNT::CREATE_INSTANCE",
-				CIM_ERR_FAILED, CMD_EXEC_RETR_STR_FAILURE,
-				NULL, &err);
-			free(cmd);
-			return ((CCIMObjectPath *)NULL);
-		}
-	}
-
-	free(cmd);
-	if (cmd_return != NULL) {
-		free(cmd_return);
-	}
-
-	/*
-	 * It should be certain that the mount got created if the
-	 * cmd_execute_command_and_retrieve_string function succeded, but we
-	 * will do a second check to make sure it did and to get the devid.
-	 * We can determine if the mount exists by checking for a mount having
-	 * the same resource/mount point as the instance passed in.
-	 */
-	mnt_prop = cim_getProperty(nfsInst, nfsMountProps[ANT].name);
-	if (mnt_prop != NULL) {
-		CCIMPropertyList	*antPropList;
-
-		antPropList = mnt_prop->mObjPathValue->mKeyProperties;
-
-		mountp = util_getKeyValue(antPropList, string, NAME, &err);
-		if (mountp == NULL || err != 0) {
-			util_handleError("SOLARIS_NFSMOUNT::CREATE_INSTANCE",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMObjectPath *)NULL);
-		}
-
-		cim_freeProperty(mnt_prop);
-
-	}
-
-	mnt_prop = cim_getProperty(nfsInst, nfsMountProps[DEP].name);
-	if (mnt_prop != NULL) {
-		CCIMPropertyList	*depPropList;
-
-		depPropList = mnt_prop->mObjPathValue->mKeyProperties;
-
-		resource = util_getKeyValue(depPropList, string, NAME, &err);
-		if (resource == NULL || err != 0) {
-			util_handleError("SOLARIS_NFSMOUNT::CREATE_INSTANCE",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMObjectPath *)NULL);
-		}
-
-		cim_freeProperty(mnt_prop);
-	}
-
-	err = 0;
-	mntoptsParam = NULL;
-	timeParam = NULL;
-	findOverlayParam = B_TRUE;
-	mount = nfs_get_filtered_mount_list(resource, mountp, mntoptsParam,
-		timeParam, findOverlayParam, &err);
-	if (mount == NULL) {
-		if (err != 0) {
-			util_handleError("SOLARIS_NFSMOUNT::CREATE_INSTANCE",
-				CIM_ERR_FAILED, NFS_GET_FILTERED_MOUNTS_FAILURE,
-				NULL, &err);
-		}
-		cim_logDebug("cp_createInstance_Solaris_NFSMount",
-			"Mount was not found w/ resource/mount point combo");
-		/*
-		 * There were no mounts found with the resource and mount point.
-		 * We can assume that the mount wasn't created so return NULL.
-		 */
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfsMountInstList = create_nfsMount_associations(mount, &err);
-	if (nfsMountInstList == NULL) {
-		if (err != 0) {
-			nfs_free_mntinfo_list(mount);
-			util_handleError("SOLARIS_NFSMOUNT::CREATE_INSTANCE",
-				CIM_ERR_FAILED, CREATE_NFSMOUNT_ASSOC_FAILURE,
-				NULL, &err);
-		}
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfs_free_mntinfo_list(mount);
-
-	for (currentInst = nfsMountInstList; currentInst != NULL;
-		currentInst = currentInst->mNext) {
-
-		/*
-		 * Ideally there is only one instance, but with being able to
-		 * overlay file systems there is a possibility that there may
-		 * be multiple file systems with the same resource/mount point.
-		 * If there are multiple instances in this list the last one
-		 * returned will be used to create the return object path.
-		 * That should be the most recently created mount.
-		 */
-		if (nfsMountOP != NULL) {
-			cim_logDebug("cp_createInstance_Solaris_NFSMount",
-				"More than one mount found.");
-			cim_freeObjectPath(nfsMountOP);
-		}
-		nfsMountOP = cim_createObjectPath(currentInst->mDataObject);
-		if (nfsMountOP == NULL) {
-			ex = cim_getLastError();
-			util_handleError("SOLARIS_NFSMOUNT::CREATE_INSTANCE",
-				CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE,
-				ex, &err);
-			cim_freeInstanceList(nfsMountInstList);
-			return ((CCIMObjectPath *)NULL);
-		}
-	}
-
-	cim_freeInstanceList(nfsMountInstList);
-	return (nfsMountOP);
-} /* cp_createInstance_Solaris_NFSMount */
-
-/*
- * Method: cp_deleteInstance_Solaris_NFSMount
- *
- * Description: Deletes a Solaris_NFSMount instance.
- * A delete instance will actually unmount a file system on the current host by
- * calling the cmd interface's cmd_execute_command_and_retrieve_string function.
- *
- * Parameters:
- *	- CCIMObjectPath* nfsOP - The object path containing all information
- *	needed to delete the appropriate instance.
- *
- * Returns:
- *	- A CIMBool value corresponding to whether or not the instance was
- *	deleted.  cim_true will be returned if the delete was successful,
- *	cim_false will be returned if the delete failed.
- */
-CIMBool
-cp_deleteInstance_Solaris_NFSMount(CCIMObjectPath* nfsOP) {
-
-	CCIMInstance		*instParam;
-	CCIMPropertyList	*propListParam;
-	char			*cmd;
-	char			*cmd_return = NULL;
-	int			err = 0;
-
-	if (nfsOP == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::DELETE_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return (cim_false);
-	}
-
-	/*
-	 * Get the mount that is to be deleted and generate the command.
-	 */
-	instParam = NULL;
-	propListParam = NULL;
-	cmd = cmdgen_generate_command(CMDGEN_NFS_UMOUNT, instParam, nfsOP,
-		propListParam, &err);
-	if (cmd == NULL || err != 0) {
-		util_handleError("SOLARIS_NFSMOUNT::DELETE_INSTANCE",
-			CIM_ERR_FAILED, CMDGEN_GEN_CMD_FAILURE, NULL, &err);
-		return (cim_false);
-	}
-
-	/*
-	 * Execute the umount command
-	 */
-	err = 0;
-	cmd_return = cmd_execute_command_and_retrieve_string(cmd, &err);
-	if (err != 0) {
-		/*
-		 * The command execution failed.
-		 */
-		if (cmd_return != NULL) {
-			util_handleError("SOLARIS_NFSMOUNT::DELETE_INSTANCE",
-				CIM_ERR_FAILED, CMD_EXEC_RETR_STR_FAILURE,
-				NULL, &err);
-			free(cmd);
-			free(cmd_return);
-			return (cim_false);
-		} else {
-			util_handleError("SOLARIS_NFSMOUNT::DELETE_INSTANCE",
-				CIM_ERR_FAILED, CMD_EXEC_RETR_STR_FAILURE,
-				NULL, &err);
-			free(cmd);
-			return (cim_false);
-		}
-	}
-
-	free(cmd);
-	if (cmd_return != NULL)
-		free(cmd_return);
-
-	return (cim_true);
-} /* cp_deleteInstance_Solaris_NFSMount */
-
-/*
- * Method: cp_enumInstanceNames_Solaris_NFSMount
- *
- * Description: Enumerates all of the nfs mounts on the host.  NFS mounts with
- * "ignore" in the option string are ignored.
- *
- * Parameters:
- *	- CCIMObjectPath* mountOP - An object path containing the name of the
- *	class of which to enumerate instances of.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFSMount object paths.
- *	- NULL if an error occurred or if there are no NFS mounts on the host.
- *	In the case of an error, the error will be logged.
- */
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_NFSMount(CCIMObjectPath* mountOP) {
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*OPList;
-	int			err = 0;
-	/*
-	 * First check if the CCIMObjectPath parameter is null.
-	 */
-	if (mountOP == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::ENUM_INSTANCENAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_NFSMount(mountOP);
-	if (instList == NULL)
-	{
-		/*
-		 * Failure...or there are no NFS mount instances.
-		 */
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	OPList = cim_createObjectPathList(instList);
-
-	cim_freeInstanceList(instList);
-	/*
-	 * If an error occurred in cim_createObjectPathList it will be handled
-	 * there.
-	 */
-	return (OPList);
-} /* cp_enumInstanceNames_Solaris_NFSMount */
-
-/*
- * Method: cp_execQuery_Solaris_NFSMount
- *
- * Description: Queries the nfs mounts on the host to find those that meet the
- * search criteria.
- *
- * Parameters:
- *	- CCIMObjectPath *hostedShareOP - An object path containing the name of
- *	the class to query.
- *	- char *selectClause - Not used.
- *	- char *nonJoinExp - Not used.
- *	- char *queryExp - Not used.
- *	- char *queryLang - Not used.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFSMount instances that match the
- *	criteria.
- *	- NULL if an error occurred or if there are no Solaris_NFSMount
- *	instances that match the criteria.  In the case of an error, the error
- *	will be logged.
- *
- * NOTE: Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_execQuery_Solaris_NFSMount(CCIMObjectPath *mountOP, char *selectClause,
-	char *nonJoinExp, char *queryExp, char *queryLang) {
-
-	CCIMInstance		*emptyInst;
-	CCIMInstanceList	*nfsMountInstList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (mountOP == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::EXEC_QUERY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsMountInstList = cp_enumInstances_Solaris_NFSMount(mountOP);
-
-	if (nfsMountInstList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSMOUNT::EXEC_QUERY",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsMountInstList = cim_prependInstance(nfsMountInstList, emptyInst);
-	if (nfsMountInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSMOUNT::EXEC_QUERY",
-			CIM_ERR_FAILED, PREPEND_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstance(emptyInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (nfsMountInstList);
-} /* cp_execQuery_Solaris_NFSMount */
-
-/*
- * Method: cp_setInstance_Solaris_NFSMount
- *
- * Description: This method is not supported.  This is not allowed because in
- * order to change the properties of a mount on the host, the mount must be
- * unmounted and mounted with the new properties.  This behavior is not
- * appropriate for the set instance.  If the client wants to change the
- * properties of a mount they must delete the old instance and create a
- * new one with the desired properties.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of the class
- *	of which to set the instance.
- *	- CCIMInstance *pInst - Not used.
- *
- * Returns:
- *	- cim_false is returned every time since the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_NFSMount(CCIMObjectPath* pOP, CCIMInstance* pInst) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSMOUNT::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstance_Solaris_NFSMount */
-
-/*
- * Method: cp_setInstanceWithList_Solaris_NFSMount
- *
- * Description: This method is not supported.  This is not allowed because in
- * order to change the properties of a mount on the host, the mount must be
- * unmounted and mounted with the new properties.  This behavior is not
- * appropriate for the set instance.  If the client wants to change the
- * properties of a mount they must delete the old instance and create a
- * new one with the desired properties.
- *
- * Parameters:
- *	- CCIMObjectPath *hostedShareOP - The object path containing the name
- *	of the class of which to set the instance.
- *	- CCIMInstance *hostedShareInst - Not used.
- *	- char **props - Not used.
- *	- int num_props - Not used.
- *
- * Returns:
- *	- cim_false is returned every time since the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_NFSMount(CCIMObjectPath* mountOP,
-					CCIMInstance* mountInst,
-					char **props, int num_props) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSMOUNT::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-
-} /* cp_setInstanceWithList_Solaris_NFSMount */
-
-/*
- * Associator provider methods
- */
-
-/*
- * Method: cp_associators_Solaris_NFSMount
- *
- * Description: Returns the instances associated, via the Solaris_NFSMount
- * association, to the pObjectName parameter.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing the name of
- *	the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path containing information
- *	(Class Name, Key Properties) about the object whose associated objects
- *	are to be returned.
- *	- char *pResultClass - If specified, only return instances that are of
- *	this class type.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *	- char *pResultRole - If specified, only return instances that are
- *	playing this role in the association.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFS (if pRole == Antecedent &&
- *	pObjectName is a Solaris_Directory object path) or Solaris_Directory
- *	(if pRole == DEPENDENT && pObjectName is a Solaris_NFS object path)
- *	instances which are associated to the pObjectName parameter.
- *	- NULL if an error occurred or if there are no instances associated to
- *	the pObjectName passed in.  In the case of an error, the error will be
- *	logged.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_NFSMount(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*returnInstList;
-	CCIMPropertyList	*propList;
-	nfs_mntlist_t		*mountList;
-	cimchar			*name;
-	boolean_t		isAntecedent = B_FALSE;
-	int			err = 0;
-
-	/*
-	 * Check if the needed parameters are null.
-	 */
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * The Name key property is the defining property for each the
-	 * Antecedent (Solaris_Directory) and the Dependent (Solaris_NFS)
-	 * so retrieve that property.
-	 */
-	propList = pObjectName->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(propList, string, NAME, &err);
-
-	if (name == NULL || err != 0) {
-		util_handleError("SOLARIS_NFSMOUNT::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Determine whether pObjectName is the Antecedent or the Dependent
-	 * of the association.  Antecedent = Solaris_Directory,
-	 * Dependent = Solaris_NFS
-	 */
-	if ((strcasecmp(pObjectName->mName, SOLARIS_DIR) == 0)) {
-		isAntecedent = B_TRUE;
-		/*
-		 * If a value was passed in with pRole and it does not match
-		 * the role that pObjectName actually is then log an invalid
-		 * param error.
-		 */
-		if (pRole != NULL && (strcasecmp(pRole, ANTECEDENT) != 0)) {
-			util_handleError("SOLARIS_NFSMOUNT::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-	} else {
-		isAntecedent = B_FALSE;
-		if (pRole != NULL && (strcasecmp(pRole, DEPENDENT) != 0)) {
-			util_handleError("SOLARIS_NFSMOUNT::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-	}
-
-	mountList = get_associated_nfs_mntlist(isAntecedent, name);
-	if (mountList == NULL)
-		return ((CCIMInstanceList *)NULL);
-	returnInstList = get_associated_instances(mountList, (!isAntecedent));
-	nfs_free_mntinfo_list(mountList);
-
-	return (returnInstList);
-} /* cp_associators_Solaris_NFSMount */
-
-/*
- * Method: cp_associatorNames_Solaris_NFSMount
- *
- * Description: Returns the object paths of the instances on the other side of
- * the association which are associated via the Solaris_NFSMount association
- * and having the passed in parameter, pObjectName, as the opposite key.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pResultClass - If specified, only return instances that are of
- *	this class type.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *	- char *pResultRole - If specified, only return instances that are
- *	playing this role in the association.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFS (if pRole == Antecedent &&
- *	pObjectName is a Solaris_Directory object path) or Solaris_Directory
- *	(if pRole == DEPENDENT && pObjectName is a Solaris_NFS object path)
- *	object paths which are associated to the pObjectName parameter.
- *	- NULL if an error occurred or if there are no instances associated to
- *	the pObjectName passed in.  In the case of an error, the error will be
- *	logged.
- */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_NFSMount(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::ASSOCIATOR_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList = cp_associators_Solaris_NFSMount(pAssocName, pObjectName,
-		pResultClass, pRole, pResultRole);
-
-	if (instList != NULL) {
-		objPathList = cim_createObjectPathList(instList);
-		cim_freeInstanceList(instList);
-	}
-
-	return (objPathList);
-} /* cp_associatorNames_Solaris_NFSMount */
-
-/*
- * Method: cp_references_Solaris_NFSMount
- *
- * Description: Returns the Solaris_NFSMount instances that have the passed in
- * parameter, pObjectName, as one of it's keys.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFSMount instances.
- *	- NULL if an error occurred or if there are no Solaris_NFSMount
- *	instances having pObjectName as one of it's keys.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_references_Solaris_NFSMount(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMPropertyList	*propList;
-	nfs_mntlist_t		*mountList;
-	char			*name;
-	boolean_t		isAntecedent = B_FALSE;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::REFERENCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * The Name key property is the defining property for each the
-	 * Antecedent (Solaris_Directory) and the Dependent (Solaris_NFS)
-	 * so retrieve that property.
-	 */
-	propList = pObjectName->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(propList, string, NAME, &err);
-
-	if (name == NULL || err != 0) {
-		/*
-		 * The object path passed in does not have the appropriate
-		 * information.
-		 */
-		util_handleError("SOLARIS_NFSMOUNT::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	if ((strcasecmp(pObjectName->mName, SOLARIS_DIR) == 0)) {
-		isAntecedent = B_TRUE;
-		/*
-		 * If a value was passed in with pRole and it does not match
-		 * the role that pObjectName actually is then log an invalid
-		 * param error.
-		 */
-		if (pRole != NULL && (strcasecmp(pRole, ANTECEDENT) != 0)) {
-			util_handleError("SOLARIS_NFSMOUNT::REFERENCES",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-	} else {
-		isAntecedent = B_FALSE;
-		if (pRole != NULL && (strcasecmp(pRole, DEPENDENT) != 0)) {
-			util_handleError("SOLARIS_NFSMOUNT::REFERENCES",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-	}
-
-	mountList = get_associated_nfs_mntlist(isAntecedent, name);
-	if (mountList == NULL)
-		return ((CCIMInstanceList *)NULL);
-	instList = create_nfsMount_associations(mountList, &err);
-
-	nfs_free_mntinfo_list(mountList);
-
-	return (instList);
-} /* cp_references_Solaris_NFSMount */
-
-/*
- * Method: cp_referenceNames_Solaris_NFSMount
- *
- * Description: Returns the Solaris_NFSMount object paths of the instances
- * that have the passed in parameter, pObjectName, as one of it's keys.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFSMount object paths.
- *	- NULL if an error occurred or if there are no Solaris_NFSMount
- *	instances having pObjectName as one of it's keys.
- */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_NFSMount(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*nfsMountInstList;
-	CCIMObjectPathList	*nfsMountOPList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::REFERENCES_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	nfsMountInstList = cp_references_Solaris_NFSMount(pAssocName,
-		pObjectName, pRole);
-
-	if (nfsMountInstList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	nfsMountOPList = cim_createObjectPathList(nfsMountInstList);
-	if (nfsMountOPList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSMOUNT::REFERENCE_NAMES",
-			CIM_ERR_FAILED, CREATE_OBJECT_LIST_FAILURE, ex, &err);
-		cim_freeInstanceList(nfsMountInstList);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	cim_freeInstanceList(nfsMountInstList);
-
-	return (nfsMountOPList);
-} /* cp_referenceNames_Solaris_NFSMount */
-
-/*
- * Property provider methods
- */
-
-/*
- * Method: cp_getProperty_Solaris_NFSMount
- *
- * Description: Retrieves a certain property from the instance of
- * Solaris_NFSMount on the host that is described by the parameter pOP.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - The object path containing all the
- *	information needed to find the instance in which the property is to
- *	be returned.
- *	- cimchar *pPropName - The name of the property to be found.
- *
- * Returns:
- *	- A pointer to the property corresponding to the name passed in with
- *	pPropName.
- *	- NULL if an error occurred or if the property doesn't exist.  In the
- *	case of an error, the error will be logged.
- */
-CCIMProperty *
-cp_getProperty_Solaris_NFSMount(CCIMObjectPath *pOP, cimchar *pPropName) {
-	CCIMInstance	*nfsMountInst;
-	CCIMProperty	*nfsMountProp;
-	int		err = 0;
-
-	if (pOP == NULL || pPropName == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::GET_PROPERTY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	nfsMountInst = cp_getInstance_Solaris_NFSMount(pOP);
-	if (nfsMountInst == NULL) {
-		return ((CCIMProperty *)NULL);
-	}
-
-	nfsMountProp = cim_getProperty(nfsMountInst, pPropName);
-
-	cim_freeInstance(nfsMountInst);
-	/*
-	 * If an error occurred in cim_getProperty it will be handled there.
-	 */
-	return (nfsMountProp);
-} /* cp_getProperty_Solaris_NFSMount */
-
-/*
- * Method: cp_setProperty_Solaris_NFSMount
- *
- * Description: This method is not supported.  This is not allowed because in
- * order to change the properties of a mount on the host, the mount must be
- * unmounted and mounted with the new properties.  This behavior is not
- * appropriate for the set property.  If the client wants to change the
- * properties of a mount they must delete the old instance and create a
- * new one with the desired properties.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - Not used.
- *	- CCIMProperty *pProp - Not used.
- *
- * Returns:
- *	- cim_false is returned every time since the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_NFSMount(CCIMObjectPath *pOP, CCIMProperty *pProp) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSMOUNT::SET_PROPERTY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setProperty_Solaris_NFSMount */
-
-/*
- * Method provider methods
- */
-
-/*
- * Method: cp_invokeMethod_Solaris_NFSMount
- *
- * Description: Routes the cp_invokeMethod_Solaris_NFSMount calls to the
- * correct Solaris_NFSMount methods.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - The object path containing needed information
- *	about the class that is to getting methods invoked.
- *	- cimchar *functionName - The name of the function to be invoked.
- *	- CCIMPropertyList *inParams - The input parameters to the function.
- *	- CCIMPropertyList *outParams - The output parameters from the function.
- *
- * Returns:
- *	- A pointer to a property which indicates success or failure of the
- *	function.  1 for success, 0 for failure.
- *	- Upon error, NULL is returned and the error is logged.
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_NFSMount(CCIMObjectPath *pOP, cimchar *functionName,
-	CCIMPropertyList *inParams, CCIMPropertyList *outParams) {
-
-	int		err = 0;
-	CCIMProperty	*retVal;
-
-	if (pOP == NULL || functionName == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::INVOKE_METHOD",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-	cim_logDebug("cp_invokeMethod_Solaris_NFSMount",
-		"Invoking %s", functionName);
-	/*
-	 * Determine what method is being called.
-	 */
-	if (strcasecmp(functionName, GET_NET_CFG_LIST_METHOD) == 0) {
-		retVal = get_netconfig_list(outParams);
-	} else if (strcasecmp(functionName, GET_NFS_SEC_LIST_METHOD) == 0) {
-		retVal = get_nfssec_list(outParams);
-	} else if (strcasecmp(functionName, GET_DEF_SECMODE_METHOD) == 0) {
-		retVal = get_default_secmode(outParams);
-	} else if (strcasecmp(functionName, SHOW_EXPORTS_METHOD) == 0) {
-		retVal = show_exports(inParams, outParams);
-	} else if (strcasecmp(functionName, DELETE_VFSTAB_ENT_METHOD) == 0) {
-		retVal = delete_vfstab_entry(inParams);
-	} else {
-		/*
-		 * No such method name.
-		 */
-		util_handleError("SOLARIS_NFSMOUNT::INVOKE_METHOD",
-			CIM_ERR_FAILED, NO_SUCH_METHOD, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	return (retVal);
-} /* cp_invokeMethod_Solaris_NFSMount */
-
-/*
- * Private Methods
- */
-
-/*
- * Method: create_nfsMount_associations
- *
- * Description: Creates Solaris_NFSMount associations out of the information
- * gathered from all the NFS mounts on the host.
- *
- * Parameters:
- *	- nfs_mntlist_t *mountList - The list of nfs mounts on the host.
- *	- int *errp - The error pointer.  If an error occurs, this will be a
- * 	non-zero number.
- *
- * Returns:
- *	- A pointer to a list of all the Solaris_NFSMount instances on the host.
- *	- NULL if an error occurred or if there aren't any NFS mounts on the
- *	host.  In the case of an error, the error will be logged.
- */
-static CCIMInstanceList *
-create_nfsMount_associations(nfs_mntlist_t *mountList, int *errp) {
-	nfs_mntlist_t		*currentMnt;
-	CCIMInstanceList	*nfsMountInstList;
-	CCIMException		*ex;
-
-	nfsMountInstList = cim_createInstanceList();
-	if (nfsMountInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSMOUNT::CREATE_NFSMOUNT_ASSOC",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex,
-			errp);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	for (currentMnt = mountList; currentMnt != NULL;
-		currentMnt = currentMnt->next) {
-
-		CCIMInstance		*nfsMountInst;
-		CCIMPropertyList	*nfsMountPropList;
-
-		/*
-		 * Create the Solaris_NFSMount instance and add the properties
-		 * to the instance.
-		 */
-		nfsMountInst = cim_createInstance(SOLARIS_NFSMOUNT);
-		if (nfsMountInst == NULL) {
-			ex = cim_getLastError();
-			util_handleError(
-				"SOLARIS_NFSMOUNT::CREATE_NFSMOUNT_ASSOC",
-				CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE,
-				ex, errp);
-			cim_freeInstanceList(nfsMountInstList);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		nfsMountPropList = populate_property_list(currentMnt);
-		if (nfsMountPropList == NULL) {
-			/*
-			 * An error was encountered, but it was logged in
-			 * populate_property_list so just return null.
-			 */
-			cim_freeInstanceList(nfsMountInstList);
-			cim_freeInstance(nfsMountInst);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Add the returned property list to the instance.
-		 */
-		nfsMountInst = cim_addPropertyListToInstance(nfsMountInst,
-			nfsMountPropList);
-		if (nfsMountInst == NULL) {
-			ex = cim_getLastError();
-			util_handleError(
-				"SOLARIS_NFSMOUNT::CREATE_NFSMOUNT_ASSOC",
-				CIM_ERR_FAILED, PROPLIST_TO_INSTANCE_FAILURE,
-				ex, errp);
-			cim_freeInstanceList(nfsMountInstList);
-			cim_freePropertyList(nfsMountPropList);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Add the instance to the instance list.
-		 */
-		nfsMountInstList = cim_addInstance(nfsMountInstList,
-			nfsMountInst);
-		if (nfsMountInstList == NULL) {
-			ex = cim_getLastError();
-			util_handleError(
-				"SOLARIS_NFSMOUNT::CREATE_NFSMOUNT_ASSOC",
-				CIM_ERR_FAILED, ADD_INSTANCE_FAILURE,
-				ex, errp);
-			/*
-			 * Freeing the instance will free the property list
-			 * that was added to it.  There is no need to free
-			 * the property list separately.
-			 */
-			cim_freeInstance(nfsMountInst);
-			return ((CCIMInstanceList *)NULL);
-		}
-	}
-
-	return (nfsMountInstList);
-} /* create_nfsMount_associations */
-
-/*
- * Method: enumerate_mounts
- *
- * Description: Enumerates the NFS mounts on the host by using the
- * nfs_mntinfo nfs_get_mount_list method.
- *
- * Parameters:
- *	- NONE
- *
- * Returns:
- *	- A pointer to a list of all the Solaris_NFSMount instances on the host.
- *	- NULL if an error occurred or if there are no NFS mounts on the system.
- *	In the case of an error, the error will be logged.
- */
-static CCIMInstanceList *
-enumerate_mounts() {
-	int get_mntlist_err = 0;
-	int err = 0;
-	nfs_mntlist_t 	*nfs_mount_list;
-
-	nfs_mount_list = nfs_get_mount_list(&get_mntlist_err);
-	if (nfs_mount_list == NULL) {
-		/*
-		 * Check whether an error was returned or if we simply don't
-		 * have any nfs file systems on the system. If
-		 * get_mntlist_err is not equal to 0, an error was encountered.
-		 */
-		if (get_mntlist_err != 0) {
-			/*
-			 * Determine the error and log it.
-			 */
-			if (get_mntlist_err == ENOMEM ||
-				get_mntlist_err == EAGAIN) {
-				util_handleError(
-					"SOLARIS_NFSMOUNT::ENUM_MOUNTS",
-					CIM_ERR_LOW_ON_MEMORY,
-					NFS_GET_MNTLIST_FAILURE,
-					NULL, &err);
-
-				return ((CCIMInstanceList *)NULL);
-			} else {
-				/*
-				 * If any other errors were encountered it
-				 * can be handled as a general error.  We may
-				 * not know exactly what the error is.
-				 */
-				util_handleError(
-					"SOLARIS_NFSMOUNT::ENUM_MOUNTS",
-					CIM_ERR_FAILED,
-					NFS_GET_MNTLIST_FAILURE,
-					NULL, &err);
-
-				return ((CCIMInstanceList *)NULL);
-			}
-		}
-		/*
-		 * We simply don't have any nfs mounts on the host.
-		 */
-		return ((CCIMInstanceList *)NULL);
-
-	} else {
-		/*
-		 * At this point, one or more nfs mounts were found on the
-		 * system, create the instance list from the nfs_mount_list.
-		 */
-		CCIMInstanceList	*nfsMountInstList;
-
-		nfsMountInstList = create_nfsMount_associations(nfs_mount_list,
-			&err);
-
-		nfs_free_mntinfo_list(nfs_mount_list);
-		return (nfsMountInstList);
-	} /* if (nfs_mount_list == NULL) */
-
-} /* enumerate_mounts */
-
-/*
- * Method: get_Antecedent
- *
- * Description: Creates the Antecedent object path of the Solaris_NFSMount
- * class.
- *
- * Parameters:
- *	- cimchar *mount_point - the mount point of the nfs mount which is
- *	used as the Name Key property of the Antecedent, Solaris_Directory.
- *
- * Returns:
- *	- The corresponding Solaris_Directory CCIMObjectPath* is returned.
- *	- Upon error NULL is returned.
- *	The returned CCIMObjectPath* must be freed by the calling function.
- */
-static CCIMObjectPath *
-get_Antecedent(cimchar *mount_point) {
-	CCIMInstance	*solarisDirInst;
-	CCIMObjectPath	*solarisDirOP;
-	CCIMException	*ex;
-	int		err;
-	char		*hostname;
-
-	solarisDirInst = cim_createInstance(SOLARIS_DIR);
-	if (solarisDirInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSMOUNT::GET_ANT",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	/*
-	 * Create the key properties on the Solaris_Directory instance.
-	 *
-	 * The Solaris_Directory keys are as follows:
-	 * CSCreationClassName = "Solaris_ComputerSystem"
-	 * CSName = < hostname >
-	 * FSCreationClassName = "Solaris_NFS"
-	 * FSName = "NFS"
-	 * CreationClassName = "Solaris_Directory"
-	 * Name = < full pathname of mount point >
-	 */
-	if (add_property_to_instance(CS_CREATION_CLASS, string,
-		SOLARIS_CS, NULL, cim_true, solarisDirInst) == cim_false) {
-
-		cim_freeInstance(solarisDirInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	hostname = sys_get_hostname(&err);
-	if (hostname == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::GET_ANT)", CIM_ERR_FAILED,
-			GET_HOSTNAME_FAILURE, NULL, &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	if (add_property_to_instance(CSNAME, string, hostname,
-		NULL, cim_true, solarisDirInst) == cim_false) {
-
-		free(hostname);
-		cim_freeInstance(solarisDirInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-	free(hostname);
-
-	if (add_property_to_instance(FS_CREATION_CLASS, string,
-		SOLARIS_NFS, NULL, cim_true, solarisDirInst) == cim_false) {
-
-		cim_freeInstance(solarisDirInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	if (add_property_to_instance(FSNAME, string,
-		NFS, NULL, cim_true, solarisDirInst) == cim_false) {
-
-		cim_freeInstance(solarisDirInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	if (add_property_to_instance(CREATION_CLASS, string,
-		SOLARIS_DIR, NULL, cim_true, solarisDirInst) == cim_false) {
-
-		cim_freeInstance(solarisDirInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	if (add_property_to_instance(NAME, string, mount_point,
-		NULL, cim_true, solarisDirInst) == cim_false) {
-
-		cim_freeInstance(solarisDirInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	solarisDirOP = cim_createObjectPath(solarisDirInst);
-	if (solarisDirOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSMOUNT::GET_ANT",
-			CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE,
-			ex, &err);
-		cim_freeInstance(solarisDirInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	cim_freeInstance(solarisDirInst);
-	return (solarisDirOP);
-} /* get_Antecedent */
-
-/*
- * Method: get_associated_instances
- *
- * Description: Gets instances associated to the mounts passed in with
- * mountList.
- *
- * Parameters:
- *	- nfs_mntlist_t *mountList - The nfs mount list from which to get the
- *	associated instances.
- *	- boolean_t resultIsAnt - Whether or not the role that the instance
- *	returned plays in the association is the Antecedent.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFS or Solaris_Directory instances that
- *	are associated to the mount passed in with mountList.
- *	- NULL if an error occurred or if there are no instances that are
- *	associated to mountList.
- */
-static CCIMInstanceList *
-get_associated_instances(nfs_mntlist_t *mountList, boolean_t resultIsAnt) {
-	CCIMInstanceList	*returnInstList;
-	CCIMException		*ex;
-	nfs_mntlist_t		*currentMnt;
-	int			err = 0;
-
-	returnInstList = cim_createInstanceList();
-	if (returnInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSMOUNT::GET_ASSOC_INST",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	for (currentMnt = mountList; currentMnt != NULL;
-		currentMnt = currentMnt->next) {
-		/*
-		 * Determine if we are supposed to form the Antecedent or
-		 * Dependent instances by checking the value of resultIsAnt.
-		 */
-		if (resultIsAnt == B_FALSE) {
-			CCIMObjectPath	*nfsOP;
-			CCIMInstance	*nfsInst;
-
-			nfsOP = get_Dependent(currentMnt);
-			if (nfsOP == NULL) {
-				/*
-				 * An error occurred in get_Dependent and was
-				 * handled there so just return NULL.
-				 */
-				cim_freeInstanceList(returnInstList);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			nfsInst = cimom_getInstance(nfsOP, cim_false,
-				cim_false, cim_false, cim_false, NULL, 0);
-
-			/*
-			 * A NULL return value indicates an error, an empty
-			 * list does not.
-			 */
-			if (nfsInst == NULL) {
-				ex = cim_getLastError();
-				util_handleError(
-					"SOLARIS_NFSMOUNT::GET_ASSOC_INST",
-					CIM_ERR_FAILED, CIMOM_GET_INST_FAILURE,
-					ex, &err);
-				cim_freeObjectPath(nfsOP);
-				cim_freeInstanceList(returnInstList);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			cim_freeObjectPath(nfsOP);
-
-			if (nfsInst->mProperties == NULL) {
-				cim_freeInstanceList(returnInstList);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			/*
-			 * Add the Solaris_NFS instance to the instance
-			 * list to be returned.
-			 */
-			returnInstList = cim_addInstance(returnInstList,
-				nfsInst);
-			if (returnInstList == NULL) {
-				ex = cim_getLastError();
-				util_handleError(
-					"SOLARIS_NFSMOUNT::GET_ASSOC_INST",
-					CIM_ERR_FAILED, ADD_INSTANCE_FAILURE,
-					ex, &err);
-				cim_freeInstance(nfsInst);
-				return ((CCIMInstanceList *)NULL);
-			}
-		} else {
-			CCIMObjectPath	*dirOP;
-			CCIMInstance	*dirInst;
-
-			dirOP = (CCIMObjectPath *)get_Antecedent(
-				currentMnt->nml_mountp);
-
-			if (dirOP == NULL) {
-				/*
-				 * An error occurred in get_Antecedent and was
-				 * handled there so just return NULL.
-				 */
-				cim_freeInstanceList(returnInstList);
-				return ((CCIMInstanceList *)NULL);
-			}
-			cim_logDebug("get_associated_instances",
-				"dirOP =%s", dirOP->mName);
-
-			dirInst = cimom_getInstance(dirOP, cim_false,
-				cim_false, cim_false, cim_false, NULL, 0);
-
-			/*
-			 * A NULL return value means error, an empty list
-			 * does not.
-			 */
-			if (dirInst == NULL) {
-				ex = cim_getLastError();
-				util_handleError(
-					"SOLARIS_NFSMOUNT::GET_ASSOC_INST",
-					CIM_ERR_FAILED, CIMOM_GET_INST_FAILURE,
-					ex, &err);
-				cim_freeObjectPath(dirOP);
-				cim_freeInstanceList(returnInstList);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			cim_freeObjectPath(dirOP);
-
-			if (dirInst->mProperties == NULL) {
-				cim_freeInstance(dirInst);
-				cim_freeInstanceList(returnInstList);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			/*
-			 * Work around for cimom bug 4649100.
-			 */
-			if (!set_dir_keyProperties_to_true(dirInst)) {
-				cim_freeInstance(dirInst);
-				cim_freeInstanceList(returnInstList);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			/*
-			 * Add the Solaris_Directory instance to the
-			 * instance list to be returned.
-			 */
-			returnInstList = cim_addInstance(returnInstList,
-				dirInst);
-			if (returnInstList == NULL) {
-				ex = cim_getLastError();
-				util_handleError(
-					"SOLARIS_NFSMOUNT::GET_ASSOC_INST",
-					CIM_ERR_FAILED, ADD_INSTANCE_FAILURE,
-					ex, &err);
-				cim_freeInstance(dirInst);
-				return ((CCIMInstanceList *)NULL);
-			}
-		}
-	}
-
-	return (returnInstList);
-} /* get_associated_instances */
-
-/*
- * Method: get_associated_nfs_mntlist
- *
- * Description: Gets a list of mounts, including their information, that have
- * the same value as nameKeyValue for the Name property.
- *
- * Parameters:
- *	- boolean_t isAntecedent - A boolean value representing whether the
- *	key value passed in with nameKeyVal is the Antecedent or not.
- *	- char *nameKeyVal - The value of the Name key.
- *
- * Returns:
- *	- A pointer to a list of nfs mounts.
- *	- NULL if an error occurred or if there are no mounts having the same
- *	information as passed in with nameKeyVal.
- */
-static nfs_mntlist_t *
-get_associated_nfs_mntlist(boolean_t isAntecedent, char *nameKeyVal) {
-	nfs_mntlist_t	*mountList;
-	int		err = 0;
-
-	if (isAntecedent) {
-		/*
-		 * The nameKeyValue is that of the Antecedent,
-		 * Solaris_Directory.
-		 */
-		/*
-		 * The Name property is populated with the mount point of the
-		 * nfs file system so we need to determine if the mount point
-		 * exists.
-		 */
-		mountList = nfs_get_filtered_mount_list(NULL, nameKeyVal, NULL,
-			NULL, B_TRUE, &err);
-		if (mountList == NULL) {
-			/*
-			 * Check if an error occurred and if it did handle it.
-			 */
-			if (err != 0) {
-				util_handleError(
-					"SOLARIS_NFSMOUNT::GET_ASSOC_NFSMNTS",
-					CIM_ERR_FAILED,
-					NFS_GET_FILTERED_MOUNTS_FAILURE,
-					NULL, &err);
-				return (NULL);
-			}
-			/*
-			 * If no error occurred then we know that the mount
-			 * point doesn't exist so return NULL.
-			 */
-			return (NULL);
-		}
-	} else {
-		char	*resource;
-		char	*devid;
-		char	*devMntOpt = "dev=";
-		char	*searchOpt;
-		int	searchOptLen;
-
-		/*
-		 * The nameKeyValue is that of the Dependent, Solaris_NFS.
-		 */
-		/*
-		 * Get the resource and devid from the Name key property
-		 * which should be in the form:
-		 * "resource:=< resource > devid:=< devid >"
-		 */
-		err = 0;
-		devid = get_devid(nameKeyVal, &err);
-		if (devid == NULL) {
-			util_handleError(
-				"SOLARIS_NFSMOUNT::GET_ASSOC_NFSMNTS",
-				CIM_ERR_FAILED, GET_DEVID_FAILURE, NULL, &err);
-			return (NULL);
-		}
-
-		cim_logDebug("get_associated_nfs_mntlist",
-			"isDependent: devid =%s", devid);
-		err = 0;
-		resource = get_resource(nameKeyVal, &err);
-		if (resource == NULL) {
-			util_handleError(
-				"SOLARIS_NFSMOUNT::GET_ASSOC_NFSMNTS",
-				CIM_ERR_FAILED, GET_RESOURCE_FAILURE, NULL,
-				&err);
-			free(devid);
-			return (NULL);
-		}
-
-		cim_logDebug("get_associated_nfs_mntlist",
-			"isDependent: resource =%s", resource);
-		/*
-		 * The devid is unique per file system so we will search for
-		 * the mount that has the corresponding devid.  Obviously,
-		 * we only expect to get one file system.
-		 */
-		searchOptLen = (strlen(devMntOpt) + strlen(devid) + 1);
-
-		searchOpt = (char *)calloc((size_t)searchOptLen,
-			(size_t)sizeof (char));
-
-		if (searchOpt == NULL) {
-			/*
-			 * Out of memory
-			 */
-			free(devid);
-			free(resource);
-			return (NULL);
-		}
-
-		(void) snprintf(searchOpt, (size_t)searchOptLen, "%s%s",
-			devMntOpt, devid);
-		cim_logDebug("get_associated_nfs_mntlist",
-			"isDependent: searchOpt =%s", searchOpt);
-
-		free(devid);
-
-		mountList = nfs_get_mounts_by_mntopt(searchOpt, B_FALSE, &err);
-		if (mountList == NULL) {
-			free(resource);
-			free(searchOpt);
-			if (err != 0) {
-				util_handleError(
-					"SOLARIS_NFSMOUNT::GET_ASSOC_NFSMNTS",
-					CIM_ERR_FAILED,
-					NFS_GET_MNTS_BY_MNTOPT_FAILURE,
-					NULL, &err);
-				return (NULL);
-			}
-			return (NULL);
-		}
-
-		free(searchOpt);
-
-		/*
-		 * Check that the resource from the pObjectName is the same as
-		 * the one in the mountList.  If it is not, return null.
-		 */
-		if ((strcmp(resource, mountList->nml_resource) != 0)) {
-			free(resource);
-			return (NULL);
-		}
-		free(resource);
-	}
-
-	return (mountList);
-} /* get_associated_nfs_mntlist */
-
-/*
- * Method: get_Dependent
- *
- * Description: Creates the Dependent object path of the Solaris_NFSMount class
- *
- * Parameters:
- *	- nfs_mntlist_t *nfs_mount - The nfs mount to be used for filling in
- *	the properties of the Dependent, Solaris_NFS.
- *
- * Returns:
- *	- A Solaris_NFS CCIMObjectPath* is returned.
- *	- Upon error, NULL is returned.
- */
-static CCIMObjectPath *
-get_Dependent(nfs_mntlist_t *nfs_mount) {
-	CCIMInstance	*solarisNFSInst;
-	CCIMObjectPath	*solarisNFSOp;
-	CCIMException	*ex;
-	char		*name_val;
-	char		*devid;
-	char		*resourceStr = "resource:=";
-	char		*devidStr = "devid:=";
-	char		*hostname;
-	int		err = 0;
-	int		name_val_len;
-
-	solarisNFSInst = cim_createInstance(SOLARIS_NFS);
-	if (solarisNFSInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSMOUNT::GET_DEP",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		return (NULL);
-	}
-
-	/*
-	 * Create the key properties on the Solaris_NFS instance.
-	 *
-	 * The Solaris_Directory keys are as follows:
-	 * CSCreationClassName = "Solaris_ComputerSystem"
-	 * CSName = < hostname >
-	 * CreationClassName = "Solaris_NFS"
-	 * Name = resource:=< resource > devid:= < devid >
-	 */
-	if (add_property_to_instance(CS_CREATION_CLASS, string,
-		SOLARIS_CS, NULL, cim_true, solarisNFSInst) == cim_false) {
-
-		cim_freeInstance(solarisNFSInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	hostname = sys_get_hostname(&err);
-	if (hostname == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::GET_DEP", CIM_ERR_FAILED,
-			GET_HOSTNAME_FAILURE, NULL, &err);
-		cim_freeInstance(solarisNFSInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	if (add_property_to_instance(CSNAME, string, hostname, NULL, cim_true,
-		solarisNFSInst) == cim_false) {
-
-		free(hostname);
-		cim_freeInstance(solarisNFSInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-	free(hostname);
-
-	if (add_property_to_instance(CREATION_CLASS, string,
-		SOLARIS_NFS, NULL, cim_true, solarisNFSInst) == cim_false) {
-
-		cim_freeInstance(solarisNFSInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	if (nfs_mount != NULL) {
-		err = 0;
-		devid = fs_parse_optlist_for_option(
-			nfs_mount->nml_mntopts, "dev=", &err);
-		if (devid == NULL) {
-			util_handleError("SOLARIS_NFSMOUNT::GET_DEP",
-				CIM_ERR_FAILED, FS_PARSE_OPTLIST_FAILURE,
-				NULL, &err);
-			cim_freeInstance(solarisNFSInst);
-			return ((CCIMObjectPath *)NULL);
-		}
-
-		name_val_len = strlen(resourceStr) +
-			strlen(nfs_mount->nml_resource) + strlen(devidStr) +
-			strlen(devid) + 2;
-
-		name_val = (char *)calloc((size_t)name_val_len,
-			(size_t)(sizeof (char)));
-		if (name_val == NULL) {
-			util_handleError("SOLARIS_NFSMOUNT::GET_DEP",
-				CIM_ERR_LOW_ON_MEMORY, LOW_MEMORY, NULL, NULL);
-			cim_freeInstance(solarisNFSInst);
-			return ((CCIMObjectPath *)NULL);
-		}
-
-		(void) snprintf(name_val, (size_t)name_val_len,
-			"%s%s%s%s%s", resourceStr, nfs_mount->nml_resource, " ",
-			devidStr, devid);
-	}
-
-	free(devid);
-
-	if (add_property_to_instance(NAME, string, name_val, NULL,
-		cim_true, solarisNFSInst) == cim_false) {
-
-		cim_freeInstance(solarisNFSInst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	free(name_val);
-
-	solarisNFSOp = cim_createObjectPath(solarisNFSInst);
-
-	if (solarisNFSOp == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSMOUNT::GET_DEP",
-			CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE,
-			ex, &err);
-		cim_freeInstance(solarisNFSInst);
-		return (NULL);
-	}
-
-	cim_freeInstance(solarisNFSInst);
-
-	return (solarisNFSOp);
-} /* get_Dependent */
-
-/*
- * Method: get_devid
- *
- * Description:
- * Parses the Solaris_NFS.Name key property, which is in the
- * "resource:=<resource> devid:=<devid>" format, for the devid.
- *
- * Parameters:
- *	- char *keyValue - The string which is in the
- *	"resource:=<resource> devid:=<devid>" format to parse the devid from.
- *	- int *errp - The error pointer.  This will be set to a non-zero number
- *	if an error is encountered.
- *
- * Returns:
- *	- A pointer to a string which is the value of the devid.
- *	- NULL if the devid is not found or if an error occurred.  In the case
- *	of an error, errp will be set to a non-zero number.
- *
- * NOTE:
- * The caller must free the memory allocated for the return string.
- */
-char *
-get_devid(char *keyValue, int *errp) {
-	char	*devidMarker = "devid:=";
-	char	*devidMarkerStart;
-	char	*devidStart;
-	char	*devid;
-
-	devidMarkerStart = strstr(keyValue, devidMarker);
-	if (devidMarkerStart == NULL) {
-		return (NULL);
-	}
-
-	devidStart = devidMarkerStart + strlen(devidMarker);
-	devid = strdup(devidStart);
-	if (devid == NULL) {
-		*errp = errno;
-		return (NULL);
-	}
-
-	return (devid);
-} /* get_devid */
-
-/*
- * Method: get_resource
- *
- * Description:
- * Parses the Solaris_NFS.Name key property, which is in the
- * "resource:=<resource> devid:=<devid>" format, for the resource.
- *
- * Parameters:
- *	- char *keyValue - The string which is in the
- *      "resource:=<resource> devid:=<devid>" format to parse the resource from.
- *	- int *errp - The error pointer.  This will be set to a non-zero number
- *	if an error is encountered.
- *
- * Returns:
- *	- A pointer to a string which is the value of the resource.
- *	- NULL if the resource is not for or if an error occurred.  In the case
- *	of an error, errp will be set to a non-zero number.
- * NOTE:
- * The caller must free the memory allocated for the return string.
- */
-static char *
-get_resource(char *keyValue, int *errp) {
-	char	*devid;
-	char	*devidStr = "devid:=";
-	char	*resource;
-	char	*resourceStr = "resource:=";
-	int	totalDevidLen = 0, keyValueLen = 0, resourceLen = 0,
-		resourceStrLen = 0, i = 0;
-	int	err = 0;
-
-	/*
-	 * First we need to get the devid string portion of the Solaris_NFS.Name
-	 * key value in order to figure out how long that portion is.
-	 */
-	devid = get_devid(keyValue, &err);
-	if (devid == NULL) {
-		*errp = err;
-		return (NULL);
-	}
-
-	totalDevidLen = strlen(devidStr) + strlen(devid);
-
-	keyValueLen = strlen(keyValue);
-	resourceStrLen = strlen(resourceStr);
-
-	/*
-	 * The length of the space character between the resource and devid
-	 * is not taken out here for the fact that we will use that space in
-	 * order to allocate enough space for the null terminating character.
-	 */
-	resourceLen = keyValueLen - totalDevidLen - resourceStrLen;
-	resourceLen = strlen(keyValue) - (strlen(devidStr) + strlen(devid)) -
-		strlen(resourceStr);
-
-	resource = (char *)calloc((size_t)resourceLen, (size_t)sizeof (char));
-	if (resource == NULL) {
-		*errp = errno;
-		return (NULL);
-	}
-
-	for (i = 0; i < (resourceLen - 1); i++) {
-		resource[i] = keyValue[resourceStrLen+i];
-	}
-
-	/*
-	 * Make sure to put the null terminating character at the end.
-	 */
-	resource[resourceLen-1] = '\0';
-
-	free(devid);
-	return (resource);
-} /* get_resource */
-
-/*
- * Method: populate_property_list
- *
- * Description: Populates all the properties of the passed in mount into a
- * property list.
- *
- * Parameters:
- *	- nfs_mntlist_t *nfs_mount - The nfs mount to retrieve the properties
- *	from.
- *
- * Returns:
- *	- A pointer to a list of properties that correspond to the properties of
- *	nfs_mount.
- *	- Upon error, NULL is returned and the error is logged.
- */
-static CCIMPropertyList *
-populate_property_list(nfs_mntlist_t *nfs_mount) {
-	CCIMException		*ex;
-	CCIMPropertyList	*nfsMountPropList;
-	CCIMObjectPath		*antOP;
-	CCIMObjectPath		*depOP;
-	cimchar			**propValues;
-	int			i = 0;
-	int			err = 0;
-
-	nfsMountPropList = cim_createPropertyList();
-	if (nfsMountPropList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSMOUNT::POPULATE_PROPLIST",
-			CIM_ERR_FAILED, CREATE_PROPLIST_FAILURE, ex, &err);
-		return ((CCIMPropertyList *)NULL);
-	}
-
-	/*
-	 * Create the CCIMProperties for this instance
-	 */
-
-	/*
-	 * Antecedent
-	 */
-	antOP = get_Antecedent(nfs_mount->nml_mountp);
-	if (antOP == NULL) {
-		cim_freePropertyList(nfsMountPropList);
-		return ((CCIMPropertyList *)NULL);
-	}
-	nfsMountPropList = add_property_to_list(nfsMountProps[ANT].name,
-		nfsMountProps[ANT].type, NULL, antOP, nfsMountProps[ANT].isKey,
-		nfsMountPropList);
-
-	/*
-	 * Dependent
-	 */
-	depOP = get_Dependent(nfs_mount);
-	if (depOP == NULL) {
-		cim_freePropertyList(nfsMountPropList);
-		return ((CCIMPropertyList *)NULL);
-	}
-	nfsMountPropList = add_property_to_list(nfsMountProps[DEP].name,
-		nfsMountProps[DEP].type, NULL, depOP, nfsMountProps[DEP].isKey,
-		nfsMountPropList);
-
-	propValues = calloc((size_t)PROPCOUNT, (size_t)sizeof (cimchar *));
-	if (propValues == NULL) {
-		util_handleError("SOLARIS_NFSMOUNT::POPULATE_PROPLIST",
-			CIM_ERR_LOW_ON_MEMORY, LOW_MEMORY, NULL, &err);
-		return ((CCIMPropertyList *)NULL);
-	}
-
-	if (populate_property_values(nfs_mount, propValues) == cim_false) {
-		fileutil_free_string_array(propValues, PROPCOUNT);
-		cim_freePropertyList(nfsMountPropList);
-		return ((CCIMPropertyList *)NULL);
-	}
-
-	for (i = 0; i < PROPCOUNT; i++) {
-		if (i == ANT || i == DEP) {
-			continue;
-		}
-		nfsMountPropList = add_property_to_list(nfsMountProps[i].name,
-			nfsMountProps[i].type, propValues[i], NULL,
-			nfsMountProps[i].isKey, nfsMountPropList);
-		if (nfsMountPropList == NULL) {
-			fileutil_free_string_array(propValues, PROPCOUNT);
-			return ((CCIMPropertyList *)NULL);
-		}
-	}
-
-	fileutil_free_string_array(propValues, PROPCOUNT);
-	return (nfsMountPropList);
-} /* populate_property_list */
-
-static CIMBool
-populate_property_values(nfs_mntlist_t *nfs_mount,
-	cimchar **propValues) {
-
-	fs_mntdefaults_t	vfstab_filter;
-	fs_mntdefaults_t	*vfstab_entry;
-	boolean_t		readonly;
-	boolean_t		optHasEquals;
-	char			*enableQuota, *failoverList, *noSuid,
-				*posix, *public, *port;
-	cimchar			propValue[MAXSIZE];
-	int			defaultValue = 0;
-	int			err = 0;
-
-	/*
-	 * AttributeCaching
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", !(nfs_mount->nml_noac));
-	propValues[ATTRCACHE] = strdup(propValue);
-	if (propValues[ATTRCACHE] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * AttributeCachingForDirectoriesMax
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_acdirmax);
-	propValues[ATTRCACHEDIRMAX] = strdup(propValue);
-	if (propValues[ATTRCACHEDIRMAX] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * AttributeCachingForDirectoriesMin
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_acdirmin);
-	propValues[ATTRCACHEDIRMIN] = strdup(propValue);
-	if (propValues[ATTRCACHEDIRMIN] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * AttributeCachingForRegularFilesMax
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_acregmax);
-	propValues[ATTRCACHEFILESMAX] = strdup(propValue);
-	if (propValues[ATTRCACHEFILESMAX] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * AttributeCachingForRegularFilesMin
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_acregmin);
-	propValues[ATTRCACHEFILESMIN] = strdup(propValue);
-	if (propValues[ATTRCACHEFILESMIN] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * EnableQuotaChecking
-	 */
-	optHasEquals = B_FALSE;
-	enableQuota = get_property_from_opt_string(nfs_mount->nml_mntopts,
-		"quota", optHasEquals, defaultValue);
-	if (enableQuota == NULL) {
-		return (cim_false);
-	}
-	propValues[ENABLEQUOTA] = strdup(enableQuota);
-	if (propValues[ENABLEQUOTA] == NULL) {
-		return (cim_false);
-	}
-	free(enableQuota);
-
-	/*
-	 * FailoverList
-	 */
-	failoverList = cim_encodeStringArray(nfs_mount->nml_failoverlist,
-		nfs_mount->nml_failovercount);
-	if (failoverList == NULL) {
-		cim_logDebug("populate_property_values", "encoding FAILED");
-		return (cim_false);
-	}
-	propValues[FAILOVER] = strdup(failoverList);
-	if (propValues[FAILOVER] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * ForceDirectIO
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_directio);
-	propValues[FORCEDIRECTIO] = strdup(propValue);
-	if (propValues[FORCEDIRECTIO] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * FsType
-	 */
-	propValues[FSTYPE] = strdup(nfs_mount->nml_fstype);
-	if (propValues[FSTYPE] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * GroupId
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_grpid);
-	propValues[GRPID] = strdup(propValue);
-	if (propValues[GRPID] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * HardMount
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_hard);
-	propValues[HARDMNT] = strdup(propValue);
-	if (propValues[HARDMNT] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * Interrupt
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_intr);
-	propValues[INTR] = strdup(propValue);
-	if (propValues[INTR] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * MaxRetransmissionAttempts
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_retrans);
-	propValues[MAXRETRANSATTEMPTS] = strdup(propValue);
-	if (propValues[MAXRETRANSATTEMPTS] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * MountAtBootEntry - Deprecated
-	 */
-	vfstab_filter.resource = nfs_mount->nml_resource;
-	vfstab_filter.fsckdevice = NULL;
-	vfstab_filter.mountp = nfs_mount->nml_mountp;
-	vfstab_filter.fstype = nfs_mount->nml_fstype;
-	vfstab_filter.fsckpass = NULL;
-	vfstab_filter.mountatboot = NULL;
-	vfstab_filter.mntopts = NULL;
-
-	err = 0;
-	/*
-	 * The space allocated for the value returned by
-	 * fs_get_filtered_mount_defaults is freed later in this function
-	 * because it is needed to set the value of the VfstabEntry property.
-	 */
-	vfstab_entry = fs_get_filtered_mount_defaults(&vfstab_filter, &err);
-	if (vfstab_entry == NULL) {
-		if (err != 0) {
-			util_handleError("SOLARIS_NFSMOUNT::POPULATE_PROPLIST",
-				CIM_ERR_FAILED,
-				FS_GET_FILTERED_MNTDEFAULTS_FAILURE, NULL,
-				&err);
-			return (cim_false);
-		}
-		(void) snprintf(propValue, (size_t)MAXSIZE, "%d", B_FALSE);
-	} else {
-		/*
-		 * The possible values in the mount at boot field are "yes",
-		 * "no" and "-".  The "-" character, although it is not likely
-		 * to be used, will be interpretted as the mount is to not be
-		 * mounted at boot.  "-" is used when a field does not apply to
-		 * the resource being mounted.
-		 */
-		if (strcasecmp(vfstab_entry->mountatboot, "yes") == 0) {
-			(void) snprintf(propValue, (size_t)MAXSIZE, "%d",
-			    B_TRUE);
-		} else {
-			(void) snprintf(propValue, (size_t)MAXSIZE, "%d",
-			    B_FALSE);
-		}
-	}
-	propValues[MNTATBOOTENTRY] = strdup(propValue);
-	if (propValues[MNTATBOOTENTRY] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * MountOptions
-	 */
-	propValues[MNTOPTS] = strdup(nfs_mount->nml_mntopts);
-	if (propValues[MNTOPTS] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * MountFailureRetries - This value is only valid upon creation of an
-	 * instance of Solaris_NFSMount.  This is actually a mount _process_
-	 * option and not a mount option.
-	 */
-
-	/*
-	 * NoCloseToOpenConsistency
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_nocto);
-	propValues[NOCTO] = strdup(propValue);
-	if (propValues[NOCTO] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * NoMnttabEntry - This will always be false for every nfs mount that
-	 * is shown in the CIM/WBEM interface because there is no way to
-	 * programatically determine a file system that is mounted if it is not
-	 * in /etc/mnttab.  If it is not in /etc/mnttab, it is like that for a
-	 * reason and is also an argument for not showing the existense of
-	 * those file systems.
-	 */
-	(void) snprintf(propValue, (size_t)MAXSIZE, "%d", B_FALSE);
-	propValues[NOMNTTABENT] = strdup(propValue);
-	if (propValues[NOMNTTABENT] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * NoSuid
-	 */
-	optHasEquals = B_FALSE;
-	noSuid = get_property_from_opt_string(nfs_mount->nml_mntopts,
-		"nosuid", optHasEquals, defaultValue);
-	if (noSuid == NULL) {
-		return (cim_false);
-	}
-	propValues[NOSUID] = strdup(noSuid);
-	if (propValues[NOSUID] == NULL) {
-		return (cim_false);
-	}
-	free(noSuid);
-
-	/*
-	 * Overlay - This is a property which is only valid upon creation of a
-	 * Solaris_NFSMount instance.  It specifies that the file system to be
-	 * mounted should be mounted on top of another existing mounted file
-	 * system.
-	 */
-
-	/*
-	 * Overlayed
-	 */
-	/*
-	 * We must do some magic here with determining an overlayed file system.
-	 * We must check for mounts with the same mount point and determine
-	 * which is further down in the mnttab list to determine the top most
-	 * file system.  This is all done in the fs_mounts interface.
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_overlayed);
-	propValues[OVERLAYED] = strdup(propValue);
-	if (propValues[OVERLAYED] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * Posix
-	 */
-	optHasEquals = B_FALSE;
-	posix = get_property_from_opt_string(nfs_mount->nml_mntopts, "posix",
-		optHasEquals, defaultValue);
-	if (posix == NULL) {
-		return (cim_false);
-	}
-	propValues[POSIX] = strdup(posix);
-	if (propValues[POSIX] == NULL) {
-		return (cim_false);
-	}
-	free(posix);
-
-	/*
-	 * Protocol
-	 */
-	propValues[PROTO] = strdup(nfs_mount->nml_proto);
-	if (propValues[PROTO] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * Public
-	 */
-	optHasEquals = B_FALSE;
-	public = get_property_from_opt_string(nfs_mount->nml_mntopts,
-		"public", optHasEquals, defaultValue);
-	if (public == NULL) {
-		return (cim_false);
-	}
-	propValues[PUBLIC] = strdup(public);
-	if (propValues[PUBLIC] == NULL) {
-		return (cim_false);
-	}
-	free(public);
-
-	/*
-	 * ReadBufferSize
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_curread);
-	propValues[READBUFFSIZE] = strdup(propValue);
-	if (propValues[READBUFFSIZE] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * ReadOnly
-	 */
-	readonly = fs_is_readonly(nfs_mount->nml_mountp, &err);
-	if (err != 0) {
-		return (cim_false);
-	}
-	(void) snprintf(propValue, (size_t)MAXSIZE, "%d", readonly);
-	propValues[READONLY] = strdup(propValue);
-	if (propValues[READONLY] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * ReplicatedResources - Deprecated.
-	 */
-	/*
-	 * This is the same as the FailoverList so we can use the value used
-	 * to create that property (failoverList).
-	 */
-	propValues[REPLRESOURCES] = strdup(failoverList);
-	if (propValues[REPLRESOURCES] == NULL) {
-		free(failoverList);
-		return (cim_false);
-	}
-	free(failoverList);
-
-	/*
-	 * RetransmissionTimeout
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_timeo);
-	propValues[RETRANSTIMEO] = strdup(propValue);
-	if (propValues[RETRANSTIMEO] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * RetryInForeground - This value is only valid upon creation of an
-	 * instance of Solaris_NFSMount.  This is actually a mount _process_
-	 * option and not a mount option.
-	 */
-
-	/*
-	 * SecurityMode
-	 */
-	if (nfs_mount->nml_securitymode == NULL) {
-		cim_logDebug("populate_property_value", "secmode == NULL");
-	} else {
-		cim_logDebug("populate_property_value", "secmode =%s",
-			nfs_mount->nml_securitymode);
-	}
-
-	if (nfs_mount->nml_securitymode != NULL) {
-		propValues[SECMODE] = strdup(nfs_mount->nml_securitymode);
-		if (propValues[SECMODE] == NULL) {
-			return (cim_false);
-		}
-	}
-
-	/*
-	 * ServerCommunicationPort
-	 */
-	optHasEquals = B_TRUE;
-	defaultValue = NFS_PORT;
-	port = get_property_from_opt_string(nfs_mount->nml_mntopts, "port=",
-		optHasEquals, defaultValue);
-	if (port == NULL) {
-		return (cim_false);
-	}
-	propValues[SERVERCOMMPORT] = strdup(port);
-	if (propValues[SERVERCOMMPORT] == NULL) {
-		return (cim_false);
-	}
-	free(port);
-
-	/*
-	 * ServerName
-	 */
-	propValues[SERVERNAME] = strdup(nfs_mount->nml_curserver);
-	if (propValues[SERVERNAME] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * ServerPath
-	 */
-	propValues[SERVERPATH] = strdup(nfs_mount->nml_curpath);
-	if (propValues[SERVERPATH] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * Version
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_vers);
-	propValues[VERS] = strdup(propValue);
-	if (propValues[VERS] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * VfstabEntry
-	 */
-	/*
-	 * The vfstab_entry variable is retrieved from the
-	 * fs_get_filtered_mount_defaults call when populating the
-	 * MountAtBootEntry property.
-	 */
-	if (vfstab_entry == NULL) {
-		(void) snprintf(propValue, MAXSIZE, "%d", B_FALSE);
-	} else {
-		(void) snprintf(propValue, MAXSIZE, "%d", B_TRUE);
-		fs_free_mntdefaults_list(vfstab_entry);
-	}
-	propValues[VFSTABENTRY] = strdup(propValue);
-	if (propValues[VFSTABENTRY] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * WriteBufferSize
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_curwrite);
-	propValues[WRITEBUFFSIZE] = strdup(propValue);
-	if (propValues[WRITEBUFFSIZE] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * Xattr
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_xattr);
-	propValues[XATTR] = strdup(propValue);
-	if (propValues[XATTR] == NULL) {
-		return (cim_false);
-	}
-
-	cim_logDebug("populate_property_values", "returning cim_true");
-	return (cim_true);
-} /* populate_property_values */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_NFSMount.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,189 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SOLARIS_NFSMOUNT_H
-#define	_SOLARIS_NFSMOUNT_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cp_required.h>
-#include <cp_instance.h>
-#include <cp_associator.h>
-#include <cp_method.h>
-#include <cp_property.h>
-#include <cimomhandle.h>
-#include <cimeventsvc.h>
-#include <cimlogsvc.h>
-#include "nfsprov_include.h"
-#include "nfs_mount_attr.h"
-
-#define	PROPCOUNT 39
-
-static nfs_prov_prop_plus_optVals_t nfsMountProps[] = {
-#define	ANT 0
-	{"Antecedent", cim_true, reference, NULL, NULL, NULL},
-
-#define	ATTRCACHE (ANT + 1)
-	{"AttributeCaching", cim_false, boolean, NULL, NFS_ATTRCACHE_FALSE,
-	NULL},
-
-#define	ATTRCACHEDIRMAX (ATTRCACHE + 1)
-	{"AttributeCachingForDirectoriesMax", cim_false, uint16, NULL, NULL,
-	NFS_ATTRCACHEDIRMAX},
-
-#define	ATTRCACHEDIRMIN (ATTRCACHEDIRMAX + 1)
-	{"AttributeCachingForDirectoriesMin", cim_false, uint16, NULL, NULL,
-	NFS_ATTRCACHEDIRMIN},
-
-#define	ATTRCACHEFILESMAX (ATTRCACHEDIRMIN + 1)
-	{"AttributeCachingForRegularFilesMax", cim_false, uint16, NULL, NULL,
-	NFS_ATTRCACHEFILESMAX},
-
-#define	ATTRCACHEFILESMIN (ATTRCACHEFILESMAX + 1)
-	{"AttributeCachingForRegularFilesMin", cim_false, uint16, NULL, NULL,
-	NFS_ATTRCACHEFILESMIN},
-
-#define	DEP (ATTRCACHEFILESMIN + 1)
-	{"Dependent", cim_true, reference, NULL, NULL, NULL},
-
-#define	ENABLEQUOTA (DEP + 1)
-	{"EnableQuotaChecking", cim_false, boolean, NFS_ENABLEQUOTA_TRUE,
-	NFS_ENABLEQUOTA_FALSE, NULL},
-
-#define	FAILOVER (ENABLEQUOTA + 1)
-	{"FailoverList", cim_false, string_array, NULL, NULL, NULL},
-
-#define	FORCEDIRECTIO (FAILOVER + 1)
-	{"ForceDirectIO", cim_false, boolean, NFS_FORCEDIRECTIO_TRUE,
-	NFS_FORCEDIRECTIO_FALSE, NULL},
-
-#define	FSTYPE (FORCEDIRECTIO + 1)
-	{"FsType", cim_false, string, NULL, NULL, NULL},
-
-#define	GRPID (FSTYPE + 1)
-	{"GroupId", cim_false, boolean, NFS_GRPID_TRUE, NULL, NULL},
-
-#define	HARDMNT (GRPID + 1)
-	{"HardMount", cim_false, boolean, NFS_HARDMNT_TRUE, NFS_HARDMNT_FALSE,
-	NULL},
-
-#define	INTR (HARDMNT + 1)
-	{"Interrupt", cim_false, boolean, NFS_INTR_TRUE, NFS_INTR_FALSE, NULL},
-
-#define	MAXRETRANSATTEMPTS (INTR + 1)
-	{"MaxRetransmissionAttempts", cim_false, uint16, NULL, NULL,
-	NFS_MAXRETRANSATTEMPTS},
-
-#define	MNTATBOOTENTRY (MAXRETRANSATTEMPTS + 1)
-	{"MountAtBootEntry", cim_false, boolean, NULL, NULL, NULL},
-
-#define	MNTOPTS (MNTATBOOTENTRY + 1)
-	{"MountOptions", cim_false, string, NULL, NULL, NULL},
-
-#define	MNTFAILRETRIES (MNTOPTS + 1)
-	{"MountFailureRetries", cim_false, uint16, NULL, NULL,
-	NFS_MNTFAILRETRIES},
-
-#define	NOCTO (MNTFAILRETRIES + 1)
-	{"NoCloseToOpenConsistency", cim_false, boolean, NFS_NOCTO_TRUE, NULL,
-	NULL},
-
-#define	NOMNTTABENT (NOCTO + 1)
-	{"NoMnttabEntry", cim_false, boolean, NULL, NULL, NULL},
-
-#define	NOSUID (NOMNTTABENT + 1)
-	{"NoSuid", cim_false, boolean, NFS_NOSUID_TRUE, NFS_NOSUID_FALSE,
-	NULL},
-
-#define	OVERLAY (NOSUID + 1)
-	{"Overlay", cim_false, boolean, NULL, NULL, NULL},
-
-#define	OVERLAYED (OVERLAY + 1)
-	{"Overlayed", cim_false, boolean, NULL, NULL, NULL},
-
-#define	POSIX (OVERLAYED + 1)
-	{"Posix", cim_false, boolean, NFS_POSIX_TRUE, NULL, NULL},
-
-#define	PROTO (POSIX + 1)
-	{"Protocol", cim_false, string, NULL, NULL, NFS_PROTO},
-
-#define	PUBLIC (PROTO + 1)
-	{"Public", cim_false, boolean, NFS_PUBLIC_TRUE, NULL, NULL},
-
-#define	READBUFFSIZE (PUBLIC + 1)
-	{"ReadBufferSize", cim_false, uint64, NULL, NULL, NFS_READBUFFSIZE},
-
-#define	READONLY (READBUFFSIZE + 1)
-	{"ReadOnly", cim_false, boolean, NFS_READONLY_TRUE, NFS_READONLY_FALSE,
-	NULL},
-
-#define	REPLRESOURCES (READONLY + 1)
-	{"ReplicatedResources", cim_false, string_array, NULL, NULL, NULL},
-
-#define	RETRANSTIMEO (REPLRESOURCES + 1)
-	{"RetransmissionTimeout", cim_false, uint32, NULL, NULL,
-	NFS_RETRANSTIMEO},
-
-#define	FOREGROUND (RETRANSTIMEO + 1)
-	{"RetryInForeground", cim_false, boolean, NFS_FOREGROUND_TRUE,
-	NFS_FOREGROUND_FALSE, NULL},
-
-#define	SECMODE (FOREGROUND + 1)
-	{"SecurityMode", cim_false, string, NULL, NULL, NFS_SECMODE},
-
-#define	SERVERCOMMPORT (SECMODE + 1)
-	{"ServerCommunicationPort", cim_false, uint32, NULL, NULL,
-	NFS_SERVERCOMMPORT},
-
-#define	SERVERNAME (SERVERCOMMPORT + 1)
-	{"ServerName", cim_false, string, NULL, NULL, NULL},
-
-#define	SERVERPATH (SERVERNAME + 1)
-	{"ServerPath", cim_false, string, NULL, NULL, NULL},
-
-#define	VERS (SERVERPATH + 1)
-	{"Version", cim_false, string, NULL, NULL, NFS_VERS},
-
-#define	VFSTABENTRY (VERS + 1)
-	{"VfstabEntry", cim_false, boolean, NULL, NULL, NULL},
-
-#define	WRITEBUFFSIZE (VFSTABENTRY + 1)
-	{"WriteBufferSize", cim_false, uint64, NULL, NULL, NFS_WRITEBUFFSIZE},
-
-#define	XATTR (WRITEBUFFSIZE + 1)
-	{"Xattr", cim_false, boolean, NFS_XATTR_TRUE, NFS_XATTR_FALSE, NULL}
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_NFSMOUNT_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_NFSShareEntry.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1329 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "Solaris_NFSShareEntry.h"
-#include "nfs_keys.h"
-#include "nfs_providers_msgstrings.h"
-#include "nfs_provider_names.h"
-#include "messageStrings.h"
-#include "util.h"
-#include "common_functions.h"
-#include "createprop_methods.h"
-#include "libfsmgt.h"
-
-#define	COMMAND "Command"
-/*
- * Private method declarations
- */
-static CCIMInstanceList* create_shareEntry_inst_and_update_list(
-	CCIMObjectPath *nfsShare, CCIMInstanceList *shareEntInstList);
-static CCIMInstanceList* get_associated_nfsShare_instList(
-				CCIMObjectPath *sharePersistOP);
-static CCIMInstanceList* get_associated_sharePersist_instList(
-				CCIMObjectPath *nfsShareOP);
-static CCIMObjectPathList* get_associated_sharePersist_OPList(
-				CCIMObjectPath *nfsShareOP, int *errp);
-static CCIMObjectPath* get_Solaris_NFSShare_OP(char *nameKey);
-static CCIMInstance* get_Solaris_PersistentShare_Inst(char *path,
-				char *command);
-
-/*
- * Public methods
- */
-
-/*
- * Instance provider methods
- */
-
-/*
- * Method: cp_createInstance_Solaris_NFSShareEntry
- *
- * Description: This method is not supported.  It is not supported because in
- * order for a Solaris_NFSShareEntry association to exist a corresponding
- * Solaris_NFSShare and Solaris_PersistentShare must exist.
- *
- * Parameters:
- *	- CCIMObjectPath *hostedShareOP - An object path containing the name of
- *	the class of which to create an instance of.
- *      - CCIMInstance *pInst - Not used.
- *
- * Return Value:
- *	- Always returns NULL because the method is not supported.
- */
-/* ARGSUSED */
-CCIMObjectPath *
-cp_createInstance_Solaris_NFSShareEntry(CCIMObjectPath *pOP,
-	CCIMInstance *pInst) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSSHAREENT::CREATE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMObjectPath *)NULL);
-} /* cp_createInstance_Solaris_NFSShareEntry */
-
-/*
- * Method: cp_deleteInstance_Solaris_NFSShareEntry
- *
- * Description: This method is not supported.  It is not supported because in
- * order for it to be actually deleted the corresponding Solaris_NFSShare or
- * Solaris_PersistentShare would need to be deleted. That action is not
- * for this provider.
- *
- * Parameters:
- *      - CCIMObjectPath *pOP - An object path containing the
- *      information about the class of which to delete the instance of.
- *
- * Return Value:
- *      - Always returns cim_false because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_NFSShareEntry(CCIMObjectPath *pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSSHAREENT::DELETE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_deleteInstance_Solaris_NFSShareEntry */
-
-/*
- * Method: cp_enumInstances_Solaris_NFSShareEntry
- *
- * Description: Enumerates the instances of Solaris_NFSShareEntry on a host.
- * An instance of Solaris_NFSShareEntry is an association that links a share to
- * it's persistent share entry.
- *
- * Parameters:
- *      - CCIMObjectPath *pOP - An object path containing the name of
- *      the class of which to enumerate the instances of.
- *
- * Return Value:
- *      - A pointer to a list of Solaris_NFSShareEntry instances.
- *      - NULL if an error occurred or if there are no instances of
- *      Solaris_NFSShareEntry on the host.  In the case of an error, the error
- *      will be logged.
- */
-
-CCIMInstanceList *
-cp_enumInstances_Solaris_NFSShareEntry(CCIMObjectPath *pOP) {
-	CCIMInstanceList	*shareEntryInstList;
-	CCIMObjectPathList	*nfsShareOPList;
-	CCIMObjectPathList	*currentShareOP;
-	CCIMObjectPath		*nfsShareOP;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareOP = cim_createEmptyObjectPath(SOLARIS_NFSSHARE);
-	if (nfsShareOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CREATE_EMPTY_OBJPATH_FAILURE, ex,
-			&err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareOPList = cimom_enumerateInstanceNames(nfsShareOP, cim_false);
-
-	/*
-	 * A NULL return value means error, an empty list does not.
-	 */
-	if (nfsShareOPList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CIMOM_ENUM_INSTNAMES_FAILURE, ex, &err);
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	cim_freeObjectPath(nfsShareOP);
-
-	if (nfsShareOPList->mDataObject == NULL) {
-		cim_freeObjectPathList(nfsShareOPList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	shareEntryInstList = cim_createInstanceList();
-	if (shareEntryInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		cim_freeObjectPathList(nfsShareOPList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	for (currentShareOP = nfsShareOPList; currentShareOP != NULL;
-		currentShareOP = currentShareOP->mNext) {
-
-		shareEntryInstList = create_shareEntry_inst_and_update_list(
-			currentShareOP->mDataObject, shareEntryInstList);
-		if (shareEntryInstList == NULL) {
-			cim_freeObjectPathList(nfsShareOPList);
-			return ((CCIMInstanceList *)NULL);
-		}
-	}
-
-	cim_freeObjectPathList(nfsShareOPList);
-	return (shareEntryInstList);
-} /* cp_enumInstances_Solaris_NFSShareEntry */
-
-/*
- * Method: cp_enumInstanceNames_Solaris_NFSShareEntry
- *
- * Description: Enumerates all of the instances of Solaris_NFSShareEntry on the
- * host.
- *
- * Parameters:
- *	- CCIMObjectPath* pOP - An object path containing the name of the
- *	class of which to enumerate instances of.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFSShareEntry object paths.
- *	- NULL if an error occurred or if there are no NFS mounts on the host.
- *	In the case of an error, the error will be logged.
- */
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_NFSShareEntry(CCIMObjectPath *pOP) {
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*OPList;
-	int			err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCENAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_NFSShareEntry(pOP);
-	if (instList == NULL) {
-		/*
-		 * Either an error occurred or we don't have any
-		 * Solaris_NFSShareEntry instances on the host.
-		 */
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	OPList = cim_createObjectPathList(instList);
-
-	cim_freeInstanceList(instList);
-	return (OPList);
-} /* cp_enumInstanceNames_Solaris_NFSShareEntry */
-
-/*
- * Method: cp_execQuery_Solaris_NFSShareEntry
- *
- * Description: Queries the Solaris_NFSShareEntry instances on the host to find
- * those that meet the search criteria.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of
- *	the class of which to query.
- *	- char *selectClause - Not used.
- *	- char *nonJoinExp - Not used.
- *	- char *queryExp - Not used.
- *	- char *queryLang - Not used.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFSShareEntry instances that match the
- *	criteria.
- *	- NULL if an error occurred or if there are no Solaris_NFSShareEntry
- *	instances that match the criteria.  In the case of an error, the error
- *	will be logged.
- *
- * NOTE: Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_execQuery_Solaris_NFSShareEntry(CCIMObjectPath *pOP, char *selectClause,
-	char *nonJoinExp, char *queryExp, char *queryLang) {
-
-	CCIMInstance		*emptyInst;
-	CCIMInstanceList	*shareEntryInstList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_NFSSHAREENT::EXEC_QUERY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	shareEntryInstList = cp_enumInstances_Solaris_NFSShareEntry(pOP);
-	if (shareEntryInstList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::EXEC_QUERY",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstanceList(shareEntryInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	shareEntryInstList = cim_prependInstance(shareEntryInstList,
-		emptyInst);
-	if (shareEntryInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::EXEC_QUERY",
-			CIM_ERR_FAILED, PREPEND_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstance(emptyInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (shareEntryInstList);
-} /* cp_execQuery_Solaris_NFSShareEntry */
-
-/*
- * Method: cp_getInstance_Solaris_NFSShareEntry
- *
- * Description: Gets the instance corresponding to the Solaris_NFSShareEntry
- * object path passed in.
- *
- * Parameters:
- *      - CCIMObjectPath* pOP - An object path containing all the keys of
- *      the instance that is supposed to be returned.
- *
- * Returns:
- *	- A pointer to the Solaris_NFSShareEntry instance corresponding to the
- *	object path parameter.
- *	- NULL if an error occurred or if the instance doesn't exist.  In the
- *	case of an error, the error will be logged.
- */
-CCIMInstance *
-cp_getInstance_Solaris_NFSShareEntry(CCIMObjectPath *pOP) {
-	CCIMInstanceList	*instList;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*setOP;
-	CCIMObjectPath		*elemOP;
-	CCIMPropertyList	*shareEntPropList;
-	int			err = 0;
-
-	if (pOP == NULL || pOP->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSSHAREENT::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Determine if the key values are populated.
-	 */
-	shareEntPropList = pOP->mKeyProperties;
-	setOP = util_getKeyValue(shareEntPropList, shareEntProps[SETTING].type,
-		shareEntProps[SETTING].name, &err);
-	elemOP = util_getKeyValue(shareEntPropList, shareEntProps[ELEMENT].type,
-		shareEntProps[ELEMENT].name, &err);
-
-	if (setOP == NULL || elemOP == NULL ||
-		setOP->mKeyProperties == NULL ||
-		elemOP->mKeyProperties == NULL) {
-
-		util_handleError("SOLARIS_NFSSHAREENT::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_NFSShareEntry(pOP);
-	if (instList == NULL) {
-		/*
-		 * Either an error occurred or we simply don't have any
-		 * instances of Solaris_NFSShareEntry on the system.  In the
-		 * case that an error occurred, it will be handled in
-		 * cp_enumInstances_Solaris_NFSShareEntry.
-		 */
-		return ((CCIMInstance *)NULL);
-	}
-
-	inst = cim_getInstance(instList, pOP);
-
-	cim_freeInstanceList(instList);
-	return (inst);
-} /* cp_getInstance_Solaris_NFSShareEntry */
-
-/*
- * Method: cp_setInstance_Solaris_NFSShareEntry
- *
- * Description: This method is not supported.  This is not allowed because in
- * order to change the properties a Solaris_NFSShareEntry on the host, the
- * Solaris_NFSShare and Solaris_PersistentShare must most likely be changed.
- * In order to change the associated objects, they need to be changed in those
- * providers and not this one.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of the class
- *	of which to set the instance.
- *	- CCIMInstance *pInst - Not used.
- *
- * Returns:
- *	- cim_false is returned every time since the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_NFSShareEntry(CCIMObjectPath *pOP, CCIMInstance *pInst) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSSHAREENT::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstance_Solaris_NFSShareEntry */
-
-/*
- * Method: cp_setInstanceWithList_Solaris_NFSShareEntry
- *
- * Description: This method is not supported.  This is not allowed because in
- * order to change the properties a Solaris_NFSShareEntry on the host, the
- * Solaris_NFSShare and Solaris_PersistentShare must most likely be changed.
- * In order to change the associated objects, they need to be changed in those
- * providers and not this one.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of the class
- *	of which to set the instance.
- *	- CCIMInstance *pInst - Not used.
- *
- * Returns:
- *	- cim_false is returned every time since the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_NFSShareEntry(CCIMObjectPath *pOP,
-	CCIMInstance *pInst, char **props, int num_props) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSSHAREENT::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstanceWithList_Solaris_NFSShareEntry */
-
-/*
- * Association provider methods
- */
-
-/*
- * Method: cp_associators_Solaris_NFSShareEntry
- *
- * Description: Returns the instances associated, via the Solaris_NFSShareEntry
- * association, to the pObjectName parameter.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing the name of
- *	the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path containing information
- *	(Class Name, Key Properties) about the object whose associated objects
- *	are to be returned.
- *	- char *pResultClass - If specified, only return instances that are of
- *	this class type.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *	- char *pResultRole - If specified, only return instances that are
- *	playing this role in the association.
- *
- * Returns:
- *	- A pointer to a list of Solaris_PersistentShare (if pRole ==
- *	Element && pObjectName is a Solaris_NFSShare object path) or
- *	Solaris_NFSShare (if pRole == Setting && pObjectName is a
- *	Solaris_PersistentShare object path) instances which are associated to
- *	the pObjectName parameter.
- *	- NULL if an error occurred or if there are no instances associated to
- *	the pObjectName passed in.  In the case of an error, the error will be
- *	logged.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_NFSShareEntry(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*returnInstList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSSHAREENT::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Determine whether pObjectname is the Element or the Setting of the
-	 * association.  Element = Solaris_NFSShare,
-	 * Setting = Solaris_PersistentShare.
-	 */
-	if (strcasecmp(pObjectName->mName, SOLARIS_NFSSHARE) == 0) {
-		if (pRole != NULL && (strcasecmp(pRole,
-			shareEntProps[ELEMENT].name) != 0)) {
-
-			util_handleError("SOLARIS_NFSSHAREENT::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		returnInstList = get_associated_sharePersist_instList(
-			pObjectName);
-	} else if (strcasecmp(pObjectName->mName, SOLARIS_PERSISTSHARE) == 0) {
-		if (pRole != NULL && (strcasecmp(pRole,
-			shareEntProps[SETTING].name) != 0)) {
-
-			util_handleError("SOLARIS_NFSSHAREENT::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		returnInstList = get_associated_nfsShare_instList(pObjectName);
-	} else {
-		util_handleError("SOLARIS_NFSSHAREENT::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (returnInstList);
-} /* cp_associators_Solaris_NFSShareEntry */
-
-/*
- * Method: cp_associatorNames_Solaris_NFSShareEntry
- *
- * Description: Returns the object paths of the instances on the other side of
- * the association which are associated via the Solaris_NFSShareEntry
- * association and having the passed in parameter, pObjectName, as the
- * opposite key.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pResultClass - If specified, only return instances that are of
- *	this class type.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *	- char *pResultRole - If specified, only return instances that are
- *	playing this role in the association.
- *
- * Returns:
- *	- A pointer to a list of Solaris_PersistentShare (if pRole ==
- *	Element && pObjectName is a Solaris_NFSShare object path) or
- *	Solaris_NFSShare (if pRole == Setting && pObjectName is a
- *	Solaris_PersistentShare object path) object paths which are associated
- *	to the pObjectName parameter.
- *	- NULL if an error occurred or if there are no instances associated to
- *	the pObjectName passed in.  In the case of an error, the error will be
- *	logged.
- */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_NFSShareEntry(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSSHAREENT::ASSOCIATOR_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList = cp_associators_Solaris_NFSShareEntry(pAssocName, pObjectName,
-		pResultClass, pRole, pResultRole);
-	if (instList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	objPathList = cim_createObjectPathList(instList);
-
-	cim_freeInstanceList(instList);
-
-	return (objPathList);
-} /* cp_associatorNames_Solaris_NFSShareEntry */
-
-/*
- * Method: cp_references_Solaris_NFSShareEntry
- *
- * Description: Returns the Solaris_NFSShareEntry instances that have the
- * passed in parameter, pObjectName, as one of it's keys.
- *
- * Parameters:
- *      - CCIMObjectPath *pAssocName - An object path containing information
- *      about the association that the caller is trying to reach.
- *      - CCIMObjectPath *pObjectName - The object path which contains the
- *      information on whose associated objects are to be returned.
- *      - char *pRole - If specified, this is the role of the pObjectName
- *      object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *      - A pointer to a list of Solaris_NFSShareEntry instances.
- *      - NULL if an error occurred or if there are no Solaris_NFSShareEntry
- *      instances having pObjectName as one of it's keys.
- */
-CCIMInstanceList *
-cp_references_Solaris_NFSShareEntry(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSSHAREENT::REFERENCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Get everything that is related to the pObjectName passed in.
-	 */
-	objPathList = cp_associatorNames_Solaris_NFSShareEntry(
-		pAssocName, pObjectName, NULL, pRole, NULL);
-	if (objPathList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Determine whether pObjectname is the Element or the Setting of the
-	 * association.  Element = Solaris_NFSShare,
-	 * Setting = Solaris_PersistentShare.
-	 */
-
-	if (strcasecmp(pObjectName->mName, SOLARIS_NFSSHARE) == 0) {
-		instList = create_association_instList(SOLARIS_NFSSHAREENT,
-			pObjectName, shareEntProps[ELEMENT].name, objPathList,
-			shareEntProps[SETTING].name, &err);
-	} else {
-		instList = create_association_instList(SOLARIS_NFSSHAREENT,
-			pObjectName, shareEntProps[SETTING].name, objPathList,
-			shareEntProps[ELEMENT].name, &err);
-	}
-	cim_freeObjectPathList(objPathList);
-
-	return (instList);
-} /* cp_references_Solaris_NFSShareEntry */
-
-/*
- * Method: cp_referenceNames_Solaris_NFSShareEntry
- *
- * Description: Returns the Solaris_NFSShareEntry object paths of the instances
- * that have the passed in parameter, pObjectName, as one of it's keys.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFSShareEntry object paths.
- *	- NULL if an error occurred or if there are no Solaris_NFSShareEntry
- *	instances having pObjectName as one of it's keys.
- */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_NFSShareEntry(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*shareEntryInstList;
-	CCIMObjectPathList	*shareEntryOPList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSSHAREENT::REFERENCE_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	shareEntryInstList = cp_references_Solaris_NFSShareEntry(pAssocName,
-		pObjectName, pRole);
-
-	if (shareEntryInstList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	shareEntryOPList = cim_createObjectPathList(shareEntryInstList);
-
-	cim_freeInstanceList(shareEntryInstList);
-
-	return (shareEntryOPList);
-} /* cp_referenceNames_Solaris_NFSShareEntry */
-
-/*
- * Property provider methods
- */
-
-/*
- * Method: cp_getProperty_Solaris_NFSShareEntry
- *
- * Description: Retrieves a certain property from the instance of
- * Solaris_NFSShareEntry on the host that is described by the parameter pOP.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - The object path containing all the
- *	information needed to find the instance in which the property is to
- *	be returned.
- *	- cimchar *pPropName - The name of the property to be found.
- *
- * Returns:
- *	- A pointer to the property corresponding to the name passed in with
- *	pPropName.
- *	- NULL if an error occurred or if the property doesn't exist.  In the
- *	case of an error, the error will be logged.
- */
-CCIMProperty *
-cp_getProperty_Solaris_NFSShareEntry(CCIMObjectPath *pOP, cimchar *pPropName) {
-	CCIMInstance	*shareEntryInst;
-	CCIMProperty	*shareEntryProp;
-	int		err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_NFSSHAREENT::GET_PROPERTY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	shareEntryInst = cp_getInstance_Solaris_NFSShareEntry(pOP);
-	if (shareEntryInst == NULL) {
-		return ((CCIMProperty *)NULL);
-	}
-
-	shareEntryProp = cim_getProperty(shareEntryInst, pPropName);
-	cim_freeInstance(shareEntryInst);
-
-	return (shareEntryProp);
-} /* cp_getProperty_Solaris_NFSShareEntry */
-
-/*
- * Method: cp_setProperty_Solaris_NFSShareEntry
- *
- * Description: This method is not supported.  This is not allowed because in
- * order to change the properties a Solaris_NFSShareEntry on the host, the
- * Solaris_NFSShare and Solaris_PersistentShare must most likely be changed.
- * In order to change the associated objects, they need to be changed in those
- * providers and not this one.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - Not used.
- *	- CCIMProperty *pProp - Not used.
- *
- * Returns:
- *	- cim_false is returned every time since the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_NFSShareEntry(CCIMObjectPath *pOP, CCIMProperty *pProp) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSSHAREENT::SET_PROPERTY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setProperty_Solaris_NFSShareEntry */
-
-/*
- * Method provider methods
- */
-
-/*
- * Method: cp_invokeMethod_Solaris_NFSShareEntry
- *
- * Description: This method is not supported because the provider doesn't have
- * any methods.
- *
- * Parameters:
- *	- CCIMObjectPath* op - Not used.
- *	- cimchar* methodName - Not used.
- *	- CCIMPropertyList* inParams - Not used.
- *	- CCIMPropertyList* outParams - Not used.
- *
- * Return Value:
- *	- Always returns null because the method is not supported.
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_NFSShareEntry(CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams) {
-
-	return ((CCIMProperty *)NULL);
-} /* cp_invokeMethod_Solaris_NFSShareEntry */
-
-/*
- * Private methods
- */
-
-/*
- * Method: create_shareEntry_inst_and_update_list
- *
- */
-static CCIMInstanceList *
-create_shareEntry_inst_and_update_list(CCIMObjectPath *nfsShareOP,
-	CCIMInstanceList *shareEntInstList) {
-
-	CCIMObjectPathList	*sharePersistOPList;
-	CCIMObjectPathList	*currentPersistShareOP;
-	CCIMInstance		*shareEntryInst;
-	CCIMException		*ex;
-	int			err = 0;
-
-	shareEntryInst = cim_createInstance(SOLARIS_NFSSHAREENT);
-	if (shareEntryInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex,
-			&err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Retrieve all of the Solaris_PersistentShare object paths
-	 * associated with the current Solaris_NFSShare object path.
-	 *
-	 * NOTE: Although it is wrong, and we can't control it since
-	 * /etc/dfs/dfstab is a editable file, there may be multiple
-	 * dfstab entries for one nfs share.
-	 */
-	sharePersistOPList = get_associated_sharePersist_OPList(nfsShareOP,
-		&err);
-	if (sharePersistOPList == NULL) {
-		if (err != 0) {
-			cim_freeInstance(shareEntryInst);
-			return ((CCIMInstanceList *)NULL);
-		}
-		cim_freeInstance(shareEntryInst);
-		return (shareEntInstList);
-	}
-
-	for (currentPersistShareOP = sharePersistOPList;
-		currentPersistShareOP != NULL;
-		currentPersistShareOP = currentPersistShareOP->mNext) {
-		/*
-		 * Add the properties to the Solaris_NFSShareEntry
-		 * instance.
-		 */
-		if (add_property_to_instance(shareEntProps[SETTING].name,
-			shareEntProps[SETTING].type, NULL,
-			currentPersistShareOP->mDataObject,
-			shareEntProps[SETTING].isKey, shareEntryInst)
-			== cim_false) {
-
-			cim_freeObjectPathList(sharePersistOPList);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		if (add_property_to_instance(shareEntProps[ELEMENT].name,
-			shareEntProps[ELEMENT].type, NULL, nfsShareOP,
-			shareEntProps[ELEMENT].isKey, shareEntryInst)
-			== cim_false) {
-
-			cim_freeObjectPathList(sharePersistOPList);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		shareEntInstList = cim_addInstance(shareEntInstList,
-			shareEntryInst);
-		if (shareEntInstList == NULL) {
-			ex = cim_getLastError();
-			util_handleError("SOLARIS_NFSSHAREENT::ENUM_INSTANCES",
-				CIM_ERR_FAILED, ADD_INSTANCE_FAILURE,
-				ex, &err);
-			cim_freeInstance(shareEntryInst);
-			return ((CCIMInstanceList *)NULL);
-		}
-	}
-
-	return (shareEntInstList);
-} /* create_shareEntry_inst_and_update_list */
-
-/*
- * Method: get_associated_nfsShare_instList
- *
- * Description: Finds the Solaris_NFSShare instances that are associated to
- * the passed in Solaris_PersistentShare object path.
- *
- * Parameters:
- *	- CCIMObjectPath *sharePersistOP - The Solaris_PersistentShare object
- *	path that is to be used to find the associated Solaris_NFSShare
- *	instances.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFSShare instances that are associated
- *	to the Solaris_PersistentShare object path, sharePersistOP, passed in.
- *	- NULL if an error occurred or if there are no Solaris_NFSShare
- *	instances associated to the Solaris_PersistentShare object path.  In
- *	the case of an error, the error will be logged.
- */
-static CCIMInstanceList *
-get_associated_nfsShare_instList(CCIMObjectPath *sharePersistOP) {
-	CCIMInstanceList	*nfsShareInstList;
-	CCIMInstance		*nfsShareInst;
-	CCIMObjectPath		*nfsShareOP;
-	CCIMException		*ex;
-	char			*settingId;
-	int			err = 0;
-
-	settingId = util_getKeyValue(sharePersistOP->mKeyProperties, string,
-		SETTING_ID, &err);
-	if (settingId == NULL || err != 0) {
-		util_handleError(
-			"SOLARIS_NFSSHAREENT::GET_ASSOC_SHARE_INSTLIST",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareInstList = cim_createInstanceList();
-	if (nfsShareInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-			"SOLARIS_NFSSHAREENT::GET_ASSOC_SHARE_INSTLIST",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareOP = get_Solaris_NFSShare_OP(settingId);
-	if (nfsShareOP == NULL) {
-		/*
-		 * An error occurred in get_Solaris_NFSShare_OP and was
-		 * handled there.
-		 */
-		cim_freeInstanceList(nfsShareInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareInst = cimom_getInstance(nfsShareOP, cim_false, cim_false,
-		cim_false, cim_false, NULL, 0);
-
-	cim_freeObjectPath(nfsShareOP);
-	/*
-	 * A NULL return value indicates an error, an empty instance does not.
-	 */
-	if (nfsShareInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-			"SOLARIS_NFSSHAREENT::GET_ASSOC_SHARE_INSTLIST",
-			CIM_ERR_FAILED, CIMOM_GET_INST_FAILURE, ex, &err);
-		cim_freeInstanceList(nfsShareInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	if (nfsShareInst->mProperties == NULL) {
-		cim_freeInstanceList(nfsShareInstList);
-		cim_freeInstance(nfsShareInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Work around for cimom bug 4649100.
-	 */
-	if (!set_share_keyProperties_to_true(nfsShareInst)) {
-		/*
-		 * Key values not found
-		 */
-		cim_logDebug(
-			"get_associated_nfsShareSec_instList",
-			"No keyProprties found, should return error here");
-		cim_freeInstance(nfsShareInst);
-		cim_freeInstanceList(nfsShareInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareInstList = cim_addInstance(nfsShareInstList, nfsShareInst);
-	if (nfsShareInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-			"SOLARIS_NFSSHAREENT::GET_ASSOC_SHARE_INSTLIST",
-			CIM_ERR_FAILED, ADD_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstance(nfsShareInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (nfsShareInstList);
-} /* get_associated_nfsShare_instList */
-
-/*
- * Method: get_associated_sharePersist_instList
- *
- * Description:  Finds the Solaris_PersistentShare instances that are
- * associated to the passed in Solaris_NFSShare object path.
- *
- * Parameters:
- *	- CCIMObjectPath *nfsShareOP - The Solaris_NFSShare object path that is
- *	to be used to find the associated Solaris_PersistentShare instances.
- *
- * Returns:
- *	- A pointer to a list of Solaris_PersistentShare instances that are
- *	associated to the Solaris_NFSShare object path, nfsShareOP, passed in.
- *	NOTE: An instance list is returned rather than a single instance
- *	because it is possible (although unlikely) to have multiple
- *	/etc/dfs/dfstab entries per share.
- *	- NULL if an error occurred or if there are no Solaris_PersistentShare
- *	instances associated to the Solaris_NFSShare object path.
- */
-static CCIMInstanceList *
-get_associated_sharePersist_instList(CCIMObjectPath *nfsShareOP) {
-	CCIMInstanceList	*sharePersistInstList = NULL;
-	CCIMException		*ex;
-	fs_dfstab_entry_t	dfstabEnt;
-	fs_dfstab_entry_t	tmpDfstabEnt;
-	char			*name;
-	int			err = 0;
-
-	name = util_getKeyValue(nfsShareOP->mKeyProperties, string, NAME, &err);
-	if (name == NULL || err != 0) {
-		util_handleError("SOLARIS_NFSSHAREENT::GET_ASSOC_SP_INSTLIST",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	sharePersistInstList = cim_createInstanceList();
-	if (sharePersistInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::GET_ASSOC_SP_INSTLIST",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	dfstabEnt = fs_get_DFStab_ents(&err);
-	if (dfstabEnt == NULL) {
-		/*
-		 * Check if an error occurred or if there just weren't any
-		 * /etc/dfs/dfstab entries.
-		 */
-		if (err != 0) {
-			util_handleError(
-				"SOLARIS_NFSSHAREENT::GET_ASSOC_SP_INSTLIST",
-				CIM_ERR_FAILED, FS_GET_DFSTAB_ENT_FAILURE,
-				NULL, &err);
-			cim_freeInstanceList(sharePersistInstList);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	for (tmpDfstabEnt = dfstabEnt; tmpDfstabEnt != NULL;
-		tmpDfstabEnt = fs_get_DFStab_ent_Next(tmpDfstabEnt)) {
-		char    *path;
-		char	*fstype;
-		char	*command;
-
-		err = 0;
-		path = fs_get_DFStab_ent_Path(tmpDfstabEnt);
-		fstype = fs_get_DFStab_ent_Fstype(tmpDfstabEnt);
-		command = fs_get_Dfstab_share_cmd(tmpDfstabEnt, &err);
-
-		/*
-		 * Compare the dfstab entry to the nfs share.  Do this by first
-		 * checking if the fstype is "nfs" and second by checking
-		 * if the path is the same.
-		 */
-		if ((strcasecmp(fstype, NFS) == 0) &&
-			(strcmp(path, name) == 0)) {
-
-			CCIMInstance	*sharePersistInst;
-
-			/*
-			 * We can't just call Solaris_PersistentShare's
-			 * cp_getInstance method because there is a chance that
-			 * multiple dfstab entries having the same path.  If
-			 * this is the case, that method will return null and
-			 * some sort of "key not unique" error.
-			 */
-			sharePersistInst = get_Solaris_PersistentShare_Inst(
-				path, command);
-			if (sharePersistInst == NULL) {
-				/*
-				 * An error occurred and it was handled in
-				 * get_sharePersist_Inst.
-				 */
-				fs_free_DFStab_ents(dfstabEnt);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			sharePersistInstList = cim_addInstance(
-				sharePersistInstList, sharePersistInst);
-			if (sharePersistInstList == NULL) {
-			    ex = cim_getLastError();
-			    util_handleError(
-				"SOLARIS_NFSSHAREENT::GET_ASSOC_SP_INSTLIST",
-				CIM_ERR_FAILED, ADD_INSTANCE_FAILURE, ex, &err);
-			    cim_freeInstance(sharePersistInst);
-			    fs_free_DFStab_ents(dfstabEnt);
-			    return ((CCIMInstanceList *)NULL);
-			}
-		}
-	}
-
-	fs_free_DFStab_ents(dfstabEnt);
-	return (sharePersistInstList);
-} /* get_associated_sharePersist_instList */
-
-/*
- * Method: get_associated_sharePersist_OPList
- *
- * Description:  Finds the Solaris_PersistentShare object paths that are
- * associated to the passed in Solaris_NFSShare object path.
- *
- * Parameters:
- *	- CCIMObjectPath *nfsShareOP - The Solaris_NFSShare object path of
- *	of which to retrieve the associated Solaris_PersistentShare object
- *	paths.
- *
- * Returns:
- *	- A pointer to a list of Solaris_PersistentShare object paths that are
- *	associated to the passed in Solaris_NFSShare object path.
- *      - Upon error, NULL is returned and the error is logged.
- *
- * Returns:
- */
-static CCIMObjectPathList *
-get_associated_sharePersist_OPList(CCIMObjectPath *nfsShareOP, int *errp) {
-	CCIMInstanceList	*sharePersistInstList;
-	CCIMObjectPathList	*sharePersistOPList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	sharePersistInstList = get_associated_sharePersist_instList(nfsShareOP);
-	if (sharePersistInstList == NULL) {
-		/*
-		 * An error occurred in get_associated_sharePersist_InstList
-		 * and was handled in that function.
-		 */
-		*errp = -1;
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	sharePersistOPList = cim_createObjectPathList(sharePersistInstList);
-	if (sharePersistOPList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::GET_ASSOC_SP_OPLIST",
-			CIM_ERR_FAILED, CREATE_OBJECT_LIST_FAILURE, ex, &err);
-		cim_freeInstanceList(sharePersistInstList);
-		*errp = -1;
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	cim_freeInstanceList(sharePersistInstList);
-	return (sharePersistOPList);
-} /* get_associated_sharePersist_OPList */
-
-/*
- * Method: get_Solaris_NFSShare_OP
- *
- * Description:
- *
- * Parameters:
- *
- * Returns:
- */
-static CCIMObjectPath *
-get_Solaris_NFSShare_OP(char *nameKey) {
-	CCIMObjectPath		*nfsShareOP;
-	CCIMPropertyList	*nfsShareKeyPropList;
-	CCIMException		*ex;
-	char			*sysName;
-	int			err = 0;
-
-	nfsShareOP = cim_createEmptyObjectPath(SOLARIS_NFSSHARE);
-	if (nfsShareOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::GET_NFSSHARE_OP",
-			CIM_ERR_FAILED, CREATE_EMPTY_OBJPATH_FAILURE, ex,
-			&err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	sysName = (cimchar *)sys_get_hostname(&err);
-	if (sysName == NULL) {
-		util_handleError("SOLARIS_NFSSHAREENT::GET_NFSSHARE_OP",
-			CIM_ERR_FAILED, GET_HOSTNAME_FAILURE, NULL, &err);
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	/*
-	 * Create the property list which to add all the key properties to and
-	 * which will be added to the object path.
-	 */
-	nfsShareKeyPropList = cim_createPropertyList();
-	if (nfsShareKeyPropList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::GET_NFSSHARE_OP",
-			CIM_ERR_FAILED, CREATE_PROPLIST_FAILURE, ex, &err);
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	/*
-	 * add_property_to_list parameters are as follows:
-	 * 1.) property name (cimchar *),
-	 * 2.) property type (CIMType),
-	 * 3.) property value (cimchar *),
-	 * 4.) property object path for reference properties (CCIMObjectPath *),
-	 * 5.) is property a key? (CIMBool),
-	 * 6.) property list to add the property to (CCIMPropertyList *).
-	 */
-	nfsShareKeyPropList = add_property_to_list(NAME, string, nameKey,
-		NULL, cim_true, nfsShareKeyPropList);
-	if (nfsShareKeyPropList == NULL) {
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfsShareKeyPropList = add_property_to_list(CREATION_CLASS, string,
-		SOLARIS_NFSSHARE, NULL, cim_true, nfsShareKeyPropList);
-	if (nfsShareKeyPropList == NULL) {
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfsShareKeyPropList = add_property_to_list(SYS_CREATION_CLASS, string,
-		COMPUTER_SYSTEM, NULL, cim_true, nfsShareKeyPropList);
-	if (nfsShareKeyPropList == NULL) {
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfsShareKeyPropList = add_property_to_list(SYSTEM, string, sysName,
-		NULL, cim_true, nfsShareKeyPropList);
-	if (nfsShareKeyPropList == NULL) {
-		free(sysName);
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMObjectPath *)NULL);
-	}
-	free(sysName);
-
-	nfsShareOP = cim_addPropertyListToObjectPath(nfsShareOP,
-		nfsShareKeyPropList);
-	if (nfsShareOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::GET_NFSSHARE_OP",
-			CIM_ERR_FAILED, ADD_PROP_TO_OBJPATH_FAILURE, ex, &err);
-		cim_freePropertyList(nfsShareKeyPropList);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	return (nfsShareOP);
-} /* get_Solaris_NFSShare_OP */
-
-/*
- * Method: get_Solaris_PersistentShare_Inst
- *
- * Description: Creates an instance of the Solaris_PersistentShare class.
- *
- * Parameters:
- *	- char *path - The value to be used for the SettingID property.
- *	- char *command - The value to be used for the Command property.
- *
- * Returns:
- *	- A pointer to a Solaris_PersistentShare instance.
- *	- Upon error, NULL is returned and the error is logged.
- */
-static CCIMInstance *
-get_Solaris_PersistentShare_Inst(char *path, char *command) {
-	CCIMInstance	*sharePersistInst;
-	CCIMException	*ex;
-	cimchar		*sysName;
-	int		err = 0;
-
-	sysName = (cimchar *)sys_get_hostname(&err);
-	if (sysName == NULL) {
-		util_handleError("SOLARIS_NFSSHAREENT::GET_SHAREPERSIST_INST",
-			CIM_ERR_FAILED, GET_HOSTNAME_FAILURE, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	sharePersistInst = cim_createInstance(SOLARIS_PERSISTSHARE);
-	if (sharePersistInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHAREENT::GET_SHAREPERSIST_INST",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * add_property_to_instance parameters are as follows:
-	 * 1.) property name (cimchar *),
-	 * 2.) property type (CIMType),
-	 * 3.) property value (cimchar *),
-	 * 4.) property object path for reference properties (CCIMObjectPath *),
-	 * 5.) is property a key? (CIMBool),
-	 * 6.) instance to add the property to (CCIMInstance *).
-	 */
-	if (add_property_to_instance(CREATION_CLASS, string,
-		SOLARIS_PERSISTSHARE, NULL, cim_true, sharePersistInst)
-		== cim_false) {
-
-		cim_freeInstance(sharePersistInst);
-		return ((CCIMInstance *)NULL);
-	}
-
-	if (add_property_to_instance(SYS_CREATION_CLASS, string,
-		COMPUTER_SYSTEM, NULL, cim_true, sharePersistInst)
-		== cim_false) {
-
-		cim_freeInstance(sharePersistInst);
-		return ((CCIMInstance *)NULL);
-	}
-
-	if (add_property_to_instance(SETTING_ID, string, path,
-		NULL, cim_true, sharePersistInst) == cim_false) {
-
-		cim_freeInstance(sharePersistInst);
-		return ((CCIMInstance *)NULL);
-	}
-
-	if (add_property_to_instance(SYSTEM, string, sysName,
-		NULL, cim_true, sharePersistInst) == cim_false) {
-
-		free(sysName);
-		cim_freeInstance(sharePersistInst);
-		return ((CCIMInstance *)NULL);
-	}
-	free(sysName);
-
-	if (add_property_to_instance(COMMAND, string, command,
-		NULL, cim_false, sharePersistInst) == cim_false) {
-
-		cim_freeInstance(sharePersistInst);
-		return ((CCIMInstance *)NULL);
-	}
-
-	return (sharePersistInst);
-} /* get_Solaris_PersistentShare_Inst */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_NFSShareEntry.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_NFSSHAREENTRY_H
-#define	_SOLARIS_NFSSHAREENTRY_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Public data type declaration
- */
-
-#include <cimapi.h>
-#include <cimomhandle.h>
-#include "nfsprov_include.h"
-
-#define	PROPCOUNT 2
-
-static nfs_prov_prop_t shareEntProps[] = {
-#define	ELEMENT 0
-	{"Element", cim_true, reference},
-#define	SETTING (ELEMENT + 1)
-	{"Setting", cim_true, reference}
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_NFSSHAREENTRY_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_NFSShareSecurityModes.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1339 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <errno.h>
-#include "Solaris_NFSShareSecurityModes.h"
-#include "nfs_keys.h"
-#include "nfs_providers_msgstrings.h"
-#include "nfs_provider_names.h"
-#include "messageStrings.h"
-#include "util.h"
-#include "common_functions.h"
-#include "createprop_methods.h"
-#include "libfsmgt.h"
-
-
-/*
- * Private method declarations
- */
-
-static CCIMInstanceList		*get_associated_nfsShare_instList(
-				    CCIMObjectPath *nfsShareOP);
-static CCIMInstanceList		*get_associated_nfsShareSec_instList(
-				    CCIMObjectPath *nfsShareSecOP);
-static CCIMObjectPathList	*get_associated_nfsShareSec_OPList(
-				    CCIMObjectPath *nfsShareSecOP, int *err);
-static CCIMObjectPath		*get_Solaris_NFSShare_OP(char *nameKey);
-static CCIMObjectPath		*get_Solaris_NFSShareSec_OP(char *, char *);
-static CCIMInstanceList		*update_list_with_secMode_inst(
-				    CCIMObjectPath *nfsShareOP,
-				    CCIMInstanceList *shareSecModeInstList);
-
-/*
- * Public methods
- */
-/*
- * Instance provider methods
- */
-
-/*
- * Method: cp_createInstance_Solaris_NFSShareSecurityModes
- *
- * This method is not supported. In order for a Solaris_NFSShareSecurityModes
- * association to exist a corresponding Solaris_NFSShare and
- * Solaris_NFSShareSecurity must already exist.
- */
-/* ARGSUSED */
-CCIMObjectPath *
-cp_createInstance_Solaris_NFSShareSecurityModes(CCIMObjectPath *pOP,
-	CCIMInstance *pInst) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSSHARESECMODES::CREATE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMObjectPath *)NULL);
-} /* cp_createInstance_Solaris_NFSShareSecurityModes */
-
-/*
- * Method: cp_deleteInstance_Solaris_NFSShareSecurityModes
- *
- * This method is not supported. In order for a Solaris_NFSShareSecurityModes
- * association to be deleted a corresponding Solaris_NFSShare and
- * Solaris_NFSShareSecurity must be deleted. The Solaris_NFSShare and
- * Solaris_NFSShareSecurity should only be deleted through those providers.
- */
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_NFSShareSecurityModes(CCIMObjectPath *pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSSHARESECMODES::DELETE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_deleteInstance_Solaris_NFSShareSecurityModes */
-
-/*
- * Method: cp_enumInstances_Solaris_NFSShareSecurityModes
- *
- * Description: Enumerates the instances of Solaris_NFSShareSecurityModes
- * on a host. An instance of Solaris_NFSShareSecurityModes is an
- * association that links a share to it's share security entry.
- *
- * Parameters:
- *      - CCIMObjectPath *pOP - An object path containing the name of
- *      the class of which to enumerate the instances of.
- *
- * Return Value:
- *      - A pointer to a list of Solaris_NFSShareSecurityModes instances.
- *      - NULL if an error occurred or if there are no instances of
- *      Solaris_NFSShareSecurityModes on the host.  In the case of an
- *      error, the error will be logged.
- */
-
-CCIMInstanceList *
-cp_enumInstances_Solaris_NFSShareSecurityModes(CCIMObjectPath *pOP) {
-	CCIMInstanceList	*shareSecModeInstList;
-	CCIMObjectPathList	*nfsShareOPList;
-	CCIMObjectPathList	*tmpOPList;
-	CCIMObjectPath		*nfsShareOP;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_NFSSHARESECMODES::ENUM_INSTANCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareOP = cim_createEmptyObjectPath(SOLARIS_NFSSHARE);
-	if (nfsShareOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARESECMODES::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CREATE_EMPTY_OBJPATH_FAILURE, ex,
-			&err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareOPList = cimom_enumerateInstanceNames(nfsShareOP, cim_false);
-	if (nfsShareOPList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARESECMODES::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CIMOM_ENUM_INSTNAMES_FAILURE, ex, &err);
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	cim_freeObjectPath(nfsShareOP);
-
-
-	if (nfsShareOPList->mDataObject == NULL) {
-		cim_freeObjectPathList(nfsShareOPList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	shareSecModeInstList = cim_createInstanceList();
-	if (shareSecModeInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARESECMODES::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		cim_freeObjectPathList(nfsShareOPList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-
-	for (tmpOPList = nfsShareOPList; tmpOPList != NULL;
-	    tmpOPList = tmpOPList->mNext) {
-		shareSecModeInstList = update_list_with_secMode_inst(
-		    tmpOPList->mDataObject, shareSecModeInstList);
-		if (shareSecModeInstList == NULL) {
-			cim_freeObjectPathList(nfsShareOPList);
-			return ((CCIMInstanceList *)NULL);
-		}
-	}
-	cim_freeObjectPathList(nfsShareOPList);
-	return (shareSecModeInstList);
-} /* cp_enumInstances_Solaris_NFSShareSecurityModes */
-
-/*
- * Method: cp_enumInstanceNames_Solaris_NFSShareSecurityModes
- *
- * Description: Enumerates all of the instances of
- * Solaris_NFSShareSecurityModes on the host.
- *
- * Parameters:
- *      - CCIMObjectPath* pOP - An object path containing the name of the
- *      class of which to enumerate instances of.
- *
- * Returns:
- *      - A pointer to a list of Solaris_NFSShareSecurityModes object paths.
- *      - NULL if an error occurred or if there are no NFS mounts on the host.
- *      In the case of an error, the error will be logged.
- */
-
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_NFSShareSecurityModes(CCIMObjectPath *pOP) {
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*OPList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	/*
-	 * First check if pOP is null.
-	 */
-	if (pOP == NULL) {
-		util_handleError(
-		    "SOLARIS_NFSSHARESECMODES::ENUM_INSTANCENAMES",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_NFSShareSecurityModes(pOP);
-	if (instList == NULL) {
-		/*
-		 * Either an error occurred or we don't have any
-		 * Solaris_NFSShareSecurityModes instances on the host.
-		 */
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	OPList = cim_createObjectPathList(instList);
-	if (OPList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_NFSSHARESECMODES::ENUM_INSTANCENAMES",
-		    CIM_ERR_FAILED, CREATE_OBJECT_LIST_FAILURE, ex, &err);
-	}
-
-	cim_freeInstanceList(instList);
-	return (OPList);
-} /* cp_enumInstanceNames_Solaris_NFSShareSecurityModes */
-
-/*
- * Method: cp_execQuery_Solaris_NFSShareSecurityModes
- *
- * Description: Queries the Solaris_NFSShareSecurityModes instances on the
- * host to find those that meet the search criteria.
- *
- * Parameters:
- *      - CCIMObjectPath *pOP - An object path containing the name of
- *      the class of which to query.
- *      - char *selectClause - Not used.
- *      - char *nonJoinExp - Not used.
- *      - char *queryExp - Not used.
- *      - char *queryLang - Not used.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFSShareSecurityModes instances
- *	that match the search criteria.
- *	- NULL if an error occurred or if there are no
- *      Solaris_NFSShareSecurityModes instances matching the search criteria.
- *	in case of an error, the error will be logged.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_execQuery_Solaris_NFSShareSecurityModes(CCIMObjectPath *pOP,
-    char *selectClause, char *nonJoinExp, char *queryExp,
-    char *queryLang) {
-
-	CCIMInstance		*emptyInst;
-	CCIMInstanceList	*shareSecModeInstList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_NFSSHARESECMODES::EXEC_QUERY",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	shareSecModeInstList =
-	    cp_enumInstances_Solaris_NFSShareSecurityModes(pOP);
-	if (shareSecModeInstList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARESECMODES::EXEC_QUERY",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstanceList(shareSecModeInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	shareSecModeInstList = cim_prependInstance(shareSecModeInstList,
-		emptyInst);
-	if (shareSecModeInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARESECMODES::EXEC_QUERY",
-			CIM_ERR_FAILED, PREPEND_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstance(emptyInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (shareSecModeInstList);
-} /* cp_execQuery_Solaris_NFSShareSecurityModes */
-
-/*
- * Method: cp_getInstance_Solaris_NFSShareSecurityModes
- *
- * Description: Gets the instance corresponding to the
- * Solaris_NFSShareSecurityModes object path passed in.
- *
- * Parameters:
- *      - CCIMObjectPath* pOP - An object path containing all the keys of
- *      the instance that is supposed to be returned.
- *
- * Returns:
- *	- A pointer to the Solaris_NFSShareSecurityModes instance corresponding
- *	to the object path parameter.
- *	- NULL if an error occurred or if the instance doesn't exist. In the
- *	case of an error the error is logged.
- */
-CCIMInstance *
-cp_getInstance_Solaris_NFSShareSecurityModes(CCIMObjectPath *pOP) {
-	CCIMInstanceList	*instList;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*settingOP;
-	CCIMObjectPath		*elementOP;
-	CCIMPropertyList	*shareSecModesPropList;
-	int			err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_NFSSHARESECMODES::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Make sure the key values passed in are populated.
-	 */
-	shareSecModesPropList = pOP->mKeyProperties;
-	settingOP = util_getKeyValue(shareSecModesPropList,
-	    shareSecModeProps[SETTING].type, shareSecModeProps[SETTING].name,
-	    &err);
-	elementOP = util_getKeyValue(shareSecModesPropList,
-	    shareSecModeProps[ELEMENT].type, shareSecModeProps[ELEMENT].name,
-	    &err);
-
-	if (settingOP == NULL || elementOP == NULL ||
-	    settingOP->mKeyProperties == NULL ||
-	    elementOP->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSSHARESECMODES::GET_INSTANCE",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_NFSShareSecurityModes(pOP);
-	if (instList == NULL) {
-		/*
-		 * Either an error occurred or we simply don't have any
-		 * instances of Solaris_NFSShareSecurityModes on the system.
-		 * In the case that an error occurred, it will be handled in
-		 * cp_enumInstances_Solaris_NFSShareSecurityModes.
-		 */
-		return ((CCIMInstance *)NULL);
-	}
-
-	inst = cim_getInstance(instList, pOP);
-
-	cim_freeInstanceList(instList);
-	return (inst);
-} /* cp_getInstance_Solaris_NFSShareSecurityModes */
-
-/*
- * Method: cp_setInstance_Solaris_NFSShareSecurityModes
- *
- * Not Supported: Inorder to change the properties of a
- * Solaris_NFSShareSecurityModes instance on the host the Solaris_NFSShare and
- * Solaris_NFSShareSecurity instances would have to be changed. These changes
- * must be done in the providers for Solaris_NFSShare and
- * Solaris_NFSShareSecurity.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_NFSShareSecurityModes(CCIMObjectPath *pOP,
-    CCIMInstance *pInst, char **props, int num_props) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSSHAREDEFSECMODES::SET_INSTANCE",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstance_Solaris_NFSShareDefSecurityModes */
-
-/*
- * Method: cp_setInstanceWithList_Solaris_NFSShareSecurityModes
- *
- * Not Supported: Inorder to change the properties of a
- * Solaris_NFSShareSecurityModes instance on the host the Solaris_NFSShare and
- * Solaris_NFSShareSecurity instances would have to be changed. These changes
- * must be done in the providers for Solaris_NFSShare and
- * Solaris_NFSShareSecurity.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_NFSShareSecurityModes(CCIMObjectPath *pOP,
-	CCIMInstance *pInst, char **props, int num_props) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSSHARESECMODES::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstanceWithList_Solaris_NFSShareSecurityModes */
-
-/*
- * Association provider methods
- */
-/*
- * Method: cp_associators_Solaris_NFSShareSecurityModes
- *
- * Description: Returns the instances associated with the pObjectName
- * parameter via the Solaris_NFSShareSecurityModes association.
- *
- * Parameters:
- *      - CCIMObjectPath *pAssocName - An object path containing the name of
- *      the association that the caller is trying to reach.
- *      - CCIMObjectPath *pObjectName - The object path containing information
- *      (Class Name, Key Properties) about the object whose associated objects
- *      are to be returned.
- *      - char *pResultClass - If specified, only return instances that are of
- *      this class type.
- *      - char *pRole - If specified, this is the role of the pObjectName
- *      object path passed in.  If this is not valid, NULL is returned.
- *      - char *pResultRole - If specified, only return instances that are
- *      playing this role in the association.
- *
- * Returns:
- *      - A pointer to a list of Solaris_NFSShareSecurity (if pRole ==
- *      Element && pObjectName is a Solaris_NFSShare object path) or
- *      Solaris_NFSShare (if pRole == Setting && pObjectName is a
- *      Solaris_NFSShareSecurity object path) instances which are associated to
- *      the pObjectName parameter.
- *      - NULL if an error occurred or if there are no instances associated to
- *      the pObjectName passed in.  In the case of an error, the error will be
- *      logged.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_NFSShareSecurityModes(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*returnInstList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSSHARESECMODES::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Determine whether pObjectname is the Element or the Setting of the
-	 * association.  Element = Solaris_NFSShare,
-	 * Setting = Solaris_NFSShareSecurity.
-	 */
-	if ((strcasecmp(pObjectName->mName, SOLARIS_NFSSHARE) == 0)) {
-		if (pRole != NULL && (strcasecmp(pRole,
-		    shareSecModeProps[ELEMENT].name) != 0)) {
-			util_handleError(
-			    "SOLARIS_NFSSHARESECMODES::ASSOCIATORS",
-			    CIM_ERR_INVALID_PARAMETER, NULL, NULL,
-			    &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-		returnInstList = get_associated_nfsShareSec_instList(
-			pObjectName);
-	} else if (strcasecmp(pObjectName->mName,
-	    SOLARIS_NFSSHARESECURITY) == 0) {
-		if (pRole != NULL && (strcasecmp(pRole,
-		    shareSecModeProps[SETTING].name) != 0)) {
-			util_handleError(
-			    "SOLARIS_NFSSHARESECMODES::ASSOCIATORS",
-			    CIM_ERR_INVALID_PARAMETER, NULL, NULL,
-			    &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-		returnInstList = get_associated_nfsShare_instList(pObjectName);
-	} else {
-		util_handleError("SOLARIS_NFSSHARESECMODES::ASSOCIATORS",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (returnInstList);
-} /* cp_associators_Solaris_NFSShareSecurityModes */
-
-/*
- * Method:cp_associatorNames_Solaris_NFSShareSecurityModes
- *
- * Description: Returns the object paths of the instances on the other side
- * of the association. These are associated via the
- * Solaris_NFSShareSecurityModes association and have the opposite key
- * passed in as the parameter(pObjectName).
- *
- * Parameters:
- *      - CCIMObjectPath *pAssocName - An object path containing information
- *      about the association that the caller is trying to reach.
- *      - CCIMObjectPath *pObjectName - The object path which contains the
- *      information on whose associated objects are to be returned.
- *      - char *pResultClass - If specified, only return instances that are of
- *      this class type.
- *      - char *pRole - If specified, this is the role of the pObjectName
- *      object path passed in.  If this is not valid, NULL is returned.
- *      - char *pResultRole - If specified, only return instances that are
- *      playing this role in the association.
- *
- * Returns:
- *      - A pointer to a list of Solaris_NFSShareSecurity (if Role ==
- *      Element and pObjectName is a Solaris_NFSShare object path) or
- *      Solaris_NFSShare (if Role == Setting and pObjectName is a
- *      Solaris_NFSShareSecurity object path) object paths which are
- *      associated to the pObjectName parameter.
- *      - NULL  if an error occurred or if there are no instances associated to
- *      the pObjectName passed in.  In the case of an error, the error will be
- *      logged.
- */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_NFSShareSecurityModes(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList = NULL;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSSHARESECMODES::ASSOCIATOR_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-	} else {
-		instList =
-		    cp_associators_Solaris_NFSShareSecurityModes(pAssocName,
-		    pObjectName, pResultClass, pRole, pResultRole);
-		if (instList != NULL) {
-			objPathList = cim_createObjectPathList(instList);
-			cim_freeInstanceList(instList);
-		}
-	}
-	return (objPathList);
-} /* cp_associatorNames_Solaris_NFSShareSecurityModes */
-
-/*
- * Method: cp_references_Solaris_NFSShareSecurityModes
- *
- * Description: Returns the Solaris_NFSShareSecurityModes instances that have
- * the passed in parameter, pObjectName, as one of it's keys.
- *
- * Parameters:
- *      - CCIMObjectPath *pAssocName - An object path containing information
- *      about the association that the caller is trying to reach.
- *      - CCIMObjectPath *pObjectName - The object path which contains the
- *      information on whose associated objects are to be returned.
- *      - char *pRole - If specified, this is the role of the pObjectName
- *      object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *      - A pointer to a list of Solaris_NFSShareSecurityModes instances.
- *      - NULL if an error occurred or if there are no
- *      Solaris_NFSShareSecurityModes instances having pObjectName as one of
- *      it's keys.
- */
-CCIMInstanceList *
-cp_references_Solaris_NFSShareSecurityModes(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSSHARESECMODES::REFERENCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-
-	/*
-	 * Get everything that is related to the pObjectName passed in.
-	 */
-	objPathList = cp_associatorNames_Solaris_NFSShareSecurityModes(
-		pAssocName, pObjectName, NULL, pRole, NULL);
-	if (objPathList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Determine whether pObjectname is the Element or the Setting of the
-	 * association.  Element = Solaris_NFSShare,
-	 * Setting = Solaris_NFSShareSecurity.
-	 */
-	if ((strcasecmp(pObjectName->mName, SOLARIS_NFSSHARE) == 0)) {
-		instList = create_association_instList(
-		    SOLARIS_NFSSHARESECMODES, pObjectName,
-		    shareSecModeProps[ELEMENT].name, objPathList,
-		    shareSecModeProps[SETTING].name, &err);
-	} else {
-		instList =
-		    create_association_instList(SOLARIS_NFSSHARESECMODES,
-		    pObjectName, shareSecModeProps[SETTING].name,
-		    objPathList, shareSecModeProps[ELEMENT].name, &err);
-	}
-	cim_freeObjectPathList(objPathList);
-
-	return (instList);
-} /* cp_references_Solaris_NFSShareSecurityModes */
-
-/*
- * Method: cp_referenceNames_Solaris_NFSShareSecurityModes
- *
- * Description: Returns the Solaris_NFSShareSecurityModes object paths for
- * the instances that have the passed in parameter (pObjectName, as one of
- * it's keys.
- *
- * Parameters:
- *      - CCIMObjectPath *pAssocName - An object path containing information
- *      about the association that the caller is trying to reach.
- *      - CCIMObjectPath *pObjectName - The object path which contains the
- *      information on whose associated objects are to be returned.
- *      - char *pRole - If specified, this is the role of the pObjectName
- *      object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *      - A pointer to a list of Solaris_NFSShareSecurityModes object paths.
- *      - NULL if there was an error or if there are no
- *      Solaris_NFSShareSecurityModes instances having pObjectName as one of
- *      it's keys.
- */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_NFSShareSecurityModes(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*shareSecModeInstList;
-	CCIMObjectPathList	*shareSecModeOPList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFSSHARESECMODES::REFERENCE_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	shareSecModeInstList =
-	    cp_references_Solaris_NFSShareSecurityModes(pAssocName,
-	    pObjectName, pRole);
-
-	if (shareSecModeInstList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	shareSecModeOPList = cim_createObjectPathList(shareSecModeInstList);
-
-	cim_freeInstanceList(shareSecModeInstList);
-
-	return (shareSecModeOPList);
-} /* cp_referenceNames_Solaris_NFSShareSecurityModes */
-
-/*
- * Property provider methods
- */
-
-/*
- * Method: cp_getProperty_Solaris_NFSShareSecurityModes
- *
- * Description: Retrieves the property, described by the parameter pOP, from
- * the instance of Solaris_NFSShareSecurityModes on the host.
- *
- * Parameters:
- *      - CCIMObjectPath *pOP - The object path containing all the
- *      information needed to find the instance in which the property is to
- *      be returned.
- *      - cimchar *pPropName - The name of the property to be found.
- *
- * Returns:
- *      - A pointer to the property corresponding to the name passed in with
- *      pPropName.
- *      - NULL if an error occurred or if the property doesn't exist.  In the
- *      case of an error, the error will be logged.
- */
-CCIMProperty *
-cp_getProperty_Solaris_NFSShareSecurityModes(CCIMObjectPath *pOP,
-	cimchar *pPropName) {
-
-	CCIMInstance	*shareSecModeInst;
-	CCIMProperty	*shareSecModeProp;
-	int		err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_NFSSHARESECMODES::GET_PROPERTY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	shareSecModeInst = cp_getInstance_Solaris_NFSShareSecurityModes(pOP);
-	if (shareSecModeInst == NULL) {
-		return ((CCIMProperty *)NULL);
-	}
-
-	shareSecModeProp = cim_getProperty(shareSecModeInst, pPropName);
-	cim_freeInstance(shareSecModeInst);
-
-	return (shareSecModeProp);
-} /* cp_getProperty_Solaris_NFSShareSecurityModes */
-
-/*
- * Method: cp_setProperty_Solaris_NFSShareSecurityModes
- *
- * This method is not supported.  This is not allowed because in
- * order to change the properties a Solaris_NFSShareSecurityModes on
- * the host, the Solaris_NFSShare and Solaris_NFSShareSecurity must
- * be changed. Any changes to Solaris_NFSShare and Solaris_NFSShareSecurity
- * need to be done in those providers.
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_NFSShareSecurityModes(
-    CCIMObjectPath *pOP,
-    CCIMProperty *pProp) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSSHARESECMODES::SET_PROPERTY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setProperty_Solaris_NFSShareSecurityModes */
-
-/*
- * Method provider methods
- */
-
-/*
- * Method: cp_invokeMethod_Solaris_NFSShareSecurityModes
- *
- * Description: This method is not supported because the provider doesn't have
- * any methods.
- *
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_NFSShareSecurityModes(
-    CCIMObjectPath *pOP,
-    cimchar *functionName,
-    CCIMPropertyList *inParams,
-    CCIMPropertyList *outParams) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFSSHARESECMODES::INVOKE_METHOD",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return ((CCIMProperty *)NULL);
-} /* cp_invokeMethod_Solaris_NFSShareSecurityModes */
-
-
-/*
- * Private methods
- */
-
-/*
- * Method: get_associated_nfsShare_instList
- *
- * Finds the Solaris_NFSShare instances that are associated to the
- * Solaris_NFSShareSecurity object path that was passed in.
- */
-static CCIMInstanceList *
-get_associated_nfsShare_instList(CCIMObjectPath *nfsShareSecOP) {
-	CCIMInstanceList	*nfsShareInstList;
-	CCIMInstance		*nfsShareInst;
-	CCIMObjectPath		*nfsShareOP;
-	CCIMException		*ex;
-	char			*settingID;
-	int			err = 0;
-
-	settingID = util_getKeyValue(nfsShareSecOP->mKeyProperties, string,
-		SETTING_ID, &err);
-	if (settingID == NULL || err != 0) {
-		util_handleError(
-			"SOLARIS_NFSSHARESECMODES::GET_ASSOC_SHARE_INSTLIST",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareInstList = cim_createInstanceList();
-	if (nfsShareInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-			"SOLARIS_NFSSHARESECMODES::GET_ASSOC_SHARE_INSTLIST",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareOP = get_Solaris_NFSShare_OP(settingID);
-	if (nfsShareOP == NULL) {
-		/*
-		 * An error occurred in get_Solaris_NFSShare_OP and was
-		 * handled there.
-		 */
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareInst = cimom_getInstance(nfsShareOP, cim_false, cim_false,
-	    cim_false, cim_false, NULL, 0);
-
-	cim_freeObjectPath(nfsShareOP);
-
-	if (nfsShareInst == NULL) {
-		/*
-		 * No instances exist which are associated with the passed in
-		 * Solaris_NFSShareSecurity object.
-		 */
-		cim_freeInstanceList(nfsShareInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Work around for cimom bug 4649100.
-	 */
-	if (!set_share_keyProperties_to_true(nfsShareInst)) {
-		/*
-		 * Key values not found
-		 */
-		cim_logDebug(
-		    "get_associated_nfsShareSec_instList",
-		    "No keyProprties found, should return error here");
-		cim_freeInstance(nfsShareInst);
-		cim_freeInstanceList(nfsShareInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	if (nfsShareInst->mProperties == NULL) {
-		cim_freeInstanceList(nfsShareInstList);
-		cim_freeInstance(nfsShareInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareInstList = cim_addInstance(nfsShareInstList, nfsShareInst);
-	if (nfsShareInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-			"SOLARIS_NFSSHARESECMODES::GET_ASSOC_SHARE_INSTLIST",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		cim_freeInstance(nfsShareInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (nfsShareInstList);
-} /* get_associated_nfsShare_instList */
-
-/*
- * Method: get_associated_nfsShareSec_instList
- *
- * Finds the Solaris_NFSShareSecurity instances that are associated to the
- * Solaris_NFSShare object path that was passed in.
- */
-static CCIMInstanceList *
-get_associated_nfsShareSec_instList(CCIMObjectPath *nfsShareOP) {
-	CCIMObjectPath		*nfsShareSecOP;
-	CCIMInstanceList	*nfsShareSecInstList = NULL;
-	CCIMException		*ex;
-	char			*name;
-	int			err = 0;
-	fs_sharelist_t  *nfs_sharesec_list, *tmp_sharesec_list;
-
-
-	name = util_getKeyValue(nfsShareOP->mKeyProperties, string,
-	    NAME, &err);
-	if (name == NULL || err != 0) {
-		util_handleError(
-		    "SOLARIS_NFSSHARESECMODES::GET_ASSOC_SP_INSTLIST",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareSecInstList = cim_createInstanceList();
-	if (nfsShareSecInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_NFSSHARESECMODES::GET_ASSOC_SP_INSTLIST",
-		    CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfs_sharesec_list = fs_get_share_list(&err);
-	if (nfs_sharesec_list == NULL) {
-		/*
-		 * Check whether an error was returned or if we simply don't
-		 * have any nfs shares on the system. If err is not
-		 * equal to 0, an error was encountered.
-		 */
-
-		if (err != 0) {
-			/*
-			 * Determine the error and log it.
-			 */
-			if (err == ENOMEM || err == EAGAIN) {
-				util_handleError(
-				    "SOLARIS_NFSSHARESECMODES:" \
-				    ":GET_ASSOC_SEC_INSTLIST",
-				    CIM_ERR_LOW_ON_MEMORY, LOW_MEMORY,
-				    NULL, &err);
-				cim_freeInstanceList(nfsShareSecInstList);
-				return ((CCIMInstanceList *)NULL);
-			} else {
-
-				/*
-				 * If any other errors were encountered it
-				 * can be handled as a general error.  We may
-				 * not know exactly what the error is.
-				 */
-				util_handleError(
-				    "SOLARIS_NFSSHARESECMODES:" \
-				    ":GET_ASSOC_SEC_INSTLIST",
-				    CIM_ERR_FAILED, strerror(err),
-				    NULL, &err);
-				cim_freeInstanceList(nfsShareSecInstList);
-				return ((CCIMInstanceList *)NULL);
-			}
-		}
-	}
-
-
-	for (tmp_sharesec_list = nfs_sharesec_list; tmp_sharesec_list != NULL;
-	    tmp_sharesec_list = tmp_sharesec_list->next) {
-		char	**sec_modes;
-		char	*optionValue = NULL;
-		int	count = 0;
-
-		err = 0;
-
-
-		sec_modes = fs_parse_opts_for_sec_modes(
-		    tmp_sharesec_list->options, &count, &err);
-
-
-		if (sec_modes == NULL || count == 0) {
-			util_handleError(
-			    "SOLARIS_NFSSHARESECMODES::GET_ASSOC_SEC_INSTLIST",
-			    CIM_ERR_FAILED,
-			    FS_PARSE_OPTS_FOR_SEC_MODES_FAILURE, ex, &err);
-			fs_free_share_list(nfs_sharesec_list);
-			cim_freeInstanceList(nfsShareSecInstList);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-
-		if ((strcasecmp(tmp_sharesec_list->fstype, "nfs") == 0) &&
-		    (strcmp(tmp_sharesec_list->path, name) == 0)) {
-
-			CCIMInstance	*nfsShareSecInst;
-			int i;
-
-			for (i = 0; i < count; i++) {
-				char	tmpString[MAXSIZE];
-				(void) strcpy(tmpString, sec_modes[i]);
-				optionValue = get_property_from_opt_string(
-				    sec_modes[i], "sec=", B_TRUE, B_FALSE);
-
-				if (strcmp(optionValue, "0") == 0) {
-					free(optionValue);
-					optionValue = strdup("sys");
-				}
-
-				nfsShareSecOP =
-				    get_Solaris_NFSShareSec_OP(name,
-				    optionValue);
-
-				free(optionValue);
-				if (nfsShareSecOP == NULL) {
-					/*
-					 * An error occurred and it was
-					 * handled in get_NFSShareSec_OP.
-					 */
-					fs_free_share_list(nfs_sharesec_list);
-					fileutil_free_string_array(sec_modes,
-					    count);
-					cim_freeInstanceList(
-					    nfsShareSecInstList);
-					return ((CCIMInstanceList *)NULL);
-				}
-
-				nfsShareSecInst =
-				    cimom_getInstance(nfsShareSecOP, cim_false,
-				    cim_false, cim_false, cim_false, NULL, 0);
-				if (nfsShareSecInst == NULL) {
-					/*
-					 * An error occurred and it was
-					 * handled in cimom_getInstance.
-					 */
-					fs_free_share_list(nfs_sharesec_list);
-					fileutil_free_string_array(sec_modes,
-					    count);
-					cim_freeInstanceList(
-					    nfsShareSecInstList);
-					return ((CCIMInstanceList *)NULL);
-				}
-
-				/*
-				 * Work around for cimom bug 4649100.
-				 */
-				if (!set_shareSec_keyProperties_to_true(
-				    nfsShareSecInst)) {
-					/*
-					 * Key values not found
-					 */
-					cim_logDebug(
-					    "get_associated_nfsShareSec_" \
-					    "instList", "No keyProprties " \
-					    "found, should return error here");
-					cim_freeInstance(nfsShareSecInst);
-					cim_freeInstanceList(
-					    nfsShareSecInstList);
-					return ((CCIMInstanceList *)NULL);
-				}
-
-				/*
-				 * Add the instance to the instance list.
-				 */
-				nfsShareSecInstList = cim_addInstance(
-					nfsShareSecInstList, nfsShareSecInst);
-				if (nfsShareSecInstList == NULL) {
-					ex = cim_getLastError();
-					util_handleError(
-					    "SOLARIS_NFSSHARESECMODES:" \
-					    ":GET_ASSOC_SEC_INSTLIST",
-					    CIM_ERR_FAILED,
-					    ADD_INSTANCE_FAILURE, ex, &err);
-					cim_freeInstance(nfsShareSecInst);
-					fs_free_share_list(nfs_sharesec_list);
-					fileutil_free_string_array(sec_modes,
-					    count);
-					return ((CCIMInstanceList *)NULL);
-				}
-			}
-		}
-		fileutil_free_string_array(sec_modes, count);
-	}
-	fs_free_share_list(nfs_sharesec_list);
-	return (nfsShareSecInstList);
-} /* get_associated_nfsShareSec_instList */
-
-/*
- * Method: get_associated_nfsShareSec_OPList
- *
- * Finds the Solaris_NFSShareSecurity object paths that are associated
- * to the Solaris_NFSShare object path that was passed in.
- */
-static CCIMObjectPathList *
-get_associated_nfsShareSec_OPList(CCIMObjectPath *nfsShareOP, int *errp) {
-	CCIMInstanceList	*nfsShareSecInstList;
-	CCIMObjectPathList	*nfsShareSecOPList;
-	CCIMException		*ex;
-	int			err = 0;
-
-
-	nfsShareSecInstList =
-	    get_associated_nfsShareSec_instList(nfsShareOP);
-	if (nfsShareSecInstList == NULL) {
-		/*
-		 * An error occurred in get_associated_nfsShareSec_InstList
-		 * and was handled in that function.
-		 */
-		*errp = -1;
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	nfsShareSecOPList = cim_createObjectPathList(nfsShareSecInstList);
-	if (nfsShareSecOPList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_NFSSHARESECMODES::GET_ASSOC_SP_OPLIST",
-		    CIM_ERR_FAILED, CREATE_OBJECT_LIST_FAILURE,
-		    ex, &err);
-		*errp = -1;
-	}
-
-	cim_freeInstanceList(nfsShareSecInstList);
-	return (nfsShareSecOPList);
-} /* get_associated_nfsShareSec_OPList */
-
-/*
- * Method: get_Solaris_NFSShare_OP
- *
- * Gets the Solaris_NFSShare object path based on the passed in name key.
- */
-static CCIMObjectPath *
-get_Solaris_NFSShare_OP(char *nameKey) {
-	CCIMObjectPath		*nfsShareOP;
-	CCIMPropertyList	*nfsShareKeyPropList;
-	CCIMException		*ex;
-	char			*sysName;
-	int			err = 0;
-
-	nfsShareOP = cim_createEmptyObjectPath(SOLARIS_NFSSHARE);
-	if (nfsShareOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARESECMODES::GET_NFSSHARE_OP",
-		    CIM_ERR_FAILED, CREATE_EMPTY_OBJPATH_FAILURE, ex,
-		    &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	sysName = (cimchar *)sys_get_hostname(&err);
-	if (sysName == NULL) {
-		util_handleError("SOLARIS_NFSSHARESECMODES::GET_NFSSHARE_OP",
-			CIM_ERR_FAILED, GET_HOSTNAME_FAILURE, NULL, &err);
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	/*
-	 * Create the property list which to add all the key properties to and
-	 * which will be added to the object path.
-	 */
-	nfsShareKeyPropList = cim_createPropertyList();
-	if (nfsShareKeyPropList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARESECMODES::GET_NFSSHARE_OP",
-			CIM_ERR_FAILED, CREATE_PROPLIST_FAILURE, ex, &err);
-		cim_freeObjectPath(nfsShareOP);
-		free(sysName);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	/*
-	 * add_property_to_list parameters are as follows:
-	 * 1.) property name (cimchar *),
-	 * 2.) property type (CIMType),
-	 * 3.) property value (cimchar *),
-	 * 4.) property object path for reference properties (CCIMObjectPath *),
-	 * 5.) is property a key? (CIMBool),
-	 * 6.) property list to add the property to (CCIMPropertyList *).
-	 */
-
-	nfsShareKeyPropList = add_property_to_list(CREATION_CLASS, string,
-	    SOLARIS_NFSSHARE, NULL, cim_true, nfsShareKeyPropList);
-	if (nfsShareKeyPropList == NULL) {
-		cim_freeObjectPath(nfsShareOP);
-		free(sysName);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfsShareKeyPropList = add_property_to_list(NAME, string, nameKey,
-	    NULL, cim_true, nfsShareKeyPropList);
-	if (nfsShareKeyPropList == NULL) {
-		cim_freeObjectPath(nfsShareOP);
-		free(sysName);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfsShareKeyPropList = add_property_to_list(SYS_CREATION_CLASS, string,
-	    SOLARIS_CS, NULL, cim_true, nfsShareKeyPropList);
-	if (nfsShareKeyPropList == NULL) {
-		cim_freeObjectPath(nfsShareOP);
-		free(sysName);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfsShareKeyPropList = add_property_to_list(SYSTEM, string, sysName,
-	    NULL, cim_true, nfsShareKeyPropList);
-	if (nfsShareKeyPropList == NULL) {
-		cim_freeObjectPath(nfsShareOP);
-		free(sysName);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfsShareOP = cim_addPropertyListToObjectPath(nfsShareOP,
-		nfsShareKeyPropList);
-	if (nfsShareOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARESECMODES::GET_NFSSHARE_OP",
-			CIM_ERR_FAILED, ADD_PROP_TO_OBJPATH_FAILURE, ex, &err);
-		cim_freePropertyList(nfsShareKeyPropList);
-		free(sysName);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	free(sysName);
-	return (nfsShareOP);
-} /* get_Solaris_NFSShare_OP */
-
-/*
- * Method: get_Solaris_NFSShareSec_OP
- *
- * Gets the Solaris_NFSShareSecurity object path based on the passed in
- * path and mode keys.
- */
-static CCIMObjectPath *
-get_Solaris_NFSShareSec_OP(char *path, char *mode) {
-	CCIMObjectPath		*nfsShareSecOP;
-	CCIMPropertyList	*nfsShareSecKeyPropList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	cim_logDebug("get_Solaris_NFSShareSec_OP",
-	    "Just entering");
-
-	nfsShareSecOP =
-		cim_createEmptyObjectPath(SOLARIS_NFSSHARESEC);
-	if (nfsShareSecOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_NFSSHAREDEFSECMODES::GET_NFSSHARESEC_OP",
-		    CIM_ERR_FAILED, CREATE_EMPTY_OBJPATH_FAILURE, ex, &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfsShareSecKeyPropList =
-	    cim_createPropertyList();
-	if (nfsShareSecKeyPropList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_NFSSHAREDEFSECMODES::GET_NFSSHARESEC_OP",
-		    CIM_ERR_FAILED, CREATE_PROPLIST_FAILURE, ex, &err);
-		cim_freeObjectPath(nfsShareSecOP);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	/*
-	 * add_property_to_list parameters are as follows:
-	 * 1.) property settingID (cimchar *),
-	 * 2.) property mode (cimchar *)
-	 */
-	nfsShareSecKeyPropList = add_property_to_list(SETTING_ID, string,
-	    path, NULL, cim_true, nfsShareSecKeyPropList);
-	if (nfsShareSecKeyPropList == NULL) {
-		cim_freeObjectPath(nfsShareSecOP);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfsShareSecKeyPropList = add_property_to_list(MODE, string, mode,
-	    NULL, cim_true, nfsShareSecKeyPropList);
-	if (nfsShareSecKeyPropList == NULL) {
-		cim_freeObjectPath(nfsShareSecOP);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	nfsShareSecOP = cim_addPropertyListToObjectPath(
-	    nfsShareSecOP, nfsShareSecKeyPropList);
-	if (nfsShareSecOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_NFSSHAREDEFSECMODES::GET_NFSSHARESEC_OP",
-		    CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, &err);
-		cim_freePropertyList(nfsShareSecKeyPropList);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	return (nfsShareSecOP);
-} /* get_Solaris_NFSShareSec_OP */
-
-/*
- * Method: update_list_with_secMode_inst
- *
- * Adds the Solaris_NFSShareSecurityModes instance described by the passed
- *  in object path to the shareSecModeInstList instance list.
- */
-static CCIMInstanceList *
-update_list_with_secMode_inst(CCIMObjectPath *nfsShareOP,
-    CCIMInstanceList *shareSecModeInstList) {
-
-	CCIMObjectPathList	*nfsShareSecOPList;
-	CCIMObjectPathList	*tmpOPList;
-	CCIMInstance		*shareSecModeInst;
-	CCIMException		*ex;
-	int			err = 0;
-
-	/*
-	 * Retrieve all of the Solaris_NFSShareSecurity instances
-	 * associated with the current Solaris_NFSShare object path.
-	 * The get_associate_nfsShareSec_propList function will return
-	 * the appropriate reference properties to be used in creating
-	 * a Solaris_NFSShareSecurityModes instance.
-	 */
-	nfsShareSecOPList = get_associated_nfsShareSec_OPList(
-		nfsShareOP, &err);
-	if (nfsShareSecOPList == NULL) {
-		if (err != 0) {
-			return ((CCIMInstanceList *)NULL);
-		}
-		return (shareSecModeInstList);
-	}
-
-	for (tmpOPList = nfsShareSecOPList; tmpOPList != NULL;
-	    tmpOPList = tmpOPList->mNext) {
-		shareSecModeInst = cim_createInstance(SOLARIS_NFSSHARESECMODES);
-		if (shareSecModeInst == NULL) {
-			ex = cim_getLastError();
-			util_handleError(
-			    "SOLARIS_NFSSHARESECMODES::ENUM_INSTANCES",
-			    CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-		/*
-		 * Add the properties to the
-		 * Solaris_NFSSHareSecurityModes instance.
-		 */
-
-		if (add_property_to_instance(shareSecModeProps[SETTING].name,
-		    shareSecModeProps[SETTING].type, NULL,
-		    tmpOPList->mDataObject, shareSecModeProps[SETTING].isKey,
-		    shareSecModeInst) == cim_false) {
-			cim_freeObjectPathList(nfsShareSecOPList);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		if (add_property_to_instance(shareSecModeProps[ELEMENT].name,
-		    shareSecModeProps[ELEMENT].type, NULL,
-		    nfsShareOP, shareSecModeProps[ELEMENT].isKey,
-		    shareSecModeInst) == cim_false) {
-			cim_freeObjectPathList(nfsShareSecOPList);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		shareSecModeInstList =
-		    cim_addInstance(shareSecModeInstList,
-		    shareSecModeInst);
-		if (shareSecModeInstList == NULL) {
-			ex = cim_getLastError();
-			util_handleError(
-			    "SOLARIS_NFSSHARESECMODES::ENUM_INSTANCES",
-			    CIM_ERR_FAILED, ADD_INSTANCE_FAILURE,
-			    ex, &err);
-			cim_freeInstance(shareSecModeInst);
-			cim_freeObjectPathList(nfsShareSecOPList);
-			return ((CCIMInstanceList *)NULL);
-		}
-	}
-
-	return (shareSecModeInstList);
-} /* update_list_with_secMode_inst */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_NFSShareSecurityModes.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SOLARIS_NFSSHARESECURITYMODES_H
-#define	_SOLARIS_NFSSHARESECURITYMODES_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimomhandle.h>
-#include "nfsprov_include.h"
-
-#define	PROPCOUNT 2
-
-static nfs_prov_prop_t shareSecModeProps[] = {
-#define	ELEMENT 0
-	{"Element", cim_true, reference},
-#define	SETTING (ELEMENT + 1)
-	{"Setting", cim_true, reference}
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_NFSSHARESECURITYMODES_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_PersistentShareForSystem.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1113 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "Solaris_PersistentShareForSystem.h"
-#include "nfs_keys.h"
-#include "nfs_providers_msgstrings.h"
-#include "messageStrings.h"
-#include "nfs_provider_names.h"
-#include "util.h"
-#include "common_functions.h"
-#include "createprop_methods.h"
-#include "libfsmgt.h"
-
-/*
- * Private methods
- */
-static CIMBool		does_persistent_share_exist(CCIMObjectPath *pShareOP);
-static CCIMProperty	*get_Antecedent();
-
-/*
- * Public methods
- */
-
-/*
- * Instance provider methods
- */
-
-/*
- * Method: cp_createInstance_Solaris_PersistentShareForSystem
- *
- * Description: This method is not supported.  It is not supported because in
- * order for a Solaris_PersistentShareForSystem association to exist a
- * corresponding Solaris_PersistentShare and Solaris_ComputerSystem must exist.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of
- *	the class for which to create an instance.
- *	- CCIMInstance *pInst - Not used.
- *
- * Returns:
- *	- Always returns NULL because the method is not supported.
- */
-/* ARGSUSED */
-CCIMObjectPath *
-cp_createInstance_Solaris_PersistentShareForSystem(CCIMObjectPath *pOP,
-	CCIMInstance *pInst) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_SYSPERSISTSHARE::CREATE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMObjectPath *)NULL);
-
-} /* cp_createInstance_Solaris_PersistentShareForSystem */
-
-/*
- * Method: cp_deleteInstance_Solaris_PersistentShareForSystem
- *
- * Description: This method is not supported.  It is not supported because in
- * order for it to be actually deleted the corresponding
- * Solaris_PersistentShare would need to be deleted.  That action is not
- * appropriate for this provider.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the
- *	information about the class for which to delete the instance.
- *
- * Returns:
- *	- Always returns cim_false because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_PersistentShareForSystem(CCIMObjectPath *pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_SYSPERSISTSHARE::DELETE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-
-} /* cp_deleteInstance_Solaris_PersistentShareForSystem */
-
-/*
- * Method: cp_enumInstances_Solaris_PersistentShareForSystem
- *
- * Description: Enumerates the instances of Solaris_PersistentShareForSystem on
- * a host.
- * An instance of Solaris_PersistentShareForSystem is an association that links
- * a persistent share to the hosting machine.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of
- *	the class for which to enumerate the instances.
- *
- * Returns:
- *	- A pointer to a list of Solaris_PersistentShareForSystem instances.
- *	- NULL if an error occurred or if there are no instances of
- *	Solaris_PersistentShareForSystem on the host.  In the case of an error,
- *	the error will be logged.
- */
-CCIMInstanceList *
-cp_enumInstances_Solaris_PersistentShareForSystem(CCIMObjectPath *pOP) {
-	CCIMObjectPathList	*persistShareOPList;
-	CCIMObjectPathList	*tmpOPList;
-	CCIMObjectPath		*persistShareOP;
-	CCIMInstanceList	*persistShareForSysInstList;
-	CCIMProperty		*antProp;
-	CIMBool			returned_val;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_SYSPERSISTSHARE::ENUM_INSTANCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	persistShareOP = cim_createEmptyObjectPath(SOLARIS_PERSISTSHARE);
-	if (persistShareOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SYSPERSISTSHARE::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CREATE_EMPTY_OBJPATH_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	persistShareOPList = cimom_enumerateInstanceNames(persistShareOP,
-		cim_false);
-
-	/*
-	 * A NULL return value indicates an error, an empty list does not.
-	 */
-	if (persistShareOPList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SYSPERSISTSHARE::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CIMOM_ENUM_INSTNAMES_FAILURE, ex, &err);
-		cim_freeObjectPath(persistShareOP);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	cim_freeObjectPath(persistShareOP);
-
-	if (persistShareOPList->mDataObject == NULL) {
-		cim_freeObjectPathList(persistShareOPList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Retrieve the Antecedent property.  The Antecedent property is the
-	 * same for every instance of Solaris_PersistentShareForSystem because
-	 * it is the Solaris_ComputerSystem upon which the
-	 * Solaris_PersistentShare resides.
-	 */
-	antProp = get_Antecedent();
-	if (antProp == NULL) {
-		/*
-		 * An error was encountered and it was handled in
-		 * get_Antecedent.
-		 */
-		cim_freeObjectPathList(persistShareOPList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	persistShareForSysInstList = cim_createInstanceList();
-	if (persistShareForSysInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SYSPERSISTSHARE::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		cim_freeObjectPathList(persistShareOPList);
-		cim_freeProperty(antProp);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	for (tmpOPList = persistShareOPList; tmpOPList != NULL;
-		tmpOPList = tmpOPList->mNext) {
-
-		CCIMInstance	*persistShareForSysInst;
-
-		persistShareForSysInst = cim_createInstance(
-			SOLARIS_SYSPERSISTSHARE);
-		if (persistShareForSysInst == NULL) {
-			ex = cim_getLastError();
-			util_handleError(
-				"SOLARIS_SYSPERSISTSHARE::ENUM_INSTANCES",
-				CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex,
-				&err);
-			cim_freeObjectPathList(persistShareOPList);
-			cim_freeProperty(antProp);
-			cim_freeInstanceList(persistShareForSysInstList);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Create a reference property out of the current
-		 * Solaris_PersistentShare object path.
-		 */
-		if (add_property_to_instance(sysPersShareProps[DEP].name,
-			sysPersShareProps[DEP].type, NULL,
-			tmpOPList->mDataObject, sysPersShareProps[DEP].isKey,
-			persistShareForSysInst) == cim_false) {
-
-			cim_freeObjectPathList(persistShareOPList);
-			cim_freeProperty(antProp);
-			cim_freeInstance(persistShareForSysInst);
-			cim_freeInstanceList(persistShareForSysInstList);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Add the Antecedent (Solaris_ComputerSystem) property to the
-		 * instance.
-		 */
-		returned_val = cim_addProperty(persistShareForSysInst, antProp);
-		if (returned_val == cim_false) {
-			ex = cim_getLastError();
-			util_handleError(
-				"SOLARIS_SYSPERSISTSHARE::ENUM_INSTANCES",
-				CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, &err);
-			cim_freeObjectPathList(persistShareOPList);
-			cim_freeProperty(antProp);
-			cim_freeInstanceList(persistShareForSysInstList);
-			cim_freeInstance(persistShareForSysInst);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Add the Solaris_PersistentShareForSystem instance to the
-		 * instance list.
-		 */
-		persistShareForSysInstList = cim_addInstance(
-			persistShareForSysInstList,
-			persistShareForSysInst);
-		if (persistShareForSysInstList == NULL) {
-			ex = cim_getLastError();
-			util_handleError(
-				"SOLARIS_SYSPERSISTSHARE::ENUM_INSTANCES",
-				CIM_ERR_FAILED, ADD_INSTANCE_FAILURE, ex, &err);
-			cim_freeObjectPathList(persistShareOPList);
-			cim_freeInstance(persistShareForSysInst);
-			return ((CCIMInstanceList *)NULL);
-		}
-	}
-
-	cim_freeObjectPathList(persistShareOPList);
-	return (persistShareForSysInstList);
-
-} /* cp_enumInstances_Solaris_PersistentShareForSystem */
-
-/*
- * Method: cp_enumInstanceNames_Solaris_PersistentShareForSystem
- *
- * Description: Enumerates the object paths corresponding to the instances of
- * Solaris_PersistentShareForSystem on a host.
- * An instance of Solaris_PersistentShareForSystem is an association that links
- * a persistent share to the hosting machine.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of
- *	the class for which to enumerate the instances.
- *
- * Returns:
- *	- A pointer to a list of Solaris_PersistentShareForSystem object paths.
- *	- NULL if an error occurred or if there are no instances of
- *	Solaris_PersistentShareForSystem on the host.  In the case of an error,
- *	the error will be logged.
- */
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_PersistentShareForSystem(CCIMObjectPath *pOP) {
-	CCIMInstanceList	*persistShareForSysInstList;
-	CCIMObjectPathList	*persistShareForSysOPList;
-	int			err = 0;
-
-	/*
-	 * First check if the CCIMObjectPath parameter is null.
-	 */
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_SYSPERSISTSHARE::ENUM_INSTANCE_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	persistShareForSysInstList =
-		cp_enumInstances_Solaris_PersistentShareForSystem(pOP);
-	if (persistShareForSysInstList == NULL) {
-		/*
-		 * An error occurred in enumInstances or there are simply no
-		 * Solaris_PersistentShareForSystem instances to enumerate.  In
-		 * the case of an error, the error would have been handled in
-		 * the cp_enumInstances_Solaris_PersistentShareForSystem
-		 * function.
-		 */
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	persistShareForSysOPList = cim_createObjectPathList(
-		persistShareForSysInstList);
-
-	cim_freeInstanceList(persistShareForSysInstList);
-	return (persistShareForSysOPList);
-
-} /* cp_enumInstanceNames_Solaris_PersistentShareForSystem */
-
-/*
- * Method: cp_execQuery_Solaris_PersistentShareForSystem
- *
- * Description: Queries the host to find those Solaris_PersistentShareForSystem
- * instances that meet the search criteria.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of
- *	the class to query.
- *	- char *selectClause - Not used.
- *	- char *nonJoinExp - Not used.
- *	- char *queryExp - Not used.
- *	- char *queryLang - Not used.
- *
- * Returns:
- *	- A pointer to a list of Solaris_PersistentShareForSystem instances
- *	that match the criteria.
- *	- NULL if an error occurred or if there are no
- *	Solaris_PersistentShareForSystem instances that match the criteria.
- *	In the case of an error, the error will be logged.
- *
- * NOTE: Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_execQuery_Solaris_PersistentShareForSystem(CCIMObjectPath *pOP,
-	char *selectClause, char *nonJoinExp, char *queryExp, char *queryLang) {
-
-	CCIMInstance		*emptyInst;
-	CCIMInstanceList	*persistShareForSysInstList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_SYSPERSISTSHARE::EXEC_QUERY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	persistShareForSysInstList =
-		cp_enumInstances_Solaris_PersistentShareForSystem(pOP);
-	if (persistShareForSysInstList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SYSPERSISTSHARE::EXEC_QUERY",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	persistShareForSysInstList = cim_prependInstance(
-		persistShareForSysInstList, emptyInst);
-	if (persistShareForSysInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SYSPERSISTSHARE::EXEC_QUERY",
-			CIM_ERR_FAILED, PREPEND_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstance(emptyInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (persistShareForSysInstList);
-} /* cp_execQuery_Solaris_PersistentShareForSystem */
-
-/*
- * Method: cp_getInstance_Solaris_PersistentShareForSystem
- *
- * Description: Gets the instance corresponding to the passed in object path.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - The object path containing all the
- *	keys of the instance that is to be returned.
- *
- * Returns:
- *	- A pointer to the instance of Solaris_PersistentShareForSystem
- *	corresponding to pOP.
- *	- NULL if an error occurred or if the instance doesn't exist on the
- *	host.  In the case of an error, the error will be logged.
- */
-CCIMInstance *
-cp_getInstance_Solaris_PersistentShareForSystem(CCIMObjectPath *pOP) {
-	CCIMInstance		*persistShareForSysInst;
-	CCIMPropertyList	*persistShareForSysPropList;
-	CCIMInstanceList	*instList;
-	CCIMObjectPath		*antOP;
-	CCIMObjectPath		*depOP;
-	int			err = 0;
-
-	if (pOP == NULL || pOP->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_SYSPERSISTSHARE::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Get the Dependent and Antecedent properties.
-	 */
-	persistShareForSysPropList = pOP->mKeyProperties;
-	antOP = util_getKeyValue(persistShareForSysPropList,
-		sysPersShareProps[ANT].type, sysPersShareProps[ANT].name, &err);
-	depOP = util_getKeyValue(persistShareForSysPropList,
-		sysPersShareProps[DEP].type, sysPersShareProps[DEP].name, &err);
-
-	/*
-	 * Check if we have the Antecedent and Dependent properties.
-	 */
-	if (antOP == NULL || depOP == NULL ||
-		antOP->mKeyProperties == NULL ||
-		depOP->mKeyProperties == NULL) {
-
-		util_handleError("SOLARIS_SYSPERSISTSHARE::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_PersistentShareForSystem(pOP);
-	if (instList == NULL) {
-		return ((CCIMInstance *)NULL);
-	}
-
-	persistShareForSysInst = cim_getInstance(instList, pOP);
-
-	cim_freeInstanceList(instList);
-	return (persistShareForSysInst);
-
-} /* cp_getInstance_Solaris_PersistentShareForSystem */
-
-/*
- * Method: cp_setInstance_Solaris_PersistentShareForSystem
- *
- * Description: This method is not supported.  It is not supported because in
- * order to change a Solaris_PersistentShareForSystem instance the underlying
- * persistent share and computer system must be modified.  Those actions must
- * done on the appropriate persistent share and computer system objects, not
- * here.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of the class
- *	for which to set the instance.
- *	- CCIMInstance *pInst - Not used.
- *
- * Returns:
- *	- Always returns cim_false, because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_PersistentShareForSystem(CCIMObjectPath *pOP,
-	CCIMInstance *pInst) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_SYSPERSISTSHARE::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstance_Solaris_PersistentShareForSystem */
-
-/*
- * Method: cp_setInstanceWithList_Solaris_PersistentShareForSystem
- *
- * Description: This method is not supported.  It is not supported because in
- * order to change a Solaris_PersistentShareForSystem instance the underlying
- * persistent share and computer system must be modified.  Those actions must
- * done on the appropriate persistent share and computer system objects, not
- * here.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of the class
- *	for which to set the instance.
- *	- CCIMInstance *pInst - Not used.
- *
- * Returns:
- *	- Always returns cim_false, because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_PersistentShareForSystem(CCIMObjectPath *pOP,
-	CCIMInstance *pInst, char **props, int num_props) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_SYSPERSISTSHARE::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstanceWithList_Solaris_PersistentShareForSystem */
-
-/*
- * Associator provider methods
- */
-
-/*
- * Method: cp_associators_Solaris_PersistentShareForSystem
- *
- * Description:  Returns the instances associated, via the
- * Solaris_PersistentShareForSystem association, to the pObjectName parameter.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing the name of
- *	the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path containing information
- *	(Class Name, Key Properties) about the object whose associated objects
- *	are to be returned.
- *	- char *pResultClass - If specified, only return instances that are of
- *	this class type.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *	- char *pResultRole - If specified, only return instances that are
- *	playing this role in the association.
- *
- * Returns:
- *	- A list of Solaris_PersistentShare (if pRole == Antecedent &&
- *	pObjectName is a Solaris_ComputerSystem object path) or
- *	Solaris_ComputerSystem (if pRole == Dependent && pObjectName is a
- *	Solaris_PersistentShare object path) instances which are associated
- *	to the pObjectName parameter.
- *	- NULL if an error occurred or if there are no instances associated to
- *	the pObjectName passed in.  In the case of an error, the error will be
- *	logged.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_PersistentShareForSystem(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*returnInstList = NULL;
-	CCIMObjectPath		*resultOP;
-	CCIMException		*ex;
-	cimchar			*resultClassName;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_SYSPERSISTSHARE::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Determine whether the pObjectName is the Antecedent or the Dependent
-	 * of the association.  Antecedent == Solaris_ComputerSystem,
-	 * Dependent = Solaris_PersistentShare
-	 */
-	if ((strcasecmp(pObjectName->mName, COMPUTER_SYSTEM) == 0)) {
-		CCIMPropertyList	*propList;
-		char			*name;
-		char			*hostname;
-
-		resultClassName = SOLARIS_PERSISTSHARE;
-
-		/*
-		 * If a value was passed in with pRole and it does not match
-		 * the role that the pObjectName actually is then log an
-		 * invalid param error.
-		 */
-		if (pRole != NULL && (strcasecmp(pRole,
-			sysPersShareProps[ANT].name) != 0)) {
-			util_handleError("SOLARIS_SYSPERSISTSHARE::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Retrieve the Name key property from the pObjectName object
-		 * path.  This is expected to be populated with the host name.
-		 * If the Name key value is not the same as that of the current
-		 * host, return null.
-		 */
-		propList = pObjectName->mKeyProperties;
-		name = (cimchar *)util_getKeyValue(propList, string, NAME,
-			&err);
-
-		if (name == NULL || err != 0) {
-			/*
-			 * We don't have the appropriate information.
-			 */
-			util_handleError("SOLARIS_SYSPERSISTSHARE::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		err = 0;
-		hostname = sys_get_hostname(&err);
-		if (hostname == NULL || err != 0) {
-			util_handleError("SOLARIS_SYSPERSISTSHARE::ASSOCIATORS",
-				CIM_ERR_FAILED, GET_HOSTNAME_FAILURE, NULL,
-				&err);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		if ((strcmp(name, hostname) != 0)) {
-			/*
-			 * We can only determine shares on the current host.
-			 * The providers are not distributed.
-			 */
-			util_handleError("SOLARIS_SYSPERSISTSHARE::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			free(hostname);
-			return ((CCIMInstanceList *)NULL);
-		}
-		free(hostname);
-
-	} else if (strcasecmp(pObjectName->mName, SOLARIS_PERSISTSHARE) == 0) {
-		CIMBool	persistShareExists;
-
-		resultClassName = COMPUTER_SYSTEM;
-		if (pRole != NULL && (strcasecmp(pRole,
-			sysPersShareProps[DEP].name) != 0)) {
-			util_handleError("SOLARIS_SYSPERSISTSHARE::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		persistShareExists = does_persistent_share_exist(pObjectName);
-
-		if (persistShareExists == cim_false) {
-			cim_logDebug("cp_associators",
-				"persistShareExists == cim_false");
-			util_handleError("SOLARIS_SYSPERSISTSHARE:ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-	} else {
-		util_handleError("SOLARIS_SYSPERSISTSHARE:ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	resultOP = cim_createEmptyObjectPath(resultClassName);
-	if (resultOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SYSPERSISTSHARE:ASSOCIATORS",
-			CIM_ERR_FAILED, CREATE_EMPTY_OBJPATH_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	returnInstList = cimom_enumerateInstances(resultOP, cim_false,
-		cim_false, cim_false, cim_false, cim_false, NULL, 0);
-
-	/*
-	 * A NULL return value indicates error, an empty list does not.
-	 */
-	if (returnInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SYSPERSISTSHARE:ASSOCIATORS",
-			CIM_ERR_FAILED, CIMOM_ENUM_INST_FAILURE, ex, &err);
-		cim_freeObjectPath(resultOP);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	cim_freeObjectPath(resultOP);
-
-	if (returnInstList->mDataObject == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (returnInstList);
-} /* cp_associators_Solaris_PersistentShareForSystem */
-
-/*
- * Method: cp_associatorNames_Solaris_PersistentShareForSystem
- *
- * Description: Returns the object paths corresponding to the instances on the
- * other side of the association which are associated via the
- * Solaris_PersistentShareForSystem association and having the passed in
- * parameter, pObjectName, as the opposite key.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pResultClass - If specified, only return instances that are of
- *	this class type.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *	- char *pResultRole - If specified, only return instances that are
- *	playing this role in the association.
- *
- * Returns:
- *	- A list of Solaris_PersistentShare (if pRole == Antecedent &&
- *	pObjectName is a Solaris_ComputerSystem object path) or
- *	Solaris_ComputerSystem (if pRole == Dependent && pObjectName is a
- *	Solaris_PersistentShare object path) object paths which are associated
- *	to the pObjectName parameter.
- *	- NULL if an error occurred or if there are no instances associated to
- *	the pObjectName passed in.  In the case of an error, the error will be
- *	logged.
- */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_PersistentShareForSystem(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_SYSPERSISTSHARE::ASSOCIATOR_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList = cp_associators_Solaris_PersistentShareForSystem(pAssocName,
-		pObjectName, pResultClass, pRole, pResultRole);
-	if (instList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	objPathList = cim_createObjectPathList(instList);
-
-	cim_freeInstanceList(instList);
-	return (objPathList);
-} /* cp_associatorNames_Solaris_PersistentShareForSystem */
-
-/*
- * Method: cp_references_Solaris_PersistentShareForSystem
- *
- * Description: Returns the Solaris_PersistentShareForSystem instances that
- * have the passed in parameter, pObjectName, as one of it's keys.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *	- A pointer to a list of Solaris_PersistentShareForSystem instances.
- *	- NULL if an error occurred or if there are no
- *	Solaris_PersistentShareForSystem instances having pObjectName as one of
- *	it's keys.
- */
-CCIMInstanceList *
-cp_references_Solaris_PersistentShareForSystem(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_SYSPERSISTSHARE::REFERENCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Get everything that is related to the pObjectName passed in.
-	 */
-	objPathList = cp_associatorNames_Solaris_PersistentShareForSystem(
-		pAssocName, pObjectName, NULL, pRole, NULL);
-	if (objPathList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Now use the object paths in the object path list and the pObjectName
-	 * variable to create the association instances.
-	 */
-
-	if ((strcasecmp(pObjectName->mName, SOLARIS_PERSISTSHARE) == 0)) {
-		/*
-		 * pObjectName is the Dependent
-		 */
-		instList = create_association_instList(SOLARIS_SYSPERSISTSHARE,
-			pObjectName, DEPENDENT, objPathList, ANTECEDENT, &err);
-	} else {
-		/*
-		 * pObjectName is the Antecedent
-		 */
-		instList = create_association_instList(SOLARIS_SYSPERSISTSHARE,
-			pObjectName, ANTECEDENT, objPathList, DEPENDENT, &err);
-	}
-	cim_freeObjectPathList(objPathList);
-
-	return (instList);
-} /* cp_references_Solaris_PersistentShareForSystem */
-
-/*
- * Method: cp_referenceNames_Solaris_PersistentShareForSystem
- *
- * Description: Returns the object paths corresponding to the
- * Solaris_PersistentShareForSystem instances that have the passed in parameter,
- * pObjectName, as one of it's keys.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *	- A pointer to a list of Solaris_PersistentShareForSystem object paths.
- *	- NULL if an error occurred or if there are no
- *	Solaris_PersistentShareForSystem instances having pObjectName as one of
- *	it's keys.
- */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_PersistentShareForSystem(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*persistShareForSysInstList;
-	CCIMObjectPathList	*persistShareForSysOPList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_SYSPERSISTSHARE::REFERENCE_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	persistShareForSysInstList =
-		cp_references_Solaris_PersistentShareForSystem(pAssocName,
-			pObjectName, pRole);
-	if (persistShareForSysInstList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	persistShareForSysOPList = cim_createObjectPathList(
-		persistShareForSysInstList);
-
-	cim_freeInstanceList(persistShareForSysInstList);
-	return (persistShareForSysOPList);
-} /* cp_referenceNames_Solaris_PersistentShareForSystem */
-
-/*
- * Property provider methods
- */
-
-/*
- * Method: cp_getProperty_Solaris_PersistentShareForSystem
- *
- * Description: Retrieves a certain property from the instance of
- * Solaris_PersistentShareForSystem on the host that is described by the
- * parameter pOP.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - The object path containing all the
- *	information needed to find the instance for which the property is to
- *	be returned.
- *	- cimchar *pPropName - The name of the property to be found.
- *
- * Returns:
- *	- A pointer to the property corresponding to the name passed in with
- *	pPropName.
- *	- NULL if an error occurred or if the property doesn't exist.  In the
- *	case of an error, the error will be logged.
- */
-CCIMProperty *
-cp_getProperty_Solaris_PersistentShareForSystem(CCIMObjectPath *pOP,
-	cimchar *pPropName) {
-
-	CCIMInstance	*persistShareForSysInst;
-	CCIMProperty	*persistShareForSysProp;
-	int		err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_SYSPERSISTSHARE::GET_PROPERTY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	persistShareForSysInst =
-		cp_getInstance_Solaris_PersistentShareForSystem(pOP);
-	if (persistShareForSysInst == NULL) {
-		return ((CCIMProperty *)NULL);
-	}
-
-	persistShareForSysProp = cim_getProperty(persistShareForSysInst,
-		pPropName);
-	cim_freeInstance(persistShareForSysInst);
-
-	return (persistShareForSysProp);
-
-} /* cp_getProperty_Solaris_PersistentShareForSystem */
-
-/*
- * Method: cp_setProperty_Solaris_PersistentShareForSystem
- *
- * Description: This method is not supported.  It is not supported because in
- * order to change a Solaris_PersistentShareForSystem instance the underlying
- * persistent share and computer system must be modified.  Those actions must
- * done on the appropriate persistent share and computer system objects, not
- * here.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - Not used.
- *	- CCIMProperty *pProp - Not used.
- *
- * Returns:
- *	- Always returns cim_false because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_PersistentShareForSystem(CCIMObjectPath *pOP,
-	CCIMProperty *pProp) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_SYSPERSISTSHARE::SET_PROPERTY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setProperty_Solaris_PersistentShareForSystem */
-
-/*
- * Method provider methods
- */
-
-/*
- * Method: cp_invokeMethod_Solaris_PersistentShareForSystem
- *
- * Description: This method is not supported because the provider doesn't have
- * any methods.
- *
- * Parameters:
- *	- CCIMObjectPath* op - Not used.
- *	- cimchar* methodName - Not used.
- *	- CCIMPropertyList* inParams - Not used.
- *	- CCIMPropertyList* outParams - Not used.
- *
- * Returns:
- *	- Always returns null because the method is not supported.
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_PersistentShareForSystem(CCIMObjectPath *pOP,
-	cimchar *methodName, CCIMPropertyList *inParams,
-	CCIMPropertyList *outParams) {
-
-	return ((CCIMProperty *)NULL);
-} /* cp_invokeMethod_Solaris_PersistentShareForSystem */
-
-/*
- * Private Methods
- */
-
-/*
- * Method: does_persistent_share_exist
- *
- * Description: Determines from the Solaris_PersistentShare object path whether
- * or not the dfstab entry actually exists.
- *
- * Parameters:
- *	- CCIMObjectPath *persShareOP - The object path used (by retrieving
- *	the SettingId property) to determine whether or not the dfstab entry
- *	exists.
- *
- * Returns:
- *	- cim_true or cim_false representing whether or not the entry was
- *	found.
- */
-static CIMBool
-does_persistent_share_exist(CCIMObjectPath *persShareOP) {
-	CCIMPropertyList	*propList;
-	CIMBool			foundEntry = cim_false;
-	fs_dfstab_entry_t	dfstabEnts, currentDfstabEnt;
-	char			*settingId;
-	int			err = 0;
-
-	propList = persShareOP->mKeyProperties;
-
-	settingId = util_getKeyValue(propList, string, SETTING_ID, &err);
-	if (settingId == NULL || err != 0) {
-		return (cim_false);
-	}
-
-	cim_logDebug("does_persistent_share_exist", "SettingId =%s", settingId);
-	dfstabEnts = fs_get_DFStab_ents(&err);
-
-	currentDfstabEnt = dfstabEnts;
-	while (currentDfstabEnt != NULL && foundEntry == cim_false) {
-		char	*path;
-
-		path = fs_get_DFStab_ent_Path(currentDfstabEnt);
-
-		if (strcasecmp(path, settingId) == 0) {
-			foundEntry = cim_true;
-		}
-		currentDfstabEnt = fs_get_DFStab_ent_Next(currentDfstabEnt);
-	}
-
-	fs_free_DFStab_ents(dfstabEnts);
-	return (foundEntry);
-} /* does_persistent_share_exist */
-
-/*
- * Method: get_Antecedent
- *
- * Description: Retrieves the antecedent, Solaris_ComputerSystem, reference
- * property for the association.
- *
- * Parameters:
- *	- NONE
- *
- * Returns:
- *	- A pointer to a Solaris_ComputerSystem reference property.
- *	- Upon error, NULL is returned and the error is logged.
- */
-static CCIMProperty *
-get_Antecedent() {
-	CCIMInstance    *compSysInst;
-	CCIMObjectPath	*compSysOP;
-	CCIMProperty	*compSysRefProp;
-	CCIMException	*ex;
-	char		*hostname;
-	int		err = 0;
-
-	compSysInst = cim_createInstance(COMPUTER_SYSTEM);
-	if (compSysInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SYSPERSISTSHARE::GET_ANT",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	/*
-	 * Create the key properties on the Solaris_ComputerSystem instance.
-	 *
-	 * The Solaris_ComputerSystem keys are as follows:
-	 * CreationClassName = "Solaris_ComputerSystem"
-	 * Name = < host name >
-	 */
-
-	if (add_property_to_instance(CREATION_CLASS, string,
-		COMPUTER_SYSTEM, NULL, cim_true, compSysInst) == cim_false) {
-
-		cim_freeInstance(compSysInst);
-		return ((CCIMProperty *)NULL);
-	}
-
-	err = 0;
-	hostname = sys_get_hostname(&err);
-	if (hostname == NULL) {
-		util_handleError("SOLARIS_SYSPERSISTSHARE::GET_ANT",
-			CIM_ERR_FAILED, GET_HOSTNAME_FAILURE, NULL, &err);
-		cim_freeInstance(compSysInst);
-		return ((CCIMProperty *)NULL);
-	}
-
-	if (add_property_to_instance(NAME, string, hostname, NULL,
-		cim_true, compSysInst) == cim_false) {
-
-		free(hostname);
-		cim_freeInstance(compSysInst);
-		return ((CCIMProperty *)NULL);
-	}
-	free(hostname);
-
-	compSysOP = cim_createObjectPath(compSysInst);
-	if (compSysOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SYSPERSISTSHARE::GET_ANT",
-			CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE,
-			ex, &err);
-		cim_freeInstance(compSysInst);
-		return ((CCIMProperty *)NULL);
-	}
-
-	cim_freeInstance(compSysInst);
-
-	compSysRefProp = cim_createReferenceProperty(
-		sysPersShareProps[ANT].name, compSysOP,
-		sysPersShareProps[ANT].isKey);
-	if (compSysRefProp == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SYSPERSISTSHARE::GET_ANT",
-			CIM_ERR_FAILED, CREATE_REFPROP_FAILURE, ex, &err);
-		cim_freeObjectPath(compSysOP);
-		return ((CCIMProperty *)NULL);
-	}
-
-	cim_freeObjectPath(compSysOP);
-
-	return (compSysRefProp);
-} /* get_Antecedent */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_PersistentShareForSystem.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SOLARIS_PERSISTENTSHAREFORSYSTEM_H
-#define	_SOLARIS_PERSISTENTSHAREFORSYSTEM_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimomhandle.h>
-#include "nfsprov_include.h"
-
-#define	PROPCOUNT 2
-
-static nfs_prov_prop_t sysPersShareProps[] = {
-#define	ANT 0
-	{"Antecedent", cim_true, reference},
-#define	DEP (ANT + 1)
-	{"Dependent", cim_true, reference}
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_PERSISTENTSHAREFORSYSTEM_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_SharedFileSystem.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1161 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "Solaris_SharedFileSystem.h"
-#include "nfs_keys.h"
-#include "nfs_providers_msgstrings.h"
-#include "messageStrings.h"
-#include "nfs_provider_names.h"
-#include "util.h"
-#include "common_functions.h"
-#include "createprop_methods.h"
-#include <sys/types.h>
-
-typedef void* inst_or_objPath;
-
-/*
- * Private method declaration
- */
-static inst_or_objPath	get_associated_directory(CCIMObjectPath *nfsShareOP,
-				boolean_t returnInst);
-static CCIMInstanceList* get_associated_instances(CCIMObjectPath *pOP,
-				boolean_t isSystemElement);
-static CCIMInstance*	get_associated_share(CCIMObjectPath *dirOP);
-
-/*
- * Public methods
- */
-
-/*
- * Instance provider methods
- */
-
-/*
- * Method: cp_createInstance_Solaris_SharedFileSystem
- *
- * Description: This method is not supported.  It is not supported because in
- * order for a Solaris_SharedFileSystem association to exist a corresponding
- * Solaris_NFSShare and Solaris_Directory must exist.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of
- *	the class of which to create an instance of.
- *	- CCIMInstance *pInst - Not used.
- *
- * Returns:
- *	- Always returns NULL because the method is not supported.
- */
-/* ARGSUSED */
-CCIMObjectPath *
-cp_createInstance_Solaris_SharedFileSystem(CCIMObjectPath *pOP,
-	CCIMInstance *pInst) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHAREDFS::CREATE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMObjectPath *)NULL);
-} /* cp_createInstance_Solaris_SharedFileSystem */
-
-/*
- * Method: cp_deleteInstance_Solaris_SharedFileSystem
- *
- * Description: This method is not supported.  It is not supported because in
- * order for it to be actually deleted the corresponding Solaris_NFSShare or
- * Solaris_Directory would need to be deleted.  That action is not appropriate
- * for this provider.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the
- *	information about the class of which to delete the instance of.
- *
- * Returns:
- *	- Always returns cim_false because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_SharedFileSystem(CCIMObjectPath pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHAREDFS::DELETE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_deleteInstance_Solaris_SharedFileSystem */
-
-/*
- * Method: cp_enumInstances_Solaris_SharedFileSystem
- *
- * Description: Enumerates the instances of Solaris_SharedFileSystem on a host.
- * An instance of Solaris_SharedFileSystem is an association that links a share
- * object to the directory that is shared.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of
- *	the class of which to enumerate the instances of.
- *
- * Returns:
- *	- A pointer to a list of Solaris_SharedFileSystem instances.
- *	- NULL if an error occurred or if there are no instances of
- *	Solaris_SharedFileSystem on the host.  In the case of an error, the
- *	error will be logged.
- */
-CCIMInstanceList *
-cp_enumInstances_Solaris_SharedFileSystem(CCIMObjectPath *pOP) {
-	CCIMObjectPathList	*nfsShareOPList;
-	CCIMObjectPathList	*currentShareOP;
-	CCIMInstanceList	*sharedFSInstList;
-	CCIMObjectPath		*nfsShareOP;
-	CCIMException		*ex;
-	cimchar			*pValue;
-	int			err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_SHAREDFS::ENUM_INSTANCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareOP = cim_createEmptyObjectPath(SOLARIS_NFSSHARE);
-	if (nfsShareOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CREATE_EMPTY_OBJPATH_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsShareOPList = cimom_enumerateInstanceNames(nfsShareOP, cim_false);
-	/*
-	 * A NULL return value means error, an empty list does not.
-	 */
-	if (nfsShareOPList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CIMOM_ENUM_INSTNAMES_FAILURE, ex, &err);
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	cim_freeObjectPath(nfsShareOP);
-
-	if (nfsShareOPList->mDataObject == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	sharedFSInstList = cim_createInstanceList();
-	if (sharedFSInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::ENUM_INSTANCES",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		cim_freeObjectPathList(nfsShareOPList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	for (currentShareOP = nfsShareOPList; currentShareOP != NULL;
-		currentShareOP = currentShareOP->mNext) {
-
-		CCIMObjectPath	*sysElementOP;
-		CCIMInstance	*sharedFSInst;
-
-		sharedFSInst = cim_createInstance(SOLARIS_SHAREDFS);
-		if (sharedFSInst == NULL) {
-			ex = cim_getLastError();
-			util_handleError("SOLARIS_SHAREDFS::ENUM_INSTANCES",
-				CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex,
-				&err);
-			cim_freeObjectPathList(nfsShareOPList);
-			cim_freeInstanceList(sharedFSInstList);
-			return ((CCIMInstanceList *) NULL);
-		}
-
-		/*
-		 * Retrieve the Solaris_Directory instance associated with
-		 * the current Solaris_NFSShare object path.
-		 */
-		sysElementOP = get_associated_directory(
-			currentShareOP->mDataObject, B_FALSE);
-		if (sysElementOP == NULL) {
-			cim_freeObjectPathList(nfsShareOPList);
-			cim_freeInstanceList(sharedFSInstList);
-			cim_freeInstance(sharedFSInst);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		pValue = NULL;
-		if (add_property_to_instance(sharedFSProps[SYS].name,
-			sharedFSProps[SYS].type, pValue, sysElementOP,
-			sharedFSProps[SYS].isKey, sharedFSInst) == cim_false) {
-
-			cim_freeObjectPathList(nfsShareOPList);
-			cim_freeObjectPath(sysElementOP);
-			cim_freeInstanceList(sharedFSInstList);
-			cim_freeInstance(sharedFSInst);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		cim_freeObjectPath(sysElementOP);
-
-		pValue = NULL;
-		if (add_property_to_instance(sharedFSProps[SAME].name,
-			sharedFSProps[SAME].type, pValue,
-			currentShareOP->mDataObject, sharedFSProps[SAME].isKey,
-			sharedFSInst) == cim_false) {
-
-			cim_freeObjectPathList(nfsShareOPList);
-			cim_freeInstanceList(sharedFSInstList);
-			cim_freeInstance(sharedFSInst);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Add the instance to the instance list.
-		 */
-		sharedFSInstList = cim_addInstance(sharedFSInstList,
-			sharedFSInst);
-		if (sharedFSInstList == NULL) {
-			ex = cim_getLastError();
-			util_handleError("SOLARIS_SHAREDFS::ENUM_INSTANCES",
-				CIM_ERR_FAILED, ADD_INSTANCE_FAILURE, ex, &err);
-			cim_freeObjectPathList(nfsShareOPList);
-			cim_freeInstance(sharedFSInst);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-	} /* end for */
-
-	cim_freeObjectPathList(nfsShareOPList);
-	return (sharedFSInstList);
-} /* cp_enumInstances_Solaris_SharedFileSystem */
-
-/*
- * Method: cp_enumInstanceNames_Solaris_SharedFileSystem
- *
- * Description: Enumerates the instances of Solaris_SharedFileSystem on a host.
- * An instance of Solaris_SharedFileSystem is an association that links a share
- * object to the directory that is shared.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of
- *	the class of which to enumerate the instances of.
- *
- * Returns:
- *	- A pointer to a list of object paths corresponding to the
- *	Solaris_SharedFileSystem instances on the host.
- *	- NULL if an error occurred or if there are no instances of
- *	Solaris_SharedFileSystem on the host.  In the case of an error, the
- *	error will be logged.
- */
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_SharedFileSystem(CCIMObjectPath *pOP) {
-	CCIMInstanceList	*sharedFSInstList;
-	CCIMObjectPathList	*sharedFSOPList;
-	int			err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_SHAREDFS::ENUM_INSTANCENAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	sharedFSInstList = cp_enumInstances_Solaris_SharedFileSystem(pOP);
-	if (sharedFSInstList == NULL) {
-		/*
-		 * Either an error occurred or there are no instances of
-		 * Solaris_SharedFileSystem on the system.  In the case of an
-		 * error, the error would have been handled in
-		 * cp_enumInstances_Solaris_SharedFileSystem.
-		 */
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	sharedFSOPList = cim_createObjectPathList(sharedFSInstList);
-
-	cim_freeInstanceList(sharedFSInstList);
-	return (sharedFSOPList);
-} /* cp_enumInstanceNames_Solaris_SharedFileSystem */
-
-/*
- * Method: cp_execQuery_Solaris_SharedFileSystem
- *
- * Description: Queries the host to find those Solaris_SharedFileSystem
- * instances that meet the search criteria.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of
- *	the class of which to query.
- *	- char *selectClause - Not used.
- *	- char *nonJoinExp - Not used.
- *	- char *queryExp - Not used.
- *	- char *queryLang - Not used.
- *
- * Returns:
- *	- A pointer to a list of Solaris_SharedFileSystem instances that match
- *	the criteria.
- *	- NULL if an error occurred or if there are no Solaris_SharedFileSystem
- *	instances that match the criteria.  In the case of an error, the error
- *	will be logged.
- *
- * NOTE: Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_execQuery_Solaris_SharedFileSystem(CCIMObjectPath *pOP,
-	char *selectClause, char *nonJoinExp, char *queryExp, char *queryLang) {
-
-	CCIMInstance		*emptyInst;
-	CCIMInstanceList	*sharedElemInstList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_SHAREDFS::EXEC_QUERY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	sharedElemInstList = cp_enumInstances_Solaris_SharedFileSystem(pOP);
-	if (sharedElemInstList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::EXEC_QUERY",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstanceList(sharedElemInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	sharedElemInstList = cim_prependInstance(sharedElemInstList, emptyInst);
-	if (sharedElemInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::EXEC_QUERY",
-			CIM_ERR_FAILED, PREPEND_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstance(emptyInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (sharedElemInstList);
-} /* cp_execQuery_Solaris_SharedFileSystem */
-
-/*
- * Method: cp_getInstance_Solaris_SharedFileSystem
- *
- * Description: Gets the instance corresponding to the passed in object path.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - The object path containing all the
- *	keys of the instance that is supposed to be returned.
- *
- * Returns:
- *	- A pointer to the instance of Solaris_SharedFileSystem corresponding
- *	to pOP.
- *	- NULL if an error occurred or if the instance doesn't exist on the
- *	host.  In the case of an error, the error will be logged.
- */
-CCIMInstance *
-cp_getInstance_Solaris_SharedFileSystem(CCIMObjectPath *pOP) {
-	CCIMInstanceList	*instList;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*sameOP;
-	CCIMObjectPath		*sysOP;
-	CCIMPropertyList	*sharedFSPropList;
-	int			err = 0;
-
-	if (pOP == NULL || pOP->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_SHAREDFS::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Check if we have the SameElement and SystemElement properties.
-	 */
-	sharedFSPropList = pOP->mKeyProperties;
-	sameOP = util_getKeyValue(sharedFSPropList, sharedFSProps[SAME].type,
-		sharedFSProps[SAME].name, &err);
-	sysOP = util_getKeyValue(sharedFSPropList, sharedFSProps[SYS].type,
-		sharedFSProps[SYS].name, &err);
-
-	if (sameOP == NULL || sysOP == NULL) {
-		util_handleError("SOLARIS_SHAREDFS::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	if (sameOP->mKeyProperties == NULL || sysOP->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_SHAREDFS::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_SharedFileSystem(pOP);
-	if (instList == NULL) {
-		return ((CCIMInstance *)NULL);
-	}
-
-	inst = cim_getInstance(instList, pOP);
-
-	cim_freeInstanceList(instList);
-	return (inst);
-} /* cp_getInstances_Solaris_SharedFileSystem */
-
-/*
- * Method: cp_setInstance_Solaris_SharedFileSystem
- *
- * Description: This method is not supported.  It is not supported because in
- * order to change a Solaris_SharedFileSystem instance the underlying share and
- * directory must be modified.  Those actions must be done on the appropriate
- * share and directory objects, not here.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of the class
- *	of which to set the instance.
- *	- CCIMInstance *pInst - Not used.
- *
- * Returns:
- *	- Always returns cim_false, because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_SharedFileSystem(CCIMObjectPath *pOP,
-	CCIMInstance *pInst) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHAREDFS::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstance_Solaris_SharedFileSystem */
-
-/*
- * Method: cp_setInstanceWithList_Solaris_SharedFileSystem
- *
- * Description: This method is not supported.  It is not supported because in
- * order to change a Solaris_SharedFileSystem instance the underlying share and
- * directory must be modified.  Those actions must be done on the appropriate
- * share and directory objects, not here.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of the class
- *	of which to set the instance.
- *	- CCIMInstance *pInst - Not used.
- *
- * Returns:
- *	- Always returns cim_false, because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_SharedFileSystem(CCIMObjectPath *pOP,
-	CCIMInstance *pInst, char **props, int num_props) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHAREDFS::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstanceWithList_Solaris_SharedFileSystem */
-
-/*
- * Association provider methods
- */
-
-/*
- * Method: cp_associators_Solaris_SharedFileSystem
- *
- * Description: Returns the instances associated, via the
- * Solaris_SharedFileSystem association, to the pObjectName parameter.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing the name of
- *	the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path containing information
- *	(Class Name, Key Properties) about the object whose associated objects
- *	are to be returned.
- *	- char *pResultClass - If specified, only return instances that are of
- *	this class type.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *	- char *pResultRole - If specified, only return instances that are
- *	playing this role in the association.
- *
- * Returns:
- *	- A list of Solaris_NFSShare (if pRole == SystemElement && pObjectName
- *	is a Solaris_Directory object path) or Solaris_Directory (if
- *	pRole == SameElement && pObjectName is a Solaris_NFSShare object path)
- *	instances which are associated to the pObjectName parameter.
- *	- NULL if an error occurred or if there are no instances associated to
- *	the pObjectName passed in.  In the case of an error, the error will be
- *	logged.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_SharedFileSystem(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*returnInstList = NULL;
-	boolean_t		isSystemElement = B_FALSE;
-	int			err = 0;
-
-	/*
-	 * Check if the needed parameters are null.
-	 */
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_SHAREDFS::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	if ((strcasecmp(pObjectName->mName, SOLARIS_DIR) == 0)) {
-		isSystemElement = B_TRUE;
-		/*
-		 * If a value was passed in with pRole and it does not match
-		 * the role that pObjectName actually is then log an invalid
-		 * param error.
-		 */
-		if (pRole != NULL && (strcasecmp(pRole, SYSTEM_ELEMENT) != 0)) {
-			util_handleError("SOLARIS_SHAREDFS::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-	} else if ((strcasecmp(pObjectName->mName, SOLARIS_NFSSHARE) == 0)) {
-		isSystemElement = B_FALSE;
-		if (pRole != NULL && (strcasecmp(pRole, SAME_ELEMENT) != 0)) {
-			util_handleError("SOLARIS_SHAREDFS::ASSOCIATORS",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			return ((CCIMInstanceList *)NULL);
-		}
-	} else {
-		util_handleError("SOLARIS_SHAREDFS::ASSOCIATORS",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	returnInstList = get_associated_instances(pObjectName, isSystemElement);
-
-	return (returnInstList);
-} /* cp_associators_Solaris_SharedFileSystem */
-
-/*
- * Method: cp_associatorNames_Solaris_SharedFileSystem
- *
- * Description: Returns the object paths of the instances on the other side of
- * the association which are associated via the Solaris_SharedFileSystem
- * association and having the passed in parameter, pObjectName, as the opposite
- * key.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pResultClass - If specified, only return instances that are of
- *	this class type.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *	- char *pResultRole - If specified, only return instances that are
- *	playing this role in the association.
- *
- * Returns:
- *	- A list of Solaris_NFSShare (if pRole == SystemElement && pObjectName
- *	is a Solaris_Directory object path) or Solaris_Directory (if
- *	pRole == SameElement && pObjectName is a Solaris_NFSShare object path)
- *	object paths which are associated to the pObjectName parameter.
- *	- NULL if an error occurred or if there are no instances associated to
- *	the pObjectName passed in.  In the case of an error, the error will be
- *	logged.
- */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_SharedFileSystem(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_SHAREDFS::ASSOCIATOR_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList = cp_associators_Solaris_SharedFileSystem(pAssocName,
-		pObjectName, pResultClass, pRole, pResultRole);
-	if (instList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	objPathList = cim_createObjectPathList(instList);
-	if (objPathList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::ASSOCIATOR_NAMES",
-			CIM_ERR_FAILED, CREATE_OBJECT_LIST_FAILURE, ex, &err);
-		cim_freeInstanceList(instList);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	cim_freeInstanceList(instList);
-	return (objPathList);
-} /* cp_associatorNames_Solaris_SharedFileSystem */
-
-/*
- * Method: cp_references_Solaris_SharedFileSystem
- *
- * Description: Returns the Solaris_ShareSharedFileSystem instances that have
- * the passed in parameter, pObjectName, as one of it's keys.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *	- A pointer to a list of Solaris_SharedFileSystem instances.
- *	- NULL if an error occurred or if there are no Solaris_SharedFileSystem
- *	instances having pObjectName as one of it's keys.
- */
-CCIMInstanceList *
-cp_references_Solaris_SharedFileSystem(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_SHAREDFS::REFERENCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Get everything that is related to the pObjectName passed in.
-	 */
-	objPathList = cp_associatorNames_Solaris_SharedFileSystem(pAssocName,
-		pObjectName, NULL, pRole, NULL);
-	if (objPathList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Now use the object paths in the object path list and the pObjectName
-	 * variable to create the association instances.
-	 */
-	if ((strcasecmp(pObjectName->mName, SOLARIS_DIR) == 0)) {
-		/*
-		 * pObjectName is the SystemElement
-		 */
-		instList = create_association_instList(SOLARIS_SHAREDFS,
-			pObjectName,  SYS_ELEMENT, objPathList, SAME_ELEMENT,
-			&err);
-	} else {
-		/*
-		 * pObjectName is the SameElement
-		 */
-		instList = create_association_instList(SOLARIS_SHAREDFS,
-			pObjectName, SAME_ELEMENT, objPathList, SYS_ELEMENT,
-			&err);
-	}
-
-	cim_freeObjectPathList(objPathList);
-
-	return (instList);
-} /* cp_references_Solaris_SharedFileSystem */
-
-/*
- * Method: cp_referenceNames_Solaris_SharedFileSystem
- *
- * Description: Returns the object paths of the Solaris_ShareSharedFileSystem
- * instances that have the passed in parameter, pObjectName, as one of it's
- * keys.
- *
- * Parameters:
- *	- CCIMObjectPath *pAssocName - An object path containing information
- *	about the association that the caller is trying to reach.
- *	- CCIMObjectPath *pObjectName - The object path which contains the
- *	information on whose associated objects are to be returned.
- *	- char *pRole - If specified, this is the role of the pObjectName
- *	object path passed in.  If this is not valid, NULL is returned.
- *
- * Returns:
- *	- A pointer to a list of Solaris_SharedFileSystem object paths.
- *	- NULL if an error occurred or if there are no Solaris_SharedFileSystem
- *	instances having pObjectName as one of it's keys.
- */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_SharedFileSystem(CCIMObjectPath *pAssocName,
-	CCIMObjectPath *pObjectName, char *pRole) {
-
-	CCIMInstanceList	*sharedElemInstList;
-	CCIMObjectPathList	*sharedElemOPList;
-	int			err = 0;
-
-	if (pObjectName == NULL || pObjectName->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_SHAREDFS::REFERENCE_NAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	sharedElemInstList = cp_references_Solaris_SharedFileSystem(pAssocName,
-		pObjectName, pRole);
-	if (sharedElemInstList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	sharedElemOPList = cim_createObjectPathList(sharedElemInstList);
-
-	cim_freeInstanceList(sharedElemInstList);
-
-	return (sharedElemOPList);
-} /* cp_referenceNames_Solaris_SharedFileSystem */
-
-/*
- * Property provider methods
- */
-
-/*
- * Method: cp_getProperty_Solaris_SharedFileSystem
- *
- * Description: Retrieves a certain property from the instance of
- * Solaris_SharedFileSystem on the host that is described by the parameter
- * pOP.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - The object path containing all the
- *	information needed to find the instance in which the property is to
- *	be returned.
- *	- cimchar *pPropName - The name of the property to be found.
- *
- * Returns:
- *	- A pointer to the property corresponding to the name passed in with
- *	pPropName.
- *	- NULL if an error occurred or if the property doesn't exist.  In the
- *	case of an error, the error will be logged.
- */
-CCIMProperty *
-cp_getProperty_Solaris_SharedFileSystem(CCIMObjectPath *pOP, cimchar *pPropName)
-{
-	CCIMInstance	*sharedElemInst;
-	CCIMProperty	*sharedElemProp;
-	int		err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_SHAREDFS::GET_PROPERTY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	sharedElemInst = cp_getInstance_Solaris_SharedFileSystem(pOP);
-	if (sharedElemInst == NULL) {
-		return ((CCIMProperty *)NULL);
-	}
-
-	sharedElemProp = cim_getProperty(sharedElemInst, pPropName);
-	cim_freeInstance(sharedElemInst);
-
-	return (sharedElemProp);
-} /* cp_getProperty_Solaris_SharedFileSystem */
-
-/*
- * Method: cp_setProperty_Solaris_SharedFileSystem
- *
- * Description: This method is not supported.  It is not supported because in
- * order to change a Solaris_SharedFileSystem instance the underlying share and
- * directory must be modified.  Those actions must be done on the appropriate
- * share and directory objects, not here.
- *
- * Parameters:
- *      - CCIMObjectPath *pOP - Not used.
- *      - CCIMProperty *pProp - Not used.
- *
- * Returns:
- *      - Always returns cim_false because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_SharedFileSystem(CCIMObjectPath *pOP,
-	CCIMProperty *pProp) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHAREDFS::SET_PROPERTY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setProperty_Solaris_SharedFileSystem */
-
-/*
- * Method provider methods
- */
-
-/*
- * Method: cp_invokeMethod_Solaris_SharedFileSystem
- *
- * Description: This method is not supported because the provider doesn't have
- * any methods.
- *
- * Parameters:
- *      - CCIMObjectPath* op - Not used.
- *      - cimchar* methodName - Not used.
- *      - CCIMPropertyList* inParams - Not used.
- *      - CCIMPropertyList* outParams - Not used.
- *
- * Returns:
- *      - Always returns null because the method is not supported.
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_SharedFileSystem(CCIMObjectPath* op,
-	cimchar* methodName, CCIMPropertyList* inParams,
-	CCIMPropertyList* outParams) {
-
-	return ((CCIMProperty *)NULL);
-} /* cp_invokeMethod_Solaris_SharedFileSystem */
-
-/*
- * Private methods
- */
-
-/*
- * Method: get_associated_directory
- *
- * Description:
- * This method will return the Solaris_Directory instance or object path
- * associated with the Solaris_NFSShare object path passed in.  The returnInst
- * parameter determines whether an CCIMInstance* or a CCIMObjectPath* is
- * returned.
- *
- * Parameters:
- *	- CCIMObjectPath *nfsShareOP - Solaris_NFSShare object path which to
- *	find the associated Solaris_Directory instance.
- *	- boolean_t returnInst - The value which determines whether to return
- *	a Solaris_Directory instance or an object path.
- *
- * Returns:
- *	- If returnInst == B_TRUE, a pointer to a Solaris_Directory instance.
- *	If returnInst == B_FALSE, a pointer to a Solaris_Directory object path.
- *	- NULL is returned if an error occurred or if there are no
- *	Solaris_Directory instances associated to the Solaris_NFSShare object
- *	path passed in.
- */
-static inst_or_objPath
-get_associated_directory(CCIMObjectPath *nfsShareOP, boolean_t returnInst) {
-	CCIMObjectPath	*dirOP;
-	CCIMInstance	*dirInst;
-	CCIMException	*ex;
-	CCIMObjectPath	*propOP;
-	CIMType		propType;
-	CIMBool		propIsKey;
-	cimchar		*propName;
-	cimchar		*propValue;
-	char		*name;
-	int		err = 0;
-
-	/*
-	 * Retrieve the Name key property value from the Solaris_NFSShare
-	 * object path passed in with nfsShareOP.
-	 */
-	name = util_getKeyValue(nfsShareOP->mKeyProperties, string, NAME, &err);
-	if (name == NULL || err != 0) {
-		util_handleError("SOLARIS_SHAREDFS::GET_ASSOC_DIR",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return (NULL);
-	}
-
-	dirInst = cim_createInstance(SOLARIS_DIR);
-	if (dirInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::GET_ASSOC_DIR",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		return (NULL);
-	}
-
-	/*
-	 * Create Name property and add it to the Solaris_Directory instance
-	 */
-	propName = NAME;
-	propType = string;
-	propValue = name;
-	propOP = NULL;
-	propIsKey = cim_true;
-	if (add_property_to_instance(propName, propType, propValue,
-		propOP, propIsKey, dirInst) == cim_false) {
-
-		cim_freeInstance(dirInst);
-		return (NULL);
-	}
-
-	/*
-	 * Create the Solaris_Directory object path.
-	 */
-	dirOP = cim_createObjectPath(dirInst);
-	cim_freeInstance(dirInst);
-	if (dirOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::GET_ASSOC_DIR",
-			CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE, ex, &err);
-		return (NULL);
-	}
-
-	/*
-	 * Must use cimom_getInstance to determine if the directory exists.
-	 */
-	dirInst = cimom_getInstance(dirOP, cim_false, cim_false, cim_false,
-		cim_false, NULL, 0);
-	cim_freeObjectPath(dirOP);
-	/*
-	 * A NULL return value means error, an empty list does not.
-	 */
-	if (dirInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::GET_ASSOC_DIR",
-			CIM_ERR_FAILED, CIMOM_GET_INST_FAILURE, ex, &err);
-		return (NULL);
-	}
-
-	if (dirInst->mProperties == NULL) {
-		cim_freeInstance(dirInst);
-		return (NULL);
-	}
-
-	/*
-	 * Work around for cimom bug 4649100.
-	 */
-	if (!set_dir_keyProperties_to_true(dirInst)) {
-		cim_freeInstance(dirInst);
-		return (NULL);
-	}
-
-	if (returnInst == B_TRUE)
-		return (dirInst);
-
-	/*
-	 * Create the correct Solaris_Directory object path.
-	 */
-	dirOP = cim_createObjectPath(dirInst);
-	if (dirOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::GET_ASSOC_DIR",
-			CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE, ex, &err);
-		cim_freeInstance(dirInst);
-		return (NULL);
-	}
-
-	cim_freeInstance(dirInst);
-	return (dirOP);
-} /* get_associated_directory */
-
-/*
- * Method: get_associated_instances
- *
- * Description:
- * This method will get the instances associated to the object passed in.
- * The result role is the role the Instances to be returned in the instance
- * list are to play regarding the Solaris_SharedFileSystem association.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - The object path of which to get the associated
- *	instances.
- *	- boolean_t isSystemElement - Whether or not the pObjectName is the
- *	SystemElement.  If isSystemElement == B_FALSE, pObjectName is the
- *	SameElement.
- * Returns:
- *	- A pointer to a list of Solaris_NFSShare or Solaris_Directory
- *	instances depending on the parameters passed in.
- *	- NULL if an error occurred or if there are no instances associated
- *	with the object path passed in.
- */
-
-static CCIMInstanceList *
-get_associated_instances(CCIMObjectPath *pOP, boolean_t isSystemElement) {
-	CCIMInstanceList	*returnInstList;
-	CCIMInstance		*assocInst;
-	CCIMException		*ex;
-	int			err = 0;
-
-	returnInstList = cim_createInstanceList();
-	if (returnInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::GET_ASSOC_INST",
-			CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Determine if we are supposed to return the SameElement or
-	 * SystemElement instances by checking isSystemElement.
-	 */
-	if (isSystemElement == B_TRUE) {
-		/*
-		 * pOP is a Solaris_Directory object path so find the associated
-		 * Solaris_NFSShare instances.  There should only be one.
-		 */
-		assocInst = get_associated_share(pOP);
-	} else {
-		/*
-		 * pOP is a Solaris_NFSShare object path so find the associated
-		 * Solaris_Directory instances.  There should only be one.
-		 */
-		assocInst = get_associated_directory(pOP, B_TRUE);
-	}
-
-	if (assocInst == NULL) {
-		cim_freeInstanceList(returnInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Add the instance to the instance list.
-	 */
-	returnInstList = cim_addInstance(returnInstList, assocInst);
-	if (returnInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::GET_ASSOC_INST",
-			CIM_ERR_FAILED, ADD_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstance(assocInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (returnInstList);
-} /* get_associated_instances */
-
-/*
- * Method: get_associated_share
- *
- * Description:
- * This method will return the Solaris_NFSShare instance or reference property
- * associated with the Solaris_Directory object path passed in.  The returnInst
- * parameter determines whether an CCIMInstance or a CCIMProperty is returned.
- *
- * Parameters:
- *      - CCIMObjectPath *nfsShareOP - Solaris_Directory object path which to
- *      find the associated Solaris_NFSShare instance.
- *      - boolean_t returnInst - The value which determines whether to return
- *      a Solaris_NFSShare instance or a reference property.
- *
- * Returns:
- *      - If returnInst == B_TRUE, a pointer to a Solaris_NFSShare instance.
- *      If returnInst == B_FALSE, a pointer to a Solaris_NFSShare reference
- *      property.
- *      - NULL is returned if an error occurred or if there are no
- *      Solaris_NFSShare instances associated to the Solaris_Directory object
- *      path passed in.
- */
-static CCIMInstance *
-get_associated_share(CCIMObjectPath *dirOP) {
-	CCIMObjectPath	*nfsShareOP;
-	CCIMInstance	*nfsShareInst;
-	CCIMException	*ex;
-	CCIMObjectPath	*propOP;
-	CIMType		propType;
-	CIMBool		propIsKey;
-	cimchar		*propName;
-	cimchar		*propValue;
-	char		*name;
-	int		err = 0;
-
-	/*
-	 * Retrieve the Name key property value from the Solaris_Directory
-	 * object path passed in with dirOP.
-	 */
-	name = util_getKeyValue(dirOP->mKeyProperties, string, NAME, &err);
-	if (name == NULL || err != 0) {
-		util_handleError("SOLARIS_SHAREDFS::GET_ASSOC_SHARE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	nfsShareInst = cim_createInstance(SOLARIS_NFSSHARE);
-	if (nfsShareInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::GET_ASSOC_SHARE",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	propName = NAME;
-	propType = string;
-	propValue = name;
-	propOP = NULL;
-	propIsKey = cim_true;
-	if (add_property_to_instance(propName, propType, propValue,
-		propOP, propIsKey, nfsShareInst) == cim_false) {
-
-		cim_freeInstance(nfsShareInst);
-		return ((CCIMInstance *)NULL);
-	}
-
-	nfsShareOP = cim_createObjectPath(nfsShareInst);
-	if (nfsShareOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::GET_ASSOC_SHARE",
-			CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE, ex, &err);
-		cim_freeInstance(nfsShareInst);
-		return ((CCIMInstance *)NULL);
-	}
-
-	cim_freeInstance(nfsShareInst);
-
-	/*
-	 * Use cimom_getInstance to determine if the share exists.
-	 */
-	nfsShareInst = cimom_getInstance(nfsShareOP, cim_false, cim_false,
-		cim_false, cim_false, NULL, 0);
-
-	/*
-	 * A NULL return value indicates an error, an empty list does not.
-	 */
-	if (nfsShareInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_SHAREDFS::GET_ASSOC_SHARE",
-			CIM_ERR_FAILED, CIMOM_GET_INST_FAILURE, ex, &err);
-		cim_freeObjectPath(nfsShareOP);
-		return ((CCIMInstance *)NULL);
-	}
-
-	cim_freeObjectPath(nfsShareOP);
-
-	if (nfsShareInst->mProperties == NULL) {
-		return ((CCIMInstance *)NULL);
-	}
-
-	return (nfsShareInst);
-
-} /* get_associated_share */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/Solaris_SharedFileSystem.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SOLARIS_SHAREDFILESYSTEM_H
-#define	_SOLARIS_SHAREDFILESYSTEM_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimomhandle.h>
-#include "nfsprov_include.h"
-
-#define	PROPCOUNT 2
-
-static nfs_prov_prop_t sharedFSProps[] = {
-#define	SAME 0
-	{"SameElement", cim_true, reference},
-#define	SYS (SAME + 1)
-	{"SystemElement", cim_true, reference}
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_SHAREDFILESYSTEM_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/common_functions.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "common_functions.h"
-#include "util.h"
-
-/*
- * Public methods
- */
-
-/*
- * Method: create_association_instList
- *
- * Description: Creates an instance list for the association class as named in
- * the pClassName parameter.
- *
- * Parameters:
- *	- cimchar *pClassName - The name of the association class to create
- *	the instances of.
- *	- CCIMObjectPath *pObjectName - One of the references for the
- *	association.
- *	- char *pObjectNameRole - The role that the pObjectName parameter plays
- *	in the association.
- *	- CCIMObjectPathList *pObjPathList - The other reference for the
- *	association
- *	- char *pRole - The role that the object paths in the
- *	CCIMObjectPathList play in the association.
- *
- * Returns:
- *	- CCIMInstanceList * - The instance list created from the parameters.
- *	- NULL if an error occurred.
- */
-CCIMInstanceList *
-create_association_instList(cimchar *pClassName, CCIMObjectPath *pObjectName,
-	char *pObjectNameRole, CCIMObjectPathList *pObjPathList, char *pRole,
-	int *errp) {
-
-	CCIMObjectPathList	*currentObjPath;
-	CCIMProperty		*objectNameProp;
-	CCIMInstanceList	*instList;
-	CCIMException		*ex;
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("CREATE_ASSOC_INSTLIST", CIM_ERR_FAILED,
-			CREATE_INSTANCE_LIST_FAILURE, ex, errp);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	objectNameProp = cim_createReferenceProperty(pObjectNameRole,
-		pObjectName, cim_true);
-	if (objectNameProp == NULL) {
-		ex = cim_getLastError();
-		util_handleError("CREATE_ASSOC_INSTLIST", CIM_ERR_FAILED,
-			CREATE_REFPROP_FAILURE, ex, errp);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	currentObjPath = pObjPathList;
-
-	while (currentObjPath != NULL) {
-		CCIMInstance	*inst;
-		CCIMProperty	*objPathListProp;
-		CIMBool		returned_val;
-
-		/*
-		 * Create the property from the current object path in the list.
-		 */
-		objPathListProp = cim_createReferenceProperty(pRole,
-			currentObjPath->mDataObject, cim_true);
-		if (objPathListProp == NULL) {
-			ex = cim_getLastError();
-			util_handleError("CREATE_ASSOC_INSTLIST",
-				CIM_ERR_FAILED, CREATE_REFPROP_FAILURE, ex,
-				errp);
-			cim_freeInstanceList(instList);
-			cim_freeProperty(objectNameProp);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Create the instance of the class name as passed in with
-		 * pClassName and add the properties to the instance.
-		 */
-		inst = cim_createInstance(pClassName);
-		if (inst == NULL) {
-			ex = cim_getLastError();
-			util_handleError("CREATE_ASSOC_INSTLIST",
-				CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex,
-				errp);
-			cim_freeInstanceList(instList);
-			cim_freeProperty(objectNameProp);
-			cim_freeProperty(objPathListProp);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		returned_val = cim_addProperty(inst, objectNameProp);
-		if (returned_val == cim_false) {
-			ex = cim_getLastError();
-			util_handleError("CREATE_ASSOC_INSTLIST",
-				CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-			cim_freeInstance(inst);
-			cim_freeInstanceList(instList);
-			cim_freeProperty(objectNameProp);
-			cim_freeProperty(objPathListProp);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		returned_val = cim_addProperty(inst, objPathListProp);
-		if (returned_val == cim_false) {
-			ex = cim_getLastError();
-			util_handleError("CREATE_ASSOC_INSTLIST",
-				CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-			cim_freeInstance(inst);
-			cim_freeInstanceList(instList);
-			cim_freeProperty(objPathListProp);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-			ex = cim_getLastError();
-			util_handleError("CREATE_ASSOC_INSTLIST",
-				CIM_ERR_FAILED, ADD_INSTANCE_FAILURE, ex, errp);
-			cim_freeInstance(inst);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		currentObjPath = currentObjPath->mNext;
-	}
-
-	return (instList);
-} /* create_association_instList */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/common_functions.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_COMMON_FUNCTIONS_H
-#define	_COMMON_FUNCTIONS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-
-/*
- * Method declaration
- */
-
-/*
- * Method: create_association_instList
- *
- * Description: This method creates instances of the association <pClassName>
- * out of the <pObjectName> and <pObjPathList> parameters.  The roles of
- * <pObjectName> and <pObjPathList> are defined by <pObjectNameRole> and
- * <pRole> respectively.
- *
- * Parameters:
- * cimchar *pClassName - The name of the association class of which to create
- * 	the instances of.
- * CCIMObjectPath *pObjectName - One of the association keys that will is to be
- *	associated to one or more objects.
- * cimchar *pObjectNameRole - The role of <pObjectName> in the association.
- *	For example, this could be "Antecedent", "Dependent", "Element", etc.
- * CCIMObjectPathList *pObjPathList - The other association keys that will
- * be associated to <pObjectName>.
- * cimchar *pRole - The role of <pObjPathList> in the association.
- * int *errp - The error pointer.
- *
- * Returns:
- * An instance list filled with instances of the <pClassName> association.
- */
-CCIMInstanceList	*create_association_instList(cimchar *pClassName,
-				CCIMObjectPath *pObjectName,
-				cimchar *pObjectNameRole,
-				CCIMObjectPathList *pObjPathList,
-				cimchar *pRole, int *errp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _COMMON_FUNCTIONS_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/assoc/nfs_mount_attr.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_NFS_MOUNT_ATTR_H
-#define	_NFS_MOUNT_ATTR_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * Public data type declarations
- */
-
-/*
- * NFS mount attributes
- */
-
-#define	NFS_ATTRCACHE_FALSE "noac"
-#define	NFS_ATTRCACHEDIRMAX "acdirmax="
-#define	NFS_ATTRCACHEDIRMIN "acdirmin="
-#define	NFS_ATTRCACHEFILESMAX "acregmax="
-#define	NFS_ATTRCACHEFILESMIN "acregmin="
-#define	NFS_ENABLEQUOTA_TRUE "quota"
-#define	NFS_ENABLEQUOTA_FALSE "noquota"
-#define	NFS_FORCEDIRECTIO_TRUE "forcedirectio"
-#define	NFS_FORCEDIRECTIO_FALSE "noforcedirectio"
-#define	NFS_GRPID_TRUE "grpid"
-#define	NFS_HARDMNT_TRUE "hard"
-#define	NFS_HARDMNT_FALSE "soft"
-#define	NFS_INTR_TRUE "intr"
-#define	NFS_INTR_FALSE "nointr"
-#define	NFS_MAXRETRANSATTEMPTS "retrans="
-#define	NFS_MNTFAILRETRIES "retry="
-#define	NFS_NOCTO_TRUE "nocto"
-#define	NFS_NOMNTTABENT_TRUE "-m"
-#define	NFS_NOSUID_FALSE "suid"
-#define	NFS_NOSUID_TRUE "nosuid"
-#define	NFS_OVERLAY "-O"
-#define	NFS_POSIX_TRUE "posix"
-#define	NFS_PROTO "proto="
-#define	NFS_PUBLIC_TRUE "public"
-#define	NFS_READBUFFSIZE "rsize="
-#define	NFS_READONLY_TRUE "ro"
-#define	NFS_READONLY_FALSE "rw"
-#define	NFS_RETRANSTIMEO "timeo="
-#define	NFS_FOREGROUND_TRUE "fg"
-#define	NFS_FOREGROUND_FALSE "bg"
-#define	NFS_SECMODE "sec="
-#define	NFS_SERVERCOMMPORT "port="
-#define	NFS_VERS "vers="
-#define	NFS_WRITEBUFFSIZE "wsize="
-#define	NFS_XATTR_TRUE "xattr"
-#define	NFS_XATTR_FALSE "noxattr"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _NFS_MOUNT_ATTR_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/common/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	nfsprov_methods.o \
-		createprop_methods.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/lib/libfsmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/include \
-		$(SRC)/cmd/wbem/provider/c/filesystems/common/cmdgeneration
-
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _common.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-
-catalog:	$(POFILE)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-install:	all
-
-lint:		$(LINT_OBJS)
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/common/createprop_methods.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,347 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include <string.h>
-#include "createprop_methods.h"
-#include "messageStrings.h"
-#include "nfs_providers_msgstrings.h"
-#include "nfs_provider_names.h"
-#include "nfs_keys.h"
-#include "libfsmgt.h"
-#include "util.h"
-
-#define	MAXSIZE	256
-
-/*
- * Method: add_property_to_instance
- *
- * Description: Creates a property corresponding to the input parameters and
- * adds it to the instance passed in.
- *
- * Parameters:
- *	- cimchar *pName - The name of the property to be created.
- *	- CIMType pType - The type of the property.
- *	- cimchar *pValue - The value of the property if it is NOT to be a
- *	reference property.
- *	- CCIMObjectPath *pOP - The value of the property if it is to be a
- *	reference property.
- *	- CIMBool pIsKey - A boolean value representing whether or not the
- *	property is a key.
- *	- CCIMInstance *pInst - The instance that the property is added to.
- *
- * Returns:
- *	- A CIMBool which is true if the property was added to the instance and
- * 	false if it was not.
- */
-CIMBool
-add_property_to_instance(cimchar *pName, CIMType pType, cimchar *pValue,
-	CCIMObjectPath *pOP, CIMBool pIsKey, CCIMInstance *pInst) {
-
-	CCIMProperty	*prop;
-	CCIMException	*ex;
-	int		err = 0;
-
-	if (pOP == NULL) {
-		prop = cim_createProperty(pName, pType, pValue, NULL, pIsKey);
-	} else {
-		prop = cim_createReferenceProperty(pName, pOP, pIsKey);
-	}
-
-	if (prop == NULL) {
-		ex = cim_getLastError();
-		util_handleError(ADD_PROP_TO_INST, CIM_ERR_FAILED,
-			CREATE_PROPERTY_FAILURE, ex, &err);
-		return (cim_false);
-	}
-
-	if (cim_addProperty(pInst, prop) == cim_false) {
-		ex = cim_getLastError();
-		util_handleError(ADD_PROP_TO_INST, CIM_ERR_FAILED,
-			ADD_PROPERTY_FAILURE, ex, &err);
-		cim_freeProperty(prop);
-		return (cim_false);
-	}
-
-	return (cim_true);
-} /* add_property_to_instance */
-
-/*
- * Method: add_property_to_list
- *
- * Description: Creates a property corresponding to the input parameters and
- * adds it to the property list passed in.
- *
- * Parameters:
- *      - cimchar *pName - The name of the property to be created.
- *      - CIMType pType - The type of the property.
- *      - cimchar *pValue - The value of the property if it is NOT to be a
- *      reference property.
- *      - CCIMObjectPath *pOP - The value of the property if it is to be a
- *      reference property.
- *      - CIMBool pIsKey - A boolean value representing whether or not the
- *      property is a key.
- *      - CCIMPropertyList *pPropList - The property list that the property is
- *	added to.
- *
- * Returns:
- *	- A pointer to the property list that the property was added to.
- *	- NULL if an error occurred.
- *
- * NOTE: Upon error, the passed in CCIMPropertyList*, pPropList, is freed.
- * Since this is a wrapper for the cim_addPropertyToPropertyList function
- * this is done to be consistent with the way that the CIM C API works.
- * Upon error, the CCIMPropertyList passed into cim_addPropertyToPropertyList
- * is freed.
- */
-CCIMPropertyList *
-add_property_to_list(cimchar *pName, CIMType pType, cimchar *pValue,
-	CCIMObjectPath *pOP, CIMBool pIsKey, CCIMPropertyList *pPropList) {
-
-	CCIMProperty	*prop;
-	CCIMException	*ex;
-	int		err = 0;
-
-	if (pOP == NULL) {
-		prop = cim_createProperty(pName, pType, pValue, NULL, pIsKey);
-	} else {
-		prop = cim_createReferenceProperty(pName, pOP, pIsKey);
-	}
-
-	/*
-	 * If NULL, an error was encountered.
-	 */
-	if (prop == NULL) {
-		ex = cim_getLastError();
-		util_handleError(ADD_PROP_TO_LIST, CIM_ERR_FAILED,
-			CREATE_PROPERTY_FAILURE, ex, &err);
-		cim_freePropertyList(pPropList);
-		return ((CCIMPropertyList *)NULL);
-	}
-
-	pPropList = cim_addPropertyToPropertyList(pPropList, prop);
-	if (pPropList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(ADD_PROP_TO_LIST, CIM_ERR_FAILED,
-			ADD_PROP_TO_PROPLIST_FAILURE, ex, &err);
-		cim_freeProperty(prop);
-		return ((CCIMPropertyList *)NULL);
-	}
-
-	/*
-	 * Debugging...
-	 */
-	if (pValue != NULL) {
-		cim_logDebug("add_property_to_list", "Adding %s, value %s",
-			pName, pValue);
-	}
-
-	return (pPropList);
-} /* add_property_to_list */
-
-/*
- * Method: get_property_from_opt_string
- *
- * Description: Determines if a property exists in the mount option string and
- * returns a value of the property to be used in creating a CCIMProperty.
- *
- * Parameters:
- *	- char *mntopts - The mount option string to search.
- *	- char *option - The option to search for.
- *	- boolean_t optHasEquals - A boolean telling the method whether or not
- *	the option being searched for contains the "=" character.
- *	- int defaultValue - The value of the property if it is not found in
- *	the option string.
- *
- * Returns:
- *      - The string value of the property found.
- *	- NULL if an error occurred.
- *
- * NOTE: The caller must free space allocated for return value.
- */
-cimchar *
-get_property_from_opt_string(char *mntopts, char *option,
-	boolean_t optHasEquals, int defaultValue) {
-
-	cimchar	propValue[MAXSIZE];
-	cimchar *retVal;
-	char	*optionString = NULL;
-	char	*optionFound;
-	int	err = 0;
-
-	optionString = strdup(mntopts);
-	if (optionString == NULL) {
-		util_handleError(GET_PROP_FROM_OPTS,
-			CIM_ERR_LOW_ON_MEMORY, LOW_MEMORY, NULL, &err);
-		return (NULL);
-	} else {
-		optionFound = fs_parse_optlist_for_option(optionString,
-			option, &err);
-		/*
-		 * Was the option found in the option string?
-		 * If it was, propValue = true or propValue = optionFound.
-		 */
-		if (optionFound != NULL) {
-			if (optHasEquals) {
-				(void) snprintf(propValue, MAXSIZE, "%s",
-				    optionFound);
-				free(optionFound);
-			} else {
-				(void) snprintf(propValue, MAXSIZE, "%d",
-				    B_TRUE);
-				free(optionFound);
-			}
-		} else {
-			/*
-			 * Since the option was not found we know that
-			 * propValue = false or the default value.
-			 */
-			if (optHasEquals)  {
-				(void) snprintf(propValue, MAXSIZE, "%d",
-				    defaultValue);
-			} else {
-				(void) snprintf(propValue, MAXSIZE, "%d",
-				    B_FALSE);
-			}
-		}
-	}
-
-	retVal = strdup(propValue);
-	if (retVal == NULL) {
-		util_handleError(GET_PROP_FROM_OPTS,
-			CIM_ERR_LOW_ON_MEMORY, LOW_MEMORY, NULL, &err);
-		return (NULL);
-	}
-
-	free(optionString);
-	return (retVal);
-} /* get_property_from_opt_string */
-
-/*
- * Method set_dir_keyProperties_to_true
- *
- * Helper function to work around cimom bug 4649100 which causes
- * cimom_getInstance to return the instance with the value of
- * keyProperty set to cim_false instead of cim_true.
- */
-CIMBool
-set_dir_keyProperties_to_true(CCIMInstance *dirInst) {
-	CCIMProperty		*tempProp;
-	CCIMPropertyList	*tempPList;
-	CIMBool			return_value = cim_false;
-
-	for (tempPList = dirInst->mProperties; tempPList != NULL;
-		tempPList = tempPList->mNext) {
-
-		tempProp = tempPList->mDataObject;
-		if (strcmp(tempProp->mName, CREATION_CLASS) == 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		} else if (strcmp(tempProp->mName, NAME) == 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		} else if (strcmp(tempProp->mName, CS_CREATION_CLASS)
-			== 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		} else if (strcmp(tempProp->mName, CSNAME) == 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		} else if (strcmp(tempProp->mName, FS_CREATION_CLASS) == 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		} else if (strcmp(tempProp->mName, FSNAME) == 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		}
-	}
-	return (return_value);
-} /* set_dir_keyProperties_to_true */
-
-/*
- * Method set_share_keyProperties_to_true
- *
- * Helper function to work around cimom bug 4649100 which causes
- * cimom_getInstance to return the instance with the value of
- * keyProperty set to cim_false instead of cim_true.
- */
-CIMBool
-set_share_keyProperties_to_true(CCIMInstance *nfsShareInst) {
-	CCIMProperty		*tempProp;
-	CCIMPropertyList	*tempPList;
-	CIMBool			return_value = cim_false;
-
-	for (tempPList = nfsShareInst->mProperties; tempPList != NULL;
-		tempPList = tempPList->mNext) {
-
-		tempProp = tempPList->mDataObject;
-		if (strcmp(tempProp->mName, CREATION_CLASS) == 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		} else if (strcmp(tempProp->mName, NAME) == 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		} else if (strcmp(tempProp->mName, SYS_CREATION_CLASS)
-			== 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		} else if (strcmp(tempProp->mName, SYSTEM) == 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		}
-	}
-	return (return_value);
-} /* set_share_keyProperties_to_true */
-
-/*
- * Method set_shareSec_keyProperties_to_true
- *
- * Helper function to work around cimom bug 4649100 which causes
- * cimom_getInstance to return the instance with the value of
- * keyProperty set to cim_false instead of cim_true.
- */
-CIMBool
-set_shareSec_keyProperties_to_true(CCIMInstance *nfsShareSecInst) {
-	CCIMProperty		*tempProp;
-	CCIMPropertyList	*tempPList;
-	CIMBool			return_value = cim_false;
-
-	for (tempPList = nfsShareSecInst->mProperties; tempPList != NULL;
-		tempPList = tempPList->mNext) {
-
-		tempProp = tempPList->mDataObject;
-		if (strcmp(tempProp->mName, MODE) == 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		} else if (strcmp(tempProp->mName, SETTING_ID_LOWCASE) == 0) {
-			tempProp->mKeyProperty = cim_true;
-			return_value = cim_true;
-		}
-	}
-	return (return_value);
-} /* set_shareSec_keyProperties_to_true */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/common/createprop_methods.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_CREATEPROP_METHODS_H
-#define	_CREATEPROP_METHODS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-
-/*
- * Method declarations
- */
-CIMBool		add_property_to_instance(cimchar *pName, CIMType pType,
-			cimchar *pValue, CCIMObjectPath *pOP, CIMBool pIsKey,
-			CCIMInstance *pInst);
-
-CCIMPropertyList	*add_property_to_list(cimchar *pName, CIMType pType,
-				cimchar *pValue, CCIMObjectPath *pOP,
-				CIMBool pIsKey, CCIMPropertyList *propList);
-
-cimchar		*get_property_from_opt_string(char *mntopts, char *option,
-			boolean_t optHasEquals, int defaultValue);
-CIMBool		set_dir_keyProperties_to_true(CCIMInstance *dirInst);
-CIMBool		set_share_keyProperties_to_true(CCIMInstance *nfsShareInst);
-CIMBool		set_shareSec_keyProperties_to_true(
-			CCIMInstance *nfsShareSecInst);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CREATEPROP_METHODS_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/common/nfsprov_methods.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,461 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "nfsprov_methods.h"
-#include "util.h"
-#include "libfsmgt.h"
-#include "util.h"
-#include "cmdgen.h"
-#include "nfs_providers_msgstrings.h"
-#include "messageStrings.h"
-#include "nfs_provider_names.h"
-#include <sys/types.h>
-
-CCIMProperty *exec_command(char *cmd);
-
-/*
- * Public methods
- */
-
-/*
- * Method: create_outParams_list
- *
- * Description: Creates a string or a string array property to be added to the
- * passed in CCIMPropertyList*, outParams.
- *
- * Parameters:
- *	- CCIMPropertyList *outParams - The property list to add the string
- *	array property to.
- *	- char **list - The string array to add to outParams.
- *	- int num_elements - The number of elements in list.
- *	- char *single_value - The string to add to outParams.
- *
- * Returns:
- *	- Nothing
- */
-void
-create_outParams_list(CCIMPropertyList *outParams, char **list,
-	int num_elements, char *single_value) {
-
-	CCIMProperty		*prop = NULL;
-	CCIMException		*ex;
-	cimchar			*outParamValues;
-	int			err = 0;
-
-	if (list != NULL) {
-		/*
-		 * cim_encodeStringArray converts an array or strings into a
-		 * regular string for placement into the CCIMProperty.
-		 */
-		outParamValues = cim_encodeStringArray(list, num_elements);
-		if (outParamValues == NULL) {
-			ex = cim_getLastError();
-			util_handleError(CREATE_OUT_PARAMS, CIM_ERR_FAILED,
-				ENCODE_STRING_ARRAY_FAILURE, ex, &err);
-			outParams = NULL;
-			return;
-		}
-		prop = cim_createProperty("outParams", string_array,
-			outParamValues, NULL, cim_false);
-	} else if (single_value != NULL) {
-		prop = cim_createProperty("outParams", string, single_value,
-			NULL, cim_false);
-	}
-
-	if (prop == NULL) {
-		ex = cim_getLastError();
-		util_handleError(CREATE_OUT_PARAMS, CIM_ERR_FAILED,
-			CREATE_PROPERTY_FAILURE, ex, &err);
-		outParams = NULL;
-		free(outParamValues);
-		return;
-	}
-
-	outParams = cim_addPropertyToPropertyList(outParams, prop);
-	if (outParams == NULL) {
-		ex = cim_getLastError();
-		util_handleError(CREATE_OUT_PARAMS, CIM_ERR_FAILED,
-			ADD_PROP_TO_PROPLIST_FAILURE, ex, &err);
-		return;
-	}
-
-} /* create_outParams_list */
-
-/*
- * Method: del_all_with_duplicate_path
- *
- * Description: Deletes all /etc/dfs/dfstab entries having the same path as
- * defined with the passed in parameter list.
- *
- * Parameters:
- *	- CCIMPropertyList *inParams - The input parameter list containing
- *	the path of the /etc/dfs/dfstab entries to delete.
- *
- * Returns:
- *	- CCIMProperty * - A property defining the success or failure of the
- *	method.
- */
-CCIMProperty *
-del_all_with_duplicate_path(CCIMPropertyList *inParams) {
-	int		err = 0;
-	CCIMProperty	*pathProp;
-	char		*path;
-
-	if (inParams == NULL) {
-		util_handleError(DELETE_DUP_PATHS, CIM_ERR_INVALID_PARAMETER,
-			NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	pathProp = inParams->mDataObject;
-	if (pathProp == NULL) {
-		util_handleError(DELETE_DUP_PATHS, CIM_ERR_INVALID_PARAMETER,
-			DEL_DUPLICATE_PATHS_FAILURE, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	path = pathProp->mValue;
-
-	if (fs_del_All_DFStab_ents_with_Path(path, &err) == NULL) {
-		if (err != 0) {
-			util_handleError(DELETE_DUP_PATHS, CIM_ERR_FAILED,
-				DEL_DUPLICATE_PATHS_FAILURE, NULL, &err);
-			return ((CCIMProperty *)NULL);
-		}
-	}
-	return (cim_createProperty("Status", sint32, "0", NULL, cim_false));
-}
-
-/*
- * Method: get_default_secmode
- *
- * Description: Retrieves the default security mode for the system and places
- * it in the passed in outParams property list.
- *
- * Parameters:
- *	- CCIMPropertyList *outParams - The property list for which to add the
- *	security mode property.
- *
- * Returns:
- *	- CCIMProperty * - A property defining the success or failure of the
- *	method.
- */
-CCIMProperty *
-get_default_secmode(CCIMPropertyList *outParams) {
-	char    *defmode;
-	int	err = 0;
-
-	defmode = nfssec_get_default_secmode(&err);
-	if (defmode == NULL) {
-		util_handleError(GET_DEF_SECMODE, CIM_ERR_FAILED,
-			GET_DEFAULT_SECMODE_FAILURE, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	create_outParams_list(outParams, NULL, NULL, defmode);
-	if (outParams == NULL) {
-		/*
-		 * An error occurred in create_outParams_list.
-		 */
-		free(defmode);
-		return ((CCIMProperty *)NULL);
-	}
-
-	free(defmode);
-	return (cim_createProperty("Status", sint32, "0", NULL, cim_false));
-} /* get_default_secmode */
-
-/*
- * Method: get_netconfig_list
- *
- * Description: Retrieves the network id list from /etc/netconfig and places
- * it in the passed in outParams property list.
- *
- * Parameters:
- *	- CCIMPropertyList *outParams - The property list for which to add the
- *	network id list.
- *
- * Returns:
- *	- CCIMProperty * - A property defining the success or failure of the
- *	method.
- */
-CCIMProperty *
-get_netconfig_list(CCIMPropertyList *outParams) {
-	char    **netid_list;
-	int	num_elements = 0;
-	int	err = 0;
-
-	netid_list = netcfg_get_networkid_list(&num_elements, &err);
-	if (netid_list == NULL) {
-		util_handleError(GET_NETCFG_LIST, CIM_ERR_FAILED,
-			GET_NETID_LIST_FAILURE, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	create_outParams_list(outParams, netid_list, num_elements, NULL);
-	netcfg_free_networkid_list(netid_list, num_elements);
-	if (outParams == NULL) {
-		/*
-		 * An error occurred in create_outParams_list.  It was
-		 * handled in that function so just return NULL.
-		 */
-		return ((CCIMProperty *)NULL);
-	}
-
-	return (cim_createProperty("Status", sint32, "0", NULL,
-		cim_false));
-} /* get_netconfig_list */
-
-/*
- * Method: get_nfssec_list
- *
- * Description: Retrieves the list of nfs security modes from /etc/nfssec.conf
- * and places it in the passed in outParams property list.
- *
- * Parameters:
- *	- CCIMPropertyList *outParams - The property list for which to add the
- *	nfs security modes list.
- *
- * Returns:
- *	- CCIMProperty * - A property defining the success or failure of the
- *	method.
- */
-CCIMProperty *
-get_nfssec_list(CCIMPropertyList *outParams) {
-	char    **secmode_list;
-	int	num_elements = 0;
-	int	err = 0;
-
-	secmode_list = nfssec_get_nfs_secmode_list(&num_elements, &err);
-	if (secmode_list == NULL) {
-		util_handleError(GET_NFSSEC_LIST, CIM_ERR_FAILED,
-			GET_SECMODE_LIST_FAILURE, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	create_outParams_list(outParams, secmode_list, num_elements, NULL);
-	if (outParams == NULL) {
-		/*
-		 * An error occurred in create_outParams_list.
-		 */
-		nfssec_free_secmode_list(secmode_list, num_elements);
-		return ((CCIMProperty *)NULL);
-	}
-
-	nfssec_free_secmode_list(secmode_list, num_elements);
-
-	return (cim_createProperty("Status", sint32, "0", NULL, cim_false));
-
-} /* get_nfssec_list */
-
-/*
- * Method: mountall
- *
- * Description: Executes the mountall command with the options given in the
- * inParams property list.
- *
- * Parameters:
- *	- CCIMPropertyList *inParams - The property list containing the options
- *	to be used when executing the mountall command.
- *
- * Returns:
- *	- CCIMProperty * - A property defining the success or failure of the
- *	method.
- */
-CCIMProperty *
-mountall(CCIMPropertyList *inParams) {
-	CCIMProperty	*retVal;
-	char		*cmd = NULL;
-	int		err = 0;
-
-	cmd = cmdgen_generate_command(CMDGEN_MOUNTALL, NULL, NULL, inParams,
-		&err);
-	if (cmd == NULL || err != 0) {
-		cim_logDebug("mountall", "cmdgen_generate_command failed.");
-		util_handleError(MOUNTALL_INVOKE_METH, CIM_ERR_FAILED,
-			CMDGEN_GEN_CMD_FAILURE, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	cim_logDebug("mountall", "Command generated is: %s", cmd);
-
-	retVal = exec_command(cmd);
-	free(cmd);
-	return (retVal);
-} /* mountall */
-
-/*
- * Method: shareall
- *
- * Description: Executes the shareall command with the options given in the
- * inParams property list.
- *
- * Parameters:
- *	- CCIMPropertyList *inParams - The property list containing the options
- *	to be used when executing the shareall command.
- *
- * Returns:
- *	- CCIMProperty * - A property defining the success or failure of the
- *	method.
- */
-CCIMProperty *
-shareall(CCIMPropertyList *inParams) {
-	CCIMProperty	*retVal;
-	char		*cmd = NULL;
-	int		err = 0;
-
-	cmd = cmdgen_generate_command(CMDGEN_SHAREALL, NULL, NULL, inParams,
-		&err);
-	if (cmd == NULL || err != 0) {
-		util_handleError(SHAREALL_INVOKE_METH, CIM_ERR_FAILED,
-			CMDGEN_GEN_CMD_FAILURE, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	cim_logDebug("shareall", "Command returned: %s", cmd);
-
-	retVal = exec_command(cmd);
-	free(cmd);
-	return (retVal);
-} /* shareall */
-
-/*
- * Method: unmountall
- *
- * Description: Executes the umountall command with the options given in the
- * inParams property list.
- *
- * Parameters:
- *	- CCIMPropertyList *inParams - The property list containing the options
- *	to be used when executing the umountall command.
- *
- * Returns:
- *	- CCIMProperty * - A property defining the success or failure of the
- *	method.
- */
-CCIMProperty *
-unmountall(CCIMPropertyList *inParams) {
-	CCIMProperty	*retVal;
-	char		*cmd = NULL;
-	int		err = 0;
-
-	cmd = cmdgen_generate_command(CMDGEN_UMOUNTALL, NULL, NULL, inParams,
-		&err);
-	if (cmd == NULL || err != 0) {
-		util_handleError(UNMOUNTALL_INVOKE_METH, CIM_ERR_FAILED,
-			CMDGEN_GEN_CMD_FAILURE, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	cim_logDebug("unmountall", "Command returned: %s", cmd);
-
-	retVal = exec_command(cmd);
-	free(cmd);
-	return (retVal);
-} /* unmountall */
-
-/*
- * Method: unshareall
- *
- * Description: Executes the unshareall command with the options given in the
- * inParams property list.
- *
- * Parameters:
- *	- CCIMPropertyList *inParams - The property list containing the options
- *	to be used when executing the unshareall command.
- *
- * Returns:
- *	- CCIMProperty * - A property defining the success or failure of the
- *	method.
- */
-CCIMProperty *
-unshareall(CCIMPropertyList *inParams) {
-	CCIMProperty	*retVal;
-	char		*cmd = NULL;
-	int		err = 0;
-
-	cmd = cmdgen_generate_command(CMDGEN_UNSHAREALL, NULL, NULL, inParams,
-		&err);
-	if (cmd == NULL || err != 0) {
-		util_handleError(UNSHAREALL_INVOKE_METH, CIM_ERR_FAILED,
-			CMDGEN_GEN_CMD_FAILURE, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	cim_logDebug("unshareall", "Command returned: %s", cmd);
-
-	retVal = exec_command(cmd);
-	free(cmd);
-	return (retVal);
-} /* unshareall */
-
-/*
- * Private Methods
- */
-
-/*
- * Method: exec_command
- *
- * Description: Executes the given command, returns a success/failure property
- * and handles errors from the execution of the command if needed.
- *
- * Parameters:
- *	- char *cmd - The command to execute.
- *
- * Returns:
- *	- CCIMProperty * - A property defining the success or failure of the
- *	method.
- *	- NULL if an error occurred.
- */
-CCIMProperty *
-exec_command(char *cmd) {
-	char	*cmd_return = NULL;
-	int	err = 0;
-
-	cmd_return = cmd_execute_command_and_retrieve_string(cmd, &err);
-	if (err != 0) {
-		if (cmd_return != NULL) {
-			util_handleError(EXEC_CMD, CIM_ERR_FAILED,
-				cmd_return, NULL, &err);
-			free(cmd_return);
-			return ((CCIMProperty *)NULL);
-		} else {
-			util_handleError(EXEC_CMD, CIM_ERR_FAILED,
-				CMD_EXEC_RETR_STR_FAILURE, NULL, &err);
-			return ((CCIMProperty *)NULL);
-		}
-	}
-
-	if (cmd_return != NULL) {
-		cim_logDebug("exec_command", "Exec command return =%s",
-			cmd_return);
-		free(cmd_return);
-	}
-
-	return (cim_createProperty("Status", sint32, "0", NULL, cim_false));
-} /* exec_command */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/common/nfsprov_methods.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_NFSPROV_METHODS_H
-#define	_NFSPROV_METHODS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-
-/*
- * Method declarations
- */
-void		create_outParams_list(CCIMPropertyList *outParams,
-			char **list, int num_elements, char *single_value);
-CCIMProperty	*del_all_with_duplicate_path(CCIMPropertyList *inParams);
-CCIMProperty	*get_default_secmode(CCIMPropertyList *outParams);
-CCIMProperty	*get_netconfig_list(CCIMPropertyList *outParams);
-CCIMProperty	*get_nfssec_list(CCIMPropertyList *outParams);
-CCIMProperty	*mountall(CCIMPropertyList *inParams);
-CCIMProperty	*shareall(CCIMPropertyList *inParams);
-CCIMProperty	*unmountall(CCIMPropertyList *inParams);
-CCIMProperty	*unshareall(CCIMPropertyList *inParams);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _NFSPROV_METHODS_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/include/nfs_keys.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _NFS_KEYS_H
-#define	_NFS_KEYS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * NOT DEFINED IN cimKeys.h
- */
-
-#define	CS_CREATION_CLASS	"CSCreationClassName"
-#define	CSNAME			"CSName"
-#define	FS_CREATION_CLASS	"FSCreationClassName"
-#define	FSNAME			"FSName"
-#define	SAME_ELEMENT		"SameElement"
-/*
- * We must define two SettingID keys.
- * SettingID is for Solaris_PersistentShare.SettingID (CIM_SystemSetting) and
- * SettingId is for Solaris_NFSShareSecurity.SettingId (CIM_Setting)
- */
-#define	SETTING_ID		"SettingID"
-#define	SETTING_ID_LOWCASE	"SettingId"
-#define	SYS_ELEMENT		"SystemElement"
-
-/*
- * Defined in cimKeys.h
- */
-
-#define	SYS_CREATION_CLASS	"SystemCreationClassName"
-#define	CREATION_CLASS		"CreationClassName"
-#define	SYSTEM			"SystemName"
-#define	DEVICEID		"DeviceID"
-#define	NAME			"Name"
-#define	SYSTEM_ELEMENT		"SystemElement"
-#define	SAME_ELEMENT		"SameElement"
-#define	ANTECEDENT		"Antecedent"
-#define	DEPENDENT		"Dependent"
-#define	GROUP			"GroupComponent"
-#define	PART			"PartComponent"
-#define	TAG			"Tag"
-#define	MODE			"Mode"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _NFS_KEYS_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/include/nfs_provider_names.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _NFS_PROVIDER_NAMES_H
-#define	_NFS_PROVIDER_NAMES_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * NFS provider classes.
- */
-#define	SOLARIS_HOSTEDSHARE "Solaris_HostedShare"
-#define	SOLARIS_NFS "Solaris_NFS"
-#define	SOLARIS_NFSMOUNT "Solaris_NFSMount"
-#define	SOLARIS_NFSSHARE "Solaris_NFSShare"
-#define	SOLARIS_NFSSHAREENT "Solaris_NFSShareEntry"
-#define	SOLARIS_NFSSHAREDEFSECMODES "Solaris_NFSShareDefSecurityModes"
-#define	SOLARIS_NFSSHARESEC "Solaris_NFSShareSecurity"
-#define	SOLARIS_NFSSHARESECMODES "Solaris_NFSShareSecurityModes"
-#define	SOLARIS_NFSSHARESECURITY "Solaris_NFSShareSecurity"
-#define	SOLARIS_PERSISTSHARE "Solaris_PersistentShare"
-#define	SOLARIS_SHAREDFS "Solaris_SharedFileSystem"
-#define	SOLARIS_SHARESERV "Solaris_ShareService"
-#define	SOLARIS_SYSPERSISTSHARE "Solaris_PersistentShareForSystem"
-
-/*
- * Other referenced Solaris classes
- */
-#define	SOLARIS_CS "Solaris_ComputerSystem"
-#define	SOLARIS_DIR "Solaris_Directory"
-
-/*
- * These are nfs providers specific functions.
- */
-#define		ADD_PROP_TO_INST	"add_property_to_instance"
-#define		ADD_PROP_TO_LIST	"add_property_to_list"
-#define		COMMAND_GEN		"cmdgen_generate_command"
-#define		CREATE_HOSTEDSHARE_ASSOC	\
-	"create_hostedShare_associations"
-#define		CREATE_OUT_PARAMS	"create_outParams_list"
-#define		CREATE_PSFORSYS_ASSOC	"create_persistShareForSys_associations"
-#define		CREATE_SHAREDFS_ASSOC	"create_sharedFS_associations"
-#define		DELETE_DUP_PATHS	"del_all_with_duplicate_path"
-#define		DELETE_VFSTAB_ENT	"delete_vfstab_entry"
-#define		ENUM_MOUNTS		"enumerate_mounts"
-#define		EXEC_CMD		"exec_command"
-#define		GET_ANT			"get_Antecedent"
-#define		GET_ASSOC_DIR		"get_associated_directory"
-#define		GET_ASSOC_INST		"get_associated_instances"
-#define		GET_ASSOC_NFSMNTS	"get_associated_nfs_mntlist"
-#define		GET_ASSOC_SEC_INSTLIST	"get_associated_nfsShareSec_instList"
-#define		GET_ASSOC_SEC_OPLIST	"get_associated_nfsShareSec_OPList"
-#define		GET_ASSOC_SEC_PROPLIST	"get_associated_nfsShareSec_propList"
-#define		GET_ASSOC_SP_INSTLIST	"get_associated_sharePersist_instList"
-#define		GET_ASSOC_SP_OPLIST	"get_associated_sharePersist_OPList"
-#define		GET_ASSOC_SP_PROPLIST	"get_associated_sharePersist_propList"
-#define		GET_DEF_SECMODE		"get_default_secmode"
-#define		GET_DEP			"get_Dependent"
-#define		GET_NETCFG_LIST		"get_netconfig_list"
-#define		GET_NFSSEC_LIST		"get_nfssec_list"
-#define		GET_NFSSHARESEC_INST	"get_Solaris_NFSShareSecurity_Inst"
-#define		GET_NFSSHARE_0P		"get_Solaris_NFSShare_OP"
-#define		GET_PROP_FROM_OPTS	"get_property_from_opt_string"
-#define		GET_SHAREPERSIST_INST	"get_Solaris_PersistentShare_Inst"
-#define		MOUNTALL_INVOKE_METH	"mountall"
-#define		POPULATE_PROPLIST	"populate_property_list"
-#define		SHAREALL_INVOKE_METH	"shareall"
-#define		SHARE_EXISTS		"does_share_exist"
-#define		SHOW_EXPORTS		"show_exports"
-#define		UNMOUNTALL_INVOKE_METH	"unmountall"
-#define		UNSHAREALL_INVOKE_METH	"unshareall"
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _NFS_PROVIDER_NAMES_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/include/nfs_providers_msgstrings.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _NFS_PROVIDERS_MSGSTRINGS_H
-#define	_NFS_PROVIDERS_MSGSTRINGS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * dgettext is normally defined by including libintl.h.  However, the file
- * /usr/sadm/lib/wbem/include/cimapi.h erroneously defines gettext so that
- * they can play games with L10N in the CIM functions.  If we try to undef
- * gettext before we include libintl.h we get a complaint from hdrchk.  So,
- * just declare the extern here to work around this mess.
- */
-extern char *dgettext(const char *, const char *);
-
-/*
- * This include file defines all messages that are used for error reporting
- * in the nfs providers.  Other messages about CIM specific failures are
- * defined in $(SRC)/cmd/wbem/provider/c/include/messageStrings.h
- */
-
-/*
- * CIM failures - These should be moved to
- * $(SRC)/cmd/wbem/provider/c/include/messageStrings.h
- */
-#define	ADD_PROP_TO_PROPLIST_FAILURE \
-	util_routineFailureMessage("cim_addPropertyToPropertyList")
-#define	ADD_PROP_TO_OBJPATH_FAILURE \
-	util_routineFailureMessage("cim_addPropertyListToObjectPath")
-#define	CIMOM_ENUM_INST_FAILURE \
-	util_routineFailureMessage("cimom_enumerateInstances")
-#define	CIMOM_ENUM_INSTNAMES_FAILURE \
-	util_routineFailureMessage("cimom_enumerateInstanceNames")
-#define	CIMOM_GET_INST_FAILURE \
-	util_routineFailureMessage("cimom_getInstance")
-#define	CREATE_EMPTY_OBJPATH_FAILURE \
-	util_routineFailureMessage("cim_createEmptyObjectPath")
-#define	CREATE_PROPLIST_FAILURE \
-	util_routineFailureMessage("cim_createPropertyList")
-#define	ENCODE_STRING_ARRAY_FAILURE \
-	util_routineFailureMessage("cim_encodeStringArray")
-#define	GET_PROPERTY_FAILURE \
-	util_routineFailureMessage("cim_getProperty")
-#define	PREPEND_INSTANCE_FAILURE \
-	util_routineFailureMessage("cim_prependInstance")
-#define	PROPLIST_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("cim_addPropertyListToInstance")
-
-/*
- * NFS provider failures
- */
-#define	CMD_EXEC_RETR_STR_FAILURE \
-	util_routineFailureMessage("cmd_execute_command_and_retrieve_string")
-#define	CMDGEN_GEN_CMD_FAILURE \
-	util_routineFailureMessage("cmdgen_generate_command")
-#define	CREATE_NFSMOUNT_ASSOC_FAILURE \
-	util_routineFailureMessage("create_nfsMount_associations")
-#define	DEL_DUPLICATE_PATHS_FAILURE \
-	util_routineFailureMessage("del_all_with_duplicate_path")
-#define	FS_ADD_DFSTAB_ENT_FAILURE \
-	util_routineFailureMessage("fs_add_DFStab_ent")
-#define	FS_CHECK_DUP_PATHS \
-	util_routineFailureMessage("fs_check_for_duplicate_DFStab_paths")
-#define	FS_DEL_MNT_DEFAULT_FAILURE \
-	util_routineFailureMessage("fs_del_mount_default_ent")
-#define	FS_DEL_DFSTAB_ENT_FAILURE \
-	util_routineFailureMessage("fs_del_DFStab_ent")
-#define	FS_EDIT_DFSTAB_ENT_FAILURE \
-	util_routineFailureMessage("fs_edit_DFStab_ent")
-#define	FS_GET_DFSTAB_ENT_FAILURE \
-	util_routineFailureMessage("fs_get_DFStab_ents")
-#define	FS_GET_DFSTAB_ENT_NUM_FAILURE \
-	util_routineFailureMessage("fs_get_DFStab_ent_num")
-#define	FS_GET_FILTERED_MNTDEFAULTS_FAILURE \
-	util_routineFailureMessage("fs_get_filtered_mount_defaults")
-#define	FS_GET_MAXFILENMLEN_FAILURE \
-	util_routineFailureMessage("fs_get_maxfilenamelen")
-#define	FS_GET_SHARE_FAILURE \
-	util_routineFailureMessage("fs_get_share_list")
-#define	FS_PARSE_OPTS_FOR_SEC_MODES_FAILURE \
-	util_routineFailureMessage("fs_parse_opts_for_sec_modes")
-#define	FS_PARSE_OPTLIST_FAILURE \
-	util_routineFailureMessage("fs_parse_optlist_for_option")
-#define	GET_DEFAULT_SECMODE_FAILURE \
-	util_routineFailureMessage("nfssec_get_default_secmode")
-#define	GET_DEVID_FAILURE \
-	util_routineFailureMessage("get_devid")
-#define	GET_HOSTNAME_FAILURE \
-	util_routineFailureMessage("sys_get_hostname")
-#define	GET_NETID_LIST_FAILURE \
-	util_routineFailureMessage("netcfg_get_networkid_list")
-#define	GET_RESOURCE_FAILURE \
-	util_routineFailureMessage("get_resource")
-#define	GET_SECMODE_LIST_FAILURE \
-	util_routineFailureMessage("nfssec_get_nfs_secmode_list")
-#define	NFS_GET_FILTERED_MOUNTS_FAILURE \
-	util_routineFailureMessage("nfs_get_filtered_mount_list")
-#define	NFS_GET_MNTLIST_FAILURE \
-	util_routineFailureMessage("nfs_get_mount_list")
-#define	NFS_GET_MNTS_BY_MNTOPT_FAILURE \
-	util_routineFailureMessage("nfs_get_mounts_by_mntopt")
-
-/*
- * NFS provider messages
- */
-#define	NFSD_START_FAILURE \
-	util_routineStartDaemonMessage("nfsd")
-#define	NO_SHARES_ON_SYSTEM \
-	dgettext(TEXT_DOMAIN, \
-	"/etc/dfs/sharetab does not exist. No shares on system")
-#define	MOUNTD_START_FAILURE \
-	util_routineStartDaemonMessage("mountd")
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _NFS_PROVIDERS_MSGSTRINGS_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/include/nfsprov_include.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _NFSPROV_INCLUDE_H
-#define	_NFSPROV_INCLUDE_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define	MAXSIZE 256
-#define	NFS "nfs"
-/*
- * This constant is the same as the NFS_PORT constant in nfs/nfs.h.  nfs/nfs.h
- * was not included because it defines some of the same data types
- * as defined in cimapi.h and therefore sets data types such as uint64 to
- * a value not expected or understood by cim.
- */
-#define	NFS_PORT 2049
-
-typedef struct {
-	char	*name;
-	CIMBool	isKey;
-	CIMType	type;
-} nfs_prov_prop_t;
-
-typedef struct {
-	char	*name;
-	CIMBool	isKey;
-	CIMType	type;
-	char	*true_opt_value;
-	char	*false_opt_value;
-	char	*string_opt_value;
-} nfs_prov_prop_plus_optVals_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _NFSPROV_INCLUDE_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/lib/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,159 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-LIBNAME =	libWBEMnfs
-LIBRARY	=	$(LIBNAME).so
-PROG =		$(LIBRARY)
-MSG_DOMAIN =	CIM_$(LIBNAME)
-TMPFILE =	classes.tmp
-TMPFILE1 =	assocclasses.tmp
-
-PROV_OBJECTS = \
-	../nfs_filesystem/Solaris_NFS.o \
-	../assoc/Solaris_PersistentShareForSystem.o \
-	../assoc/Solaris_HostedShare.o \
-	../assoc/Solaris_NFSMount.o \
-	../assoc/Solaris_NFSShareEntry.o \
-	../assoc/Solaris_SharedFileSystem.o \
-	../assoc/Solaris_NFSShareSecurityModes.o \
-	../assoc/common_functions.o \
-	../nfs_share/Solaris_NFSShare.o \
-	../nfs_share/Solaris_NFSShareSecurity.o \
-	../nfs_share/Solaris_PersistentShare.o \
-	../nfs_share/Solaris_ShareService.o \
-	../nfs_mount/Solaris_MountService.o \
-	../common/nfsprov_methods.o \
-	../common/createprop_methods.o \
-	../../common/mount_methods/mountprov_methods.o \
-	../../common/cmdgeneration/cmdgen.o \
-	../../common/cmdgeneration/mount/cmdgen_mount.o \
-	../../common/cmdgeneration/mount/nfs/cmdgen_mount_nfs.o \
-	../../common/cmdgeneration/mount/cmdgen_mountall.o \
-	../../common/cmdgeneration/umount/cmdgen_umount.o \
-	../../common/cmdgeneration/umount/cmdgen_umountall.o \
-	../../common/cmdgeneration/share/cmdgen_share.o \
-	../../common/cmdgeneration/share/cmdgen_shareall.o \
-	../../common/cmdgeneration/share/nfs/cmdgen_share_nfs.o \
-	../../common/cmdgeneration/unshare/cmdgen_unshare.o \
-	../../common/cmdgeneration/unshare/cmdgen_unshareall.o \
-	../../common/cmdgeneration/unshare/nfs/cmdgen_unshare_nfs.o \
-	../../../wbem_disk/common/util.o
-
-# Just add the name of your provider 
-# to this list.
-# IMPORTANT: 
-# $(LIBNAME) MUST be the last entry
-
-# Add All providers here
-WBEM_NFS_CLASSES =	Solaris_NFS \
-			Solaris_NFSMount \
-			Solaris_NFSShareEntry \
-			Solaris_SharedFileSystem \
-			Solaris_NFSShareSecurityModes \
-			Solaris_NFSShare \
-			Solaris_NFSShareSecurity \
-			Solaris_PersistentShare \
-			Solaris_MountService \
-			Solaris_ShareService \
-			Solaris_PersistentShareForSystem \
-			Solaris_HostedShare \
-	                $(LIBNAME)
-
-# Add all association providers here
-WBEM_NFS_ASSOC_CLASSES =	Solaris_PersistentShareForSystem \
-				Solaris_HostedShare \
-				Solaris_NFSMount \
-				Solaris_NFSShareEntry \
-				Solaris_SharedFileSystem \
-				Solaris_NFSShareSecurityModes \
-	                	$(LIBNAME)
-
-OBJECTS =	libDispatch.o \
-		localFunc.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL	=	$(ROOTWBEMINC) \
-		$(SRC)/cmd/wbem/provider/c/include
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -DPORTMAP -D_REENTRANT -Dpic -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_PICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-LDFLAGS		+= -Mmapfile $(GSHARED) -R/usr/sadm/lib/wbem \
-		    $(ZTEXT) $(ZDEFS) $(SOFLAGS)
-
-LDLIBS		+= -L/usr/sadm/lib/wbem -lc -lcimapi -lfsmgt 
-
-POFILE		= _lib.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-CLEANFILES	= *.tmp master.h classes assocclasses Make.obj libname $(MSGFILES)
-
-
-all:=		TARGET =	all
-install:=	TARGET =	install
-
-.KEEP_STATE:
-
-all:	master.h $(LIBRARY)
-
-$(LIBRARY): $(OBJECTS)
-	$(CC) -o $@ $(LDFLAGS) \
-	$(PROV_OBJECTS) $(OBJECTS) $(LDLIBS)
-	$(POST_PROCESS_SO)
-
-master.h:	Makefile header.sh
-		@echo ${WBEM_NFS_CLASSES} > ${TMPFILE}
-		@echo ${WBEM_NFS_ASSOC_CLASSES} > ${TMPFILE1}
-		sh header.sh
-
-install:	all $(ROOTWBEMPROG)
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:
-		$(RM) $(OBJECTS) $(LIBRARY) $(CLEANFILES) $(LINT_OBJS)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c)
-
-catalog:	master.h $(POFILE)
-
-$(POFILE): $(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/lib/header.sh	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,426 +0,0 @@
-#! /usr/bin/sh
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-INFILE=classes.tmp
-INFILE1=assocclasses.tmp
-CLASSFILE=classes
-ASSOCCLASSFILE=assocclasses
-LIBFILE=libname
-TMPFILE=tmp.tmp
-TMPFILE1=tmp1.tmp
-PWD=`pwd`
-
-HEADER=${PWD}/master.h
-
-
-rm -f $HEADER $TMPFILE $TMPFILE1 $CLASSFILE $ASSOCCLASSFILE $LIBFILE
-
-# Convert into separate lines per class
-for x in `cat $INFILE`
-do
-	echo $x >> $TMPFILE
-done
-
-# Convert into separate lines per class
-for x in `cat $INFILE1`
-do
-	echo $x >> $TMPFILE1
-done
-#####################################################
-# Create file containing only the library name
-tail -1 $TMPFILE > $LIBFILE
-LIBNAME=`cat $LIBFILE`
-
-# Create file containing only the class names
-COUNT=`cat $TMPFILE | wc -l`
-COUNT=`expr $COUNT - 1`
-head -n $COUNT $TMPFILE > $CLASSFILE
-
-# Create file containing only the class names
-COUNT=`cat $TMPFILE1 | wc -l`
-COUNT=`expr $COUNT - 1`
-head -n $COUNT $TMPFILE1 > $ASSOCCLASSFILE
-##############################################################
-#
-# Create the header file
-#
-echo "#include <cimapi.h>" > $HEADER
-echo "#include <cimlogsvc.h>" > $HEADER
-
-#
-# Create the externs
-# cp_enumInstances
-# 
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMInstanceList*" >> $HEADER
-	echo "cp_enumInstances_$x(CCIMObjectPath* pOP);" >> $HEADER
-done
-
-
-#
-# Create the externs
-# cp_enumInstanceNames
-# 
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMObjectPathList*" >> $HEADER
-	echo "cp_enumInstanceNames_$x(CCIMObjectPath* pOP);" >> $HEADER
-done
-
-#
-# cp_createInstance
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMObjectPath*" >> $HEADER
-	echo "cp_createInstance_$x(CCIMObjectPath* pOP, CCIMInstance* pInst);" >> $HEADER
-done
-
-#
-# cp_deleteInstance
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CIMBool" >> $HEADER
-	echo "cp_deleteInstance_$x(CCIMObjectPath* pOP);" >> $HEADER
-done
-
-#
-# cp_getInstance
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMInstance*" >> $HEADER
-	echo "cp_getInstance_$x(CCIMObjectPath* pOP);" >> $HEADER
-done
-
-#
-# cp_setInstance
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CIMBool" >> $HEADER
-	echo "cp_setInstance_$x(CCIMObjectPath* pOP, CCIMInstance* pInst);" >> $HEADER
-done
-
-#
-# cp_setProperty
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do 
-	echo "extern CIMBool" >> $HEADER
-	echo "cp_setProperty_$x(CCIMObjectPath* pOP, CCIMProperty* pProp);" >> $HEADER
-done
-
-#
-# cp_invokeMethod
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMProperty*" >> $HEADER
-	echo "cp_invokeMethod_$x(CCIMObjectPath* pOP, cimchar* pName,CCIMPropertyList* pInParams,CCIMPropertyList* pInOutParams);" >> $HEADER
-done
-
-#
-# cp_execQuery
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMInstanceList *" >> $HEADER
-	echo "cp_execQuery_$x(CCIMObjectPath* pOP, char *selectList,char *nonJoinExp, char *queryExp, char *queryType);" >> $HEADER
-done
-
-
-#
-# cp_associators
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE1`
-do
-	echo "extern CCIMInstanceList *" >> $HEADER
-	echo "cp_associators_$x(CCIMObjectPath* pAssocName, CCIMObjectPath *pObjectName, char *pResultClass, char *pRole, char *pResultRole);" >> $HEADER
-done
-
-#
-# cp_associatorNames
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE1`
-do
-	echo "extern CCIMObjectPathList *" >> $HEADER
-	echo "cp_associatorNames_$x(CCIMObjectPath* pAssocName, CCIMObjectPath *pObjectName, char *pResultClass, char *pRole, char *pResultRole);" >> $HEADER
-done
-
-#
-# cp_reference
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE1`
-do
-	echo "extern CCIMObjectPathList *" >> $HEADER
-	echo "cp_references_$x(CCIMObjectPath* pAssocName, CCIMObjectPath *pObjectName, char *pRole);" >> $HEADER
-done
-
-#
-# cp_referenceNames
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE1`
-do
-	echo "extern CCIMObjectPathList *" >> $HEADER
-	echo "cp_referenceNames_$x(CCIMObjectPath* pAssocName, CCIMObjectPath *pObjectName, char *pRole);" >> $HEADER
-done
-
-##############################################################
-#
-# Create the dispatch tables
-#
-##############################################################
-
-
-#
-# *cpInvokeMethodTable
-#
-
-echo "" >> $HEADER
-echo "CCIMProperty *" >> $HEADER
-echo "(*cpInvokeMethodTable[])(CCIMObjectPath *, cimchar *, CCIMPropertyList *, CCIMPropertyList *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_invokeMethod_$x," >> $HEADER
-done
-
-echo "cp_invokeMethod_$LIBNAME};" >> $HEADER
-
-
-#
-# *createInstanceTable
-#
-
-echo "" >> $HEADER
-echo "CCIMObjectPath *" >> $HEADER
-echo "(*createInstanceTable[])(CCIMObjectPath *, CCIMInstance *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_createInstance_$x," >> $HEADER
-done
-echo "cp_createInstance_$LIBNAME};" >> $HEADER
-
-#
-# *deleteInstanceTable
-#
-
-echo "" >> $HEADER
-echo "CIMBool" >> $HEADER
-echo "(*deleteInstanceTable[])( CCIMObjectPath *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_deleteInstance_$x," >> $HEADER
-done
-echo "cp_deleteInstance_$LIBNAME};" >> $HEADER
-
-#
-# *enumInstanceTable
-#
-
-echo "" >> $HEADER
-echo "CCIMInstanceList *" >> $HEADER
-echo "(*enumInstanceTable[])(CCIMObjectPath *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_enumInstances_$x," >> $HEADER
-done
-echo "cp_enumInstances_$LIBNAME};" >> $HEADER
-
-#
-# *enumInstanceNamesTable
-#
-
-echo "" >> $HEADER
-echo "CCIMObjectPathList *" >> $HEADER
-echo "(*enumInstanceNamesTable[])(CCIMObjectPath *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_enumInstanceNames_$x," >> $HEADER
-done
-echo "cp_enumInstanceNames_$LIBNAME};" >> $HEADER
-
-#
-# *getInstanceTable
-#
-
-echo "" >> $HEADER
-echo "CCIMInstance *" >> $HEADER
-echo "(*getInstanceTable[])(CCIMObjectPath *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_getInstance_$x," >> $HEADER
-done
-echo "cp_getInstance_$LIBNAME};" >> $HEADER
-
-#
-# *setInstanceTable
-#
-
-echo "" >> $HEADER
-echo "CIMBool" >> $HEADER
-echo "(*setInstanceTable[])(CCIMObjectPath *, CCIMInstance *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_setInstance_$x," >> $HEADER
-done
-echo "cp_setInstance_$LIBNAME};" >> $HEADER
-
-#
-# *setPropertyTable
-#
-
-echo "" >> $HEADER
-echo "CIMBool" >> $HEADER
-echo "(*setPropertyTable[])(CCIMObjectPath *, CCIMProperty *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_setProperty_$x," >> $HEADER
-done
-echo "cp_setProperty_$LIBNAME};" >> $HEADER
-
-#
-# *execQueryTable
-#
-
-echo "" >> $HEADER
-echo "CCIMInstanceList*" >> $HEADER
-echo "(*execQueryTable[])(CCIMObjectPath *, char *, char *, char *, char*) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_execQuery_$x," >> $HEADER
-done
-echo "cp_execQuery_$LIBNAME};" >> $HEADER
-
-
-#
-# *associatorsTable
-#
-
-echo "" >> $HEADER
-echo "CCIMInstanceList*" >> $HEADER
-echo "(*associatorsTable[])(CCIMObjectPath *, CCIMObjectPath *, char *, char *, char*) = {" >> $HEADER
-for x in `cat $ASSOCCLASSFILE`
-do
-	echo "cp_associators_$x," >> $HEADER
-done
-echo "cp_associators_$LIBNAME};" >> $HEADER
-
-##############################################################
-#
-# *associatorNamesTable
-#
-
-echo "" >> $HEADER
-echo "CCIMObjectPathList*" >> $HEADER
-echo "(*associatorNamesTable[])(CCIMObjectPath *, CCIMObjectPath *, char *, char *, char*) = {" >> $HEADER
-for x in `cat $ASSOCCLASSFILE`
-do
-	echo "cp_associatorNames_$x," >> $HEADER
-done
-echo "cp_associatorNames_$LIBNAME};" >> $HEADER
-
-
-##############################################################
-#
-# *referencesTable
-#
-
-echo "" >> $HEADER
-echo "CCIMObjectPathList*" >> $HEADER
-echo "(*referencesTable[])(CCIMObjectPath *, CCIMObjectPath *, char *) = {" >> $HEADER
-for x in `cat $ASSOCCLASSFILE`
-do
-	echo "cp_references_$x," >> $HEADER
-done
-echo "cp_references_$LIBNAME};" >> $HEADER
-
-##############################################################
-#
-# *referenceNamesTable
-#
-
-echo "" >> $HEADER
-echo "CCIMObjectPathList*" >> $HEADER
-echo "(*referenceNamesTable[])(CCIMObjectPath *, CCIMObjectPath *, char *) = {" >> $HEADER
-for x in `cat $ASSOCCLASSFILE`
-do
-	echo "cp_referenceNames_$x," >> $HEADER
-done
-echo "cp_referenceNames_$LIBNAME};" >> $HEADER
-#
-# Create Class Name table
-#
-echo "" >> $HEADER
-echo "static char *classNameTable [] = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-        echo "\"$x\"," >> $HEADER
-done
-echo "\"$LIBNAME\"};" >> $HEADER
-
-##############################################################
-#
-# Create Assoc Class Name table
-#
-echo "" >> $HEADER
-echo "static char *assocclassNameTable [] = {" >> $HEADER
-for x in `cat $ASSOCCLASSFILE`
-do
-        echo "\"$x\"," >> $HEADER
-done
-echo "\"$LIBNAME\"};" >> $HEADER
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/lib/libDispatch.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,708 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <pthread.h>
-
-#include "master.h"
-#include "util.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-
-/* local function declarations */
-static int FindClassEntry(char *className);
-static int FindAssocClassEntry(char *className);
-
-
-/*
- * Encodes the CIM schema and provider version
- * into an unsigned long, use
- * getProviderVersion & getCimVersion to decode
- */
-
-unsigned long
-cp_getVersion()
-{
-	return (MAKEVERSION(1.0, 2.3));
-}
-
-
-/*
- * The function will take CCIMObjectPath
- * and search the classNameTable[]
- * for a className match, and then
- * call the corresponding cp_enumInstance
- * for that provider
- */
-
-CCIMInstanceList*
-cp_enumInstances(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	int 			index = 0;
-	int    			error;
-
-	cim_logDebug("cp_enumInstances", "In libDispatch");
-	/* Check if ObjectPath is NULL before continuing */
-	if (pOP == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(ENUM_INSTANCES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* Object path is NOT NULL, so find the entry in the table */
-	index = FindClassEntry(pOP->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(ENUM_INSTANCES, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* OK, Find enumInstance */
-	instList = (*enumInstanceTable[index])(pOP);
-	return ((CCIMInstanceList*)instList);
-
-}  /* cp_enumInstances */
-
-/* creates an instance */
-
-/*
- * The function will take CCIMObjectPath & CCIMInstance
- * and search the classNameTable[]
- * for a className match, and then
- * call the corresponding cp_createInstance
- * for that provider
- */
-
-CCIMObjectPath*
-cp_createInstance(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	CCIMObjectPath *objPath = NULL;
-	int index = 0;
-	int error;
-
-	/* check if NULL before finding the Instance to create */
-	if (pInst == NULL) {
-	    util_handleError(CREATE_INSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* find entry in the table */
-	index = FindClassEntry(pInst->mClassName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(CREATE_INSTANCE,
-		CIM_ERR_INVALID_CLASS, NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	objPath = (*createInstanceTable[index])(pOP, pInst);
-
-	return ((CCIMObjectPath*) objPath);
-
-} /* cp_createInstances */
-
-
-/*
- * returns an array of CCIMObjectPaths for the class
- * params:
- * char* - the classname to enum
- */
-
-CCIMObjectPathList*
-cp_enumInstanceNames(CCIMObjectPath* pOP)
-{
-	CCIMObjectPathList	*objList = NULL;
-	CCIMInstanceList	*instList = NULL;
-	int			error = 0;
-
-	/*
-	 * create an instance list which contains all of the
-	 * instances this provider will produce First check
-	 * for valid ObjectPath
-	 */
-	if (pOP == NULL) {
-	    util_handleError(ENUM_INSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	instList = cp_enumInstances(pOP);
-
-	if (instList == NULL) {
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	objList = cim_createObjectPathList(instList);
-
-	/*
-	 * we no longer need the instList so free
-	 * the memory allocated for it
-	 */
-
-	cim_freeInstanceList(instList);
-	return (objList);
-}
-
-/* get an instance */
-
-CCIMInstance*
-cp_getInstance(CCIMObjectPath* pOP)
-{
-	CCIMInstance* inst = NULL;
-	int	index = 0;
-	int	error;
-
-	/* Check if ObjectPath is NULL before continuing */
-	if (pOP == NULL) {
-	    util_handleError(GET_INSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* Object path is NOT NULL, so find the entry in the table */
-	index = FindClassEntry(pOP->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(GET_INSTANCE, CIM_ERR_INVALID_CLASS, NULL,
-		NULL, &error);
-	    return (NULL);
-	}
-
-	inst = (*getInstanceTable[index])(pOP);
-	return ((CCIMInstance *)inst);
-}
-
-/*
- * returns the specified property,
- * should return NULL if not found
- *
- * params:
- * CCIMObjectPath* - ObjectPath to get the property from
- * char* - The property name to get
- *
- */
-
-CCIMProperty*
-cp_getProperty(CCIMObjectPath *pOP, char *pPropName)
-{
-	CCIMProperty*	prop = NULL;
-	CCIMInstance*	inst = NULL;
-	int		error;
-
-	/* See if ObjectPath is OK */
-	if (pOP == NULL) {
-	    util_handleError(GET_PROPERTY, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* Make sure property name isn't NULL */
-	if (pPropName == NULL) {
-	    util_handleError(GET_PROPERTY, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* see if we have any instances which match the obj path */
-	inst = cp_getInstance(pOP);
-
-	/* check for valid instance */
-	if (inst == NULL) {
-	    util_handleError(GET_PROPERTY, CIM_ERR_FAILED,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* see if it has the specified property */
-	prop = cim_getProperty(inst, pPropName);
-
-	/* free memory allocated for the instance */
-	cim_freeInstance(inst);
-
-	/* return the property */
-	return ((CCIMProperty *)prop);
-}
-
-/*
- * Sets the property in the passed in
- * instance to the new values of the
- * passed in property
- *
- * params:
- * CCIMObjectPath* - the Object Path in which the property should be changed
- * CCIMProperty* - a property structure which contains the new values
- *
- * return:
- * cim_true if property was updated otherwise cim_false
- *
- *
- * The function will take CCIMObjectPath & CCIMProperty
- * and search the classNameTable[]
- * for a className match, and then
- * call the corresponding setProperty
- * for that provider
- */
-
-CIMBool
-cp_setProperty(CCIMObjectPath* pObjPath, CCIMProperty* pProp)
-{
-	CIMBool retVal;
-	int index = 0;
-	int	error;
-
-	if (pObjPath == NULL) {
-	    util_handleError(SET_PROPERTY, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	index = FindClassEntry(pObjPath->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(SET_PROPERTY, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	retVal = (*setPropertyTable[index])(pObjPath, pProp);
-	return ((CIMBool)retVal);
-}
-
-
-/* sets an instance */
-
-/*
- * The function will take CCIMObjectPath & CCIMInstance
- * and search the classNameTable[]
- * for a className match, and then
- * call the corresponding cp_setInstance
- * for that provider
- */
-
-CIMBool
-cp_setInstance(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	CIMBool retVal;
-	int index = 0;
-	int	error;
-
-	if (pOP == NULL) {
-	    util_handleError(SET_INSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	if (pInst == NULL) {
-	    util_handleError(SET_INSTANCE, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* get the index into the table */
-	index = FindClassEntry(pInst->mClassName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(SET_INSTANCE, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	retVal = (*setInstanceTable[index])(pOP, pInst);
-	return ((CIMBool)retVal);
-}
-
-
-/*
- * deletes an instance
- *
- * The function will take CCIMObjectPath
- * and search the classNameTable[]
- * for a className match, and then
- * call the corresponding cp_deleteInstance
- * for that provider
- */
-
-CIMBool
-cp_deleteInstance(CCIMObjectPath* pOP)
-{
-	CIMBool retVal;
-	int index = 0;
-	int	error;
-
-	/* Verify ObjectPath is NOT NULL */
-	if (pOP == NULL) {
-	    util_handleError(DELETE_INSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* find Entry in table */
-	index = FindClassEntry(pOP->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(DELETE_INSTANCE, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	retVal = (*deleteInstanceTable[index])(pOP);
-	return ((CIMBool)retVal);
-}
-
-/*
- * Invokes the method and returns the results
- *   The caller is responsible for freeing the
- * memory allocated for the returned object
- *
- *  params:
- * CCIMObjectPath* - An object path of the instance
- *		to invoke the function on
- *  char* - name of the method to invoke
- * CCIMPropertyList* - input parameters to the function
- * CCIMPropertyList* - input/output parameters to the function
- *
- * returns:
- * NULL if it failed otherwise a CCIMProperty*
- *    which represents the return value of the function
- */
-
-CCIMProperty*
-cp_invokeMethod(CCIMObjectPath* pOP, cimchar* pName,
-    CCIMPropertyList* pInParams, CCIMPropertyList* pInOutParams)
-{
-	CCIMProperty *prop;
-	int index = 0;
-	int error;
-
-	/* First check for valid ObjectPath */
-	if (pOP == NULL) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* find entry in the table */
-	index = FindClassEntry(pOP->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	prop = (*cpInvokeMethodTable[index])
-	    (pOP, pName, pInParams, pInOutParams);
-
-	return ((CCIMProperty*)prop);
-}
-
-/*
- * cp_execQuery
- */
-
-CCIMInstanceList*
-cp_execQuery(CCIMObjectPath *pOP, char *selectList,
-    char *nonJoinExp, char *queryExp, char *queryType)
-{
-	CCIMInstanceList 	*instList = NULL;
-	int			index = 0;
-	int			error = 0;
-
-
-	/* First check for valid ObjectPath */
-	if (pOP == NULL) {
-	    util_handleError(EXEC_QUERY, CIM_ERR_INVALID_PARAMETER, NULL, NULL,
-		&error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* find entry in the table */
-	index = FindClassEntry(pOP->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    /* Set error exception with localized message */
-	    util_handleError(EXEC_QUERY, CIM_ERR_INVALID_CLASS, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	instList = (*execQueryTable[index])(pOP, selectList, nonJoinExp,
-	    queryExp, queryType);
-
-	return (instList);
-}
-
-/*
- * cp_associators
- */
-
-CCIMInstanceList*
-cp_associators(CCIMObjectPath *pAssocName, CCIMObjectPath *pObjectName,
-    char *pResultClass, char *pRole, char *pResultRole)
-{
-	CCIMInstanceList 	*instList;
-	int			index = 0;
-	int			error = 0;
-
-	/* First check for valid ObjectPath */
-	if (pAssocName == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(ASSOCIATORS, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* find entry in the table */
-	index = FindAssocClassEntry(pAssocName->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    /* Set error exception with localized message */
-	    util_handleError(ASSOCIATORS, CIM_ERR_INVALID_CLASS, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Call the appropriate associator function. Let the specific function
-	 * in the c provider handle the checking for correctness of the
-	 * other parameters.
-	 */
-
-	instList = (*associatorsTable[index])(pAssocName, pObjectName,
-	    pResultClass, pRole, pResultRole);
-	return ((CCIMInstanceList *)instList);
-}
-
-/*
- * cp_associatorNames
- */
-
-CCIMObjectPathList*
-cp_associatorNames(CCIMObjectPath *pAssocName, CCIMObjectPath *pObjectName,
-    char *pResultClass, char *pRole, char *pResultRole)
-{
-	CCIMObjectPathList 	*objList;
-	int			index = 0;
-	int			error = 0;
-
-	/* First check for valid ObjectPath */
-	if (pAssocName == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(ASSOCIATORS, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/* find entry in the table */
-	index = FindAssocClassEntry(pAssocName->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    /* Set error exception with localized message */
-	    util_handleError(ASSOCIATORS, CIM_ERR_INVALID_CLASS, NULL,
-		NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call the appropriate associatorName function. Let the specific
-	 * function in the c provider handle the checking for correctness of
-	 * the other parameters.
-	 */
-
-	objList = (*associatorNamesTable[index])(pAssocName, pObjectName,
-	    pResultClass, pRole, pResultRole);
-	return ((CCIMObjectPathList *)objList);
-}
-
-/*
- * cp_references
- */
-
-CCIMInstanceList*
-cp_references(CCIMObjectPath *pAssocName, CCIMObjectPath *pObjectName,
-    char *pRole)
-{
-	CCIMInstanceList 	*instList;
-	int			index = 0;
-	int			error = 0;
-
-	/* First check for valid ObjectPath */
-	if (pAssocName == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(REFERENCES, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* find entry in the table */
-	index = FindAssocClassEntry(pAssocName->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    /* Set error exception with localized message */
-	    util_handleError(REFERENCES, CIM_ERR_INVALID_CLASS, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Call the appropriate references function. Let the specific function
-	 * in the c provider handle the checking for correctness of the
-	 * other parameters.
-	 */
-
-	instList = (*referencesTable[index])(pAssocName, pObjectName, pRole);
-	return ((CCIMInstanceList *)instList);
-}
-
-/*
- * InParam: Class Name
- * Returns: Index into Name Table
- * If it hit libWBEMnfs, then we
- * have hit bottom, return err (-1)
- */
-
-static int
-FindClassEntry(char *className)
-{
-	int i = 0;
-
-	while (strcasecmp(className, classNameTable[i])) {
-		if (!strcasecmp(classNameTable[i], "libWBEMnfs")) {
-			i = -1;
-			break;
-		}
-		i++;
-	}
-
-	return (i);
-}
-/*
- * InParam: Class Name
- * Returns: Index into Name Table
- * If it hit libWBEMnfs, then we
- * have hit bottom, return err (-1)
- */
-
-static int
-FindAssocClassEntry(char *className)
-{
-	int i = 0;
-
-	while (strcasecmp(className, assocclassNameTable[i])) {
-		if (!strcasecmp(assocclassNameTable[i], "libWBEMnfs")) {
-			i = -1;
-			break;
-		}
-		i++;
-	}
-
-	return (i);
-}
-
-/*
- * cp_referenceNames
- */
-
-CCIMObjectPathList*
-cp_referenceNames(CCIMObjectPath *pAssocName, CCIMObjectPath *pObjectName,
-    char *pRole)
-{
-	CCIMObjectPathList 	*objList;
-	int			index = 0;
-	int			error = 0;
-
-	/* First check for valid ObjectPath */
-	if (pAssocName == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(REFERENCE_NAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/* find entry in the table */
-	index = FindAssocClassEntry(pAssocName->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    /* Set error exception with localized message */
-	    util_handleError(REFERENCE_NAMES, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call the appropriate referenceName function. Let the specific
-	 * function in the c provider handle the checking for correctness of
-	 * the other parameters.
-	 */
-
-	objList = (*referenceNamesTable[index])(pAssocName, pObjectName, pRole);
-	return ((CCIMObjectPathList *)objList);
-}
-
-CIMBool
-cp_isAssociatorProvider(CCIMObjectPath *pOp)
-{
-
-	int 		index = 0;
-	int			error = 0;
-
-	/*
-	 * If the object path coming in matches any in the associator table,
-	 * return true, otherwise, return false.
-	 */
-
-	/* First check for valid ObjectPath */
-	if (pOp == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(REFERENCE_NAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (cim_false);
-	}
-
-	/* find entry in the table */
-	index = FindAssocClassEntry(pOp->mName);
-
-	if (index < 0) {
-	    return (cim_false);
-	}
-	return (cim_true);
-}
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/lib/localFunc.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/*
- * this is a place holder file
- * for the following functions.
- * They should never be called
- */
-/* everything is in here */
-
-#include <cimapi.h>
-#include <cp_associator.h>
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_libWBEMnfs(CCIMObjectPath* pOP)
-{
-	return ((CCIMInstanceList*) NULL);
-}
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_libWBEMnfs(CCIMObjectPath* pOP)
-{
-	return ((CCIMObjectPathList*) NULL);
-}
-
-/* creates an instance */
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_libWBEMnfs(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	return ((CCIMObjectPath*)NULL);
-}
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_libWBEMnfs(CCIMObjectPath* pOP, cimchar* pName,
-	CCIMPropertyList* pInParams,
-	CCIMPropertyList* pInOutParams)
-{
-	return ((CCIMProperty*)NULL);
-}
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_libWBEMnfs(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	return (cim_false);
-}
-
-/* ARGSUSED */
-CCIMInstance *
-cp_getInstance_libWBEMnfs(CCIMObjectPath * pOP)
-{
-	return ((CCIMInstance *)NULL);
-}
-
-
-/* deletes an instance */
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_libWBEMnfs(CCIMObjectPath *pOP)
-{
-	return (cim_false);
-}
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_libWBEMnfs(CCIMObjectPath* pObjPath, CCIMProperty* pProp)
-{
-	return (cim_false);
-}
-
-/* ARGSUSED */
-CCIMProperty*
-cp_getProperty_libWBEMnfs(CCIMObjectPath *pOP, char *pPropName)
-{
-	return ((CCIMProperty*) NULL);
-}
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_libWBEMnfs(CCIMObjectPath *pOP, char *selectList,
-	char *nonJoinExp, char *queryExp, char *queryType)
-{
-	return ((CCIMInstanceList *) NULL);
-}
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_associators_libWBEMnfs(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole)
-{
-	return ((CCIMInstanceList *) NULL);
-}
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_associatorNames_libWBEMnfs(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole)
-{
-	return ((CCIMObjectPathList *) NULL);
-}
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_references_libWBEMnfs(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, char *pRole)
-{
-	return ((CCIMInstanceList *) NULL);
-}
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_referenceNames_libWBEMnfs(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, char *pRole)
-{
-	return ((CCIMObjectPathList *) NULL);
-}
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/lib/mapfile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-#	usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-$mapfile_version 2
-
-SYMBOL_VERSION SUNWprivate_1.1 {
-    global:
-	cp_associatorNames ;
-	cp_associators ;
-	cp_createInstance ;
-	cp_deleteInstance ;
-	cp_enumInstanceNames ;
-	cp_enumInstances ;
-	cp_execQuery ;
-	cp_getInstance ;
-	cp_getProperty ;
-	cp_getLastError ;
-	cp_getVersion ;
-	cp_invokeMethod ;
-	cp_isAssociatorProvider ;
-	cp_referenceNames ;
-	cp_references ;
-	cp_setInstance ;
-	cp_setProperty ;
-    local:
-	*;
-};
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_filesystem/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	Solaris_NFS.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/lib/libfsmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/common \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/include
-
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _nfs_filesystem.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-catalog:	$(POFILES)
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-install:	all
-lint:		$(LINT_OBJS)
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_filesystem/Solaris_NFS.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1239 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "Solaris_NFS.h"
-#include "util.h" /* Error handling */
-#include "nfs_provider_names.h"
-#include "nfs_providers_msgstrings.h"
-#include "messageStrings.h"
-#include "libfsmgt.h"
-#include "nfsprov_methods.h"
-#include "createprop_methods.h"
-#include <errno.h>
-#include <sys/types.h>
-#include <string.h>
-
-#define	GET_DEF_SECMODE_METHOD "getDefaultNfsSecMode"
-#define	GET_NET_CFG_LIST_METHOD "getNetCfgList"
-#define	GET_NFS_SEC_LIST_METHOD "getNfsSecList"
-#define	UNKNOWN		"Unknown"
-/*
- * Private method declarations
- */
-static CCIMInstanceList* enumerate_nfs_mounts();
-static CCIMPropertyList* populate_property_list(nfs_mntlist_t *nfs_mount);
-static CIMBool		populate_property_values(nfs_mntlist_t *nfs_mount,
-				cimchar **propValues);
-/*
- * Instance provider methods
- */
-
-/*
- * Method: cp_createInstance_Solaris_NFS
- *
- * Description: This method is not supported.  A Solaris_NFS instance is only
- * created upon the creation of a corresponding NFS mount.
- *
- * Parameters:
- *	- CCIMObjectPath *nfsOP - An object path containing the name of
- *	the class of which to enumerate the instances of.
- *
- * Returns:
- *	- Always returns NULL because the method is not supported.
- */
-/* ARGSUSED */
-CCIMObjectPath *
-cp_createInstance_Solaris_NFS(CCIMObjectPath *nfsOP,
-	CCIMInstance *nfsInst) {
-
-	int err = 0;
-
-	util_handleError("SOLARIS_NFS::CREATE_INSTANCE", CIM_ERR_NOT_SUPPORTED,
-		NULL, NULL, &err);
-
-	return ((CCIMObjectPath *)NULL);
-} /* cp_createInstance_Solaris_NFS */
-
-/*
- * Method: cp_deleteInstance_Solaris_NFS
- *
- * Description: This method is not supported.  A Solaris_NFS instance is
- * only deleted upon the deletion of the corresponding NFS mount.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the
- *	information about the class of which to delete the instance of.
- *
- * Returns:
- *	- Always returns cim_false because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_NFS(CCIMObjectPath *nfsOP) {
-
-	int err = 0;
-
-	util_handleError("SOLARIS_NFS::DELETE_INSTANCE", CIM_ERR_NOT_SUPPORTED,
-		NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_deleteInstance_Solaris_NFS */
-
-/*
- * Method: cp_enumInstances_Solaris_NFS
- *
- * Description: Enumerates the instances of Solaris_NFS mount on the host.
- *
- * Parameters:
- *	- CCIMObjectPath *nfsOP - An object path containing the name of
- *	the class of which to enumerate the instances of.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFS instances.
- *	- NULL if an error occurred or if there aren't any instances of
- *	Solaris_NFS on the host.  In the case of an error, the error will be
- *	logged.
- */
-CCIMInstanceList *
-cp_enumInstances_Solaris_NFS(CCIMObjectPath *nfsOP) {
-	CCIMInstanceList	*instList;
-	int			err = 0;
-
-	/*
-	 * First check if the CCIMObjectPath passed in is NULL.
-	 */
-	if (nfsOP == NULL) {
-		util_handleError("SOLARIS_NFS::ENUM_INSTANCES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * An nfs file system instance is equivalent to a nfs mount on the
-	 * host.
-	 */
-	instList = enumerate_nfs_mounts();
-
-	return (instList);
-} /* cp_enumInstances_Solaris_NFS */
-
-/*
- * Method: cp_enumInstanceNames_Solaris_NFS
- *
- * Description: Enumerates the object paths of the instances of Solaris_NFS
- * on the host.
- *
- * Parameters:
- *	- CCIMObjectPath *nfsOP - An object path containing the name of
- *	the class of which to enumerate the instance names of.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFS object paths.
- *	- NULL if an error occurred or if there aren't any instances of
- *	Solaris_NFS on the host.  In the case of an error, the error will be
- *	logged.
- */
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_NFS(CCIMObjectPath *nfsOP) {
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objPathList;
-	int			err = 0;
-
-	/*
-	 * First check if the object path is null.
-	 */
-	if (nfsOP == NULL) {
-		util_handleError("SOLARIS_NFS::ENUM_INSTANCENAMES",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_NFS(nfsOP);
-	if (instList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	objPathList = cim_createObjectPathList(instList);
-
-	cim_freeInstanceList(instList);
-	/*
-	 * If an error occurred in cim_createObjectPathList it will be handled
-	 * there.
-	 */
-	return (objPathList);
-} /* cp_enumInstanceNames_Solaris_NFS */
-
-/*
- * Method: cp_execQuery_Solaris_NFS
- *
- * Description: Queries the nfs instances on the host to find those that meet
- * the search criteria.
- *
- * Parameters:
- *	- CCIMObjectPath *nfsOP - An object path containing the name of
- *	the class of which to query.
- *	- char *selectClause - Not used.
- *	- char *nonJoinExp - Not used.
- *	- char *queryExp - Not used.
- *	- char *queryLang - Not used.
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFS instances that match the criteria.
- *	- NULL if an error occurred or if there are no Solaris_NFS instances
- *	that match the criteria.  In the case of an error, the error will be
- *	logged.
- *
- * NOTE: Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_execQuery_Solaris_NFS(CCIMObjectPath *nfsOP, char *selectClause,
-	char *nonJoinExp, char *queryExp, char *queryLang) {
-
-	CCIMInstance		*emptyInst;
-	CCIMInstanceList	*nfsInstList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (nfsOP == NULL) {
-		util_handleError("SOLARIS_NFS::EXEC_QUERY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsInstList = cp_enumInstances_Solaris_NFS(nfsOP);
-	if (nfsInstList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFS::EXEC_QUERY",
-			CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstanceList(nfsInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfsInstList = cim_prependInstance(nfsInstList, emptyInst);
-	if (nfsInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFS::EXEC_QUERY",
-			CIM_ERR_FAILED, PREPEND_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstance(emptyInst);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (nfsInstList);
-} /* cp_execQuery_Solaris_NFS */
-
-/*
- * Method: cp_getInstance_Solaris_NFS
- *
- * Description: Gets the Solaris_NFS instance that corresponds to the object
- * path passed in.
- *
- * Parameters:
- *	- CCIMObjectPath *nfsOP - The object path containing all the
- *	keys of the instance that is supposed to be returned.
- *
- * Returns:
- *	- A pointer to an instance of Solaris_NFS which corresponds to the
- *	object path passed in.
- *	- NULL if an error occurred or if there is no Solaris_NFS instance
- *	corresponding to the object path passed in.  In the case of an error,
- *	the error will be logged.
- */
-CCIMInstance *
-cp_getInstance_Solaris_NFS(CCIMObjectPath *nfsOP) {
-	CCIMInstanceList	*instList;
-	CCIMInstance		*inst;
-	CCIMException		*ex;
-	int			err = 0;
-
-	/*
-	 * First check to see if the object path is null.
-	 */
-	if (nfsOP == NULL || nfsOP->mKeyProperties == NULL) {
-		util_handleError("SOLARIS_NFS::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_NFS(nfsOP);
-	if (instList == NULL) {
-		/*
-		 * Either an error occurred or we simply don't have any
-		 * instances of Solaris_NFS on the system.  In the case that
-		 * an error occurred, it will be handled in
-		 * cp_enumInstances_Solaris_NFS.
-		 */
-		return ((CCIMInstance *)NULL);
-	}
-
-	inst = cim_getInstance(instList, nfsOP);
-	if (inst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFS::GET_INSTANCE",
-			CIM_ERR_INVALID_PARAMETER, GET_INSTANCE_FAILURE,
-			ex, &err);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstance *)NULL);
-	}
-
-	cim_freeInstanceList(instList);
-	return (inst);
-} /* cp_getInstance_Solaris_NFS */
-
-/*
- * Method: cp_setInstance_Solaris_NFS
- *
- * Description: This method is not supported.  This is not allowed because in
- * order to change the properties of a Solaris_NFS instance underlying file
- * system or file system mount would have to be modified.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - An object path containing the name of the class
- *	of which to set the instance.
- *	- CCIMInstance *pInst - Not used.
- *
- * Returns:
- *	- Always returns cim_false since the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_NFS(CCIMObjectPath *nfsOP, CCIMInstance *nfsInst) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFS::SET_INSTANCE", CIM_ERR_NOT_SUPPORTED,
-		NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstance_Solaris_NFS */
-
-/*
- * Method: cp_setInstanceWithList_Solaris_NFS
- *
- * Description: This method is not supported.  This is not allowed because in
- * order to change the properties of a Solaris_NFS instance underlying file
- * system or file system mount would have to be modified.
- *
- * Parameters:
- *	- CCIMObjectPath *nfsOP - The object path containing the name
- *	of the class of which to set the instance.
- *	- CCIMInstance *nfsInst - Not used.
- *	- char **props - Not used.
- *	- int num_props - Not used.
- *
- * Returns:
- *	- Always returns cim_false since the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_NFS(CCIMObjectPath *nfsOP, CCIMInstance *nfsInst,
-	char **props, int num_props) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFS::SET_INSTANCE", CIM_ERR_NOT_SUPPORTED,
-		NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstanceWithList_Solaris_NFS */
-
-
-/*
- * Property provider methods
- */
-
-/*
- * Method: cp_getProperty_Solaris_NFS
- *
- * Description: Retrieves the property with the name matching the passed in
- * parameter, pPropName, along with the value and descriptive other information.
- *
- * Parameters:
- *	- CCIMObjectPath *nfsOP - The object path containing all the
- *	information needed to find the instance in which the property is to
- *	be returned.
- *	- cimchar *pPropName - The name of the property to be found.
- *
- * Returns:
- *	- A pointer to a the property corresponding to the property name passed
- *	in with pPropName.
- *	- NULL if an error occurred or if there is no property corresponding to
- *	pPropName.  In the case of an error, the error will be logged.
- */
-CCIMProperty *
-cp_getProperty_Solaris_NFS(CCIMObjectPath *nfsOP, cimchar *pPropName) {
-	CCIMInstance	*nfsInst;
-	CCIMProperty	*nfsProp;
-	int		err = 0;
-
-	if (nfsOP == NULL || pPropName == NULL) {
-		util_handleError("SOLARIS_NFS::GET_PROPERTY",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	nfsInst = cp_getInstance_Solaris_NFS(nfsOP);
-	if (nfsInst == NULL) {
-		return ((CCIMProperty *)NULL);
-	}
-
-	nfsProp = cim_getProperty(nfsInst, pPropName);
-
-	cim_freeInstance(nfsInst);
-	/*
-	 * If an error occurred in cim_getProperty it will be handled there.
-	 */
-	return (nfsProp);
-} /* cp_getProperty_Solaris_NFS */
-
-/*
- * Method: cp_setProperty_Solaris_NFS
- *
- * Description: This method is not supported.  This is not allowed because in
- * order to change the properties of a Solaris_NFS instance underlying file
- * system or file system mount would have to be modified.
- *
- * Parameters:
- *	- CCIMObjectPath *nfsOP - Not used.
- *	- CCIMProperty *pProp - Not used.
- *
- * Returns:
- *	- Always returns cim_false because the method is not supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_NFS(CCIMObjectPath *nfsOP, CCIMProperty *pProp) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_NFS::SET_PROPERTY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setProperty_Solaris_NFS */
-
-/*
- * Method provider methods
- */
-
-/*
- * Method: cp_invokeMethod_Solaris_NFS
- *
- * Description: Routes the cp_invokeMethod_Solaris_NFS calls to the correct
- * Solaris_NFS methods.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - The object path containing needed information
- *	about the class that is to getting methods invoked.
- *	- cimchar *functionName - The name of the function to be invoked.
- *	- CCIMPropertyList *inParams - The input parameters to the function.
- *	- CCIMPropertyList *outParams - The output parameters from the function.
- *
- * Returns:
- *	- A property having a value which indicates success or failure of the
- *	function.  1 for success, 0 for failure.
- *	- Upon error, NULL is returned and the error is logged.
- *
- * NOTE: All methods of Solaris_NFS are deprecated, but are still to be
- * supported until they are EOL'd.  EOL date is to be determined.
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_NFS(CCIMObjectPath *pOP, cimchar *functionName,
-	CCIMPropertyList *inParams, CCIMPropertyList *outParams) {
-
-	int		err = 0;
-	CCIMProperty    *retVal;
-
-	if (pOP == NULL || functionName == NULL) {
-		util_handleError("SOLARIS_NFS::INVOKE_METHOD",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-	/*
-	 * Determine what method is being called.
-	 */
-	if (strcasecmp(functionName, GET_NET_CFG_LIST_METHOD) == 0) {
-		retVal = get_netconfig_list(outParams);
-	} else if (strcasecmp(functionName, GET_NFS_SEC_LIST_METHOD) == 0) {
-		retVal = get_nfssec_list(outParams);
-	} else if (strcasecmp(functionName, GET_DEF_SECMODE_METHOD) == 0) {
-		retVal = get_default_secmode(outParams);
-	} else {
-		/*
-		 * No such method name.
-		 */
-		util_handleError("SOLARIS_NFS::INVOKE_METHOD",
-			CIM_ERR_FAILED, NO_SUCH_METHOD, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	return (retVal);
-} /* cp_invokeMethod_Solaris_NFS */
-
-/*
- * Private methods
- */
-
-/*
- * Method: enumerate_nfs_mounts
- *
- * Description: Enumerates all the NFS file systems on the host.
- *
- * Parameters:
- *	- NONE
- *
- * Returns:
- *	- A pointer to a list of Solaris_NFS instances on the host.
- *	- NULL if an error occurred or if there aren't any Solaris_NFS
- *	instances on the host.  In the case of an error, the error will be
- *	logged.
- */
-static CCIMInstanceList *
-enumerate_nfs_mounts() {
-	int		err = 0;
-	nfs_mntlist_t	*nfs_mount_list, *currentMnt;
-	CCIMException	*ex;
-
-	nfs_mount_list = nfs_get_mount_list(&err);
-	if (nfs_mount_list == NULL) {
-		/*
-		 * Check whether an error was returned or if we simply don't
-		 * have any nfs file systems on the system.  If err is not
-		 * equal to 0, an error was encountered.
-		 */
-		if (err != 0) {
-			/*
-			 * Determine the error and log it.
-			 */
-			if (err == ENOMEM || err == EAGAIN) {
-				util_handleError("SOLARIS_NFS::ENUM_MOUNTS",
-					CIM_ERR_LOW_ON_MEMORY,
-					NFS_GET_MNTLIST_FAILURE,
-					NULL, &err);
-
-				return ((CCIMInstanceList *)NULL);
-			} else {
-				/*
-				 * If any other errors were encountered it
-				 * can be handled as a general error.  We may
-				 * not know exactly what the error is.
-				 */
-				util_handleError("SOLARIS_NFS::ENUM_MOUNTS",
-					CIM_ERR_FAILED, NFS_GET_MNTLIST_FAILURE,
-					NULL, &err);
-
-				return ((CCIMInstanceList *)NULL);
-			}
-		}
-		/*
-		 * There are simply no nfs mounts on the host.
-		 */
-		return ((CCIMInstanceList *)NULL);
-	} else {
-		/*
-		 * At this point, one or more nfs mounts were found on the
-		 * system, create the instance list from the nfs_mount_list.
-		 */
-		CCIMInstanceList	*nfsInstList;
-
-		nfsInstList = cim_createInstanceList();
-		if (nfsInstList == NULL) {
-			ex = cim_getLastError();
-			util_handleError("SOLARIS_NFS::ENUM_MOUNTS",
-				CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE,
-				ex, &err);
-			nfs_free_mntinfo_list(nfs_mount_list);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Loop through the nfs mounts to retrieve their properties
-		 * and create an instance list containing all the nfs file
-		 * systems and their properties.
-		 */
-		for (currentMnt = nfs_mount_list; currentMnt != NULL;
-			currentMnt = currentMnt->next) {
-
-			CCIMInstance		*solarisNFSInstance;
-			CCIMPropertyList	*solarisNFSPropList;
-
-			/*
-			 * Create the Solaris_NFS CCIMInstance
-			 */
-			solarisNFSInstance =
-				cim_createInstance(SOLARIS_NFS);
-			if (solarisNFSInstance == NULL) {
-				ex = cim_getLastError();
-				util_handleError("SOLARIS_NFS::ENUM_MOUNTS",
-					CIM_ERR_FAILED,
-					CREATE_INSTANCE_FAILURE, ex, &err);
-
-				cim_freeInstanceList(nfsInstList);
-				nfs_free_mntinfo_list(nfs_mount_list);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			solarisNFSPropList =
-				populate_property_list(currentMnt);
-			if (solarisNFSPropList == NULL) {
-				/*
-				 * An error occurred in populate_property_list
-				 * and was logged there.
-				 */
-				cim_freeInstanceList(nfsInstList);
-				cim_freeInstance(solarisNFSInstance);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			solarisNFSInstance = cim_addPropertyListToInstance(
-				solarisNFSInstance, solarisNFSPropList);
-			if (solarisNFSInstance == NULL) {
-				ex = cim_getLastError();
-				util_handleError("SOLARIS_NFS::ENUM_MOUNTS",
-					CIM_ERR_FAILED,
-					PROPLIST_TO_INSTANCE_FAILURE, ex,
-					&err);
-				cim_freeInstanceList(nfsInstList);
-				cim_freePropertyList(solarisNFSPropList);
-				nfs_free_mntinfo_list(nfs_mount_list);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			nfsInstList = cim_addInstance(nfsInstList,
-				solarisNFSInstance);
-			if (nfsInstList == NULL) {
-				ex = cim_getLastError();
-				util_handleError("SOLARIS_NFS::ENUM_MOUNTS",
-					CIM_ERR_FAILED, ADD_INSTANCE_FAILURE,
-					ex, &err);
-				/*
-				 * Freeing the instance will also free the
-				 * property list added to the instance.
-				 */
-				cim_freeInstance(solarisNFSInstance);
-				nfs_free_mntinfo_list(nfs_mount_list);
-				return ((CCIMInstanceList *)NULL);
-			}
-		} /* end for */
-
-		nfs_free_mntinfo_list(nfs_mount_list);
-		return (nfsInstList);
-	}
-
-} /* enumerate_nfs_mounts */
-
-/*
- * Method:populate_property_list
- *
- * Description: Populates a property list with the properties of the nfs mounted
- * file system that is passed in with the nfs_mount parameter.
- *
- * Parameters:
- *	- The nfs mount from which to extract the properties from.
- *
- * Returns:
- *	- A pointer to a list of properties corresponding to the NFS mounted
- *	file system passed in with the nfs_mount parameter.
- *	- Upon error, NULL is returned and an error is logged.
- */
-static CCIMPropertyList *
-populate_property_list(nfs_mntlist_t *nfs_mount) {
-	CCIMPropertyList	*nfsPropList;
-	CCIMException		*ex;
-	cimchar			**propValues;
-	int			err = 0, i = 0;
-
-	nfsPropList = cim_createPropertyList();
-	if (nfsPropList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFS::POPULATE_PROPLIST",
-			CIM_ERR_FAILED, CREATE_PROPLIST_FAILURE, ex, &err);
-		return ((CCIMPropertyList *)NULL);
-	}
-
-	propValues = calloc((size_t)PROPCOUNT, (size_t)sizeof (cimchar *));
-	if (propValues == NULL) {
-		util_handleError("SOLARIS_NFS::POPULATE_PROPLIST",
-			CIM_ERR_LOW_ON_MEMORY, LOW_MEMORY, NULL, &err);
-		return ((CCIMPropertyList *)NULL);
-	}
-
-	if (populate_property_values(nfs_mount, propValues) == cim_false) {
-		cim_freePropertyList(nfsPropList);
-		fileutil_free_string_array(propValues, PROPCOUNT);
-		return ((CCIMPropertyList *)NULL);
-	}
-
-	for (i = 0; i < PROPCOUNT; i++) {
-		nfsPropList = add_property_to_list(nfsProps[i].name,
-			nfsProps[i].type, propValues[i], NULL,
-			nfsProps[i].isKey, nfsPropList);
-		if (nfsPropList == NULL) {
-			fileutil_free_string_array(propValues, PROPCOUNT);
-			return ((CCIMPropertyList *)NULL);
-		}
-	}
-
-	fileutil_free_string_array(propValues, PROPCOUNT);
-	return (nfsPropList);
-} /* populate_property_list */
-
-static CIMBool
-populate_property_values(nfs_mntlist_t *nfs_mount,
-	cimchar **propValues) {
-
-	unsigned long long	availablesize;
-	unsigned long long	blocksize;
-	unsigned long long	totalsize;
-	unsigned long long	usedsize;
-	unsigned long		maxfilenamelen;
-	unsigned long		fragsize;
-	unsigned int		codeSet[1] = { 0 };
-	boolean_t		readonly;
-	boolean_t		optHasEquals;
-	cimchar			*codeSetValue;
-	cimchar			propValue[MAXSIZE];
-	char			*hostname;
-	char			*devid;
-	char			*resourceStr = "resource:=";
-	char			*devidStr = "devid:=";
-	char			*noSuid, *posix, *public, *quota, *port;
-	int			err = 0, defaultValue = 0, nameLen = 0;
-
-	/*
-	 * AttributeCaching
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", (!nfs_mount->nml_noac));
-	propValues[ATTRCACHE] = strdup(propValue);
-	if (propValues[ATTRCACHE] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * AttributeCachingForDirectoriesMax
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_acdirmax);
-	propValues[ATTRCACHEDIRMAX] = strdup(propValue);
-	if (propValues[ATTRCACHEDIRMAX] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * AttributeCachingForDirectoriesMin
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_acdirmin);
-	propValues[ATTRCACHEDIRMIN] = strdup(propValue);
-	if (propValues[ATTRCACHEDIRMIN] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * AttributeCachingForRegularFilesMax
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_acregmax);
-	propValues[ATTRCACHEFILESMAX] = strdup(propValue);
-	if (propValues[ATTRCACHEFILESMAX] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * AttributeCachingForRegularFilesMin
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_acregmin);
-	propValues[ATTRCACHEFILESMIN] = strdup(propValue);
-	if (propValues[ATTRCACHEFILESMIN] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * AvailableSpace
-	 */
-	availablesize = fs_get_availablesize(nfs_mount->nml_mountp, &err);
-	if (err != 0) {
-		return (cim_false);
-	}
-	(void) snprintf(propValue, MAXSIZE, "%lld", availablesize);
-	propValues[AVAILSPACE] = strdup(propValue);
-	if (propValues[AVAILSPACE] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * BlockSize
-	 */
-	blocksize = fs_get_blocksize(nfs_mount->nml_mountp, &err);
-	if (err != 0) {
-		return (cim_false);
-	}
-	(void) snprintf(propValue, MAXSIZE, "%lld", blocksize);
-	propValues[BLKSIZE] = strdup(propValue);
-	if (propValues[BLKSIZE] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * Caption - Nothing top populate here.
-	 */
-
-	/*
-	 * CasePreserved - True
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", B_TRUE);
-	propValues[CASEPRES] = strdup(propValue);
-	if (propValues[CASEPRES] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * CaseSensitive - True
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", B_TRUE);
-	propValues[CASESENS] = strdup(propValue);
-	if (propValues[CASESENS] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * ClusterSize - As defined in CIM_FileSystem:
-	 * The minimum file allocation size (an integral number of
-	 * blocks), imposed by the FileSystem. (The size of a block is
-	 * specified in the BlockSize property for the FileSystem.)
-	 * Minimum allocation size is the smallest amount of storage
-	 * allocated to a LogicalFile by the FileSystem. This is not a
-	 * mandatory minimum allocation for all FileSystems. Under
-	 * stress conditions, some FileSystems may allocate storage
-	 * in amounts smaller than the ClusterSize.
-	 */
-	fragsize = fs_get_fragsize(nfs_mount->nml_mountp, &err);
-	if (err != 0) {
-		return (cim_false);
-	}
-	(void) snprintf(propValue, MAXSIZE, "%ld", fragsize);
-	propValues[CLUSTERSZ] = strdup(propValue);
-	if (propValues[CLUSTERSZ] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * CodeSet
-	 */
-	codeSetValue = cim_encodeUint16Array(codeSet, 1);
-	if (codeSetValue == NULL) {
-		return (cim_false);
-	}
-	propValues[CODESET] = strdup(codeSetValue);
-	if (propValues[CODESET] == NULL) {
-		return (cim_false);
-	}
-	free(codeSetValue);
-
-	/*
-	 * CompressionMethod
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%s", UNKNOWN);
-	propValues[COMPRESSMETH] = strdup(propValue);
-	if (propValues[COMPRESSMETH] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * CSCreationClassName -- KEY
-	 */
-	propValues[CSCREATCLASSNM] = strdup(SOLARIS_CS);
-	if (propValues[CSCREATCLASSNM] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * CSName -- KEY
-	 */
-	hostname = sys_get_hostname(&err);
-	if (hostname == NULL) {
-		util_handleError("SOLARIS_NFS::POPULATE_PROPVALUES",
-			CIM_ERR_FAILED, GET_HOSTNAME_FAILURE, NULL, &err);
-		return (cim_false);
-	}
-	propValues[CSNAME] = strdup(hostname);
-	if (propValues[CSNAME] == NULL) {
-		return (cim_false);
-	}
-	free(hostname);
-
-	/*
-	 * CreationClassName -- KEY
-	 */
-	propValues[CREATCLASSNM] = strdup(SOLARIS_NFS);
-	if (propValues[CREATCLASSNM] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * Description - Nothing to populate here.
-	 */
-
-	/*
-	 * EncryptionMethod
-	 */
-	propValues[ENCRYPTMETH] = strdup(UNKNOWN);
-	if (propValues[ENCRYPTMETH] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * FileSystemSize
-	 */
-	totalsize = fs_get_totalsize(nfs_mount->nml_mountp, &err);
-	if (err != 0) {
-		return (cim_false);
-	}
-	(void) snprintf(propValue, MAXSIZE, "%lld", totalsize);
-	propValues[FSSIZE] = strdup(propValue);
-	if (propValues[FSSIZE] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * FileSystemType
-	 */
-	propValues[FSTYPE] = strdup(nfs_mount->nml_fstype);
-	if (propValues[FSTYPE] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * ForegroundMount - This property is not populated because it is only
-	 * valid upon creation of a nfs mounted file system.  This is actually
-	 * a mount process option and not a mount option.
-	 */
-
-	/*
-	 * Global - this doesn't really make sense for a nfs file system.
-	 * An nfs file system can't be mounted globally on all nodes of a
-	 * cluster so this will always be false.
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", B_FALSE);
-	propValues[GLOBAL] = strdup(propValue);
-	if (propValues[GLOBAL] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * GrpId
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_grpid);
-	propValues[GRPID] = strdup(propValue);
-	if (propValues[GRPID] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * HardMount
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_hard);
-	propValues[HARDMNT] = strdup(propValue);
-	if (propValues[HARDMNT] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * InstallDate - Nothing to populate here.
-	 */
-
-	/*
-	 * Interrupt
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_intr);
-	propValues[INTR] = strdup(propValue);
-	if (propValues[INTR] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * MaxFileNameLength
-	 */
-	maxfilenamelen = fs_get_maxfilenamelen(nfs_mount->nml_mountp, &err);
-	if (err != 0) {
-		util_handleError("SOLARIS_NFS::POPULATE_PROPVALUES",
-			CIM_ERR_FAILED, FS_GET_MAXFILENMLEN_FAILURE, NULL,
-			&err);
-		return (cim_false);
-	}
-	(void) snprintf(propValue, MAXSIZE, "%ld", maxfilenamelen);
-	propValues[MAXFILENMLN] = strdup(propValue);
-	if (propValues[MAXFILENMLN] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * MountFailureRetries - This value is only valid upon creation of a
-	 * nfs mount.  This is actually a mount process option and not a mount
-	 * option.
-	 */
-
-	/*
-	 * Name -- KEY, Populated with the string:
-	 * "resource:=<resource> devid:=<devid>" in order to create a unique
-	 * yet readable key.
-	 */
-	devid = fs_parse_optlist_for_option(nfs_mount->nml_mntopts,
-		"dev=", &err);
-	if (devid == NULL) {
-		util_handleError("SOLARIS_NFS::POPULATE_PROPVALUES",
-			CIM_ERR_FAILED, FS_PARSE_OPTLIST_FAILURE, NULL, &err);
-		return (cim_false);
-	}
-	/*
-	 * + 2 is for space and null terminating character.
-	 */
-	nameLen = strlen(resourceStr) + strlen(nfs_mount->nml_resource) +
-		strlen(devidStr) + strlen(devid) + 2;
-
-	propValues[NAME] = calloc((size_t)nameLen, (size_t)sizeof (cimchar));
-	if (propValues[NAME] == NULL) {
-		return (cim_false);
-	}
-
-	(void) snprintf(propValues[NAME], nameLen, "%s%s%s%s%s", resourceStr,
-		nfs_mount->nml_resource, " ", devidStr, devid);
-	free(devid);
-
-	/*
-	 * NoMnttabEntry - This will always be false for every file system
-	 * that is shown in the CIM/WBEM interface because there is no way
-	 * to programatically determine a file system that is mounted if it
-	 * is not in /etc/mnttab.  If it is not in /etc/mnttab, it is like
-	 * that for a reason and is also an argument for not showing the
-	 * existence of those file systems.
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", B_FALSE);
-	propValues[NOMNTTABENT] = strdup(propValue);
-	if (propValues[NOMNTTABENT] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * NoSuid
-	 */
-	optHasEquals = B_FALSE;
-	noSuid = get_property_from_opt_string(nfs_mount->nml_mntopts,
-		"nosuid", optHasEquals, defaultValue);
-	if (noSuid == NULL) {
-		return (cim_false);
-	}
-	propValues[NOSUID] = strdup(noSuid);
-	if (propValues[NOSUID] == NULL) {
-		return (cim_false);
-	}
-	free(noSuid);
-
-	/*
-	 * Overlay - This is a property which is only valid upon creation of a
-	 * nfs mount.  It specifies that the file system is to be mounted on
-	 * top of another existing mounted file system.
-	 */
-
-	/*
-	 * Posix
-	 */
-	optHasEquals = B_FALSE;
-	posix = get_property_from_opt_string(nfs_mount->nml_mntopts,
-		"posix", optHasEquals, defaultValue);
-	if (posix == NULL) {
-		return (cim_false);
-	}
-	propValues[POSIX] = strdup(posix);
-	if (propValues[POSIX] == NULL) {
-		return (cim_false);
-	}
-	free(posix);
-
-	/*
-	 * Proto
-	 */
-	propValues[PROTO] = strdup(nfs_mount->nml_proto);
-	if (propValues[PROTO] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * Public
-	 */
-	optHasEquals = B_FALSE;
-	public = get_property_from_opt_string(nfs_mount->nml_mntopts,
-		"public", optHasEquals, defaultValue);
-	if (public == NULL) {
-		return (cim_false);
-	}
-	propValues[PUBLIC] = strdup(public);
-	if (propValues[PUBLIC] == NULL) {
-		return (cim_false);
-	}
-	free(public);
-
-	/*
-	 * Quota
-	 */
-	optHasEquals = B_FALSE;
-	quota = get_property_from_opt_string(nfs_mount->nml_mntopts,
-		"quota", optHasEquals, defaultValue);
-	if (quota == NULL) {
-		return (cim_false);
-	}
-	propValues[QUOTA] = strdup(quota);
-	if (propValues[QUOTA] == NULL) {
-		return (cim_false);
-	}
-	free(quota);
-
-	/*
-	 * ReadBufferSize
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_curread);
-	propValues[READBUFFSIZE] = strdup(propValue);
-	if (propValues[READBUFFSIZE] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * ReadOnly
-	 */
-	readonly = fs_is_readonly(nfs_mount->nml_mountp, &err);
-	if (err != 0) {
-		return (cim_false);
-	}
-	(void) snprintf(propValue, MAXSIZE, "%d", readonly);
-	propValues[READONLY] = strdup(propValue);
-	if (propValues[READONLY] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * Remount - This is a property that is only valid upon creation of a
-	 * nfs file system mount.  This should not be populated upon the
-	 * enumeration of the Solaris_NFS class instances or instanceNames.
-	 */
-
-	/*
-	 * RetransmissionAttempts
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_retrans);
-	propValues[RETRANSATTEMPTS] = strdup(propValue);
-	if (propValues[RETRANSATTEMPTS] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * RetransmissionTimeout
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_timeo);
-	propValues[RETRANSTIMEO] = strdup(propValue);
-	if (propValues[RETRANSTIMEO] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * Root
-	 */
-	propValues[ROOT] = strdup(nfs_mount->nml_mountp);
-	if (propValues[ROOT] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * SecurityMode
-	 */
-	if (nfs_mount->nml_securitymode != NULL) {
-		propValues[SECMODE] = strdup(nfs_mount->nml_securitymode);
-		if (propValues[SECMODE] == NULL) {
-			return (cim_false);
-		}
-	}
-
-	/*
-	 * ServerCommunicationPort
-	 */
-	optHasEquals = B_TRUE,
-	defaultValue = NFS_PORT;
-	port = get_property_from_opt_string(nfs_mount->nml_mntopts,
-		"port=", optHasEquals, defaultValue);
-	if (port == NULL) {
-		return (cim_false);
-	}
-	propValues[SERVERCOMMPORT] = strdup(port);
-	if (propValues[SERVERCOMMPORT] == NULL) {
-		return (cim_false);
-	}
-	free(port);
-
-	/*
-	 * Status - Nothing to populate here.
-	 */
-
-	/*
-	 * UsedSpace
-	 */
-	usedsize = fs_get_usedsize(nfs_mount->nml_mountp, &err);
-	if (err != 0) {
-		return (cim_false);
-	}
-	(void) snprintf(propValue, MAXSIZE, "%lld", usedsize);
-	propValues[USEDSPACE] = strdup(propValue);
-	if (propValues[USEDSPACE] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * Version
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_vers);
-	propValues[VERS] = strdup(propValue);
-	if (propValues[VERS] == NULL) {
-		return (cim_false);
-	}
-
-	/*
-	 * WriteBufferSize
-	 */
-	(void) snprintf(propValue, MAXSIZE, "%d", nfs_mount->nml_curwrite);
-	propValues[WRITEBUFFSIZE] = strdup(propValue);
-	if (propValues[WRITEBUFFSIZE] == NULL) {
-		return (cim_false);
-	}
-
-	return (cim_true);
-} /* populate_property_values */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_filesystem/Solaris_NFS.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,196 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SOLARIS_NFS_H
-#define	_SOLARIS_NFS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cimstructs.h>
-#include "nfsprov_include.h"
-
-
-#define	PROPCOUNT 48
-
-static nfs_prov_prop_t nfsProps[] = {
-#define	ATTRCACHE 0
-	{"AttributeCaching", cim_false, boolean},
-
-#define	ATTRCACHEDIRMAX (ATTRCACHE + 1)
-	{"AttributeCachingForDirectoriesMax", cim_false, uint16},
-
-#define	ATTRCACHEDIRMIN (ATTRCACHEDIRMAX + 1)
-	{"AttributeCachingForDirectoriesMin", cim_false, uint16},
-
-#define	ATTRCACHEFILESMAX (ATTRCACHEDIRMIN + 1)
-	{"AttributeCachingForRegularFilesMax", cim_false, uint16},
-
-#define	ATTRCACHEFILESMIN (ATTRCACHEFILESMAX + 1)
-	{"AttributeCachingForRegularFilesMin", cim_false, uint16},
-
-#define	AVAILSPACE (ATTRCACHEFILESMIN + 1)
-	{"AvailableSpace", cim_false, uint64},
-
-#define	BLKSIZE (AVAILSPACE + 1)
-	{"BlockSize", cim_false, uint64},
-
-#define	CAPTION (BLKSIZE + 1)
-	{"Caption", cim_false, string},
-
-#define	CASEPRES (CAPTION + 1)
-	{"CasePreserved", cim_false, boolean},
-
-#define	CASESENS (CASEPRES + 1)
-	{"CaseSensitive", cim_false, boolean},
-
-#define	CLUSTERSZ (CASESENS + 1)
-	{"ClusterSize", cim_false, uint32},
-
-#define	CODESET (CLUSTERSZ + 1)
-	{"CodeSet", cim_false, uint16_array},
-
-#define	COMPRESSMETH (CODESET + 1)
-	{"CompressionMethod", cim_false, string},
-
-#define	CSCREATCLASSNM (COMPRESSMETH + 1)
-	{"CSCreationClassName", cim_true, string},
-
-#define	CSNAME (CSCREATCLASSNM + 1)
-	{"CSName", cim_true, string},
-
-#define	CREATCLASSNM (CSNAME + 1)
-	{"CreationClassName", cim_true, string},
-
-#define	DESCRIP (CREATCLASSNM + 1)
-	{"Description", cim_false, string},
-
-#define	ENCRYPTMETH (DESCRIP + 1)
-	{"EncryptionMethod", cim_false, string},
-
-#define	FSSIZE (ENCRYPTMETH + 1)
-	{"FileSystemSize", cim_false, uint64},
-
-#define	FSTYPE (FSSIZE + 1)
-	{"FileSystemType", cim_false, string},
-
-#define	FGMOUNT (FSTYPE + 1)
-	{"ForegroundMount", cim_false, boolean},
-
-#define	GLOBAL (FGMOUNT + 1)
-	{"Global", cim_false, boolean},
-
-#define	GRPID (GLOBAL + 1)
-	{"GrpId", cim_false, boolean},
-
-#define	HARDMNT (GRPID + 1)
-	{"HardMount", cim_false, boolean},
-
-#define	INSTALLDATE (HARDMNT + 1)
-	{"InstallDate", cim_false, datetime},
-
-#define	INTR (INSTALLDATE + 1)
-	{"Interrupt", cim_false, boolean},
-
-#define	MAXFILENMLN (INTR + 1)
-	{"MaxFileNameLength", cim_false, uint32},
-
-#define	MNTFAILRETRIES (MAXFILENMLN + 1)
-	{"MountFailureRetries", cim_false, uint16},
-
-#define	NAME (MNTFAILRETRIES + 1)
-	{"Name", cim_true, string},
-
-#define	NOMNTTABENT (NAME + 1)
-	{"NoMnttabEntry", cim_false, boolean},
-
-#define	NOSUID (NOMNTTABENT + 1)
-	{"NoSuid", cim_false, boolean},
-
-#define	OVERLAY (NOSUID + 1)
-	{"Overlay", cim_false, boolean},
-
-#define	POSIX (OVERLAY + 1)
-	{"Posix", cim_false, boolean},
-
-#define	PROTO (POSIX + 1)
-	{"Proto", cim_false, string},
-
-#define	PUBLIC (PROTO + 1)
-	{"Public", cim_false, boolean},
-
-#define	QUOTA (PUBLIC + 1)
-	{"Quota", cim_false, boolean},
-
-#define	READBUFFSIZE (QUOTA + 1)
-	{"ReadBufferSize", cim_false, uint64},
-
-#define	READONLY (READBUFFSIZE + 1)
-	{"ReadOnly", cim_false, boolean},
-
-#define	REMNT (READONLY + 1)
-	{"Remount", cim_false, boolean},
-
-#define	RETRANSATTEMPTS (REMNT + 1)
-	{"RetransmissionAttempts", cim_false, uint16},
-
-#define	RETRANSTIMEO (RETRANSATTEMPTS + 1)
-	{"RetransmissionTimeout", cim_false, uint32},
-
-#define	ROOT (RETRANSTIMEO + 1)
-	{"Root", cim_false, string},
-
-#define	SECMODE (ROOT + 1)
-	{"SecurityMode", cim_false, string},
-
-#define	SERVERCOMMPORT (SECMODE + 1)
-	{"ServerCommunicationPort", cim_false, uint32},
-
-#define	STATUS (SERVERCOMMPORT + 1)
-	{"Status", cim_false, string},
-
-#define	USEDSPACE (STATUS + 1)
-	{"UsedSpace", cim_false, uint64},
-
-#define	VERS (USEDSPACE + 1)
-	{"Version", cim_false, string},
-
-#define	WRITEBUFFSIZE (VERS + 1)
-	{"WriteBufferSize", cim_false, uint64}
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_NFS_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_mount/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	Solaris_MountService.o
-
-LINT_OBJS =	$(OBJECTS:%.o=%.ln)
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/lib/libfsmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/include \
-		$(SRC)/cmd/wbem/provider/c/filesystems/common/cmdgeneration \
-		$(SRC)/cmd/wbem/provider/c/filesystems/wbem_nfs/common
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _nfs_mount.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-
-catalog:	$(POFILES)
-
-install:	all
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_mount/Solaris_MountService.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "util.h"
-#include "nfs_providers_msgstrings.h"
-#include "messageStrings.h"
-#include "nfs_provider_names.h"
-#include "nfsprov_methods.h"
-#include <cimapi.h>
-#include <cp_method.h>
-
-
-/*
- * Constants
- */
-#define	MOUNTALL "mountall"
-#define	UMOUNTALL "unmountall"
-
-/*
- * Instance provider methods
- */
-
-/* ARGSUSED */
-CCIMObjectPath *
-cp_createInstance_Solaris_MountService(CCIMObjectPath *pOP,
-	CCIMInstance *pInst) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_MNTSERV::CREATE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMObjectPath *)NULL);
-} /* cp_createInstance_Solaris_MountService */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_MountService(CCIMObjectPath *pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_MNTSERV::DELETE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_deleteInstance_Solaris_MountService */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_enumInstances_Solaris_MountService(CCIMObjectPath *pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_MNTSERV::ENUM_INSTANCES",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMInstanceList *)NULL);
-} /* cp_enumInstances_Solaris_MountService */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_MountService(CCIMObjectPath *pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_MNTSERV::ENUM_INSTANCENAMES",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMObjectPathList *)NULL);
-} /* cp_enumInstanceNames_Solaris_MountService */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_execQuery_Solaris_MountService(CCIMObjectPath *pOP, char *selectClause,
-	char *nonJoinExp, char *queryExp, char *queryLang) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_MNTSERV::EXEC_QUERY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMInstanceList *)NULL);
-} /* cp_execQuery_Solaris_MountService */
-
-/* ARGSUSED */
-CCIMInstance *
-cp_getInstance_Solaris_MountService(CCIMObjectPath *pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_MNTSERV::GET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMInstance *)NULL);
-} /* cp_getInstance_Solaris_MountService */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_MountService(CCIMObjectPath *pOP, CCIMInstance *pInst) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_MNTSERV::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstance_Solaris_MountService */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_MountService(CCIMObjectPath *pOP,
-	CCIMInstance *pInst, char **props, int num_props) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_MNTSERV::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstanceWithList_Solaris_MountService */
-
-/*
- * Property provider methods
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_getProperty_Solaris_MountService(CCIMObjectPath *pOP, cimchar *pPropName) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_MNTSERV::GET_PROPERTY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMProperty *)NULL);
-} /* cp_getProperty_Solaris_MountService */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_MountService(CCIMObjectPath *pOP, CCIMProperty *pProp) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_MNTSERV::SET_PROPERTY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setProperty_Solaris_MountService */
-
-
-/*
- * Method provider methods
- */
-/*
- * Method: cp_invokeMethod_Solaris_MountService
- *
- * Description: Routes the cp_invokeMethod_Solaris_MountService calls to the
- * correct Solaris_MountService methods.
- *
- * Parameters:
- *      - CCIMObjectPath *pOP - The object path containing needed information
- *      about the class that is to getting methods invoked.
- *      - cimchar *functionName - The name of the function to be invoked.
- *      - CCIMPropertyList *inParams - The input parameters to the function.
- *      - CCIMPropertyList *outParams - The output parameters from the function.
- *
- * Returns:
- *      - A pointer to a property which indicates success or failure of the
- *      function.  1 for success, 0 for failure.
- *      - Upon error, NULL is returned and the error is logged.
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_MountService(CCIMObjectPath *pOP, cimchar *functionName,
-	CCIMPropertyList *inParams, CCIMPropertyList *outParams) {
-
-	CCIMProperty	*retVal;
-	int		err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_MNTSERV::INVOKE_METHOD",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	/*
-	 * Determine what method is being called.
-	 */
-	if (strcasecmp(functionName, MOUNTALL) == 0) {
-		retVal = mountall(inParams);
-	} else if (strcasecmp(functionName, UMOUNTALL) == 0) {
-		retVal = unmountall(inParams);
-	} else {
-		/*
-		 * No such method name.
-		 */
-		util_handleError("SOLARIS_MNTSERV::INVOKE_METHOD",
-			CIM_ERR_FAILED, NO_SUCH_METHOD, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	return (retVal);
-} /* cp_invokeMethod_Solaris_MountService */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_share/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	Solaris_NFSShare.o \
-		Solaris_NFSShareSecurity.o \
-		Solaris_PersistentShare.o \
-		Solaris_ShareService.o
-
-LINT_OBJS =	$(OBJECTS:%.o=%.ln)
-
-WBEM_PROV =	cmd/wbem/provider/c
-
-GENERAL =	$(ROOTWBEMINC) \
-		$(SRC)/lib/libfsmgt/common \
-		$(SRC)/$(WBEM_PROV)/include \
-		$(SRC)/$(WBEM_PROV)/filesystems/common/cmdgeneration \
-		$(SRC)/$(WBEM_PROV)/filesystems/wbem_nfs/include \
-		$(SRC)/$(WBEM_PROV)/filesystems/wbem_nfs/common
-
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -DPIC -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_BIGPICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _nfs_share.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-install:	all
-lint:		$(LINT_OBJS)
-		$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_share/Solaris_NFSShare.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1184 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "Solaris_NFSShare.h"
-#include "nfs_keys.h"
-#include "nfs_provider_names.h"
-#include "nfs_providers_msgstrings.h"
-#include "messageStrings.h"
-#include "cmdgen.h"
-#include "util.h"
-#include "libfsmgt.h"
-#include "createprop_methods.h"
-#include <string.h>
-#include <errno.h>
-#include <sys/utsname.h>
-#include <sys/types.h>
-#include <signal.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-/*
- * Constants
- */
-/* #define	SOLARIS_NFSSHARE "Solaris_NFSShare" */
-#define	NFSD 0
-#define	MOUNTD 1
-
-
-/*
- * Private method declarations
- */
-
-static CIMBool		check_for_PersistentShareEnt(
-			    fs_sharelist_t *nfs_sharelist, int *err);
-static CCIMInstanceList	*enumerate_shares();
-static CCIMPropertyList	*populate_Solaris_NFSShare_property_list(
-			    char *hostname,
-			    fs_sharelist_t *nfs_share);
-static CIMBool		populate_Solaris_NFSShare_property_Values(
-			    char *hostname,
-			    fs_sharelist_t *nfs_sharelist,
-			    cimchar propValues[PROPCOUNT][MAXSIZE],
-			    int *err);
-static char		*start_daemons(int which_daemon, int *err);
-
-/*
- * Public methods
- */
-
-/*
- * Instance provider methods
- */
-
-/*
- * Solaris_NFSShare provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the CIMOM as the caller.
- */
-
-/*
- * Name: cp_enumInstances_Solaris_NFSShare
- *
- * Description: Creates a list of instances and returns that list.
- *
- * Parameters:
- *      shareOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstanceList * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_enumInstances_Solaris_NFSShare(CCIMObjectPath* shareOP)
-{
-	CCIMInstanceList	*instList;
-	int			err = 0;
-
-	cim_logDebug("cp_enumInstances_Solaris_NFSShare", "just entering...");
-	/*
-	 * Check object path for NULL value
-	 */
-	if (shareOP == NULL) {
-		util_handleError(
-		    "SOLARIS_NFSSHARE::ENUM_INSTANCES",
-		    CIM_ERR_INVALID_PARAMETER, NULL,
-		    NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	cim_logDebug("cp_enumInstances_Solaris_NFSShare",
-	    "Calling enumerate_shares");
-	instList = enumerate_shares();
-	if (instList == NULL) {
-		cim_logDebug("cp_enumInstances_Solaris_NFSShare",
-		    "Call from enumerate_sharesreturned NULL");
-	}
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_NFSShare
- *
- * Description: Returns a list of instances if found.
- *
- * Parameters:
- *      shareOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMObjectPathList * if matched instance is found. Otherwise, NULL.
- */
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_NFSShare(CCIMObjectPath* shareOP)
-{
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*ObjPathList;
-	int			err = 0;
-
-	/*
-	 * Check object path for NULL value
-	 */
-	if (shareOP == NULL) {
-		util_handleError("SOLARIS_NFSSHARE::ENUM_INSTANCENAMES",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_NFSShare(shareOP);
-	if (instList == NULL) {
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	ObjPathList = cim_createObjectPathList(instList);
-
-	cim_freeInstanceList(instList);
-	return (ObjPathList);
-}
-
-/*
- * Name: cp_getInstance_Solaris_NFSShare
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      shareOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-/* ARGSUSED */
-CCIMInstance *
-cp_getInstance_Solaris_NFSShare(CCIMObjectPath* shareOP)
-{
-	CCIMInstanceList *instList;
-	CCIMInstance *inst;
-	CCIMException *ex;
-	int err = 0;
-
-	/*
-	 * Check object path for NULL value
-	 */
-	if (shareOP == NULL) {
-		util_handleError("SOLARIS_NFSSHARE::ENUM_INSTANCENAMES",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_NFSShare(shareOP);
-	if (instList == NULL) {
-		return ((CCIMInstance *)NULL);
-	}
-
-	inst = cim_getInstance(instList, shareOP);
-	if (inst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARE::ENUM_INSTANCE",
-			CIM_ERR_INVALID_CLASS, GET_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstance *)NULL);
-	}
-
-	cim_freeInstanceList(instList);
-	return (inst);
-}
-
-/*
- * cp_setInstanceWithList not supported
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_NFSShare(CCIMObjectPath *shareOP,
-    CCIMInstance *shareInst, char **props, int num_props)
-{
-	int	err = 0;
-	util_handleError("SOLARIS_NFSSHARE::SET_INSTANCEWITHLIST",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return (cim_false);
-}
-
-/*
- * cp_setInstance not supported
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_NFSShare(CCIMObjectPath *shareOP,
-    CCIMInstance *shareInst, char **props, int num_props)
-{
-	int	err = 0;
-	util_handleError("SOLARIS_NFSSHARE::SET_INSTANCE",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return (cim_false);
-}
-
-/*
- * cp_invokeMethod not supported
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_NFSShare(
-    CCIMObjectPath* shareOP,
-    cimchar *functionName,
-    CCIMPropertyList *inParams,
-    CCIMPropertyList *outParams)
-{
-	int	err = 0;
-	util_handleError("SOLARIS_NFSSHARE::INVOKE_METHOD",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return ((CCIMProperty *)NULL);
-}
-
-/*
- * cp_setProperty not supported
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_NFSShare(CCIMObjectPath *pOP, CCIMProperty *pProp)
-{
-	int	err = 0;
-	util_handleError("SOLARIS_NFSSHARE::SET_PROPERTY",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return (cim_false);
-}
-
-/*
- * Name: cp_createInstance_Solaris_NFSShare
- *
- * Description: Returns the instance created based on the instance
- *              inforamtion passed in. A create instance will actually
- *              share a file system on the current host by calling
- *              cmd_execute_command_and_retrieve_string() from the cmd
- *              interface.
- *
- * Parameters:
- *      shareOP - An CCIMObjectPath * which contains the information on
- *                the class for which to find the instance.
- *      shareInst - an instance that contains the properties for the share
- *                  to be created.
- * Returns:
- *      CCIMObjectPath * - Object path containing the new instance. On
- *                         failure NULL is returned.
- */
-CCIMObjectPath *
-cp_createInstance_Solaris_NFSShare(CCIMObjectPath* shareOP,
-	CCIMInstance *shareInst)
-{
-
-	char *cmd_return, *cmd;
-	int err = 0;
-
-	CCIMInstance *nfsShareInstance;
-	CCIMObjectPath *nfsShareObjectPath;
-	CCIMProperty *share_Prop;
-	CCIMException *ex;
-
-	cim_logDebug("cp_createInstance_Solaris_NFSShare",
-	    "Entering create instance...");
-
-	if (shareOP == NULL || shareInst == NULL) {
-		err = EINVAL;
-		util_handleError(
-		    "SOLARIS_NFSSHARE::CREATE_INSTANCE",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	cmd = cmdgen_generate_command(CMDGEN_NFS_SHARE, shareInst, NULL, NULL,
-		&err);
-
-	if (err != 0 || cmd == NULL) {
-		util_handleError(
-		    "SOLARIS_NFSSHARE::CREATE_INSTANCE",
-		    CIM_ERR_FAILED, CMDGEN_GEN_CMD_FAILURE, NULL, &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	cmd_return = cmd_execute_command_and_retrieve_string(cmd, &err);
-
-	free(cmd);
-
-	if (err != 0) {
-		/*
-		 * An error occured while executing the command.
-		 */
-		if (cmd_return != NULL) {
-			util_handleError(
-			    "SOLARIS_NFSSHARE::CREATE_INSTANCE",
-			    CIM_ERR_FAILED, cmd_return, NULL, &err);
-			free(cmd_return);
-			return ((CCIMObjectPath *)NULL);
-		} else {
-			util_handleError(
-			    "SOLARIS_NFSSHARE::CREATE_INSTANCE",
-			    CIM_ERR_FAILED, CMD_EXEC_RETR_STR_FAILURE,
-			    NULL, &err);
-			return ((CCIMObjectPath *)NULL);
-		}
-	}
-
-	free(cmd_return);
-
-	nfsShareInstance = cp_getInstance_Solaris_NFSShare(shareOP);
-
-	if (nfsShareInstance == NULL) {
-		/*
-		 * The share instance was not found. The create
-		 * instance failed.
-		 */
-		util_handleError(
-		    "SOLARIS_NFSSHARE::CREATE_INSTANCE",
-		    CIM_ERR_FAILED, CIMOM_GET_INST_FAILURE, NULL, &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-	if ((nfsShareObjectPath =
-	    cim_createObjectPath(nfsShareInstance)) == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARE::CREATE_INSTANCE",
-		    CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE, ex, &err);
-		cim_freeInstance(nfsShareInstance);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	share_Prop = cim_getProperty(nfsShareInstance,
-	    nfsShareProps[STARTDAEMONS].name);
-	if ((share_Prop != NULL) &&
-	    (strcmp(share_Prop->mValue, "true") != 0)) {
-		cmd_return = start_daemons(NFSD, &err);
-		if (err != 0 && err != EEXIST) {
-			char error_string[MAXSIZE];
-			(void) strlcpy(error_string, NFSD_START_FAILURE,
-			    MAXSIZE);
-			if (cmd_return == NULL) {
-				util_handleError(
-				    "SOLARIS_NFSSHARE::CREATE_INSTANCE",
-				    NULL, error_string, NULL, &err);
-			} else {
-				char return_string[MAXSIZE];
-				(void) strlcat(error_string, cmd_return,
-				    MAXSIZE);
-				(void) strlcpy(return_string, error_string,
-				    MAXSIZE);
-				util_handleError(
-				    "SOLARIS_NFSSHARE::CREATE_INSTANCE",
-				    NULL, return_string, NULL, &err);
-			}
-		}
-		free(cmd_return);
-		err = 0;
-		cmd_return = start_daemons(MOUNTD, &err);
-		if (err != 0 && err != EEXIST) {
-			char error_string[MAXSIZE];
-			(void) strlcpy(error_string, MOUNTD_START_FAILURE,
-			    MAXSIZE);
-			if (cmd_return == NULL) {
-				util_handleError(
-				    "SOLARIS_NFSSHARE::CREATE_INSTANCE",
-				    NULL, error_string, NULL, &err);
-			} else {
-				char return_string[MAXSIZE];
-				(void) strlcat(error_string, cmd_return,
-				    MAXSIZE);
-				(void) strlcpy(return_string, error_string,
-				    MAXSIZE);
-				util_handleError(
-				    "SOLARIS_NFSSHARE::CREATE_INSTANCE",
-				    NULL, return_string, NULL, &err);
-			}
-		}
-
-		free(cmd_return);
-	}
-
-	cim_freeInstance(nfsShareInstance);
-	return (nfsShareObjectPath);
-} /* cp_createInstance_Solaris_NFSShare */
-
-
-/*
- * Name: cp_deleteInstance_Solaris_NFSShare
- *
- * Description: The delete instance will unshare a file system on the
- *              current host by calling
- *              cmd_execute_command_and_retrieve_string() from the cmd
- *              interface.
- *
- * Parameters:
- *      shareOP - An CCIMObjectPath * - The object path coresponding to the
- *                instance to be removed.
- * Returns:
- *      CIMBool - Returns cim_true on successful completion. On failure
- *                cim_false is returned.
- */
-CIMBool
-cp_deleteInstance_Solaris_NFSShare(CCIMObjectPath *shareOP)
-{
-	char *cmd, *cmd_return;
-	int err = 0;
-
-	cim_logDebug("cp_deleteInstance_Solaris_NFSShare", "Just entering...");
-	if (shareOP == NULL) {
-		util_handleError("SOLARIS_NFSSHARE::DELETE_INSTANCE",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return (cim_false);
-	}
-
-	/*
-	 * Get the share that is to be deleted and generatel the
-	 * unshare command.
-	 */
-	cmd = cmdgen_generate_command(CMDGEN_NFS_UNSHARE, NULL, shareOP, NULL,
-		&err);
-	if (err != 0 || cmd == NULL) {
-		util_handleError(
-		    "SOLARIS_NFSSHARE::CREATE_INSTANCE",
-		    CIM_ERR_FAILED, CMDGEN_GEN_CMD_FAILURE, NULL, &err);
-		if (cmd == NULL) {
-			free(cmd);
-		}
-		return (cim_false);
-	}
-
-	/*
-	 * Execute the unshare command.
-	 */
-	cmd_return = cmd_execute_command_and_retrieve_string(cmd, &err);
-	free(cmd);
-	if (err != 0) {
-		/*
-		 * The unshare command execution failed.
-		 */
-		if (cmd_return != NULL) {
-			util_handleError("SOLARIS_NFSSHARE::DELETE_INSTANCE",
-			    CIM_ERR_FAILED, CMD_EXEC_RETR_STR_FAILURE,
-			    NULL, &err);
-			free(cmd_return);
-			return (cim_false);
-		} else {
-			util_handleError("SOLARIS_NFSSHARE::DELETE_INSTANCE",
-			    CIM_ERR_FAILED, CMD_EXEC_RETR_STR_FAILURE,
-			    NULL, &err);
-			return (cim_false);
-		}
-	}
-	free(cmd_return);
-	return (cim_true);
-}
-
-/*
- * Name: cp_execQuery_Solaris_NFSShare
- *
- * Description: Builds a list of all instances, prepends the list with an
- *              empty instance, and returns the instance list. The CIMOM
- *              interprets the initial empty instance to mean that it has
- *              to do the filtering. The caller is responsible for freeing
- *              the memory allocated for the returned object.
- *
- * Parameters:
- * CCIMObjectPath *shareOP - An objectpath which represents the class to
- *                           work on
- * char *electClause - The select clause
- * char *nonJoinExp - The non join expression
- * char *queryExp - The query Expression
- * char *queryLang - The Query Language used (s/b "WQL")
- *
- * Returns:
- * Returns the prepended instance list. On error NULL is returned.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_execQuery_Solaris_NFSShare(CCIMObjectPath *shareOP, char *electClause,
-    char *nonJoinExp, char *queryExp, char *queryLang)
-{
-
-	CCIMInstance *emptyInst;
-	CCIMInstanceList *nfsShareInstList;
-	CCIMException *ex;
-	int err = 0;
-
-	if (shareOP == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	if ((nfsShareInstList =
-	    cp_enumInstances_Solaris_NFSShare(shareOP)) == NULL) {
-		util_handleError("SOLARIS_NFSSHARE::EXEC_QUERY",
-		    CIM_ERR_FAILED, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	if ((emptyInst = cim_createInstance("")) == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARE::EXEC_QUERY",
-		    CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstanceList(nfsShareInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	if ((nfsShareInstList =
-	    cim_prependInstance(nfsShareInstList, emptyInst)) == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARE::EXEC_QUERY",
-		    CIM_ERR_FAILED, PREPEND_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstance(emptyInst);
-		cim_freeInstanceList(nfsShareInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-	return (nfsShareInstList);
-} /* cp_execQuery_Solaris_NFSShare */
-
-/*
- * Property provider methods
- */
-CCIMProperty *
-cp_getProperty_Solaris_NFSShare(CCIMObjectPath *pOP, cimchar *pPropName)
-{
-	CCIMInstance *nfsShareInst;
-	CCIMProperty *nfsShareProp;
-	int err = 0;
-
-	if (pOP == NULL || pPropName == NULL) {
-		util_handleError("SOLARIS_NFSSHARE::GET_PROPERTY",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	if ((nfsShareInst = cp_getInstance_Solaris_NFSShare(pOP)) == NULL) {
-		return ((CCIMProperty *)NULL);
-	}
-
-	nfsShareProp = cim_getProperty(nfsShareInst, pPropName);
-	cim_freeInstance(nfsShareInst);
-	return (nfsShareProp);
-} /* cp_getProperty_Solaris_NFSShare */
-
-/*
- * Not supported
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_NFShare(CCIMObjectPath *pOP, CCIMProperty *pProp)
-{
-	int err = 0;
-
-	util_handleError("SOLARIS_NFSSHARE::SET_PROPERTY",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return (cim_false);
-} /* cp_setProperty_Solaris_NFShare */
-
-/*
- * Private Methods
- */
-
-/*
- * Checks for a persistent share entry for the current share.
- */
-CIMBool
-check_for_PersistentShareEnt(fs_sharelist_t *nfs_sharelist, int *err)
-{
-	CCIMException		*ex;
-	CCIMObjectPath 		*nfsPersistentShareOP;
-	CCIMObjectPathList	*nfsPersistShareOPList;
-	CCIMObjectPathList	*tmpOPList;
-	CIMBool			nfsPersistValue = cim_false;
-
-	nfsPersistentShareOP = cim_createEmptyObjectPath(SOLARIS_PERSISTSHARE);
-	if (nfsPersistentShareOP == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_NFSSHARE::POPULATE_PROPLIST",
-		    CIM_ERR_FAILED, CREATE_EMPTY_OBJPATH_FAILURE, ex, err);
-	} else {
-		nfsPersistShareOPList = cimom_enumerateInstanceNames(
-		    nfsPersistentShareOP, cim_false);
-		if (nfsPersistShareOPList != NULL) {
-			CCIMProperty	*nfsPersistShareProp;
-			tmpOPList = nfsPersistShareOPList;
-			while (tmpOPList != NULL) {
-				nfsPersistentShareOP = tmpOPList->mDataObject;
-				tmpOPList = tmpOPList->mNext;
-				nfsPersistShareProp = cp_getProperty(
-				    nfsPersistentShareOP, SETTING_ID);
-				if (nfsPersistShareProp == NULL) {
-					cim_freeObjectPath(
-					    nfsPersistentShareOP);
-					cim_freeProperty(nfsPersistShareProp);
-					continue;
-				}
-				if (strcmp(nfs_sharelist->path,
-				    nfsPersistShareProp->mValue) == 0) {
-					nfsPersistValue = cim_true;
-					cim_freeObjectPath(
-					    nfsPersistentShareOP);
-					cim_freeProperty(nfsPersistShareProp);
-					break;
-				}
-				cim_freeObjectPath(nfsPersistentShareOP);
-				cim_freeProperty(nfsPersistShareProp);
-			}
-		} else {
-			ex = cim_getLastError();
-			util_handleError(
-			    "SOLARIS_NFSSHARE::",
-			    CIM_ERR_FAILED, CIMOM_ENUM_INSTNAMES_FAILURE,
-			    ex, err);
-		}
-	}
-	return (nfsPersistValue);
-} /* check_for_PersistentShareEnt */
-
-/*
- * Enumerate the nfs shares by using the fs_shares fs_get_share_list
- * method
- */
-static CCIMInstanceList *
-enumerate_shares()
-{
-
-	CCIMException		*ex;
-	CCIMInstanceList	*nfsShareInstList;
-	int			err = 0;
-	fs_sharelist_t		*nfs_share_list;
-	fs_sharelist_t		*tmp_nfs_share_list;
-	char			*hostname;
-
-	/*
-	 * retrieve system name
-	 */
-	hostname = sys_get_hostname(&err);
-	if (err != 0 || hostname == NULL || strcmp(hostname, "unknown") == 0) {
-		util_handleError(
-		    "SOLARIS_NFSSHARE::POPULATE_PROPVALUES",
-		    CIM_ERR_FAILED, GET_HOSTNAME_FAILURE, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	nfs_share_list = fs_get_share_list(&err);
-	if (nfs_share_list == NULL) {
-		/*
-		 * Check whether an error was returned or if we simply don't
-		 * have any nfs shares on the system. If err is not
-		 * equal to 0, an error was encountered.
-		 */
-		if (err != 0) {
-			/*
-			 * Determine the error and log it.
-			 */
-			if (err == ENOMEM || err == EAGAIN) {
-				util_handleError(
-				    "SOLARIS_NFSSHARE::ENUMERATE_SHARES",
-				    CIM_ERR_LOW_ON_MEMORY,
-				    FS_GET_SHARE_FAILURE, NULL, &err);
-				free(hostname);
-				return ((CCIMInstanceList *)NULL);
-			} else if (err == ENOENT) {
-				util_handleError(
-				    "SOLARIS_NFSSHARE::ENUMERATE_SHARES",
-				    CIM_ERR_FAILED, NO_SHARES_ON_SYSTEM, NULL,
-				    &err);
-				free(hostname);
-				/*
-				 * We don't have any nfs shares
-				 */
-				cim_logDebug("enumerate_shares",
-				    "There are no shares on the host.");
-				return ((CCIMInstanceList *)NULL);
-			} else {
-				/*
-				 * If any other errors were encountered it
-				 * can be handled as a general error. We may
-				 * not know exactly what the error is.
-				 */
-				util_handleError(
-				    "SOLARIS_NFSSHARE::enumerate_shares",
-				    CIM_ERR_FAILED, FS_GET_SHARE_FAILURE,
-				    NULL, &err);
-				free(hostname);
-				return ((CCIMInstanceList *)NULL);
-			}
-		}
-		return ((CCIMInstanceList *)NULL);
-	} else {
-		/*
-		 * At this point, one or more nfs shares were found on the
-		 * system, create the instance list from the nfs_share_list.
-		 */
-
-		cim_logDebug("enumerate_shares",
-		    "There were shares found on the system.");
-		nfsShareInstList = cim_createInstanceList();
-		if (nfsShareInstList == NULL) {
-			ex = cim_getLastError();
-			util_handleError("SOLARIS_NFSSHARE::enumerate_shares",
-			    CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE,
-			    ex, &err);
-			fs_free_share_list(nfs_share_list);
-			free(hostname);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		tmp_nfs_share_list = nfs_share_list;
-
-		/*
-		 * Loop through the nfs shares to retrieve their properties
-		 * and create an instance list containing all the shares and
-		 * their properties.
-		 */
-		while (nfs_share_list != NULL) {
-			CCIMInstance 	*solaris_NFSShare_instance;
-			CCIMPropertyList	*solaris_NFSShare_prop_list;
-
-			/*
-			 * Create the Solaris_NFSShare CCIMInstance
-			 */
-			solaris_NFSShare_instance =
-				cim_createInstance(SOLARIS_NFSSHARE);
-			if (solaris_NFSShare_instance == NULL) {
-				ex = cim_getLastError();
-				util_handleError(
-				    "SOLARIS_NFSSHARE::enumerate_shares",
-				    CIM_ERR_FAILED, GET_INSTANCE_FAILURE,
-				    ex, &err);
-				cim_freeInstanceList(nfsShareInstList);
-				fs_free_share_list(tmp_nfs_share_list);
-				free(hostname);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			solaris_NFSShare_prop_list =
-			    populate_Solaris_NFSShare_property_list(
-			    hostname, nfs_share_list);
-			if (solaris_NFSShare_prop_list == NULL) {
-				/*
-				 * populatePropertyList already logged this
-				 * error so there is no need to log it here.
-				 */
-				cim_freeInstanceList(nfsShareInstList);
-				cim_freeInstance(solaris_NFSShare_instance);
-				fs_free_share_list(tmp_nfs_share_list);
-				free(hostname);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			/*
-			 * Add the property list to the instance
-			 */
-			solaris_NFSShare_instance =
-			    cim_addPropertyListToInstance(
-				solaris_NFSShare_instance,
-				solaris_NFSShare_prop_list);
-			if (solaris_NFSShare_instance == NULL) {
-				ex = cim_getLastError();
-				util_handleError(
-				    "SOLARIS_NFSSHARE::enumerate_shares",
-				    CIM_ERR_FAILED,
-				    PROPLIST_TO_INSTANCE_FAILURE, ex, &err);
-				fs_free_share_list(tmp_nfs_share_list);
-				cim_freeInstanceList(nfsShareInstList);
-				cim_freePropertyList(
-				    solaris_NFSShare_prop_list);
-				free(hostname);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-
-			/*
-			 * Add the instance to the instance list
-			 */
-			nfsShareInstList = cim_addInstance(nfsShareInstList,
-			    solaris_NFSShare_instance);
-			if (nfsShareInstList == NULL) {
-				ex = cim_getLastError();
-				util_handleError(
-				    "SOLARIS_NFSSHARE::enumerate_shares",
-				    CIM_ERR_FAILED, ADD_INSTANCE_FAILURE,
-				    ex, &err);
-				fs_free_share_list(tmp_nfs_share_list);
-				cim_freeInstanceList(nfsShareInstList);
-				free(hostname);
-				return ((CCIMInstanceList *)NULL);
-			}
-			nfs_share_list = nfs_share_list->next;
-		} /* while (nfs_share_list != NULL) */
-
-		fs_free_share_list(tmp_nfs_share_list);
-	} /* if (nfs_share_list == NULL) */
-
-	free(hostname);
-	return (nfsShareInstList);
-} /* enumerate_shares() */
-
-/*
- * Populates the property list with that share information for each
- * instance in the instance list.
- */
-/* ARGSUSED */
-static CCIMPropertyList *
-populate_Solaris_NFSShare_property_list(
-    char *hostname, fs_sharelist_t *nfs_sharelist)
-{
-
-	CCIMException		*ex;
-	CCIMPropertyList	*nfsSharePropList;
-	char			propValues[PROPCOUNT][MAXSIZE];
-	int			i, err = 0;
-
-	cim_logDebug("populate_Solaris_NFSShare_property_list",
-	    "Just entering...");
-
-	nfsSharePropList = cim_createPropertyList();
-	if (nfsSharePropList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_NFSSHARE::POPULATE_PROPLIST",
-		    CIM_ERR_FAILED, CREATE_PROPLIST_FAILURE, ex, &err);
-		return ((CCIMPropertyList *)NULL);
-	}
-
-	/*
-	 * Create the CCIMProperties for this instance
-	 */
-	if (!populate_Solaris_NFSShare_property_Values(hostname,
-	    nfs_sharelist, propValues, &err)) {
-		util_handleError(
-		    "SOLARIS_NFSSHARE::POPULATE_PROPLIST",
-		    CIM_ERR_FAILED, CREATE_PROPLIST_FAILURE, NULL, &err);
-		return ((CCIMPropertyList *)NULL);
-	}
-	for (i = 0; i < PROPCOUNT; i++) {
-		cim_logDebug("populate_Solaris_NFSShare_property_list",
-		    "propValues[%d] = %s", i, propValues[i]);
-		nfsSharePropList = add_property_to_list(nfsShareProps[i].name,
-		    nfsShareProps[i].type, propValues[i], NULL,
-		    nfsShareProps[i].isKey, nfsSharePropList);
-		if (nfsSharePropList == NULL) {
-			break;
-		}
-	}
-	return (nfsSharePropList);
-
-} /* populate_Solaris_NFSShare_property_list */
-
-/*
- * populate_Solaris_NFSShare_property_Values
- * Populates the property array for use in the populate_property_list function
- */
-static CIMBool
-populate_Solaris_NFSShare_property_Values(
-    char *hostname,
-    fs_sharelist_t *nfs_sharelist,
-    cimchar propValues[PROPCOUNT][MAXSIZE],
-    int *err)
-{
-
-	CIMBool			nfsPersistValue = cim_false;
-	boolean_t		hasEquals;
-	int			defaultValue = 0;
-	char			*optValue;
-
-
-	cim_logDebug("populate_Solaris_NFSShare_property_Values",
-	    "Just entering...");
-	/*
-	 * Allow access control
-	 */
-	hasEquals = B_FALSE;
-	optValue = get_property_from_opt_string(nfs_sharelist->options,
-	    "aclok", hasEquals, defaultValue);
-	if (optValue != NULL) {
-		(void) snprintf(propValues[ALLOWACCESSCONTROL], MAXSIZE, "%s",
-		    optValue);
-		free(optValue);
-	} else {
-		return (cim_false);
-	}
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[ALLOWACCESSCONTROL].name,
-	    propValues[ALLOWACCESSCONTROL]);
-
-	/*
-	 * Key - creation class name
-	 */
-	(void) snprintf(propValues[CREATIONCLASSNAME], MAXSIZE, "%s",
-	    SOLARIS_NFSSHARE);
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[CREATIONCLASSNAME].name,
-	    propValues[CREATIONCLASSNAME]);
-
-	/*
-	 * Description
-	 */
-	if (nfs_sharelist->description != NULL) {
-		(void) snprintf(propValues[DESCRIPTION], MAXSIZE, "%s",
-		    nfs_sharelist->description);
-	} else {
-		(void) snprintf(propValues[DESCRIPTION], MAXSIZE, "\0");
-	}
-
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[DESCRIPTION].name,
-	    propValues[DESCRIPTION]);
-	/*
-	 * Effective user ID "anon"
-	 */
-	hasEquals = B_TRUE;
-	defaultValue = UID_NOBODY;
-	optValue = get_property_from_opt_string(nfs_sharelist->options,
-	    "anon=", hasEquals, defaultValue);
-	if (optValue != NULL) {
-		(void) snprintf(propValues[EFFECTIVEUID], MAXSIZE, "%s",
-		    optValue);
-		free(optValue);
-	} else {
-		return (cim_false);
-	}
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[EFFECTIVEUID].name,
-	    propValues[EFFECTIVEUID]);
-
-	/*
-	 * Ignore setuid "nosuid"
-	 */
-	hasEquals = B_FALSE;
-	defaultValue = B_FALSE;
-	optValue = get_property_from_opt_string(nfs_sharelist->options,
-	    "nosuid", hasEquals, defaultValue);
-	if (optValue != NULL) {
-		(void) snprintf(propValues[IGNORESETID], MAXSIZE, "%s",
-		    optValue);
-		free(optValue);
-	} else {
-		return (cim_false);
-	}
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[IGNORESETID].name,
-	    propValues[IGNORESETID]);
-
-	/*
-	 * Enable logging, use log file tag "log"
-	 */
-	hasEquals = B_FALSE;
-	defaultValue = B_FALSE;
-	optValue = get_property_from_opt_string(nfs_sharelist->options,
-	    "log", hasEquals, defaultValue);
-	if (optValue != NULL) {
-		if (strcmp(optValue, "1") == 0) {
-			(void) strlcpy(propValues[LOGFILETAG], "global",
-			    MAXSIZE);
-			free(optValue);
-		} else {
-			free(optValue);
-			hasEquals = B_TRUE;
-			optValue = get_property_from_opt_string(
-			    nfs_sharelist->options,
-			    "log=", hasEquals, defaultValue);
-			if (strcmp(optValue, "0") == 0) {
-				/*
-				 * Logging not enabled
-				 */
-				(void) snprintf(propValues[LOGFILETAG],
-				    MAXSIZE, "%s", "\0");
-				cim_logDebug(
-				    "populate_Solaris_NFSShare_property_Values",
-				    "No log property for this share");
-			} else {
-				(void) snprintf(propValues[LOGFILETAG],
-				    MAXSIZE, "%s", optValue);
-			}
-			free(optValue);
-		}
-	} else {
-		return (cim_false);
-	}
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[LOGFILETAG].name,
-	    propValues[LOGFILETAG]);
-
-	/*
-	 * Key - Shared Path
-	 */
-	(void) snprintf(propValues[SHAREDNAME], MAXSIZE, "%s",
-	    nfs_sharelist->path);
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[SHAREDNAME].name,
-	    propValues[SHAREDNAME]);
-
-	/*
-	 * Persistent share entry
-	 */
-	nfsPersistValue = check_for_PersistentShareEnt(nfs_sharelist, err);
-	(void) snprintf(propValues[PERSISTENT], MAXSIZE, "%d", nfsPersistValue);
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[PERSISTENT].name, propValues[PERSISTENT]);
-
-	/*
-	 * No subdirectory mounts "nosub"
-	 */
-	hasEquals = B_FALSE;
-	defaultValue = B_FALSE;
-	optValue = get_property_from_opt_string(nfs_sharelist->options,
-	    "nosub", hasEquals, defaultValue);
-	if (optValue != NULL) {
-		(void) snprintf(propValues[PREVENTSUBDIRMOUNT], MAXSIZE, "%s",
-		    optValue);
-		free(optValue);
-	} else {
-		return (cim_false);
-	}
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[PREVENTSUBDIRMOUNT].name,
-	    propValues[PREVENTSUBDIRMOUNT]);
-
-	/*
-	 * Public filehandle "public"
-	 */
-	hasEquals = B_FALSE;
-	defaultValue = B_FALSE;
-	optValue = get_property_from_opt_string(nfs_sharelist->options,
-	    "public", hasEquals, defaultValue);
-	if (optValue != NULL) {
-	(void) snprintf(propValues[PUBLIC], MAXSIZE, "%s", optValue);
-	free(optValue);
-	} else {
-		return (cim_false);
-	}
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[PUBLIC].name, propValues[PUBLIC]);
-
-	/*
-	 * Share option string
-	 */
-	(void) snprintf(propValues[SHAREOPTS], MAXSIZE, "%s",
-	    nfs_sharelist->options);
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[SHAREOPTS].name, propValues[SHAREOPTS]);
-
-	/*
-	 * Key - System Creation class name
-	 */
-	(void) snprintf(propValues[SYSTEMCREATIONCLASSNAME], MAXSIZE, "%s",
-	    SOLARIS_CS);
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[SYSTEMCREATIONCLASSNAME].name,
-	    propValues[SYSTEMCREATIONCLASSNAME]);
-
-	/*
-	 * Key - System name
-	 */
-	(void) snprintf(propValues[SYSTEMNAME], MAXSIZE, "%s",
-	    hostname);
-	cim_logDebug("populate_Solaris_NFSShare_property_Values", "%s= %s",
-	    nfsShareProps[SYSTEMNAME].name, propValues[SYSTEMNAME]);
-
-	return (cim_true);
-
-} /* populate_Solaris_NFSShare_property_Values */
-
-/*
- * start_daemons
- *
- * Starts the nfsd and mountd daemons based on which daemon is requested
- * in which_daemon. The string returned from the execution of the damon
- * command is returned.
- */
-static char *
-start_daemons(int which_daemon, int *err)
-{
-	FILE *fd;
-	pid_t pid;
-	char *pidfile;
-	char *cmd_return = NULL;
-	char *cmd = NULL;
-	char pid_str[MAXSIZE];
-	int pid_kill = 0;
-
-	switch (which_daemon) {
-		case NFSD:
-			pidfile = "/etc/svc/volatile/nfs-server.lock";
-			cmd = "/usr/lib/nfs/nfsd";
-			break;
-
-		case MOUNTD:
-			pidfile = "/etc/svc/volatile/nfs-mountd.lock";
-			cmd = "/usr/lib/nfs/mountd";
-			break;
-
-		default:
-			cim_logDebug("start_daemons", "Invalid command");
-			*err = EINVAL;
-			return (NULL);
-	}
-
-	if ((fd = fopen(pidfile, "r")) == NULL) {
-		*err = errno;
-		if (*err == ENOENT) {
-			*err = 0;
-			cmd_return =
-			    cmd_execute_command_and_retrieve_string(cmd,
-			    err);
-			return (cmd_return);
-		} else {
-			return (cmd_return);
-		}
-	}
-	if (fgets(pid_str, MAXSIZE, fd) == NULL) {
-		*err = errno;
-		(void) fclose(fd);
-		cim_logDebug("start_daemons",
-		    "Can not read from file %s - %s\n",
-		    pidfile, strerror(*err));
-		return (NULL);
-	}
-
-	(void) fclose(fd);
-	pid = (pid_t)strtoll(pid_str, NULL, 0);
-	pid_kill = kill(pid, 0);
-	*err = errno;
-	if (pid_kill == 0) {
-		/*
-		 * Setting error to EEXIST so that the error returned
-		 * tells the caller that the daemon already exists.
-		 */
-		*err = EEXIST;
-		cim_logDebug("start_daemon",
-		    "Terminated - nfsd(%ld) already running.\n", pid);
-	} else if (*err == ESRCH) {
-		/*
-		 * ESRCH indicates that there is no such process and
-		 * the daemon needs to be started.
-		 */
-		*err = 0;
-		cmd_return =
-		    cmd_execute_command_and_retrieve_string(cmd, err);
-	} else {
-		cim_logDebug("start_daemon",
-		    "Unknown error starting %s (%ld)", cmd, pid);
-	}
-	return (cmd_return);
-} /* start_daemons */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_share/Solaris_NFSShare.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SOLARIS_NFSSHARE_H
-#define	_SOLARIS_NFSSHARE_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cp_required.h>
-#include <cp_instance.h>
-#include <cp_associator.h>
-#include <cp_method.h>
-#include <cp_property.h>
-#include "nfsprov_include.h"
-
-static nfs_prov_prop_t nfsShareProps[] = {
-
-#define	ALLOWACCESSCONTROL 0
-	{"AllowAccessControl", cim_false, boolean},
-
-#define	CREATIONCLASSNAME (ALLOWACCESSCONTROL + 1)
-	{"CreationClassName", cim_true, string},
-
-#define	DESCRIPTION (CREATIONCLASSNAME + 1)
-	{"Description", cim_false, string},
-
-#define	EFFECTIVEUID (DESCRIPTION + 1)
-	{"EffectiveUID", cim_false, uint32},
-
-#define	IGNORESETID (EFFECTIVEUID + 1)
-	{"IgnoreSetId", cim_false, boolean},
-
-#define	LOGFILETAG (IGNORESETID + 1)
-	{"LogFileTag", cim_false, string},
-
-#define	SHAREDNAME (LOGFILETAG + 1)
-	{"Name", cim_true, string},
-
-#define	PERSISTENT (SHAREDNAME + 1)
-	{"Persistent", cim_false, boolean},
-
-#define	PREVENTSUBDIRMOUNT (PERSISTENT + 1)
-	{"PreventSubDirMount", cim_false, boolean},
-
-#define	PUBLIC (PREVENTSUBDIRMOUNT + 1)
-	{"Public", cim_false, boolean},
-
-#define	SECURITYOPTS (PUBLIC + 1)
-	{"SecurityOptions", cim_false, string_array},
-
-#define	SHAREOPTS (SECURITYOPTS + 1)
-	{"ShareOptions", cim_false, string},
-
-#define	STARTDAEMONS (SHAREOPTS + 1)
-	{"StartDaemons", cim_false, boolean},
-
-#define	SYSTEMCREATIONCLASSNAME (STARTDAEMONS + 1)
-	{"SystemCreationClassName", cim_true, string},
-
-#define	SYSTEMNAME (SYSTEMCREATIONCLASSNAME + 1)
-	{"SystemName", cim_true, string}
-};
-
-/*
- * PROPCOUNT must be set using the last define in the nfsShareProps list.
- */
-#define	PROPCOUNT (SYSTEMNAME +1)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_NFSSHARE_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_share/Solaris_NFSShareSecurity.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,820 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "Solaris_NFSShareSecurity.h"
-#include "nfs_keys.h"
-#include "nfs_provider_names.h"
-#include "nfs_providers_msgstrings.h"
-#include "messageStrings.h"
-#include "util.h"
-#include "libfsmgt.h"
-#include "createprop_methods.h"
-#include <string.h>
-#include <errno.h>
-#include <sys/utsname.h>
-
-/*
- * Constants
- */
-#define	SECMODES 5
-#define	DEFAULT_MAXLIFE 30000
-#define	MAXSIZE 256
-
-
-/*
- * Private variables
- */
-
-/*
- * Private method declarations
- */
-
-static CCIMInstanceList *create_nfsShareSec_InstList(
-			    fs_sharelist_t *nfs_sharesec_list, int *err);
-static CCIMInstanceList	*enumerate_sharesecurity();
-static CCIMPropertyList	*populate_Solaris_NFSShareSecurity_property_list(
-			    fs_sharelist_t *nfs_share, char *secmode_opts);
-static void		populate_Solaris_NFSShareSecurity_property_Values(
-			    char *path,
-			    cimchar propValues[PROPCOUNT][MAXSIZE],
-			    char *secmode_opts, int *err);
-
-/*
- * Public methods
- */
-
-/*
- * Instance provider methods
- */
-
-/*
- * Solaris_NFSShareSecurity provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the CIMOM as the caller.
- */
-
-/*
- * Name: cp_enumInstances_Solaris_NFSShareSecurity
- *
- * Description: Returns a list of instances if found.
- *
- * Parameters:
- *      shareOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstanceList * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_enumInstances_Solaris_NFSShareSecurity(CCIMObjectPath* shareOP) {
-	CCIMInstanceList *instList;
-	int err = 0;
-
-	cim_logDebug("cp_enumInstances_Solaris_NFSShareSecurity",
-	    "Just entering...");
-	/*
-	 * Check object path for NULL value
-	 */
-	if (shareOP == NULL) {
-		util_handleError(
-		    "SOLARIS_NFSSHARESECURITY::ENUM_INSTANCES",
-		    CIM_ERR_INVALID_PARAMETER, NULL,
-		    NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = enumerate_sharesecurity();
-	if (instList == NULL) {
-		cim_logDebug("cp_enumInstances_Solaris_NFSShareSecurity",
-		    "Call to enumerate_sharesecurity returned NULL");
-		util_handleError(
-		    "SOLARIS_NFSSHARESECURITY::ENUM_INSTANCES",
-		    CIM_ERR_FAILED, CIMOM_ENUM_INST_FAILURE,
-		    NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	cim_logDebug("cp_enumInstances_Solaris_NFSShareSecurity",
-	    "Returning Solaris_NFSShareSecurity instance");
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_NFSShareSecurity
- *
- * Description:  Enumerates all of the security modes and options for all
- * of the nfs shares on the host.
- *
- * Parameters:
- *      shareOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMObjectPathList * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGUSED */
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_NFSShareSecurity(CCIMObjectPath* shareOP) {
-	CCIMInstanceList *instList;
-	CCIMObjectPathList *OPList;
-	CCIMException *ex;
-	int err = 0;
-
-	instList = cp_enumInstances_Solaris_NFSShareSecurity(shareOP);
-	if (instList == NULL) {
-		util_handleError(
-		    "SOLARIS_NFSSHARESECURITY::ENUM_INSTANCES",
-		    CIM_ERR_FAILED, CIMOM_ENUM_INSTNAMES_FAILURE,
-		    NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	OPList = cim_createObjectPathList(instList);
-	if (OPList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_NFSSHARESECURITY::ENUM_INSTANCENAMES",
-		    CIM_ERR_FAILED, CREATE_OBJECT_LIST_FAILURE, ex, &err);
-		cim_freeCIMException(ex);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	}
-	cim_freeInstanceList(instList);
-	return (OPList);
-}
-
-/*
- * Name: cp_getInstance_Solaris_NFSShareSecurity
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      shareOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-CCIMInstance *
-cp_getInstance_Solaris_NFSShareSecurity(CCIMObjectPath* shareOP) {
-	CCIMInstanceList *instList;
-	CCIMInstance *inst;
-	CCIMException *ex;
-	int err = 0;
-
-	instList = cp_enumInstances_Solaris_NFSShareSecurity(shareOP);
-	if (instList == NULL) {
-		util_handleError(
-		    "SOLARIS_NFSSHARESECURITY::GET_INSTANCE",
-		    CIM_ERR_FAILED, CIMOM_ENUM_INST_FAILURE,
-		    NULL, &err);
-		return ((CCIMInstance *)NULL);
-	}
-
-	inst = cim_getInstance(instList, shareOP);
-	if (inst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARESECURITY::GET_INSTANCE",
-			CIM_ERR_INVALID_CLASS, GET_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstance *)NULL);
-	}
-
-	cim_freeInstanceList(instList);
-	cim_logDebug("cp_getInstance_Solaris_NFSShareSecurity",
-	    "Returning instance");
-
-	return (inst);
-}
-
-/*
- * cp_setInstance not supported
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_NFSShareSecurity(CCIMObjectPath *shareOP,
-			CCIMInstance *shareInst,
-			char **props, int num_props) {
-	int err = 0;
-
-	util_handleError("SOLARIS_NFSSHARESECURITY::SET_INSTANCE",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return (cim_false);
-} /* cp_setInstance_Solaris_NFSShareSecurity */
-
-/*
- * cp_setInstanceWithList not supported
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_NFSShareSecurity(CCIMObjectPath *shareOP,
-			CCIMInstance *shareInst,
-			char **props, int num_props) {
-	int err = 0;
-
-	util_handleError("SOLARIS_NFSSHARESECURITY::SET_INSTANCEWITHLIST",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return (cim_false);
-}
-
-/*
- * cp_invokeMethod not supported
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_NFSShareSecurity(
-    CCIMObjectPath *pOP,
-    cimchar *functionName,
-    CCIMPropertyList *inParams,
-    CCIMPropertyList *outParams) {
-
-	int 	err = 0;
-	util_handleError("SOLARIS_NFSSHARESECURITY::INVOKE_METHOD",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return ((CCIMProperty *)NULL);
-} /* cp_invokeMethod_Solaris_NFSShareSecurity */
-
-
-/*
- * cp_setProperty not supported
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_NFSShareSecurity(CCIMObjectPath *pOP,
-    CCIMProperty *pProp) {
-	int	err = 0;
-	util_handleError("SOLARIS_NFSSHARESECURITY::SET_PROPERTY",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return (cim_false);
-}
-
-/*
- * cp_createInstance not supported
- */
-/* ARGSUSED */
-CCIMObjectPath *
-cp_createInstance_Solaris_NFSShareSecurity(CCIMObjectPath *shareOP,
-	CCIMInstance *shareInst) {
-
-	int err = 0;
-
-	util_handleError("SOLARIS_NFSSHARESECURITY::CREATE_INSTANCE",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return ((CCIMObjectPath *)NULL);
-}
-
-/*
- * cp_deleteInstance not supported
- */
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_NFSShareSecurity(CCIMObjectPath *shareOP) {
-
-	int err = 0;
-
-	util_handleError("SOLARIS_NFSSHARESECURITY::DELETE_INSTANCE",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-	return (cim_false);
-}
-
-/*
- * Name: cp_execQuery_Solaris_NFSShareSecurity
- *
- * Description: Builds a list of all instances, prepends the list with an
- *              empty instance, and returns the instance list. The CIMOM
- *              interprets the initial empty instance to mean that it has
- *              to do the filtering. The caller is responsible for freeing
- *              the memory allocated for the returned object.
- *
- * Parameters:
- * CCIMObjectPath *shareOP - An objectpath which represents the class to
- *                           work on
- * char *electClause - The select clause
- * char *nonJoinExp - The non join expression
- * char *queryExp - The query Expression
- * char *queryLang - The Query Language used (s/b "WQL")
- *
- * Returns:
- * Returns the prepended instance list. On error NULL is returned.
- */
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_NFSShareSecurity(CCIMObjectPath *shareOP,
-    char *selectClause, char *nonJoinExp, char *queryExp, char *queryLang) {
-
-	CCIMInstance		*emptyInst;
-	CCIMInstanceList	*shareSecInstList;
-	CCIMInstanceList	*resultInstList;
-	CCIMException		*ex;
-	int			err = 0;
-
-	shareSecInstList = cp_enumInstances_Solaris_NFSShareSecurity(shareOP);
-	if (shareSecInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARESECURITY::EXEC_QUERY",
-		    CIM_ERR_FAILED, CIMOM_ENUM_INST_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_NFSSHARESECURITY::EXEC_QUERY",
-		    CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		cim_freeCIMException(ex);
-		cim_freeInstanceList(shareSecInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	resultInstList = cim_prependInstance(shareSecInstList, emptyInst);
-	if (resultInstList == NULL) {
-		util_handleError("SOLARIS_NFSSHARESECURITY::EXEC_QUERY",
-		    CIM_ERR_FAILED, PREPEND_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstanceList(shareSecInstList);
-		cim_freeInstance(emptyInst);
-	}
-	return (resultInstList);
-
-} /* cp_execQuery_Solaris_NFSShareSecurity */
-
-
-/*
- * Private Methods
- */
-
-/*
- * create_nfsShareSec_InstList
- *
- * Creates the Solaris_NFSShareSecurity instance list from information
- * gathered from the shares on the system. The instance list is returned.
- */
-static CCIMInstanceList *
-create_nfsShareSec_InstList(fs_sharelist_t *nfs_sharesec_list, int *err) {
-	fs_sharelist_t		*currentShare;
-	CCIMInstanceList	*nfsShareSecInstList;
-	CCIMException		*ex;
-	char			**sec_modes;
-	int			count;
-
-	cim_logDebug("create_nfsShareSec_InstList", "Just entering...");
-	/*
-	 * At this point, one or more nfs shares were found on the
-	 * system, create the instance list from the nfs_sharesec_list.
-	 */
-	nfsShareSecInstList = cim_createInstanceList();
-	if (nfsShareSecInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_NFSSHARESECURITY::CREATE_INST_LIST ",
-		    CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE,
-		    ex, err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Loop through the security modes for the nfs shares to
-	 * retrieve their security properties and create an
-	 * instance list containing all the security modes and
-	 * their properties for each share.
-	 */
-	for (currentShare = nfs_sharesec_list; currentShare != NULL;
-	    currentShare = currentShare->next) {
-		int i;
-		CCIMInstance 		*solaris_NFSShareSec_instance;
-		CCIMPropertyList	*solaris_NFSShareSec_prop_list;
-
-		/*
-		 * Parse the the share options list for multiple
-		 * security modes. An array of strings is returned
-		 * that will be used to create the instances for each
-		 * share.
-		 */
-		sec_modes = fs_parse_opts_for_sec_modes(
-		    currentShare->options, &count, err);
-		if (sec_modes == NULL) {
-			util_handleError(
-			    "SOLARIS_NFSSHARESECURITY::CREATE_INST_LIST ",
-			    CIM_ERR_INVALID_PARAMETER, NULL, NULL, err);
-			return ((CCIMInstanceList *)NULL);
-		}
-		for (i = 0; i < count; i++) {
-			/*
-			 * Create the Solaris_NFSShareSecurity
-			 * CCIMInstance
-			 */
-			solaris_NFSShareSec_instance =
-			    cim_createInstance(SOLARIS_NFSSHARESECURITY);
-			if (solaris_NFSShareSec_instance == NULL) {
-				ex = cim_getLastError();
-				util_handleError("SOLARIS_NFSSHARESECURITY:" \
-				    ":CREATE_INST_LIST", CIM_ERR_FAILED,
-				    CREATE_INSTANCE_FAILURE, ex, err);
-				cim_freeInstanceList(nfsShareSecInstList);
-				fileutil_free_string_array(sec_modes, count);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			solaris_NFSShareSec_prop_list =
-			    populate_Solaris_NFSShareSecurity_property_list(
-			    currentShare, sec_modes[i]);
-			if (solaris_NFSShareSec_prop_list == NULL) {
-				/*
-				 * populatePropertyList already logged
-				 * this error so there is no need to
-				 * log it here.
-				 */
-				cim_freeInstance(solaris_NFSShareSec_instance);
-				cim_freeInstanceList(nfsShareSecInstList);
-				fileutil_free_string_array(sec_modes, count);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			/*
-			 * Add the property list to the instance
-			 */
-			solaris_NFSShareSec_instance =
-			    cim_addPropertyListToInstance(
-				solaris_NFSShareSec_instance,
-				solaris_NFSShareSec_prop_list);
-			if (solaris_NFSShareSec_instance == NULL) {
-				ex = cim_getLastError();
-				util_handleError("SOLARIS_NFSSHARESECURITY:" \
-				    ":CREATE_INST_LIST", CIM_ERR_FAILED,
-				    PROPLIST_TO_INSTANCE_FAILURE, ex, err);
-				cim_freePropertyList(
-				    solaris_NFSShareSec_prop_list);
-				cim_freeInstanceList(nfsShareSecInstList);
-				fileutil_free_string_array(sec_modes, count);
-				return ((CCIMInstanceList *)NULL);
-			}
-
-			/*
-			 * Add the instance to the instance list
-			 */
-			nfsShareSecInstList =
-			    cim_addInstance(nfsShareSecInstList,
-			    solaris_NFSShareSec_instance);
-			if (nfsShareSecInstList == NULL) {
-				ex = cim_getLastError();
-				util_handleError("SOLARIS_NFSSHARESECURITY:" \
-				    ":CREATE_INST_LIST", CIM_ERR_FAILED,
-				    ADD_INSTANCE_FAILURE, ex, err);
-				cim_freeInstance(solaris_NFSShareSec_instance);
-				fileutil_free_string_array(sec_modes, count);
-				return ((CCIMInstanceList *)NULL);
-			}
-		} /* for (int i; i < count; i++) */
-
-	} /* for (currentShare = nfs_sharesec_list; ...) */
-
-	fileutil_free_string_array(sec_modes, count);
-
-	cim_logDebug("create_nfsShareSec_InstList", "Returning instance list");
-	return (nfsShareSecInstList);
-
-} /* create_nfsShareSec_InstList */
-
-/*
- * enumerate_sharesecurity
- * Enumerate the nfs sharesecurity modes for each share by using the
- * fs_shares fs_get_share_list method to get the security modes from
- * the option string.
- */
-static CCIMInstanceList *
-enumerate_sharesecurity() {
-
-	int		err;
-	fs_sharelist_t 	*nfs_sharesec_list;
-
-	cim_logDebug("enumerate_sharesecurity", "Just entering...");
-	nfs_sharesec_list = fs_get_share_list(&err);
-	if (nfs_sharesec_list == NULL) {
-		/*
-		 * Check whether an error was returned or if we simply don't
-		 * have any nfs shares on the system. If err is not
-		 * equal to 0, an error was encountered.
-		 */
-		if (err != 0) {
-			/*
-			 * Determine the error and log it.
-			 */
-			if (err == ENOMEM || err == EAGAIN) {
-				util_handleError(
-				    "SOLARIS_NFSSHARESECURITY:" \
-				    ":ENUM_SHARESECURITY ",
-				    CIM_ERR_LOW_ON_MEMORY,
-				    NULL, NULL, &err);
-				return ((CCIMInstanceList *)NULL);
-			} else {
-
-				/*
-				 * If any other errors were encountered it
-				 * can be handled as a general error.  We may
-				 * not know exactly what the error is.
-				 */
-				util_handleError(
-				    "SOLARIS_NFSSHARESECURITY:" \
-				    ":ENUM_SHARESECURITY ",
-				    CIM_ERR_FAILED,
-				    strerror(err), NULL, &err);
-				return ((CCIMInstanceList *)NULL);
-			}
-		}
-		/*
-		 * There are no nfs shares on the host.
-		 */
-		cim_logDebug("enumerate_sharesecurity", "No shares on system");
-		return ((CCIMInstanceList *)NULL);
-
-	} else {
-
-		CCIMInstanceList	*nfsShareSecInstList;
-
-		nfsShareSecInstList =
-		    create_nfsShareSec_InstList(nfs_sharesec_list, &err);
-
-		fs_free_share_list(nfs_sharesec_list);
-
-		return (nfsShareSecInstList);
-	}
-} /* enumerate_sharesecurity */
-
-/*
- * populate_Solaris_NFSShareSecurity_property_list
- * Populates the property list with that share information for each
- * instance in the instance list.
- */
-static CCIMPropertyList *
-populate_Solaris_NFSShareSecurity_property_list(
-    fs_sharelist_t *nfs_share, char *secmode_opts) {
-
-	CCIMException		*ex;
-	CCIMPropertyList	*nfsShareSecPropList;
-	char			propValues[PROPCOUNT][MAXSIZE];
-	int			i, err = 0;
-
-	cim_logDebug("populate_Solaris_NFSShareSecurity_property_list",
-	    "Just entering...");
-
-	nfsShareSecPropList = cim_createPropertyList();
-	if (nfsShareSecPropList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_NFSSHARESECURITY::POPULATE_PROPLIST",
-		    CIM_ERR_FAILED, CREATE_PROPLIST_FAILURE, ex, &err);
-		cim_freeCIMException(ex);
-		goto out;
-	}
-
-	/*
-	 * Create the CCIMProperties for this instance
-	 */
-	populate_Solaris_NFSShareSecurity_property_Values(
-	    nfs_share->path, propValues, secmode_opts, &err);
-	if (err != 0) {
-		cim_freePropertyList(nfsShareSecPropList);
-		nfsShareSecPropList = NULL;
-	} else {
-		for (i = 0; i < PROPCOUNT; i++) {
-			cim_logDebug(
-			    "populate_Solaris_NFSShareSecurity_property_list",
-			    "propValues[%d] = %s", i, propValues[i]);
-			nfsShareSecPropList =
-			    add_property_to_list(nfsShareSecProps[i].name,
-			    nfsShareSecProps[i].type, propValues[i], NULL,
-			    nfsShareSecProps[i].isKey, nfsShareSecPropList);
-			if (nfsShareSecPropList == NULL) {
-				goto out;
-			}
-		}
-	}
-out:
-	cim_logDebug("populate_Solaris_NFSShareSecurity_property_list",
-	    "Returning property list");
-	return (nfsShareSecPropList);
-
-} /* populate_Solaris_NFSShareSecurity_property_list */
-
-/*
- * populate_Solaris_NFSShareSecurity_property_Values
- * Populates the property array for use in the populate_property_list function
- */
-static void
-populate_Solaris_NFSShareSecurity_property_Values(char *path,
-    cimchar propValues[PROPCOUNT][MAXSIZE], char *secmode_opts, int *err) {
-
-	boolean_t	hasEquals;
-	int		defaultValue = B_FALSE;
-	int		count = 0;
-	char		**access_list;
-	char		*optValue;
-	cimchar		*propString;
-
-
-	cim_logDebug("populate_Solaris_NFSShareSecurity_property_Values",
-	    "Just entering...");
-	/*
-	 * Check for security mode option in option string.
-	 * Key - Mode
-	 */
-	hasEquals = B_TRUE;
-	defaultValue = B_FALSE;
-
-	optValue = get_property_from_opt_string(secmode_opts,
-	    "sec=", hasEquals, defaultValue);
-	if (strcmp(optValue, "0") != 0) {
-		(void) snprintf(propValues[SEC_MODE], MAXSIZE, "%s", optValue);
-	} else {
-		/*
-		 * The default security mode is set only if no security
-		 * mode is set in the option string.
-		 */
-		(void) snprintf(propValues[SEC_MODE], MAXSIZE, "%s", "sys");
-	}
-	cim_logDebug("populate_Solaris_NFSShareSecurity_property_Values",
-	    "%s = %s", nfsShareSecProps[SEC_MODE].name, propValues[SEC_MODE]);
-	free(optValue);
-
-	/*
-	 * MaxLife
-	 * only used with sec mode of "dh"
-	 */
-	if (strcmp(propValues[SEC_MODE], "dh") == 0) {
-		hasEquals = B_TRUE;
-		defaultValue = DEFAULT_MAXLIFE;
-		optValue =
-		    get_property_from_opt_string(secmode_opts,
-		    "window=", hasEquals, defaultValue);
-		(void) snprintf(propValues[MAXLIFE], MAXSIZE, "%s", optValue);
-		cim_logDebug(
-		    "populate_Solaris_NFSShareSecurity_property_Values",
-		    "%s = %s", nfsShareSecProps[MAXLIFE].name,
-		    propValues[MAXLIFE]);
-	} else {
-		(void) snprintf(propValues[MAXLIFE], MAXSIZE, "\0");
-	}
-	free(optValue);
-
-	/*
-	 * Path
-	 */
-	if (path != NULL) {
-		(void) snprintf(propValues[PATH], MAXSIZE, "%s",
-		    path);
-		cim_logDebug(
-		    "populate_Solaris_NFSShareSecurity_property_Values",
-		    "%s = %s", nfsShareSecProps[PATH].name, propValues[PATH]);
-	} else {
-		(void) snprintf(propValues[PATH], MAXSIZE, "\0");
-		cim_logDebug(
-		    "populate_Solaris_NFSShareSecurity_property_Values",
-		    "%s = %s", nfsShareSecProps[PATH].name, "null");
-	}
-
-	/*
-	 * ReadOnly
-	 */
-	hasEquals = B_FALSE;
-	defaultValue = B_FALSE;
-	optValue = get_property_from_opt_string(secmode_opts,
-	    "ro", hasEquals, defaultValue);
-	(void) snprintf(propValues[READONLY], MAXSIZE, "%s", optValue);
-	cim_logDebug(
-	    "populate_Solaris_NFSShareSecurity_property_Values",
-	    "%s = %s", nfsShareSecProps[READONLY].name, propValues[READONLY]);
-	free(optValue);
-
-	/*
-	 * Read Write List
-	 */
-	hasEquals = B_TRUE;
-	defaultValue = B_FALSE;
-	optValue = get_property_from_opt_string(secmode_opts, "rw=",
-	    hasEquals, defaultValue);
-	if (strcmp(optValue, "0") != 0) {
-		access_list =
-		    fs_create_array_from_accesslist(optValue,
-		    &count, err);
-		propString = cim_encodeStringArray(access_list, count);
-		if (propString == NULL) {
-			*err = ENOMEM;
-			return;
-		}
-		free(optValue);
-		optValue = strdup(propString);
-		if (optValue == NULL) {
-			*err = ENOMEM;
-			return;
-		}
-		free(propString);
-		fileutil_free_string_array(access_list, count);
-	} else {
-		optValue = strdup("\0");
-	}
-	(void) snprintf(propValues[READWRITELIST], MAXSIZE, "%s", optValue);
-	cim_logDebug("populate_Solaris_NFSShareSecurity_property_Values",
-	    "%s = %s", nfsShareSecProps[READWRITELIST].name,
-	    propValues[READWRITELIST]);
-	free(optValue);
-	count = 0;
-
-	/*
-	 * Read Only List
-	 */
-	hasEquals = B_TRUE;
-	defaultValue = B_FALSE;
-	optValue = get_property_from_opt_string(secmode_opts, "ro=",
-	    hasEquals, defaultValue);
-
-	if (strcmp(optValue, "0") != 0) {
-		access_list =
-		    fs_create_array_from_accesslist(optValue,
-		    &count, err);
-		propString = cim_encodeStringArray(access_list, count);
-		if (propString == NULL) {
-			*err = ENOMEM;
-			return;
-		}
-		free(optValue);
-		optValue = strdup(propString);
-		if (optValue == NULL) {
-			*err = ENOMEM;
-			return;
-		}
-		free(propString);
-		fileutil_free_string_array(access_list, count);
-	} else {
-		optValue = strdup("\0");
-	}
-	(void) snprintf(propValues[READONLYLIST], MAXSIZE, "%s", optValue);
-	cim_logDebug("populate_Solaris_NFSShareSecurity_property_Values",
-	    "%s = %s", nfsShareSecProps[READONLYLIST].name,
-	    propValues[READONLYLIST]);
-	free(optValue);
-	count = 0;
-
-	/*
-	 * root server list
-	 */
-	hasEquals = B_TRUE;
-	defaultValue = B_FALSE;
-	optValue = get_property_from_opt_string(secmode_opts,
-	    "root=", hasEquals, defaultValue);
-	if (strcmp(optValue, "0") != 0) {
-		access_list =
-		    fs_create_array_from_accesslist(optValue,
-		    &count, err);
-		propString = cim_encodeStringArray(access_list, count);
-		if (propString == NULL) {
-			*err = ENOMEM;
-			return;
-		}
-		free(optValue);
-		optValue = strdup(propString);
-		if (optValue == NULL) {
-			*err = ENOMEM;
-			return;
-		}
-		free(propString);
-		fileutil_free_string_array(access_list, count);
-	} else {
-		optValue = strdup("\0");
-	}
-	(void) snprintf(propValues[ROOTSERVERS], MAXSIZE, "%s", optValue);
-	cim_logDebug("populate_Solaris_NFSShareSecurity_property_Values",
-	    "%s = %s", nfsShareSecProps[ROOTSERVERS].name,
-	    propValues[ROOTSERVERS]);
-	free(optValue);
-
-	cim_logDebug("populate_Solaris_NFSShareSecurity_property_Values",
-	    "Returning");
-
-} /* populate_Solaris_NFSShareSecurity_property_Values */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_share/Solaris_NFSShareSecurity.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SOLARIS_NFSSHARESECURITY_H
-#define	_SOLARIS_NFSSHARESECURITY_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cp_required.h>
-#include <cp_instance.h>
-#include <cp_associator.h>
-#include <cp_method.h>
-#include <cp_property.h>
-#include "nfsprov_include.h"
-
-static nfs_prov_prop_t nfsShareSecProps[] = {
-
-#define	MAXLIFE 0
-	{"MaxLife", cim_false, uint32},
-
-#define	PATH (MAXLIFE + 1)
-	{"SettingId", cim_true, string},
-
-#define	READONLY (PATH + 1)
-	{"ReadOnly", cim_false, boolean},
-
-#define	READWRITELIST (READONLY + 1)
-	{"ReadWriteList", cim_false, string_array},
-
-#define	READONLYLIST (READWRITELIST + 1)
-	{"ReadOnlyList", cim_false, string_array},
-
-#define	ROOTSERVERS (READONLYLIST + 1)
-	{"RootServers", cim_false, string_array},
-
-#define	SEC_MODE (ROOTSERVERS + 1)
-	{"Mode", cim_true, string}
-};
-
-/*
- * PROPCOUNT must be set using the last define in the nfsShareSecProps list.
- */
-#define	PROPCOUNT (SEC_MODE + 1)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_NFSSHARESECURITY_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_share/Solaris_PersistentShare.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,986 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "Solaris_PersistentShare.h"
-#include "nfs_keys.h"
-#include "nfs_provider_names.h"
-#include "nfs_providers_msgstrings.h"
-#include "nfsprov_methods.h"
-#include "messageStrings.h"
-#include "util.h"
-#include "libfsmgt.h"
-#include "createprop_methods.h"
-#include <string.h>
-#include <errno.h>
-#include <sys/utsname.h>
-
-/*
- * Constants
- */
-const char *DEL_ALL_WITH_DUPLICATE_PATH = "deleteAllWithDuplicatePath";
-
-/*
- * Private method declarations
- */
-
-static CCIMInstanceList *create_persistentShare_InstList(
-	fs_dfstab_entry_t fs_dfstab_ent,
-	int *err);
-static CCIMInstanceList *enumerate_dfstab();
-static CCIMPropertyList *populate_Solaris_PersistentShare_property_list(
-	char *hostname,
-	fs_dfstab_entry_t fs_dfstab_ents);
-static void populate_Solaris_PersistentShare_property_values(
-	char *hostname,
-	fs_dfstab_entry_t fs_dfstab_ents,
-	cimchar propValues[PROPCOUNT][MAXSIZE],
-	int *err);
-
-/*
- * Name: cp_enumInstances_Solaris_PersistentShare
- *
- * Description: Creates a list of instances and returns that list.
- *
- * Parameters:
- *      dfstabOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstanceList * if matched instance is found. Otherwise, NULL.
- */
-CCIMInstanceList *
-cp_enumInstances_Solaris_PersistentShare(CCIMObjectPath* dfstabOP) {
-	CCIMInstanceList *instList;
-	int err = 0;
-
-	cim_logDebug("cp_enumInstances_Solaris_PersistentShare",
-	    "Just entering...");
-	/*
-	 * First check if the CCIMObjectPath passed in is null.
-	 */
-	if (dfstabOP == NULL) {
-		util_handleError(
-		    "SOLARIS_PERSISTSHARE::ENUM_INSTANCES",
-		    CIM_ERR_INVALID_PARAMETER, NULL,
-		    NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = enumerate_dfstab();
-	if (instList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-	cim_logDebug("cp_enumInstances_Solaris_PersistentShare",
-	    "Returning non NULL instance list.");
-	return (instList);
-} /* cp_enumInstances_Solaris_PersistentShare */
-
-/*
- * Name: cp_enumInstanceNames_Solaris_PersistentShare
- *
- * Description: Returns a list of instances if found.
- *
- * Parameters:
- *      dfstabOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMObjectPathList * if matched instance is found. Otherwise, NULL.
- */
-CCIMInstanceList *
-cp_enumInstanceNames_Solaris_PersistentShare(CCIMObjectPath *dfstabOP) {
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*OPList;
-	CCIMException		*ex;
-	int			err;
-
-	/*
-	 * First check if the CCIMObjectPath parameter is null.
-	 */
-	if (dfstabOP == NULL) {
-		util_handleError("SOLARIS_PERSISTSHARE::ENUM_INSTANCENAMES",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPathList *)NULL);
-	}
-	instList = cp_enumInstances_Solaris_PersistentShare(dfstabOP);
-	if (instList == NULL) {
-		/*
-		 * Failure...or there are no dfstab instances.
-		 */
-		return ((CCIMObjectPathList *)NULL);
-	}
-
-	OPList = cim_createObjectPathList(instList);
-	if (OPList == NULL) {
-		/*
-		 * Error encountered
-		 */
-		ex = cim_getLastError();
-		util_handleError(
-			"SOLARIS_DFSTABEMTRY::ENUM_INSTANCENAMES",
-			CIM_ERR_FAILED, CREATE_OBJECT_LIST_FAILURE, ex, &err);
-			cim_freeInstanceList(instList);
-		return (NULL);
-	}
-
-	cim_freeInstanceList(instList);
-	return (OPList);
-} /* cp_enumInstanceNames_Solaris_PersistentShare */
-
-
-/*
- * Name: cp_getInstance_Solaris_PersistentShare
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      dfstabOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-CCIMInstance *
-cp_getInstance_Solaris_PersistentShare(CCIMObjectPath *dfstabOP) {
-	CCIMInstanceList	*instList;
-	CCIMInstance		*inst;
-	CCIMException		*ex;
-	int			err = 0;
-
-	/*
-	 * First check to see if the object path is null
-	 */
-	if (dfstabOP == NULL) {
-		util_handleError("SOLARIS_PERSISTSHARE::GET_INSTANCE",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		    return ((CCIMInstance *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_PersistentShare(dfstabOP);
-	if (instList == NULL) {
-		/*
-		 * Either an error occurred or we simply don't have any
-		 * instances of Solaris_PersistentShare on the system.  In the
-		 * case, that an error occurred, it will be handled in
-		 * cp_enumInstances_Solaris_PersistentShare.
-		 */
-		return ((CCIMInstance *)NULL);
-	}
-
-	inst = cim_getInstance(instList, dfstabOP);
-	if (inst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_PERSISTSHARE::GET_INSTANCE",
-		    CIM_ERR_INVALID_PARAMETER, GET_INSTANCE_FAILURE,
-		    ex, &err);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstance *)NULL);
-	}
-	cim_freeInstanceList(instList);
-	return (inst);
-} /* cp_getInstance_Solaris_PersistentShare */
-
-/*
- * cp_setInstance not supported
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_PersistentShare(CCIMObjectPath *pOP,
-    CCIMInstance *pInst, char **props, int num_props) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_PERSISTSHARE::SET_INSTANCE",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstance_Solaris_PersistentShare */
-
-/*
- * cp_setProperty not supported
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_PersistentShare(CCIMObjectPath *pOP,
-    CCIMInstance *pInst, char **props, int num_props) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_PERSISTSHARE::SET_PROPERTY",
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setProperty_Solaris_PersistentShare */
-
-/*
- * Method: cp_setInstanceWithList_Solaris_PersistentShare
- *
- * Description: This method is used to edit or change a dfstab entry.
- *
- * Parameters:
- *      - CCIMObjectPath *dfstabOP - The object path containing the name
- *      of the class of which to set the instance.
- *      - CCIMInstance *dfstabInst - The instance containg the information
- *	of the dfstab entry that will be changed.
- *      - char **props - Not used.
- *      - int num_props - Not used.
- *
- * Returns:
- *	- cim_true if successful. If an error accures cim_false is returned.
- */
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_PersistentShare(CCIMObjectPath *dfstabOP,
-	CCIMInstance *dfstabInst, char **props, int num_props) {
-
-	int err = 0;
-	CCIMProperty *dfstab_prop;
-	CCIMInstance *fsDfstab_inst; /* XXXX original instance */
-	CCIMObjectPath *fsDfstab_OP;
-	char *new_cmd_value;
-
-
-	if (dfstabOP == NULL || dfstabInst == NULL) {
-		util_handleError("SOLARIS_PERSISTSHARE::SET_INSTANCE",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return (cim_false);
-	}
-
-	fsDfstab_OP = cim_createObjectPath(dfstabInst);
-	if (fsDfstab_OP == NULL) {
-		util_handleError("SOLARIS_PERSISTSHARE::SET_INSTANCE",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return (cim_false);
-	}
-	fsDfstab_inst =
-	    cp_getInstance_Solaris_PersistentShare(fsDfstab_OP);
-	if (fsDfstab_inst == NULL) {
-		util_handleError("SOLARIS_PERSISTSHARE::SET_INSTANCE",
-		    CIM_ERR_FAILED, CIMOM_GET_INST_FAILURE, NULL, &err);
-		return (cim_false);
-	}
-
-	dfstab_prop = cim_getProperty(fsDfstab_inst,
-	    nfsPersistProps[SETTINGID].name);
-	if (dfstab_prop == NULL) {
-		return (cim_false);
-	} else {
-		int path_count =
-		    fs_check_for_duplicate_DFStab_paths(
-		    dfstab_prop->mValue, &err);
-		if (path_count > 1 || path_count == -1) {
-			util_handleError(
-			    "SOLARIS_PERSISTSHARE::SET_INSTANCE",
-			    CIM_ERR_FAILED, FS_CHECK_DUP_PATHS,
-			    NULL, &err);
-			return (cim_false);
-		}
-	}
-
-	dfstab_prop = cim_getProperty(fsDfstab_inst,
-	    nfsPersistProps[COMMAND].name);
-	if (dfstab_prop == NULL) {
-		return (cim_false);
-	}
-
-	new_cmd_value = strdup(dfstab_prop->mValue);
-	if (new_cmd_value == NULL) {
-		err = ENOMEM;
-		util_handleError("SOLARIS_PERSISTSHARE::SET_INSTANCE",
-		    CIM_ERR_LOW_ON_MEMORY, LOW_MEMORY, NULL, &err);
-		return (cim_false);
-	}
-
-	dfstab_prop = cim_getProperty(dfstabInst,
-	    nfsPersistProps[COMMAND].name);
-	if (dfstab_prop == NULL) {
-		util_handleError("SOLARIS_PERSISTSHARE::SET_INSTANCE",
-		    CIM_ERR_FAILED, GET_PROPERTY_FAILURE, NULL, &err);
-		cim_freeInstance(fsDfstab_inst);
-		free(new_cmd_value);
-		return (cim_false);
-	} else {
-		fs_dfstab_entry_t dfstab_ent_list;
-		char *cmd_value = NULL;
-		cmd_value = strdup(dfstab_prop->mValue);
-		if (cmd_value == NULL) {
-			/*
-			 * Out of memory
-			 */
-			err = ENOMEM;
-			util_handleError("SOLARIS_PERSISTSHARE::SET_INSTANCE",
-			    CIM_ERR_LOW_ON_MEMORY, LOW_MEMORY, NULL, &err);
-			return (cim_false);
-		}
-
-		if ((dfstab_ent_list = fs_edit_DFStab_ent(cmd_value,
-		    new_cmd_value, &err)) == NULL) {
-			util_handleError("SOLARIS_PERSISTSHARE::SET_INSTANCE",
-			    CIM_ERR_FAILED, FS_EDIT_DFSTAB_ENT_FAILURE,
-			    NULL, &err);
-			return (cim_false);
-		}
-
-		fs_free_DFStab_ents(dfstab_ent_list);
-		free(cmd_value);
-		free(new_cmd_value);
-		cim_freeInstance(fsDfstab_inst);
-	}
-	return (cim_true);
-} /* cp_setInstanceWithList_Solaris_PersistentShare */
-
-/*
- * Name: cp_createInstance_Solaris_PersistentShare
- * Description: A create instance will actually add an entry to
- *              /etc/dfs/dfstab in the current host by calling
- *              the fs_dfstab interface's fs_set_DFStab_ent
- *              function.
- * Parameters:
- *      dfstabOP - An CCIMObjectPath * which contains the information on
- *                the class for which to find the instance.
- *      dfstabInst - an instance that contains the properties for the share
- *                  to be created.
- * Returns:
- *      CCIMObjectPath * - Object path containing the new instance. On
- *                         failure NULL is returned.
- */
-CCIMObjectPath *
-cp_createInstance_Solaris_PersistentShare(CCIMObjectPath *dfstabOP,
-	CCIMInstance *dfstabInst) {
-
-	char	*cmd = NULL;
-	int	err = 0;
-	CCIMProperty *dfstab_prop;
-	CCIMInstance *fsDfstab_inst;
-	CCIMObjectPath *fsDfstab_OP;
-	CCIMException   *ex;
-	fs_dfstab_entry_t dfstab_ent_list;
-
-	if (dfstabOP == NULL || dfstabInst == NULL) {
-		util_handleError("SOLARIS_PERSISTSHARE::CREATE_INSTANCE",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	dfstab_prop = cim_getProperty(dfstabInst,
-	    nfsPersistProps[COMMAND].name);
-	if (dfstab_prop != NULL) {
-		CCIMProperty *dfsProp;
-
-		cmd = strdup(dfstab_prop->mValue);
-		if (cmd == NULL) {
-			/*
-			 * Out of memory
-			 */
-			err = ENOMEM;
-			util_handleError("SOLARIS_PERSISTSHARE::SET_INSTANCE",
-			    CIM_ERR_LOW_ON_MEMORY, LOW_MEMORY, NULL, &err);
-			cim_freeProperty(dfstab_prop);
-			return ((CCIMObjectPath *)NULL);
-		} else if (strlen(cmd) == NULL) {
-			util_handleError(
-				"SOLARIS_PERSISTSHARE::CREATE_INSTANCE",
-				CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-			cim_freeProperty(dfstab_prop);
-			return ((CCIMObjectPath *)NULL);
-		}
-
-		dfsProp = cim_getProperty(dfstabInst,
-		    nfsPersistProps[SETTINGID].name);
-		if (dfsProp == NULL) {
-			util_handleError("SOLARIS_PERSISTSHARE::SET_INSTANCE",
-			    CIM_ERR_FAILED, GET_PROPERTY_FAILURE, NULL, &err);
-			free(cmd);
-			return ((CCIMObjectPath *)NULL);
-		}
-		if (fs_check_for_duplicate_DFStab_paths(dfsProp->mValue,
-		    &err) == 0) {
-
-			dfstab_ent_list = fs_add_DFStab_ent(cmd, &err);
-			if (dfstab_ent_list == NULL) {
-				util_handleError(
-				    "SOLARIS_PERSISTSHARE::CREATE_INSTANCE",
-				    CIM_ERR_FAILED, FS_ADD_DFSTAB_ENT_FAILURE,
-				    NULL, &err);
-				free(cmd);
-				return ((CCIMObjectPath *)NULL);
-			}
-			fs_free_DFStab_ents(dfstab_ent_list);
-		} else {
-			util_handleError(
-			    "SOLARIS_PERSISTSHARE::CREATE_INSTANCE",
-			    CIM_ERR_FAILED, FS_CHECK_DUP_PATHS, NULL, &err);
-			free(cmd);
-			return ((CCIMObjectPath *)NULL);
-		}
-	}
-	free(cmd);
-
-	fsDfstab_inst = cp_getInstance_Solaris_PersistentShare(dfstabOP);
-	if (fsDfstab_inst == NULL) {
-		/*
-		 * The dfstab instance was not found there for the create
-		 * instance failed.
-		 */
-		return ((CCIMObjectPath *)NULL);
-	}
-	fsDfstab_OP = cim_createObjectPath(fsDfstab_inst);
-	if (fsDfstab_OP == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_PERSISTSHARE::CREATE_INSTANCE",
-		    CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE, ex, &err);
-		cim_freeInstance(fsDfstab_inst);
-		return ((CCIMObjectPath *)NULL);
-	}
-
-	cim_freeInstance(fsDfstab_inst);
-	return (fsDfstab_OP);
-} /* cp_createInstance_Solaris_PersistentShare */
-
-/*
- * Name: cp_deleteInstance_Solaris_NFSShare
- *
- * Description: The delete instance will remove the specified line from dfstab
- *              on the current host by calling
- *              cmd_execute_command_and_retrieve_string() from the cmd
- *              interface.
- *
- * Parameters:
- *      dfstabOP - An CCIMObjectPath * - The object path corresponding to the
- *                instance to be removed.
- * Returns:
- *      CIMBool - Returns cim_true on successful completion. On failure
- *                cim_false is returned.
- */
-CIMBool
-cp_deleteInstance_Solaris_PersistentShare(CCIMObjectPath *dfstabOP) {
-	char	*cmd = NULL;
-	int	err = 0;
-	int	len;
-	CCIMProperty *dfstab_prop;
-	CCIMInstance *fsDfstab_inst;
-	CCIMException   *ex;
-	fs_dfstab_entry_t dfstab_ent_list;
-
-	if (dfstabOP == NULL) {
-		util_handleError("SOLARIS_PERSISTSHARE::CREATE_INSTANCE",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return (cim_false);
-	}
-
-	fsDfstab_inst = cp_getInstance_Solaris_PersistentShare(dfstabOP);
-	if (fsDfstab_inst == NULL) {
-		/*
-		 * The dfstab instance was not found therefore it can't
-		 * be deleted.
-		 */
-		return (cim_false);
-	}
-
-	dfstab_prop = cim_getProperty(fsDfstab_inst,
-	    nfsPersistProps[COMMAND].name);
-	if (dfstab_prop != NULL) {
-		cmd = strdup(dfstab_prop->mValue);
-		if (cmd == NULL) {
-			/*
-			 * Out of memory
-			 */
-			err = ENOMEM;
-			util_handleError(
-			    "SOLARIS_PERSISTSHARE::CREATE_INSTANCE",
-			    CIM_ERR_LOW_ON_MEMORY, LOW_MEMORY, NULL, &err);
-			return (cim_false);
-		} else {
-			int path_count = 0;
-			cim_freeProperty(dfstab_prop);
-			dfstab_prop = cim_getProperty(fsDfstab_inst,
-			    nfsPersistProps[SETTINGID].name);
-			if (dfstab_prop == NULL) {
-				ex = cim_getLastError();
-				util_handleError(
-				    "SOLARIS_PERSISTSHARE::CREATE_INSTANCE",
-				    CIM_ERR_FAILED, GET_PROPERTY_FAILURE,
-				    ex, &err);
-				return (cim_false);
-			}
-			path_count =
-			    fs_check_for_duplicate_DFStab_paths(
-			    dfstab_prop->mValue, &err);
-			if (path_count > 1 || path_count == -1) {
-				util_handleError(
-				    "SOLARIS_PERSISTSHARE::SET_INSTANCE",
-				    CIM_ERR_INVALID_PARAMETER,
-				    FS_CHECK_DUP_PATHS, NULL, &err);
-				free(cmd);
-				cim_freeProperty(dfstab_prop);
-				return (cim_false);
-			}
-		}
-		cim_freeProperty(dfstab_prop);
-
-		/*
-		 * We're stripping the return char off the end of cmd.
-		 * fs_del_DFStab_ent expects to have no \n at the end
-		 * of the line. The call to cim_getProperty() for the cmd
-		 * will always return the command string with a \n.
-		 */
-		len = strlen(cmd);
-		cmd[len - 1] = '\0';
-		dfstab_ent_list = fs_del_DFStab_ent(cmd, &err);
-		if (dfstab_ent_list == NULL && err != 0) {
-			util_handleError(
-			    "SOLARIS_PERSISTSHARE::CREATE_INSTANCE",
-			    CIM_ERR_FAILED, FS_DEL_DFSTAB_ENT_FAILURE,
-			    NULL, &err);
-			free(cmd);
-			return (cim_false);
-		}
-		fs_free_DFStab_ents(dfstab_ent_list);
-		free(cmd);
-	}
-	cim_freeInstance(fsDfstab_inst);
-	return (cim_true);
-} /* cp_deleteInstance_Solaris_PersistentShare */
-
-/*
- * Name: cp_execQuery_Solaris_PersistentShare
- *
- * Description: Builds a list of all instances, prepends the list with an
- *              empty instance, and returns the instance list. The CIMOM
- *              interprets the initial empty instance to mean that it has
- *              to do the filtering. The caller is responsible for freeing
- *              the memory allocated for the returned object.
- *
- * Parameters:
- * CCIMObjectPath *dfstabOP - An objectpath which represents the class to
- *                           work on
- * char *electClause - The select clause
- * char *nonJoinExp - The non join expression
- * char *queryExp - The query Expression
- * char *queryLang - The Query Language used (s/b "WQL")
- *
- * Returns:
- * Returns the prepended instance list. On error NULL is returned.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_execQuery_Solaris_PersistentShare(CCIMObjectPath *dfstabOP,
-	char *selectClause, char *nonJoinExp, char *queryExp, char *queryLang) {
-
-	CCIMInstance		*emptyInst;
-	CCIMInstanceList	*fsDfstabInstList;
-	CCIMInstanceList	*result;
-	CCIMException		*ex;
-	int			err = 0;
-
-	if (dfstabOP == NULL) {
-		util_handleError("SOLARIS_PERSISTSHARE::EXEC_QUERY",
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	fsDfstabInstList = cp_enumInstances_Solaris_PersistentShare(dfstabOP);
-	if (fsDfstabInstList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_PERSISTSHARE::EXEC_QUERY",
-		    CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, &err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_prependInstance(fsDfstabInstList, emptyInst);
-	if (result == NULL) {
-		ex = cim_getLastError();
-		util_handleError("SOLARIS_PERSISTSHARE::EXEC_QUERY",
-		    CIM_ERR_FAILED, PREPEND_INSTANCE_FAILURE, ex, &err);
-		cim_freeInstance(emptyInst);
-		cim_freeInstanceList(fsDfstabInstList);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	return (result);
-} /* cp_execQuery_Solaris_PersistentShare */
-
-/*
- * Provider methods
- */
-/*
- * Method: cp_invokeMethod_Solaris_PersistentShare
- *
- * Description: cp_invokeMethod_Solaris_PersistentShare calls to the
- * correct Solaris_PersistentShare method. In this case the only method
- * available is del_all_with_duplicate_path(). Thsi method checks the
- * dfstab file for entries with the same path any found are removed.
- *
- * Parameters:
- *      - CCIMObjectPath *pOP - The object path containing needed information
- *      about the class that is to getting methods invoked.
- *      - cimchar *functionName - The name of the function to be invoked.
- *      - CCIMPropertyList *inParams - The input parameters to the function.
- *      - CCIMPropertyList *outParams - The output parameters from the function.
- *
- * Returns:
- *      - A pointer to a property which indicates success or failure of the
- *      function.  1 for success, 0 for failure.
- *      - Upon error, NULL is returned and the error is logged.
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_PersistentShare(CCIMObjectPath *pOP,
-    cimchar *functionName, CCIMPropertyList *inParams,
-    CCIMPropertyList *outParams) {
-
-	int		err = 0;
-	CCIMProperty	*retVal;
-
-	/*
-	 * Make sure the proper method is being called.
-	 */
-	if (strcasecmp(functionName, DEL_ALL_WITH_DUPLICATE_PATH) == 0) {
-		retVal = del_all_with_duplicate_path(inParams);
-	} else {
-		/*
-		 * No such method name.
-		 */
-		util_handleError("SOLARIS_PERSISTSHARE::INVOKE_METHOD",
-		    CIM_ERR_FAILED, NO_SUCH_METHOD, NULL, &err);
-		return (cim_createProperty("Status", sint32, "0", NULL,
-		    cim_false));
-	}
-
-	return (retVal);
-} /* cp_invokeMethod_Solaris_PersistentShare */
-
-
-/*
- * Private Methods
- */
-/*
- * create_persistentShare_InstList
- *
- * Creates the Solaris_NFSShareSecurity instance list from information
- * gathered from the shares on the system. The instance list is returned.
- */
-static CCIMInstanceList *
-create_persistentShare_InstList(
-    fs_dfstab_entry_t persistentShareList,
-    int *err) {
-
-	fs_dfstab_entry_t fs_dfstab_ent;
-	CCIMInstanceList *fsDfstabInstList;
-	CCIMException *ex;
-	struct utsname	hostname;
-
-
-	cim_logDebug("create_persistentShare_InstList",
-	    "Entering function");
-
-	/*
-	 * retrieve system name
-	 */
-	(void) uname(&hostname);
-	*err = errno;
-	if (*err != 0) {
-		util_handleError(
-		    "SOLARIS_PERSISTSHARE::CREATE_INSTLIST",
-		    CIM_ERR_FAILED, GET_HOSTNAME_FAILURE, NULL, err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * At this point, one or more dfstab entries were found on the
-	 * system, create the instance list from the fs_dfstab_ent.
-	 */
-	fsDfstabInstList = cim_createInstanceList();
-	if (fsDfstabInstList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_PERSISTSHARE::CREATE_INSTLIST",
-		    CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE,
-		    ex, err);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Loop through the dfstab entries to retrieve their properties
-	 * and create an instance list containing all these entries and
-	 * their properties.
-	 */
-	fs_dfstab_ent = persistentShareList;
-	while (fs_dfstab_ent != NULL) {
-		CCIMInstance 	*solaris_Dfstab_instance;
-		CCIMPropertyList	*solaris_Dfstab_prop_list;
-
-		/*
-		 * Create the Solaris_PersistentShare CCIMInstance
-		 */
-		solaris_Dfstab_instance =
-			cim_createInstance(SOLARIS_PERSISTSHARE);
-		if (solaris_Dfstab_instance == NULL) {
-			ex = cim_getLastError();
-			util_handleError(
-			    "SOLARIS_PERSISTSHARE::CREATE_INSTLIST",
-			    CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE,
-			    ex, err);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		solaris_Dfstab_prop_list =
-		    populate_Solaris_PersistentShare_property_list(
-		    hostname.nodename, fs_dfstab_ent);
-		if (solaris_Dfstab_prop_list == NULL) {
-			/*
-			 * populatePropertyList already logged this
-			 * error so there is no need to log it here.
-			 */
-			cim_freeInstance(solaris_Dfstab_instance);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Add the property list to the instance
-		 */
-		solaris_Dfstab_instance =
-		    cim_addPropertyListToInstance(
-			solaris_Dfstab_instance,
-			solaris_Dfstab_prop_list);
-		if (solaris_Dfstab_instance == NULL) {
-			ex = cim_getLastError();
-			util_handleError(
-			    "SOLARIS_PERSISTSHARE::CREATE_INSTLIST",
-			    CIM_ERR_FAILED, PROPLIST_TO_INSTANCE_FAILURE,
-			    ex, err);
-			cim_freePropertyList(solaris_Dfstab_prop_list);
-			return ((CCIMInstanceList *)NULL);
-		}
-
-		/*
-		 * Add the instance to the instance list
-		 */
-		fsDfstabInstList = cim_addInstance(fsDfstabInstList,
-		    solaris_Dfstab_instance);
-		if (fsDfstabInstList == NULL) {
-			ex = cim_getLastError();
-			util_handleError(
-			    "SOLARIS_PERSISTSHARE::CREATE_INSTLIST",
-			    CIM_ERR_FAILED, ADD_INSTANCE_FAILURE,
-			    ex, err);
-			cim_freeInstance(solaris_Dfstab_instance);
-			return ((CCIMInstanceList *)NULL);
-		}
-		fs_dfstab_ent = fs_get_DFStab_ent_Next(fs_dfstab_ent);
-	} /* while (fs_dfstab_ent != NULL) */
-
-	cim_logDebug("create_persistentShare_InstList",
-	    "returning instance list");
-	return (fsDfstabInstList);
-} /* create_persistentShare_InstList */
-
-
-/*
- * Enumerate the nfs shares by using the fs_shares fs_get_share_list
- * method
- */
-static CCIMInstanceList *
-enumerate_dfstab() {
-
-	int err = 0;
-	fs_dfstab_entry_t fs_dfstab_ent;
-
-	cim_logDebug("enumerate_dfstab", "Just entering...");
-
-	fs_dfstab_ent = fs_get_DFStab_ents(&err);
-	if (fs_dfstab_ent == NULL) {
-		/*
-		 * Check whether an error was returned or if we simply don't
-		 * have any dfstab entries on the system. If err is not
-		 * equal to 0, an error was encountered.
-		 */
-		if (err != 0) {
-			cim_logDebug("enumerate_dfstab", "An error occurred " \
-			    "while getting the dfstab entries");
-			/*
-			 * Determine the error and log it.
-			 */
-			if (err == ENOMEM || err == EAGAIN) {
-				util_handleError(
-				    "SOLARIS_PERSISTSHARE::ENUM_INSTANCES",
-				    CIM_ERR_LOW_ON_MEMORY, LOW_MEMORY,
-				    NULL, &err);
-				return ((CCIMInstanceList *)NULL);
-			} else {
-
-				/*
-				 * If any other errors were encountered it
-				 * can be handled as a general error. We may
-				 * not know exactly what the error is.
-				 */
-				util_handleError(
-				    "SOLARIS_PERSISTSHARE::ENUM_INSTANCES",
-				    CIM_ERR_FAILED, FS_GET_DFSTAB_ENT_FAILURE,
-				    NULL, &err);
-				return ((CCIMInstanceList *)NULL);
-			}
-		}
-		/*
-		 * There are no nfs shares on the host.
-		 */
-		cim_logDebug("enumerate_dfstab",
-		    "There are no dfstab entries on the host. Returning NULL");
-		return ((CCIMInstanceList *)NULL);
-
-	} else {
-
-		CCIMInstanceList	*fsDfstabInstList;
-
-		fsDfstabInstList =
-		    create_persistentShare_InstList(fs_dfstab_ent, &err);
-
-		fs_free_DFStab_ents(fs_dfstab_ent);
-
-		cim_logDebug("enumerate_dfstab", "Returning the instance list");
-		return (fsDfstabInstList);
-	}
-} /* enumerate_dfstab */
-
-/*
- * populate_Solaris_PersistentShare_property_list
- * Populates the property list with the share information for each
- * instance in the instance list. Returns the instance list.
- */
-static CCIMPropertyList *
-populate_Solaris_PersistentShare_property_list(
-    char *hostname,
-    fs_dfstab_entry_t fs_dfstab_ents) {
-
-	CCIMException *ex;
-	CCIMPropertyList *fsDfstabPropList;
-	char propValues[PROPCOUNT][MAXSIZE];
-	int i, err = 0;
-
-	cim_logDebug("populate_Solaris_PersistentShare_property_list",
-	    "Just entring...");
-
-	fsDfstabPropList = cim_createPropertyList();
-	if (fsDfstabPropList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(
-		    "SOLARIS_PERSISTSHARE::POPULATE_PROPLIST",
-		    CIM_ERR_FAILED, CREATE_PROPLIST_FAILURE,
-		    ex, &err);
-		return ((CCIMPropertyList *)NULL);
-	}
-
-	/*
-	 * Create the CCIMProperties for this instance
-	 */
-
-	populate_Solaris_PersistentShare_property_values(hostname,
-	    fs_dfstab_ents, propValues, &err);
-	if (err != 0) {
-		cim_freePropertyList(fsDfstabPropList);
-		fsDfstabPropList = NULL;
-	} else {
-		for (i = 0; i < PROPCOUNT; i++) {
-			fsDfstabPropList = add_property_to_list(
-			    nfsPersistProps[i].name, nfsPersistProps[i].type,
-			    propValues[i], NULL, nfsPersistProps[i].isKey,
-			    fsDfstabPropList);
-			if (fsDfstabPropList == NULL) {
-				break;
-			}
-		}
-	}
-	cim_logDebug("populate_Solaris_NFSShareSecurity_property_list",
-	    "Returning property list");
-	return (fsDfstabPropList);
-} /* populate_Solaris_PersistentShare_property_list */
-
-/*
- * populate_Solaris_NFSShare_property_Values
- * Populates the property array for use in the populate_property_list function
- */
-static void
-populate_Solaris_PersistentShare_property_values(
-    char *hostname,
-    fs_dfstab_entry_t fs_dfstab_ents,
-    cimchar propValues[PROPCOUNT][MAXSIZE],
-    int *err) {
-
-	char		*optValue;
-
-	cim_logDebug("populate_Solaris_PersistentShare_property_values",
-	    "Just entring...");
-
-	/*
-	 * Key - System name
-	 */
-	(void) snprintf(propValues[SYSTEMNAME], MAXSIZE, "%s",
-	    hostname);
-
-	/*
-	 * Get the dfstab entry string
-	 */
-	optValue = fs_get_Dfstab_share_cmd(fs_dfstab_ents, err);
-
-	if (*err == 0) {
-		(void) snprintf(propValues[COMMAND], MAXSIZE, "%s", optValue);
-		free(optValue);
-	} else {
-		*err = EINVAL;
-		return;
-	}
-
-	/*
-	 * Key - creation class name
-	 */
-	(void) snprintf(propValues[CREATIONCLASSNAME], MAXSIZE, "%s",
-	    SOLARIS_PERSISTSHARE);
-
-	/*
-	 * Key - Shared Path
-	 */
-	optValue = fs_get_DFStab_ent_Path(fs_dfstab_ents);
-	if (optValue != NULL) {
-		(void) snprintf(propValues[SETTINGID], MAXSIZE, "%s", optValue);
-	} else {
-		*err = EINVAL;
-		return;
-	}
-
-	/*
-	 * Key - System Creation class name
-	 */
-	(void) snprintf(propValues[SYSTEMCREATIONCLASSNAME], MAXSIZE, "%s",
-	    SOLARIS_CS);
-
-	cim_logDebug("populate_Solaris_PersistentShare_property_values",
-	    "Returning");
-
-} /* populate_Solaris_PersistentShare_property_values */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_share/Solaris_PersistentShare.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _SOLARIS_PERSISTENTSHARE_H
-#define	_SOLARIS_PERSISTENTSHARE_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cp_required.h>
-#include <cp_instance.h>
-#include <cp_associator.h>
-#include <cp_method.h>
-#include <cp_property.h>
-#include "nfsprov_include.h"
-
-static nfs_prov_prop_t nfsPersistProps[] = {
-
-#define	COMMAND 0
-	{"Command", cim_false, string},
-
-#define	CREATIONCLASSNAME (COMMAND + 1)
-	{"CreationClassName", cim_true, string},
-
-#define	SETTINGID (CREATIONCLASSNAME + 1)
-	{"SettingID", cim_true, string},
-
-#define	SYSTEMCREATIONCLASSNAME (SETTINGID + 1)
-	{"SystemCreationClassName", cim_true, string},
-
-#define	SYSTEMNAME (SYSTEMCREATIONCLASSNAME + 1)
-	{"SystemName", cim_true, string}
-};
-
-/*
- * PROPCOUNT must be set using the last define in the nfsPersistProps list.
- */
-#define	PROPCOUNT (SYSTEMNAME + 1)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_PERSISTENTSHARE_H */
--- a/usr/src/cmd/wbem/provider/c/filesystems/wbem_nfs/nfs_share/Solaris_ShareService.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,215 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "nfsprov_methods.h"
-#include "nfs_provider_names.h"
-#include "util.h"
-#include <cimapi.h>
-#include <cp_method.h>
-
-
-/*
- * Constants
- */
-#define	SHAREALL "shareall"
-#define	UNSHAREALL "unshareall"
-
-/*
- * Instance provider methods
- */
-/* ARGSUSED */
-CCIMObjectPath *
-cp_createInstance_Solaris_ShareService(CCIMObjectPath *pOP,
-	CCIMInstance *pInst) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHARESERV::CREATE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMObjectPath *)NULL);
-} /* cp_createInstance_Solaris_ShareService */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_ShareService(CCIMObjectPath *pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHARESERV::DELETE_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_deleteInstance_Solaris_ShareService */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_enumInstances_Solaris_ShareService(CCIMObjectPath *pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHARESERV::ENUM_INSTANCES",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMInstanceList *)NULL);
-} /* cp_enumInstances_Solaris_ShareService */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_ShareService(CCIMObjectPath *pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHARESERV::ENUM_INSTANCENAMES",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMObjectPathList *)NULL);
-} /* cp_enumInstanceNames_Solaris_ShareService */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_execQuery_Solaris_ShareService(CCIMObjectPath *pOP, char *selectClause,
-	char *nonJoinExp, char *queryExp, char *queryLang) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHARESERV::EXEC_QUERY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMInstanceList *)NULL);
-} /* cp_execQuery_Solaris_ShareService */
-
-/* ARGSUSED */
-CCIMInstance *
-cp_getInstance_Solaris_ShareService(CCIMObjectPath *pOP) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHARESERV::GET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMInstance *)NULL);
-} /* cp_getInstance_Solaris_ShareService */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_ShareService(CCIMObjectPath *pOP, CCIMInstance *pInst) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHARESERV::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstance_Solaris_ShareService */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstanceWithList_Solaris_ShareService(CCIMObjectPath *pOP,
-	CCIMInstance *pInst, char **props, int num_props) {
-
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHARESERV::SET_INSTANCE",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setInstanceWithList_Solaris_ShareService */
-
-/*
- * Property provider methods
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_getProperty_Solaris_ShareService(CCIMObjectPath *pOP, cimchar *pPropName) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHARESERV::GET_PROPERTY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return ((CCIMProperty *)NULL);
-} /* cp_getProperty_Solaris_ShareService */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_ShareService(CCIMObjectPath *pOP, CCIMProperty *pProp) {
-	int	err = 0;
-
-	util_handleError("SOLARIS_SHARESERV::SET_PROPERTY",
-		CIM_ERR_NOT_SUPPORTED, NULL, NULL, &err);
-
-	return (cim_false);
-} /* cp_setProperty_Solaris_ShareService */
-
-
-/*
- * Method provider methods
- */
-
-/*
- * Method: cp_invokeMethod_Solaris_ShareService
- *
- * Description: Routes the cp_invokeMethod_Solaris_ShareService calls to the
- * correct Solaris_ShareService methods.
- *
- * Parameters:
- *	- CCIMObjectPath *pOP - The object path containing needed information
- *	about the class that is to getting methods invoked.
- *	- cimchar *functionName - The name of the function to be invoked.
- *	- CCIMPropertyList *inParams - The input parameters to the function
- *	- CCIMPropertyList *outParams - The output parameters from the function.
- *
- * Returns:
- *	- A pointer to a property which indicates success or failure of the
- *	function.  1 for success, 0 for failure.
- *	- Upon error, NULL is returned and the error is logged.
- */
-/* ARGSUSED */
-CCIMProperty *
-cp_invokeMethod_Solaris_ShareService(CCIMObjectPath *pOP, cimchar *functionName,
-	CCIMPropertyList *inParams, CCIMPropertyList *outParams) {
-
-	CCIMProperty	*retVal;
-	int	err = 0;
-
-	if (pOP == NULL) {
-		util_handleError("SOLARIS_SHARESERV::INVOKE_METHOD",
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	/*
-	 * Determine what method is being called.
-	 */
-	if (strcasecmp(functionName, SHAREALL) == 0) {
-		retVal = shareall(inParams);
-	} else if (strcasecmp(functionName, UNSHAREALL) == 0) {
-		retVal = unshareall(inParams);
-	} else {
-		util_handleError("SOLARIS_SHARESERV::INVOKE_METHOD",
-			CIM_ERR_FAILED, NO_SUCH_METHOD, NULL, &err);
-		return ((CCIMProperty *)NULL);
-	}
-
-	return (retVal);
-} /* cp_invokeMethod_Solaris_ShareService */
--- a/usr/src/cmd/wbem/provider/c/include/cimKeys.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _CIMKEYS_H
-#define	_CIMKEYS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define	SYS_CREATION_CLASS	"SystemCreationClassName"
-#define	CREATION_CLASS		"CreationClassName"
-#define	SYSTEM			"SystemName"
-#define	DEVICEID		"DeviceID"
-#define	NAME			"Name"
-#define	SYSTEM_ELEMENT		"SystemElement"
-#define	SAME_ELEMENT		"SameElement"
-#define	ANTECEDENT		"Antecedent"
-#define	DEPENDENT		"Dependent"
-#define	GROUP			"GroupComponent"
-#define	PART			"PartComponent"
-#define	TAG			"Tag"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CIMKEYS_H */
--- a/usr/src/cmd/wbem/provider/c/include/ctrl_descriptors.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_CTRL_DESCRIPTORS_H
-#define	_CTRL_DESCRIPTORS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include <cimapi.h>
-#include <cimprovider.h>
-#include "libdiskmgt.h"
-
-CCIMInstance		*ctrl_descriptor_toCCIMInstance(char *hostName,
-			    dm_descriptor_t dp, char *providerName, int *errp);
-
-CCIMInstanceList	*ctrl_descriptors_toCCIMInstanceList(
-			    char *providerName, dm_descriptor_t *dp, int *errp,
-				int, ...);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _CTRL_DESCRIPTORS_H */
--- a/usr/src/cmd/wbem/provider/c/include/disk_descriptors.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_DISK_DESCRIPTORS_H
-#define	_DISK_DESCRIPTORS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include <cimapi.h>
-#include <cimprovider.h>
-#include "libdiskmgt.h"
-
-CCIMInstance		*disk_descriptor_toCCIMInstance(char *hostName,
-			    dm_descriptor_t dp, char *providerName, int *errp);
-
-CCIMInstanceList	*disk_descriptors_toCCIMInstanceList(
-			    char *providerName, dm_descriptor_t *dp, int *errp);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _DISK_DESCRIPTORS_H */
--- a/usr/src/cmd/wbem/provider/c/include/drive_descriptors.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_DRIVE_DESCRIPTORS_H
-#define	_DRIVE_DESCRIPTORS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include <cimapi.h>
-#include <cimprovider.h>
-#include "libdiskmgt.h"
-
-#define	DRVTYPE		"drvtype"
-#define	STATUS		"status"
-
-CCIMInstance		*drive_descriptor_toCCIMInstance(char *hostName,
-			    dm_descriptor_t dp, char *providerName, int *errp);
-
-CCIMInstanceList	*drive_descriptors_toCCIMInstanceList(
-			    char *providerName, dm_descriptor_t *dp, int *errp);
-
-/*
- * Function for use in association providers to get filtered drives.
- * Convert the descriptor list to a CIMInstanceList that will be used
- * only for object paths and thus does not need to be fully populated.
- * We do the filtering in this function to be sure that we are only
- * returning drives that are modeled with this class in CIM.
- */
-CCIMInstanceList	*drive_descriptors_toCCIMObjPathInstList(
-			    char *providerName, dm_descriptor_t *dp, int *errp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _DRIVE_DESCRIPTORS_H */
--- a/usr/src/cmd/wbem/provider/c/include/logicaldisk_descriptors.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_LOGICAL_DISKDESCRIPTORS_H
-#define	_LOGICAL_DISKDESCRIPTORS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include <cimapi.h>
-#include <cimprovider.h>
-#include "libdiskmgt.h"
-
-CCIMInstance		*logicaldisk_descriptor_toCCIMInstance(char *hostName,
-			    dm_descriptor_t dp, char *providerName, int *errp);
-
-CCIMInstanceList	*logicaldisk_descriptors_toCCIMInstanceList(
-			    char *providerName, dm_descriptor_t *dp, int *errp);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _LOGICAL_DISKDESCRIPTORS_H */
--- a/usr/src/cmd/wbem/provider/c/include/mediapresent_descriptors.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_MEDIAPRESENT_DESCRIPTORS_H
-#define	_MEDIAPRESENT_DESCRIPTORS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include <cimapi.h>
-#include <cimprovider.h>
-#include "libdiskmgt.h"
-
-
-CCIMInstance		*mediapresent_descriptor_toCCIMInstance(char *hostName,
-			    dm_descriptor_t ant, dm_descriptor_t dep,
-				char *providerName, int *errp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _MEDIAPRESENT_DESCRIPTORS_H */
--- a/usr/src/cmd/wbem/provider/c/include/messageStrings.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _MESSAGESTRINGS_H
-#define	_MESSAGESTRINGS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * dgettext is normally defined by including libintl.h.  However, the file
- * /usr/sadm/lib/wbem/include/cimapi.h erroneously defines gettext so that
- * they can play games with L10N in the CIM functions.  If we try to undef
- * gettext before we include libintl.h we get a complaint from hdrchk.  So,
- * just declare the extern here to work around this mess.
- */
-extern char *dgettext(const char *, const char *);
-
-/* cim failures */
-#define	CREATE_PROPERTY_FAILURE \
-	util_routineFailureMessage("cim_createProperty")
-#define	ADD_PROPERTY_FAILURE \
-	util_routineFailureMessage("cim_addProperty")
-#define	ADD_INSTANCE_FAILURE \
-	util_routineFailureMessage("cim_addInstance")
-#define	GET_INSTANCE_FAILURE \
-	util_routineFailureMessage("cim_getInstance")
-#define	CREATE_INSTANCE_LIST_FAILURE \
-	util_routineFailureMessage("cim_createInstanceList")
-#define	CREATE_INSTANCE_FAILURE \
-	util_routineFailureMessage("cim_createInstance")
-#define	CREATE_OBJECT_LIST_FAILURE \
-	util_routineFailureMessage("cim_createObjectPathList")
-#define	CREATE_OBJECT_PATH_FAILURE \
-	util_routineFailureMessage("cim_createObjectPath")
-#define	ENUM_INSTANCES_FAILURE \
-	util_routineFailureMessage("cim_enumerateInstances")
-#define	ENUM_INSTANCENAMES_FAILURE \
-	util_routineFailureMessage("cim_enumerateInstanceNames")
-#define	COPY_OBJPATH_FAILURE \
-	util_routineFailureMessage("cim_copyObjectPath")
-#define	CREATE_REFPROP_FAILURE \
-	util_routineFailureMessage("cim_createReferenceProperty")
-#define	ASSOCIATOR_NAMES_FAILURE \
-	util_routineFailureMessage("cim_associatorNames")
-
-/* dm api failures */
-#define	DM_GET_ATTR_FAILURE \
-	util_routineFailureMessage("dm_get_attributes")
-#define	DM_GET_NAME_FAILURE \
-	util_routineFailureMessage("dm_get_name")
-#define	DM_GET_ASSOC_FAILURE \
-	util_routineFailureMessage("dm_get_associated_descriptors")
-#define	DM_GET_DESC_BYNAME_FAILURE \
-	util_routineFailureMessage("dm_get_descriptor_by_name")
-#define	DM_GET_DESCRIPTORS \
-	util_routineFailureMessage("dm_get_descriptors")
-
-/* descriptor function failures */
-#define	DRIVE_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("drive_descriptor_toCCIMInstance")
-#define	PART_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("partition_descriptor_toCCIMInstance")
-#define	DISK_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("disk_descriptor_toCCIMInstance")
-#define	LOGICALDISK_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("logicaldisk_descriptor_toCCIMInstance")
-#define	SCSICTRL_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("scsictrl_descriptor_toCCIMInstance")
-#define	IDECTRL_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("idectrl_descriptor_toCCIMInstance")
-#define	USBCTRL_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("usbctrl_descriptor_toCCIMInstance")
-#define	FCCTRL_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("fcctrl_descriptor_toCCIMInstance")
-#define	MPXIOCTRL_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("mpxioctrl_descriptor_toCCIMInstance")
-#define	UCTRL_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("unknownctrl_descriptor_toCCIMInstance")
-#define	MPXIOGRP_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("mpxiogroup_descriptor_toCCIMInstance")
-#define	PARTBASEDON_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("diskpartbo_descriptor_toCCIMInstance")
-#define	REALIZESEXT_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("realizesextent_descriptor_toCCIMInstance")
-#define	REALIZESDD_DESC_TO_INSTANCE_FAILURE			\
-	util_routineFailureMessage(				\
-		"realizesdiskdrive_descriptor_toCCIMInstance")
-#define	MEDIAPRES_DESC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("mediapresent_descriptor_toCCIMInstance")
-#define	SCSIINT_ASSOC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("scsiIntAssocToInst")
-#define	FCINT_ASSOC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("fcIntAssocToInst")
-#define	USBINT_ASSOC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("usbIntAssocToInst")
-#define	MPXIOINT_ASSOC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("mpxioIntAssocToInst")
-#define	IDEINT_ASSOC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("ideIntAssocToInst")
-#define	MEDIAPRES_ASSOC_TO_INSTANCE_FAILURE \
-	util_routineFailureMessage("MediaPresAssocToInst")
-#define	UTIL_FILEOPEN_FAILURE \
-	util_routineFailureMessage("util_OpenFile")
-#define	UTIL_FILECLOSE_FAILURE \
-	util_routineFailureMessage("util_CloseFile")
-#define	UTIL_FILEREMOVE_FAILURE \
-	util_routineFailureMessage("util_RemoveFile")
-
-/* General failures */
-#define	LOW_MEMORY \
-	dgettext(TEXT_DOMAIN, "Not enough memory Failure.")
-#define	GENERAL_FAILURE \
-	dgettext(TEXT_DOMAIN, "General Failure.")
-#define	NO_SUCH_METHOD \
-	dgettext(TEXT_DOMAIN, "No Such Method Defined.")
-#define	NVLIST_FAILURE \
-	dgettext(TEXT_DOMAIN, "The nvlist action failed.")
-#define	NO_SUCH_CLASS \
-	dgettext(TEXT_DOMAIN, "Class Not Found.")
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _MESSAGESTRINGS_H */
--- a/usr/src/cmd/wbem/provider/c/include/methods.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_METHODS_H
-#define	_METHODS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* include the cimapi, this in turn includes the cimstructs.h which we need */
-#include <cimapi.h>
-#include <cimlogsvc.h>
-#include <cimauthcheck.h>
-
-/* constant definitions */
-#define	PROPTRUE	"1"
-#define	PROPFALSE	"0"
-#define	DISK_WRITE_RIGHT	"solaris.admin.diskmgr.write"
-#define	DISK_READ_RIGHT		"solaris.admin.diskmgr.read"
-
-/* function prototypes */
-
-CCIMProperty *create_default_fdisk_partition(CCIMObjectPath *op);
-CCIMProperty *create_filesystem(CCIMObjectPath *op);
-CCIMProperty *create_fdisk_partitions(CCIMPropertyList *, CCIMObjectPath *);
-CCIMProperty *create_partitions(CCIMPropertyList *, CCIMObjectPath *);
-CCIMProperty *get_disk_geometry(CCIMPropertyList *, CCIMObjectPath *);
-CCIMProperty *getFdisk(CCIMPropertyList *, CCIMObjectPath *);
-CCIMProperty *label_disk(CCIMPropertyList *, CCIMObjectPath *);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif /* _METHODS_H */
--- a/usr/src/cmd/wbem/provider/c/include/mpxiogroup_descriptors.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_MPXIOGROUP_DESCRIPTORS_H
-#define	_MPXIOGROUP_DESCRIPTORS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include <cimapi.h>
-#include <cimprovider.h>
-#include "libdiskmgt.h"
-
-CCIMInstance		*mpxiogroup_descriptor_toCCIMInstance(
-			    dm_descriptor_t dp, char *providerName, int *errp);
-
-CCIMInstanceList	*mpxiogroup_descriptors_toCCIMInstanceList(
-			    char *providerName, dm_descriptor_t *dp, int *errp);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _MPXIOGROUP_DESCRIPTORS_H */
--- a/usr/src/cmd/wbem/provider/c/include/partbasedon_descriptors.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_PARTBASEDON_DESCRIPTORS_H
-#define	_PARTBASEDON_DESCRIPTORS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include <cimapi.h>
-#include <cimprovider.h>
-#include "libdiskmgt.h"
-
-
-CCIMInstance		*partbasedon_descriptor_toCCIMInstance(char *hostName,
-			    dm_descriptor_t ant, dm_descriptor_t dep,
-				char *providerName, int *errp);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _PARTBASEDON_DESCRIPTORS_H */
--- a/usr/src/cmd/wbem/provider/c/include/partition_descriptors.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_PARTITION_DESCRIPTORS_H
-#define	_PARTITION_DESCRIPTORS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include <cimapi.h>
-#include <cimprovider.h>
-#include "libdiskmgt.h"
-
-#define	DRVTYPE		"drvtype"
-#define	STATUS		"status"
-
-CCIMInstance		*partition_descriptor_toCCIMInstance(char *hostName,
-			    dm_descriptor_t dp, char *providerName, int *errp);
-
-CCIMInstanceList	*partition_descriptors_toCCIMInstanceList(
-			    char *providerName, dm_descriptor_t *dp,
-				dm_descriptor_t *fdp, int *errp);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _PARTITION_DESCRIPTORS_H */
--- a/usr/src/cmd/wbem/provider/c/include/providerNames.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _PROVIDERNAMES_H
-#define	_PROVIDERNAMES_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* Forward declaration of device providers */
-
-#define		DISK_DRIVE  		"Solaris_DiskDrive"
-#define		DISK_PARTITION  	"Solaris_DiskPartition"
-#define		LOGICAL_DISK  		"Solaris_LogicalDisk"
-#define		DISK  			"Solaris_Disk"
-#define		REALIZES_EXTENT  	"Solaris_RealizesExtent"
-#define		REALIZES_DISKPART  	"Solaris_RealizesDiskPartition"
-#define		REALIZES_DISKDRIVE  	"Solaris_RealizesDiskDrive"
-#define		GENERIC_CONTROLLER  	"Solaris_GenericController"
-#define		IDE_CONTROLLER  	"Solaris_IDEController"
-#define		SCSI_CONTROLLER  	"Solaris_SCSIController"
-#define		USBSCSI_CONTROLLER  	"Solaris_USBSCSIController"
-#define		MPXIO_CONTROLLER  	"Solaris_MPXIOController"
-#define		MPXIO_GROUP  		"Solaris_MPXIOGroup"
-#define		MPXIO_COMPONENT  	"Solaris_MPXIOComponent"
-#define		MPXIO_LOGICALIDENTITY  	"Solaris_MPXIOCtrlrLogicalIdentity"
-#define		MPXIO_INTERFACE  	"Solaris_MPXIOInterface"
-#define		SCSI_INTERFACE  	"Solaris_SCSIInterface"
-#define		IDE_INTERFACE  		"Solaris_IDEInterface"
-#define		MEDIA_PRESENT  		"Solaris_MediaPresent"
-#define		DISKPART_BASEDONFDISK  	"Solaris_DiskPartitionBasedOnFDisk"
-#define		DISKPART_BASEDONDISK  	"Solaris_DiskPartitionBasedOnDisk"
-#define		COMPUTER_SYSTEM  	"Solaris_ComputerSystem"
-#define		PHYSICAL_PACKAGE	"Solaris_PhysicalPackage"
-
-/* Forward declaration of function names */
-
-#define		DRIVE_DESCRIPTOR_FUNC	"drive_descriptors_toCCIMInstance"
-#define		PARTITION_DESCRIPTOR_FUNC "partition_descriptors_toCCIMInstance"
-#define		DISK_DESCRIPTOR_FUNC	"disk_descriptors_toCCIMInstance"
-#define		LOGICALDISK_DESCRIPTOR_FUNC \
-			"logicaldisk_descriptors_toCCIMInstance"
-#define		MPXIO_DESCRIPTOR_FUNC \
-			"mpxiogroup_descriptors_toCCIMInstance"
-#define		CTRL_DESCRIPTOR_FUNC	"ctrl_descriptors_toCCIMInstance"
-#define		PARTBASEDON_DESCRIPTOR_FUNC \
-			"partbasedon_descriptors_toCCIMInstance"
-#define		REALIZESEXTENT_DESCRIPTOR_FUNC \
-			"realizesextent_descriptors_toCCIMInstance"
-#define		REALIZESDD_DESCRIPTOR_FUNC \
-			"realizesdiskdrive_descriptors_toCCIMInstance"
-#define		MEDIAPRES_DESCRIPTOR_FUNC \
-			"mediapresent_descriptors_toCCIMInstance"
-
-/* utility function names */
-#define		UTIL_OPENFILE		"Util_OpenFile"
-#define		UTIL_CLOSEFILE		"Util_CloseFile"
-#define		UTIL_REMOVEFILE		"Util_RemoveFile"
-
-
-/* c provider function names */
-#define		ENUM_INSTANCES		"cp_enumInstances"
-#define		ENUM_INSTANCENAMES	"cp_enumIntanceNames"
-#define		GET_INSTANCE		"cp_getInstance"
-#define		INVOKE_METHOD		"cp_invokeMethod"
-#define		EXEC_QUERY		"cp_execQuery"
-#define		ASSOCIATORS		"cp_associators"
-#define		ASSOCIATOR_NAMES	"cp_associatorNames"
-#define		REFERENCES		"cp_references"
-#define		REFERENCE_NAMES		"cp_referenceNames"
-#define		CREATE_INSTANCE		"cp_createInstance"
-#define		CREATE_INSTANCELIST	"cp_createInstanceList"
-#define		DELETE_INSTANCE		"cp_deleteInstance"
-#define		SET_INSTANCE		"cp_setInstance"
-#define		GET_PROPERTY		"cp_getProperty"
-#define		SET_PROPERTY		"cp_setProperty"
-#define		CREATE_OBJECT_PATH	"cim_createObjectPath"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _PROVIDERNAMES_H */
--- a/usr/src/cmd/wbem/provider/c/include/realizesdiskdrive_descriptors.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_REALIZESDISKDRIVE_DESCRIPTORS_H
-#define	_REALIZESDISKDRIVE_DESCRIPTORS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include <cimapi.h>
-#include <cimprovider.h>
-#include "libdiskmgt.h"
-
-CCIMInstance		*realizesdiskdrive_descriptor_toCCIMInstance(
-			    char *hostName, CCIMObjectPath * antOp,
-				dm_descriptor_t dp, char *providerName,
-				    int *errp);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _REALIZESDISKDRIVE_DESCRIPTORS_H */
--- a/usr/src/cmd/wbem/provider/c/include/realizesextent_descriptors.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_REALIZESEXTENT_DESCRIPTORS_H
-#define	_REALIZESEXTENT_DESCRIPTORS_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <sys/types.h>
-#include <cimapi.h>
-#include <cimprovider.h>
-#include "libdiskmgt.h"
-
-CCIMInstance		*realizesextent_descriptor_toCCIMInstance(
-			    char *hostName, dm_descriptor_t dp,
-				char *providerName, int *errp);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _REALIZESEXTENT_DESCRIPTORS_H */
--- a/usr/src/cmd/wbem/provider/c/include/util.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_UTIL_H
-#define	_UTIL_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <stdio.h>
-#include <netdb.h>
-#include <cimapi.h>
-#include <cimomhandle.h>
-#include <cimprovider.h>
-#include <cimauthcheck.h>
-#include <cimlogsvc.h>
-
-#include "providerNames.h"
-#include "messageStrings.h"
-
-#define	MAXFAILSTRINGLEN	256
-
-void 	util_handleError(char *, CIMErrorReason, char *, CCIMException *,
-	    int *);
-void	*util_getKeyValue(CCIMPropertyList *, CIMType, char *, int *);
-void	util_doReferenceProperty(cimchar *, CCIMObjectPath *, CIMBool,
-	    CCIMInstance *, int *);
-void	util_doProperty(cimchar *, CIMType, cimchar *, CIMBool,
-	    CCIMInstance *, int *);
-FILE 	*util_openFile(char *, char *);
-int	util_closeFile(FILE *, char *);
-void	util_removeFile(char *);
-char	*util_routineFailureMessage(char *);
-char	*util_routineStartDaemonMessage(char *);
-
-char	hostName[MAXHOSTNAMELEN];
-
-#define	DISK_DOMAIN	"libWBEMdisk"
-#define	DISK_PROVIDER	"libWBEMdisk"
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _UTIL_H */
--- a/usr/src/cmd/wbem/provider/c/mof/CIM2.7.mof	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,232 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- * Title       CIM version 2.7 NFS dependencies.
- * Description CIM version 2.7 Solaris Network File System model dependencies.
- * Date        02/18/2003
- * Version     2.7
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma namespace("root/cimv2")
-#pragma Locale ("en_US")
-#pragma namespace("__create")
-
-// ==================================================================
-// ManagedElement
-// ==================================================================
-[Abstract, Version ("2.7.0"), Description (
-    "ManagedElement is an abstract class that provides a common "
-    "superclass (or top of the inheritance tree) for the "
-    "non-association classes in the CIM Schema.") ]
-class CIM_ManagedElement {
-
-    [MaxLen (64), Description ( 
-        "The Caption property is a short textual description (one-" 
-        "line string) of the object.") ] 
-    string Caption;
-
-    [Description ( 
-        "The Description property provides a textual description of "
-        "the object.") ] 
-    string Description; 
-
-    [Description (
-        "  A user-friendly name for the object. This property allows "
-        "each instance to define a user-friendly name IN ADDITION TO its "
-        "key properties/identity data, and description information. \n"
-        "  Note that ManagedSystemElement's Name property is also defined "
-        "as a user-friendly name. But, it is often subclassed to be a "
-        "Key. It is not reasonable that the same property can convey "
-        "both identity and a user friendly name, without inconsistencies. "
-        "Where Name exists and is not a Key (such as for instances of "
-        "LogicalDevice), the same information MAY be present in both "
-        "the Name and ElementName properties.") ]
-    string ElementName;
-};
-
-// ==================================================================
-//    SettingData
-// ===================================================================
-[Abstract, Experimental, Version ("2.7.0"), Description (
-    "  The SettingData class represents configuration-related and "
-    "operational parameters for one or more ManagedElement(s). A "
-    "ManagedElement may have multiple SettingData objects associated "
-    "with it. The current operational values for an Element's "
-    "parameters are reflected by properties in the Element itself or "
-    "by properties in its associations. These properties do not have "
-    "to be the same values present in the SettingData object. For "
-    "example, a modem may have a SettingData baud rate of 56Kb/sec "
-    "but be operating at 19.2Kb/sec. \n"
-    "  Note that the CIM_SettingData class is very similar to "
-    "CIM_Setting, yet both classes are present in the model.  This is "
-    "because many implementations have successfully used CIM_Setting. "
-    "However, issues have arisen that could not be resolved without "
-    "defining a new class.  Therefore, until a new major release "
-    "occurs, both classes will exist in the model.  Refer to the Core "
-    "White Paper for additional information.") ]
-class CIM_SettingData : CIM_ManagedElement {
-
-    [Key, Description (
-        "InstanceID opaquely identifies a unique instance of "
-        "SettingData.  The InstanceID must be unique within a "
-        "namespace. In order to ensure uniqueness, the value of "
-        "InstanceID SHOULD be constructed in the following manner: \n"
-        "<Vendor ID><ID> \n"
-        "   <Vendor ID> MUST include a copyrighted, trademarked "
-        "or otherwise unique name that is owned by the business entity "
-        "or a registered ID that is assigned to the business entity "
-        "that is defining the InstanceID. (This is similar to the "
-        "<Schema Name>_<Class Name> structure of Schema class names.) "
-        "The purpose of <Vendor ID> is to ensure that <ID> is truly "
-        "unique across multiple vendor implementations.   If such a "
-        "name is not used, the defining entity MUST assure that the "
-        "<ID> portion of the Instance ID is unique when compared with "
-        "other instance providers. For DMTF defined instances, the "
-        "<Vendor ID> is 'CIM'. \n"
-        "   <ID> MUST include a vendor specified unique "
-        "identifier.") ] 
-    string InstanceID;
-
-    [Required, Description (
-        "The user friendly name for this instance of SettingData. "
-        "In addition, the user friendly name can be used as a "
-        "index property for a search of query.  (Note:  Name "
-        "does not have to be unique within a namespace.)") ]
-    string ElementName;
-};
-
-// ===================================================================
-// Share
-// ===================================================================
-[Abstract, Experimental, Version ("2.7.0"), Description (
-    "A Share is representative of an object presented for use "
-    "(or shared) across systems.  Instances of CIM_Share are "
-    "associated with the shared object on the 'server'-side via "
-    "the CIM_SharedElement association.  Shares are mounted on the "
-    "'client'-side (usually into another namespace) via the CIM_Import"
-    "Share association.  CIM_Share is Abstract to force subclassing to "
-    "define the semantics of sharing." ) ]
-class CIM_Share : CIM_LogicalElement {
- 
-    [Key, MaxLen (256),
-        Propagated ("CIM_System.CreationClassName"), 
-        Description ("The scoping System's CreationClassName. ") ]
-    string SystemCreationClassName;
-
-    [Key, Propagated ("CIM_System.Name"),
-        Description ("The scoping System's Name.") ] 
-    string SystemName;
-
-    [Key, MaxLen (256), Description (
-        "CreationClassName indicates the name of the class or the "
-        "subclass used in the creation of an instance.") ]
-    string CreationClassName;
-
-    [Override("Name"), Key, Description (
-        "The Name property, inherited from LogicalElement, "
-        "defines the shared name by which the shared object is "
-        "exported.") ]
-    string Name;
-};
-
-
-// ===================================================================
-// FileShare
-// ===================================================================
-[Abstract, Experimental, Version ("2.7.0"), Description (
-    "A FileShare is representative of a file or directory presented "
-    "for use (or shared) across systems.  Instances of FileShare are "
-    "associated with the shared object on the 'server'-side via "
-    "the CIM_SharedElement association.  Shares are mounted on the "
-    "'client'-side (usually into another namespace) via the CIM_Import"
-    "Share association.  FileShare is Abstract to force subclassing to "
-    "define the semantics of sharing." ) ]
-class CIM_FileShare : CIM_Share { 
-
-    [Description ("Indicates whether a directory or file is presented "
-        "for use (or shared) across systems.  A value of true "
-        "represents a directory.  A value of false represents a file") ]
-    boolean SharingDirectory;
-};
-
-// ===================================================================
-// NFSShare
-// ===================================================================
-[Experimental, Version ("2.7.0"), Description (
-    "An NFSShare represents a Directory associated "
-    "via CIM_SharedElement that is made accessible to "
-    "other systems. On the client-side, the NFSShare is "
-    "associated with its mount point via "
-    "CIM_ImportedShare.") ]
-class CIM_NFSShare : CIM_FileShare {
-
-    [Override("Name"), Description (
-        "The Name property, inherited from Share, defines the "
-        "shared name by which the shared object is exported.  "
-        "For NFS, this will typically be the pathname of the "
-        "exported directory, using forward slashes '/' to "
-        "precede directory names in the path.") ]
-    string Name;
-};
-
-// ===================================================================
-// SharedElement
-// ===================================================================
-[Association, Experimental, Version ("2.7.0"), Description (
-    "SharedElement associates the Share to a LogicalElement"
-    "that is being exported.")     ]
-class CIM_SharedElement: CIM_LogicalIdentity {
-          
-    [Override("SystemElement"), Key, Max (1), 
-        Description ("The Directory that is Shared.") ] 
-    CIM_LogicalElement REF SystemElement;
-
-    [Override("SameElement"), Key, Description (
-        "The Shared view of the Directory.") ]
-    CIM_Share ref SameElement;
-};
-
-// ==================================================================
-//    HostedShare
-// ==================================================================
-[Association, Experimental, Version ("2.7.0"), Description (
-    "CIM_HostedShare is an association between a Share and "
-    "the System on which the functionality resides.  The "
-    "cardinality of this association is 1-to-many.  A System "
-    "may host many Shares. Shares are weak with respect to "
-    "their hosting System. Heuristic:  A Share is hosted on "
-    "the System where the LogicalElement that Exports the "
-    "Share is located, (via LogicalIdentity.)") ]
-class CIM_HostedShare:CIM_Dependency {
-
-    [Override ("Antecedent"), Max (1), Min (1),
-        Description ("The hosting System.") ]
-    CIM_System REF Antecedent;
-
-    [Override ("Dependent"), Weak,
-        Description ("The Share hosted on the System.") ]
-    CIM_Share REF Dependent;
-};
-
--- a/usr/src/cmd/wbem/provider/c/mof/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-REG =	Solaris_DMGT1.0.mof Solaris_NFS1.0.mof CIM2.7.mof
-
-DIRMODE= 755
-FILEMODE= 644
-
-VARSADM=			$(ROOT)/var/sadm
-VARSADMWBEM=			$(ROOT)/var/sadm/wbem
-VARSADMWBEMLOGR=		$(ROOT)/var/sadm/wbem/logr
-VARSADMWBEMLOGRPREREG=		$(ROOT)/var/sadm/wbem/logr/preReg
-
-REGDIRS=	$(VARSADM) 				\
-		$(VARSADMWBEM)	 			\
-		$(VARSADMWBEMLOGR)	 		\
-		$(VARSADMWBEMLOGRPREREG)
-
-$(REGDIRS):
-	$(INS.dir)
-
-ROOTMOFREG=	$(REG:%=$(ROOTMOF)/%)
-
-.KEEP_STATE:
-
-all:
-
-install: $(REGDIRS) $(ROOTMOFREG)
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/wbem/provider/c/mof/Solaris_DMGT1.0.mof	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,789 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Title	Solaris Device Management MOF specification
- * Description	This model incorporates Disks, Disks Partitions and other 
- *		device management classes. 
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma namespace("root/cimv2")
-#pragma Locale ("en_US")
-#pragma namespace("__modify")
- 
-//=============================================================================
-// Title: Solaris_DiskDrive
-// Version: 1.3.0
-// Date: 2/12/02 
-// Description: Solaris_DiskDrive MOF Class definition
-//=============================================================================
-
-    [Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-      "Provides information about the logical characteristics"
-      "of a disk drive attached to a Solaris system.")]
-class Solaris_DiskDrive : CIM_DiskDrive
-{
-    [Deprecated {
-	""},
-     MaxLen (256),
-     Description (
-      "A string describing the type of disk. The use of"
-      "this is deprecated. This is a media specific attribute. ")]
-    string DiskType;
-
-    [Deprecated {
-	"Solaris_Disk.PhysicalLabels"}, 
-     MaxLen (256),
-     Description (
-      "A string containing a user defined label for the disk."
-      "This attribute has been deprecated. It is a media attribute and"
-      "is covered by the label property inherited on the media object.")]
-    string DiskLabel;
-
-    [Deprecated {
-	""},
-     Description (
-      "The number of sectors per cylinder.This attribute has"
-      "been deprecated. It is a media attribute and is not valid"
-      "because this information cannot be reliably determined."  )]
-    uint32 SectorsPerCylinder;
-
-    [Deprecated {
-	""},
-     Description (
-      "The number of heads per cylinder. This attribute has been"
-      "deprecated. See SectorsPerCylinder for details." )]
-    uint32 HeadsPerCylinder;
-
-    [Deprecated {
-	""},
-     Description (
-      "The number of sectors per track. This attribute has been"
-      "deprecated. See SectorsPerCylinder for details.")]
-    uint32 SectorsPerTrack;
-
-    [Deprecated {
-	""},
-     Description (
-      "The size of a cylinder in bytes. This attribute has been"
-      "deprecated. See SectorsPerCylinder for details.")]
-    uint32 BytesPerCylinder;
-
-    [Deprecated {
-	""},
-     Description (
-      "The number of cylinders for this disk. This attribute"
-      "has been deprecated. See SectorsPerCylinder for details.")]
-    uint32 PhysicalCylinders;
-
-    [Deprecated {
-	""},
-     Description (
-      "The number of cylinders available for partitions. This"
-      "attribute has been deprecated. See SectorsPerCylinder for details.")]
-    uint32 DataCylinders;
-
-    [Deprecated {
-	""},
-     Description (
-      "The number of reserved cylinders. This attribute has been"
-      "deprecated. See SectorsPerCylinder for details.")]
-    uint32 AlternateCylinders;
-
-    [Deprecated {
-	""},
-     Description (
-      "The number of actual cylinders. This attribute has"
-      "been deprecated. See SectorsPerCylinder for details.")]
-    uint32 ActualCylinders;
-
-    [Deprecated {
-	""},
-     Description (
-      "Does this disk require fdisk partitions?"
-      "Solaris i386 machines require a disk to"
-      "contain fdisk partitions. This attribute has been deprecated.")]
-    boolean FdiskRequired;
-
-    [Deprecated {
-	""},
-     Description (
-      "Does this disk contain fdisk partitions. This attribute"
-      "has been deprecated. This is now modeled using the" 
-      "Solaris_DiskPartBasedOnFDisk association.")]
-    boolean FdiskPresent;
-
-    [Deprecated {
-	"Solaris_Disk.labelDisk()"
-	},
-     Description (
-      "Label the disk with the given string."
-      "The string should contain a short label for the"
-      "disk of up to 8 characters. This method has been deprecated."
-      "This behavior is now modeled using the labelDisk method on" 
-      "Solaris_Disk.")]
-    boolean LabelDisk([IN] String label);
-
-    [Deprecated {
-	"Solaris_Disk.createFDiskPartitions"
-	},
-     Description (
-      "Create one Solaris fdisk partition that"
-      "uses the whole disk. This method has been deprecated. This has"
-      "been replaced with the Solaris_Disk.createFDiskPartitions method.")]
-    boolean CreateDefaultFdiskPartition();
-
-    [Deprecated {
-	"Solaris_Disk.createFDiskPartitions"
-	},
-     Description (
-      "Create fdisk partitions on this disk. This method"
-      "has been deprecated. It has been replaced with the"
-      "Solaris_Disk.createFDiskPartitions method.")]
-    boolean CreateFdiskPartitions([IN] uint32 DiskParameters[]);
-
-    [Deprecated {
-	""},
-     Description (
-      "Retrieve the current fdisk partitions for this disk."
-      "This method has been deprecated. It is now modeled using the "
-      "Solaris_DiskPartition object with the fDisk subtype" )]
-    boolean GetFdiskPartitions([OUT, IN(False)] uint32 FDiskPartitions[]);
-};
-
-//=============================================================================
-// Title: Solaris_DiskPartition
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_DiskPartition MOF Class definition
-//=============================================================================
-
-    [Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description("Provides information about the logical partitions"
-                 "on a disk drive attached to a Solaris system.")]
-class Solaris_DiskPartition : CIM_DiskPartition
-{
-
-    [Description ("The type of Solaris partition."),
-     ValueMap{"0", "1", "2", "3", "4"},
-     Values {"Unknown", "Other", "Solaris", "FDisk", "EFI"}]
-    uint16 SolarisPartitionType;
-
-    [Description ("The size in bytes of this partition"),
-     Units("Bytes")]
-    uint64 PartitionSize;
-
-    [Description ("The Starting cylinder for this partition")]
-    uint32 StartCylinder;
-
-    [Description ("The ending cylinder for this partition")]
-    uint32 EndCylinder;
-
-    [Description ("The number of cylinders for this partition")]
-    uint32 TotalCylinders;
-
-    [Deprecated {
-	""},
-     MaxLen (256),
-     Description ("A string containing the deviceID of the scoping disk." 
-       "This is now modeled on the media object and is obtained by the Name"
-	"attribute on that object. ")]
-    string DiskID;
-
-    [Deprecated {
-	""},
-     Description ("The FLAG for this partition. The Flag describes"
-         "how the partition is to be mounted."
-         "0x00 Mountable Read Write"
-         "0x01 Not Mountable"
-         "0x10 Mountable Read Only. This attribute has been deprecated."
-	 " A partition is not mounted. A Filesystem is.")]
-    uint8 Flag;
-
-   [Deprecated {
-	""},
-    Description ("The TAG for this partition. The Tag describes"
-         "the type of partition"
-         "Unassigned   0x00"
-         "Boot         0x01"
-         "Root         0x02"
-         "Swap         0x03"
-         "Usr          0x04"
-         "Backup       0x05"
-         "Stand        0x06"
-         "Var          0x07"
-         "Home         0x08"
-         "Altsctr      0x09"
-         "Cache        0x0a This attribute has been deprecated. A"
-	 "Filesystem on a partition determines its use case.")]
-    uint8 Tag;
-
-    [Deprecated {
-	""},
-     Description ("Is there an existing file system on this partition."
-	"This attribute has been deprecated. This information is obtained"
-	"by traversing the Solaris_LocalFSResidesOnExtent association.")]
-    boolean ValidFileSystem;
-
-    [Deprecated {
-	"" },
-     Description ("Create file system on this partition using the default"
-         "parameters. Returns TRUE if successful. This method has been"
-	 "deprecated. The behavior for this method is done with the "
-	 "creation of a Solaris_FileSystem object.")]
-    boolean CreateFileSystem();
-
-    [Deprecated {
-	"Solaris_Disk.createPartitions()"},
-     Description ("Create partition on this disk. Partitions are created"
-         "based on the instance of Solaris_DiskPartition that"
-         "are associated with this Solaris_DiskDrive instance. This "
-	 "method has been deprecated. It is replaced by the" 
-	 "Solaris_Disk.createPartitions() method.")]
-    boolean CreatePartitions([IN] uint32 DiskParameters[]);
-
-};
-
-//=============================================================================
-// Title: Solaris_MediaPresent
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_MediaPresent MOF Class definition
-//=============================================================================
-    [Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description ("Solaris_MediaPresent an association that represents"
-               "The relationship between a media access device and"
-               "its media if present.")]
-class Solaris_MediaPresent : CIM_MediaPresent
-{
-};
-
-#pragma namespace("__create")
-//=============================================================================
-// Title: Solaris_LogicalDisk
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_LogicalDisk MOF Class definition
-//=============================================================================
-
-    [Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description("Provides information about the logical characteristics"
-                 "of a disk.")] 
-
-class Solaris_LogicalDisk : CIM_StorageVolume 
-{
-};
-
-
-//=============================================================================
-// Title: Solaris_PhysicalMedia
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_PhysicalMedia MOF Class definition
-//=============================================================================
-
-     [Version("1.3.0"),
-      Abstract,
-      Description(
-	"The PhysicalMedia class represents any type of documentation"
-     	"or storage medium, such as tapes, CDROMs, etc. This class"
-     	"is typically used to locate and manage Removable Media"
-     	"(versus Media sealed with the MediaAccessDevice, as a single"
-     	"Package, as is the case with hard disks). However, 'sealed'"
-     	"Media can also be modeled using this class, where the Media"
-     	"would then be associated with the PhysicalPackage using the"
-     	"PackagedComponent relationship.")]
-class Solaris_PhysicalMedia : CIM_PhysicalMedia 
-{
-};
-
-//=============================================================================
-// Title: Solaris_Disk
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_Disk MOF Class definition
-//=============================================================================
-
-    [Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description("Provides information about the physical characteristics"
-                 "of a disk.")]
-class Solaris_Disk : Solaris_PhysicalMedia 
-{
-
-    [Description ("Create partitions on this disk.")]
-    boolean createPartitions([IN] uint32 diskParameters[]);
-
-    [Description ("Create fdisk partitions on this disk.")]
-    boolean createFDiskPartitions([IN] uint32 diskParameters[]);
-
-    [Description ("Change the label on this disk.")]
-    boolean labelDisk([IN] string newLabel);
-
-    [Description ("Returns the geometry information with regard to this"
-     "disk.")]
-    boolean getDiskGeometry([IN] string diskName, [OUT, IN(False)] uint32 geometry[]);
-};
-
-//=============================================================================
-// Title: Solaris_PhysicalPackage
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_PhysicalPackage MOF Class definition
-//=============================================================================
-
-    [Version("1.3.0"),
-     Description (
-      "This class represents the package that realizes the Solaris"
-      "logical devices.This class does not have a provider,rather it relies on"
-      "the user to provide instances of this class. Physical package"
-      "characteristics are not generally available via Solaris, so the"
-      "user will have to manually input the instances of these.")]
-class Solaris_PhysicalPackage : CIM_PhysicalPackage
-{
-};
-
-//=============================================================================
-// Title: Solaris_RealizesExtent
-// Version: 1.3.0
-// Date: 02/12/02
-// Description: Solaris_RealizesExtent MOF Class definition
-//=============================================================================
-
-    [Association,
-     Version("1.3.0"),
-     Provider ("jni:libWBEMdisk.so"),
-     Description("A logical disk is realized by a physical disk. This" 
-     "association models this relationship, specifically the relationship"
-     "between the Solaris_Disk and the Solaris_LogicalDisk.")]
-class Solaris_RealizesExtent : CIM_RealizesExtent 
-{
-    [Override ("Antecedent"), Key, 
-     Description(
-      "The physical disk which realizes the logical disk")]
-     Solaris_Disk REF Antecedent;
-
-    [Override ("Dependent"), Key, 
-     Description(
-      "The logical representation of the physical disk")]
-     Solaris_LogicalDisk REF Dependent; 
-};
-
-//=============================================================================
-// Title: Solaris_RealizesDiskPartition
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_RealizesDiskPartition MOF Class definition
-//=============================================================================
-
-    [Association,
-     Version("1.3.0"),
-     Provider ("jni:libWBEMdisk.so"),
-     Description("Disk partitions are directly realized on physical media."
-      "This is used to model the creation of partitions on a raw SCSI or"
-      "IDE drive, Solaris_PhysicalDisk")]
-class Solaris_RealizesDiskPartition: CIM_RealizesDiskPartition
-{
-   [Override ("Antecedent"), Key,
-    Description (
-    "The physical media on which the partition is realized."),
-    Max (1)]
-   Solaris_Disk REF Antecedent;
-
-   [Override ("Dependent"), Key,
-    Description (
-    "The disk partition that is located on the media.")]
-   Solaris_DiskPartition REF Dependent;
-};
-
-//=============================================================================
-// Title: Solaris_RealizesDiskDrive
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_RealizesDiskDrive MOF Class definition
-//=============================================================================
-
-    [Association,
-     Version("1.3.0"),
-     Provider ("jni:libWBEMdisk.so"),
-     Description("Disk drives are realized by physical packages."
-     "This is used to model the realization of a Solaris_DiskDrive by"
-     "Solaris_PhysicalPackage. If the user has not input instances"
-     "of Solaris_PhysicalPackage no values will be returned on enumeration."
-     "Additionally, no create, modify or delete operations are allowed.")]
-class Solaris_RealizesDiskDrive: CIM_Realizes
-{
-   [Override ("Antecedent"), Key,
-    Description (
-    "The physical package that implements the logical device.")]
-   Solaris_PhysicalPackage REF Antecedent;
-
-   [Override ("Dependent"), Key,
-    Description (
-    "The logical device .") ]
-   Solaris_DiskDrive REF Dependent;
-};
-
-//=============================================================================
-// Title: Solaris_DiskPartitionBasedOnDisk
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_DiskPartitionBasedOnDisk MOF Class definition
-//=============================================================================
-
-    [Association,
-     Version("1.3.0"),
-     Provider ("jni:libWBEMdisk.so"),
-     Description("A disk partition in Solaris can be based on either"
-     "a disk or an fdisk. This association models the relationship of"
-     "Solaris disk partition with its underlying disk(not fDisk)")]
-class Solaris_DiskPartitionBasedOnDisk: CIM_DiskPartitionBasedOnVolume
-{
-   [Override ("Antecedent"), Key,
-    Description (
-    "The lower level StorageExtent.") ]
-   Solaris_LogicalDisk REF Antecedent;
-
-  [Override ("Dependent"), Key, 
-   Description (
-   "The higher level StorageExtent.") ]
-   Solaris_DiskPartition REF Dependent;
-};
-
-
-//=============================================================================
-// Title: Solaris_DiskPartitionBasedOnFDisk
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_DiskPartitionBasedOnFDisk MOF Class definition
-//=============================================================================
-
-    [Association,
-     Version("1.3.0"),
-     Provider ("jni:libWBEMdisk.so"),
-     Description("A disk partition in Solaris can be based on either"
-     "a disk or an fdisk. This association models the relationship of"
-     "Solaris disk partition with its underlying fdisk")]
-class Solaris_DiskPartitionBasedOnFDisk: CIM_BasedOn
-{
-   [Override ("Antecedent"), Key, 
-    Description (
-    "The lower level StorageExtent. The Fdisk partition")]
-   Solaris_DiskPartition REF Antecedent;
-
-   [Override ("Dependent"), Key,
-    Description (
-    "The higher level StorageExtent. The Solaris disk partition")]
-   Solaris_DiskPartition REF Dependent;
-};
-
-//=============================================================================
-// Title: Solaris_SCSIController
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_SCSIController MOF Class definition
-//=============================================================================
-
-    [Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-      "Provides data with regard to the capabilities and management"
-      "of a SCSI controller under Solaris.")]
-class Solaris_SCSIController : CIM_SCSIController 
-{
-};
-
-//=============================================================================
-// Title: Solaris_IDEController
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_IDEController MOF Class definition
-//=============================================================================
-
-    [Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-      "Provides data with regard to the capabilities and management"
-      "of a SCSI controller under Solaris.")]
-class Solaris_IDEController : CIM_IDEController 
-{
-};
-
-//=============================================================================
-// Title: Solaris_MPXIOController
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_MPXIOController MOF Class definition
-//=============================================================================
-
-    [Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-      "Provides data with regard to the capabilities and management"
-      "of a MPXIO controller under Solaris.")]
-class Solaris_MPXIOController : CIM_Controller 
-{
-};
-
-//=============================================================================
-// Title: Solaris_USBSCSIController
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_USBSCSIController MOF Class definition
-//=============================================================================
-
-    [Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-      "Provides data with regard to the capabilities and management"
-      "of a USB SCSI controller under Solaris.")]
-class Solaris_USBSCSIController : Solaris_SCSIController 
-{
-};
-
-//=============================================================================
-// Title: Solaris_GenericController
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_GenericController MOF Class definition
-//=============================================================================
-
-    [Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-      "Provides data with regard to the capabilities and management"
-      "of 'unknown' controllers under Solaris.")]
-class Solaris_GenericController : CIM_Controller 
-{
-};
-
-//=============================================================================
-// Title: Solaris_SCSIInterface
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_SCSIInterface MOF Class definition
-//=============================================================================
-
-    [Association,
-     Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-      "The ControlledBy relationship indicating which devices"
-      "are accessed through a SCSIController, along with the characteristics"
-      "of this access.")]
-class Solaris_SCSIInterface : CIM_SCSIInterface 
-{
-};
-
-//=============================================================================
-// Title: Solaris_MPXIOInterface
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_MPXIOInterface MOF Class definition
-//=============================================================================
-
-    [Association,
-     Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-      "MPXIOInterface is a ControlledBy relationship indicating"
-      "which devices are accessed through the MPXIOController and the"
-      "the characteristics of this access.")]
-class Solaris_MPXIOInterface : CIM_ControlledBy 
-{
-};
-
-//=============================================================================
-// Title: Solaris_IDEInterface
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_IDEInterface MOF Class definition
-//=============================================================================
-
-    [Association,
-     Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-      "IDEInterface is a ControlledBy relationship indicating"
-      "which devices are accessed through the IDEController and the"
-      "the characteristics of this access.")]
-class Solaris_IDEInterface : CIM_ControlledBy 
-{
-};
-
-//=============================================================================
-// Title: Solaris_ExtraCapacityGroup
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_ExtraCapacityGroup MOF Class definition
-//=============================================================================
-
-    [Version("1.3.0"),
-     Abstract,
-     Description(
-	"A class that indicates that the aggregated elements have more"
-	"capacity or capability than is needed.")]
-
-class Solaris_ExtraCapacityGroup : CIM_ExtraCapacityGroup 
-{
-};
-
-//=============================================================================
-// Title: Solaris_MPXIOGroup
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_MPXIOGroup MOF Class definition
-//=============================================================================
-
-    [Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-	"A class that indicates that the aggregated elements have more"
-	"capacity or capability than is needed. Specifically, this"
-        "class addresses the controllers that make up the MPXIO "
-	"controller functionality.")]
-
-class Solaris_MPXIOGroup : Solaris_ExtraCapacityGroup 
-{
-};
-
-//=============================================================================
-// Title: Solaris_ControllerLogicalIdentity
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_ControllerLogicalIdentity MOF Class definition
-//=============================================================================
-
-    [Association,
-     Abstract,
-     Version("1.3.0"),
-     Description(
-	"This association represents the different aspects of the "
-	"the same controller.")] 
-class Solaris_ControllerLogicalIdentity : CIM_LogicalIdentity 
-{
-};
-
-//=============================================================================
-// Title: Solaris_MPXIOCtrlrLogicalIdentity
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_MPXIOCtrlrLogicalIdentity MOF Class definition
-//=============================================================================
-
-    [Association,
-     Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-	"This association represents the different aspects of the "
-	"the same MPXIO controller. Specifically, the ExtraCapacityGroup"
-	"view of the MPXIO Controller.")] 
-class Solaris_MPXIOCtrlrLogicalIdentity : Solaris_ControllerLogicalIdentity 
-{
-    [Override ("SystemElement"), Key,
-     Description(
-      "Represents the mpxio aspect of the controller.")]
-     Solaris_MPXIOController REF SystemElement;
-
-    [Override ("SameElement"), Key,
-     Description(
-      "Represents the other logical aspect of the mpxio controller.")]
-    Solaris_MPXIOGroup REF SameElement;  
-};
-
-
-
-//=============================================================================
-// Title: Solaris_ControllerComponent
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_ControllerComponent MOF Class definition
-//=============================================================================
-
-    [Association, Aggregation,
-     Abstract,
-     Version("1.3.0"),
-     Description(
-	"A redundancy group aggregates managed system elements, and"
-	"indicates that these elements provide redundancy.")]
-class Solaris_ControllerComponent : CIM_RedundancyComponent 
-{
-};
-
-
-//=============================================================================
-// Title: Solaris_MPXIOComponent
-// Version: 1.3.0
-// Date: 2/12/02
-// Description: Solaris_MPXIOComponent MOF Class definition
-//=============================================================================
-
-    [Association, Aggregation,
-     Provider ("jni:libWBEMdisk.so"),
-     Version("1.3.0"),
-     Description(
-	"A redundancy group aggregates managed system elements, and"
-	"indicates that these elements provide redundancy. Specifically"
-	"this class represents the physical controllers that are"
-	"a part of the scsi_vhci controller group.")]
-class Solaris_MPXIOComponent : Solaris_ControllerComponent 
-{
-      [Override ("GroupComponent"), Aggregate, Key,
-       Description (
-	"This grouping is an extra capacity group.")] 
-     Solaris_MPXIOGroup REF GroupComponent;
-
-      [Override ("PartComponent"), Key,
-       Description (
-	"Parts can only be a controller type.")] 
-     CIM_Controller REF PartComponent;
-};
-
-
-//=============================================================================
-// Title: Solaris_StorageLibrary
-// Version: 0.0.9
-// Date: 2/12/02
-// Description: Solaris_StorageLibrary MOF Class definition
-//=============================================================================
-
-    [Version("0.0.9"),
-     Experimental,
-     Description (
-     "A StorageLibrary is a collection of ManagedSystemElements "
-     "that operate together to provide cartridge library "
-     "capabilities. This object serves as an aggregation point to "
-     "group the following elements: MediaTransferDevices, a Label"
-     "Reader, a library Door, MediaAccessDevices, and other "
-     "Library components.") ]
-
-class Solaris_StorageLibrary : CIM_StorageLibrary
-{
-};
--- a/usr/src/cmd/wbem/provider/c/mof/Solaris_NFS1.0.mof	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1229 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- * Title       Solaris Network File System (NFS) MOF specification 1.3
- * Description Solaris Network File System model.
- * Date        03/21/2003
- * Version     1.3
- * Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma namespace("root/cimv2")
-#pragma Locale ("en_US")
-
-// ===================================================================
-//   Objects
-// ===================================================================
-
-#pragma namespace("__create")
-
-[Provider("jni:libWBEMnfs.so"),
- Version("1.3.0"),
- Description (
-     "A class that represents a local NFS shared object on the "
-     "server side that is made accessible to other systems.")
-]
-class Solaris_NFSShare : CIM_NFSShare
-{
-    [Description("If set to true: maximal  access  is  given  to all "
-    		 "clients. Valid for NFS version 2 only.  Corresponds "
-                 "to the 'aclok' share_nfs option (Solaris 9)."),
-     ModelCorrespondence{"Solaris_NFSMount.Version"}]
-    boolean AllowAccessControl = false;
-    		 
-    [Description("Sets the the effective user ID of unknown users. By "
-		 "default, unknown users are given the effective user "
-		 "ID UID_NOBODY. UID_NOBODY is usually set to 60001 but "
-		 "because an administrator can change this we don't set "
-		 "it to this by default.  Corresponds to the "
-		 "'anon=' share_nfs option (Solaris 9)."),
-     Required,
-     Units("Bytes")]
-    Uint32 EffectiveUID;
-    
-    [Description("If set to true: causes  the  server  file system to "
-                 "silently ignore any attempt to  enable the setuid or "
-                 "setgid mode bits.  Corresponds to the 'nosuid' "
-                 "share_nfs option (Solaris 9).")]
-    boolean IgnoreSetId = false;
-    
-    [Description("Enables NFS server logging for the specified file "
-                 "system. The optional tag determines the location of "
-                 "the related log files. The tag is defined in "
-                 "etc/nfs/nfslog.conf. The default value is the global "
-                 "tag.  The log file tag is only applicable when logging is "
-                 "turned on.  Corresponds to the 'log=' share_nfs option "
-                 "(Solaris 9)."),
-     MappingStrings{"SOLARIS9.SUN|/etc/nfs/nfslog.conf"}]
-    String LogFileTag;
-
-    [Description("If set to true: the share is to be persistent across "
-    		 "reboots.")]
-    boolean Persistent = false;
-    
-    [Description(
-        "A value of true prevents clients from mounting subdirectories "
-        "of shared directories.  Corresponds to the 'nosub' share_nfs "
-        "option (Solaris 9).")]
-    boolean PreventSubDirMount = false;
-    
-    [Description("If set to true: the public file handle is moved from "
-                 "root (/) to the exported directory.  Corresponds to "
-                 "the 'public' share_nfs option (Solaris 9).")]
-    boolean Public = false;
-    
-    [Description("This attribute is only used upon creation of a share.  "
-    		 "Security information should be retrieved from "
-    		 "Solaris_NFSShareSecurity and Solaris_NFSShareSecurityModes."
-    		 "This attribute stores the security options for a share.  "
-    		 "Each element of the array is a string starting with "
-    		 "sec=<mode> and including all options, such as access lists, "
-    		 "pertaining to that security mode.")]
-    String SecurityOptions[];
-    
-    [Description("A string of share options for the shared file system as found"
-    		 "in /etc/dfs/sharetab.")]
-    String ShareOptions;
-    
-    [Description("An attribute that is only used at the time of creation of "
-    		 "a Solaris_NFSShare instance.  If it is set to true, the "
-    		 "the NFS server daemons (nfsd and mountd) will be started "
-    		 "with the default settings, if and only if, nfsd and mountd "
-    		 "aren't already running on the host.  The daemons will NOT "
-    		 "be stopped and restarted.  As a side effect of starting the "
-    		 "NFS server daemons the share being created will be placed "
-    		 "as an entry in /etc/dfs/dfstab since the starting of the "
-    		 "daemon relies on entries here."),
-      MappingStrings{"SOLARIS9.SUN|/etc/init.d/nfs.server start"}]
-     boolean StartDaemons = false;
-};
-
-[Provider(
-     "jni:libWBEMnfs.so"),
- Version("1.3.0"),
- Description (
-     "A class used to represent the NFS share security mode and "
-     "associated options for a Solaris_NFSShare object.")
-]
-class Solaris_NFSShareSecurity : CIM_Setting
-{
-
-    [Description("Sets the maximum life time (in seconds) of the "
-                 "RPC request's credential, that the NFS server "
-                 "will allow. Valid for NFS sec mode of diffie "
-                 "helman (dh) only.  Corresponds to the 'window=' "
-                 "share_nfs option (Solaris 9)."
-                 "If the security mode is not Diffie Helman, this "
-                 "property will not be set."),
-        ModelCorrespondence{"Solaris_NFSShareSecurity.Mode"},
-        Units("seconds")]
-    uint32 MaxLife = 30000;
-    
-    [Key,
-    Description (
-        "Security mode used. Can be either sys, dh, krb5, krb5i, "
-        "krb5p.  Unknown and other default to the default security "
-        "mode of AUTH_SYS (sys).  Corresponds to the 'sec=' share_nfs "
-        "option (Solaris 9)."),
-      Required,
-      ValueMap {"Unknown", "Other", "sys", "dh", "krb5", "krb5i", "krb5p"}]
-    String Mode;
-
-    [Description (
-        "If true: Access will be read-only for all clients in this "
-        "security mode. else: access will be read-write.  Corresponds "
-        "to the 'ro' share_nfs option (Solaris 9).")]
-    boolean ReadOnly;
-
-    [Description (
-        "The list of clients whose access will be read-only. "
-        "Corresponds to the 'ro=' share_nfs option (Solaris 9).")]
-    string ReadOnlyList[];
-    
-    [Description (
-        "The list of clients whose access will be read-write. "
-        "Corresponds to the 'rw=' share_nfs option (Solaris 9).")]
-    string ReadWriteList[];
-
-    [Description (
-        "The list of hosts with root access. Only root users from the "
-        "hosts specified will have root access.  Corresponds to the "
-        "'root=' share_nfs option (Solaris 9).")]
-    string RootServers[];
-    
-    [Override("SettingId"),
-     Key,
-     Description("The path name of the share."),
-     Required]
-    String SettingId;
-};
-
-#pragma namespace("__modify")
-
-[Provider(
-     "jni:libWBEMnfs.so"),
- Version("1.3.0"),
- Description (
-     "The options used to mount a Solaris NFS file system.")]
-class Solaris_NFS : CIM_NFS
-{
-    [Deprecated {
-        "This is not replaced with anything.  Global doesn't apply to NFS file "
-        "system mounts."},
-     Description("If set to true: the filesystem is mounted 'globally' on all "
-                 "nodes of a cluster. "
-                 "If set to false (default): the filesystem is not mounted on "
-                 "all nodes of a cluster. "
-                 "Ignored for non-clustered systems.")]
-    boolean Global = false;
-    
-    [Deprecated {
-        "Solaris_NFSMount.GroupId"},
-     Description("If set to true: use BSD style group id semantics. "
-                 "If set to false (default): use System V style group "
-                 "id semantics.")]
-    boolean GrpId = false;
-
-//    [Override("Name"),
-//     Description("The Name property is populated with the following string:  "
-//     		 "resource:=<resource> devid:=<devid>  "
-//     		 "Upon creation of an instance of Solaris_NFS, Name must be "
-//     		 "populated with just the file system resource "
-//     		 "(ex: /dev/dsk/c0t0d0s6 or pogo:/export) since the devid/file "
-//     		 "system id is not yet known.")]
-//    string Name;
-    
-    [Deprecated {
-        "Solaris_Mount.NoMnttabEntry"},
-     Description("If set to true: the mount entry is not added to /etc/mnttab. "
-                 " If set to false (default): the mount is recorded in "
-                 "/etc/mnttab.")]
-    boolean NoMnttabEntry = false;
-
-    [Deprecated {
-        "Solaris_Mount.NoSuid"},
-     Description("If set to true: don't allow allow setuid execution. "
-                "If set to false (default): allow setuid execution.")]
-    boolean NoSuid = false;
-
-    [Deprecated {
-        "Solaris_Mount.Overlay"},
-     Description("If set to true: the file system is mounted over an existing "
-                 "mounted filesystem.  "
-                 "If set to false (default): the filesystem is not mounted over "
-                 "an existing mounted filesystem.")]
-    boolean Overlay = false;
-
-    [Deprecated {
-        "Solaris_NFSMount.Posix"},
-     Description("If set to true: use POSIX.1 semantics for filesystem. "
-                 "If set to false (default): do not use POSIX.1 semantics.")]
-    boolean Posix = false;
-
-    [Deprecated {
-        "Solaris_NFSMount.Protocol"},
-     Description("A string specifying the transport protocol used for the "
-                 "NFS mount. It is the value of the network_id field from "
-                 "/etc/netconfig.")]
-    String Proto;
-
-    [Deprecated {
-        "Solaris_NFSMount.Public"},
-     Description("If set to true: use the public file handle. "
-                 "If set to false (default): do not use the public "
-                 "file handle.")]
-    boolean Public = false;
-
-    [Deprecated {
-        "Solaris_NFSMount.EnableQuotaChecking"},
-     Description("If set to true: enable quota checking. "
-                 "If set to false (default): disable quota checking.")]
-    boolean Quota = false;
-
-    [Deprecated {
-        "The same effect can be achieved by setting Solaris_Mount.ReadOnly "
-        "to false which resets the mount option to read-write. Then remount "
-        "the filesystem."},
-     Description("If set to true: remount a read-only file system with "
-		 "read-write options. "
-		 "If set to false (default): the filsystem is mounted with "
-	         "the specified mount options.")]
-    boolean Remount = false;
-    
-    [Deprecated {
-    	"Solaris_NFSMount.SecurityMode"},
-     Description("A string describing the security mode for NFS transactions. "
-                 "Available modes is listed in /etc/nfssec.conf.")]
-    String SecurityMode;    
-
-    [Deprecated {
-        "Calculate from CIM_FileSystem.FileSystemSize and "
-        "CIM_FileSystem.AvailableSpace.  "
-        "UsedSpace = CIM_FileSystem.FileSystemSize - "
-        "CIM_FileSystem.AvailableSpace. "
-        "Note: CIM_FileSystem.AvailableSpace now contains "
-        "the correct value with respect to the space "
-        "reserved only for superuser."},
-     Description("Indicates the total amount of used space on the "
-        	 "File System in bytes. Note that this is not the "
-        	 "FileSystemSize minus AvailableSpace due to the space "
-        	 "reserved only for superuser."),
-     Units("Bytes")]
-    uint64 UsedSpace;
-    
-    [Deprecated {
-        "Solaris_NFSMount.Version"},
-     Description ("Version number of NFS protocol to use."),
-     ValueMap {"2", "3", "4", "highest"}]
-    String Version = "highest";
-
-    // Methods
-    [Deprecated {
-        "Solaris_NFSMount.getNetCfgList"},
-     Description("Method to obtain the list of network IDs from "
-                 "the /etc/netconfig file.")]
-    sint32 getNetCfgList([OUT, IN(false)]string ids[]);
-
-    [Deprecated {
-        "Solaris_NFSMount.getNfsSecList"},
-     Description("Method to obtain the list of nfs security modes from "
-                 "the /etc/nfssec.conf file.")]
-    sint32 getNfsSecList([OUT, IN(false)]string secmodes[]);
-
-    [Deprecated {
-        "Solaris_NFSMount.getDefaultNfsSecMode"},
-     Description("Method to obtain the the default nfs security mode from "
-                 "the /etc/nfssec.conf file.")]
-    sint32 getDefaultNfsSecMode([OUT, IN(false)]string secmode);
-};
-
-#pragma namespace("__create")
-
-[Provider(
-     "jni:libWBEMnfs.so"),
- Version("1.3.0"),
- Description (
-     "This class represents a share that is to be persistent across reboots.  "
-     "There is a possiblity depending on the persistance mechanism "
-     "(ex: /etc/dfs/dfstab) that there are multiple shares that are to be "
-     "persistent which have the same path.  If this occurs, a Key Not Unique "
-     "type of error will be set when calling intrinsic methods getInstance, "
-     "deleteInstance, addInstance and editInstance and no instance will be "
-     "returned.")]
-class Solaris_PersistentShare : CIM_SystemSetting
-{
-
-    [Description(
-         "String representing the share command entry in /etc/dfs/dfstab.")]
-    String Command;
-
-    [Override ("SettingID"),
-     Description("The path of the persistent share.")]
-    string SettingID;
-  
-    //Methods
-    [Description("Method to be used to clear up conflicts in the "
-     	"/etc/dfs/dfstab file.  Conflicts are defined as any entries that have "
-     	"the same path to be shared.  All entries with the same path as passed "
-     	"in with the <path> parameter will be deleted.  The method returns 1 "
-     	"if it succeded, 0 if a failure occurred.")]
-    sint32 deleteAllWithDuplicatePath([IN]String path);
-};
-
-[Experimental,
- Version("1.3.0"),
- Description("The Solaris_MountSetting object contains attributes that "
-             "are commonly used to configure a file system mount on a "
-             "Solaris system.  Attributes which have the potential of "
-             "operating at a different value than what was configured "
-             "will also be on the Solaris_Mount object.")]
-class Solaris_MountSetting : CIM_SettingData {
-
-    [Description ("The underlying file system type the mount is to be "
-                  "configured for."),
-     ValueMap {"Unknown", "Other", "ufs", "nfs", "hsfs", "cachefs", "pcfs", 
-             "procfs", "tmpfs", "VxFS", "SAMQFS", "devfs", "udfs", "sockfs",
-             "autofs", "specfs", "fifofs"},
-     ModelCorrespondence {"CIM_FileSystem.FileSystemType"},
-     MappingStrings {"SOLARIS9.SUN|mount -F <FStype>"}]
-    string FsType;      
-
-    [Description ("A string of file system mount options specified when "
-                  "mounting the file system.  This property is also present on "
-                  "the Solaris_Mount class.  The Solaris_Mount.MountOptions "
-                  "property represents the actual operational value of the "
-                  "mount options string as reported in /etc/mnttab.  "
-                  "Therefore, the properties may have different values."),
-     MappingStrings {"SOLARIS9.SUN|mount -o <mount options, comma delimited>"}]
-    string MountOptions;
-         
-    [Description("If set to true: the mount entry is added to /etc/mnttab."
-                 "If set to false (default): the mount is not recorded in "
-                 "/etc/mnttab."),
-     MappingStrings {"SOLARIS9.SUN|mount -m"}]
-    boolean NoMnttabEntry = false;
-    
-    [Description("If set to true: don't allow allow setuid execution.  "
-                 "If set to false (default): allow setuid execution."),
-     MappingStrings {"SOLARIS9.SUN|mount -o suid | nosuid"}]
-    boolean NoSuid = false;
-         
-    [Description("If set to true: the filesystem is mounted over an "
-                 "existing mounted filesystem.  If set to false (default): "
-                 " the filesystem is not mounted over an existing mounted "
-                 "filesystem."),
-     MappingStrings {"SOLARIS9.SUN|mount -O"}]
-    boolean Overlay = false;    
-  
-    [Description("If set to true: the filesystem is mounted as a read only "
-                 "filesystem.  If set to false (default): the "
-                 "filesystem is mounted as a read/write "
-                 "filesystem."),
-     MappingStrings {"SOLARIS9.SUN|mount -o rw | ro"}]
-    boolean ReadOnly = false;
-    
-    [Description("If set to true, the file system will have a corresponding "
-                 "device to mount/mount point entry in /etc/vfstab.  This "
-                 "property is also present on the Solaris_Mount class.  The "
-                 "Solaris_Mount.VfstabEntry property represents the actual "
-                 "operational value of whether or not the mount has and entry "
-                 "in /etc/vfstab.  Therefore, the properties may have "
-                 "different values."),
-     MappingStrings {"SOLARIS9.SUN|vfstab"}]
-     
-    boolean VfstabEntry;
-
-};
-
-[Experimental,
- Version("1.3.0"),
- Description ("The Solaris_NFSMountSetting object contains attributes "
-              "that are commonly used to configure an NFS mount "
-              "on a Solaris system.  Attributes which have the "
-              "potential of operating at a different value than what "
-              "was configured will also be on the Solaris_NFSMount object.") ]
-class Solaris_NFSMountSetting : Solaris_MountSetting
-{
-
-    [Description (
-        "If set to true, allow data and attribute caching.  If set to "
-        "false, suppress data and attribute caching.  Corresponds to "
-        "the 'noac' mount_nfs option (Solaris 9).") ]
-    boolean AttributeCaching = true;
-
-    [Description (
-        "Maximum number of seconds that cached attributes are held "
-        "after directory update.  Corresponds to the 'acdirmax=' "
-        "mount_nfs option (Solaris 9)."),
-       Units("Seconds") ]
-    uint16 AttributeCachingForDirectoriesMax = 60;
-
-    [Description (
-        "Minimum number of seconds that cached attributes are held "
-        "after directory update.  Corresponds to the 'acdirmin=' "
-        "mount_nfs option (Solaris 9)."),
-       Units("Seconds") ]
-    uint16 AttributeCachingForDirectoriesMin = 30;
-
-    [Description (
-        "Maximum number of seconds that cached attributes are held "
-        "after file modification.  Corresponds to the 'acregmax=' "
-        "mount_nfs option (Solaris 9)."),
-       Units("Seconds") ]
-    uint16 AttributeCachingForRegularFilesMax = 60;
-
-    [Description (
-        "Minimum number of seconds that cached attributes are held "
-        "after file modification.  Corresponds to the 'acregmin=' "
-        "mount_nfs option (Solaris 9)."),
-       Units("Seconds") ]
-    uint16 AttributeCachingForRegularFilesMin = 3;
-
-    [Description("If set to true: enable quota checking.  If set to "
-                 "false (default): disable quota checking. "
-                 "Corresponds to the 'quota/noquota' mount_nfs "
-                 "options (Solaris 9).")]
-    boolean EnableQuotaChecking = false;
-
-    [Description (
-        "The list of resources to be used for failover. Each "
-        "resource must be of the form host:/pathname, NFS URL or a "
-        "list of hosts, if the exported directory name is the same.")]
-    string FailoverList[];
-    
-    [Description("If true, data is transferred directly between "
-                 "client and server, with no buffering on the client. "
-                 "If false: Data is buffered on the client. "
-                 "The default is false.  Corresponds to the "
-                 "'forcedirectio/noforcedirectio' mount_nfs options "
-                 "(Solaris 9).")]
-    boolean ForceDirectIO = false;
-    
-    [Description("If set to true: use BSD style group id semantics. "
-                 "If set to false (default): use System V style group "
-                 "id semantics.  Corresponds to the 'grpid' mount_nfs "
-                 "option (Solaris 9).")]
-    boolean GroupId = false;
-    
-    [Description (
-        "If set to true, once the FileSystem is mounted, NFS requests "
-        "are retried until the hosting System responds.  "
-        "If set to false, once the FileSystem is mounted, an error "
-        "is returned if the hosting System does not respond. "
-        "Corresponds to the 'hard/soft' mount_nfs options (Solaris 9).")]
-    boolean HardMount = true;
-
-    [Description (
-        "If set to true, keyboard interrupts are permitted to kill a "
-        "process that is hung while waiting for a response on a hard- "
-        "mounted file system.  If set to false, keyboard interrupts "
-        "are ignored.  Corresponds to the 'intr/nointr' mount_nfs "
-        "options (Solaris 9).") ]
-    boolean Interrupt = true;
-
-    [Description ("Maximum number of NFS retransmissions allowed. "
-        "Corresponds to the 'retrans=' mount_nfs option (Solaris 9).") ]
-    uint16 MaxRetransmissionAttempts = 5;
-
-    [Description ("Maximum number of mount failure retries allowed.  The "
-    	"default for the mount command is 10000.  The default for the "
-    	"automounter is 0.  "
-        "Corresponds to the 'retry=' mount_nfs option (Solaris 9).  "
-        "This value is only valid upon creation of an instance of "
-	"instance of Solaris_NFSMount.  This is actually a mount _process_ "
-	"option and not a mount option.") ]
-    uint16 MountFailureRetries;
-
-    [Description("If true, do not perform the normal close-to-open "
-                 "consistency. The client will not perform the flush "
-                 "on close and the request for validation, allowing "
-                 "the possiblity of differences among copies of the "
-                 "same file as stored on multiple clients.  This can "
-                 "be used where it can be guaranteed that accesses to "
-                 "a specified file system will be made from only one "
-                 "client and only that client.  The default is false. "
-                 "Corresponds to the 'nocto' mount_nfs option (Solaris 9).")]
-    boolean NoCloseToOpenConsistency = false;
-
-    [Description("If set to true: use POSIX.1 semantics for filesystem. "
-                 "If set to false (default): do not use POSIX.1 "
-                 "semantics.  Corresponds to the 'posix' mount_nfs "
-                 "option (Solaris 9).")]
-    boolean Posix = false;
-
-    [Description("A string specifying the transport protocol used for the "
-                 "NFS mount. It is the value of the network_id field from "
-                 "/etc/netconfig.  Corresponds to the 'proto=' "
-                 "mount_nfs option (Solaris 9)."),
-     MappingStrings{"SOLARIS9.SUN|/etc/netconfig"} ]
-    String Protocol;
-
-    [Description("If set to true: use the public file handle. "
-                 "If set to false (default): do not use the public "
-                 "file handle.  Corresponds to the 'public' mount_nfs "
-                 "option (Solaris 9).")]
-    boolean Public = false;
-
-    [Description ("Read buffer size in bytes.  The default is 32768 for "
-    	"version 3 and 8192 for version 2.  Corresponds to the "
-        "'rsize=' mount_nfs option (Solaris 9)."),
-       Units("Bytes") ]
-    uint64 ReadBufferSize;
-
-    [Description ("NFS timeout in tenths of a second.  The default is 11 "
-    	"tenths of a second for connectionless transports and 600 "
-    	"tenths of a second for connection oriented transports.  "
-    	"Corresponds to the 'timeo=' mount_nfs option (Solaris 9)."),
-       Units ("Tenths of Seconds") ]
-    uint32 RetransmissionTimeout;
-
-    [Description (
-        "If set to true, if the first mount attempt fails, retries are "
-        "performed in the foreground.  If set to false, retries are "
-        "performed in the background.  Corresponds to the 'bg/fg' "
-        "mount_nfs options (Solaris 9).  "
-        "This value is only valid upon creation of an instance of "
-	"instance of Solaris_NFSMount.  This is actually a mount _process_ "
-	"option and not a mount option.") ]
-    boolean RetryInForeground = true;
-
-    [Description("A string describing the security mode for NFS transactions. "
-                 "Available modes is listed in /etc/nfssec.conf. "
-                 "Corresponds to the 'sec=' mount_nfs option (Solaris 9)."),
-     MappingStrings{"SOLARIS9.SUN|/etc/nfssec.conf"} ]
-    String SecurityMode;
-
-    [Description (
-        "The NFS Server IP port number.  Default is NFS_PORT which is defined "
-        "in /usr/include/nfs/nfs.h.  Corresponds to the 'port=' mount_nfs "
-        "option (Solaris 9).") ]
-    uint32 ServerCommunicationPort;
-
-    [Description("The name of the NFS server.")]
-    String ServerName;
-
-    [Description("The path of the NFS resource on the server.")]
-    String ServerPath;
-
-    [Description (
-        "Version number of NFS protocol to use.  Corresponds to the "
-        "'vers=' mount_nfs option (Solaris 9)."),
-     ValueMap {"2", "3", "4", "highest"} ]
-    String Version = "highest";
-
-    [Description ("Write buffer size in bytes.  The default is 32768 for "
-    	"version 3 and 8192 for version 2.  Corresponds to the "
-        "'wsize=' mount_nfs option (Solaris 9)."),
-       Units("Bytes") ]
-    uint64 WriteBufferSize;
-
-
-    [Description(
-      "Allows the creation and manipulation of extended attributes. "
-      "Corresponds to the 'xattr/noxattr' mount_nfs options (Solaris 9). ")]
-    boolean Xattr = true;
-};
-
-    [Experimental,
-     Version("1.3.0"),
-     Description("The Solaris_ShareSetting object contains attributes that "
-                 "are commonly used to configure the sharing of a resource "
-                 "on a Solaris system.")]
-class Solaris_ShareSetting : CIM_SettingData {
-};
-
-[Experimental,
- Version("1.3.0"),
- Description (
-     "A class that contains attributes for a local NFS shared object "
-     "on the server side that is made accessible to other systems. "
-     "Attributes which have the potential of operating at a different "
-     "value than what was configured will also be on the Solaris_Mount "
-     "object.")
-]
-class Solaris_NFSShareSetting : Solaris_ShareSetting
-{
-
-    [Description("If set to true: maximal  access  is  given  to all "
-                 "clients. Valid for NFS version 2 only.  Corresponds "
-                 "to the 'aclok' share_nfs option (Solaris 9)."),
-        ModelCorrespondence{"Solaris_NFSMount.Version"}]
-    boolean AllowAccessControl;
-    
-    [Description("Sets the the effective user ID of unknown users. By "
-                 "default, unknown users are given the effective user "
-                 "ID UID_NOBODY. UID_NOBODY is usually set to 60001 but "
-                 "because an administrator can change this we don't set "
-                 "it to this by default.  Corresponds to the "
-                 "'anon=' share_nfs option (Solaris 9)."),
-        Required,
-        Units("Bytes")]
-    Uint32 EffectiveUID;
-    
-    [Description("If set to true: causes  the  server  file system to "
-                 "silently ignore any attempt to  enable the setuid or "
-                 "setgid mode bits.  Corresponds to the 'nosuid' "
-                 "share_nfs option (Solaris 9).")]
-    boolean IgnoreSetId;    
-    
-    [Description("Enables NFS server logging for the specified file "
-                 "system. The optional tag determines the location of "
-                 "the related log files. The tag is defined in "
-                 "etc/nfs/nfslog.conf. The default value is the global "
-                 "tag.  Corresponds to the 'log=' share_nfs option (Solaris 9)."),
-        MappingStrings{"SOLARIS9.SUN|/etc/nfs/nfslog.conf"}]
-    String LogFileTag = "global";
-    
-    [Description("If set to true: the public file handle is moved from "
-                 "root (/) to the exported directory.  Corresponds to "
-                 "the 'public' share_nfs option (Solaris 9).")]
-    boolean Public;
-
-    [Description (
-        "A value of true prevents clients from mounting subdirectories "
-        "of shared directories.  Corresponds to the 'nosub' share_nfs "
-        "option (Solaris 9).")]
-    boolean PreventSubDirMount;
-    
-    [Description("An attribute that is only used at the time of creation of "
-    		 "a NFS Share instance.  If it is set to true, the "
-    		 "the NFS server daemons (nfsd and mountd) will be started "
-    		 "with the default settings, if and only if, nfsd and mountd "
-    		 "aren't already running on the host.  The daemons will NOT "
-    		 "be stopped and restarted.  As a side effect of starting the "
-    		 "NFS server daemons the share being created will be placed "
-    		 "as an entry in /etc/dfs/dfstab since the starting of the "
-    		 "daemon relies on entries here."),
-      MappingStrings{"SOLARIS9.SUN|/etc/init.d/nfs.server start"}]
-     boolean StartDaemons;
-};
-
-
-    [Provider("jni:libWBEMnfs.so"),
-     Version("1.3.0"),
-     Description("A logical element that contains the information necessary "
-     		 "to represent and manage the functionality provided by "
-     		 "shares in Solaris.")]
-     
-class Solaris_ShareService : CIM_Service {
-
-    //Methods
-    [Description("Method which shares all resources listed in the file "
-    		 "specified with the file parameter.   The specified file "
-    		 "should contain a list of share command lines.  "
-    		 "If no file is specified /etc/dfs/dfstab is used.  "
-    		 "Resources may be shared by specific file system types by "
-    		 "specifying the file system type (or types in a comma "
-    		 "delimited list) as input parameter, fstype.  The method "
-    		 "returns 1 if it succeded, 0 if a failure occurred.  "
-    		 "Corresponds to /usr/sbin/shareall (Solaris 9)")]
-    sint32 shareall([IN]String fstype, [IN]String file);
-    
-    [Description("Method which unshares all currently shared resources.  "
-    		 "If a fstype (or fstypes in a comma delimited list) is not "
-    		 "specified in the fstype parameter, all distributed file "
-    		 "system type resources will be unshared.  The method "
-    		 "returns 1 if it succeded, 0 if a failure occurred.  "
-    		 "Corresponds to /usr/sbin/unshareall (Solaris 9)")]
-    sint32 unshareall([IN]String fstype);
-};
-
-
-
-    [Provider("jni:libWBEMnfs.so"),
-     Version("1.3.0"),
-     Description("A logical element that contains the information necessary "
-     		 "to represent and manage the functionality provided by "
-     		 "file system mounts in Solaris.")]
-
-class Solaris_MountService : CIM_Service {
-
-    //Methods
-    [Description("Method which mounts file systems listed in the file system "
-    		 "table as specified with the fstable parameter."
-    		 "The specified file system table (file) must be in the vfstab "
-    		 "format.  If no file system table is specified (an empty "
-    		 "string is passed in) /etc/vfstab is used.  Only the file "
-    		 "systems having the mount at boot field set to yes in the "
-    		 "table will be mounted.  "
-    		 "The fstype parameter can be used to specify the file "
-    		 "system type of the file systems to be mounted.  The "
-    		 "onlyLocalFileSystems and onlyRemoteFileSystems parameters "
-    		 "are mutually exclusive.  If onlyLocalFileSystems is true, "
-    		 "the mountall action will be limited to local file systems.  "
-    		 "If onlyRemoteFileSystems is true, the mountall action will "
-    		 "be limited to remote file system types.  The method "
-    		 "returns 1 if it succeded, 0 if a failure occurred.  "
-    		 "Corresponds to /usr/sbin/mountall (Solaris 9)")]
-    sint32 mountall([IN]String fstype, [IN]Boolean onlyLocalFileSystems,
-    		    [IN]Boolean onlyRemoteFileSystems, [IN]String fstable);
-    
-    [Description("Method used to unmount all file systems except root, /usr, "
-    		 "/var, /var/adm, /var/run, /proc, and /dev/fd.  There is no "
-    		 "guarantee that this function will unmount busy file "
-    		 "systems.  "
-    		 "The fstype parameter can be used to specify the fstype of "
-    		 "the file systems to be unmounted.  The host parameter "
-    		 "can be used to unmount all file systems listed in "
-    		 "/etc/mnttab that are remote-mounted from the host specified."
-    		 "  If onlyLocalFileSystems is true, limit the unmounting to "
-    		 "local file systems.  If onlyRemoteFileSystems is true, the "
-    		 "mounting will be limited to remote file system types.  "
-    		 "If killProcesses is true, a SIGKILL signal is sent to each "
-    		 "process using the file and this spawns kills for those"
-    		 "processes.  If unmountInParallel is true, the umount "
-    		 "operation will be performed in parallel.  "
-    		 "The onlyLocalFileSystems and onlyRemoteFileSystems "
-    		 "parameters are mutually exclusive and cannot be used when "
-    		 "a host is defined.  The fstype and host parameters are also "
-    		 "mutually exclusive.  The method returns 1 if it succeded, 0 "
-    		 "if a failure occurred.  Corresponds to /usr/sbin/umountall "
-    		 "(Solaris 9)")]
-    sint32 unmountall([IN]String fstype,
-    		      [IN]String host, 
-    		      [IN]Boolean onlyLocalFileSystems,
-    		      [IN]Boolean onlyRemoteFileSystems, 
-    		      [IN]Boolean killProcesses, 
-    		      [IN]Boolean umountInParallel);
-};
-
-// ===================================================================
-//   Associations
-// ===================================================================
-#pragma namespace("__modify")
-
-[Association,
- Provider(
-     "jni:libWBEMnfs.so"),
- Version("1.3.0"),
- Description (
-     "An association between a remote directory that can be mounted "
-     "and the NFS mounted file system.") ]
-class Solaris_NFSMount : Solaris_Mount
-{
-   [Description (
-        "If set to true, allow data and attribute caching.  If set to "
-        "false, suppress data and attribute caching.  Corresponds to "
-        "the 'noac' mount_nfs option (Solaris 9).") ]
-    boolean AttributeCaching = true;
-
-    [Description (
-        "Maximum number of seconds that cached attributes are held "
-        "after directory update.  Corresponds to the 'acdirmax=' "
-        "mount_nfs option (Solaris 9)."),
-       Units("Seconds") ]
-    uint16 AttributeCachingForDirectoriesMax = 60;
-
-    [Description (
-        "Minimum number of seconds that cached attributes are held "
-        "after directory update.  Corresponds to the 'acdirmin=' "
-        "mount_nfs option (Solaris 9)."),
-       Units("Seconds") ]
-    uint16 AttributeCachingForDirectoriesMin = 30;
-
-    [Description (
-        "Maximum number of seconds that cached attributes are held "
-        "after file modification.  Corresponds to the 'acregmax=' "
-        "mount_nfs option (Solaris 9)."),
-       Units("Seconds") ]
-    uint16 AttributeCachingForRegularFilesMax = 60;
-
-    [Description (
-        "Minimum number of seconds that cached attributes are held "
-        "after file modification.  Corresponds to the 'acregmin=' "
-        "mount_nfs option (Solaris 9)."),
-       Units("Seconds") ]
-    uint16 AttributeCachingForRegularFilesMin = 3;
-    
-    [Override ("Dependent"),
-     Description ("The file system mounted via NFS. "
-        "It is also referred to as the resource to mount.") ]
-    Solaris_NFS REF Dependent;
-
-    [Description("If set to true: enable quota checking.  If set to "
-                 "false (default): disable quota checking. "
-                 "Corresponds to the 'quota/noquota' mount_nfs "
-                 "options (Solaris 9).")]
-    boolean EnableQuotaChecking = false;
-
-    [Description("If true, data is transferred directly between "
-                 "client and server, with no buffering on the client. "
-                 "If false: Data is buffered on the client. "
-                 "The default is false.  Corresponds to the "
-                 "'forcedirectio/noforcedirectio' mount_nfs options "
-                 "(Solaris 9).")]
-    boolean ForceDirectIO = false;
-
-    [Description (
-        "The list of resources to be used for failover. Each "
-        "resource must be of the form host:/pathname, NFS URL or a "
-        "list of hosts, if the exported directory name is the same.")]
-    string FailoverList[];
-
-    [Description("If set to true: use BSD style group id semantics. "
-                 "If set to false (default): use System V style group "
-                 "id semantics.  Corresponds to the 'grpid' mount_nfs "
-                 "option (Solaris 9).")]
-    boolean GroupId = false;
-
-    [Description (
-        "If set to true, once the FileSystem is mounted, NFS requests "
-        "are retried until the hosting System responds.  "
-        "If set to false, once the FileSystem is mounted, an error "
-        "is returned if the hosting System does not respond. "
-        "Corresponds to the 'hard/soft' mount_nfs options (Solaris 9).")]
-    boolean HardMount = true;
-
-    [Description (
-        "If set to true, keyboard interrupts are permitted to kill a "
-        "process that is hung while waiting for a response on a hard- "
-        "mounted file system.  If set to false, keyboard interrupts "
-        "are ignored.  Corresponds to the 'intr/nointr' mount_nfs "
-        "options (Solaris 9).")]
-    boolean Interrupt = true;
-
-    [Description ("Maximum number of NFS retransmissions allowed. "
-        "Corresponds to the 'retrans=' mount_nfs option (Solaris 9).") ]
-    uint16 MaxRetransmissionAttempts = 5;
-
-    [Description ("Maximum number of mount failure retries allowed.  The "
-    	"default for the mount command is 10000.  The default for the "
-    	"automounter is 0.  "
-        "Corresponds to the 'retry=' mount_nfs option (Solaris 9).  "
-        "This value is only valid upon creation of an instance of "
-	"instance of Solaris_NFSMount.  This is actually a mount _process_ "
-	"option and not a mount option.") ]
-    uint16 MountFailureRetries;
-
-    [Description("If true, do not perform the normal close-to-open "
-                 "consistency. The client will not perform the flush "
-                 "on close and the request for validation, allowing "
-                 "the possiblity of differences among copies of the "
-                 "same file as stored on multiple clients.  This can "
-                 "be used where it can be guaranteed that accesses to "
-                 "a specified file system will be made from only one "
-                 "client and only that client.  The default is false. "
-                 "Corresponds to the 'nocto' mount_nfs option (Solaris 9).")]
-    boolean NoCloseToOpenConsistency = false;
-
-    [Description("If set to true: use POSIX.1 semantics for filesystem. "
-                 "If set to false (default): do not use POSIX.1 "
-                 "semantics.  Corresponds to the 'posix' mount_nfs "
-                 "option (Solaris 9).")]
-    boolean Posix = false;
-
-    [Description("A string specifying the transport protocol used for the "
-                 "NFS mount. It is the value of the network_id field from "
-                 "/etc/netconfig.  Corresponds to the 'proto=' "
-                 "mount_nfs option (Solaris 9)."),
-        MappingStrings{"SOLARIS9.SUN|/etc/netconfig"}]
-    String Protocol;
-
-    [Description("If set to true: use the public file handle. "
-                 "If set to false (default): do not use the public "
-                 "file handle.  Corresponds to the 'public' mount_nfs "
-                 "option (Solaris 9).")]
-    boolean Public = false;
-
-    [Description ("Read buffer size in bytes.  The default is 32768 for "
-    	"version 3 and 8192 for version 2.  Corresponds to the "
-        "'rsize=' mount_nfs option (Solaris 9)."),
-       Units("Bytes") ]
-    uint64 ReadBufferSize;
-
-    [Deprecated {
-        "Solaris_NFSMount.FailoverList"},
-     Description (
-        "Array of replicated resources to be used for failover. Each "
-        "resource must be of the form host:/pathname, NFS URL or a "
-        "list of hosts, if the exported directory name is the same.") ]
-    string ReplicatedResources[];
-
-    [Description ("NFS timeout in tenths of a second.  The default is 11 "
-    	"tenths of a second for connectionless transports and 600 "
-    	"tenths of a second for connection oriented transports.  "
-    	"Corresponds to the 'timeo=' mount_nfs option (Solaris 9)."),
-       Units ("Tenths of Seconds")]
-    uint32 RetransmissionTimeout;
-
-    [Description (
-        "If set to true, if the first mount attempt fails, retries are "
-        "performed in the foreground.  If set to false, retries are "
-        "performed in the background.  Corresponds to the 'bg/fg' "
-        "mount_nfs options (Solaris 9).  "
-        "This value is only valid upon creation of an instance of "
-	"instance of Solaris_NFSMount.  This is actually a mount _process_ "
-	"option and not a mount option.")]
-    boolean RetryInForeground = true;
-
-    [Description("A string describing the security mode for NFS transactions. "
-                 "Available modes are listed in /etc/nfssec.conf. "
-                 "Corresponds to the 'sec=' mount_nfs option (Solaris 9)."),
-        MappingStrings{"SOLARIS9.SUN|/etc/nfssec.conf"}]
-    String SecurityMode;
-
-    [Description (
-        "The NFS Server IP port number.  Default is NFS_PORT which is defined "
-        "defined in /usr/include/nfs/nfs.h.  Corresponds to the "
-        "'port=' mount_nfs option (Solaris 9).") ]
-    uint32 ServerCommunicationPort;
-
-    [Description("The name of the NFS server.")]
-    String ServerName;
-
-    [Description("The path of the NFS resource on the server.")]
-    String ServerPath;
-    
-    [Description (
-        "Version number of NFS protocol to use.  Corresponds to the "
-        "'vers=' mount_nfs option (Solaris 9)."),
-     ValueMap {"2", "3", "4", "highest"} ]
-    String Version = "highest";
-
-
-    [Description ("Write buffer size in bytes.  The default is 32768 for "
-    	"version 3 and 8192 for version 2.  Corresponds to the "
-        "'wsize=' mount_nfs option (Solaris 9)."),
-       Units("Bytes") ]
-    uint64 WriteBufferSize;
-
-    [Description(
-      "Allows the creation and manipulation of extended attributes. "
-      "Corresponds to the 'xattr/noxattr' mount_nfs options (Solaris 9). ")]
-    boolean Xattr = true;
-
-    // Methods
-    [Description("Method to obtain the list of network IDs from "
-                 "the /etc/netconfig file.  Returns 1 if method completed "
-                 "successfully, 0 if an error occurred.  Corresponds to the "
-                 "data stored in /etc/netconfig (Solaris 9).")]
-    sint32 getNetCfgList([OUT, IN(false)]string ids[]);
-
-    [Description("Method to obtain the list of nfs security modes from "
-                 "the /etc/nfssec.conf file.  Returns 1 if method completed "
-                 "successfully, 0 if an error occurred.  Corresponds to the "
-                 "data stored in /etc/nfssec.conf (Solaris 9).")]
-    sint32 getNfsSecList([OUT, IN(false)]string secmodes[]);
-
-    [Description("Method to obtain the the default nfs security mode from "
-                 "the /etc/nfssec.conf file.  Returns 1 if method completed "
-                 "successfully, 0 if an error occurred.  Corresponds to the "
-                 "data stored in /etc/nfssec.conf (Solaris9).")]
-    sint32 getDefaultNfsSecMode([OUT, IN(false)]string secmode);
-};
-
-#pragma namespace("__create")
-
-[Association,
- Provider(
-     "jni:libWBEMnfs.so"),
- Version("1.3.0"),
- Description (
-     "This association represents the relationship between an NFS "
-     "share and its security modes.")
-]
-class Solaris_NFSShareSecurityModes : CIM_ElementSetting
-{
-       [Override ("Element"),
-        Description ("The share the mode is for.")]
-    Solaris_NFSShare REF Element;
-
-       [Override("Setting"), Description (
-        "The Setting that can be applied") ]
-    Solaris_NFSShareSecurity REF Setting;
-
-};
-
-[Association,
- Version("1.3.0"),
- Description ("Class represents the relationship between an NFS "
-              "Share object and its default setting. The default "
-              "setting of AUTH_SYS for the security mode will be "
-              "set in the provider.")
-]
-class Solaris_NFSShareDefSecurityMode : CIM_DefaultSetting
-{
-    [Override ("Element"),
-        Description ("The share the mode is for.")]
-    Solaris_NFSShare REF Element;
-
-    [Override("Setting"),
-        Description ("The Setting that can be applied to ") ]
-    Solaris_NFSShareSecurity REF Setting;
-
-};
-
-
-
-[Association,
- Provider(
-     "jni:libWBEMnfs.so"),
- Version("1.3.0"),
- Description ("Class that represents the association between the "
-               "share and its host.")
-]
-class Solaris_HostedShare : CIM_HostedShare
-{
-    [Override ("Antecedent"),
-        Description ("The host of the NFS shared file system.")]
-    Solaris_ComputerSystem REF Antecedent;
-
-    [Override ("Dependent"),
-        Description ("The NFS shared directory.")]
-    Solaris_NFSShare REF Dependent;
-};
-
-[Association,
- Aggregation,
- Version("1.3.0"),
- Description(
-     "An association that represents the aggregation of all of "
-     "the Solaris_PersistentShare objects and ties them to a "
-     "Solaris_SystemConfiguration object.")]
-class Solaris_PersistentShareConfiguration : CIM_SystemSettingContext
-{
-
-};
-
-[Association,
- Provider(
-     "jni:libWBEMnfs.so"),
- Version("1.3.0"),
- Description(
-    "This class ties an individual Solaris_PersistentShare to its "
-    "owning system.")]
-class Solaris_PersistentShareForSystem : CIM_SettingForSystem
-{
-
-    [Override ("Antecedent"),
-       Description ("The Solaris Hosting System.")]
-    Solaris_ComputerSystem REF Antecedent;
-
-    [Override ("Dependent"),
-        Description ("The dfstab entry for the system.")]
-    Solaris_PersistentShare REF Dependent;
-};
-
-
-[Association,
- Provider(
-     "jni:libWBEMnfs.so"),
- Version("1.3.0"),
- Description(
-     "This class ties an individual Solaris_PersistentShare to a "
-     "Solaris_NFSShare.")]
-class Solaris_NFSShareEntry : CIM_ElementSetting
-{
-    [Override ("Setting"),
-        Description ("The persistent share setting")]
-    Solaris_PersistentShare REF Setting;
-
-};
-
-[Association,
- Version("1.3.0"),
- Description ("associates the Share to a LogicalElement that is "
-              "being exported.") ]
-class Solaris_SharedElement : CIM_SharedElement
-{
-};
-
-#pragma namespace("__modify")
-
-[Association,
- Provider("java:com.sun.wbem.solarisprovider.fsmgr.share.Solaris_NFSExport"),
- Deprecated {
-    "Solaris_SharedFileSystem"},
- Description ("Solaris_NFSExport inherited from CIM_Export")]
-class Solaris_NFSExport : CIM_Export
-{
-
-        [Description (
-                "If set to true: give maximum access to NFS v2 clients.  "
-                "If set to false (default): give minimum access to NFS v2 "
-                "clients.") ]
-        boolean AclOk = false;
-        
-        [Description (
-                "The effective UID of unknown users. The default value is "
-                "UID_NOBODY (60001).") ]
-        sint32 AnonUid;
-
-        [Description ("Share description.") ]
-        string Description;
-        
-        [Description (
-                "Index file to use when accessing a Web-NFS directory.") ]
-        string IndexFile;
-
-        [Description (
-                "If set to true: prevents clients from mounting "
-                "subdirectories of the exported directory.  "
-                "If set to false (default): allows clients to mount "
-                "subdirectories.") ]
-        boolean NoSub = false;
-
-        [Description (
-                "If set to true: don't allow allow setuid execution.  "
-                "If set to false (default): allow setuid execution.") ]
-        boolean NoSuid = false;
-
-        [Description (
-                "If set to true: use exported directory as the location of "
-                "the public file handle for Web-NFS.  "
-                "If set to false (default): exported directory is not the "
-                "location of the public file handle.") ]
-        boolean Public = false;
-
-        [Description (
-                "If set to true: grant read-only access to all clients.  "
-                "If set to false (default):do not grant read-only access "
-                "to all clients.") ]
-        boolean ReadOnly = false;
-
-        [Description (
-                "If set to true (default): grant read-write access to all "
-                "clients.  "
-                "If set to false: do not grant read-write access to all "
-                "clients.") ]
-        boolean ReadWrite = true;
-
-        [Description ("Array of clients granted read-only access.") ]
-        string ROAccessList[];
-
-        [Description (
-                "Array of hosts from which root users can gain "
-                "root access.") ]
-        string RootAccessList[];
-
-        [Description ("Array of clients granted read-write access.") ]
-        string RWAccessList[];
-        
-        [Description (
-                "If set to true: the filesystem is shared at boot.  "
-                "If set to false (default): the resource is not shared at "
-                "boot.") ]
-        boolean ShareAtBootEntry = false;
-
-        [Description (
-                "Array of security modes to be used to NFS transactions. "
-                "Available modes is listed in /etc/nfssec.conf.") ]
-        string SecurityModes[];
-
-        [Description ("Share options.") ]
-        string ShareOptions;
-
-        [Description (
-                "Maximum lifetime of a request allowed by the NFS server "
-                "(in seconds) when using Diffie-Hellman or Kerberos security.  "
-                "Default value is 30000 seconds (8.3 hours).") ]
-        uint32 Window = 30000;
-
-
-	//Methods
-        [Description("Method to delete a dfstab entry.")]
-        sint32 deleteDfstabEntry([IN]string pathName);
-
-};
-
-#pragma namespace("__create")
-
-[Association,
- Version("1.3.0"),
- Provider(
-     "jni:libWBEMnfs.so"),
- Description ("Class that represents the association between the local "
-              "filesystem and the Solaris_NFSShare on the server.")
-]
-class Solaris_SharedFileSystem : Solaris_SharedElement
-{
-    [Override("SystemElement"), Key, MAX(1),
-           Description ("The Directory that is Shared.") ]
-    CIM_LogicalElement REF SystemElement;
-
-    [Override("SameElement"), Key, Description (
-           "The Shared view of the Directory.") ]
-    CIM_Share REF SameElement;
-
-};
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-SUBDIR1 = common \
-	diskdrive \
-	diskpartition \
-	disk \
-	logicaldisk \
-	controller \
-	assoc \
-	mpxio
-
-SUBDIR2 = lib
-
-SUBDIRS = $(SUBDIR1) $(SUBDIR2)
-
-POFILE  = wbem_disk.po
-POFILES = $(SUBDIRS:%=%/_%.po)
-
-all:=           TARGET = all
-clean:=         TARGET = clean
-clobber:=       TARGET = clobber
-install:=       TARGET = install
-lint:=		TARGET = lint
-check:=		TARGET = check
-_msg:=		TARGET = catalog
-
-.KEEP_STATE:
-
-all clean install lint check: $(SUBDIR1) .WAIT $(SUBDIR2)
-
-clobber: $(SUBDIRS)
-	$(RM) $(POFILE)
-
-FRC:
-
-${SUBDIRS}: FRC
-	cd $@; pwd; $(MAKE) $(TARGET)
-
-$(POFILE): $(POFILES)
-	$(BUILDPO.pofiles)
-
-_msg: $(SUBDIRS) .WAIT $(MSGDOMAINPOFILE)
-
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	Solaris_DiskPartitionBasedOnDisk.o \
-		Sol_DiskPartitionBasedOnFDisk.o \
-		Solaris_MediaPresent.o \
-		Solaris_RealizesExtent.o \
-		Solaris_RealizesDiskDrive.o \
-		Solaris_SCSIInterface.o \
-		Solaris_IDEInterface.o \
-		Solaris_MPXIOInterface.o \
-		Sol_MPXIOCtrlrLogicalIdentity.o \
-		Solaris_MPXIOComponent.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL	=	$(ROOTWBEMINC) \
-		$(SRC)/lib/libdiskmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -Dpic -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_PICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _assoc.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-
-install:	all
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Sol_DiskPartitionBasedOnFDisk.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1007 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "partbasedon_descriptors.h"
-#include "partition_descriptors.h"
-#include "logicaldisk_descriptors.h"
-#include "Sol_DiskPartitionBasedOnFDisk.h"
-
-#define	DISKPART_GETINSTANCE		"DISKPART_BASEDONFDISK,GET_INSTANCE"
-#define	DISKPART_ENUMINSTANCES		"DISKPART_BASEDONFDISK,ENUM_INSTANCES"
-#define	DISKPART_ENUMINSTANCENAMES \
-	"DISKPART_BASEDONFDISK,ENUM_INSTANCENAMES"
-#define	DISKPART_CREATEINSTANCE		"DISKPART_BASEDONFDISK,CREATE_INSTANCE"
-#define	DISKPART_DELETEINSTANCE		"DISKPART_BASEDONFDISK,DELETE_INSTANCE"
-#define	DISKPART_SETINSTANCE		"DISKPART_BASEDONFDISK,SET_INSTANCE"
-#define	DISKPART_SETPROPERTY		"DISKPART_BASEDONFDISK,SET_PROPERTY"
-#define	DISKPART_GETPROPERTY		"DISKPART_BASEDONFDISK,GET_PROPERTY"
-#define	DISKPART_INVOKEMETHOD		"DISKPART_BASEDONFDISK,INVOKE_METHOD"
-#define	DISKPART_EXECQUERY		"DISKPART_BASEDONFDISK,EXEC_QUERY"
-#define	DISKPART_ASSOCIATORS		"DISKPART_BASEDONFDISK,ASSOCIATORS"
-#define	DISKPART_ASSOCIATORNAMES	"DISKPART_BASEDONFDISK,ASSOCIATOR_NAMES"
-#define	DISKPART_REFERENCES		"DISKPART_BASEDONFDISK,REFERENCES"
-#define	DISKPART_REFERENCENAMES		"DISKPART_BASEDONFDISK,REFERENCE_NAMES"
-
-static CCIMInstanceList  *createDiskPartBasedOnFRefList(
-CCIMObjectPath *pObjectName, CCIMObjectPathList *objList, int *error);
-
-/*
- * Solaris_DiskPartitionBasedOnFDisk provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the door process prior to
- * sending a copy of the data to the CIMOM.
- */
-
-/*
- * Name: cp_getInstance_Solaris_DiskPartitionBasedOnFDisk
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instance.
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_DiskPartitionBasedOnFDisk(CCIMObjectPath* pOP)
-{
-	CCIMInstance* 		inst = NULL;
-	CCIMPropertyList* 	pCurPropList;
-	dm_descriptor_t		f_descriptor;
-	dm_descriptor_t		s_descriptor;
-	CCIMObjectPath		*antOp = NULL;
-	CCIMObjectPath		*depOp = NULL;
-	char			*name;
-	int			error;
-
-
-	if (pOP == NULL ||
-	    (pCurPropList = pOP->mKeyProperties) == NULL) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	antOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-	    ANTECEDENT, &error);
-
-	if (error == 0) {
-	    depOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-		DEPENDENT, &error);
-	}
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now, get the name of the antecedent from the object path.
-	 */
-
-	if (((pCurPropList = antOp->mKeyProperties) == NULL) ||
-		((pCurPropList = depOp->mKeyProperties) == NULL)) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = antOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	f_descriptor = dm_get_descriptor_by_name(DM_PARTITION, name,
-	    &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	/*
-	 * Now, get the name of the dependent from the object path.
-	 */
-
-	pCurPropList = depOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    dm_free_descriptor(f_descriptor);
-	}
-
-	s_descriptor = dm_get_descriptor_by_name(DM_SLICE, name, &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-	if (error == ENODEV) {
-	    dm_free_descriptor(f_descriptor);
-	    return ((CCIMInstance *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    dm_free_descriptor(f_descriptor);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* Turn these descriptors in to a disk part based on instance */
-
-	inst = partbasedon_descriptor_toCCIMInstance(
-	    hostName, f_descriptor, s_descriptor,
-		DISKPART_BASEDONFDISK, &error);
-	dm_free_descriptor(s_descriptor);
-	dm_free_descriptor(f_descriptor);
-
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_FAILED,
-		PARTBASEDON_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_DiskPartitionBasedOnFDisk
- *
- * Description: Returns a linked list of instances of
- *      Solaris_DiskPartitionBasedOnFDisk if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMInstanceList * if instances are found.
- *	Otherwise, NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_DiskPartitionBasedOnFDisk(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList* 	instList = NULL;
-	CCIMInstance*		inst;
-	CCIMException*		ex;
-	dm_descriptor_t		*fdisk_descriptorp = NULL;
-	dm_descriptor_t		*part_descriptorp = NULL;
-	int			error = 0;
-	int			filter[2];
-	int			i = 0;
-	int			j = 0;
-
-	filter[0] = DM_MT_FIXED;
-	filter[1] = DM_FILTER_END;
-
-	fdisk_descriptorp = dm_get_descriptors(DM_PARTITION, filter, &error);
-
-	if (fdisk_descriptorp == NULL||
-	    fdisk_descriptorp[0] == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(DISKPART_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * For each one of the fdisks found, get the associated partitions.
-	 */
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISKPART_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    dm_free_descriptors(fdisk_descriptorp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	for (i = 0; fdisk_descriptorp[i] != NULL; i ++) {
-	    part_descriptorp = dm_get_associated_descriptors(
-		fdisk_descriptorp[i], DM_SLICE, &error);
-
-	    /* If no partitions associated with this fdisk, continue */
-
-	    if (part_descriptorp == NULL) {
-		continue;
-	    }
-
-	    if (error != 0) {
-		util_handleError(DISKPART_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		dm_free_descriptors(fdisk_descriptorp);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-
-	    for (j = 0; part_descriptorp[j] != NULL; j ++) {
-		inst = partbasedon_descriptor_toCCIMInstance(hostName,
-		    fdisk_descriptorp[i], part_descriptorp[j],
-			DISKPART_BASEDONFDISK, &error);
-		if (error != 0) {
-		    util_handleError(DISKPART_ENUMINSTANCES, CIM_ERR_FAILED,
-			PARTBASEDON_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		    dm_free_descriptors(fdisk_descriptorp);
-		    dm_free_descriptors(part_descriptorp);
-		    cim_freeInstanceList(instList);
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(DISKPART_ENUMINSTANCES, CIM_ERR_FAILED,
-			PARTBASEDON_DESC_TO_INSTANCE_FAILURE, ex, &error);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-
-	    dm_free_descriptors(part_descriptorp);
-	}
-
-
-	dm_free_descriptors(fdisk_descriptorp);
-
-	/*
-	 * Since the instance list has to be created prior to the for loop,
-	 * it may be empty. The CIMOM requires that I return a NULL list if
-	 * there are no instances, so I must check for this.
-	 */
-	if (instList->mDataObject == NULL) {
-	    cim_freeInstanceList(instList);
-	    instList = NULL;
-	}
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_DiskPartitionBasedOnFDisk
- *
- * Description: Returns a linked list of CCIMObjectPath *
- *      of Solaris_DiskPartitionBasedOnFDisk if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMObjectPathList * if objects are found.
- *	Otherwise, NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_DiskPartitionBasedOnFDisk(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(DISKPART_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList =
-	    cp_enumInstances_Solaris_DiskPartitionBasedOnFDisk(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_DiskPartitionBasedOnFDisk is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_DiskPartitionBasedOnFDisk(
-CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(DISKPART_CREATEINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return ((CCIMObjectPath *)NULL);
-}
-
-
-/*
- * Deleting an instance of a Solaris_DiskPartitionBasedOnFDisk is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_DiskPartitionBasedOnFDisk(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(DISKPART_DELETEINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_DiskPartitionBasedOnFDisk
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_DiskPartitionBasedOnFDisk(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(DISKPART_GETPROPERTY,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_DiskPartitionBasedOnFDisk(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/*
- * Setting an instance of a Solaris_DiskPartitionBasedOnFDisk is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_DiskPartitionBasedOnFDisk(CCIMObjectPath* pOP,
-CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(DISKPART_SETINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-
-/*
- * Setting a property on a Solaris_DiskPartitionBasedOnFDisk is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_DiskPartitionBasedOnFDisk(
-CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-	int	error;
-
-	util_handleError(DISKPART_SETPROPERTY,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No Methods for Solaris_DiskPartitionBasedOnFDisk.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_DiskPartitionBasedOnFDisk(
-CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty	*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_DiskPartitionBasedOnFDisk
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *	CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *	information on the class for which to find the instances.
- *
- * 	selectList - Not used
- *	nonJoinExp - Not used
- *
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_DiskPartitionBasedOnFDisk(
-CCIMObjectPath *op, cimchar *selectList, cimchar *nonJoinExp,
-	cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(DISKPART_EXECQUERY, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_DiskPartitionBasedOnFDisk(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISKPART_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISKPART_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISKPART_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
-
-/*
- * Name: cp_associators_Solaris_DiskPartitionBasedOnFDisk
- *
- * Description:
- * Returns instances of objects associated with the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. This list
- *	may be empty. NULL is returned on error.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_DiskPartitionBasedOnFDisk(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-	CCIMPropertyList	*pCurPropList;
-	CCIMInstanceList	*instList = NULL;
-	dm_descriptor_t		*assoc_descriptors;
-	dm_descriptor_t		obj_desc;
-	char			*name;
-	int			error = 0;
-	int			isAntecedent = 0;
-
-	/*
-	 * In this association, both sides are Solaris_DiskPartitions. I
-	 * must use the c api to find the appropriate type calling this,
-	 * either fdisk, or Solaris.
-	 */
-	if (pObjectName == NULL ||
-	    ((pCurPropList = pObjectName->mKeyProperties) == NULL)) {
-	    util_handleError(DISKPART_ASSOCIATORS,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0) {
-	    util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	obj_desc = dm_get_descriptor_by_name(DM_PARTITION, name,
-	    &error);
-
-	if (error == ENODEV) {
-	    obj_desc = dm_get_descriptor_by_name(DM_SLICE, name,
-		&error);
-		/*
-		 * No matching device found.
-		 */
-	    if (error == ENODEV) {
-		return ((CCIMInstanceList *)NULL);
-	    } else if (error != 0) {
-		util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_FAILED,
-		    DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	} else if (error != 0) {
-	    util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	} else {
-	    isAntecedent = 1;
-	}
-
-	if (pRole != NULL) {
-	    if (strcasecmp(pRole, ANTECEDENT) == 0) {
-		if (isAntecedent != 1) {
-		    util_handleError(DISKPART_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    } else if (strcasecmp(pRole, DEPENDENT) == 0) {
-		if (isAntecedent == 1) {
-		    util_handleError(DISKPART_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	}
-
-	if (isAntecedent) {
-	    /* Get associated descriptors. */
-
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_SLICE, &error);
-
-	} else {
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_PARTITION, &error);
-	}
-	dm_free_descriptor(obj_desc);
-
-	if (assoc_descriptors == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (assoc_descriptors[0] == NULL) {
-	    dm_free_descriptors(assoc_descriptors);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_FAILED,
-		DM_GET_ASSOC_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent) {
-	    instList = partition_descriptors_toCCIMInstanceList(DISK_PARTITION,
-		NULL, assoc_descriptors, &error);
-	} else {
-	    instList = partition_descriptors_toCCIMInstanceList(DISK_PARTITION,
-		assoc_descriptors, NULL,  &error);
-	}
-	dm_free_descriptors(assoc_descriptors);
-
-	if (error != 0) {
-	    util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_FAILED,
-		PART_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_associatorNames_Solaris_DiskPartitionBasedOnFDisk
- *
- * Description:
- * Returns a list of objects associated with the passed in
- * object if there are any via the object CCIMObjectPath.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found.
- *	Otherwise, NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_DiskPartitionBasedOnFDisk(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(DISKPART_ASSOCIATORNAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_associators_Solaris_DiskPartitionBasedOnFDisk(
-		pAssocName, pObjectName, pResultClass, pRole, pResultRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Name: cp_references_Solaris_DiskPartitionBasedOnFDisk
- *
- * Description:
- * Returns  instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found.
- *	Otherwise, NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_references_Solaris_DiskPartitionBasedOnFDisk(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, char *pRole)
-{
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList;
-	int			error = 0;
-
-
-	if (pObjectName == NULL) {
-	    util_handleError(DISKPART_REFERENCES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-	/*
-	 * Get the list of those objects that are referred to by
-	 * the calling object.
-	 */
-
-	objList =
-	    cp_associatorNames_Solaris_DiskPartitionBasedOnFDisk(
-		pAssocName, pObjectName, NULL, NULL, NULL);
-
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = createDiskPartBasedOnFRefList(pObjectName, objList, &error);
-	cim_freeObjectPathList(objList);
-	return (instList);
-}
-
-/*
- * Name: cp_referenceNames_Solaris_DiskPartitionBasedOnFDisk
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found.
- *	Otherwise, NULL is returned.
- *
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_DiskPartitionBasedOnFDisk(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, cimchar *pRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(DISKPART_REFERENCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_references_Solaris_DiskPartitionBasedOnFDisk(
-		pAssocName, pObjectName, pRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-	return (objList);
-}
-
-/*
- * Create the association class with the passed in attributes.
- */
-
-static
-CCIMInstanceList  *
-createDiskPartBasedOnFRefList(CCIMObjectPath *pObjectName,
-	CCIMObjectPathList *objList, int *error)
-{
-
-	CCIMObjectPathList	*tmpList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*obj1;
-	CCIMObjectPath		*obj2;
-	CCIMException		*ex;
-	CCIMPropertyList	*pCurPropList = NULL;
-	dm_descriptor_t		obj_desc;
-	char			*name;
-	int			isAntecedent = 0;
-
-	*error = 0;
-
-	if (objList == NULL) {
-	    return (instList);
-	}
-	/*
-	 * Determine if it is the antecedent or dependent calling this
-	 */
-	if ((pCurPropList = pObjectName->mKeyProperties) == NULL) {
-	    util_handleError(DISKPART_BASEDONFDISK,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    error);
-	if (*error != 0) {
-	    util_handleError(DISKPART_BASEDONFDISK, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	obj_desc = dm_get_descriptor_by_name(DM_PARTITION, name, error);
-	if (*error == ENODEV) {
-	    obj_desc = dm_get_descriptor_by_name(DM_SLICE, name, error);
-	    if (*error == ENODEV) {
-		return (instList);
-	    } else if (*error != 0) {
-		util_handleError(DISKPART_BASEDONFDISK, CIM_ERR_FAILED,
-		    NULL, NULL, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	} else if (*error != 0) {
-	    util_handleError(DISKPART_BASEDONFDISK, CIM_ERR_FAILED,
-		NULL, NULL, error);
-	    return ((CCIMInstanceList *)NULL);
-	} else {
-	    isAntecedent = 1;
-	}
-
-	dm_free_descriptor(obj_desc);
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISKPART_BASEDONFDISK, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	tmpList = objList;
-	while (tmpList != NULL) {
-	    obj1 = tmpList->mDataObject;
-	    obj2 = cim_copyObjectPath(pObjectName);
-	    if (obj2 == NULL) {
-		ex = cim_getLastError();
-		util_handleError(DISKPART_BASEDONFDISK, CIM_ERR_FAILED,
-		    COPY_OBJPATH_FAILURE, ex, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    inst = cim_createInstance(DISKPART_BASEDONDISK);
-	    if (inst == NULL) {
-		ex = cim_getLastError();
-		util_handleError(DISKPART_BASEDONDISK, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_FAILURE, ex, error);
-		cim_freeObjectPath(obj2);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (isAntecedent) {
-		util_doReferenceProperty(ANTECEDENT, obj2, cim_true, inst,
-		    error);
-		cim_freeObjectPath(obj2);
-		util_doReferenceProperty(DEPENDENT, obj1, cim_true, inst,
-		    error);
-		if (*error != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DISKPART_BASEDONDISK, CIM_ERR_FAILED,
-			CREATE_REFPROP_FAILURE, ex, error);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-	    } else {
-		util_doReferenceProperty(DEPENDENT, obj2, cim_true, inst,
-		    error);
-		util_doReferenceProperty(ANTECEDENT, obj1, cim_true, inst,
-		    error);
-		cim_freeObjectPath(obj2);
-		if (*error != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DISKPART_BASEDONDISK, CIM_ERR_FAILED,
-			CREATE_REFPROP_FAILURE, ex, error);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(DISKPART_BASEDONDISK, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tmpList = tmpList->mNext;
-	}
-	return (instList);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Sol_DiskPartitionBasedOnFDisk.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOL_DISKPARTITIONBASEDONFDISK_H_
-#define	_SOL_DISKPARTITIONBASEDONFDISK_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cp_required.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOL_DISKPARTITIONBASEDONFDISK_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Sol_MPXIOCtrlrLogicalIdentity.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1044 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "ctrl_descriptors.h"
-#include "mpxiogroup_descriptors.h"
-#include "Sol_MPXIOCtrlrLogicalIdentity.h"
-
-
-#define	LOGID_GETINSTANCE		"MPXIO_LOGICALIDENTITY,GET_INSTANCE"
-#define	LOGID_ENUMINSTANCES		"MPXIO_LOGICALIDENTITY,ENUM_INSTANCES"
-#define	LOGID_ENUMINSTANCENAMES \
-	"MPXIO_LOGICALIDENTITY,ENUM_INSTANCENAMES"
-#define	LOGID_CREATEINSTANCE		"MPXIO_LOGICALIDENTITY,CREATE_INSTANCE"
-#define	LOGID_DELETEINSTANCE		"MPXIO_LOGICALIDENTITY,DELETE_INSTANCE"
-#define	LOGID_SETINSTANCE		"MPXIO_LOGICALIDENTITY,SET_INSTANCE"
-#define	LOGID_SETPROPERTY		"MPXIO_LOGICALIDENTITY,SET_PROPERTY"
-#define	LOGID_GETPROPERTY		"MPXIO_LOGICALIDENTITY,GET_PROPERTY"
-#define	LOGID_INVOKEMETHOD		"MPXIO_LOGICALIDENTITY,INVOKE_METHOD"
-#define	LOGID_EXECQUERY			"MPXIO_LOGICALIDENTITY,EXEC_QUERY"
-#define	LOGID_ASSOCIATORS		"MPXIO_LOGICALIDENTITY,ASSOCIATORS"
-#define	LOGID_ASSOCIATORNAMES		"MPXIO_LOGICALIDENTITY,ASSOCIATOR_NAMES"
-#define	LOGID_REFERENCES		"MPXIO_LOGICALIDENTITY,REFERENCES"
-#define	LOGID_REFERENCENAMES		"MPXIO_LOGICALIDENTITY,REFERENCE_NAMES"
-
-static
-CCIMInstanceList *
-mpxioLogIdentAssocToInstList(CCIMObjectPath *pObjectName,
-    cimchar *pObjectNameRole, CCIMObjectPathList *objList,
-	cimchar *objRole, int *error);
-
-static
-CCIMInstance  *
-mpxioLogIdentAssocToInst(CCIMObjectPath *obj1, cimchar *obj1Role,
-	CCIMObjectPath *obj2, cimchar *obj2Role, int *error);
-
-/*
- * Solaris_MPXIOCtrlrLogicalIdentity provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the door process prior to
- * sending a copy of the data to the CIMOM.
- */
-
-/*
- * Name: cp_getInstance_Solaris_MPXIOCtrlrLogicalIdentity
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instance.
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-CCIMInstance*
-cp_getInstance_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath* pOP)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMPropertyList	*pCurPropList;
-	CCIMObjectPath		*antOp = NULL;
-	CCIMObjectPath		*depOp = NULL;
-	dm_descriptor_t		c_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL ||
-		((pCurPropList = pOP->mKeyProperties) == NULL)) {
-	    util_handleError(LOGID_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	antOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-	    SYSTEM_ELEMENT, &error);
-
-	if (error == 0) {
-	    depOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-	    SAME_ELEMENT, &error);
-	}
-
-	if (error != 0) {
-	    util_handleError(LOGID_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now, get the name of the antecedent from the object path.
-	 */
-
-	if ((pCurPropList = antOp->mKeyProperties) == NULL) {
-	    util_handleError(LOGID_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0) {
-	    util_handleError(LOGID_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * The only reason it is needed to get the descriptor for these
-	 * two devices is to verify that they still exist and are valid.
-	 * If they are not found, then getting the instance for this
-	 * association as passed in by the client is not possible.
-	 */
-	c_descriptor = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-	    &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(LOGID_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	dm_free_descriptor(c_descriptor);
-
-	/*
-	 * At this point I have verified I have the controller device that
-	 * are part of this association. Use the object paths I got
-	 * earlier to create the mpxiologicalident instance.
-	 */
-	inst = mpxioLogIdentAssocToInst(antOp, SYSTEM_ELEMENT, depOp,
-	    SAME_ELEMENT, &error);
-
-	if (error != 0) {
-	    util_handleError(LOGID_GETINSTANCE, CIM_ERR_FAILED,
-		MPXIOINT_ASSOC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_MPXIOCtrlrLogicalIdentity
- *
- * Description: Returns a linked list of instances of
- *      Solaris_MPXIOCtrlrLogicalIdentity if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMInstanceList * if istances are found.
- *	Otherwise, NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*cObjList = NULL;
-	CCIMObjectPathList	*tmpObjList;
-	CCIMObjectPath		*objPath;
-	CCIMException		*ex;
-	int			error = 0;
-
-	/*
-	 * Get the list of MPXIO Controllers. Then generate the list
-	 * of mpxio groups from these controllers.
-	 */
-
-	objPath = cim_createEmptyObjectPath(MPXIO_CONTROLLER);
-	if (objPath == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(LOGID_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_OBJECT_PATH, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	cObjList = cimom_enumerateInstanceNames(objPath, cim_false);
-	cim_freeObjectPath(objPath);
-
-	/*
-	 * NULL is error.
-	 */
-	if (cObjList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(LOGID_ENUMINSTANCES, CIM_ERR_FAILED,
-		ENUM_INSTANCENAMES_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (cObjList->mDataObject == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Loop through all of these controller objects and get the associated
-	 * disks.
-	 */
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(LOGID_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * For each of the object paths found above, generate the group
-	 * object path that is associated with it. If, there is an MPXIO
-	 * controller, there will automatically be an MPXIOGroup object
-	 * because of the nature of this controllers identity.
-	 */
-
-	for (tmpObjList = cObjList; tmpObjList != NULL;
-	    tmpObjList = tmpObjList->mNext) {
-
-	    CCIMObjectPath 	*cOp;
-	    CCIMInstance	*tmpInst;
-	    CCIMInstance	*tmpInst1;
-	    CCIMPropertyList	*pCurPropList;
-	    CCIMObjectPath	*dObjPath;
-	    dm_descriptor_t	c_descriptor;
-	    char 		*name = NULL;
-
-	    cOp = tmpObjList->mDataObject;
-	    if ((pCurPropList = cOp->mKeyProperties) == NULL) {
-		util_handleError(LOGID_ENUMINSTANCES,
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string,
-		DEVICEID, &error);
-	    if (error != 0) {
-		util_handleError(LOGID_ENUMINSTANCES,
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    c_descriptor = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-		&error);
-	    if (error == ENODEV) {
-		continue;
-	    }
-	    if (error != 0) {
-		util_handleError(LOGID_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    tmpInst = mpxiogroup_descriptor_toCCIMInstance(
-		c_descriptor, MPXIO_GROUP, &error);
-	    dm_free_descriptor(c_descriptor);
-
-	    if (error != 0) {
-		util_handleError(LOGID_ENUMINSTANCES, CIM_ERR_FAILED,
-		    MPXIOGRP_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    dObjPath = cim_createObjectPath(tmpInst);
-	    cim_freeInstance(tmpInst);
-
-	    if (dObjPath == NULL) {
-		util_handleError(LOGID_ENUMINSTANCES, CIM_ERR_FAILED,
-		    CREATE_OBJECT_PATH_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tmpInst1 = mpxioLogIdentAssocToInst(
-		cOp, SYSTEM_ELEMENT, dObjPath, SAME_ELEMENT, &error);
-	    cim_freeObjectPath(dObjPath);
-
-	    if (error != 0) {
-		util_handleError(LOGID_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_addInstance(instList, tmpInst1);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(LOGID_ENUMINSTANCES, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, &error);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	} /* end for */
-
-	cim_freeObjectPathList(cObjList);
-
-	/*
-	 * It is possible I will have an empty instance list at
-	 * this point. So, I must check and NULL this out if
-	 * there are no entries.
-	 */
-
-	if (instList->mDataObject == NULL) {
-	    cim_freeInstanceList(instList);
-	    instList = NULL;
-	}
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_MPXIOCtrlrLogicalIdentity
- *
- * Description: Returns a linked list of CCIMObjectPath *
- *      of Solaris_MPXIOCtrlrLogicalIdentity if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMObjectPathList * if objects are found. NULL otherwise.
- */
-
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(LOGID_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_MPXIOCtrlrLogicalIdentity(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_MPXIOCtrlrLogicalIdentity is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath* pOP,
-    CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(LOGID_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return ((CCIMObjectPath *)NULL);
-}
-
-
-/*
- * Deleting an instance of a Solaris_MPXIOCtrlrLogicalIdentity is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(LOGID_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_MPXIOCtrlrLogicalIdentity
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(LOGID_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_MPXIOCtrlrLogicalIdentity(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/*
- * Setting an instance of a Solaris_MPXIOCtrlrLogicalIdentity is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath* pOP,
-    CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(LOGID_SETINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Setting a property on a Solaris_MPXIOCtrlrLogicalIdentity is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath* pOP,
-    CCIMProperty* pProp)
-{
-	int	error;
-
-	util_handleError(LOGID_SETPROPERTY, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No Methods for Solaris_MPXIOCtrlrLogicalIdentity.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_MPXIOCtrlrLogicalIdentity(
-    CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty	*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_MPXIOCtrlrLogicalIdentity
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *	CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *	information on the class for which to find the instances.
- *
- * 	selectList - Not used
- *	nonJoinExp - Not used
- *
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath *op,
-    cimchar *selectList, cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(LOGID_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_MPXIOCtrlrLogicalIdentity(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(LOGID_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(LOGID_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(LOGID_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
-
-/*
- * Name: cp_associators_Solaris_MPXIOCtrlrLogicalIdentity
- *
- * Description:
- * Returns a instances of objects associated with the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-	CCIMPropertyList	*pCurPropList;
-	CCIMInstance		*inst;
-	CCIMInstanceList	*instList = NULL;
-	CCIMException		*ex;
-	dm_descriptor_t		obj_desc;
-	char			*name;
-	int			error = 0;
-	int			isSystem = 0;
-
-
-	if (pObjectName == NULL ||
-	    ((pCurPropList = pObjectName->mKeyProperties) == NULL)) {
-	    util_handleError(LOGID_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (strcasecmp(pObjectName->mName, MPXIO_CONTROLLER) == 0) {
-	    isSystem = 1;
-	}
-
-	if (pRole != NULL) {
-	    if (strcasecmp(pRole, SYSTEM_ELEMENT) == 0) {
-		if (isSystem != 1) {
-		    util_handleError(LOGID_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    } else if (strcasecmp(pRole, SAME_ELEMENT) == 0) {
-		if (isSystem == 1) {
-		    util_handleError(LOGID_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	}
-
-	if (isSystem) {
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-		&error);
-	} else {
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string, "Name",
-		&error);
-	}
-
-	if (error != 0) {
-	    util_handleError(LOGID_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * In this case, it does not matter which object called it for
-	 * getting the descriptor. This is an association which represents
-	 * another identity of the controller, so the only device we
-	 * really have is the controller.
-	 */
-	obj_desc = dm_get_descriptor_by_name(DM_CONTROLLER, name, &error);
-
-	if (error == ENODEV) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(LOGID_ASSOCIATORS, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isSystem == 1) {
-		/*
-		 * Generate associated mpxio group.
-		 */
-
-	    inst = mpxiogroup_descriptor_toCCIMInstance(obj_desc,
-		MPXIO_GROUP, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (error != 0) {
-		util_handleError(LOGID_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	} else {
-		/*
-		 * This is the mpxio group calling this function. Return the
-		 * controllers that are associated with this group.
-		 */
-	    inst = ctrl_descriptor_toCCIMInstance(hostName,
-		obj_desc, MPXIO_CONTROLLER, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (error != 0) {
-		util_handleError(LOGID_ASSOCIATORS, CIM_ERR_FAILED,
-		    MPXIOCTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	}
-
-	/*
-	 * Now generate the instance list for return. This is a strange
-	 * association since it is always only possible to have one
-	 * associated object no matter what is the calling object.
-	 */
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    cim_getLastError();
-	    util_handleError(LOGID_ASSOCIATORS, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, NULL, &error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_addInstance(instList, inst);
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(LOGID_ASSOCIATORS, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	return (instList);
-}
-
-/*
- * Name: cp_associatorNames_Solaris_MPXIOCtrlrLogicalIdentity
- *
- * Description:
- * Returns a list of objects associated with the passed in
- * object if there are any via the object CCIMObjectPath.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. Otherwise NULL.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(LOGID_ASSOCIATORNAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_associators_Solaris_MPXIOCtrlrLogicalIdentity(
-		pAssocName, pObjectName, pResultClass, pRole, pResultRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-	return (objList);
-}
-
-/*
- * Name: cp_references_Solaris_MPXIOCtrlrLogicalIdentity
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. Otherwise NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_references_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, char *pRole)
-{
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(LOGID_REFERENCES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Get the list of those objects that are referred to by
-	 * the calling object.
-	 */
-
-	objList =
-	    cp_associatorNames_Solaris_MPXIOCtrlrLogicalIdentity(
-		pAssocName, pObjectName, NULL, NULL, NULL);
-
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Now generate the list of instances to return.
-	 */
-
-	if ((strcasecmp(pObjectName->mName, MPXIO_CONTROLLER)) == 0) {
-	    instList = mpxioLogIdentAssocToInstList(pObjectName,
-		SYSTEM_ELEMENT, objList, SAME_ELEMENT, &error);
-	} else {
-	    instList = mpxioLogIdentAssocToInstList(pObjectName,
-		SYSTEM_ELEMENT, objList, SAME_ELEMENT, &error);
-	}
-
-	cim_freeObjectPathList(objList);
-	return (instList);
-}
-
-/*
- * Name: cp_referenceNames_Solaris_MPXIOCtrlrLogicalIdentity
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. Otherwise NULL.
- *
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_MPXIOCtrlrLogicalIdentity(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(LOGID_REFERENCENAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, CIM_ERR_FAILED, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-	instList =
-	    cp_references_Solaris_MPXIOCtrlrLogicalIdentity(pAssocName,
-		pObjectName, pRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Create the association class with the passed in attributes.
- */
-static
-CCIMInstanceList  *
-mpxioLogIdentAssocToInstList(CCIMObjectPath *pObjectName,
-    cimchar *pObjectNameRole, CCIMObjectPathList *objList, cimchar *objRole,
-	int *error)
-{
-
-	CCIMObjectPathList	*tmpList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*obj1;
-	CCIMObjectPath		*obj2;
-	CCIMException		*ex;
-
-	*error = 0;
-
-	/*
-	 * If no objects associated with this one, return NULL.
-	 */
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_LOGICALIDENTITY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	tmpList = objList;
-	while (tmpList != NULL) {
-	    obj1 = tmpList->mDataObject;
-	    obj2 = cim_copyObjectPath(pObjectName);
-	    if (obj2 == NULL) {
-		ex = cim_getLastError();
-		util_handleError(MPXIO_LOGICALIDENTITY, CIM_ERR_FAILED,
-		    COPY_OBJPATH_FAILURE, ex, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    inst = mpxioLogIdentAssocToInst(obj1, objRole, obj2,
-		pObjectNameRole, error);
-	    cim_freeObjectPath(obj2);
-	    if (*error != 0) {
-		util_handleError(MPXIO_LOGICALIDENTITY, CIM_ERR_FAILED,
-		    MPXIOINT_ASSOC_TO_INSTANCE_FAILURE, NULL, error);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(MPXIO_LOGICALIDENTITY, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, NULL, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    tmpList = tmpList->mNext;
-	}
-	return (instList);
-}
-
-static
-CCIMInstance  *
-mpxioLogIdentAssocToInst(CCIMObjectPath *obj1, cimchar *obj1Role,
-	CCIMObjectPath *obj2, cimchar *obj2Role, int *error)
-{
-
-	CCIMInstance	*inst = NULL;
-	CCIMException	*ex;
-
-	*error = 0;
-	inst = cim_createInstance(MPXIO_LOGICALIDENTITY);
-	if (inst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_LOGICALIDENTITY, CIM_ERR_FAILED,
-		MPXIOINT_ASSOC_TO_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(obj2Role, obj2, cim_true, inst,
-	    error);
-	if (*error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_LOGICALIDENTITY, CIM_ERR_FAILED,
-		CREATE_REFPROP_FAILURE, ex, error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(obj1Role, obj1, cim_true, inst, error);
-	if (*error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_LOGICALIDENTITY, CIM_ERR_FAILED,
-		CREATE_REFPROP_FAILURE, ex, error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Sol_MPXIOCtrlrLogicalIdentity.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOL_MPXIOCTRLRLOGICALIDENTITY_H_
-#define	_SOL_MPXIOCTRLRLOGICALIDENTITY_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cp_required.h>
-#include <cim_objectpath.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOL_MPXIOCTRLRLOGICALIDENTITY_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_DiskPartitionBasedOnDisk.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1044 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "partbasedon_descriptors.h"
-#include "partition_descriptors.h"
-#include "logicaldisk_descriptors.h"
-#include "Solaris_DiskPartitionBasedOnDisk.h"
-
-#define	DISKPART_GETINSTANCE		"DISKPART_BASEDONDISK,GET_INSTANCE"
-#define	DISKPART_ENUMINSTANCES		"DISKPART_BASEDONDISK,ENUM_INSTANCES"
-#define	DISKPART_ENUMINSTANCENAMES \
-	"DISKPART_BASEDONDISK,ENUM_INSTANCENAMES"
-#define	DISKPART_CREATEINSTANCE		"DISKPART_BASEDONDISK,CREATE_INSTANCE"
-#define	DISKPART_DELETEINSTANCE		"DISKPART_BASEDONDISK,DELETE_INSTANCE"
-#define	DISKPART_SETINSTANCE		"DISKPART_BASEDONDISK,SET_INSTANCE"
-#define	DISKPART_SETPROPERTY		"DISKPART_BASEDONDISK,SET_PROPERTY"
-#define	DISKPART_GETPROPERTY		"DISKPART_BASEDONDISK,GET_PROPERTY"
-#define	DISKPART_INVOKEMETHOD		"DISKPART_BASEDONDISK,INVOKE_METHOD"
-#define	DISKPART_EXECQUERY		"DISKPART_BASEDONDISK,EXEC_QUERY"
-#define	DISKPART_ASSOCIATORS		"DISKPART_BASEDONDISK,ASSOCIATORS"
-#define	DISKPART_ASSOCIATORNAMES	"DISKPART_BASEDONDISK,ASSOCIATOR_NAMES"
-#define	DISKPART_REFERENCES		"DISKPART_BASEDONDISK,REFERENCES"
-#define	DISKPART_REFERENCENAMES		"DISKPART_BASEDONDISK,REFERENCE_NAMES"
-
-static CCIMInstanceList  *createDiskPartBasedOnRefList(
-    CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error);
-
-/*
- * Solaris_DiskPartitionBasedOnDisk provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the door process prior to
- * sending a copy of the data to the CIMOM.
- */
-
-/*
- * Name: cp_getInstance_Solaris_DiskPartitionBasedOnDisk
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instance.
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-CCIMInstance*
-cp_getInstance_Solaris_DiskPartitionBasedOnDisk(CCIMObjectPath* pOP)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMPropertyList	*pCurPropList;
-	dm_descriptor_t		d_descriptor;
-	dm_descriptor_t		p_descriptor;
-	CCIMObjectPath		*antOp = NULL;
-	CCIMObjectPath		*depOp = NULL;
-	char			*name;
-	int			error;
-
-
-	if (pOP == NULL) {
-	    util_handleError(DISKPART_GETINSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if ((pCurPropList = pOP->mKeyProperties) == NULL) {
-	    util_handleError(DISKPART_GETINSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	antOp = (CCIMObjectPath *)util_getKeyValue(
-	    pCurPropList, reference, ANTECEDENT, &error);
-
-	if (error == 0) {
-	    depOp = (CCIMObjectPath *)util_getKeyValue(
-		pCurPropList, reference, DEPENDENT, &error);
-	}
-
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now, get the name of the antecedent from the object path.
-	 */
-
-	if ((pCurPropList = antOp->mKeyProperties) == NULL ||
-		((pCurPropList = depOp->mKeyProperties) == NULL)) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = antOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	d_descriptor = dm_get_descriptor_by_name(DM_MEDIA, name, &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV || d_descriptor == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	/*
-	 * Now, get the name of the dependent from the object path.
-	 */
-
-	pCurPropList = depOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string,
-	    DEVICEID, & error);
-
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	p_descriptor = dm_get_descriptor_by_name(DM_SLICE, name,
-	    &error);
-
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV || p_descriptor == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	/* Turn these descriptors in to a disk part based on instance */
-
-	inst = partbasedon_descriptor_toCCIMInstance(
-	    hostName, d_descriptor, p_descriptor, DISKPART_BASEDONDISK, &error);
-	dm_free_descriptor(d_descriptor);
-	dm_free_descriptor(p_descriptor);
-
-	if (error != 0) {
-	    util_handleError(DISKPART_GETINSTANCE, CIM_ERR_FAILED,
-		PARTBASEDON_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_DiskPartitionBasedOnDisk
- *
- * Description: Returns a linked list of instances of
- *      Solaris_DiskPartitionBasedOnDisk if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMInstanceList * if instances are found. Otherwise,
- *	NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_DiskPartitionBasedOnDisk(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList* 	instList = NULL;
-	CCIMInstance*		inst;
-	CCIMException*		ex;
-	dm_descriptor_t		*disk_descriptorp = NULL;
-	dm_descriptor_t		*part_descriptorp = NULL;
-	int			error = 0;
-	int			filter[2];
-	int			i = 0;
-	int			j = 0;
-
-	filter[0] = DM_MT_FIXED;
-	filter[1] = DM_FILTER_END;
-
-	disk_descriptorp = dm_get_descriptors(DM_MEDIA, filter, &error);
-
-	if (disk_descriptorp == NULL ||
-		disk_descriptorp[0] == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(DISKPART_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * For each one of the disks found, get the associated partitions.
-	 */
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISKPART_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex,
-		&error);
-	    dm_free_descriptors(disk_descriptorp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	for (i = 0; disk_descriptorp[i] != NULL; i ++) {
-	    part_descriptorp = dm_get_associated_descriptors(
-		disk_descriptorp[i], DM_SLICE, &error);
-
-	    /* If no partitions associated with this disk, continue */
-
-	    if (part_descriptorp == NULL) {
-		continue;
-	    }
-
-	    if (error != 0) {
-		util_handleError(DISKPART_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		dm_free_descriptors(disk_descriptorp);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-
-	    for (j = 0; part_descriptorp[j] != NULL; j ++) {
-		inst = partbasedon_descriptor_toCCIMInstance(hostName,
-		    disk_descriptorp[i], part_descriptorp[j],
-			DISKPART_BASEDONDISK, &error);
-		if (error != 0) {
-		    util_handleError(DISKPART_ENUMINSTANCES, CIM_ERR_FAILED,
-			PARTBASEDON_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		    dm_free_descriptors(disk_descriptorp);
-		    dm_free_descriptors(part_descriptorp);
-		    cim_freeInstanceList(instList);
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(DISKPART_ENUMINSTANCES, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, ex, &error);
-		    dm_free_descriptors(disk_descriptorp);
-		    dm_free_descriptors(part_descriptorp);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-
-	    dm_free_descriptors(part_descriptorp);
-	}
-
-	dm_free_descriptors(disk_descriptorp);
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_DiskPartitionBasedOnDisk
- *
- * Description: Returns a linked list of CCIMObjectPath *
- *      of Solaris_DiskPartitionBasedOnDisk if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMObjectPathList * if objects are found.
- *	Otherwise NULL is returned.
- */
-
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_DiskPartitionBasedOnDisk(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(DISKPART_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	}
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_DiskPartitionBasedOnDisk(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_DiskPartitionBasedOnDisk is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_DiskPartitionBasedOnDisk(
-    CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(DISKPART_CREATEINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return ((CCIMObjectPath *)NULL);
-}
-
-/*
- * Deleting an instance of a Solaris_DiskPartitionBasedOnDisk is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_DiskPartitionBasedOnDisk(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(DISKPART_DELETEINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_DiskPartitionBasedOnDisk
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_DiskPartitionBasedOnDisk(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(DISKPART_GETPROPERTY,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_DiskPartitionBasedOnDisk(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/*
- * Setting an instance of a Solaris_DiskPartitionBasedOnDisk is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_DiskPartitionBasedOnDisk(
-    CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(DISKPART_SETINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-
-
-/*
- * Setting a property on a Solaris_DiskPartitionBasedOnDisk is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_DiskPartitionBasedOnDisk(
-    CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-	int	error;
-
-	util_handleError(DISKPART_SETPROPERTY,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No Methods for Solaris_DiskPartitionBasedOnDisk.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_DiskPartitionBasedOnDisk(
-    CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty	*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_DiskPartitionBasedOnDisk
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *	CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *	information on the class for which to find the instances.
- *
- * 	selectList - Not used
- *	nonJoinExp - Not used
- *
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_DiskPartitionBasedOnDisk(
-    CCIMObjectPath *op, cimchar *selectList, cimchar *nonJoinExp,
-	cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(DISKPART_EXECQUERY,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_DiskPartitionBasedOnDisk(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISKPART_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISKPART_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISKPART_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
-
-/*
- * Name: cp_associators_Solaris_DiskPartitionBasedOnDisk
- *
- * Description:
- * Returns instances of objects associated with the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found.
- *	Otherwise NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_DiskPartitionBasedOnDisk(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-	CCIMPropertyList	*pCurPropList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMException		*ex;
-	dm_descriptor_t		*assoc_descriptors;
-	dm_descriptor_t		obj_desc;
-	char			*name;
-	int			error = 0;
-	int			isAntecedent = 0;
-	int			i;
-
-
-	if (pObjectName == NULL || pObjectName->mName == NULL) {
-	    util_handleError(DISKPART_ASSOCIATORS,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (strcasecmp(pObjectName->mName, LOGICAL_DISK) == 0) {
-	    isAntecedent = 1;
-	}
-
-	if (pRole != NULL) {
-	    if (strcasecmp(pRole, ANTECEDENT) == 0) {
-		if (isAntecedent != 1) {
-		    util_handleError(DISKPART_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	}
-
-	if ((pCurPropList = pObjectName->mKeyProperties) == NULL) {
-	    util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Both logical disk and disk partition have deviceid as the
-	 * key.
-	 */
-
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0) {
-	    util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent) {
-	    obj_desc = dm_get_descriptor_by_name(DM_MEDIA, name, &error);
-	} else {
-	    obj_desc = dm_get_descriptor_by_name(DM_SLICE, name, &error);
-	}
-
-	/* No device found. */
-
-	if (error == ENODEV || obj_desc == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent == 1) {
-		/*
-		 * Logical disk calling this method, return instances of the
-		 * partitions associated with this disk.
-		 */
-
-	    /* Get associated descriptors. */
-
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_SLICE, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (assoc_descriptors == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (assoc_descriptors[0] == NULL) {
-		dm_free_descriptors(assoc_descriptors);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (error != 0) {
-		util_handleError(DISKPART_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_createInstanceList();
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_FAILURE, ex, &error);
-		dm_free_descriptors(assoc_descriptors);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    /* Traverse the list and create instances of associated objects. */
-
-	    for (i = 0; assoc_descriptors[i] != NULL; i ++) {
-		inst = partition_descriptor_toCCIMInstance(hostName,
-		    assoc_descriptors[i], DISK_PARTITION, &error);
-
-		if (error != 0) {
-		    util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_FAILED,
-			PART_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		    dm_free_descriptors(assoc_descriptors);
-		    cim_freeInstanceList(instList);
-		    return ((CCIMInstanceList *)NULL);
-		}
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, ex, &error);
-		    cim_freeInstance(inst);
-		    dm_free_descriptors(assoc_descriptors);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    } /* End for */
-	} else {
-		/*
-		 * This is the partition calling this function. Return the
-		 * logical disk that this belongs to.
-		 */
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_MEDIA, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (assoc_descriptors == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (assoc_descriptors[0] == NULL) {
-		dm_free_descriptors(assoc_descriptors);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (error != 0) {
-		util_handleError(DISKPART_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_createInstanceList();
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_FAILURE, ex, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    for (i = 0; assoc_descriptors[i] != NULL; i ++) {
-		inst = logicaldisk_descriptor_toCCIMInstance(hostName,
-		    assoc_descriptors[i], LOGICAL_DISK, &error);
-
-		if (error != 0) {
-		    util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_FAILED,
-			LOGICALDISK_DESC_TO_INSTANCE_FAILURE,
-			    NULL, &error);
-		    dm_free_descriptors(assoc_descriptors);
-		    cim_freeInstanceList(instList);
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(DISKPART_ASSOCIATORS, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, ex, &error);
-		    dm_free_descriptors(assoc_descriptors);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    } /* End for */
-	}
-	dm_free_descriptors(assoc_descriptors);
-	return (instList);
-}
-
-/*
- * Name: cp_associatorNames_Solaris_DiskPartitionBasedOnDisk
- *
- * Description:
- * Returns a list of objects associated with the passed in
- * object if there are any via the object CCIMObjectPath.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found.
- *	Otherwise, NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_DiskPartitionBasedOnDisk(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(DISKPART_ASSOCIATORNAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_associators_Solaris_DiskPartitionBasedOnDisk(
-		pAssocName, pObjectName, pResultClass, pRole, pResultRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Name: cp_references_Solaris_DiskPartitionBasedOnDisk
- *
- * Description:
- * Returns instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found.
- *	Otherwise, NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_references_Solaris_DiskPartitionBasedOnDisk(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, char *pRole)
-{
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList;
-	int			error;
-
-
-	if (pObjectName == NULL) {
-	    util_handleError(DISKPART_REFERENCES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Get the list of those objects that are referred to by
-	 * the calling object.
-	 */
-
-	objList =
-	    cp_associatorNames_Solaris_DiskPartitionBasedOnDisk(
-		pAssocName, pObjectName, NULL, NULL, NULL);
-
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Now generate the list of instances to return.
-	 */
-
-	if (strcasecmp(pObjectName->mName, LOGICAL_DISK) == 0) {
-	    instList = createDiskPartBasedOnRefList(pObjectName,
-		ANTECEDENT, objList, DEPENDENT, &error);
-	} else {
-	    instList = createDiskPartBasedOnRefList(pObjectName,
-		DEPENDENT, objList, ANTECEDENT, &error);
-	}
-
-	cim_freeObjectPathList(objList);
-	return (instList);
-}
-
-/*
- * Name: cp_referenceNames_Solaris_DiskPartitionBasedOnDisk
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found.
- *	Otherwise, NULL is returned.
- *
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_DiskPartitionBasedOnDisk(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(DISKPART_REFERENCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_references_Solaris_DiskPartitionBasedOnDisk(
-		pAssocName, pObjectName, pRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Create the association class with the passed in attributes.
- */
-static
-CCIMInstanceList  *
-createDiskPartBasedOnRefList(CCIMObjectPath *pObjectName,
-    cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error)
-{
-
-	CCIMObjectPathList	*tmpList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*obj1;
-	CCIMObjectPath		*obj2;
-	CCIMException		*ex;
-
-	*error	= 0;
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISKPART_BASEDONDISK, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * If no objects associated with this one, return an empty list.
-	 */
-	if (objList == NULL) {
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)instList);
-	}
-
-	tmpList = objList;
-	while (tmpList != NULL) {
-	    obj1 = tmpList->mDataObject;
-	    obj2 = cim_copyObjectPath(pObjectName);
-	    if (obj2 == NULL) {
-		ex = cim_getLastError();
-		util_handleError(DISKPART_BASEDONDISK, CIM_ERR_FAILED,
-		    COPY_OBJPATH_FAILURE, ex, error);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    inst = cim_createInstance(DISKPART_BASEDONDISK);
-	    if (inst == NULL) {
-		ex = cim_getLastError();
-		util_handleError(DISKPART_BASEDONDISK, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_FAILURE, ex, error);
-		cim_freeObjectPath(obj2);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    util_doReferenceProperty(pObjectNameRole, obj2, cim_true, inst,
-		error);
-	    util_doReferenceProperty(objRole, obj1, cim_true, inst, error);
-	    cim_freeObjectPath(obj2);
-
-	    if (*error != 0) {
-		ex = cim_getLastError();
-		util_handleError(DISKPART_BASEDONDISK, CIM_ERR_FAILED,
-		    CREATE_REFPROP_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(DISKPART_BASEDONDISK, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tmpList = tmpList->mNext;
-	}
-	return (instList);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_DiskPartitionBasedOnDisk.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_DISKPARTITIONBASEDONDISK_H_
-#define	_SOLARIS_DISKPARTITIONBASEDONDISK_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cp_required.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_DISKPARTITIONBASEDONDISK_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_IDEInterface.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1183 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "drive_descriptors.h"
-#include "ctrl_descriptors.h"
-#include "Solaris_IDEInterface.h"
-
-#define	IDE_GETINSTANCE		"IDE_INTERFACE,GET_INSTANCE"
-#define	IDE_ENUMINSTANCES	"IDE_INTERFACE,ENUM_INSTANCES"
-#define	IDE_ENUMINSTANCENAMES	"IDE_INTERFACE,ENUM_INSTANCENAMES"
-#define	IDE_CREATEINSTANCE	"IDE_INTERFACE,CREATE_INSTANCE"
-#define	IDE_DELETEINSTANCE	"IDE_INTERFACE,DELETE_INSTANCE"
-#define	IDE_SETINSTANCE		"IDE_INTERFACE,SET_INSTANCE"
-#define	IDE_GETPROPERTY		"IDE_INTERFACE,GET_PROPERTY"
-#define	IDE_SETPROPERTY		"IDE_INTERFACE,SET_PROPERTY"
-#define	IDE_INVOKEMETHOD	"IDE_INTERFACE,INVOKE_METHOD"
-#define	IDE_EXECQUERY		"IDE_INTERFACE,EXEC_QUERY"
-#define	IDE_ASSOCIATORS		"IDE_INTERFACE,ASSOCIATORS"
-#define	IDE_ASSOCIATORNAMES	"IDE_INTERFACE,ASSOCIATOR_NAMES"
-#define	IDE_REFERENCES		"IDE_INTERFACE,REFERENCES"
-#define	IDE_REFERENCENAMES	"IDE_INTERFACE,REFERENCE_NAMES"
-
-
-static
-CCIMInstanceList *
-ideIntAssocToInstList(CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error);
-
-static
-CCIMInstance  *
-ideIntAssocToInst(CCIMObjectPath *obj1, cimchar *obj1Role,
-	CCIMObjectPath *obj2, cimchar *obj2Role, int *error);
-
-/*
- * Solaris_IDEInterface provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the door process prior to
- * sending a copy of the data to the CIMOM.
- */
-
-/*
- * Name: cp_getInstance_Solaris_IDEInterface
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instance.
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_IDEInterface(CCIMObjectPath* pOP)
-{
-	CCIMInstance* 		inst = NULL;
-	CCIMPropertyList* 	pCurPropList;
-	dm_descriptor_t		d_descriptor;
-	dm_descriptor_t		c_descriptor;
-	CCIMObjectPath		*antOp = NULL;
-	CCIMObjectPath		*depOp = NULL;
-	int			error;
-	char			*name;
-
-	if (pOP == NULL) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if ((pCurPropList = pOP->mKeyProperties) == NULL) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	antOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-	    ANTECEDENT, &error);
-
-	if (error == 0) {
-	    depOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-		DEPENDENT, &error);
-	}
-
-	if (error != 0) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now, get the name of the antecedent from the object path.
-	 */
-
-	if ((pCurPropList = antOp->mKeyProperties) == NULL) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	}
-
-	/*
-	 * The only reason it is needed to get the descriptor for these
-	 * two devices is to verify that they still exist and are valid.
-	 * If they are not found, then getting the instance for this
-	 * association as passed in by the client is not possible.
-	 */
-	c_descriptor = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-	    &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (c_descriptor == NULL || error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-	dm_free_descriptor(c_descriptor);
-
-	/*
-	 * Now, get the name of the dependent from the object path.
-	 */
-
-	if ((pCurPropList = depOp->mKeyProperties) == NULL) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	d_descriptor = dm_get_descriptor_by_name(DM_DRIVE, name,
-	    &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (d_descriptor == NULL || error == ENODEV) {
-	    d_descriptor = dm_get_descriptor_by_name(DM_ALIAS, name,
-		&error);
-	    if (d_descriptor == NULL || error == ENODEV) {
-		util_handleError(IDE_GETINSTANCE, CIM_ERR_NOT_FOUND,
-		    NULL, NULL, &error);
-		return ((CCIMInstance *)NULL);
-	    }
-	}
-
-	if (error != 0) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	dm_free_descriptor(d_descriptor);
-
-	/*
-	 * At this point I have verified I have the two devices that
-	 * are part of this association. Use the object paths I got
-	 * earlier to create the ideinterface instance.
-	 */
-	inst = ideIntAssocToInst(antOp, ANTECEDENT, depOp, DEPENDENT, &error);
-
-	if (error != 0) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_FAILED,
-		IDEINT_ASSOC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_IDEInterface
- *
- * Description: Returns a linked list of instances of
- *      Solaris_IDEInterface if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMInstanceList * if istances are found. If no instances,
- *	NULL is returned. On error, NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_IDEInterface(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*cObjList = NULL;
-	CCIMObjectPathList	*tmpObjList;
-	CCIMObjectPath		*objPath;
-	CCIMInstance		*inst;
-	CCIMException		*ex;
-	dm_descriptor_t		*d_descriptorp = NULL;
-	int			error = 0;
-
-	/*
-	 * Get the list of IDE Controllers. Then get the associated drives
-	 * via the device api.
-	 */
-
-	objPath = cim_createEmptyObjectPath(IDE_CONTROLLER);
-	if (objPath == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_OBJECT_PATH, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	cObjList = cimom_enumerateInstanceNames(objPath, cim_false);
-	cim_freeObjectPath(objPath);
-
-	/*
-	 * NULL means error.
-	 */
-	if (cObjList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_ENUMINSTANCES, CIM_ERR_FAILED,
-		ENUM_INSTANCENAMES_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (cObjList->mDataObject == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Loop through all of these controller objects and get the associated
-	 * disks.
-	 */
-
-	for (tmpObjList = cObjList;
-	    tmpObjList != NULL && tmpObjList->mDataObject != NULL;
-		tmpObjList = tmpObjList->mNext) {
-
-	    char 		*name = NULL;
-	    CCIMObjectPath 	*cOp;
-	    CCIMInstanceList	*tmpList = NULL;
-	    CCIMInstanceList	*tmpList1;
-	    CCIMPropertyList	*pCurPropList;
-	    CCIMObjectPathList	*dObjList;
-	    CCIMInstanceList	*tL;
-	    dm_descriptor_t	c_descriptor = NULL;
-	    error = 0;
-
-	    cOp = tmpObjList->mDataObject;
-	    if ((pCurPropList = cOp->mKeyProperties) == NULL) {
-		util_handleError(IDE_ENUMINSTANCES,
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		cim_freeObjectPathList(cObjList);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-		&error);
-
-	    if (error != 0) {
-		util_handleError(IDE_ENUMINSTANCES,
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		cim_freeObjectPathList(cObjList);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    c_descriptor = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-		&error);
-	    if (c_descriptor == NULL || error == ENODEV) {
-		continue;
-	    }
-	    if (error != 0) {
-		util_handleError(IDE_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_DESC_BYNAME_FAILURE, NULL,
-			&error);
-		cim_freeObjectPathList(cObjList);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    d_descriptorp = dm_get_associated_descriptors(c_descriptor,
-		DM_DRIVE, &error);
-	    dm_free_descriptor(c_descriptor);
-
-		/*
-		 * If there are no drives associated with this controller,
-		 * continue on to the next controller.
-		 */
-
-	    if (d_descriptorp == NULL) {
-		continue;
-	    }
-
-	    if (d_descriptorp[0] == NULL) {
-		dm_free_descriptors(d_descriptorp);
-		continue;
-	    }
-
-	    if (error == ENODEV) {
-		continue;
-	    }
-
-	    if (error != 0) {
-		util_handleError(IDE_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tmpList = drive_descriptors_toCCIMObjPathInstList(
-		DISK_DRIVE, d_descriptorp, &error);
-	    dm_free_descriptors(d_descriptorp);
-	    d_descriptorp = NULL;
-
-	    if (error != 0) {
-		util_handleError(IDE_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-		/*
-		 * It is possible that the controller does not have a drive
-		 * associated with it. If this is true, the list will be
-		 * NULL.
-		 */
-
-	    if (tmpList == NULL) {
-		continue;
-	    }
-
-	    dObjList = cim_createObjectPathList(tmpList);
-	    cim_freeInstanceList(tmpList);
-
-	    if (dObjList == NULL) {
-		util_handleError(IDE_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    tmpList1 = ideIntAssocToInstList(
-		cOp, ANTECEDENT, dObjList, DEPENDENT, &error);
-	    cim_freeObjectPathList(dObjList);
-
-	    if (error != 0) {
-		util_handleError(IDE_ENUMINSTANCES, CIM_ERR_FAILED,
-		    IDECTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tL = tmpList1;
-	    do {
-		inst = cim_copyInstance(tL->mDataObject);
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-		    util_handleError(IDE_ENUMINSTANCES, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, NULL, &error);
-		    cim_freeObjectPathList(cObjList);
-		    cim_freeObjectPathList(tmpList1);
-		    return ((CCIMInstanceList *)NULL);
-		}
-		tL = tL->mNext;
-	    } while (tL && tL->mDataObject != NULL);
-
-	    cim_freeInstanceList(tmpList1);
-	} /* end for */
-
-	cim_freeObjectPathList(cObjList);
-	/*
-	 * It is possible I will have an empty instance list at
-	 * this point. So, I must check and NULL this out if
-	 * there are no entries.
-	 */
-	if (instList->mDataObject == NULL) {
-	    cim_freeInstanceList(instList);
-	    instList = NULL;
-	}
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_IDEInterface
- *
- * Description: Returns a linked list of CCIMObjectPath *
- *      of Solaris_IDEInterface if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMObjectPathList * if objects are found. If no objects,
- *	an empty list is returned. On error, NULL is returned.
- */
-
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_IDEInterface(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(IDE_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_IDEInterface(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_IDEInterface is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_IDEInterface(CCIMObjectPath* pOP,
-    CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(IDE_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath *)NULL);
-}
-
-/*
- * Deleting an instance of a Solaris_IDEInterface is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_IDEInterface(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(
-	    IDE_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-/*
- * Name: cp_getProperty_Solaris_IIDEInterface
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_IDEInterface(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(IDE_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_IDEInterface(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/*
- * Setting an instance of a Solaris_IDEInterface is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_IDEInterface(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(
-	    IDE_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-
-/*
- * Setting a property on a Solaris_IDEInterface is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_IDEInterface(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-	int	error;
-
-	util_handleError(
-	    IDE_SETPROPERTY, CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No Methods for Solaris_IDEInterface.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_IDEInterface(
-    CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty 	*retVal = (CCIMProperty *)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_IDEInterface
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *	CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *	information on the class for which to find the instances.
- *
- * 	selectList - Not used
- *	nonJoinExp - Not used
- *
- * Returns:
- *	CCIMInstanceList * if matched instance is found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_IDEInterface(CCIMObjectPath *op,
-    cimchar *selectList, cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(IDE_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cimom_enumerateInstances(op, cim_false, cim_false, cim_false,
-	    cim_false, cim_false, NULL, 0);
-
-		/*
-		 * NULL means error.
-		 */
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_EXECQUERY, CIM_ERR_FAILED,
-		ENUM_INSTANCES_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (instList->mDataObject ==  NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
-
-/*
- * Name: cp_associators_Solaris_IDEInterface
- *
- * Description:
- * Returns instances of objects associated with the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. Thist list
- *	may be empty. NULL is returned on error.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_IDEInterface(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-	CCIMPropertyList	*pCurPropList;
-	CCIMInstanceList	*instList = NULL;
-	dm_descriptor_t		*assoc_descriptors = NULL;
-	dm_descriptor_t		*tmpList = NULL;
-	dm_descriptor_t		obj_desc = NULL;
-	char			*name;
-	int			error = 0;
-	int			isAntecedent = 0;
-	int			isAlias = 0;
-
-	if ((pObjectName == NULL ||
-	    (pCurPropList = pObjectName->mKeyProperties) == NULL)) {
-	    util_handleError(IDE_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (strcasecmp(pObjectName->mName, IDE_CONTROLLER) == 0) {
-	    isAntecedent = 1;
-	}
-
-	if (pRole != NULL) {
-	    if (strcasecmp(pRole, ANTECEDENT) == 0) {
-		if (isAntecedent != 1) {
-		    util_handleError(IDE_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    } else if (strcasecmp(pRole, DEPENDENT) == 0) {
-		if (isAntecedent == 1) {
-		    util_handleError(IDE_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	}
-
-	/*
-	 * Both ide controller and disk drive have deviceid as the
-	 * key.
-	 */
-
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0) {
-	    util_handleError(IDE_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent) {
-	    obj_desc = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-		&error);
-	} else {
-	    obj_desc = dm_get_descriptor_by_name(DM_DRIVE, name,
-		&error);
-	    if (obj_desc == NULL || error == ENODEV) {
-		isAlias = 1;
-		obj_desc = dm_get_descriptor_by_name(DM_ALIAS, name, &error);
-	    }
-	}
-
-	if (obj_desc == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(IDE_ASSOCIATORS, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAlias) {
-	    tmpList = dm_get_associated_descriptors(obj_desc, DM_DRIVE,
-		&error);
-	    if (tmpList == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (tmpList[0] == NULL) {
-		dm_free_descriptors(tmpList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-
-
-	if (isAntecedent) {
-		/*
-		 * Get associated descriptors.
-		 */
-
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_DRIVE, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (assoc_descriptors == NULL) {
-		return (instList);
-	    }
-
-	    if (assoc_descriptors[0] == NULL) {
-		dm_free_descriptors(assoc_descriptors);
-		return (instList);
-	    }
-
-	    if (error != 0) {
-		util_handleError(IDE_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-		/*
-		 * Generate the inst list of the associated disk drives.
-		 */
-
-	    instList = drive_descriptors_toCCIMObjPathInstList(DISK_DRIVE,
-		assoc_descriptors, &error);
-	    dm_free_descriptors(assoc_descriptors);
-
-	    if (error != 0) {
-		util_handleError(IDE_ASSOCIATORS, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	} else {
-		/*
-		 * This is the disk drive calling this function. Return the
-		 * controllers that are associated with this disk.
-		 */
-
-	    if (tmpList == NULL && obj_desc == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (tmpList != NULL) {
-		assoc_descriptors = dm_get_associated_descriptors(tmpList[0],
-		    DM_CONTROLLER, &error);
-		dm_free_descriptors(tmpList);
-	    } else {
-		assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		    DM_CONTROLLER, &error);
-		dm_free_descriptor(obj_desc);
-	    }
-
-	    if (assoc_descriptors == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (assoc_descriptors[0] == NULL) {
-		dm_free_descriptors(assoc_descriptors);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (error != 0) {
-		util_handleError(IDE_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = ctrl_descriptors_toCCIMInstanceList(IDE_CONTROLLER,
-		assoc_descriptors, &error, 2, "ata", "pcata");
-	    dm_free_descriptors(assoc_descriptors);
-
-	    if (error != 0) {
-		util_handleError(IDE_ASSOCIATORS, CIM_ERR_FAILED,
-		    IDECTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_associatorNames_Solaris_IDEInterface
- *
- * Description:
- * Returns a list of objects associated with the passed in
- * object if there are any via the object CCIMObjectPath.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. Thist list
- *	may be empty. NULL is returned on error.
- */
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_IDEInterface(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(IDE_ASSOCIATORNAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_associators_Solaris_IDEInterface(
-		pAssocName, pObjectName, pResultClass, pRole, pResultRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Name: cp_references_Solaris_IDEInterface
- *
- * Description:
- * Returns instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. Thist list
- *	may be empty. NULL is returned on error.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_references_Solaris_IDEInterface(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, char *pRole)
-{
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(IDE_REFERENCES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Get the list of those objects that are referred to by
-	 * the calling object.
-	 */
-
-	objList =
-	    cp_associatorNames_Solaris_IDEInterface(
-		pAssocName, pObjectName, NULL, NULL, NULL);
-
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Now generate the list of instances to return.
-	 */
-
-	if ((strcasecmp(pObjectName->mName, IDE_CONTROLLER)) == 0) {
-	    instList = ideIntAssocToInstList(pObjectName,
-		ANTECEDENT, objList, DEPENDENT, &error);
-	} else {
-	    instList = ideIntAssocToInstList(pObjectName,
-		DEPENDENT, objList, ANTECEDENT, &error);
-	}
-
-	cim_freeObjectPathList(objList);
-	return (instList);
-}
-
-/*
- * Name: cp_referenceNames_Solaris_IDEInterface
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. Thist list
- *	may be empty. NULL is returned on error.
- *
- */
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_IDEInterface(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(IDE_REFERENCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_references_Solaris_IDEInterface(pAssocName, pObjectName, pRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Create the association class with the passed in attributes.
- */
-static
-CCIMInstanceList  *
-ideIntAssocToInstList(CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error)
-{
-
-	CCIMObjectPathList	*tmpList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*obj1;
-	CCIMObjectPath		*obj2;
-	CCIMException		*ex;
-
-	*error = 0;
-
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_INTERFACE, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	tmpList = objList;
-	while (tmpList != NULL) {
-	    obj1 = tmpList->mDataObject;
-	    obj2 = cim_copyObjectPath(pObjectName);
-	    if (obj2 == NULL) {
-		ex = cim_getLastError();
-		util_handleError(IDE_INTERFACE, CIM_ERR_FAILED,
-		    COPY_OBJPATH_FAILURE, ex, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    inst = ideIntAssocToInst(obj1, objRole, obj2, pObjectNameRole,
-			error);
-	    cim_freeObjectPath(obj2);
-
-	    if (*error != 0) {
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(IDE_INTERFACE, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    tmpList = tmpList->mNext;
-	}
-	return (instList);
-}
-
-/*
- * Create an instance of the class with the passed in attributes.
- */
-static
-CCIMInstance  *
-ideIntAssocToInst(CCIMObjectPath *obj1, cimchar *obj1Role,
-	CCIMObjectPath *obj2, cimchar *obj2Role, int *error)
-{
-
-	CCIMInstance	*inst = NULL;
-	CCIMException	*ex;
-
-	*error = 0;
-
-	inst = cim_createInstance(IDE_INTERFACE);
-	if (inst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_INTERFACE, CIM_ERR_FAILED,
-		IDEINT_ASSOC_TO_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(obj2Role, obj2, cim_true, inst, error);
-	util_doReferenceProperty(obj1Role, obj1, cim_true, inst, error);
-	if (*error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_INTERFACE, CIM_ERR_FAILED,
-		CREATE_REFPROP_FAILURE, ex, error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_IDEInterface.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_IDEINTERFACE_H_
-#define	_SOLARIS_IDEINTERFACE_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cp_required.h>
-#include <cim_objectpath.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_IDEINTERFACE_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_MPXIOComponent.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1095 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "ctrl_descriptors.h"
-#include "Solaris_MPXIOComponent.h"
-
-#define	MPXIO_GETINSTANCE		"MPXIO_COMPONENT,GET_INSTANCE"
-#define	MPXIO_ENUMINSTANCES		"MPXIO_COMPONENT,ENUM_INSTANCES"
-#define	MPXIO_ENUMINSTANCENAMES		"MPXIO_COMPONENT,ENUM_INSTANCENAMES"
-#define	MPXIO_CREATEINSTANCE		"MPXIO_COMPONENT,CREATE_INSTANCE"
-#define	MPXIO_DELETEINSTANCE		"MPXIO_COMPONENT,DELETE_INSTANCE"
-#define	MPXIO_SETINSTANCE		"MPXIO_COMPONENT,SET_INSTANCE"
-#define	MPXIO_GETPROPERTY		"MPXIO_COMPONENT,GET_PROPERTY"
-#define	MPXIO_SETPROPERTY		"MPXIO_COMPONENT,SET_PROPERTY"
-#define	MPXIO_INVOKEMETHOD		"MPXIO_COMPONENT,INVOKE_METHOD"
-#define	MPXIO_EXECQUERY			"MPXIO_COMPONENT,EXEC_QUERY"
-#define	MPXIO_ASSOCIATORS		"MPXIO_COMPONENT,ASSOCIATORS"
-#define	MPXIO_ASSOCIATORNAMES		"MPXIO_COMPONENT,ASSOCIATOR_NAMES"
-#define	MPXIO_REFERENCES		"MPXIO_COMPONENT,REFERENCES"
-#define	MPXIO_REFERENCENAMES		"MPXIO_COMPONENT,REFERENCE_NAMES"
-
-static
-CCIMInstanceList *
-mpxioCompToInstList(CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error);
-
-static
-CCIMInstance  *
-mpxioCompToInst(CCIMObjectPath *obj1, cimchar *obj1Role,
-	CCIMObjectPath *obj2, cimchar *obj2Role, int *error);
-
-/*
- * Solaris_MPXIOComponent provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the door process prior to
- * sending a copy of the data to the CIMOM.
- */
-
-/*
- * Name: cp_getInstance_Solaris_MPXIOComponent
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instance.
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_MPXIOComponent(CCIMObjectPath* pOP)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMPropertyList	*pCurPropList;
-	CCIMObjectPath		*antOp = NULL;
-	CCIMObjectPath		*depOp = NULL;
-	dm_descriptor_t		m_descriptor;
-	dm_descriptor_t		c_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL ||
-	    (pCurPropList = pOP->mKeyProperties) == NULL) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	antOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-	    GROUP, &error);
-
-	if (error == 0) {
-	    depOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-		PART, &error);
-	}
-
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	/*
-	 * Now, get the name of the antecedent from the object path.
-	 */
-
-	if ((pCurPropList = antOp->mKeyProperties) == NULL ||
-	    (pCurPropList = depOp->mKeyProperties) == NULL) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = antOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0 || name == NULL) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * The only reason it is needed to get the descriptor for these
-	 * two devices is to verify that they still exist and are valid.
-	 * If they are not found, then getting the instance for this
-	 * association as passed in by the client is not possible.
-	 */
-	m_descriptor = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-	    &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-	if (error == ENODEV || m_descriptor == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-	dm_free_descriptor(m_descriptor);
-	/*
-	 * Now, get the name of the dependent from the object path.
-	 */
-	pCurPropList = depOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0 || name == NULL) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	c_descriptor = dm_get_descriptor_by_name(DM_PATH, name,
-	    &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-	if (error == ENODEV || c_descriptor == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-	dm_free_descriptor(c_descriptor);
-
-	/*
-	 * At this point I have verified I have the two devices that
-	 * are part of this association. Use the object paths I got
-	 * earlier to create the mpxiointerface instance.
-	 */
-	inst = mpxioCompToInst(antOp, ANTECEDENT, depOp, DEPENDENT, &error);
-
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_FAILED,
-		MPXIOINT_ASSOC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_MPXIOComponent
- *
- * Description: Returns a linked list of instances of
- *      Solaris_MPXIOComponent if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMInstanceList * if istances are found.
- *	Otherwise, NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_MPXIOComponent(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*cObjList;
-	CCIMObjectPathList	*tmpObjList;
-	CCIMObjectPath		*objPath;
-	CCIMInstance		*inst;
-	CCIMException		*ex;
-	int			error = 0;
-
-	/*
-	 * Get the list of MPXIO Controllers. Then get the associated paths
-	 * via the device api.
-	 */
-
-	objPath = cim_createEmptyObjectPath(MPXIO_CONTROLLER);
-	if (objPath == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_OBJECT_PATH, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	cObjList = cimom_enumerateInstanceNames(objPath, cim_false);
-	cim_freeObjectPath(objPath);
-
-	/*
-	 * NULL means error, empty list does not.
-	 */
-	if (cObjList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		ENUM_INSTANCENAMES_FAILURE, ex,
-		&error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (cObjList->mDataObject == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Loop through all of these controller objects and get the associated
-	 * paths.
-	 */
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	for (tmpObjList = cObjList; tmpObjList != NULL;
-	    tmpObjList = tmpObjList->mNext) {
-
-	    char 		*name = NULL;
-	    CCIMObjectPath 	*cOp;
-	    CCIMInstanceList	*tmpList;
-	    CCIMInstanceList	*tmpList1;
-	    CCIMPropertyList	*pCurPropList;
-	    CCIMObjectPathList	*dObjList;
-	    CCIMInstanceList	*tL;
-	    dm_descriptor_t	m_descriptor;
-	    dm_descriptor_t	*c_descriptorp = NULL;
-
-	    cOp = tmpObjList->mDataObject;
-	    if ((pCurPropList = cOp->mKeyProperties) == NULL) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_INVALID_PARAMETER,
-		    NULL, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-		&error);
-	    if (error != 0 || name == NULL) {
-		util_handleError(MPXIO_ENUMINSTANCES,
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    m_descriptor = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-		&error);
-	    if (error == ENODEV || m_descriptor == NULL) {
-		continue;
-	    }
-	    if (error != 0) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    c_descriptorp = dm_get_associated_descriptors(m_descriptor,
-		DM_PATH, &error);
-	    dm_free_descriptor(m_descriptor);
-		/*
-		 * If there are no paths associated with this mpxio controller,
-		 * continue on to the next controller.
-		 */
-
-	    if (c_descriptorp == NULL) {
-		continue;
-	    }
-
-	    if (c_descriptorp[0] == NULL) {
-		dm_free_descriptors(c_descriptorp);
-		continue;
-	    }
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tmpList = ctrl_descriptors_toCCIMInstanceList(
-		SCSI_CONTROLLER, c_descriptorp, &error, 5, "scsi");
-	    dm_free_descriptors(c_descriptorp);
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    dObjList = cim_createObjectPathList(tmpList);
-	    cim_freeInstanceList(tmpList);
-
-	    if (dObjList == NULL) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    tmpList1 = mpxioCompToInstList(
-		cOp, ANTECEDENT, dObjList, DEPENDENT, &error);
-	    cim_freeObjectPathList(dObjList);
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tL = tmpList1;
-	    do {
-		inst = cim_copyInstance(tL->mDataObject);
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, ex, &error);
-		    cim_freeObjectPathList(cObjList);
-		    cim_freeInstance(inst);
-		    cim_freeObjectPathList(tmpList1);
-		    return ((CCIMInstanceList *)NULL);
-		}
-		tL = tL->mNext;
-	    } while (tL);
-
-	    cim_freeObjectPathList(tmpList1);
-	} /* end for */
-
-
-	cim_freeObjectPathList(cObjList);
-
-	/*
-	 * It is possible I will have an empty instance list at
-	 * this point. So, I must check and NULL this out if
-	 * there are no entries.
-	 */
-	if (instList->mDataObject == NULL) {
-	    cim_freeInstanceList(instList);
-	    instList = NULL;
-	}
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_MPXIOComponent
- *
- * Description: Returns a linked list of CCIMObjectPath *
- *      of Solaris_MPXIOComponent if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMObjectPathList * if objects are found.
- *	Otherwise, NULL is returned.
- */
-
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_MPXIOComponent(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(MPXIO_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_MPXIOComponent(pOP);
-
-	if (instList->mDataObject != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_MPXIOComponent is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_MPXIOComponent(CCIMObjectPath* pOP,
-    CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(MPXIO_COMPONENT, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath *)NULL);
-}
-
-/*
- * Deleting an instance of a Solaris_MPXIOComponent is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_MPXIOComponent(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(MPXIO_COMPONENT, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_MPXIOComponent
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_MPXIOComponent(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-
-	if (pOP == NULL) {
-	    util_handleError(MPXIO_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_MPXIOComponent(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/*
- * Setting an instance of a Solaris_MPXIOComponent is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_MPXIOComponent(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(MPXIO_COMPONENT, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Setting a property on a Solaris_MPXIOComponent is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_MPXIOComponent(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-	int	error;
-
-	util_handleError(MPXIO_COMPONENT, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No Methods for Solaris_MPXIOComponent.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_MPXIOComponent(
-    CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty	*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_MPXIOComponent
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *	CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *	information on the class for which to find the instances.
- *
- * 	selectList - Not used
- *	nonJoinExp - Not used
- *
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_MPXIOComponent(CCIMObjectPath *op,
-    cimchar *selectList, cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_MPXIOComponent(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
-
-/*
- * Name: cp_associators_Solaris_MPXIOComponent
- *
- * Description:
- * Returns instances of objects associated with the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found.
- *	Otherwise, NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_MPXIOComponent(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-	CCIMPropertyList	*pCurPropList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMException		*ex;
-	dm_descriptor_t		*assoc_descriptors;
-	dm_descriptor_t		obj_desc;
-	char			*name;
-	int			error = 0;
-	int			isGroup = 0;
-
-	if (pObjectName == NULL ||
-	    ((pCurPropList = pObjectName->mKeyProperties) == NULL)) {
-	    util_handleError(MPXIO_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (strcasecmp(pObjectName->mName, MPXIO_CONTROLLER) == 0) {
-	    isGroup = 1;
-	}
-
-	if (pRole != NULL) {
-	    if (strcasecmp(pRole, GROUP) == 0) {
-		if (isGroup != 1) {
-		    util_handleError(MPXIO_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	}
-
-	/*
-	 * Both mpxio controller and the paths have deviceid as the
-	 * key.
-	 */
-
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0) {
-	    util_handleError(MPXIO_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isGroup == 1) {
-	    obj_desc = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-		&error);
-	} else {
-	    obj_desc = dm_get_descriptor_by_name(DM_PATH, name,
-		&error);
-	}
-	if (error == ENODEV || obj_desc == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(MPXIO_ASSOCIATORS,  CIM_ERR_FAILED,
-		DM_GET_ASSOC_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isGroup) {
-		/*
-		 * Get associated descriptors.
-		 */
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_PATH, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (assoc_descriptors == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (assoc_descriptors[0] == NULL) {
-		dm_free_descriptors(assoc_descriptors);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-		/*
-		 * Generate the inst list of the associated paths.
-		 */
-	    instList = ctrl_descriptors_toCCIMInstanceList(SCSI_CONTROLLER,
-		assoc_descriptors, &error, 1, "scsi");
-	    dm_free_descriptors(assoc_descriptors);
-
-	    if (error != 0) {
-		ex = cim_getLastError();
-		util_handleError(MPXIO_ASSOCIATORS, CIM_ERR_FAILED,
-		    SCSICTRL_DESC_TO_INSTANCE_FAILURE, ex, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	} else {
-		/*
-		 * This is the underlying ctrl calling this function. Return
-		 * the controllers that are associated with this disk.
-		 */
-
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_CONTROLLER, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (assoc_descriptors == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (assoc_descriptors[0] == NULL) {
-		dm_free_descriptors(assoc_descriptors);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    instList = ctrl_descriptors_toCCIMInstanceList(MPXIO_CONTROLLER,
-		assoc_descriptors, &error, 1, "scsi_vhci");
-	    dm_free_descriptors(assoc_descriptors);
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ASSOCIATORS, CIM_ERR_FAILED,
-		    MPXIOCTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-	return (instList);
-}
-
-/*
- * Name: cp_associatorNames_Solaris_MPXIOComponent
- *
- * Description:
- * Returns a list of objects associated with the passed in
- * object if there are any via the object CCIMObjectPath.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found.
- *	Otherwise, NULL is returned.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_MPXIOComponent(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(MPXIO_ASSOCIATORNAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-	instList =
-	    cp_associators_Solaris_MPXIOComponent(
-		pAssocName, pObjectName, pResultClass, pRole, pResultRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-	return (objList);
-}
-
-/*
- * Name: cp_references_Solaris_MPXIOComponent
- *
- * Description:
- * Returns instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. Thist list
- *	may be empty. NULL is returned on error.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_references_Solaris_MPXIOComponent(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, char *pRole)
-{
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(MPXIO_REFERENCES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Get the list of those objects that are referred to by
-	 * the calling object.
-	 */
-
-	objList =
-	    cp_associatorNames_Solaris_MPXIOComponent(
-		pAssocName, pObjectName, NULL, NULL, NULL);
-
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Now generate the list of instances to return.
-	 */
-
-	if ((strcasecmp(pObjectName->mName, MPXIO_CONTROLLER)) == 0) {
-	    instList = mpxioCompToInstList(pObjectName,
-		ANTECEDENT, objList, DEPENDENT, &error);
-	} else {
-	    instList = mpxioCompToInstList(pObjectName,
-		DEPENDENT, objList, ANTECEDENT, &error);
-	}
-
-	cim_freeObjectPathList(objList);
-	return (instList);
-}
-
-/*
- * Name: cp_referenceNames_Solaris_MPXIOComponent
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. Otherwise, NULL.
- *
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_MPXIOComponent(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(MPXIO_REFERENCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-	instList =
-	    cp_references_Solaris_MPXIOComponent(pAssocName,
-		pObjectName, pRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-	return (objList);
-}
-
-/*
- * Create the association class with the passed in attributes.
- */
-static
-CCIMInstanceList  *
-mpxioCompToInstList(CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error)
-{
-
-	CCIMObjectPathList	*tmpList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*obj1;
-	CCIMObjectPath		*obj2;
-	CCIMException		*ex;
-
-	*error = 0;
-
-	/*
-	 * If no objects associated with this one, return NULL.
-	 */
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_COMPONENT, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	tmpList = objList;
-	while (tmpList != NULL) {
-	    obj1 = tmpList->mDataObject;
-	    obj2 = cim_copyObjectPath(pObjectName);
-	    if (obj2 == NULL) {
-		ex = cim_getLastError();
-		util_handleError(MPXIO_COMPONENT, CIM_ERR_FAILED,
-		    COPY_OBJPATH_FAILURE, ex, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    inst = mpxioCompToInst(obj1, objRole, obj2, pObjectNameRole,
-		error);
-	    cim_freeObjectPath(obj2);
-	    if (*error != 0) {
-		util_handleError(MPXIO_COMPONENT, CIM_ERR_FAILED,
-		    MPXIOINT_ASSOC_TO_INSTANCE_FAILURE, NULL, error);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(MPXIO_COMPONENT, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    tmpList = tmpList->mNext;
-	}
-	return (instList);
-}
-
-/*
- * Create an instance of an mpxio group object.
- */
-static
-CCIMInstance  *
-mpxioCompToInst(CCIMObjectPath *obj1, cimchar *obj1Role,
-	CCIMObjectPath *obj2, cimchar *obj2Role, int *error)
-{
-
-	CCIMInstance	*inst = NULL;
-	CCIMException	*ex;
-
-	*error = 0;
-	inst = cim_createInstance(MPXIO_COMPONENT);
-	if (inst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_COMPONENT, CIM_ERR_FAILED,
-		MPXIOINT_ASSOC_TO_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(obj2Role, obj2, cim_true, inst, error);
-	util_doReferenceProperty(obj1Role, obj1, cim_true, inst, error);
-	if (*error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_COMPONENT, CIM_ERR_FAILED,
-		CREATE_REFPROP_FAILURE, ex, error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_MPXIOComponent.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_MPXIOCOMPONENT_H_
-#define	_SOLARIS_MPXIOCOMPONENT_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cp_required.h>
-#include <cim_objectpath.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_MPXIOCOMPONENT_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_MPXIOInterface.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1101 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "drive_descriptors.h"
-#include "ctrl_descriptors.h"
-#include "Solaris_MPXIOInterface.h"
-
-
-#define	MPXIO_GETINSTANCE		"MPXIO_INTERFACE,GET_INSTANCE"
-#define	MPXIO_ENUMINSTANCES		"MPXIO_INTERFACE,ENUM_INSTANCES"
-#define	MPXIO_ENUMINSTANCENAMES		"MPXIO_INTERFACE,ENUM_INSTANCENAMES"
-#define	MPXIO_CREATEINSTANCE		"MPXIO_INTERFACE,CREATE_INSTANCE"
-#define	MPXIO_DELETEINSTANCE		"MPXIO_INTERFACE,DELETE_INSTANCE"
-#define	MPXIO_SETINSTANCE		"MPXIO_INTERFACE,SET_INSTANCE"
-#define	MPXIO_GETPROPERTY		"MPXIO_INTERFACE,GET_PROPERTY"
-#define	MPXIO_SETPROPERTY		"MPXIO_INTERFACE,SET_PROPERTY"
-#define	MPXIO_INVOKEMETHOD		"MPXIO_INTERFACE,INVOKE_METHOD"
-#define	MPXIO_EXECQUERY			"MPXIO_INTERFACE,EXEC_QUERY"
-#define	MPXIO_ASSOCIATORS		"MPXIO_INTERFACE,ASSOCIATORS"
-#define	MPXIO_ASSOCIATORNAMES		"MPXIO_INTERFACE,ASSOCIATOR_NAMES"
-#define	MPXIO_REFERENCES		"MPXIO_INTERFACE,REFERENCES"
-#define	MPXIO_REFERENCENAMES		"MPXIO_INTERFACE,REFERENCE_NAMES"
-
-static
-CCIMInstanceList *
-mpxioIntAssocToInstList(CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error);
-
-static
-CCIMInstance  *
-mpxioIntAssocToInst(CCIMObjectPath *obj1, cimchar *obj1Role,
-	CCIMObjectPath *obj2, cimchar *obj2Role, int *error);
-
-/*
- * Solaris_MPXIOInterface provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the door process prior to
- * sending a copy of the data to the CIMOM.
- */
-
-/*
- * Name: cp_getInstance_Solaris_MPXIOInterface
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instance.
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-CCIMInstance*
-cp_getInstance_Solaris_MPXIOInterface(CCIMObjectPath* pOP)
-{
-	CCIMInstance* 		inst = NULL;
-	CCIMPropertyList* 	pCurPropList;
-	CCIMObjectPath		*antOp = NULL;
-	CCIMObjectPath		*depOp = NULL;
-	dm_descriptor_t		d_descriptor;
-	dm_descriptor_t		c_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL ||
-		((pCurPropList = pOP->mKeyProperties) == NULL)) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	antOp = (CCIMObjectPath *)util_getKeyValue(
-		pCurPropList, reference, ANTECEDENT, &error);
-
-	if (error == 0) {
-	    depOp = (CCIMObjectPath *)util_getKeyValue(
-		pCurPropList, reference, DEPENDENT, &error);
-	}
-
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	/*
-	 * Now, get the name of the antecedent from the object path.
-	 */
-
-	if (((pCurPropList = antOp->mKeyProperties) == NULL) ||
-	    ((pCurPropList = depOp->mKeyProperties) == NULL)) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = antOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string,
-	    DEVICEID, &error);
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	/*
-	 * The only reason it is needed to get the descriptor for these
-	 * two devices is to verify that they still exist and are valid.
-	 * If they are not found, then getting the instance for this
-	 * association as passed in by the client is not possible.
-	 */
-	c_descriptor = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-	    &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-	if (error == ENODEV || c_descriptor == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	dm_free_descriptor(c_descriptor);
-
-	pCurPropList = depOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string,
-	    DEVICEID, &error);
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	d_descriptor = dm_get_descriptor_by_name(DM_DRIVE, name, &error);
-
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV || d_descriptor == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-	dm_free_descriptor(d_descriptor);
-
-	/*
-	 * At this point I have verified I have the two devices that
-	 * are part of this association. Use the object paths I got
-	 * earlier to create the mpxiointerface instance.
-	 */
-	inst = mpxioIntAssocToInst(antOp, ANTECEDENT, depOp, DEPENDENT, &error);
-
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_FAILED,
-		MPXIOINT_ASSOC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_MPXIOInterface
- *
- * Description: Returns a linked list of instances of
- *      Solaris_MPXIOInterface if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMInstanceList * if istances are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_MPXIOInterface(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*cObjList;
-	CCIMObjectPathList	*tmpObjList;
-	CCIMObjectPath		*objPath;
-	CCIMInstance		*inst;
-	CCIMException		*ex;
-	dm_descriptor_t		*d_descriptorp = NULL;
-	int			error = 0;
-
-
-	objPath = cim_createEmptyObjectPath(MPXIO_CONTROLLER);
-	if (objPath == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_OBJECT_PATH, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	cObjList = cimom_enumerateInstanceNames(objPath, cim_false);
-	cim_freeObjectPath(objPath);
-
-	/*
-	 * NULL is an error. Empty list is not.
-	 */
-	if (cObjList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		ENUM_INSTANCENAMES_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (cObjList->mDataObject == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Loop through all of these controller objects and get the associated
-	 * disks.
-	 */
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	for (tmpObjList = cObjList; tmpObjList != NULL &&
-	    tmpObjList->mDataObject != NULL;
-		tmpObjList = tmpObjList->mNext) {
-
-	    CCIMObjectPath 	*cOp;
-	    CCIMInstanceList	*tmpList;
-	    CCIMInstanceList	*tmpList1 = NULL;
-	    CCIMPropertyList	*pCurPropList;
-	    CCIMObjectPathList	*dObjList;
-	    CCIMInstanceList	*tL;
-	    dm_descriptor_t	c_descriptor;
-	    char 		*name = NULL;
-
-	    cOp = tmpObjList->mDataObject;
-	    if ((pCurPropList = cOp->mKeyProperties) == NULL) {
-		util_handleError(MPXIO_ENUMINSTANCES,
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string,
-		DEVICEID, &error);
-	    if (error != 0 || name == NULL) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_INVALID_PARAMETER,
-		    NULL, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    c_descriptor = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-		&error);
-	    if (error == ENODEV || c_descriptor == NULL) {
-		continue;
-	    }
-	    if (error != 0) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    d_descriptorp = dm_get_associated_descriptors(c_descriptor,
-		DM_DRIVE, &error);
-	    dm_free_descriptor(c_descriptor);
-		/*
-		 * If there are no drives associated with this controller,
-		 * continue on to the next controller.
-		 */
-	    if (d_descriptorp == NULL ||
-		d_descriptorp[0] == NULL) {
-		continue;
-	    }
-	    if (error != 0) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tmpList = drive_descriptors_toCCIMObjPathInstList(
-		DISK_DRIVE, d_descriptorp, &error);
-	    dm_free_descriptors(d_descriptorp);
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (tmpList == NULL) {
-		continue;
-	    }
-
-	    dObjList = cim_createObjectPathList(tmpList);
-	    cim_freeInstanceList(tmpList);
-
-	    if (dObjList == NULL) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    tmpList1 = mpxioIntAssocToInstList(
-		cOp, ANTECEDENT, dObjList, DEPENDENT, &error);
-	    cim_freeObjectPathList(dObjList);
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-		/*
-		 * Assign a pointer to the tmplist. Traverse the list with
-		 * this pointer so as not to disturb the original value of
-		 * the instance list. This is needed for freeing the list
-		 * later.
-		 */
-	    tL = tmpList1;
-	    do {
-		inst = cim_copyInstance(tL->mDataObject);
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-			/*
-			 * In this case we do not free the indivual instance
-			 * added to the instance list. On error, the original
-			 * instance list is freed.
-			 */
-		    util_handleError(MPXIO_ENUMINSTANCENAMES, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, NULL, &error);
-		    cim_freeInstance(inst);
-		    cim_freeObjectPathList(cObjList);
-		    cim_freeInstanceList(tmpList1);
-		    return ((CCIMInstanceList *)NULL);
-		}
-		tL = tL->mNext;
-	    } while (tL);
-
-	    cim_freeInstanceList(tmpList1);
-	} /* end for */
-
-	cim_freeObjectPathList(cObjList);
-
-	/*
-	 * It is possible I will have an empty instance list at
-	 * this point. So, I must check and NULL this out if
-	 * there are no entries.
-	 */
-	if (instList->mDataObject == NULL) {
-	    cim_freeInstanceList(instList);
-	    instList = NULL;
-	}
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_MPXIOInterface
- *
- * Description: Returns a linked list of CCIMObjectPath *
- *      of Solaris_MPXIOInterface if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMObjectPathList * if objects are found. NULL otherwise.
- */
-
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_MPXIOInterface(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-
-	if (pOP == NULL) {
-	    util_handleError(MPXIO_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_MPXIOInterface(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_MPXIOInterface is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_MPXIOInterface(CCIMObjectPath* pOP,
-    CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(MPXIO_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath *)NULL);
-}
-
-
-/*
- * Deleting an instance of a Solaris_MPXIOInterface is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_MPXIOInterface(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(MPXIO_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_MPXIOInterface
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_MPXIOInterface(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(MPXIO_GETPROPERTY,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_MPXIOInterface(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/*
- * Setting an instance of a Solaris_MPXIOInterface is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_MPXIOInterface(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(MPXIO_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Setting a property on a Solaris_MPXIOInterface is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_MPXIOInterface(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-	int	error;
-
-	util_handleError(MPXIO_SETPROPERTY, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No Methods for Solaris_MPXIOInterface.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_MPXIOInterface(
-    CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-
-	CCIMProperty	*retVal = (CCIMProperty	*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_MPXIOInterface
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *	CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *	information on the class for which to find the instances.
- *
- * 	selectList - Not used
- *	nonJoinExp - Not used
- *
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_MPXIOInterface(CCIMObjectPath *op,
-    cimchar *selectList, cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_MPXIOInterface(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
-
-/*
- * Name: cp_associators_Solaris_MPXIOInterface
- *
- * Description:
- * Returns a instances of objects associated with the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_MPXIOInterface(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-	CCIMPropertyList	*pCurPropList;
-	CCIMInstanceList	*instList = NULL;
-	dm_descriptor_t		*assoc_descriptors;
-	dm_descriptor_t		obj_desc;
-	char			*name;
-	int			error = 0;
-	int			isAntecedent = 0;
-
-	if (pObjectName == NULL ||
-	    pObjectName->mName == NULL ||
-		((pCurPropList = pObjectName->mKeyProperties) == NULL)) {
-		util_handleError(MPXIO_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER,
-		    NULL, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	}
-
-	if (strcasecmp(pObjectName->mName, MPXIO_CONTROLLER) == 0) {
-	    isAntecedent = 1;
-	}
-
-	if (pRole != NULL) {
-	    if (strcasecmp(pRole, ANTECEDENT) == 0) {
-		if (isAntecedent != 1) {
-		    util_handleError(MPXIO_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    } else if (strcasecmp(pRole, DEPENDENT) == 0) {
-		if (isAntecedent == 1) {
-		    util_handleError(MPXIO_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	}
-
-	/*
-	 * Both mpxio controller and disk drive have deviceid as the
-	 * key.
-	 */
-
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0) {
-	    util_handleError(MPXIO_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent) {
-	    obj_desc = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-		&error);
-	} else {
-	    obj_desc = dm_get_descriptor_by_name(DM_DRIVE, name,
-		&error);
-	}
-	/*
-	 * No device found.
-	 */
-	if (error == ENODEV || obj_desc == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(MPXIO_ASSOCIATORS, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent) {
-		/*
-		 * Controller calling this method, return instances of the
-		 * disk drives associatied with this controller.
-		 */
-
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_DRIVE, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (assoc_descriptors == NULL ||
-		assoc_descriptors[0] == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-		/*
-		 * Generate the inst list of the associated disk drives.
-		 */
-
-	    instList = drive_descriptors_toCCIMObjPathInstList(DISK_DRIVE,
-		assoc_descriptors, &error);
-	    dm_free_descriptors(assoc_descriptors);
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ASSOCIATORS, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	} else {
-		/*
-		 * This is the disk drive calling this function. Return the
-		 * controllers that are associated with this disk.
-		 */
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_CONTROLLER, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (assoc_descriptors == NULL ||
-		assoc_descriptors[0] == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = ctrl_descriptors_toCCIMInstanceList(MPXIO_CONTROLLER,
-		assoc_descriptors, &error, 1, "scsi_vhci");
-	    dm_free_descriptors(assoc_descriptors);
-
-	    if (error != 0) {
-		util_handleError(MPXIO_ASSOCIATORS, CIM_ERR_FAILED,
-		    MPXIOCTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_associatorNames_Solaris_MPXIOInterface
- *
- * Description:
- * Returns a list of objects associated with the passed in
- * object if there are any via the object CCIMObjectPath.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. Otherwise, NULL.
- */
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_MPXIOInterface(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(MPXIO_ASSOCIATORNAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_associators_Solaris_MPXIOInterface(
-		pAssocName, pObjectName, pResultClass, pRole, pResultRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-	return (objList);
-}
-
-/*
- * Name: cp_references_Solaris_MPXIOInterface
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_references_Solaris_MPXIOInterface(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, char *pRole)
-{
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(MPXIO_REFERENCES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Get the list of those objects that are referred to by
-	 * the calling object.
-	 */
-
-	objList =
-	    cp_associatorNames_Solaris_MPXIOInterface(
-		pAssocName, pObjectName, NULL, NULL, NULL);
-
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Now generate the list of instances to return.
-	 */
-
-	if ((strcasecmp(pObjectName->mName, MPXIO_CONTROLLER)) == 0) {
-	    instList = mpxioIntAssocToInstList(pObjectName,
-		ANTECEDENT, objList, DEPENDENT, &error);
-	} else {
-	    instList = mpxioIntAssocToInstList(pObjectName,
-		DEPENDENT, objList, ANTECEDENT, &error);
-	}
-
-	cim_freeObjectPathList(objList);
-	return (instList);
-}
-
-/*
- * Name: cp_referenceNames_Solaris_MPXIOInterface
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. NULL otherwise.
- *
- */
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_MPXIOInterface(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(MPXIO_REFERENCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_references_Solaris_MPXIOInterface(pAssocName,
-		pObjectName, pRole);
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Create the association class with the passed in attributes.
- */
-static
-CCIMInstanceList  *
-mpxioIntAssocToInstList(CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error)
-{
-
-	CCIMObjectPathList	*tmpList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*obj1;
-	CCIMObjectPath		*obj2;
-	CCIMException		*ex;
-
-	*error = 0;
-
-	/*
-	 * If no objects associated with this one, return NULL.
-	 */
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_INTERFACE, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	tmpList = objList;
-	while (tmpList != NULL) {
-	    obj1 = tmpList->mDataObject;
-	    obj2 = cim_copyObjectPath(pObjectName);
-	    if (obj2 == NULL) {
-		ex = cim_getLastError();
-		util_handleError(MPXIO_INTERFACE, CIM_ERR_FAILED,
-		    COPY_OBJPATH_FAILURE, ex, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    inst = mpxioIntAssocToInst(obj1, objRole, obj2, pObjectNameRole,
-		error);
-	    cim_freeObjectPath(obj2);
-	    if (*error != 0) {
-		util_handleError(MPXIO_INTERFACE, CIM_ERR_FAILED,
-		    MPXIOINT_ASSOC_TO_INSTANCE_FAILURE, NULL, error);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(MPXIO_INTERFACE, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    tmpList = tmpList->mNext;
-	}
-	return (instList);
-}
-
-static
-CCIMInstance  *
-mpxioIntAssocToInst(CCIMObjectPath *obj1, cimchar *obj1Role,
-	CCIMObjectPath *obj2, cimchar *obj2Role, int *error)
-{
-
-	CCIMInstance	*inst = NULL;
-	CCIMException	*ex;
-
-	*error	= 0;
-
-	inst = cim_createInstance(MPXIO_INTERFACE);
-	if (inst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_INTERFACE, CIM_ERR_FAILED,
-		MPXIOINT_ASSOC_TO_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(obj2Role, obj2, cim_true, inst, error);
-	if (*error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_INTERFACE, CIM_ERR_FAILED,
-		CREATE_REFPROP_FAILURE, ex, error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(obj1Role, obj1, cim_true, inst,
-	    error);
-	if (*error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_INTERFACE, CIM_ERR_FAILED,
-		CREATE_REFPROP_FAILURE, ex, error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_MPXIOInterface.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_MPXIOINTERFACE_H_
-#define	_SOLARIS_MPXIOINTERFACE_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cp_required.h>
-#include <cim_objectpath.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_MPXIOINTERFACE_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_MediaPresent.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1065 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "mediapresent_descriptors.h"
-#include "drive_descriptors.h"
-#include "logicaldisk_descriptors.h"
-#include "Solaris_MediaPresent.h"
-
-#define	MEDIA_GETINSTANCE		"MEDIA_PRESENT,GET_INSTANCE"
-#define	MEDIA_ENUMINSTANCES		"MEDIA_PRESENT,ENUM_INSTANCES"
-#define	MEDIA_ENUMINSTANCENAMES		"MEDIA_PRESENT,ENUM_INSTANCENAMES"
-#define	MEDIA_CREATEINSTANCE		"MEDIA_PRESENT,CREATE_INSTANCE"
-#define	MEDIA_DELETEINSTANCE		"MEDIA_PRESENT,DELETE_INSTANCE"
-#define	MEDIA_SETINSTANCE		"MEDIA_PRESENT,SET_INSTANCE"
-#define	MEDIA_GETPROPERTY		"MEDIA_PRESENT,GET_PROPERTY"
-#define	MEDIA_SETPROPERTY		"MEDIA_PRESENT,SET_PROPERTY"
-#define	MEDIA_INVOKEMETHOD		"MEDIA_PRESENT,INVOKE_METHOD"
-#define	MEDIA_EXECQUERY			"MEDIA_PRESENT,EXEC_QUERY"
-#define	MEDIA_ASSOCIATORS		"MEDIA_PRESENT,ASSOCIATORS"
-#define	MEDIA_ASSOCIATORNAMES		"MEDIA_PRESENT,ASSOCIATOR_NAMES"
-#define	MEDIA_REFERENCES		"MEDIA_PRESENT,REFERENCES"
-#define	MEDIA_REFERENCENAMES		"MEDIA_PRESENT,REFERENCE_NAMES"
-
-
-static CCIMInstanceList  *createMediaPresRefList(
-    CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error);
-
-static CCIMInstance  *createMediaPresRefInst(
-    CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPath *objName, cimchar *objRole, int *error);
-/*
- * Solaris_MediaPresent provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the door process prior to
- * sending a copy of the data to the CIMOM.
- */
-
-/*
- * Name: cp_getInstance_Solaris_MediaPresent
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instance.
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-CCIMInstance*
-cp_getInstance_Solaris_MediaPresent(CCIMObjectPath* pOP)
-{
-	CCIMInstance* 		inst = NULL;
-	CCIMPropertyList* 	pCurPropList;
-	CCIMObjectPath		*antOp = NULL;
-	CCIMObjectPath		*depOp = NULL;
-	dm_descriptor_t		dd_descriptor;
-	dm_descriptor_t		ld_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL ||
-	    (pCurPropList = pOP->mKeyProperties) == NULL) {
-	    util_handleError(MEDIA_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	antOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-	    ANTECEDENT, &error);
-
-	if (error == 0) {
-	    depOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-		DEPENDENT, &error);
-	}
-	/*
-	 * Make sure we have both keys. If not, this is an error.
-	 */
-
-	if (error != 0) {
-	    util_handleError(MEDIA_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	/*
-	 * Now, get the name of the antecedent from the object path.
-	 */
-
-	if ((pCurPropList = antOp->mKeyProperties) == NULL ||
-	    (pCurPropList = depOp->mKeyProperties) == NULL) {
-	    util_handleError(MEDIA_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * both of the objects have the deviceid as the key value.
-	 */
-	pCurPropList = antOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0) {
-	    util_handleError(MEDIA_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	dd_descriptor = dm_get_descriptor_by_name(DM_DRIVE, name, &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-	if (error == ENODEV || dd_descriptor) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(MEDIA_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	/*
-	 * Only need the descriptor to verify the device still exists.
-	 */
-	dm_free_descriptor(dd_descriptor);
-
-	/*
-	 * Now, get the name of the dependent from the object path.
-	 */
-
-	pCurPropList = depOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0) {
-	    util_handleError(MEDIA_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	ld_descriptor = dm_get_descriptor_by_name(DM_MEDIA, name, &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV || ld_descriptor == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(MEDIA_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	dm_free_descriptor(ld_descriptor);
-
-	/* Turn these descriptors in to a media present instance */
-	inst = createMediaPresRefInst(antOp, ANTECEDENT, depOp, DEPENDENT,
-	    &error);
-	if (error != 0) {
-	    util_handleError(MEDIA_GETINSTANCE, CIM_ERR_FAILED,
-		MEDIAPRES_ASSOC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_MediaPresent
- *
- * Description: Returns a linked list of instances of associated objects
- * if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMInstanceList * if istances are found. Otherwise NULL,
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_MediaPresent(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMException*		ex;
-	dm_descriptor_t		*dd_descriptorp = NULL;
-	dm_descriptor_t		*ld_descriptorp = NULL;
-	int			error = 0;
-	int			filter[2];
-	int			i = 0;
-	int			j = 0;
-
-	filter[0] = DM_DT_FIXED;
-	filter[1] = DM_FILTER_END;
-
-	if (pOP == NULL) {
-	    util_handleError(MEDIA_ENUMINSTANCES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	dd_descriptorp = dm_get_descriptors(DM_DRIVE, filter, &error);
-	if (dd_descriptorp == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (dd_descriptorp[0] == NULL) {
-	    dm_free_descriptors(dd_descriptorp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(MEDIA_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * For each one of the drives found, get the associated media, if
-	 * any.
-	 */
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MEDIA_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    dm_free_descriptors(dd_descriptorp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	for (i = 0; dd_descriptorp[i] != NULL; i ++) {
-	    ld_descriptorp = dm_get_associated_descriptors(
-		dd_descriptorp[i], DM_MEDIA, &error);
-
-	    /* If no media associated with this disk, continue */
-
-	    if (ld_descriptorp == NULL) {
-		continue;
-	    }
-
-	    if (error != 0) {
-		util_handleError(MEDIA_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		dm_free_descriptors(dd_descriptorp);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    for (j = 0; ld_descriptorp[j] != NULL; j ++) {
-		inst = mediapresent_descriptor_toCCIMInstance(hostName,
-		    dd_descriptorp[i], ld_descriptorp[j],
-			MEDIA_PRESENT, &error);
-		if (error != 0) {
-		    util_handleError(MEDIA_ENUMINSTANCES, CIM_ERR_FAILED,
-			MEDIAPRES_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		    dm_free_descriptors(dd_descriptorp);
-		    dm_free_descriptors(ld_descriptorp);
-		    cim_freeInstanceList(instList);
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(MEDIA_ENUMINSTANCES, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, ex, NULL);
-		    dm_free_descriptors(dd_descriptorp);
-		    dm_free_descriptors(ld_descriptorp);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-
-	    dm_free_descriptors(ld_descriptorp);
-	}
-	dm_free_descriptors(dd_descriptorp);
-
-	if (instList->mDataObject == NULL) {
-	    cim_freeInstanceList(instList);
-	    instList = NULL;
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_MediaPresent
- *
- * Description: Returns a linked list of CCIMObjectPath *
- *      of Solaris_MediaPresent if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMObjectPathList * if objects are found. Otherwise NULL.
- */
-
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_MediaPresent(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(MEDIA_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_MediaPresent(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_MediaPresent is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_MediaPresent(
-    CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(MEDIA_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return ((CCIMObjectPath *)NULL);
-}
-
-/*
- * Deleting an instance of a Solaris_MediaPresent is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_MediaPresent(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(MEDIA_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_MediaPresent
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_MediaPresent(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(MEDIA_GETPROPERTY, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_MediaPresent(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/*
- * Setting an instance of a Solaris_MediaPresent is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_MediaPresent(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(MEDIA_SETINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Setting a property on a Solaris_MediaPresent is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_MediaPresent(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-	int	error;
-
-	util_handleError(MEDIA_SETPROPERTY, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No Methods for Solaris_MediaPresent.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_MediaPresent(CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty	*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_MediaPresent
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *	CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *	information on the class for which to find the instances.
- *
- * 	selectList - Not used
- *	nonJoinExp - Not used
- *
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_MediaPresent(CCIMObjectPath *op, cimchar *selectList,
-    cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(MEDIA_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_MediaPresent(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MEDIA_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MEDIA_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MEDIA_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
-
-/*
- * Name: cp_associators_Solaris_MediaPresent
- *
- * Description:
- * Returns a instances of objects associated with the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found.
- *	NULL is returned on error and for an empty list.
- */
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_MediaPresent(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-	CCIMPropertyList	*pCurPropList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMException		*ex;
-	dm_descriptor_t		*assoc_descriptors;
-	dm_descriptor_t		obj_desc;
-	char			*name;
-	int			error = 0;
-	int			isAntecedent = 0;
-	int			i;
-
-
-	if (pObjectName == NULL || pObjectName->mName == NULL ||
-		pObjectName->mKeyProperties == NULL) {
-	    util_handleError(MEDIA_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (strcasecmp(pObjectName->mName, DISK_DRIVE) == 0) {
-	    isAntecedent = 1;
-	}
-
-	if (pRole != NULL) {
-	    if (strcasecmp(pRole, ANTECEDENT) == 0) {
-		if (isAntecedent != 1) {
-		    util_handleError(MEDIA_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    } else if (strcasecmp(pRole, DEPENDENT) == 0) {
-		if (isAntecedent == 1) {
-		    util_handleError(MEDIA_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	}
-
-	/*
-	 * Both logical disk and disk drive have deviceid as the
-	 * key.
-	 */
-
-	pCurPropList = pObjectName->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0) {
-	    util_handleError(MEDIA_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent) {
-	    obj_desc = dm_get_descriptor_by_name(DM_DRIVE, name, &error);
-	} else {
-	    obj_desc = dm_get_descriptor_by_name(DM_MEDIA, name, &error);
-	}
-	if (error == ENODEV || obj_desc == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(MEDIA_ASSOCIATORS, CIM_ERR_FAILED,
-		    DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent) {
-
-	    /* Get associated descriptors. */
-
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_MEDIA, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (assoc_descriptors == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (assoc_descriptors[0] == NULL) {
-		dm_free_descriptors(assoc_descriptors);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (error != 0) {
-		util_handleError(MEDIA_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_createInstanceList();
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(MEDIA_ASSOCIATORS, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-		dm_free_descriptors(assoc_descriptors);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    /* Traverse the list and create instances of associated objects. */
-
-	    for (i = 0; assoc_descriptors[i] != NULL; i ++) {
-		inst = logicaldisk_descriptor_toCCIMInstance(hostName,
-		    assoc_descriptors[i], LOGICAL_DISK, &error);
-
-		if (error != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(MEDIA_ASSOCIATORS, CIM_ERR_FAILED,
-			LOGICALDISK_DESC_TO_INSTANCE_FAILURE, ex, &error);
-		    dm_free_descriptors(assoc_descriptors);
-		    cim_freeInstanceList(instList);
-		    return ((CCIMInstanceList *)NULL);
-		}
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(MEDIA_ASSOCIATORS, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, ex, &error);
-		    dm_free_descriptors(assoc_descriptors);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    } /* End for */
-	} else {
-		/*
-		 * This is the logical disk calling this function. Return the
-		 * logical disk that this belongs to.
-		 */
-
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_DRIVE, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (assoc_descriptors == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (assoc_descriptors[0] == NULL) {
-		dm_free_descriptors(assoc_descriptors);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (error != 0) {
-		util_handleError(MEDIA_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_createInstanceList();
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(MEDIA_ASSOCIATORS, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-		dm_free_descriptors(assoc_descriptors);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    for (i = 0; assoc_descriptors[i] != NULL; i ++) {
-		inst = drive_descriptor_toCCIMInstance(hostName,
-		    assoc_descriptors[i], DISK_DRIVE, &error);
-
-		if (error != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(MEDIA_ASSOCIATORS, CIM_ERR_FAILED,
-			DRIVE_DESC_TO_INSTANCE_FAILURE, ex, &error);
-		    dm_free_descriptors(assoc_descriptors);
-		    cim_freeInstanceList(instList);
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(MEDIA_ASSOCIATORS, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, ex, &error);
-		    dm_free_descriptors(assoc_descriptors);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    } /* End for */
-	}
-	dm_free_descriptors(assoc_descriptors);
-	return (instList);
-}
-
-/*
- * Name: cp_associatorNames_Solaris_MediaPresent
- *
- * Description:
- * Returns a list of objects associated with the passed in
- * object if there are any via the object CCIMObjectPath.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_MediaPresent(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(MEDIA_ASSOCIATORNAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_associators_Solaris_MediaPresent(
-		pAssocName, pObjectName, pResultClass, pRole, pResultRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Name: cp_references_Solaris_MediaPresent
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_references_Solaris_MediaPresent(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, char *pRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(MEDIA_REFERENCES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Get the list of those objects that are referred to by
-	 * the calling object.
-	 */
-
-	objList =
-	    cp_associatorNames_Solaris_MediaPresent(
-		pAssocName, pObjectName, NULL, NULL, NULL);
-	/*
-	 * Now generate the list of instances to return.
-	 */
-
-	if (strcasecmp(pObjectName->mName, DISK_DRIVE) == 0) {
-	    instList = createMediaPresRefList(pObjectName,
-		ANTECEDENT, objList, DEPENDENT, &error);
-	} else {
-	    instList = createMediaPresRefList(pObjectName,
-		DEPENDENT, objList, ANTECEDENT, &error);
-	}
-
-	cim_freeObjectPathList(objList);
-	return (instList);
-}
-
-/*
- * Name: cp_referenceNames_Solaris_MediaPresent
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. Thist list
- *	may be empty. NULL is returned on error.
- *
- */
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_MediaPresent(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(MEDIA_REFERENCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_references_Solaris_MediaPresent(pAssocName, pObjectName, pRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Create the association class with the passed in attributes.
- */
-static
-CCIMInstanceList  *
-createMediaPresRefList(CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error)
-{
-
-	CCIMObjectPathList	*tmpList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*obj1;
-	CCIMObjectPath		*obj2;
-	CCIMException		*ex;
-
-	*error = 0;
-
-
-	/*
-	 * If no objects associated with this one, return NULL.
-	 */
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MEDIA_PRESENT, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	tmpList = objList;
-	while (tmpList != NULL) {
-	    obj1 = tmpList->mDataObject;
-	    obj2 = cim_copyObjectPath(pObjectName);
-	    if (obj2 == NULL) {
-		ex = cim_getLastError();
-		util_handleError(MEDIA_PRESENT, CIM_ERR_FAILED,
-		    COPY_OBJPATH_FAILURE, ex, error);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    inst = createMediaPresRefInst(obj2, pObjectNameRole, obj1,
-		objRole, error);
-	    cim_freeObjectPath(obj2);
-
-	    if (*error != 0) {
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(MEDIA_PRESENT, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_FAILURE, ex, NULL);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tmpList = tmpList->mNext;
-	}
-	return (instList);
-}
-static
-CCIMInstance  *
-createMediaPresRefInst(CCIMObjectPath *obj2,
-    cimchar *pObjectNameRole, CCIMObjectPath *obj1, cimchar *objRole,
-	int *error)
-{
-
-	CCIMInstance	*inst = NULL;
-	CCIMException	*ex;
-
-	*error	= 0;
-
-	inst  = cim_createInstance(MEDIA_PRESENT);
-	if (inst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MEDIA_PRESENT, CIM_ERR_FAILED, NULL, NULL, error);
-	    return ((CCIMInstance *)NULL);
-	}
-	util_doReferenceProperty(pObjectNameRole, obj2, cim_true, inst, error);
-	if (*error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MEDIA_PRESENT, CIM_ERR_FAILED,
-		CREATE_REFPROP_FAILURE, ex, error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(objRole, obj1, cim_true, inst, error);
-	if (*error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MEDIA_PRESENT, CIM_ERR_FAILED,
-		CREATE_REFPROP_FAILURE, ex, error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty("FixedMedia", boolean, "1", cim_false, inst, error);
-	if (*error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MEDIA_PRESENT, CIM_ERR_FAILED,
-		CREATE_REFPROP_FAILURE, ex, error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	return (inst);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_MediaPresent.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_DISKPARTITIONBASEDONDISK_H_
-#define	_SOLARIS_DISKPARTITIONBASEDONDISK_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cp_required.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_DISKPARTITIONBASEDONDISK_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_RealizesDiskDrive.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1038 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "disk_descriptors.h"
-#include "realizesdiskdrive_descriptors.h"
-#include "Solaris_RealizesDiskDrive.h"
-
-#define	REALIZES_GETINSTANCE		"REALIZES_DISKDRIVE,GET_INSTANCE"
-#define	REALIZES_ENUMINSTANCES		"REALIZES_DISKDRIVE,ENUM_INSTANCES"
-#define	REALIZES_ENUMINSTANCENAMES \
-	"REALIZES_BASEDONDISK,ENUM_INSTANCENAMES"
-#define	REALIZES_CREATEINSTANCE		"REALIZES_DISKDRIVE,CREATE_INSTANCE"
-#define	REALIZES_DELETEINSTANCE		"REALIZES_DISKDRIVE,DELETE_INSTANCE"
-#define	REALIZES_SETINSTANCE		"REALIZES_DISKDRIVE,SET_INSTANCE"
-#define	REALIZES_SETPROPERTY		"REALIZES_DISKDRIVE,SET_PROPERTY"
-#define	REALIZES_GETPROPERTY		"REALIZES_DISKDRIVE,GET_PROPERTY"
-#define	REALIZES_INVOKEMETHOD		"REALIZES_DISKDRIVE,INVOKE_METHOD"
-#define	REALIZES_EXECQUERY		"REALIZES_DISKDRIVE,EXEC_QUERY"
-#define	REALIZES_ASSOCIATORS		"REALIZES_DISKDRIVE,ASSOCIATORS"
-#define	REALIZES_ASSOCIATORNAMES	"REALIZES_DISKDRIVE,ASSOCIATOR_NAMES"
-#define	REALIZES_REFERENCES		"REALIZES_DISKDRIVE,REFERENCES"
-#define	REALIZES_REFERENCENAMES		"REALIZES_DISKDRIVE,REFERENCE_NAMES"
-
-
-static
-CCIMInstanceList  *
-createRealizesDiskDriveList(CCIMObjectPath *pObjectName,
-    cimchar *pObjectNameRole, CCIMObjectPathList *objList,
-	cimchar *objRole, int *error);
-/*
- * Solaris_RealizesDiskDrive provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the door process prior to
- * sending a copy of the data to the CIMOM.
- */
-
-/*
- * Name: cp_getInstance_Solaris_RealizesDiskDrive
- *
- * Description: Returns an instance of Solaris_RealizesDiskDrive if one
- *  is found that matches the object path passed in .
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instance.
- * Returns: CCIMInstance * if match is found, or NULL if not.
- *
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_RealizesDiskDrive(CCIMObjectPath* pOP)
-{
-
-	CCIMInstance 		*inst = NULL;
-	CCIMPropertyList	*pCurPropList;
-	CCIMObjectPath		*antOp = NULL;
-	CCIMObjectPath		*depOp = NULL;
-	dm_descriptor_t		d_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL ||
-	    (pCurPropList = pOP->mKeyProperties) == NULL) {
-	    util_handleError(REALIZES_GETINSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	antOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-	    ANTECEDENT, &error);
-
-	if (error == 0) {
-	    depOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-		DEPENDENT, &error);
-	}
-
-	if (error != 0) {
-	    util_handleError(REALIZES_GETINSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * In this provider, the antecedent has no provider, therefore
-	 * we check the validity of this request based on a match
-	 * from the device api to the dependent name. The dependent in
-	 * this case is a disk drive.
-	 */
-
-	if ((pCurPropList = depOp->mKeyProperties) == NULL) {
-	    util_handleError(REALIZES_GETINSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0) {
-	    util_handleError(REALIZES_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	d_descriptor = dm_get_descriptor_by_name(DM_DRIVE, name,
-	    &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV || d_descriptor == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(REALIZES_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Turn this in to a realizes diskdrive instance.
-	 */
-
-	inst = realizesdiskdrive_descriptor_toCCIMInstance(
-	    hostName, antOp, d_descriptor, REALIZES_DISKDRIVE, &error);
-	dm_free_descriptor(d_descriptor);
-
-	if (error != 0) {
-	    util_handleError(REALIZES_GETINSTANCE, CIM_ERR_FAILED,
-		REALIZESDD_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_RealizesDiskDrive
- *
- * Description: Returns a linked list of instances of this association.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMInstanceList * if istances are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_RealizesDiskDrive(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList;
-	CCIMObjectPathList	*tmpObjList;
-	CCIMPropertyList	*pCurPropList;
-	CCIMObjectPath		*objPath;
-	CCIMInstance		*inst;
-	CCIMException		*ex;
-	dm_descriptor_t		d_descriptor;
-	int			error = 0;
-	int			filter[2];
-
-	filter[0] = DM_MT_FIXED;
-	filter[1] = DM_FILTER_END;
-
-	/*
-	 * First see if there are any physical package instances on this
-	 * system. If none found, then we cannot enumerate instances of
-	 * this association. We will return an empty list.
-	 */
-
-	inst = cim_createInstance(PHYSICAL_PACKAGE);
-	if (inst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_INSTANCE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	objPath = cim_createObjectPath(inst);
-	cim_freeInstance(inst);
-
-	if (objPath == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_OBJECT_PATH_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	objList = cimom_enumerateInstanceNames(objPath, cim_false);
-	cim_freeObjectPath(objPath);
-
-	/*
-	 * NULL means error. Empty list does not.
-	 */
-	if (objList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_ENUMINSTANCES, CIM_ERR_FAILED,
-		ENUM_INSTANCENAMES_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (objList->mDataObject == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_INSTANCE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	for (tmpObjList = objList; tmpObjList->mDataObject != NULL;
-	    tmpObjList = tmpObjList->mNext) {
-		/*
-		 * Make sure there is a device associated with the instance of
-		 * the physical package.
-		 */
-
-	    char *name = NULL;
-
-	    if ((pCurPropList =
-		((CCIMObjectPath *)tmpObjList->mDataObject)->mKeyProperties)
-		    == NULL) {
-		util_handleError(REALIZES_ENUMINSTANCES,
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string, TAG,
-		&error);
-	    if (error != 0 || name == NULL) {
-		util_handleError(REALIZES_ENUMINSTANCES,
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(objList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    d_descriptor = dm_get_descriptor_by_name(DM_DRIVE, name, &error);
-	    if (error == ENODEV || d_descriptor == NULL) {
-		continue;
-	    }
-
-	    if (error != 0) {
-		util_handleError(REALIZES_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(objList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    inst = realizesdiskdrive_descriptor_toCCIMInstance(hostName,
-		tmpObjList->mDataObject, d_descriptor,
-		    REALIZES_DISKDRIVE, &error);
-	    dm_free_descriptor(d_descriptor);
-
-	    if (error != 0) {
-		util_handleError(REALIZES_ENUMINSTANCES, CIM_ERR_FAILED,
-		    REALIZESDD_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(objList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		util_handleError(REALIZES_ENUMINSTANCES, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, NULL, &error);
-		cim_freeObjectPathList(objList);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-
-	cim_freeObjectPathList(objList);
-	if (instList->mDataObject == NULL) {
-	    cim_freeInstanceList(instList);
-	    instList = NULL;
-	}
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_RealizesDiskDrive
- *
- * Description: Returns a linked list of CCIMObjectPath *
- *      of Solaris_RealizesDiskDrive objects if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMObjectPathList * if objects are found. NULL Otherwise.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_RealizesDiskDrive(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-
-	if (pOP == NULL) {
-	    util_handleError(REALIZES_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_RealizesDiskDrive(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_RealizesDiskDrive is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_RealizesDiskDrive(
-    CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(REALIZES_CREATEINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return ((CCIMObjectPath *)NULL);
-}
-
-
-/*
- * Deleting an instance of a Solaris_RealizesDiskDrive is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_RealizesDiskDrive(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(REALIZES_DELETEINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_RealizesDiskDrive
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_RealizesDiskDrive(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(REALIZES_GETPROPERTY,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_RealizesDiskDrive(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-/*
- * Setting an instance of a Solaris_RealizesDiskDrive is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_RealizesDiskDrive(
-    CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(REALIZES_SETINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-
-/*
- * Setting a property on a Solaris_RealizesDiskDrive is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_RealizesDiskDrive(
-    CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-	int	error;
-
-	util_handleError(REALIZES_SETPROPERTY,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No Methods for Solaris_RealizesDiskDrive.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_RealizesDiskDrive(
-    CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty	*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_RealizesDiskDrive
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *	CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *	information on the class for which to find the instances.
- *
- * 	selectList - Not used
- *	nonJoinExp - Not used
- *
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_RealizesDiskDrive(
-    CCIMObjectPath *op, cimchar *selectList, cimchar *nonJoinExp,
-	cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(REALIZES_EXECQUERY, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_RealizesDiskDrive(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
-
-/*
- * Name: cp_associators_Solaris_RealizesDiskDrive
- *
- * Description:
- * Returns a instances of objects associated with the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. NULL Otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_RealizesDiskDrive(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-	CCIMPropertyList	*pCurPropList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst = NULL;
-	CCIMException		*ex;
-	dm_descriptor_t		obj_desc;
-	char			*name;
-	int			error = 0;
-	int			isAntecedent = 0;
-
-	if (pObjectName == NULL ||
-	    pObjectName->mName == NULL ||
-		pObjectName->mKeyProperties == NULL) {
-	    util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (strcasecmp(pObjectName->mName, PHYSICAL_PACKAGE) == 0) {
-	    isAntecedent = 1;
-	}
-
-	if (pRole != NULL) {
-	    if (strcasecmp(pRole, ANTECEDENT) == 0) {
-		if (isAntecedent != 1) {
-		    util_handleError(REALIZES_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	}
-
-	pCurPropList = pObjectName->mKeyProperties;
-	/*
-	 * Get the key. It will either be deviceid or tag. These are
-	 * mutually exclusive.
-	 */
-	if (isAntecedent) {
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string, TAG,
-		&error);
-	} else {
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-		&error);
-	}
-
-	/*
-	 * We went through the whole list and didn't find the necessary
-	 * key value.
-	 */
-
-	if (error != 0) {
-	    util_handleError(REALIZES_ASSOCIATORS,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	obj_desc = dm_get_descriptor_by_name(DM_DRIVE, name, &error);
-	/*
-	 * No device found.
-	 */
-	if (error == ENODEV || obj_desc == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-
-	}
-	if (error != 0) {
-	    util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent == 1) {
-		/*
-		 * Physical package calling this method, return instances of the
-		 * disk drive associated with this physical package.
-		 */
-
-	    inst = disk_descriptor_toCCIMInstance(hostName, obj_desc, DISK,
-		&error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (error != 0) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-		    DISK_DESC_TO_INSTANCE_FAILURE, ex, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_createInstanceList();
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    instList = cim_addInstance(instList, inst);
-
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, &error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	} else {
-		/*
-		 * This is the disk calling this function. Return the physical
-		 * package instances, if any, that are found on this system.
-		 * Turn the object descriptor in to a CCIMObjectPath. Then, ask
-		 * the CIMOM for any instances of this.
-		 */
-
-		CCIMObjectPath	*ob;
-		CCIMInstance	*in =
-		    cim_createInstance(PHYSICAL_PACKAGE);
-
-		if (in == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-			CREATE_INSTANCE_FAILURE, ex, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-		util_doProperty(
-		    DEVICEID, string, name, cim_true, inst, &error);
-
-		ob = cim_createObjectPath(in);
-		cim_freeInstance(in);
-
-		if (ob == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-			CREATE_OBJECT_PATH_FAILURE, ex, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-		inst = cimom_getInstance(ob, cim_false, cim_false,
-		    cim_false, cim_false, NULL, 0);
-		cim_freeObjectPath(ob);
-
-		/*
-		 * NULL indicates error. Empty object does not.
-		 */
-		if (inst == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-			GET_INSTANCE_FAILURE, ex, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-		if (inst->mProperties == NULL) {
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-		instList = cim_createInstanceList();
-		if (instList == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-			CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstanceList *)NULL);
-		}
-		instList = cim_addInstance(instList, inst);
-
-		if (instList == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, ex, &error);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_associatorNames_Solaris_RealizesDiskDrive
- *
- * Description:
- * Returns a list of objects associated with the passed in
- * object if there are any via the object CCIMObjectPath.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_RealizesDiskDrive(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-
-	if (pObjectName == NULL) {
-	    util_handleError(REALIZES_ASSOCIATORNAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_associators_Solaris_RealizesDiskDrive(
-		pAssocName, pObjectName, pResultClass, pRole, pResultRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Name: cp_references_Solaris_RealizesDiskDrive
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_references_Solaris_RealizesDiskDrive(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, char *pRole)
-{
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(REALIZES_REFERENCES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Get the list of those objects that are referred to by
-	 * the calling object.
-	 */
-
-	objList =
-	    cp_associatorNames_Solaris_RealizesDiskDrive(
-		pAssocName, pObjectName, NULL, NULL, NULL);
-
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Now generate the list of instances to return.
-	 */
-
-	if ((strcasecmp(pObjectName->mName, PHYSICAL_PACKAGE)) == 0) {
-	    instList = createRealizesDiskDriveList(pObjectName, ANTECEDENT,
-		objList, DEPENDENT, &error);
-	} else {
-	    instList = createRealizesDiskDriveList(pObjectName, DEPENDENT,
-		objList, ANTECEDENT, &error);
-	}
-
-	cim_freeObjectPathList(objList);
-	return (instList);
-}
-
-/*
- * Name: cp_referenceNames_Solaris_RealizesDiskDrive
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. NULL otherwise.
- *
- */
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_RealizesDiskDrive(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pRole)
-{
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(REALIZES_REFERENCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_references_Solaris_RealizesDiskDrive(pAssocName,
-		pObjectName, pRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Create the association class with the passed in attributes.
- */
-static
-CCIMInstanceList  *
-createRealizesDiskDriveList(CCIMObjectPath *pObjectName,
-    cimchar *pObjectNameRole, CCIMObjectPathList *objList,
-	cimchar *objRole, int *error)
-{
-
-	CCIMObjectPathList	*tmpList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*obj1;
-	CCIMObjectPath		*obj2;
-	CCIMException		*ex;
-
-	*error = 0;
-
-	/*
-	 * If no objects associated with this one, return NULL.
-	 */
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_DISKDRIVE,
-		CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	tmpList = objList;
-	while (tmpList != NULL) {
-	    obj1 = tmpList->mDataObject;
-	    obj2 = cim_copyObjectPath(pObjectName);
-	    if (obj2 == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_DISKDRIVE, CIM_ERR_FAILED,
-		    COPY_OBJPATH_FAILURE, ex, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    inst = cim_createInstance(REALIZES_DISKDRIVE);
-	    if (inst == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_DISKDRIVE,
-		    CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    util_doReferenceProperty(pObjectNameRole, obj2, cim_true,
-		inst, error);
-	    cim_freeObjectPath(obj2);
-
-	    if (*error != 0) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_DISKDRIVE,
-		    CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    util_doReferenceProperty(objRole, obj1, cim_true, inst, error);
-
-	    if (*error != 0) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_DISKDRIVE, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_DISKDRIVE, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tmpList = tmpList->mNext;
-	}
-	return (instList);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_RealizesDiskDrive.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_REALIZESDISKDRIVE_H_
-#define	_SOLARIS_REALIZESDISKDRIVE_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cp_required.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_REALIZESDISKDRIVE_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_RealizesExtent.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,942 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "disk_descriptors.h"
-#include "logicaldisk_descriptors.h"
-#include "realizesextent_descriptors.h"
-#include "Solaris_RealizesExtent.h"
-
-#define	REALIZES_GETINSTANCE		"REALIZES_EXTENT,GET_INSTANCE"
-#define	REALIZES_ENUMINSTANCES		"REALIZES_EXTENT,ENUM_INSTANCES"
-#define	REALIZES_ENUMINSTANCENAMES \
-	"REALIZES_EXTENT,ENUM_INSTANCENAMES"
-#define	REALIZES_CREATEINSTANCE		"REALIZES_EXTENT,CREATE_INSTANCE"
-#define	REALIZES_DELETEINSTANCE		"REALIZES_EXTENT,DELETE_INSTANCE"
-#define	REALIZES_SETINSTANCE		"REALIZES_EXTENT,SET_INSTANCE"
-#define	REALIZES_SETPROPERTY		"REALIZES_EXTENT,SET_PROPERTY"
-#define	REALIZES_GETPROPERTY		"REALIZES_EXTENT,GET_PROPERTY"
-#define	REALIZES_INVOKEMETHOD		"REALIZES_EXTENT,INVOKE_METHOD"
-#define	REALIZES_EXECQUERY		"REALIZES_EXTENT,EXEC_QUERY"
-#define	REALIZES_ASSOCIATORS		"REALIZES_EXTENT,ASSOCIATORS"
-#define	REALIZES_ASSOCIATORNAMES	"REALIZES_EXTENT,ASSOCIATOR_NAMES"
-#define	REALIZES_REFERENCES		"REALIZES_EXTENT,REFERENCES"
-#define	REALIZES_REFERENCENAMES		"REALIZES_EXTENT,REFERENCE_NAMES"
-
-static
-CCIMInstanceList  *
-createRealizesExtentList(CCIMObjectPath *pObjectName,
-    cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error);
-/*
- * Solaris_RealizesExtent provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the door process prior to
- * sending a copy of the data to the CIMOM.
- */
-
-/*
- * Name: cp_getInstance_Solaris_RealizesExtent
- *
- * Description: Returns an instance of Solaris_RealizesExtent if one
- *  is found that matches the object path passed in .
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instance.
- * Returns: CCIMInstance * if match is found, or NULL if not.
- *
- */
-
-CCIMInstance*
-cp_getInstance_Solaris_RealizesExtent(CCIMObjectPath* pOP)
-{
-
-	CCIMInstance 		*inst = NULL;
-	CCIMPropertyList	*pCurPropList;
-	CCIMObjectPath		*antOp = NULL;
-	CCIMObjectPath		*depOp = NULL;
-	dm_descriptor_t		d_descriptor;
-	char			*name;
-	int			error;
-
-
-	if (pOP == NULL || pOP->mKeyProperties == NULL) {
-	    util_handleError(REALIZES_GETINSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	}
-
-	pCurPropList = pOP->mKeyProperties;
-	antOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-	    ANTECEDENT, &error);
-
-	if (error == 0) {
-	    depOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-		DEPENDENT, &error);
-	}
-
-	/*
-	 * Make sure we have both keys. If not, this is an error.
-	 */
-
-	if (error != 0) {
-	    util_handleError(REALIZES_GETINSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now get the name of the antecedent from the object path.
-	 */
-
-	if (antOp->mKeyProperties == NULL ||
-	    depOp->mKeyProperties == NULL) {
-	    util_handleError(REALIZES_GETINSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = antOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, TAG, &error);
-
-	if (error != 0 || name == NULL) {
-	    util_handleError(REALIZES_GETINSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	d_descriptor = dm_get_descriptor_by_name(DM_MEDIA, name, &error);
-
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV || d_descriptor == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(REALIZES_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Turn this in to a realizes extent instance.
-	 */
-
-	inst = realizesextent_descriptor_toCCIMInstance(hostName, d_descriptor,
-	    REALIZES_EXTENT, &error);
-	dm_free_descriptor(d_descriptor);
-
-	if (error != 0) {
-	    util_handleError(REALIZES_GETINSTANCE, CIM_ERR_FAILED,
-		REALIZESEXT_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_RealizesExtent
- *
- * Description: Returns a linked list of instances of this association.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMInstanceList * if istances are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_RealizesExtent(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList* 	instList = NULL;
-	CCIMInstance*		inst;
-	CCIMException*		ex;
-	dm_descriptor_t		*disk_descriptorp = NULL;
-	int			error = 0;
-	int			filter[2];
-	int			i = 0;
-
-	filter[0] = DM_MT_FIXED;
-	filter[1] = DM_FILTER_END;
-
-
-	disk_descriptorp = dm_get_descriptors(DM_MEDIA, filter, &error);
-	if (disk_descriptorp == NULL ||
-	    disk_descriptorp[0] == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(REALIZES_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * For each one of the disks found, generate the physical and
-	 * logical views and create an association instance.
-	 */
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    dm_free_descriptors(disk_descriptorp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	for (i = 0; disk_descriptorp[i] != NULL; i ++) {
-	    inst = realizesextent_descriptor_toCCIMInstance(hostName,
-		disk_descriptorp[i], REALIZES_EXTENT, &error);
-	    if (error != 0) {
-		util_handleError(REALIZES_ENUMINSTANCES, CIM_ERR_FAILED,
-		    REALIZESEXT_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		dm_free_descriptors(disk_descriptorp);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		util_handleError(REALIZES_ENUMINSTANCES, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, NULL, &error);
-		dm_free_descriptors(disk_descriptorp);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-
-	dm_free_descriptors(disk_descriptorp);
-	if (instList->mDataObject == NULL) {
-	    cim_freeInstanceList(instList);
-	    instList = NULL;
-	}
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_RealizesExtent
- *
- * Description: Returns a linked list of CCIMObjectPath *
- *      of Solaris_RealizesExtent objects if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMObjectPathList * if objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_RealizesExtent(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(REALIZES_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_RealizesExtent(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_RealizesExtent is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_RealizesExtent(
-    CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(REALIZES_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath *)NULL);
-}
-
-
-/*
- * Deleting an instance of a Solaris_RealizesExtent is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_RealizesExtent(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(REALIZES_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_RealizesExtent
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_RealizesExtent(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(REALIZES_GETPROPERTY,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_RealizesExtent(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/*
- * Setting an instance of a Solaris_RealizesExtent is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_RealizesExtent(
-    CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(REALIZES_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-
-/*
- * Setting a property on a Solaris_RealizesExtent is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_RealizesExtent(
-    CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-	int	error;
-
-	util_handleError(REALIZES_SETPROPERTY, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No Methods for Solaris_RealizesExtent.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_RealizesExtent(
-    CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty *)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_RealizesExtent
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *	CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *	information on the class for which to find the instances.
- *
- * 	selectList - Not used
- *	nonJoinExp - Not used
- *
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_RealizesExtent(
-    CCIMObjectPath *op, cimchar *selectList, cimchar *nonJoinExp,
-	cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(REALIZES_EXECQUERY,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_RealizesExtent(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
-
-/*
- * Name: cp_associators_Solaris_RealizesExtent
- *
- * Description:
- * Returns a instances of objects associated with the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_RealizesExtent(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-	CCIMPropertyList	*pCurPropList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMException		*ex;
-	dm_descriptor_t		obj_desc;
-	char			*name;
-	int			error = 0;
-	int			isAntecedent = 0;
-
-
-	if (pObjectName == NULL ||
-	    pObjectName->mName == NULL ||
-		pObjectName->mKeyProperties == NULL) {
-	    util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	}
-
-	if (strcasecmp(pObjectName->mName, DISK) == 0) {
-	    isAntecedent = 1;
-	}
-
-	if (pRole != NULL) {
-	    if (strcasecmp(pRole, ANTECEDENT) == 0) {
-		if (isAntecedent != 1) {
-		    util_handleError(REALIZES_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	}
-
-	pCurPropList = pObjectName->mKeyProperties;
-
-	/*
-	 * Get the key. It will either be deviceid or tag. These are
-	 * mutually exclusive.
-	 */
-
-	if (isAntecedent) {
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string, TAG,
-		&error);
-	} else {
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-		&error);
-	}
-
-	/*
-	 * We went through the whole list and didn't find the necessary
-	 * key value.
-	 */
-
-	if (error != 0 || name == NULL) {
-	    util_handleError(REALIZES_ASSOCIATORS,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	obj_desc = dm_get_descriptor_by_name(DM_MEDIA, name, &error);
-	/*
-	 * No device found.
-	 */
-	if (error == ENODEV || obj_desc == NULL) {
-	    return (instList);
-	}
-
-	if (error != 0) {
-	    util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent == 1) {
-		/*
-		 * Physical disk calling this method, return instances of the
-		 * logical disk associated with this disk.
-		 */
-
-	    inst = logicaldisk_descriptor_toCCIMInstance(hostName,
-		    obj_desc, LOGICAL_DISK, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (error != 0) {
-		util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-		    LOGICALDISK_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_createInstanceList();
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_FAILURE, ex, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, &error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	} else {
-		/*
-		 * This is the logical disk calling this function. Return the
-		 * disk that this belongs to.
-		 */
-
-	    inst = disk_descriptor_toCCIMInstance(hostName, obj_desc,
-		DISK, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (error != 0) {
-		util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-		    DISK_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_createInstanceList();
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_FAILURE, ex, &error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_ASSOCIATORS, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_associatorNames_Solaris_RealizesExtent
- *
- * Description:
- * Returns a list of objects associated with the passed in
- * object if there are any via the object CCIMObjectPath.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_RealizesExtent(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-
-	if (pObjectName == NULL) {
-	    util_handleError(REALIZES_ASSOCIATORNAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_associators_Solaris_RealizesExtent(
-		pAssocName, pObjectName, pResultClass, pRole, pResultRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Name: cp_references_Solaris_RealizesExtent
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_references_Solaris_RealizesExtent(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, char *pRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-
-	if (pObjectName == NULL) {
-	    util_handleError(REALIZES_REFERENCES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Get the list of those objects that are referred to by
-	 * the calling object.
-	 */
-
-	objList =
-	    cp_associatorNames_Solaris_RealizesExtent(
-		pAssocName, pObjectName, NULL, NULL, NULL);
-
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Now generate the list of instances to return.
-	 */
-
-	if (strcasecmp(pObjectName->mName, DISK) == 0) {
-	    instList = createRealizesExtentList(pObjectName,
-		ANTECEDENT, objList, DEPENDENT, &error);
-	} else {
-	    instList = createRealizesExtentList(pObjectName,
-		DEPENDENT, objList, ANTECEDENT, &error);
-	}
-
-	cim_freeObjectPathList(objList);
-	return (instList);
-}
-
-/*
- * Name: cp_referenceNames_Solaris_RealizesExtent
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. NULL otherwise.
- *
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_RealizesExtent(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pRole)
-{
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(REALIZES_REFERENCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_references_Solaris_RealizesExtent(pAssocName,
-		pObjectName, pRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Create the association class with the passed in attributes.
- */
-static
-CCIMInstanceList  *
-createRealizesExtentList(CCIMObjectPath *pObjectName,
-    cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error)
-{
-
-	CCIMObjectPathList	*tmpList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*obj1;
-	CCIMObjectPath		*obj2;
-	CCIMException		*ex;
-
-	*error = 0;
-
-	/*
-	 * If no objects associated with this one, return NULL.
-	 */
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZES_EXTENT, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	tmpList = objList;
-	while (tmpList != NULL) {
-	    obj1 = tmpList->mDataObject;
-	    obj2 = cim_copyObjectPath(pObjectName);
-	    if (obj2 == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_EXTENT, CIM_ERR_FAILED,
-		    COPY_OBJPATH_FAILURE, ex, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    inst = cim_createInstance(REALIZES_EXTENT);
-	    if (inst == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_EXTENT, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_FAILURE, ex, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    util_doReferenceProperty(pObjectNameRole, obj2, cim_true, inst,
-		error);
-	    cim_freeObjectPath(obj2);
-
-	    if (*error != 0) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_EXTENT, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    util_doReferenceProperty(objRole, obj1, cim_true, inst, error);
-
-	    if (*error != 0) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_EXTENT, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(REALIZES_EXTENT, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tmpList = tmpList->mNext;
-	}
-	return (instList);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_RealizesExtent.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_REALIZESEXTENT_H_
-#define	_SOLARIS_REALIZESEXTENT_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cp_required.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_REALIZESEXTENT_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_SCSIInterface.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1152 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "drive_descriptors.h"
-#include "ctrl_descriptors.h"
-#include "Solaris_SCSIInterface.h"
-
-#define	SCSI_GETINSTANCE	"SCSI_INTERFACE,GET_INSTANCE"
-#define	SCSI_ENUMINSTANCES	"SCSI_INTERFACE,ENUM_INSTANCES"
-#define	SCSI_ENUMINSTANCENAMES	"SCSI_INTERFACE,ENUM_INSTANCENAMES"
-#define	SCSI_CREATEINSTANCE	"SCSI_INTERFACE,CREATE_INSTANCE"
-#define	SCSI_DELETEINSTANCE	"SCSI_INTERFACE,DELETE_INSTANCE"
-#define	SCSI_SETINSTANCE	"SCSI_INTERFACE,SET_INSTANCE"
-#define	SCSI_GETPROPERTY	"SCSI_INTERFACE,GET_PROPERTY"
-#define	SCSI_SETPROPERTY	"SCSI_INTERFACE,SET_PROPERTY"
-#define	SCSI_INVOKEMETHOD	"SCSI_INTERFACE,INVOKE_METHOD"
-#define	SCSI_EXECQUERY		"SCSI_INTERFACE,EXEC_QUERY"
-#define	SCSI_ASSOCIATORS	"SCSI_INTERFACE,ASSOCIATORS"
-#define	SCSI_ASSOCIATORNAMES	"SCSI_INTERFACE,ASSOCIATOR_NAMES"
-#define	SCSI_REFERENCES		"SCSI_INTERFACE,REFERENCES"
-#define	SCSI_REFERENCENAMES	"SCSI_INTERFACE,REFERENCE_NAMES"
-
-static
-CCIMInstanceList *
-scsiIntAssocToInstList(CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error);
-
-static
-CCIMInstance  *
-scsiIntAssocToInst(CCIMObjectPath *obj1, cimchar *obj1Role,
-	CCIMObjectPath *obj2, cimchar *obj2Role, int *error);
-
-/*
- * Solaris_SCSIInterface provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the door process prior to
- * sending a copy of the data to the CIMOM.
- */
-
-/*
- * Name: cp_getInstance_Solaris_SCSIInterface
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instance.
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-CCIMInstance*
-cp_getInstance_Solaris_SCSIInterface(CCIMObjectPath* pOP)
-{
-	CCIMInstance* 		inst = NULL;
-	CCIMPropertyList* 	pCurPropList;
-	CCIMObjectPath		*antOp = NULL;
-	CCIMObjectPath		*depOp = NULL;
-	dm_descriptor_t		d_descriptor;
-	dm_descriptor_t		c_descriptor;
-	char			*name;
-	int			error;
-
-
-	if (pOP == NULL ||
-	    pOP->mKeyProperties == NULL) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-
-	pCurPropList = pOP->mKeyProperties;
-	antOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-	    ANTECEDENT, &error);
-
-	if (error == 0) {
-	    depOp = (CCIMObjectPath *)util_getKeyValue(pCurPropList, reference,
-		DEPENDENT, &error);
-	}
-
-	if (error != 0) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now, get the name of the antecedent from the object path.
-	 */
-
-	if ((antOp->mKeyProperties) == NULL ||
-	    (depOp->mKeyProperties) == NULL) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = antOp->mKeyProperties;
-	name = (char *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * The only reason it is needed to get the descriptor for these
-	 * two devices is to verify that they still exist and are valid.
-	 * If they are not found, then getting the instance for this
-	 * association as passed in by the client is not possible.
-	 */
-	c_descriptor = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-	    &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV || c_descriptor == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-	dm_free_descriptor(c_descriptor);
-
-	/*
-	 * Now, get the name of the dependent from the object path.
-	 */
-
-	pCurPropList = depOp->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-	d_descriptor = dm_get_descriptor_by_name(DM_DRIVE, name, &error);
-
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV || d_descriptor == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	dm_free_descriptor(d_descriptor);
-
-	/*
-	 * At this point I have verified I have the two devices that
-	 * are part of this association. Use the object paths I got
-	 * earlier to create the scsiinterface instance.
-	 */
-	inst = scsiIntAssocToInst(antOp, ANTECEDENT, depOp, DEPENDENT, &error);
-
-	if (error != 0) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_FAILED,
-		SCSIINT_ASSOC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_SCSIInterface
- *
- * Description: Returns a linked list of instances of
- *      Solaris_SCSIInterface if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMInstanceList * if instances are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_SCSIInterface(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*cObjList;
-	CCIMObjectPathList	*tmpObjList;
-	CCIMObjectPath		*objPath;
-	CCIMInstance		*inst;
-	CCIMException		*ex;
-	dm_descriptor_t		*d_descriptorp = NULL;
-	int			error = 0;
-
-
-	/*
-	 * Get the list of SCSI Controllers. Then get the associated drives
-	 * via the device api.
-	 */
-
-	objPath = cim_createEmptyObjectPath(SCSI_CONTROLLER);
-	if (objPath == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_OBJECT_PATH, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	cObjList = cimom_enumerateInstanceNames(objPath, cim_false);
-	cim_freeObjectPath(objPath);
-
-	if (cObjList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_ENUMINSTANCES, CIM_ERR_FAILED,
-		ENUM_INSTANCENAMES_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * If no controllers of this type, then no interfaces.
-	 */
-
-	if (cObjList->mDataObject == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_ENUMINSTANCES, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Loop through all of these controller objects and get the associated
-	 * disks.
-	 */
-
-	for (tmpObjList = cObjList; tmpObjList != NULL;
-	    tmpObjList = tmpObjList->mNext) {
-
-	    char 		*name = NULL;
-	    CCIMObjectPath 	*cOp;
-	    CCIMInstanceList	*tmpList;
-	    CCIMInstanceList	*tmpList1;
-	    CCIMPropertyList	*pCurPropList;
-	    CCIMObjectPathList	*dObjList;
-	    CCIMInstanceList	*tL;
-	    dm_descriptor_t	c_descriptor;
-
-	    cOp = tmpObjList->mDataObject;
-	    if ((pCurPropList = cOp->mKeyProperties) == NULL) {
-		util_handleError(SCSI_ENUMINSTANCES,
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		cim_freeObjectPathList(cObjList);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    name = (cimchar *)util_getKeyValue(pCurPropList, string,
-		DEVICEID, &error);
-	    if (error != 0 || name == NULL) {
-		util_handleError(SCSI_ENUMINSTANCES,
-		    CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    c_descriptor = dm_get_descriptor_by_name(DM_CONTROLLER, name,
-		&error);
-
-	    if (error == ENODEV || c_descriptor == NULL) {
-		continue;
-	    }
-
-	    if (error != 0) {
-		util_handleError(SCSI_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    d_descriptorp = dm_get_associated_descriptors(c_descriptor,
-		DM_DRIVE, &error);
-	    dm_free_descriptor(c_descriptor);
-		/*
-		 * If there are no drives associated with this controller,
-		 * continue on to the next controller.
-		 */
-
-	    if (d_descriptorp == NULL) {
-		continue;
-	    }
-
-	    if (d_descriptorp[0] == NULL) {
-		dm_free_descriptors(d_descriptorp);
-		continue;
-	    }
-
-	    if (error != 0) {
-		util_handleError(SCSI_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tmpList = drive_descriptors_toCCIMObjPathInstList(
-		DISK_DRIVE, d_descriptorp, &error);
-	    dm_free_descriptors(d_descriptorp);
-
-	    if (error != 0) {
-		util_handleError(SCSI_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (tmpList == NULL) {
-		continue;
-	    }
-
-	    dObjList = cim_createObjectPathList(tmpList);
-	    cim_freeInstanceList(tmpList);
-
-	    if (dObjList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(SCSI_ENUMINSTANCES, CIM_ERR_FAILED,
-		    CREATE_OBJECT_PATH_FAILURE, ex, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tmpList1 = scsiIntAssocToInstList(
-		cOp, ANTECEDENT, dObjList, DEPENDENT, &error);
-	    cim_freeObjectPathList(dObjList);
-
-	    if (error != 0) {
-		util_handleError(SCSI_ENUMINSTANCES, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		cim_freeInstanceList(instList);
-		cim_freeObjectPathList(cObjList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    tL = tmpList1;
-	    do {
-		inst = cim_copyInstance(tL->mDataObject);
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-		    util_handleError(SCSI_ENUMINSTANCES, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, NULL, &error);
-		    cim_freeObjectPathList(cObjList);
-		    cim_freeObjectPathList(tmpList1);
-		    return ((CCIMInstanceList *)NULL);
-		}
-		tL = tL->mNext;
-	    } while (tL);
-
-	    cim_freeInstanceList(tmpList1);
-	} /* end for */
-
-	/*
-	 * It is possible I will have an empty instance list at
-	 * this point. So, I must check and NULL this out if
-	 * there are no entries.
-	 */
-
-	cim_freeObjectPathList(cObjList);
-
-	if (instList->mDataObject == NULL) {
-	    cim_freeInstanceList(instList);
-	    instList = NULL;
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_SCSIInterface
- *
- * Description: Returns a linked list of CCIMObjectPath *
- *      of Solaris_SCSIInterface if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMObjectPathList * if objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_SCSIInterface(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-
-	if (pOP == NULL) {
-	    util_handleError(SCSI_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_SCSIInterface(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_SCSIInterface is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_SCSIInterface(CCIMObjectPath* pOP,
-    CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(SCSI_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath *)NULL);
-}
-
-
-/*
- * Deleting an instance of a Solaris_SCSIInterface is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_SCSIInterface(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(SCSI_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_SCSIInterface
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_SCSIInterface(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-
-	if (pOP == NULL) {
-	    util_handleError(SCSI_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_SCSIInterface(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/*
- * Setting an instance of a Solaris_SCSIInterface is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_SCSIInterface(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(SCSI_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-
-/*
- * Setting a property on a Solaris_SCSIInterface is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_SCSIInterface(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-	int	error;
-
-	util_handleError(SCSI_SETPROPERTY, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No Methods for Solaris_SCSIInterface.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_SCSIInterface(
-    CCIMObjectPath* op, cimchar* methodName,
-	CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty	*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_SCSIInterface
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *	CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *	information on the class for which to find the instances.
- *
- * 	selectList - Not used
- *	nonJoinExp - Not used
- *
- * Returns:
- *	CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_SCSIInterface(CCIMObjectPath *op,
-    cimchar *selectList, cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-
-	if (op == NULL) {
-	    util_handleError(SCSI_EXECQUERY, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_SCSIInterface(op);
-
-	if (instList == NULL) {
-	    return (instList);
-	}
-
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
-
-/*
- * Name: cp_associators_Solaris_SCSIInterface
- *
- * Description:
- * Returns a instances of objects associated with the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMInstanceList * if associated objects are found.
- *	NULL is returned on error as well as for an empty list.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_associators_Solaris_SCSIInterface(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-	CCIMPropertyList	*pCurPropList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMException		*ex;
-	dm_descriptor_t		*assoc_descriptors;
-	dm_descriptor_t		obj_desc;
-	char			*name;
-	int			error = 0;
-	int			isAntecedent = 0;
-
-
-	if (pObjectName == NULL ||
-	    pObjectName->mName == NULL ||
-		pObjectName->mKeyProperties == NULL) {
-	    util_handleError(SCSI_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (strcasecmp(pObjectName->mName, SCSI_CONTROLLER) == 0) {
-	    isAntecedent = 1;
-	}
-
-	if (pRole != NULL) {
-	    if (strcasecmp(pRole, ANTECEDENT) == 0) {
-		if (isAntecedent != 1) {
-		    util_handleError(SCSI_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    } else if (strcasecmp(pRole, DEPENDENT) == 0) {
-		if (isAntecedent == 1) {
-		    util_handleError(SCSI_ASSOCIATORS,
-			CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	}
-
-	/*
-	 * Both scsi controller and disk drive have deviceid as the
-	 * key.
-	 */
-
-	pCurPropList = pObjectName->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	/*
-	 * We went through the whole list and didn't find the necessary
-	 * key value.
-	 */
-	if (error != 0 || name == NULL) {
-	    util_handleError(SCSI_ASSOCIATORS, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent) {
-	    obj_desc = dm_get_descriptor_by_name(DM_CONTROLLER, name, &error);
-	} else {
-	    obj_desc = dm_get_descriptor_by_name(DM_DRIVE, name, &error);
-	}
-
-	/*
-	 * Device not found, return NULL list.
-	 */
-	if (error == ENODEV || obj_desc == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(SCSI_ASSOCIATORS, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (isAntecedent) {
-
-		/*
-		 * Controller calling this method, return instances of the
-		 * disk drives associated with this controller.
-		 */
-
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_DRIVE, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (assoc_descriptors == NULL) {
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (assoc_descriptors[0] == NULL) {
-		dm_free_descriptors(assoc_descriptors);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (error != 0) {
-		util_handleError(SCSI_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-		/*
-		 * Generate the inst list of the associated disk drives.
-		 */
-
-	    instList = drive_descriptors_toCCIMObjPathInstList(DISK_DRIVE,
-		assoc_descriptors, &error);
-	    dm_free_descriptors(assoc_descriptors);
-
-	    if (error != 0) {
-		ex = cim_getLastError();
-		util_handleError(SCSI_ASSOCIATORS, CIM_ERR_FAILED,
-		    DRIVE_DESC_TO_INSTANCE_FAILURE, ex, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	} else {
-		/*
-		 * This is the disk drive calling this function. Return the
-		 * controllers that are associated with this disk.
-		 */
-
-	    assoc_descriptors = dm_get_associated_descriptors(obj_desc,
-		DM_CONTROLLER, &error);
-	    dm_free_descriptor(obj_desc);
-
-	    if (assoc_descriptors ==  NULL) {
-		return (instList);
-	    }
-
-	    if (assoc_descriptors[0] == NULL) {
-		dm_free_descriptors(assoc_descriptors);
-		return (instList);
-	    }
-
-	    if (error != 0) {
-		util_handleError(SCSI_ASSOCIATORS,  CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = ctrl_descriptors_toCCIMInstanceList(SCSI_CONTROLLER,
-		assoc_descriptors, &error, 1, "scsi");
-	    dm_free_descriptors(assoc_descriptors);
-
-	    if (error != 0) {
-		util_handleError(SCSI_ASSOCIATORS, CIM_ERR_FAILED,
-		    SCSICTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_associatorNames_Solaris_SCSIInterface
- *
- * Description:
- * Returns a list of objects associated with the passed in
- * object if there are any via the object CCIMObjectPath.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *	cimchar *pResultClass - If specified, only return instances that
- *	are of this class type.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *	cimchar *pResultRole - If specified, only return instances that
- *	are playing this role in the association.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. NULL otherwise.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_associatorNames_Solaris_SCSIInterface(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pResultClass, cimchar *pRole,
-	cimchar *pResultRole)
-{
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-
-	if (pObjectName == NULL) {
-	    util_handleError(SCSI_ASSOCIATORNAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_associators_Solaris_SCSIInterface(
-		pAssocName, pObjectName, pResultClass, pRole, pResultRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Name: cp_references_Solaris_SCSIInterface
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. This list
- *	may be empty. NULL is returned on error. If empty list, NULL
- *	is returned also. An error is set for CIMOM if an error occurs
- *	to notify CIMOM that the NULL means error.
- */
-
-/* ARGSUSED */
-CCIMInstanceList *
-cp_references_Solaris_SCSIInterface(CCIMObjectPath *pAssocName,
-CCIMObjectPath *pObjectName, char *pRole)
-{
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-
-	if (pObjectName == NULL) {
-	    util_handleError(SCSI_REFERENCES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Get the list of those objects that are referred to by
-	 * the calling object.
-	 */
-
-	objList =
-	    cp_associatorNames_Solaris_SCSIInterface(
-		pAssocName, pObjectName, NULL, NULL, NULL);
-
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Now generate the list of instances to return.
-	 */
-
-	if ((strcasecmp(pObjectName->mName, SCSI_CONTROLLER)) == 0) {
-	    instList = scsiIntAssocToInstList(pObjectName,
-		ANTECEDENT, objList, DEPENDENT, &error);
-	} else {
-	    instList = scsiIntAssocToInstList(pObjectName,
-		DEPENDENT, objList, ANTECEDENT, &error);
-	}
-
-	cim_freeObjectPathList(objList);
-	return (instList);
-}
-
-/*
- * Name: cp_referenceNames_Solaris_SCSIInterface
- *
- * Description:
- * Returns a instances of objects that have references to the passed in
- * object if there are any.
- *
- * Parameters:
- *
- *	CCIMObjectPath *pAssocName - The name of the association that
- *	the client wants information about.
- *
- *	CCIMObjectPath *pObjectName - An CCIMObjectPath * which contains the
- *	information on the class for which to find the associated instances.
- *
- *      cimchar *pRole - If specified, must be valid for the object path
- *	passed in requesting the associated instances.
- *
- *
- * Returns:
- *	CCIMObjectPathList * if associated objects are found. This list
- *	may be empty. NULL is returned on error and for an empty list.
- *      An error is set for CIMOM to determine if NULL means error.
- *
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_referenceNames_Solaris_SCSIInterface(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, cimchar *pRole)
-{
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pObjectName == NULL) {
-	    util_handleError(SCSI_REFERENCENAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	instList =
-	    cp_references_Solaris_SCSIInterface(pAssocName, pObjectName, pRole);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Create the association class with the passed in attributes.
- */
-static
-CCIMInstanceList  *
-scsiIntAssocToInstList(CCIMObjectPath *pObjectName, cimchar *pObjectNameRole,
-	CCIMObjectPathList *objList, cimchar *objRole, int *error)
-{
-
-	CCIMObjectPathList	*tmpList;
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstance		*inst;
-	CCIMObjectPath		*obj1;
-	CCIMObjectPath		*obj2;
-	CCIMException		*ex;
-
-	*error = 0;
-
-	if (objList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_INTERFACE, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	tmpList = objList;
-	while (tmpList != NULL) {
-	    obj1 = tmpList->mDataObject;
-	    obj2 = cim_copyObjectPath(pObjectName);
-	    if (obj2 == NULL) {
-		ex = cim_getLastError();
-		util_handleError(SCSI_INTERFACE, CIM_ERR_FAILED,
-		    COPY_OBJPATH_FAILURE, ex, error);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    inst = scsiIntAssocToInst(obj1, objRole, obj2, pObjectNameRole,
-		error);
-	    cim_freeObjectPath(obj2);
-
-	    if (*error != 0) {
-		util_handleError(SCSI_INTERFACE, CIM_ERR_FAILED,
-		    SCSIINT_ASSOC_TO_INSTANCE_FAILURE, NULL, error);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(SCSI_INTERFACE, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, error);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	    tmpList = tmpList->mNext;
-	}
-	return (instList);
-}
-
-static
-CCIMInstance  *
-scsiIntAssocToInst(CCIMObjectPath *obj1, cimchar *obj1Role,
-	CCIMObjectPath *obj2, cimchar *obj2Role, int *error)
-{
-
-	CCIMInstance	*inst = NULL;
-	CCIMException	*ex;
-
-	*error = 0;
-
-	inst = cim_createInstance(SCSI_INTERFACE);
-	if (inst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_INTERFACE, CIM_ERR_FAILED,
-		SCSIINT_ASSOC_TO_INSTANCE_FAILURE, ex, error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(obj2Role, obj2, cim_true, inst, error);
-	if (*error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_INTERFACE, CIM_ERR_FAILED,
-		CREATE_REFPROP_FAILURE, ex, error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(obj1Role, obj1, cim_true, inst, error);
-	if (*error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_INTERFACE, CIM_ERR_FAILED,
-		CREATE_REFPROP_FAILURE, ex, error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	return (inst);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/assoc/Solaris_SCSIInterface.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_SCSIINTERFACE_H_
-#define	_SOLARIS_SCSIINTERFACE_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cp_required.h>
-#include <cim_objectpath.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_SCSIINTERFACE_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-# This Makefile just 'makes' the common .o files
-# used by diskdrive and diskpartition.  It does 
-# not create a library or message file.
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS		= util.o \
-		drive_descriptors.o \
-		partition_descriptors.o \
-		logicaldisk_descriptors.o \
-		ctrl_descriptors.o \
-		partbasedon_descriptors.o \
-		disk_descriptors.o \
-		mediapresent_descriptors.o \
-		methods.o \
-		mpxiogroup_descriptors.o \
-		realizesextent_descriptors.o \
-		realizesdiskdrive_descriptors.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL	=	$(ROOTWBEMINC) \
-		$(SRC)/lib/libdiskmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include
-
-CPPFLAGS	+= $(GENERAL:%=-I%) -D_REENTRANT -Dpic -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_PICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _common.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-
-install:	all
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c)
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/ctrl_descriptors.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,332 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <netdb.h>
-#include <cimapi.h>
-#include <libnvpair.h>
-#include <md5.h>
-
-#include "libdiskmgt.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "cimKeys.h"
-#include "util.h"
-
-/*
- * Convert a single descriptor in to a Solaris_XXXController instance
- */
-
-CCIMInstance *
-ctrl_descriptor_toCCIMInstance(char *hostname, dm_descriptor_t  desc,
-    char *provider, int *errp)
-{
-
-	CCIMInstance		*inst = NULL;
-	CCIMException		*ex;
-	nvlist_t		*nvlp;
-	nvpair_t		*nvp;
-	char			*str;
-	int			error;
-
-	*errp = 0;
-
-	/* Create instance of controller */
-
-	if ((inst = cim_createInstance(provider)) == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* First, assign the deviceID */
-
-	str = dm_get_name(desc, &error);
-
-	if (error != 0) {
-	    util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_NAME_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (str == NULL) {
-	    util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_NAME_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty(DEVICEID, string, str, cim_true, inst, errp);
-	dm_free_name(str);
-
-	if (*errp == 0) {
-	    util_doProperty(CREATION_CLASS, string, provider, cim_true, inst,
-		errp);
-	}
-
-	if (*errp == 0) {
-	    util_doProperty(SYS_CREATION_CLASS, string, COMPUTER_SYSTEM,
-		cim_true, inst, errp);
-	}
-
-	if (*errp == 0) {
-	    util_doProperty(SYSTEM, string, hostname, cim_true, inst, errp);
-	}
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* Now get the controller attributes */
-	nvlp = dm_get_attributes(desc, &error);
-	if (error != 0) {
-	    util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_ATTR_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* No attributes, no more to process */
-	if (nvlp == NULL) {
-	    return (inst);
-	}
-
-	for (nvp = nvlist_next_nvpair(nvlp, NULL); nvp != NULL;
-	    nvp = nvlist_next_nvpair(nvlp, nvp)) {
-
-	    char 	*attrname;
-	    char	*str;
-	    char	*protocol;
-	    char	*avail;
-	    char	*status;
-
-	    attrname = nvpair_name(nvp);
-	    if (attrname == NULL) {
-		continue;
-	    }
-
-	    /* Loop through nvpair list and assign attrs to the CIMInstance. */
-
-	    if (strcasecmp(attrname, DM_CTYPE) == 0) {
-		error = nvpair_value_string(nvp, &str);
-		if (error != 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		if (strcasecmp(str, "scsi") == 0) {
-		    protocol = "11";
-		} else if (strcasecmp(str, "usb") == 0) {
-		    protocol = "16";
-		} else if (strcasecmp(str, "ata") == 0) {
-		    protocol = "42";
-		} else if (strcasecmp(str, "fibre channel") == 0) {
-		    protocol = "10";
-		} else if (strcasecmp(str, "scsi_vhci") == 0) {
-		    protocol = "1";
-		} else {
-		    protocol = "2";
-		}
-
-		util_doProperty("ProtocolSupported", string, protocol,
-		    cim_false, inst, errp);
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-	    } else if (strcasecmp(attrname, DM_PATH_STATE) == 0) {
-		error = nvpair_value_string(nvp, &str);
-		if (error != 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		if (strcasecmp(str, "online") == 0) {
-		    avail = "3";
-		    status = "3";
-		} else if (strcasecmp(str, "standby") == 0) {
-		    avail = "11";
-		    status = "1";
-		} else if (strcasecmp(str, "offline") == 0) {
-		    avail = "8";
-		    status = "4";
-		} else if (strcasecmp(str, "faulted") == 0) {
-		    avail = "9";
-		    status = "4";
-		} else {
-		    avail = "2";
-		    status = "2";
-		}
-		util_doProperty("Availability", string, avail,
-		    cim_false, inst, errp);
-		util_doProperty("StatusInfo", string, status,
-		    cim_false, inst, errp);
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			ADD_PROPERTY_FAILURE, ex, errp);
-		    nvlist_free(nvlp);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstance *)NULL);
-		}
-	    }
-	} /* End for */
-
-	nvlist_free(nvlp);
-	return (inst);
-}
-
-/* Convert the descriptor list to a CIMInstance List */
-
-CCIMInstanceList*
-ctrl_descriptors_toCCIMInstanceList(char *providerName, dm_descriptor_t *dp,
-	int *errp, int number, ...)
-{
-	CCIMInstance 		*inst;
-	CCIMInstanceList 	*instList = NULL;
-	CCIMException		*ex;
-	va_list			args;
-	dm_descriptor_t 	desc;
-	nvlist_t		*nvlp;
-	int			i;
-	int			k;
-	int			error;
-	char			*type;
-	char			*arg_type;
-
-	*errp = 0;
-
-	/* If not descriptor list, return an empty instance list. */
-	if (dp == NULL) {
-	    return (instList);
-	}
-
-	/*
-	 * Create the instance list which will store the instances
-	 * Only create this list when we know we have a valid
-	 * instance to create
-	 */
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, errp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Loop through all of the controller types specified.
-	 */
-
-
-	for (k = 0; dp[k] != NULL; k ++) {
-	    desc = dp[k];
-	    nvlp = dm_get_attributes(desc, &error);
-	    if (error != 0) {
-		util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    DM_GET_ATTR_FAILURE, NULL, errp);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    error = nvlist_lookup_string(nvlp, "ctype", &type);
-	    if (error != 0) {
-		util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    NVLIST_FAILURE, NULL, errp);
-		nvlist_free(nvlp);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    va_start(args, number);
-	    for (i = 0; i < number; i ++) {
-		arg_type = va_arg(args, char *);
-		if (strcasecmp(arg_type, "scsi_vhci") == 0) {
-		    error = nvlist_lookup_boolean(nvlp, "multiplex");
-		    if (error != 0) {
-			continue;
-		    }
-		} else if (strcasecmp(type, arg_type) != 0) {
-		    continue;
-		}
-
-		inst = ctrl_descriptor_toCCIMInstance(hostName, desc,
-		    providerName, &error);
-		if (error != 0) {
-		    /* Error handling is done in the subfunction. */
-		    nvlist_free(nvlp);
-		    cim_freeInstanceList(instList);
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-		/* add the instance to the instance list */
-		instList = cim_addInstance(instList, inst);
-		if (instList == NULL) {
-		    ex = cim_getLastError();
-		    util_handleError(CTRL_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			ADD_INSTANCE_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-	}
-	va_end(args);
-	nvlist_free(nvlp);
-
-	/*
-	 * If no matches were found, then we need to free the instance list
-	 * and return NULL.
-	 */
-	if (instList->mDataObject == NULL) {
-	    cim_freeInstanceList(instList);
-	    instList = NULL;
-	}
-	return (instList);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/disk_descriptors.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,438 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <netdb.h>
-#include <cimapi.h>
-#include <libnvpair.h>
-#include <md5.h>
-
-#include "libdiskmgt.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "cimKeys.h"
-#include "util.h"
-
-/*
- * Convert a single descriptor in to a Solaris_Disk instance
- */
-
-/* ARGSUSED */
-CCIMInstance *
-disk_descriptor_toCCIMInstance(char *hostname, dm_descriptor_t  desc,
-    char *provider, int *errp)
-{
-
-	nvlist_t		*nvlp;
-	nvpair_t		*nvp;
-	CCIMInstance		*inst = NULL;
-	CCIMException		*ex;
-	dm_descriptor_t		*dlist;
-	dm_descriptor_t		*alist;
-	char			*str;
-	char			*drive;
-	char			*vid;
-	char			*prodid;
-	char			buf[100];
-	uint32_t		status;
-	int			error = 0;
-
-	*errp = 0;
-
-	if ((inst = cim_createInstance(provider)) == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * First, assign the common name from the alias value of the
-	 * drive.
-	 */
-	dlist = dm_get_associated_descriptors(desc, DM_DRIVE, &error);
-
-	if (error != 0) {
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_ASSOC_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	alist = dm_get_associated_descriptors(dlist[0], DM_ALIAS, &error);
-
-	if (error != 0) {
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_NAME_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    dm_free_descriptors(dlist);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	drive = dm_get_name(alist[0], &error);
-	dm_free_descriptors(alist);
-	if (error != 0) {
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_NAME_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    dm_free_descriptors(dlist);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty("Name", string, drive, cim_false, inst, errp);
-	if (error != 0) {
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    dm_free_name(drive);
-	    dm_free_descriptors(dlist);
-	    return ((CCIMInstance *)NULL);
-	}
-	/*
-	 * From the drive, assign the manufacturer and model.
-	 */
-
-	nvlp = dm_get_attributes(dlist[0], &error);
-	dm_free_descriptors(dlist);
-	if (error != 0) {
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_ATTR_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    dm_free_name(drive);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	error = nvlist_lookup_string(nvlp, "product_id", &prodid);
-	if (error == 0) {
-	    util_doProperty("Model", string, prodid, cim_false, inst, errp);
-	}
-	if (*errp != 0) {
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    dm_free_name(drive);
-	    nvlist_free(nvlp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	error = nvlist_lookup_string(nvlp, "vendor_id", &vid);
-	if (error == 0) {
-	    util_doProperty("Manufacturer", string, vid, cim_false, inst, errp);
-	}
-
-	if (*errp != 0) {
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    dm_free_name(drive);
-	    nvlist_free(nvlp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now get the status from the drive.
-	 */
-	error = nvlist_lookup_uint32(nvlp, "status", &status);
-	if (error == 0) {
-	    if (status == 0) {
-		util_doProperty("Status", string, "Lost Comm", cim_false,
-		    inst, errp);
-	    } else {
-		util_doProperty("Status", string, "OK", cim_false, inst,
-		    errp);
-	    }
-	    if (*errp != 0) {
-		ex = cim_getLastError();
-		util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		nvlist_free(nvlp);
-		dm_free_name(drive);
-		return ((CCIMInstance *)NULL);
-	    }
-	}
-	nvlist_free(nvlp);
-
-	/* Now, assign the TAG value */
-
-	str = dm_get_name(desc, &error);
-
-	if (error != 0) {
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_NAME_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    dm_free_name(drive);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (str != NULL) {
-	    util_doProperty(TAG, string, str, cim_true, inst, errp);
-	    dm_free_name(str);
-
-	    if (*errp != 0) {
-		ex = cim_getLastError();
-		util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		dm_free_name(drive);
-		return ((CCIMInstance *)NULL);
-	    }
-
-	} else {
-
-	    util_doProperty(TAG, string, drive, cim_true, inst, errp);
-
-	    if (*errp != 0) {
-		ex = cim_getLastError();
-		util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		dm_free_name(drive);
-		return ((CCIMInstance *)NULL);
-	    }
-	}
-	dm_free_name(drive);
-
-	/* add keys */
-
-	util_doProperty(CREATION_CLASS, string, DISK, cim_true, inst, errp);
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* Now fill in the other attributes */
-
-	nvlp = dm_get_attributes(desc, &error);
-
-	/*
-	 * If the underlying api cannot access the media, it will return
-	 * an ENODEV. Set the status for this media appropriately and return
-	 * the instance.
-	 */
-	if (error == ENODEV) {
-	    util_doProperty("Status", string, "Lost Comm", cim_false,
-		inst, errp);
-	    return (inst);
-	}
-	if (error != 0) {
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_ATTR_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* If there are no other attriubtes, we are done. */
-	if (nvlp == NULL) {
-	    return (inst);
-	}
-
-	for (nvp = nvlist_next_nvpair(nvlp, NULL); nvp != NULL;
-	    nvp = nvlist_next_nvpair(nvlp, nvp)) {
-
-	    char 	*attrname;
-	    uint32_t    ui32;
-	    uint64_t	ui64;
-
-	    attrname = nvpair_name(nvp);
-	    if (attrname == NULL) {
-		continue;
-	    }
-
-	    /* Loop through nvpair list and assign attrs to the CIMInstace. */
-
-	    if (strcasecmp(attrname, DM_SIZE) == 0) {
-		uint32_t	blocksize = 512;
-
-		error = nvpair_value_uint64(nvp, &ui64);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		(void) nvlist_lookup_uint32(nvlp, DM_BLOCKSIZE, &blocksize);
-
-		error = snprintf(buf, sizeof (buf), "%llu", ui64 * blocksize);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		util_doProperty("Capacity", uint64, buf, cim_false, inst,
-		    errp);
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-	    } else if (strcasecmp(attrname, DM_MTYPE) == 0) {
-		char	*mtype = "0";
-
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		/*
-		 * The values for MediaType are hardcoded as the enumeration
-		 * values from the CIM_PhysicalMedia MOF definition.
-		 */
-		switch (ui32) {
-		case DM_MT_FIXED:	mtype = "29";
-					break;
-		case DM_MT_FLOPPY:	mtype = "28";
-					break;
-		case DM_MT_CDROM:	mtype = "16";
-					break;
-		case DM_MT_ZIP:		mtype = "13";
-					break;
-		case DM_MT_JAZ:		mtype = "12";
-					break;
-		case DM_MT_CDR:		mtype = "19";
-					break;
-		case DM_MT_CDRW:	mtype = "33";
-					break;
-		case DM_MT_DVDROM:	mtype = "25";
-					break;
-		case DM_MT_DVDR:	mtype = "22";
-					break;
-		case DM_MT_DVDRAM:	mtype = "24";
-					break;
-		case DM_MT_MO_ERASABLE:	mtype = "43";
-					break;
-		case DM_MT_MO_WRITEONCE: mtype = "44";
-					break;
-		case DM_MT_AS_MO:	mtype = "21";
-					break;
-		}
-
-		util_doProperty("MediaType", uint16, mtype, cim_false, inst,
-		    errp);
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-	    } else if (strcasecmp(attrname, DM_REMOVABLE) == 0) {
-		util_doProperty("Removable", boolean, "1", cim_false, inst,
-		    errp);
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-	    }
-	} /* End for */
-
-	nvlist_free(nvlp);
-	return (inst);
-}
-
-/* Convert the descriptor list to a CIMInstance List */
-
-CCIMInstanceList*
-disk_descriptors_toCCIMInstanceList(char *providerName, dm_descriptor_t *dp,
-	int *errp)
-{
-	CCIMInstance 		*inst;
-	CCIMInstanceList 	*instList = NULL;
-	CCIMException		*ex;
-	dm_descriptor_t 	desc;
-	int			i;
-	int			error;
-
-	*errp = 0;
-
-
-	/* If not descriptpr list, return an empty instance list. */
-	if (dp == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* Create the instance list which will store the instances */
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, errp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	for (i = 0; dp[i] != NULL; i ++) {
-	    desc = dp[i];
-	    inst = disk_descriptor_toCCIMInstance(hostName, desc,
-		providerName, &error);
-	    if (error != 0) {
-		/* Error handling is done in the subfunction. */
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (inst == NULL) {
-		continue;
-	    }
-
-	    /* add the instance to the instance list */
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(DISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-	return (instList);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/drive_descriptors.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,833 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-
-#include <stdio.h>
-#include <unistd.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <netdb.h>
-#include <cimapi.h>
-#include <libnvpair.h>
-#include <md5.h>
-
-#include "libdiskmgt.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "cimKeys.h"
-#include "util.h"
-
-/*
- * Convert a single descriptor in to a Solaris_DiskDrive instance
- */
-
-CCIMInstance *
-drive_descriptor_toCCIMInstance(char *hostname, dm_descriptor_t  desc,
-    char *provider, int *errp)
-{
-
-	nvlist_t		*nvlp;
-	nvpair_t		*nvp;
-	CCIMInstance		*inst = NULL;
-	CCIMException		*ex;
-	dm_descriptor_t		*dlist;
-	dm_descriptor_t		*mlist;
-	char			*str = NULL;
-	char			*alias;
-	char			buf[100];
-	uint32_t		nheads = 0;
-	uint32_t		nsecs = 0;
-	uint64_t		bytes_per_cylinder = 0;
-	uint32_t		blocksize = 0;
-	int			error = 0;
-	int			fdisk = 0;
-
-	*errp = 0;
-
-	if (desc == NULL) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* Create instance of disk drive. */
-
-	if ((inst = cim_createInstance(provider)) == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Get the common name from the alias descriptor associated with
-	 * this drive. This is used for the 'name' attribute as well as the
-	 * deviceid if the standard deviceid is not found.
-	 */
-	dlist = dm_get_associated_descriptors(desc, DM_ALIAS,
-	    &error);
-	if (error != 0) {
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    DM_GET_ASSOC_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-	if (dlist[0] == NULL) {
-		cim_freeInstance(inst);
-		return ((CCIMInstance *)NULL);
-	}
-
-
-	alias = dm_get_name(dlist[0], &error);
-	dm_free_descriptors(dlist);
-
-	if (error != 0) {
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_NAME_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-	util_doProperty("Name", string, alias, cim_false, inst, errp);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    dm_free_name(alias);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* Now, assign the deviceID */
-
-	str = dm_get_name(desc, &error);
-
-	if (error != 0) {
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_NAME_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    dm_free_name(alias);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (str != NULL) {
-	    util_doProperty(DEVICEID, string, str, cim_true, inst, errp);
-	    dm_free_name(str);
-
-	    if (*errp != 0) {
-		ex = cim_getLastError();
-		util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		dm_free_name(alias);
-		return ((CCIMInstance *)NULL);
-	    }
-
-	} else {
-
-	    util_doProperty(DEVICEID, string, alias, cim_true, inst, errp);
-
-	    if (*errp != 0) {
-		ex = cim_getLastError();
-		util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		dm_free_name(alias);
-		return ((CCIMInstance *)NULL);
-	    }
-	}
-	dm_free_name(alias);
-
-	/* add keys */
-
-	util_doProperty(CREATION_CLASS, string, DISK_DRIVE, cim_true,
-	    inst, errp);
-
-	if (*errp == 0) {
-	    util_doProperty(SYS_CREATION_CLASS, string, COMPUTER_SYSTEM,
-		cim_true, inst, errp);
-	}
-
-	if (*errp == 0) {
-	    util_doProperty(SYSTEM, string, hostname, cim_true, inst, errp);
-	}
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	nvlp = dm_get_attributes(desc, &error);
-	if (error != 0) {
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_ATTR_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (nvlp == NULL) {
-	    return (inst);
-	}
-
-	for (nvp = nvlist_next_nvpair(nvlp, NULL); nvp != NULL;
-	    nvp = nvlist_next_nvpair(nvlp, nvp)) {
-
-	    char 		*attrname;
-	    uint32_t		ui32;
-	    char		*status;
-
-	    attrname = nvpair_name(nvp);
-	    if (attrname == NULL) {
-		continue;
-	    }
-
-		/*
-		 * loop through the nvpair list and assign attributes to the
-		 * CIMInstace.
-		 */
-
-	    if (strcasecmp(attrname, DM_DRVTYPE) == 0) {
-		char	*type = "Unknown";
-
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error != 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		switch (ui32) {
-		case DM_DT_FIXED:
-		    type = "Fixed";
-		    break;
-		case DM_DT_ZIP:
-		    type = "Zip";
-		    break;
-		case DM_DT_JAZ:
-		    type = "Jaz";
-		    break;
-		default:
-		    if (nvlist_lookup_boolean(nvlp, DM_REMOVABLE) == 0) {
-			type = "Removable";
-		    }
-		    break;
-		}
-
-		util_doProperty("DiskType", string, type, cim_false, inst,
-		    errp);
-
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstance *)NULL);
-		}
-
-	    } else if (strcasecmp(attrname, DM_STATUS) == 0) {
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error != 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		if (ui32 == 0) {
-		    error = snprintf(buf, sizeof (buf), "%u", 4);
-		    status = "Error";
-		} else {
-		    error = snprintf(buf, sizeof (buf), "%u", 3);
-		    status = "OK";
-		}
-
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		util_doProperty("StatusInfo", uint32, buf, cim_false,
-		    inst, errp);
-
-		if (*errp == 0) {
-		    util_doProperty("Status", string, status, cim_false,
-			inst, errp);
-		}
-
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-	    }
-	}
-
-	nvlist_free(nvlp);
-
-	/*
-	 * Now get the associated media, and get some of the other attributes.
-	 */
-
-	mlist = dm_get_associated_descriptors(desc, DM_MEDIA, errp);
-
-	if (mlist == NULL) {
-	    return (inst);
-	}
-
-	if (mlist[0] == NULL) {
-	    dm_free_descriptors(mlist);
-	    return (inst);
-	}
-
-	if (*errp != 0) {
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	nvlp = dm_get_attributes(mlist[0], errp);
-	dm_free_descriptors(mlist);
-
-	/*
-	 * It is possible that we cannot read the media for this drive.
-	 * So, do not error out, but return what we have so far for the
-	 * drive instance.
-	 */
-	if (*errp == ENODEV || nvlp == NULL) {
-	    *errp = 0;
-	    return (inst);
-	}
-
-	if (*errp != 0) {
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	for (nvp = nvlist_next_nvpair(nvlp, NULL); nvp != NULL;
-	    nvp = nvlist_next_nvpair(nvlp, nvp)) {
-
-	    char 		*attrname;
-	    uint32_t		ui32;
-
-	    attrname = nvpair_name(nvp);
-	    if (attrname == NULL) {
-		continue;
-	    }
-
-	    if (strcasecmp(attrname, DM_BLOCKSIZE) == 0) {
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		blocksize = ui32;
-		error = snprintf(buf, sizeof (buf), "%u", ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		util_doProperty("DefaultBlockSize", uint64, buf,
-		    cim_false, inst, errp);
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-	    } else if (strcasecmp(DM_FDISK, attrname) == 0) {
-		fdisk = 1;
-		util_doProperty("FdiskPresent", boolean, "1", cim_false,
-		    inst, errp);
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-	    } else if (strcasecmp(DM_LABEL, attrname) == 0) {
-		error = nvpair_value_string(nvp, &str);
-		if (error != 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		util_doProperty("DiskLabel", string, str, cim_false, inst,
-		    errp);
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-	    } else if (strcasecmp(DM_NHEADS, attrname) == 0) {
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		nheads = ui32;
-	    } else if (strcasecmp(DM_NSECTORS, attrname) == 0) {
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		nsecs = ui32;
-	    } else if (strcasecmp(DM_NPHYSCYLINDERS, attrname) == 0) {
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		error = snprintf(buf, sizeof (buf), "%u", ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		util_doProperty("PhysicalCylinders", uint32, buf, cim_false,
-		    inst, errp);
-
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-		    nvlist_free(nvlp);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstance *)NULL);
-		}
-	    } else if (strcasecmp(DM_NCYLINDERS, attrname) == 0) {
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		error = snprintf(buf, sizeof (buf), "%u", ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		util_doProperty("DataCylinders", uint32, buf, cim_false,
-		    inst, errp);
-
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-		    nvlist_free(nvlp);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstance *)NULL);
-		}
-	    } else if (strcasecmp(DM_NACTUALCYLINDERS, attrname) == 0) {
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		error = snprintf(buf, sizeof (buf), "%u", ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		util_doProperty("ActualCylinders", uint32, buf, cim_false,
-		    inst, errp);
-
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-		    nvlist_free(nvlp);
-		    cim_freeInstance(inst);
-		    return ((CCIMInstance *)NULL);
-		}
-	    }
-
-	} /* end for */
-
-	nvlist_free(nvlp);
-
-	/*
-	 * Now fill in the geometry data
-	 */
-
-	error = snprintf(buf, sizeof (buf), "%u", nheads);
-
-	if (error < 0) {
-	    cim_freeInstance(inst);
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty("HeadsPerCylinder", uint32, buf, cim_false, inst,
-	    errp);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	error = snprintf(buf, sizeof (buf), "%u", nsecs);
-
-	if (error < 0) {
-	    cim_freeInstance(inst);
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty("SectorsPerTrack", uint32, buf, cim_false, inst,
-	    errp);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	error = snprintf(buf, sizeof (buf), "%u", nsecs * nheads);
-
-	if (error < 0) {
-	    cim_freeInstance(inst);
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty("SectorsPerCylinder", uint32, buf, cim_false, inst,
-	    errp);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	bytes_per_cylinder = (nheads * nsecs) * blocksize;
-	error = snprintf(buf, sizeof (buf), "%llu", bytes_per_cylinder);
-
-	if (error < 0) {
-	    cim_freeInstance(inst);
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty("BytesPerCylinder", uint32, buf, cim_false,
-	    inst, errp);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now check to see if there is an fdisk or not.
-	 */
-
-	if (fdisk != 1) {
-	    util_doProperty("FdiskPresent", boolean, "0", cim_false,
-		inst, errp);
-	    if (*errp != 0) {
-		ex = cim_getLastError();
-		util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		return ((CCIMInstance *)NULL);
-	    }
-	}
-
-	return (inst);
-}
-
-/* Convert the descriptor list to a CIMInstance List */
-
-CCIMInstanceList*
-drive_descriptors_toCCIMInstanceList(char *providerName, dm_descriptor_t *dp,
-	int *errp)
-{
-	CCIMInstance 		*inst;
-	CCIMInstanceList 	*instList = NULL;
-	CCIMException		*ex;
-	dm_descriptor_t 	desc;
-	int			i;
-	int			error = 0;
-
-	*errp = 0;
-
-
-	/* If not descriptor list, return an empty instance list. */
-	if (dp == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* Create the instance list which will store the instances */
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, errp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	for (i = 0; dp[i] != NULL; i ++) {
-	    desc = dp[i];
-	    inst = drive_descriptor_toCCIMInstance(hostName, desc,
-		providerName, &error);
-	    if (error != 0) {
-		/* Error handling is done in the subfunction. */
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (inst == NULL) {
-		continue;
-	    }
-
-	    /* add the instance to the instance list */
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-
-	return (instList);
-}
-
-/*
- * Convert the descriptor list to a CIMInstance List that will be used
- * only for object paths and thus does not need to be fully populated.
- * We do the filtering in this function to be sure that we are only
- * returning drives that are modeled with this class in CIM.
- */
-CCIMInstanceList*
-drive_descriptors_toCCIMObjPathInstList(char *providerName, dm_descriptor_t *dp,
-	int *errp)
-{
-	CCIMInstanceList 	*instList = NULL;
-	int			i;
-	int			error = 0;
-	int			have_instances = 0;
-
-	*errp = 0;
-
-	if (dp == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* Create the instance list which will store the instances */
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, cim_getLastError(), errp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	for (i = 0; dp[i] != NULL; i ++) {
-	    dm_descriptor_t 	desc;
-	    nvlist_t		*attrs;
-	    uint32_t		drvtype;
-	    char		*str;
-	    CCIMInstance	*inst;
-
-	    desc = dp[i];
-
-	    attrs = dm_get_attributes(desc, &error);
-	    if (error != 0 || attrs == NULL) {
-		continue;
-	    }
-
-	    drvtype = DM_DT_UNKNOWN;
-	    (void) nvlist_lookup_uint32(attrs, DM_DRVTYPE, &drvtype);
-	    nvlist_free(attrs);
-
-	    switch (drvtype) {
-	    case DM_DT_UNKNOWN:
-		break;
-	    case DM_DT_FIXED:
-		break;
-	    case DM_DT_ZIP:
-		break;
-	    case DM_DT_JAZ:
-		break;
-	    default:
-		/*
-		 * This is not one of the drives that are modeled as a
-		 * Solaris_DiskDrive, so we should skip over it.
-		 */
-		continue;
-	    }
-
-	    str = dm_get_name(desc, &error);
-	    if (error != 0) {
-		util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    DM_GET_NAME_FAILURE, NULL, errp);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (str == NULL) {
-		dm_descriptor_t *aliases;
-
-		aliases = dm_get_associated_descriptors(desc, DM_ALIAS, &error);
-		if (error != 0) {
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			DM_GET_ASSOC_FAILURE, NULL, errp);
-		    cim_freeInstanceList(instList);
-		    return ((CCIMInstanceList *)NULL);
-		}
-
-		str = dm_get_name(aliases[0], &error);
-		dm_free_descriptors(aliases);
-
-		if (error != 0) {
-		    util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-			DM_GET_NAME_FAILURE, NULL, errp);
-		    cim_freeInstanceList(instList);
-		    return ((CCIMInstanceList *)NULL);
-		}
-	    }
-
-	    /* Create instance of disk drive. */
-	    if ((inst = cim_createInstance(providerName)) == NULL) {
-		util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    CREATE_INSTANCE_FAILURE, cim_getLastError(), errp);
-		dm_free_name(str);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    /* add keys */
-	    util_doProperty(DEVICEID, string, str, cim_true, inst, errp);
-	    dm_free_name(str);
-
-	    if (*errp == 0) {
-		util_doProperty(CREATION_CLASS, string, DISK_DRIVE, cim_true,
-		    inst, errp);
-	    }
-
-	    if (*errp == 0) {
-		util_doProperty(SYS_CREATION_CLASS, string, COMPUTER_SYSTEM,
-		    cim_true, inst, errp);
-	    }
-
-	    if (*errp == 0) {
-		util_doProperty(SYSTEM, string, hostName, cim_true, inst, errp);
-	    }
-
-	    if (*errp != 0) {
-		util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, cim_getLastError(), errp);
-		cim_freeInstance(inst);
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    /* add the instance to the instance list */
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		util_handleError(DRIVE_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_INSTANCE_FAILURE, cim_getLastError(), errp);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    have_instances = 1;
-	}
-
-	if (!have_instances) {
-	    cim_freeInstanceList(instList);
-	    instList = (CCIMInstanceList *)NULL;
-	}
-
-	return (instList);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/logicaldisk_descriptors.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,404 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <netdb.h>
-#include <cimapi.h>
-#include <libnvpair.h>
-#include <md5.h>
-
-#include "libdiskmgt.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "cimKeys.h"
-#include "util.h"
-
-/*
- * Convert a single descriptor in to a Solaris_LogicalDisk instance
- */
-
-CCIMInstance *
-logicaldisk_descriptor_toCCIMInstance(char *hostname, dm_descriptor_t  desc,
-    char *provider, int *errp)
-{
-
-	nvlist_t		*nvlp;
-	nvpair_t		*nvp;
-	CCIMInstance		*inst = NULL;
-	CCIMException		*ex;
-	dm_descriptor_t		*dlist;
-	dm_descriptor_t		*alist;
-	char			*str;
-	char			*drive;
-	int			error;
-	char			buf[100];
-
-	*errp = 0;
-
-	/* Create instance of disk. */
-
-	if ((inst = cim_createInstance(provider)) == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Get the alias name to display as the common name as well as
-	 * the deviceid if for some reason this media does not have
-	 * a name.
-	 */
-	dlist = dm_get_associated_descriptors(desc, DM_DRIVE, &error);
-
-	if (error != 0) {
-	    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_ASSOC_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	alist = dm_get_associated_descriptors(dlist[0], DM_ALIAS, &error);
-	dm_free_descriptors(dlist);
-
-	if (error != 0) {
-	    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_ASSOC_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	drive = dm_get_name(alist[0], &error);
-	dm_free_descriptors(alist);
-
-	if (error != 0) {
-	    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_NAME_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty("Name", string, drive, cim_true, inst, errp);
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    dm_free_name(drive);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* Now, assign the deviceID */
-	str = dm_get_name(desc, &error);
-
-	if (error != 0) {
-	    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, DM_GET_NAME_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    dm_free_name(drive);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (str != NULL) {
-	    util_doProperty(DEVICEID, string, str, cim_true, inst, errp);
-	    dm_free_name(str);
-
-	    if (*errp != 0) {
-		ex = cim_getLastError();
-		util_handleError(LOGICALDISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		dm_free_name(drive);
-		return ((CCIMInstance *)NULL);
-	    }
-
-	} else {
-
-	    util_doProperty(DEVICEID, string, drive, cim_true, inst, errp);
-
-	    if (*errp != 0) {
-		ex = cim_getLastError();
-		util_handleError(LOGICALDISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    ADD_PROPERTY_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		dm_free_name(drive);
-		return ((CCIMInstance *)NULL);
-	    }
-	}
-	dm_free_name(drive);
-
-
-	/* add keys */
-
-	util_doProperty(CREATION_CLASS, string, LOGICAL_DISK, cim_true,
-	    inst, errp);
-
-	if (*errp == 0) {
-	    util_doProperty(SYS_CREATION_CLASS, string, COMPUTER_SYSTEM,
-		cim_true, inst, errp);
-	}
-
-	if (*errp == 0) {
-	    util_doProperty(SYSTEM, string, hostname, cim_true, inst, errp);
-	}
-
-	if (!errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	nvlp = dm_get_attributes(desc, &error);
-	if (error != 0) {
-	    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_ATTR_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (nvlp == NULL) {
-	    return (inst);
-	}
-
-	for (nvp = nvlist_next_nvpair(nvlp, NULL); nvp != NULL;
-	    nvp = nvlist_next_nvpair(nvlp, nvp)) {
-
-	    char 	*attrname;
-	    uint32_t    ui32;
-	    uint64_t	ui64;
-
-	    attrname = nvpair_name(nvp);
-
-	    /* If the attrname for this nvp is null, try the next one. */
-
-	    if (attrname == NULL) {
-		continue;
-	    }
-
-	    /* Loop through nvpair list and assign attrs to the CIMInstace. */
-
-	    if (strcasecmp(attrname, DM_BLOCKSIZE) == 0) {
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error != 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		error = snprintf(buf, sizeof (buf), "%u", ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		util_doProperty("BlockSize", uint64, buf, cim_false, inst,
-		    errp);
-
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-	    } else if (strcasecmp(attrname, DM_SIZE) == 0) {
-		error = nvpair_value_uint64(nvp, &ui64);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		error = snprintf(buf, sizeof (buf), "%llu", ui64);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		util_doProperty("NumberOfBlocks", uint64, buf, cim_false,
-		    inst, errp);
-
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-	    }
-	} /* End for */
-	nvlist_free(nvlp);
-
-	/*
-	 * Get the associated drive descriptor to get the status information.
-	 * about this media.
-	 */
-
-	dlist = dm_get_associated_descriptors(desc, DM_DRIVE, &error);
-	if (error != 0) {
-	    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_ASSOC_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-
-	nvlp = dm_get_attributes(dlist[0], &error);
-	dm_free_descriptors(dlist);
-	if (error != 0) {
-	    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_ATTR_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (nvlp == NULL) {
-	    return (inst);
-	}
-
-	for (nvp = nvlist_next_nvpair(nvlp, NULL); nvp != NULL;
-	    nvp = nvlist_next_nvpair(nvlp, nvp)) {
-
-	    char 	*attrname;
-	    uint32_t    ui32;
-	    char	*status;
-	    char	*statusinfo;
-
-	    attrname = nvpair_name(nvp);
-	    /* If the attrname for this nvp is null, try the next one. */
-
-	    if (attrname == NULL) {
-		continue;
-	    }
-
-	    if (strcasecmp(attrname, DM_STATUS) == 0) {
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		if (ui32 == 0) {
-		    status = "Error";
-		    statusinfo = "4";
-		} else {
-		    status = "OK";
-		    statusinfo = "3";
-		}
-		util_doProperty("Status", string, status, cim_false,
-		    inst, errp);
-		util_doProperty("StatusInfo", uint16, statusinfo, cim_false,
-		    inst, errp);
-
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(DISK_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-	    } /* End ifelse */
-	} /* end for */
-	nvlist_free(nvlp);
-	return (inst);
-}
-
-/* Convert the descriptor list to a CIMInstance List */
-
-CCIMInstanceList*
-logicaldisk_descriptors_toCCIMInstanceList(char *providerName,
-	dm_descriptor_t *dp, int *errp)
-{
-	CCIMInstance 		*inst;
-	CCIMInstanceList 	*instList = NULL;
-	CCIMException		*ex;
-	dm_descriptor_t 	desc;
-	int			error;
-	int			i;
-
-	*errp = 0;
-
-
-	/* If not descriptpr list, return an empty instance list. */
-	if (dp == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* Create the instance list which will store the instances */
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(LOGICALDISK_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, errp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	for (i = 0; dp[i] != NULL; i ++) {
-	    desc = dp[i];
-	    inst = logicaldisk_descriptor_toCCIMInstance(hostName, desc,
-		providerName, &error);
-	    if (error != 0) {
-		/* Error handling is done in the subfunction. */
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (inst == NULL) {
-		continue;
-	    }
-
-	    /* add the instance to the instance list */
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(LOGICALDISK_DESCRIPTOR_FUNC,
-		    CIM_ERR_FAILED, ADD_INSTANCE_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-	return (instList);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/mediapresent_descriptors.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <netdb.h>
-#include <cimapi.h>
-#include <libnvpair.h>
-#include <md5.h>
-
-#include "libdiskmgt.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "cimKeys.h"
-#include "util.h"
-#include "logicaldisk_descriptors.h"
-#include "drive_descriptors.h"
-
-/*
- * Convert a the antecedent and dependent descriptors to a
- * Solaris_MediaPresent association instance
- */
-
-CCIMInstance *
-mediapresent_descriptor_toCCIMInstance(char *hostname, dm_descriptor_t  ant,
-    dm_descriptor_t dep, char *provider, int *errp)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMInstance		*ant_inst;
-	CCIMInstance		*dep_inst;
-	CCIMObjectPath		*ant_op;
-	CCIMObjectPath		*dep_op;
-	CCIMException		*ex;
-
-	*errp = 0;
-
-	/* Create instance of media present assoc. */
-
-	if ((inst = cim_createInstance(provider)) == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now get the object path for the REF pointers.
-	 */
-
-	ant_inst = drive_descriptor_toCCIMInstance(hostname, ant,
-		DISK_DRIVE, errp);
-
-	if (*errp != 0) {
-	    util_handleError(MEDIAPRES_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, MEDIAPRES_DESC_TO_INSTANCE_FAILURE, NULL,
-		    errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	dep_inst = logicaldisk_descriptor_toCCIMInstance(hostname, dep,
-	    LOGICAL_DISK, errp);
-
-	if (*errp != 0) {
-	    util_handleError(MEDIAPRES_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, MEDIAPRES_DESC_TO_INSTANCE_FAILURE,
-		    NULL, errp);
-	    cim_freeInstance(inst);
-	    cim_freeInstance(ant_inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Get the object paths that are represented by these instances.
-	 * Add these properties to the association instance.
-	 */
-
-	ant_op = cim_createObjectPath(ant_inst);
-	dep_op = cim_createObjectPath(dep_inst);
-	cim_freeInstance(ant_inst);
-	cim_freeInstance(dep_inst);
-
-	if (ant_op == NULL || dep_op == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-
-	util_doReferenceProperty(ANTECEDENT, ant_op, cim_true, inst, errp);
-	cim_freeObjectPath(ant_op);
-
-	util_doReferenceProperty(DEPENDENT, dep_op, cim_true, inst, errp);
-	cim_freeObjectPath(dep_op);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty("FixedMedia", boolean, "1", cim_false, inst, errp);
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MEDIAPRES_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/methods.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1122 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/wait.h>
-#include <errno.h>
-#include <cimlogsvc.h>
-#include <cimauthcheck.h>
-#include <sys/param.h>
-#include "libdiskmgt.h"
-#include "messageStrings.h"
-#include "providerNames.h"
-#include "util.h"
-#include "methods.h"
-
-static int		add_fdisk_props(ulong_t *ret_array, int part_num,
-			    dm_descriptor_t d);
-static CIMBool		build_fdisk_file(char *fdisk_file,
-			    CCIMPropertyList *params);
-static CIMBool		build_fmt_file(char *fmt_file,
-			    CCIMPropertyList *params);
-static CIMBool		execute_cmd(char *command_line, char *err_file);
-static CIMBool		check_rights(char *provider);
-static void		convert_flag(long flag, char *flag_buf, int len);
-static CCIMProperty	*create_result(char *status);
-static CCIMProperty 	*create_result_out(char *status,
-			    CCIMPropertyList *outParams);
-static int 		disk_geometry(char *media_name, ulong_t *geometry);
-static CIMBool		get_devpath(CCIMObjectPath *op, char *devpath, int len);
-static cimchar		*get_prop_val(CCIMProperty *prop);
-static dm_descriptor_t	*get_partition_descs(CCIMObjectPath *op);
-static void		make_fdisk_path(char *devpath);
-
-#define	DATALEN		256
-#define	CMDLEN		2048
-#define	NUM_GEOM_ELEMENTS 7
-
-/*
- * This method formats the disk drive identified by CIMObjectPath
- * based on the values in inParams
- */
-
-CCIMProperty *
-create_partitions(CCIMPropertyList *params, CCIMObjectPath *op)
-{
-	char		devpath[MAXPATHLEN];
-	char		fmt_file[L_tmpnam];
-	char		command_line[CMDLEN];
-	int		len;
-	int		error;
-
-	if (!check_rights("Solaris_Disk") || op == NULL || params == NULL) {
-	    return (create_result(PROPFALSE));
-	}
-
-	if (get_devpath(op, devpath, sizeof (devpath)) == cim_false) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (create_result(PROPFALSE));
-	}
-
-	/* Create a format data file to be used by the fmthard command. */
-	if (build_fmt_file(fmt_file, params) == cim_false) {
-	    /* last error is set in build_fmt_file function */
-	    util_removeFile(fmt_file);
-	    return (create_result(PROPFALSE));
-	}
-
-	/* Create 'fmthard' command line */
-	len = snprintf(command_line, sizeof (command_line),
-	    "/usr/sbin/fmthard -s %s %s 2> /dev/null", fmt_file, devpath);
-
-	if (len < 0 || (len + 1) > sizeof (command_line)) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_FAILED,
-		CIM_ERR_FAILED, NULL, &error);
-	    util_removeFile(fmt_file);
-	    return (create_result(PROPFALSE));
-	}
-
-	/* Execute the command. */
-	if (!execute_cmd(command_line, "/dev/null")) {
-	    util_removeFile(fmt_file);
-	    return (create_result(PROPFALSE));
-	}
-
-	util_removeFile(fmt_file);
-	return (create_result(PROPTRUE));
-}
-
-CCIMProperty *
-create_filesystem(CCIMObjectPath *op)
-{
-	char			devpath[MAXPATHLEN];
-	char			command_line[CMDLEN];
-	int			len;
-	int			error;
-
-	/* check to make sure caller has admin write rights */
-	if (!check_rights("Solaris_DiskPartition")) {
-	    return (create_result(PROPFALSE));
-	}
-
-	if (get_devpath(op, devpath, sizeof (devpath)) == cim_false) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (create_result(PROPFALSE));
-	}
-
-	/* Create 'newfs' command line */
-	len = snprintf(command_line, sizeof (command_line),
-	    "echo y | /usr/sbin/newfs %s 2>/dev/null", devpath);
-
-	if (len < 0 || (len + 1) > sizeof (command_line)) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_FAILED,
-		CIM_ERR_FAILED, NULL, &error);
-	    return (create_result(PROPFALSE));
-	}
-
-	/* Execute the command. */
-	if (!execute_cmd(command_line, "/dev/null")) {
-	    return (create_result(PROPFALSE));
-	}
-
-	return (create_result(PROPTRUE));
-}
-
-/*
- * Function:	create_fdisk_partitions
- *
- * Parameters:  params - CCIMPropertyList pointer that dereferences
- *		to a list of not less than 4 or more than 16 CCIMProperty
- *		values.  Number of CCIMProperty values must be a multiple
- * 		of 4.
- *		op - CCIMObjectPath pointer that points to the object path
- *		of the device to fdisk.
- *
- * Returns:	Returns a CCIMProperty pointer.  The CCIMProperty referenced
- *		by the pointer will contain an mValue of cim_true for
- *		success or cim_false on failure.
- *
- * Description:	Executes the fdisk command on the device pointed to my 'op'
- *		with the parameters provided in 'params'.
- *
- * Notes:	The calling program is responsible for releasing the memory
- *		used by the returned CCIMProperty.
- */
-CCIMProperty *
-create_fdisk_partitions(CCIMPropertyList *params, CCIMObjectPath *op)
-{
-	char		devpath[MAXPATHLEN];
-	char		fdisk_file[L_tmpnam];
-	char		err_file[L_tmpnam];
-	char		command_line[CMDLEN];
-	int		len;
-	int		error;
-
-	if (!check_rights("Solaris_Disk") ||
-	    op == NULL || params == NULL) {
-	    return (create_result(PROPFALSE));
-	}
-
-	if (get_devpath(op, devpath, sizeof (devpath)) == cim_false) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		CIM_ERR_FAILED, NULL, &error);
-	    return (create_result(PROPFALSE));
-	}
-	make_fdisk_path(devpath);
-
-	/* Create a fdisk data file to be used by the fdisk command. */
-	if (build_fdisk_file(fdisk_file, params) == cim_false) {
-	    /* last error is set in build_fdisk_file function */
-	    util_removeFile(fdisk_file);
-	    return (create_result(PROPFALSE));
-	}
-
-	(void) tmpnam(err_file);
-
-	/*
-	 * Build the fdisk command line.  Some combinations of
-	 * parameters can cause fdisk to output a message and wait
-	 * for a y/n response, echo'ing an 'n' and piping it to
-	 * fdisk solves this problem.
-	 *
-	 * Using the form of fdisk (-F) that takes partition information
-	 * from a disk file so that multiple partitions can be created
-	 * by one request.
-	 */
-
-	len = snprintf(command_line, sizeof (command_line),
-	    "echo n | /usr/sbin/fdisk -F %s %s 2> %s",
-	    fdisk_file, devpath, err_file);
-
-	if (len < 0 || (len + 1) > sizeof (command_line)) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_FAILED,
-		NULL, NULL, &error);
-	    util_removeFile(fdisk_file);
-	    return (create_result(PROPFALSE));
-	}
-
-	/* Execute the command. */
-	if (!execute_cmd(command_line, err_file)) {
-	    util_removeFile(fdisk_file);
-	    return (create_result(PROPFALSE));
-	}
-
-	util_removeFile(fdisk_file);
-	return (create_result(PROPTRUE));
-}
-
-/*
- * Function:	create_default_fdisk_partition
- *
- * Parameters:  op - CCIMObjectPath pointer that points to the object path
- *		of the device to fdisk.
- *
- * Returns:	Returns a CCIMProperty pointer.  The CCIMProperty referenced
- *		by the pointer will contain an mValue of cim_true for
- *		success or cim_false on failure.
- *
- * Description:	Executes the fdisk command on the device pointed to my 'op'
- *		with the -B parameter.
- *
- * Notes:	The calling program is responsible for releasing the memory
- *		used by the returned CCIMProperty.
- */
-CCIMProperty *
-create_default_fdisk_partition(CCIMObjectPath *op)
-{
-	char		devpath[MAXPATHLEN];
-	char		err_file[L_tmpnam];
-	char		command_line[CMDLEN];
-	int		len;
-	int		error;
-
-	/* This function is called from Solaris_DiskDrive, not Solaris_Disk. */
-	if (!check_rights("Solaris_DiskDrive") || op == NULL) {
-	    return (create_result(PROPFALSE));
-	}
-
-	if (get_devpath(op, devpath, sizeof (devpath)) == cim_false) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		CIM_ERR_FAILED, NULL, &error);
-	    return (create_result(PROPFALSE));
-	}
-	make_fdisk_path(devpath);
-
-	(void) tmpnam(err_file);
-
-	/*
-	 * Build the fdisk command line.  Some combinations of
-	 * parameters can cause fdisk to output a message and wait
-	 * for a y/n response, echo'ing an 'n' and piping it to
-	 * fdisk solves this problem.
-	 *
-	 * Using the form of fdisk (-F) that takes partition information
-	 * from a disk file so that multiple partitions can be created
-	 * by one request.
-	 */
-
-	len = snprintf(command_line, sizeof (command_line),
-	    "echo n | /usr/sbin/fdisk -B %s 2> %s",
-	    devpath, err_file);
-
-	if (len < 0 || (len + 1) > sizeof (command_line)) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_FAILED,
-		NULL, NULL, &error);
-	    return (create_result(PROPFALSE));
-	}
-
-	/* Execute the command. */
-	if (!execute_cmd(command_line, err_file)) {
-	    return (create_result(PROPFALSE));
-	}
-
-	return (create_result(PROPTRUE));
-}
-
-/*
- * Function:	writeVolumeName
- *
- * Parameters:	params - CCIMPropertyList pointer.  Property list
- *		containing the new disk label name.
- *		op - CCIMObjectPath pointer.  Object path containing
- *		the deviceId of the disk to label.
- *
- * Returns:	Returns a CCIMProperty pointer.  The CCIMProperty referenced
- *		by the pointer will contain an mValue of cim_true for
- *		success or cim_false on failure.
- *
- * Description:	Executes the fmthard -n volume_name command on the device
- *		pointed to by 'op'.
- */
-CCIMProperty *
-label_disk(CCIMPropertyList *params, CCIMObjectPath *op)
-{
-	char		devpath[MAXPATHLEN];
-	char		command_line[CMDLEN];
-	int		len;
-	cimchar		*label;
-	int		error;
-
-	if (!check_rights("Solaris_Disk") ||
-	    op == NULL || params == NULL) {
-	    return (create_result(PROPFALSE));
-	}
-
-	if (get_devpath(op, devpath, sizeof (devpath)) == cim_false) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (create_result(PROPFALSE));
-	}
-
-	/* Extract the label from the input parameters */
-	if ((label = get_prop_val(params->mDataObject)) == NULL) {
-	    return (create_result(PROPFALSE));
-	}
-	if (strlen(label) > 8) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (create_result(PROPFALSE));
-	}
-
-	/* Build the command line to execute */
-
-	len = snprintf(command_line, sizeof (command_line),
-	    "/usr/sbin/fmthard -n '%s' %s 2> /dev/null", label, devpath);
-
-	if (len < 0 || (len + 1) > sizeof (command_line)) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (create_result(PROPFALSE));
-	}
-
-	/* Execute the command. */
-	if (!execute_cmd(command_line, "/dev/null")) {
-	    return (create_result(PROPFALSE));
-	}
-	return (create_result(PROPTRUE));
-}
-
-CCIMProperty *
-get_disk_geometry(CCIMPropertyList *out, CCIMObjectPath *op)
-{
-	CCIMProperty		*prop = NULL;
-	CCIMPropertyList	*prop_list = NULL;
-	ulong_t			geometry[NUM_GEOM_ELEMENTS];
-	char			*array_str;
-	int			error;
-
-	/*
-	 * Don't use get_devpath since we are going through the API.
-	 * Parse the object path to get the media name to pass in.
-	 */
-	if (op != NULL) {
-	    prop_list = op->mKeyProperties;
-	}
-
-	for (; prop_list; prop_list = prop_list->mNext) {
-
-	    if (((prop = prop_list->mDataObject) != NULL &&
-		prop->mName != NULL &&
-		strcasecmp(prop->mName, "Tag")) == 0) {
-		break;
-	    }
-	}
-
-	if (prop == NULL || prop->mValue == NULL) {
-	    return (create_result(PROPFALSE));
-	}
-
-	cim_logDebug("get_disk_geometry", "%s", prop->mValue);
-	error = disk_geometry(prop->mValue, geometry);
-	if (error != 0) {
-	    /* We have to put something in the out params when we fail. */
-	    ulong_t		dummy [] = {0};
-	    char		*array_str;
-	    CCIMProperty	*p;
-
-	    cim_logDebug("get_disk_geometry", "disk_geometry failed");
-	    if ((array_str = cim_encodeUint32Array(dummy, 1)) == NULL) {
-		util_handleError(DISK_DRIVE, CIM_ERR_FAILED, CIM_ERR_FAILED,
-		    NULL, &error);
-	    } else if ((p = cim_createProperty("geometry",
-		sint32_array, array_str, NULL, cim_false)) == NULL) {
-		free(array_str);
-	    } else if ((cim_addPropertyToPropertyList(out, p)) == NULL) {
-		cim_freeProperty(p);
-	    }
-
-	    return (create_result(PROPFALSE));
-	}
-
-	array_str = cim_encodeUint32Array(geometry, NUM_GEOM_ELEMENTS);
-	if (array_str == NULL) {
-	    util_handleError(DISK_DRIVE, CIM_ERR_FAILED, CIM_ERR_FAILED, NULL,
-		&error);
-	    return (create_result(PROPFALSE));
-	}
-
-	if ((prop = cim_createProperty("geometry", sint32_array,
-	    array_str, NULL, cim_false)) == NULL) {
-	    free(array_str);
-	    return (create_result(PROPFALSE));
-	}
-
-	if ((cim_addPropertyToPropertyList(out, prop)) == NULL) {
-	    cim_freeProperty(prop);
-	    return (create_result(PROPFALSE));
-	}
-
-	return (create_result(PROPTRUE));
-}
-
-/*
- * Function:	getFdisk
- *
- * Parameters:	outParams - CCIMPropertyList pointer.  The output from
- *		the fdisk command is placed in this list.
- *		op - CCIMObjectPath pointer.  The object path contains
- *		deviceID of the device to fdisk.
- *
- * Returns:	Returns a CCIMProperty pointer.  The CCIMProperty referenced
- *		by the pointer will contain an mValue of cim_true for
- *		success or cim_false on failure.
- *
- * Notes:	The calling program is responsible for releasing the memory
- *		used by the returned CCIMProperty and the CCIMPropertyList
- *		pointed to by outParams.  I don't know why we return only
- *		four of the possible values from fdisk.  That is the way
- *		the Java provider worked and this provider was written to
- *		mimic the Java provider.
- */
-CCIMProperty *
-getFdisk(CCIMPropertyList *outParams, CCIMObjectPath *op)
-{
-	dm_descriptor_t		*da;
-	int			i;
-	int			cnt;
-	ulong_t			*ret_array;
-	int			error;
-	char			*array_str;
-	CCIMProperty		*prop;
-
-	if (cim_checkRights(DISK_DRIVE, DISK_READ_RIGHT, (void *) NULL) ==
-	    cim_false || op == NULL) {
-		return (create_result_out(PROPFALSE, outParams));
-	}
-
-	if ((da = get_partition_descs(op)) == NULL) {
-	    return (create_result_out(PROPFALSE, outParams));
-	}
-
-	/* Count the number of fdisk partitions. */
-	for (cnt = 0; da[cnt]; cnt++);
-
-	/* We return 4 values for each partition. */
-	cnt = cnt * 4;
-
-	ret_array = (ulong_t *)calloc(cnt, sizeof (ulong_t));
-	if (ret_array == NULL) {
-	    dm_free_descriptors(da);
-	    util_handleError(DISK_DRIVE, CIM_ERR_FAILED, CIM_ERR_FAILED, NULL,
-		&error);
-	    return (create_result_out(PROPFALSE, outParams));
-	}
-
-	for (i = 0; da[i]; i++) {
-	    if (!add_fdisk_props(ret_array, i, da[i])) {
-		dm_free_descriptors(da);
-		free(ret_array);
-		return (create_result_out(PROPFALSE, outParams));
-	    }
-	}
-
-	dm_free_descriptors(da);
-
-	array_str = cim_encodeUint32Array(ret_array, cnt);
-
-	free(ret_array);
-
-	if (array_str == NULL) {
-	    util_handleError(DISK_DRIVE, CIM_ERR_FAILED, CIM_ERR_FAILED, NULL,
-		&error);
-	    return (create_result_out(PROPFALSE, outParams));
-	}
-
-	if ((prop = cim_createProperty("FDiskPartitions", sint32_array,
-	    array_str, NULL, cim_false)) == NULL) {
-	    free(array_str);
-	    return (create_result_out(PROPFALSE, outParams));
-	}
-
-	if ((cim_addPropertyToPropertyList(outParams, prop)) == NULL) {
-	    cim_freeProperty(prop);
-	    return (create_result_out(PROPFALSE, outParams));
-	}
-
-	return (create_result_out(PROPTRUE, outParams));
-}
-
-static int
-add_fdisk_props(ulong_t *ret_array, int part_num, dm_descriptor_t d)
-{
-	int		error;
-	nvlist_t	*attrs;
-	int		i;
-	int		result = 1;
-	int		offset;
-	static char	*attr_names[] = {
-	    DM_PTYPE, DM_BOOTID, DM_RELSECT, DM_NSECTORS, NULL};
-
-	attrs = dm_get_attributes(d, &error);
-	if (error != 0) {
-	    return (0);
-	}
-
-	/* figure out where in the array to put the values */
-	offset = part_num * 4;
-
-	for (i = 0; attr_names[i]; i++) {
-	    uint32_t	val32;
-
-	    if (nvlist_lookup_uint32(attrs, attr_names[i], &val32) != 0) {
-		result = 0;
-		break;
-	    }
-
-	    ret_array[offset++] = val32;
-	}
-
-	nvlist_free(attrs);
-	return (result);
-}
-
-/*
- * inParams - CCIMPropertyList pointer that dereferences to a list of not less
- * than 4 or more than 16 CCIMProperty values.  Number of CCIMProperty values
- * must be a multiple of 4.
- *
- * The fdisk file will contain at least one line and not more than four lines
- * in the following format:
- *	id:act:0:0:0:0:0:0:rsect:numsect.
- * Values for id, act, rsect and numsect are taken from inParams.
- */
-static CIMBool
-build_fdisk_file(char *fdisk_file, CCIMPropertyList *params)
-{
-	FILE	*fp;
-	int	i;
-	int	error;
-	ulong_t	*vals;
-	int	cnt = 0;
-
-	if (params == NULL) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (cim_false);
-	}
-
-	vals = cim_decodeUint32Array(get_prop_val(params->mDataObject), &cnt);
-
-	if (cnt == 0 || cnt > 16 || (cnt % 4) != 0) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (cim_false);
-	}
-
-	(void) tmpnam(fdisk_file);
-
-	/* Open the temporary file for writing */
-	if ((fp = util_openFile(fdisk_file, "w")) == NULL) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_FAILED, NULL,
-		NULL, &error);
-	    return (cim_false);
-	}
-
-	/*
-	 * Build a fdisk_file using 4 input parameters at a time.
-	 * Check for all possible NULL parameters, parameter lists
-	 * greater than 16 or not a multiple of 4.
-	 */
-	for (i = 0; i < cnt; i += 4) {
-	    char	line_buf[DATALEN];
-
-	    (void) snprintf(line_buf, sizeof (line_buf),
-		"%lu:%lu:0:0:0:0:0:0:%lu:%lu\n",
-		vals[i], vals[i + 1], vals[i + 2], vals[i + 3]);
-
-	    /* Write the line of parameters to the fdisk_file */
-	    if ((fputs(line_buf, fp)) == EOF) {
-		util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		    NULL, NULL, &error);
-		(void) util_closeFile(fp, fdisk_file);
-		return (cim_false);
-	    }
-	}
-
-	if ((util_closeFile(fp, fdisk_file)) == 0) {
-	    return (cim_false);
-	}
-
-	/* Caller must delete the temporary file */
-	return (cim_true);
-}
-
-/*
- * inParams - CCIMPropertyList pointer that dereferences to a list of not less
- * than 5 CCIMProperty values. The number of CCIMProperty values must be a
- * multiple of 5.
- *
- * The file will contain at least one line in the following format:
- *	part tag flag start_sect part_size
- * Values for partition, tag, flag, starting sector and partition size are
- * taken from inParams.
- */
-static CIMBool
-build_fmt_file(char *fmt_file, CCIMPropertyList *params)
-{
-	ulong_t	*vals;
-	int	cnt = 0;
-	FILE	*fp;
-	int	error;
-	int	i;
-
-	if (params == NULL) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (cim_false);
-	}
-
-	vals = cim_decodeUint32Array(get_prop_val(params->mDataObject), &cnt);
-
-	if (cnt == 0 || (cnt % 5) != 0) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (cim_false);
-	}
-
-	(void) tmpnam(fmt_file);
-
-	/* Open the temporary file for writing */
-	if ((fp = util_openFile(fmt_file, "w")) == NULL) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_FAILED, NULL,
-		NULL, &error);
-	    return (cim_false);
-	}
-
-	/*
-	 * Build a data file for the fmthard command.
-	 * Each line of the file consists of:
-	 *
-	 * part_num tag flag start_sector partition_size
-	 *
-	 * The fmthard command requires the starting sector fall on
-	 * a cylinder boundry.
-	 */
-	for (i = 0; i < cnt; i += 5) {
-	    char	line_buf[DATALEN];
-	    char	flag_buf[DATALEN];
-
-	    convert_flag(vals[i + 2], flag_buf, sizeof (flag_buf));
-
-	    (void) snprintf(line_buf, sizeof (line_buf),
-		"%lu %lu %s %lu %lu\n",
-		vals[i], vals[i + 1], flag_buf, vals[i + 3], vals[i + 4]);
-
-	    /* Write the line of parameters to the fdisk_file */
-	    if ((fputs(line_buf, fp)) == EOF) {
-		util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		    NULL, NULL, &error);
-		(void) util_closeFile(fp, fmt_file);
-		return (cim_false);
-	    }
-	}
-
-	if ((util_closeFile(fp, fmt_file)) == 0) {
-	    return (cim_false);
-	}
-
-	/* Caller must delete the file */
-	return (cim_true);
-}
-
-/*
- * check_rights
- *
- * Performs check for 'admin write' rights.  Handles error
- * checking and reporting.  Returns cim_true on success and
- * cim_false on failure.
- */
-static CIMBool
-check_rights(char *provider)
-{
-
-	int		error;
-
-	if ((cim_checkRights(provider, DISK_WRITE_RIGHT, (void *) NULL))
-	    == cim_false) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_ACCESS_DENIED, NULL,
-		NULL, &error);
-	    return (cim_false);
-	}
-	return (cim_true);
-}
-
-/*
- * Converts decimal flag value to hex string.
- * Valid flag values are hex 00, 01, 10, 11.
- * Places result in new cimchar array and returns
- * pointer to array on success and NULL on failure.
- */
-static void
-convert_flag(long flag, char *flag_buf, int len)
-{
-	switch (flag) {
-	case 1:
-		(void) strlcpy(flag_buf, "0x01", len);
-		break;
-	case 16:
-		(void) strlcpy(flag_buf, "0x10", len);
-		break;
-	case 17:
-		(void) strlcpy(flag_buf, "0x11", len);
-		break;
-	default:
-		(void) strlcpy(flag_buf, "0x00", len);
-		break;
-	}
-}
-
-static CCIMProperty *
-create_result(char *status)
-{
-	return (cim_createProperty("result", boolean, status, NULL, cim_false));
-}
-
-static CCIMProperty *
-create_result_out(char *status, CCIMPropertyList *outParams)
-{
-	if (strcmp(status, PROPFALSE) == 0) {
-	    /* We have to put something in the out params when we fail. */
-	    ulong_t		dummy [] = {0};
-	    int			error;
-	    char		*array_str;
-	    CCIMProperty	*p;
-
-	    if ((array_str = cim_encodeUint32Array(dummy, 1)) == NULL) {
-		util_handleError(DISK_DRIVE, CIM_ERR_FAILED, CIM_ERR_FAILED,
-		    NULL, &error);
-	    } else if ((p = cim_createProperty("FDiskPartitions",
-		sint32_array, array_str, NULL, cim_false)) == NULL) {
-		free(array_str);
-	    } else if ((cim_addPropertyToPropertyList(outParams, p)) == NULL) {
-		cim_freeProperty(p);
-	    }
-	}
-
-	return (create_result(status));
-}
-
-/*
- * Return: 1 if fails, 0 if ok.  geometry array contains:
- *     0. SectorsPerCylinder
- *     1. HeadsPerCylinder
- *     2. BytesPerCylinder
- *     3. PhysicalCylinders
- *     4. DataCylinders
- *     5. AlternateCylinders
- *     6. ActualCylinders
- */
-static int
-disk_geometry(char *media_name, ulong_t *geometry)
-{
-	int		error;
-	dm_descriptor_t d;
-	nvlist_t	*attrs;
-	uint32_t	val32;
-
-	d = dm_get_descriptor_by_name(DM_MEDIA, media_name, &error);
-	if (error != 0) {
-	    return (1);
-	}
-
-	attrs = dm_get_attributes(d, &error);
-	dm_free_descriptor(d);
-	if (error != 0) {
-	    return (1);
-	}
-
-	/*
-	 * If nsect is not in the attr list then we have media that does
-	 * not have geometry info on it (e.g. EFI label).  So return a failure
-	 * in this case.  Otherwise, just get the attrs we can and return
-	 * their values.
-	 */
-	if (nvlist_lookup_uint32(attrs, DM_NSECTORS, &val32) != 0) {
-	    nvlist_free(attrs);
-	    return (1);
-	}
-	geometry[0] = val32;
-	val32 = 0;
-
-	(void) nvlist_lookup_uint32(attrs, DM_NHEADS, &val32);
-	geometry[1] = val32;
-	val32 = 0;
-	(void) nvlist_lookup_uint32(attrs, DM_BLOCKSIZE, &val32);
-	geometry[2] = (geometry[1] * geometry[0]) * val32;
-	val32 = 0;
-	(void) nvlist_lookup_uint32(attrs, DM_NPHYSCYLINDERS, &val32);
-	geometry[3] = val32;
-	val32 = 0;
-	(void) nvlist_lookup_uint32(attrs, DM_NCYLINDERS, &val32);
-	geometry[4] = val32;
-	val32 = 0;
-	(void) nvlist_lookup_uint32(attrs, DM_NALTCYLINDERS, &val32);
-	geometry[5] = val32;
-	val32 = 0;
-	/* This one is probably there only in x86 machines. */
-	(void) nvlist_lookup_uint32(attrs, DM_NACTUALCYLINDERS, &val32);
-	geometry[6] = val32;
-
-	nvlist_free(attrs);
-
-	return (0);
-}
-
-/*
- * Use popen to execute a command.  Check for failures and
- * handle error reporting.
- * params:
- *   commandLine - the command to execute
- *   err_file - file that receives the stderr output from the
- *		command
- *
- * Returns cim_true on success, cim_false on failure.
- *
- * Note:  function removes the error file if it exists
- */
-static CIMBool
-execute_cmd(char *command_line, char *err_file)
-{
-	FILE	*cfp;
-	char   	buf[BUFSIZ];
-	int	result;
-	int	error;
-
-	cim_logDebug("execute_cmd", "%s ", command_line);
-
-	/* Execute the fmthard command using popen */
-	if ((cfp = popen(command_line, "r")) == NULL) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_FAILED, NULL,
-		NULL, &error);
-	    return (cim_false);
-	}
-
-	/* Read the commands stdout and ignore it */
-	while (fgets(buf, sizeof (buf), cfp) != NULL);
-	result = pclose(cfp);
-
-	/* the buf will hold any error output */
-	buf[0] = '\0';
-	if (strcmp(err_file, "/dev/null") != 0) {
-	    FILE	*efp;
-
-	    if ((efp = util_openFile(err_file, "r")) == NULL) {
-		/*
-		 * err_file should have been created when popen executed
-		 * 'commandLine', so the openFile shouldn't fail.  Treating it
-		 * as a failure.
-		 */
-		util_handleError(INVOKE_METHOD, CIM_ERR_FAILED, NULL,
-		    NULL, &error);
-		util_removeFile(err_file);
-		return (cim_false);
-	    }
-
-	    (void) fgets(buf, sizeof (buf), efp);
-	    cim_logDebug("execute_cmd", "err output: %s", buf);
-	    (void) util_closeFile(efp, err_file);
-	    util_removeFile(err_file);
-	}
-
-	if (strlen(buf) != 0 ||
-	    (WIFEXITED(result) != 0 && WEXITSTATUS(result) != 0)) {
-
-	    cim_logDebug("execute_cmd", "exit: %d %d", WIFEXITED(result),
-		WEXITSTATUS(result));
-	    util_handleError(INVOKE_METHOD, CIM_ERR_FAILED, NULL, NULL, &error);
-	    return (cim_false);
-	}
-
-	return (cim_true);
-}
-
-/*
- * Take the deviceID property from the object path and get the raw devpath
- * of the drive that corresponds to the given device ID.
- */
-static CIMBool
-get_devpath(CCIMObjectPath *op, char *devpath, int len)
-{
-	CCIMPropertyList	*prop_list = NULL;
-	CCIMProperty		*prop = NULL;
-	int			error;
-	dm_descriptor_t		dp;
-	dm_descriptor_t		*da;
-	nvlist_t		*attrs;
-	char			*opath;
-	char			*keyprop;
-	int			type = 0;
-	char			*p;
-
-	if (strcasecmp(op->mName, "Solaris_Disk") == 0) {
-	    keyprop = "Tag";
-	    type = 1;
-	} else if (strcasecmp(op->mName, "Solaris_DiskDrive") == 0) {
-	    keyprop = "deviceid";
-	    type = 2;
-	} else if (strcasecmp(op->mName, "Solaris_DiskPartition") == 0) {
-	    keyprop = "deviceid";
-	    type = 3;
-	} else {
-	    return (cim_false);
-	}
-
-	if (op != NULL) {
-	    prop_list = op->mKeyProperties;
-	}
-
-	for (; prop_list; prop_list = prop_list->mNext) {
-
-	    if (((prop = prop_list->mDataObject) != NULL &&
-		prop->mName != NULL && strcasecmp(prop->mName, keyprop)) == 0) {
-		break;
-	    }
-	}
-
-	if (prop == NULL || prop->mValue == NULL) {
-	    return (cim_false);
-	}
-
-	switch (type) {
-	case 1:
-	    dp = dm_get_descriptor_by_name(DM_MEDIA, prop->mValue, &error);
-	    if (error != 0) {
-		return (cim_false);
-	    }
-
-	    da = dm_get_associated_descriptors(dp, DM_DRIVE, &error);
-	    dm_free_descriptor(dp);
-	    if (error != 0 || da == NULL) {
-		return (cim_false);
-	    }
-
-	    if (da[0] == NULL) {
-		dm_free_descriptors(da);
-		return (cim_false);
-	    }
-
-	    attrs = dm_get_attributes(da[0], &error);
-	    dm_free_descriptors(da);
-	    if (error != 0) {
-		return (cim_false);
-	    }
-
-	    if (nvlist_lookup_string(attrs, DM_OPATH, &opath) != 0) {
-		nvlist_free(attrs);
-		return (cim_false);
-	    }
-	    (void) strlcpy(devpath, opath, len);
-	    nvlist_free(attrs);
-	    break;
-
-	case 2:
-	    dp = dm_get_descriptor_by_name(DM_DRIVE, prop->mValue, &error);
-	    if (error != 0) {
-		return (cim_false);
-	    }
-
-	    attrs = dm_get_attributes(dp, &error);
-	    dm_free_descriptor(dp);
-	    if (error != 0) {
-		return (cim_false);
-	    }
-
-	    if (nvlist_lookup_string(attrs, DM_OPATH, &opath) != 0) {
-		nvlist_free(attrs);
-		return (cim_false);
-	    }
-	    (void) strlcpy(devpath, opath, len);
-	    nvlist_free(attrs);
-	    break;
-
-	case 3:
-	    /* Convert the Solaris_DiskPartition value to rdsk. */
-	    p = strstr(prop->mValue, "/dsk/");
-	    if (p == NULL || (strlen(prop->mValue) + 2) > len) {
-		(void) strlcpy(devpath, prop->mValue, len);
-	    } else {
-		p++;
-		*p = 0;
-		(void) strcpy(devpath, prop->mValue);	/* copy up to dsk/ */
-		*p = 'd';
-		(void) strcat(devpath, "r");		/* prefix 'r' to dsk/ */
-		(void) strcat(devpath, p);		/* append the rest */
-	    }
-	    break;
-	}
-
-	return (cim_true);
-}
-
-/*
- * Take the deviceID property from the object path and get the raw devpath
- * of the drive that corresponds to the given device ID.
- */
-static dm_descriptor_t *
-get_partition_descs(CCIMObjectPath *op)
-{
-	CCIMPropertyList	*prop_list = NULL;
-	CCIMProperty		*prop = NULL;
-	int			error;
-	dm_descriptor_t		dp;
-	dm_descriptor_t		*da;
-	dm_descriptor_t		*dpa;
-
-	if (op != NULL) {
-	    prop_list = op->mKeyProperties;
-	}
-
-	for (; prop_list; prop_list = prop_list->mNext) {
-
-	    if (((prop = prop_list->mDataObject) != NULL &&
-		prop->mName != NULL &&
-		strcasecmp(prop->mName, "deviceid")) == 0) {
-		break;
-	    }
-	}
-
-	if (prop == NULL || prop->mValue == NULL) {
-	    return (NULL);
-	}
-
-	dp = dm_get_descriptor_by_name(DM_DRIVE, prop->mValue, &error);
-	if (error != 0) {
-	    return (NULL);
-	}
-
-	da = dm_get_associated_descriptors(dp, DM_MEDIA, &error);
-	dm_free_descriptor(dp);
-	if (error != 0 || da == NULL) {
-	    return (NULL);
-	}
-
-	if (da[0] == NULL) {
-	    dm_free_descriptors(da);
-	    return (NULL);
-	}
-
-	dpa = dm_get_associated_descriptors(da[0], DM_PARTITION, &error);
-	dm_free_descriptors(da);
-	if (error != 0 || dpa == NULL) {
-	    return (NULL);
-	}
-
-	if (dpa[0] == NULL) {
-	    dm_free_descriptors(dpa);
-	    return (NULL);
-	}
-
-	return (dpa);
-}
-
-static cimchar *
-get_prop_val(CCIMProperty *prop)
-{
-
-	int		error;
-
-	if (prop == NULL || prop->mValue == NULL) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((cimchar *)NULL);
-	}
-	return (prop->mValue);
-}
-
-static void
-make_fdisk_path(char *devpath)
-{
-	int len;
-
-	len = strlen(devpath) - 2;
-	if (len <= 0 || *(devpath + len) != 's') {
-	    return;
-	}
-
-	*(devpath + len) = 'p';
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/mpxiogroup_descriptors.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,214 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <stdarg.h>
-#include <unistd.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <netdb.h>
-#include <cimapi.h>
-#include <libnvpair.h>
-#include <md5.h>
-
-#include "libdiskmgt.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "cimKeys.h"
-#include "util.h"
-
-/*
- * Convert a single descriptor in to a Solaris_MPXIOGroup instance
- */
-
-CCIMInstance *
-mpxiogroup_descriptor_toCCIMInstance(dm_descriptor_t  desc, char *provider,
-    int *errp)
-{
-
-	CCIMInstance		*inst = NULL;
-	CCIMException		*ex;
-	char			*str;
-	int			error;
-
-	*errp = 0;
-
-	/* Create instance of MPXIO Group */
-
-	if ((inst = cim_createInstance(provider)) == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* First, assign the deviceID */
-
-	str = dm_get_name(desc, &error);
-
-	if (error != 0) {
-	    util_handleError(MPXIO_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_NAME_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (str == NULL) {
-	    util_handleError(MPXIO_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_NAME_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty(NAME, string, str, cim_true, inst, errp);
-	dm_free_name(str);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* add keys */
-
-	util_doProperty(CREATION_CLASS, string, provider, cim_true,
-	    inst, errp);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty("RedundancyStatus", string, "2", cim_false,
-	    inst, errp);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
-
-/* Convert the descriptor list to a CIMInstance List */
-
-CCIMInstanceList*
-mpxiogroup_descriptors_toCCIMInstanceList(char *providerName,
-    dm_descriptor_t *dp, int *errp)
-{
-	CCIMInstance 		*inst;
-	CCIMInstanceList 	*instList = NULL;
-	CCIMException		*ex;
-	nvlist_t		*nvlp;
-	char			*type = NULL;
-	int			i;
-	int			error = 0;
-
-	*errp = 0;
-
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, errp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	for (i = 0; dp[i] != NULL; i ++) {
-
-	    nvlp = dm_get_attributes(dp[i], errp);
-	    if (*errp != 0) {
-		util_handleError(MPXIO_DESCRIPTOR_FUNC,
-		    CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		return ((CCIMInstanceList *)NULL);
-	    }
-		/*
-		 * Create the instance list which will store the instances
-		 * Only create this list when we know we have a valid
-		 * instance to create
-		 */
-
-	    *errp = nvlist_lookup_string(nvlp, "ctype", &type);
-	    if (*errp != 0) {
-		util_handleError(MPXIO_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		    NVLIST_FAILURE, NULL, errp);
-		nvlist_free(nvlp);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    error = nvlist_lookup_boolean(nvlp, "multiplex");
-
-		/*
-		 * Only interested in mpxio controller types since they are
-		 * the only ones that can be in an mpxiogroup relationship.
-		 */
-
-	    if (strcasecmp(type, "scsi") == 0) {
-		if (error != 0) {
-		    continue;
-		}
-	    } else {
-		continue;
-	    }
-
-	    inst = mpxiogroup_descriptor_toCCIMInstance(dp[i], providerName,
-		errp);
-	    if (*errp != 0) {
-		/* Error handling is done in the subfunction. */
-		cim_freeInstanceList(instList);
-		nvlist_free(nvlp);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    /* add the instance to the instance list */
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(MPXIO_DESCRIPTOR_FUNC,
-		    CIM_ERR_FAILED, ADD_INSTANCE_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		nvlist_free(nvlp);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-	nvlist_free(nvlp);
-
-	if (instList->mDataObject == NULL) {
-	    cim_freeInstanceList(instList);
-	    instList = NULL;
-	}
-	return (instList);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/partbasedon_descriptors.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <netdb.h>
-#include <cimapi.h>
-#include <libnvpair.h>
-#include <md5.h>
-
-#include "libdiskmgt.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "cimKeys.h"
-#include "util.h"
-#include "logicaldisk_descriptors.h"
-#include "partition_descriptors.h"
-
-/*
- * Convert a the antecedent and dependent descriptors to a
- * Solaris_DiskPartitionBasedOn & Solaris_DiskPartitionBasedOnFdisk
- * association instance
- */
-
-CCIMInstance *
-partbasedon_descriptor_toCCIMInstance(char *hostname, dm_descriptor_t  ant,
-    dm_descriptor_t dep, char *provider, int *errp)
-{
-	nvlist_t		*nvlp;
-	nvpair_t		*nvp;
-	CCIMInstance		*inst = NULL;
-	CCIMInstance		*ant_inst;
-	CCIMInstance		*dep_inst;
-	CCIMObjectPath		*ant_op;
-	CCIMObjectPath		*dep_op;
-	CCIMException		*ex;
-	int			error;
-	uint64_t		size;  /* need these to calculate ending addr */
-	uint64_t		startaddr;
-	uint64_t		endaddr;
-	char			attrval[100];
-	int			isFdisk = 0;
-
-	*errp = 0;
-
-	/* Create instance of partition based on assoc. */
-
-	if ((inst = cim_createInstance(provider)) == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if ((strcasecmp(provider, DISKPART_BASEDONFDISK)) == 0) {
-	    isFdisk = 1;
-	}
-
-	/*
-	 * Now get the object path for the REF pointers.
-	 */
-
-
-	if (isFdisk) {
-	    ant_inst = partition_descriptor_toCCIMInstance(hostname, ant,
-		DISK_PARTITION, &error);
-	} else {
-	    ant_inst = logicaldisk_descriptor_toCCIMInstance(hostname, ant,
-		LOGICAL_DISK, &error);
-	}
-
-	if (error != 0) {
-	    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, PARTBASEDON_DESC_TO_INSTANCE_FAILURE,
-		    NULL, &error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	dep_inst = partition_descriptor_toCCIMInstance(hostname, dep,
-	    DISK_PARTITION, &error);
-
-	if (error != 0) {
-	    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, PARTBASEDON_DESC_TO_INSTANCE_FAILURE,
-		    NULL, &error);
-	    cim_freeInstance(inst);
-	    cim_freeInstance(ant_inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Get the object paths that are represented by these instances.
-	 * Add these properties to the association instance.
-	 */
-
-	ant_op = cim_createObjectPath(ant_inst);
-	dep_op = cim_createObjectPath(dep_inst);
-	cim_freeInstance(ant_inst);
-	cim_freeInstance(dep_inst);
-
-	if (ant_op == NULL || dep_op == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, CREATE_OBJECT_PATH_FAILURE, ex, &error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(ANTECEDENT, ant_op, cim_true, inst, errp);
-	util_doReferenceProperty(DEPENDENT, dep_op, cim_true, inst, errp);
-	cim_freeObjectPath(ant_op);
-	cim_freeObjectPath(dep_op);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now get the other attributes we are interested in
-	 */
-
-	nvlp = dm_get_attributes(dep, &error);
-	if (error != 0) {
-	    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		DM_GET_ATTR_FAILURE, NULL, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (nvlp == NULL) {
-	    return (inst);
-	}
-
-	for (nvp = nvlist_next_nvpair(nvlp, NULL); nvp != NULL;
-	    nvp = nvlist_next_nvpair(nvlp, nvp)) {
-
-	    char	*attrname;
-	    uint64_t	ui64;
-	    uint32_t	ui32;
-
-	    attrname = nvpair_name(nvp);
-	    if (attrname == NULL) {
-		continue;
-	    }
-
-	    if (strcasecmp(attrname, DM_SIZE) == 0) {
-		error = nvpair_value_uint64(nvp, &ui64);
-		if (error != 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-		size = ui64;
-	    } else if (strcasecmp(attrname, DM_START) == 0) {
-		error = nvpair_value_uint64(nvp, &ui64);
-		if (error != 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		startaddr = ui64;
-		error = snprintf(attrval, sizeof (attrval), "%llu", ui64);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		util_doProperty("StartingAddress", uint64, attrval, cim_false,
-		    inst, errp);
-
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-	    } else if (strcasecmp(attrname, DM_INDEX) == 0) {
-		error = nvpair_value_uint32(nvp, &ui32);
-		if (error != 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		error = snprintf(attrval, sizeof (attrval), "%u", ui32);
-		if (error < 0) {
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-		    return ((CCIMInstance *)NULL);
-		}
-
-		util_doProperty("OrderIndex", uint32, attrval, cim_false,
-		    inst, errp);
-
-		if (*errp != 0) {
-		    ex = cim_getLastError();
-		    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-			CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-		    cim_freeInstance(inst);
-		    nvlist_free(nvlp);
-		    return ((CCIMInstance *)NULL);
-		}
-	    }
-	}
-
-	nvlist_free(nvlp);
-	/*
-	 * Now add the ending address attribute. Do this here because
-	 * there is no guarantee about the order for how these name/value
-	 * pairs are given and without the starting address we cannot
-	 * calculate the ending address.
-	 */
-
-	endaddr = startaddr + size;
-	error = snprintf(attrval, sizeof (attrval), "%llu", endaddr);
-	if (error < 0) {
-	    cim_freeInstance(inst);
-	    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, DM_GET_ATTR_FAILURE, NULL, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doProperty("EndingAddress", uint64, attrval, cim_false, inst,
-	    errp);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(PARTBASEDON_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/partition_descriptors.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,707 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <netdb.h>
-#include <cimapi.h>
-#include <libnvpair.h>
-#include <md5.h>
-
-#include "libdiskmgt.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "cimKeys.h"
-#include "util.h"
-
-static void	do_alias_desc(CCIMInstance *inst, dm_descriptor_t desc,
-		    int *errp);
-static void	do_drive_desc(CCIMInstance *inst, dm_descriptor_t desc,
-		    int *errp);
-static void	do_media_desc(CCIMInstance *inst, dm_descriptor_t desc,
-		    uint32_t *blocksize, uint64_t *blocks_per_cyl, int *errp);
-static void	do_misc_attrs(CCIMInstance *inst, int *errp, uint64_t size,
-		    uint32_t starting_cylinder, uint32_t end_cylinder,
-		    uint32_t ncylinders);
-static void	do_slice_desc(CCIMInstance *inst, char *hostname,
-		    dm_descriptor_t desc, uint64_t *numblocks, uint32_t *bcyl,
-		    uint32_t *ecyl, uint64_t *start, int *errp);
-static void	do_prop64(CCIMInstance *inst, char *name, uint64_t val,
-		    int *errp);
-static void	do_prop32(CCIMInstance *inst, char *name, uint32_t val,
-		    int *errp);
-static dm_descriptor_t get_first_assoc(dm_descriptor_t desc,
-		    dm_desc_type_t type, int *errp);
-static CCIMInstance *fatal(CCIMInstance *inst, dm_descriptor_t desc, int *errp);
-
-/*
- * Convert a single descriptor in to a Solaris_DiskPartition instance
- */
-
-CCIMInstance *
-partition_descriptor_toCCIMInstance(char *hostname, dm_descriptor_t  desc,
-    char *provider, int *errp)
-{
-
-	CCIMInstance		*inst = NULL;
-	dm_descriptor_t		media_desc;
-	dm_descriptor_t		drive_desc;
-	dm_descriptor_t		alias_desc;
-	uint32_t		ncylinders = 0;
-	uint32_t		bcyl = 0;
-	uint32_t		ecyl = 0;
-	uint32_t		starting_cylinder = 0;
-	uint32_t		end_cylinder = 0;
-	uint64_t		start = 0;
-	uint64_t		numblocks = 0;
-	uint32_t		blocksize = 0;
-	uint64_t		blocks_per_cyl = 0;
-	uint64_t		size = 0;
-	int			isFdisk = 0;
-
-	*errp = 0;
-
-	/* Create instance of disk drive. */
-	if ((inst = cim_createInstance(provider)) == NULL)
-	    return (fatal(inst, NULL, errp));
-
-	do_slice_desc(inst, hostname, desc, &numblocks, &bcyl, &ecyl, &start,
-	    errp);
-	if (*errp != 0)
-	    return (fatal(inst, NULL, errp));
-
-	media_desc = get_first_assoc(desc, DM_MEDIA, errp);
-	if (*errp != 0)
-	    return (fatal(inst, NULL, errp));
-
-	if (media_desc == NULL) {
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	do_media_desc(inst, media_desc, &blocksize, &blocks_per_cyl, errp);
-	if (*errp != 0)
-	    return (fatal(inst, media_desc, errp));
-
-	drive_desc = get_first_assoc(media_desc, DM_DRIVE, errp);
-	if (*errp != 0)
-	    return (fatal(inst, media_desc, errp));
-	dm_free_descriptor(media_desc);
-
-	if (drive_desc == NULL) {
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	do_drive_desc(inst, drive_desc, errp);
-	if (*errp != 0)
-	    return (fatal(inst, drive_desc, errp));
-
-	alias_desc = get_first_assoc(drive_desc, DM_ALIAS, errp);
-	if (*errp != 0)
-	    return (fatal(inst, drive_desc, errp));
-	dm_free_descriptor(drive_desc);
-
-	if (alias_desc == NULL) {
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	do_alias_desc(inst, alias_desc, errp);
-	if (*errp != 0)
-	    return (fatal(inst, alias_desc, errp));
-	dm_free_descriptor(alias_desc);
-
-	if (dm_get_type(desc) == DM_PARTITION) {
-	    isFdisk = 1;
-	}
-
-	/* Partition size in bytes */
-	size = (uint64_t)(numblocks * blocksize);
-
-	/* Starting cylinder */
-	if (isFdisk) {
-	    starting_cylinder = bcyl;
-	} else if (blocks_per_cyl != 0) {
-	    starting_cylinder = (uint32_t)(start / blocks_per_cyl);
-	}
-
-	/* Total cylinders */
-	if (isFdisk) {
-	    ncylinders = (ecyl - bcyl) + 1;
-	} else if (blocks_per_cyl != 0) {
-	    ncylinders = (uint32_t)(numblocks / blocks_per_cyl);
-	}
-
-	/* ending cylinder */
-
-	if (isFdisk) {
-	    end_cylinder = ecyl;
-	} else {
-	    if (ncylinders == 0) {
-		end_cylinder = 0;
-	    } else {
-		end_cylinder = (uint32_t)((ncylinders + starting_cylinder) - 1);
-	    }
-	}
-
-	do_misc_attrs(inst, errp, size, starting_cylinder, end_cylinder,
-	    ncylinders);
-	if (*errp != 0)
-	    return (fatal(inst, NULL, errp));
-
-	return (inst);
-}
-
-/* Convert the descriptor list to a CIMInstance List */
-
-CCIMInstanceList*
-partition_descriptors_toCCIMInstanceList(char *providerName,
-    dm_descriptor_t *dp, dm_descriptor_t *fdp, int *errp)
-{
-	CCIMInstance 		*inst;
-	CCIMInstanceList 	*instList = NULL;
-	CCIMException		*ex;
-	dm_descriptor_t 	desc;
-	int			i;
-	int			error;
-
-	*errp = 0;
-
-
-	/* If not descriptpr list, return a NULL instance list. */
-	if (dp == NULL && fdp == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* Create the instance list which will store the instances */
-	instList = cim_createInstanceList();
-	if (instList == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(PARTITION_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, CREATE_INSTANCE_LIST_FAILURE, ex, errp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-
-	for (i = 0; dp != NULL && dp[i] != NULL; i ++) {
-	    desc = dp[i];
-	    inst = partition_descriptor_toCCIMInstance(hostName, desc,
-		providerName, &error);
-	    if (error != 0) {
-		/* Error logging and exception handling done in sub function */
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (inst == NULL) {
-		continue;
-	    }
-
-	    /* add the instance to the instance list */
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(PARTITION_DESCRIPTOR_FUNC,
-		    CIM_ERR_FAILED, ADD_INSTANCE_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-	for (i = 0; fdp != NULL && fdp[i] != NULL; i ++) {
-	    desc = fdp[i];
-	    inst = partition_descriptor_toCCIMInstance(hostName, desc,
-		providerName, &error);
-	    if (error != 0) {
-		/* Error logging and exception handling done in sub function */
-		cim_freeInstanceList(instList);
-		return ((CCIMInstanceList *)NULL);
-	    }
-
-	    if (inst == NULL) {
-		continue;
-	    }
-
-	    /* add the instance to the instance list */
-	    instList = cim_addInstance(instList, inst);
-	    if (instList == NULL) {
-		ex = cim_getLastError();
-		util_handleError(PARTITION_DESCRIPTOR_FUNC,
-		    CIM_ERR_FAILED, ADD_INSTANCE_FAILURE, ex, errp);
-		cim_freeInstance(inst);
-		return ((CCIMInstanceList *)NULL);
-	    }
-	}
-	return (instList);
-}
-
-static void
-do_slice_desc(CCIMInstance *inst, char *hostname, dm_descriptor_t desc,
-	uint64_t *numblocks, uint32_t *bcyl, uint32_t *ecyl, uint64_t *start,
-	int *errp)
-{
-	nvlist_t	*nvlp;
-	nvpair_t	*nvp;
-	char		*str;
-	char		*ptype = "2";	/* default is vtoc */
-	char		*type = "3";	/* default is vtoc */
-	char		*validFS = "0";
-	uint32_t    	ui32;
-
-	*errp = 0;
-	*numblocks = 0;
-	*bcyl = 0;
-	*ecyl = 0;
-	*start = 0;
-
-	str = dm_get_name(desc, errp);
-	if (*errp != 0)
-	    return;
-
-	if (str == NULL) {
-	    *errp = ENOENT;
-	    return;
-	}
-
-	util_doProperty(DEVICEID, string, str, cim_true, inst, errp);
-	dm_free_name(str);
-	if (*errp != 0)
-	    return;
-
-	if (dm_get_type(desc) == DM_PARTITION) {
-	    ptype = "3";
-	}
-
-	/* add keys */
-
-	util_doProperty(CREATION_CLASS, string, DISK_PARTITION, cim_true,
-	    inst, errp);
-	if (*errp != 0)
-	    return;
-
-	util_doProperty(SYS_CREATION_CLASS, string, COMPUTER_SYSTEM, cim_true,
-	    inst, errp);
-	if (*errp != 0)
-	    return;
-
-	util_doProperty(SYSTEM, string, hostname, cim_true, inst, errp);
-	if (*errp != 0)
-	    return;
-
-	nvlp = dm_get_attributes(desc, errp);
-	if (*errp == ENODEV || nvlp == NULL) {
-	    /* not a failure, just a sparse slice */
-	    *errp = 0;
-	    return;
-	}
-
-	if (*errp != 0)
-	    return;
-
-	/*
-	 * Now get the other attributes we are interested in.
-	 */
-	for (nvp = nvlist_next_nvpair(nvlp, NULL); nvp != NULL;
-	    nvp = nvlist_next_nvpair(nvlp, nvp)) {
-
-	    char 	*attrname;
-
-	    attrname = nvpair_name(nvp);
-	    if (attrname == NULL) {
-		continue;
-	    }
-
-	    /* loop through the list and assign attrs to the CIMInstance. */
-
-	    if (strcasecmp(attrname, DM_MTYPE) == 0) {
-		continue;
-	    }
-
-	    if (strcasecmp(DM_SIZE, attrname) == 0) {
-		/* vtoc */
-		*errp = nvpair_value_uint64(nvp, numblocks);
-		if (*errp != 0)
-		    break;
-
-		do_prop64(inst, "NumberOfBlocks", *numblocks, errp);
-		if (*errp != 0)
-		    break;
-
-
-	    } else if (strcasecmp(DM_NSECTORS, attrname) == 0) {
-		/* fdisk */
-		*errp = nvpair_value_uint32(nvp, &ui32);
-		if (*errp != 0)
-		    break;
-
-		*numblocks = ui32;
-		do_prop64(inst, "NumberOfBlocks", *numblocks, errp);
-		if (*errp != 0)
-		    break;
-
-	    } else if (strcasecmp(DM_BOOTID, attrname) == 0) {
-		/* fdisk */
-		char *primary = "0";
-		char *bootable = "0";
-
-		*errp = nvpair_value_uint32(nvp, &ui32);
-		if (*errp != 0)
-		    break;
-
-		if (ui32 == 128) {
-		    primary = "1";
-		    bootable = "1";
-		    type = "2";
-		} else {
-		    type = "1";
-		}
-
-		util_doProperty("PrimaryPartition", boolean, primary, cim_false,
-		    inst, errp);
-		if (*errp != 0)
-		    break;
-
-		util_doProperty("Bootable", boolean, bootable, cim_false, inst,
-		    errp);
-		if (*errp != 0)
-		    break;
-
-	    } else if (strcasecmp(DM_START, attrname) == 0) {
-		*errp = nvpair_value_uint64(nvp, start);
-		if (*errp != 0)
-		    break;
-
-	    } else if (strcasecmp(DM_TAG, attrname) == 0) {
-		int	error;
-		char	buf[100];
-
-		*errp = nvpair_value_uint32(nvp, &ui32);
-		if (*errp != 0)
-		    break;
-
-		error = snprintf(buf, sizeof (buf), "%u", ui32);
-		if (error < 0) {
-		    *errp = error;
-		    break;
-		}
-
-		util_doProperty("Tag", uint8, buf, cim_false, inst, errp);
-		if (*errp != 0)
-		    break;
-
-	    } else if (strcasecmp(DM_FLAG, attrname) == 0) {
-		int	error;
-		char	buf[100];
-
-		*errp = nvpair_value_uint32(nvp, &ui32);
-		if (*errp != 0)
-		    break;
-
-		error = snprintf(buf, sizeof (buf), "%u", ui32);
-		if (error < 0) {
-		    *errp = error;
-		    break;
-		}
-
-		util_doProperty("Flag", uint8, buf, cim_false, inst, errp);
-		if (*errp != 0)
-		    break;
-
-	    } else if (strcasecmp(DM_MOUNTPOINT, attrname) == 0) {
-		validFS = "1";
-
-	    } else if (strcasecmp(attrname, DM_BCYL) == 0) {
-		*errp = nvpair_value_uint32(nvp, bcyl);
-		if (*errp != 0)
-		    break;
-
-	    } else if (strcasecmp(attrname, DM_ECYL) == 0) {
-		*errp = nvpair_value_uint32(nvp, ecyl);
-		if (*errp != 0)
-		    break;
-
-	    } else if (strcasecmp(attrname, DM_PTYPE) == 0) {
-		int	error;
-		char	buf[100];
-
-		*errp = nvpair_value_uint32(nvp, &ui32);
-		if (*errp != 0)
-		    break;
-
-		error = snprintf(buf, sizeof (buf), "%u", ui32);
-		if (error < 0) {
-		    *errp = error;
-		    break;
-		}
-
-		util_doProperty("PartitionSubtype", uint16, buf, cim_false,
-		    inst, errp);
-		if (*errp != 0)
-		    break;
-
-	    } else if (strcasecmp(DM_EFI, attrname) == 0) {
-		ptype = "4";
-	    }
-
-	} /* end for */
-
-	if (*errp == 0) {
-	    util_doProperty("ValidFileSystem", boolean, validFS, cim_false,
-		inst, errp);
-	}
-
-	if (*errp == 0) {
-	    util_doProperty("SolarisPartitionType", uint16, ptype, cim_false,
-		inst, errp);
-	}
-
-	if (*errp == 0) {
-	    util_doProperty("PartitionType", uint16, type, cim_false, inst,
-		errp);
-	}
-
-	nvlist_free(nvlp);
-}
-
-static void
-do_media_desc(CCIMInstance *inst, dm_descriptor_t desc, uint32_t *blocksize,
-	uint64_t *blocks_per_cyl, int *errp)
-{
-	nvlist_t		*nvlp;
-	nvpair_t		*nvp;
-	uint32_t		nheads = 0;
-	uint32_t		nsecs = 0;
-
-	*errp = 0;
-	*blocksize = 0;
-
-	nvlp = dm_get_attributes(desc, errp);
-	if (*errp == ENODEV || nvlp == NULL) {
-	    *errp = 0;
-	    return;
-	}
-
-	if (*errp != 0)
-	    return;
-
-	for (nvp = nvlist_next_nvpair(nvlp, NULL); nvp != NULL;
-	    nvp = nvlist_next_nvpair(nvlp, nvp)) {
-
-	    char 	*attrname;
-
-	    attrname = nvpair_name(nvp);
-	    if (attrname == NULL) {
-		continue;
-	    }
-
-	    if (strcasecmp(attrname, DM_BLOCKSIZE) == 0) {
-		*errp = nvpair_value_uint32(nvp, blocksize);
-		if (*errp != 0)
-		    break;
-
-		do_prop64(inst, "BlockSize", (uint64_t)*blocksize, errp);
-		if (*errp != 0)
-		    break;
-
-	    } else if (strcasecmp(DM_NHEADS, attrname) == 0) {
-		*errp = nvpair_value_uint32(nvp, &nheads);
-		if (*errp != 0)
-		    break;
-
-	    } else if (strcasecmp(DM_NSECTORS, attrname) == 0) {
-		*errp = nvpair_value_uint32(nvp, &nsecs);
-		if (*errp != 0)
-		    break;
-	    }
-
-	} /* end for */
-
-	nvlist_free(nvlp);
-
-	*blocks_per_cyl = nheads * nsecs;
-}
-
-static void
-do_drive_desc(CCIMInstance *inst, dm_descriptor_t desc, int *errp)
-{
-	nvlist_t	*nvlp;
-	uint32_t    	ui32;
-	char		*status;
-	char		*statusinfo;
-
-	*errp = 0;
-
-	nvlp = dm_get_attributes(desc, errp);
-	if (*errp != 0)
-	    return;
-
-	*errp = nvlist_lookup_uint32(nvlp, "status", &ui32);
-	if (*errp != 0) {
-	    nvlist_free(nvlp);
-	    return;
-	}
-
-	if (ui32 == 0) {
-	    statusinfo = "4";
-	    status = "Error";
-	} else {
-	    statusinfo = "3";
-	    status = "OK";
-	}
-
-	util_doProperty("StatusInfo", uint16, statusinfo, cim_false, inst,
-	    errp);
-	if (*errp != 0) {
-	    nvlist_free(nvlp);
-	    return;
-	}
-
-	util_doProperty("Status", string, status, cim_false, inst, errp);
-	if (*errp != 0) {
-	    nvlist_free(nvlp);
-	    return;
-	}
-
-	nvlist_free(nvlp);
-}
-
-static void
-do_alias_desc(CCIMInstance *inst, dm_descriptor_t desc, int *errp)
-{
-	char *str;
-
-	*errp = 0;
-
-	str = dm_get_name(desc, errp);
-
-	if (*errp != 0)
-	    return;
-
-	if (str != NULL) {
-	    util_doProperty("DiskID", string, str, cim_false, inst, errp);
-	    dm_free_name(str);
-	}
-}
-
-static void
-do_misc_attrs(CCIMInstance *inst, int *errp, uint64_t size,
-	uint32_t starting_cylinder, uint32_t end_cylinder, uint32_t ncylinders)
-{
-	do_prop64(inst, "PartitionSize", size, errp);
-	if (*errp != 0)
-	    return;
-
-	do_prop32(inst, "StartCylinder", starting_cylinder, errp);
-	if (*errp != 0)
-	    return;
-
-	do_prop32(inst, "TotalCylinders", ncylinders, errp);
-	if (*errp != 0)
-	    return;
-
-	do_prop32(inst, "EndCylinder", end_cylinder, errp);
-}
-
-static void
-do_prop64(CCIMInstance *inst, char *name, uint64_t val, int *errp)
-{
-	char	buf[100];
-	int	error;
-
-	error = snprintf(buf, sizeof (buf), "%llu", val);
-	if (error < 0) {
-	    *errp = error;
-	    return;
-	}
-
-	util_doProperty(name, uint64, buf, cim_false, inst, errp);
-}
-
-static void
-do_prop32(CCIMInstance *inst, char *name, uint32_t val, int *errp)
-{
-	char	buf[100];
-	int	error;
-
-	error = snprintf(buf, sizeof (buf), "%u", val);
-	if (error < 0) {
-	    *errp = error;
-	    return;
-	}
-
-	util_doProperty(name, uint32, buf, cim_false, inst, errp);
-}
-
-static dm_descriptor_t
-get_first_assoc(dm_descriptor_t desc, dm_desc_type_t type, int *errp)
-{
-	dm_descriptor_t		*da;
-	dm_descriptor_t		d;
-	int			i;
-
-	da = dm_get_associated_descriptors(desc, type, errp);
-
-	if (*errp == ENODEV || da == NULL || da[0] == NULL) {
-	    *errp = 0;
-	    return (NULL);
-	}
-
-	if (*errp != 0) {
-	    return (NULL);
-	}
-
-	d = da[0];
-
-	/* there shouldn't be any more, but just in case */
-	for (i = 1; da[i]; i++) {
-	    dm_free_descriptor(da[i]);
-	}
-	free(da);
-
-	return (d);
-}
-
-static CCIMInstance *
-fatal(CCIMInstance *inst, dm_descriptor_t desc, int *errp)
-{
-	CCIMException		*ex;
-
-	ex = cim_getLastError();
-	util_handleError(PARTITION_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-	    ADD_PROPERTY_FAILURE, ex, errp);
-	if (inst != NULL) {
-	    cim_freeInstance(inst);
-	}
-	if (desc != NULL) {
-	    dm_free_descriptor(desc);
-	}
-	return ((CCIMInstance *)NULL);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/realizesdiskdrive_descriptors.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <netdb.h>
-#include <cimapi.h>
-#include <libnvpair.h>
-#include <md5.h>
-
-#include "libdiskmgt.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "cimKeys.h"
-#include "util.h"
-#include "disk_descriptors.h"
-
-/*
- * Convert a the antecedent object path and dependent descriptor to a
- * Solaris_RealizesDiskDrive association instance
- */
-
-CCIMInstance *
-realizesdiskdrive_descriptor_toCCIMInstance(char *hostname,
-    CCIMObjectPath *antOp, dm_descriptor_t  dep, char *provider, int *errp)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMInstance		*ant_inst;
-	CCIMInstance		*dep_inst;
-	CCIMObjectPath		*ant_op;
-	CCIMObjectPath		*dep_op;
-	CCIMException		*ex;
-	int			error;
-
-	*errp = 0;
-
-	/* Create instance of realizesdiskdrive assoc. */
-
-	if ((inst = cim_createInstance(provider)) == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZESDD_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, CREATE_INSTANCE_FAILURE, ex, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now get the object path for the REF pointers.
-	 */
-
-	dep_inst = disk_descriptor_toCCIMInstance(hostname, dep,
-	    DISK, &error);
-
-	if (error != 0) {
-	    util_handleError(REALIZESDD_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED,
-		    REALIZESDD_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Since there is no provider for the physical package, we must
-	 * get the instance from the cimom.
-	 */
-	ant_inst = cimom_getInstance(antOp, cim_true, cim_false, cim_false,
-	    cim_false, NULL, 0);
-
-	if (ant_inst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZESDD_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		GET_INSTANCE, ex, errp);
-	    free(dep_inst);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (ant_inst->mClassName == NULL) {
-	    free(dep_inst);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-
-	/*
-	 * Get the object paths that are represented by these instances.
-	 * Add these properties to the association instance.
-	 */
-
-	ant_op = cim_createObjectPath(ant_inst);
-	dep_op = cim_createObjectPath(dep_inst);
-	cim_freeInstance(ant_inst);
-	cim_freeInstance(dep_inst);
-
-	if (ant_op == NULL || dep_op == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZESDD_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		CREATE_OBJECT_PATH_FAILURE, ex, &error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(ANTECEDENT, ant_op, cim_true, inst, errp);
-	cim_freeObjectPath(ant_op);
-
-	util_doReferenceProperty(DEPENDENT, dep_op, cim_true, inst, errp);
-	cim_freeObjectPath(dep_op);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZESEXTENT_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/realizesextent_descriptors.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <strings.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <netdb.h>
-#include <cimapi.h>
-#include <libnvpair.h>
-#include <md5.h>
-
-#include "libdiskmgt.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "cimKeys.h"
-#include "util.h"
-#include "logicaldisk_descriptors.h"
-#include "disk_descriptors.h"
-
-/*
- * Convert a the antecedent and dependent descriptors to a
- * Solaris_RealizesExtent association instance
- */
-
-CCIMInstance *
-realizesextent_descriptor_toCCIMInstance(char *hostname, dm_descriptor_t  desc,
-    char *provider, int *errp)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMInstance		*ant_inst;
-	CCIMInstance		*dep_inst;
-	CCIMObjectPath		*ant_op;
-	CCIMObjectPath		*dep_op;
-	CCIMException		*ex;
-	int			error;
-
-	*errp = 0;
-
-	/* Create instance of realizesextent assoc. */
-
-	if ((inst = cim_createInstance(provider)) == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZESEXTENT_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, errp);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Now get the object path for the REF pointers.
-	 */
-
-	ant_inst = disk_descriptor_toCCIMInstance(hostname, desc, DISK, &error);
-
-	if (error != 0) {
-	    util_handleError(REALIZESEXTENT_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		REALIZESEXT_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	dep_inst = logicaldisk_descriptor_toCCIMInstance(hostname, desc,
-	    LOGICAL_DISK, &error);
-
-	if (error != 0) {
-	    util_handleError(REALIZESEXTENT_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		REALIZESEXT_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    cim_freeInstance(inst);
-	    cim_freeInstance(ant_inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * Get the object paths that are represented by these instances.
-	 * Add these properties to the association instance.
-	 */
-
-	ant_op = cim_createObjectPath(ant_inst);
-	dep_op = cim_createObjectPath(dep_inst);
-	cim_freeInstance(ant_inst);
-	cim_freeInstance(dep_inst);
-
-	if (ant_op == NULL || dep_op == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZESEXTENT_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		CREATE_OBJECT_PATH_FAILURE, ex, &error);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	util_doReferenceProperty(ANTECEDENT, ant_op, cim_true, inst, errp);
-	util_doReferenceProperty(DEPENDENT, dep_op, cim_true, inst, errp);
-	cim_freeObjectPath(ant_op);
-	cim_freeObjectPath(dep_op);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZESEXTENT_DESCRIPTOR_FUNC, CIM_ERR_FAILED,
-		ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/*
-	 * In this case, the starting address is always 0 since this is a
-	 * physicaldisk->logicaldisk view.
-	 */
-	util_doProperty("StartingAddress", uint64, "0", cim_false, inst, errp);
-
-	if (*errp != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(REALIZESEXTENT_DESCRIPTOR_FUNC,
-		CIM_ERR_FAILED, ADD_PROPERTY_FAILURE, ex, errp);
-	    cim_freeInstance(inst);
-	    return ((CCIMInstance *)NULL);
-	}
-	return (inst);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/common/util.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,333 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002-2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdlib.h>
-#include <strings.h>
-#include <errno.h>
-#include <pthread.h>
-
-#include "util.h"
-
-static void setLastError(CIMErrorReason, const cimchar *, const cimchar *, \
-	int *);
-static void cleanupThreadExceptions(void *pParam);
-
-
-pthread_key_t	gWbemDiskLastErrorKey;
-
-#pragma init(errorInit)
-#pragma fini(errorFinalize)
-
-/*
- * The infastructure will call this when
- * an error occurs, it should return a
- * CCIMException which describes the error.
- * Caller is responsable for freeing
- * memory assocaited with the returned CCIMException
- */
-
-CCIMException   *
-cp_getLastError()
-{
-	CCIMException   *lastError = NULL;
-
-	lastError =
-	    (CCIMException *)pthread_getspecific(gWbemDiskLastErrorKey);
-	(void) pthread_setspecific(gWbemDiskLastErrorKey, NULL);
-	return (lastError);
-}
-
-/*
- * Handle the errors that come in from the providers. This involves writing to
- * the CIM log and setting the last error on the stack for the CIMOM exception
- * handling.
- */
-
-void
-util_handleError(char *funcName, CIMErrorReason reason, char *reasonString,
-    CCIMException *ex, int *errp)
-{
-
-
-	/*
-	 * Create a copy of the exception, if it exists. The caller of
-	 * this function should free the exception passed in.
-	 */
-	if (ex != NULL) {
-	    if (reasonString == NULL) {
-		setLastError(ex->mReason, ex->mErrorString, funcName, errp);
-	    } else {
-		setLastError(ex->mReason, reasonString, funcName, errp);
-	    }
-	    cim_freeCIMException(ex);
-	} else {
-	    setLastError(reason, reasonString, funcName, errp);
-	}
-}
-
-void *
-util_getKeyValue(CCIMPropertyList *propList, CIMType propType,
-	char *key, int *error) {
-
-	CCIMProperty		*pProp;
-	CCIMPropertyList 	*pList = propList;
-
-	*error = 0;
-
-	do {
-	    pProp = pList->mDataObject;
-	    if (strcasecmp(pProp->mName, key) == 0) {
-		break;
-	    }
-	    pList = pList->mNext;
-	} while (pList);
-
-	if (pList == NULL) {
-	    *error = CIM_ERR_INVALID_PARAMETER;
-	    return ((CCIMProperty *)NULL);
-	}
-
-	/*
-	 * If reference property, then return object path. In all other cases.
-	 * the value is a string.
-	 */
-
-	if (propType == reference) {
-	    return (pProp->mObjPathValue);
-	} else {
-	    return (pProp->mValue);
-	}
-}
-void
-util_doProperty(cimchar *name, CIMType type, cimchar *value, CIMBool is_key,
-    CCIMInstance *inst, int *error)
-{
-
-	CCIMProperty *prop;
-
-	*error = 0;
-
-	prop = cim_createProperty(name, type, value, NULL, is_key);
-	if (prop == NULL) {
-	    *error = CIM_ERR_FAILED;
-	    return;
-	}
-	if ((cim_addProperty(inst, prop)) == cim_false) {
-	    cim_freeProperty(prop);
-	    *error = CIM_ERR_FAILED;
-	    return;
-	}
-}
-
-void
-util_doReferenceProperty(cimchar *role, CCIMObjectPath *obj, CIMBool isKey,
-	CCIMInstance *inst, int *error)
-{
-
-	CCIMProperty	*prop;
-
-	*error = 0;
-	prop = cim_createReferenceProperty(role, obj, isKey);
-	if (prop == NULL) {
-	    *error = CIM_ERR_INVALID_PARAMETER;
-	    return;
-	}
-	if (cim_addProperty(inst, prop) == cim_false) {
-	    cim_freeProperty(prop);
-	    *error = CIM_ERR_FAILED;
-	    return;
-	}
-}
-
-/*
- * Function:	openFile
- *
- * Parameters:  fileName - char pointer to the name of the file to open.
- *		fMode - char pointer to the mode used to open the file.
- *
- * Returns:	On successful completion returns the FILE pointer for
- *		the open file.
- *		On failure returns a NULL FILE pointer.
- *
- * Description:	'fopen's file and checks for errors.
- */
-FILE *
-util_openFile(char *fileName, char *fMode)
-{
-	FILE		*pTmpFile;
-	int		error;
-
-	/* Open the temporary file based on fMode */
-	pTmpFile = fopen(fileName, fMode);
-	if (pTmpFile == NULL) {
-	    util_handleError(UTIL_OPENFILE, CIM_ERR_FAILED,
-		UTIL_FILEOPEN_FAILURE, NULL, &error);
-	    return ((FILE *)NULL);
-	}
-	return (pTmpFile);
-}
-
-/*
- * Function:	util_closeFile
- *
- * Parameters:  file - FILE pointer to an open file.
- *
- * Returns:	On successful completion returns 1.
- *		On failure returns 0.
- *
- * Description:	'fclose's file and handles errors.
- */
-
-/* ARGSUSED */
-int
-util_closeFile(FILE *file, char *fName)
-{
-	int	error;
-
-	if (fclose(file) != 0) {
-	    util_handleError(UTIL_CLOSEFILE, CIM_ERR_FAILED,
-		UTIL_FILECLOSE_FAILURE, NULL, &error);
-	    return (0);
-	}
-	return (1);
-}
-
-/*
- * Function:	util_removeFile
- *
- * Parameters:	tFName - char pointer to the filename
- *
- * Returns:	NULL
- *
- * Description:	Removes file and releases the memory used for
- *		the filename.
- */
-void
-util_removeFile(char *tFName)
-{
-	int	error;
-
-	if (remove(tFName) != 0) {
-	    util_handleError(UTIL_REMOVEFILE, CIM_ERR_FAILED,
-		UTIL_FILEREMOVE_FAILURE, NULL, &error);
-	}
-
-	free(tFName);
-}
-
-char *
-util_routineFailureMessage(char *routine)
-{
-	static char	msgBuf[MAXFAILSTRINGLEN];
-
-	/*
-	 * TRANSLATION_NOTE
-	 *
-	 * "%s Failed." indicates an error returned by the function
-	 * whose name is specified by the string used to replace %s.
-	 */
-	(void) snprintf(msgBuf, MAXFAILSTRINGLEN,
-	    dgettext(TEXT_DOMAIN, "%s Failed."), routine);
-
-	return (msgBuf);
-}
-
-/*
- * Function:	util_routineStartDaemonMessage
- *
- * Parameters:	dname - the name of the daemon we we're attempting to start
- *
- * Returns:	the generated string
- *
- * Description:	creates a localized sring for eror messages.
- */
-char *
-util_routineStartDaemonMessage(char *dname)
-{
-	static char msgBuf[MAXFAILSTRINGLEN];
-
-	/*
-	 * TRANSLATION_NOTE
-	 *
-	 * "%s failed to start and must be started manually. " indicates
-	 * an error stsrting the daemon specified by the string used to
-	 * replace %s.
-	 */
-	(void) snprintf(msgBuf, MAXFAILSTRINGLEN,
-	    dgettext(TEXT_DOMAIN,
-	    "%s failed to start and must be started manually. "),
-	    dname);
-
-	return (msgBuf);
-}
-
-static void
-cleanupThreadExceptions(void *pParam)
-{
-	CCIMException	*e = pParam;
-	cim_freeCIMException(e);
-}
-
-static void errorInit()
-{
-	/* Create the TSD key */
-	(void) pthread_key_create(&gWbemDiskLastErrorKey,
-	    cleanupThreadExceptions);
-	if (gethostname(hostName, MAXHOSTNAMELEN) < 0) {
-	    hostName[0] = '\0';
-	}
-}
-
-static void
-errorFinalize()
-{
-	(void) pthread_key_delete(gWbemDiskLastErrorKey);
-}
-
-static void
-setLastError(CIMErrorReason pRsn,
-    const cimchar* pErrString, const cimchar* pCallingFunc, int *errp)
-{
-	char 		*msgp = "(null)";
-	CCIMException	*lastError = NULL;
-
-	lastError =
-	    (CCIMException *)pthread_getspecific(gWbemDiskLastErrorKey);
-
-	if (lastError != NULL) {
-	    cim_freeCIMException(lastError);
-	}
-
-	if (pErrString != NULL) {
-	    msgp = (char *)pErrString;
-	}
-
-	lastError = cim_createException(pRsn, msgp, pCallingFunc);
-	(void) pthread_setspecific(gWbemDiskLastErrorKey, lastError);
-	*errp = 1;
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/controller/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS	=	Solaris_SCSIController.o \
-		Solaris_USBSCSIController.o \
-		Solaris_MPXIOController.o \
-		Solaris_GenericController.o \
-		Solaris_IDEController.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL	=	$(ROOTWBEMINC) \
-		$(SRC)/lib/libdiskmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -Dpic -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_PICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _controller.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-
-install:	all
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/controller/Solaris_GenericController.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,425 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "ctrl_descriptors.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "Solaris_GenericController.h"
-
-#define	GENERIC_GETINSTANCE		"GENERIC_CONTROLLER,GET_INSTANCE"
-#define	GENERIC_ENUMINSTANCES		"GENERIC_CONTROLLER,ENUM_INSTANCES"
-#define	GENERIC_ENUMINSTANCENAMES	"GENERIC_CONTROLLER,ENUM_INSTANCENAMES"
-#define	GENERIC_CREATEINSTANCE		"GENERIC_CONTROLLER,CREATE_INSTANCE"
-#define	GENERIC_DELETEINSTANCE		"GENERIC_CONTROLLER,DELETE_INSTANCE"
-#define	GENERIC_SETINSTANCE		"GENERIC_CONTROLLER,SET_INSTANCE"
-#define	GENERIC_GETPROPERTY		"GENERIC_CONTROLLER,GET_PROPERTY"
-#define	GENERIC_SETPROPERTY		"GENERIC_CONTROLLER,SET_PROPERTY"
-#define	GENERIC_INVOKEMETHOD		"GENERIC_CONTROLLER,INVOKE_METHOD"
-#define	GENERIC_EXECQUERY		"GENERIC_CONTROLLER,EXEC_QUERY"
-
-/*
- * Solaris_GenericController provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the CIMOM as the caller.
- */
-
-
-/*
- * Name: cp_getInstance_Solaris_GenericController
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_GenericController(CCIMObjectPath* pOP)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMPropertyList	*pCurPropList;
-	dm_descriptor_t		uctrl_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL ||
-	    pOP->mKeyProperties == NULL) {
-	    util_handleError(GENERIC_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = pOP->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0 || name == NULL) {
-	    util_handleError(GENERIC_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	uctrl_descriptor =
-	    dm_get_descriptor_by_name(DM_CONTROLLER, name, &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(GENERIC_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	/* Turn this descriptor in to a generic controller instance */
-
-	inst = ctrl_descriptor_toCCIMInstance(
-	    hostName, uctrl_descriptor, GENERIC_CONTROLLER, &error);
-	dm_free_descriptor(uctrl_descriptor);
-
-	if (error != 0) {
-	    util_handleError(GENERIC_GETINSTANCE, CIM_ERR_FAILED,
-		UCTRL_DESC_TO_INSTANCE_FAILURE, NULL,
-		    &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_GenericController
- *
- * Description: Returns an instance list of Unknown controllers, if any found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instances.
- * Returns:
- *      CCIMInstanceList * if matches are found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_GenericController(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	dm_descriptor_t		*uctrl_descriptorp;
-	int			error;
-	int			filter[1];
-
-	filter[0] = DM_FILTER_END;
-
-	uctrl_descriptorp = dm_get_descriptors(DM_CONTROLLER, filter,
-	    &error);
-
-	if (uctrl_descriptorp == NULL ||
-	    uctrl_descriptorp[0] == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(GENERIC_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* convert controller to CCIMInstanceList */
-	instList = ctrl_descriptors_toCCIMInstanceList(GENERIC_CONTROLLER,
-	    uctrl_descriptorp, &error, 1, "unknown");
-	dm_free_descriptors(uctrl_descriptorp);
-
-	if (error != 0) {
-	    util_handleError(GENERIC_ENUMINSTANCES, CIM_ERR_FAILED,
-		UCTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_GenericController
- *
- * Description: Returns an objectPath list of GENERIC controllers, if any found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instances.
- * Returns:
- *      CCIMObjectPathList * if matched instances are found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_GenericController(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(GENERIC_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call into enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_GenericController(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_GenericController is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_GenericController(
-    CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(GENERIC_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath*)NULL);
-}
-
-/*
- * Deleting an instance of a Solaris_GenericController is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_GenericController(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(GENERIC_DELETEINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_GenericController
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_GenericController(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(GENERIC_GETPROPERTY, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_GenericController(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-/*
- * Setting an instance of a Solaris_GenericController is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_GenericController(CCIMObjectPath* pOP,
-    CCIMInstance* pInst)
-{
-
-	int	error;
-
-	util_handleError(GENERIC_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Setting a property on an instance of a Solaris_GenericController is not
- * supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_GenericController(CCIMObjectPath* pOP,
-    CCIMProperty* pProp)
-{
-
-	int	error;
-
-	util_handleError(GENERIC_SETPROPERTY, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No methods available on an instance of a Solaris_GenericController
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_GenericController(CCIMObjectPath* op,
-    cimchar* methodName, CCIMPropertyList* inParams,
-	CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_GenericController
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *      CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *      information on the class for which to find the instances.
- *
- *      selectList - Not used
- *      nonJoinExp - Not used
- *
- * Returns:
- *      CCIMInstanceList * if matched instances are found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_GenericController(CCIMObjectPath *op, cimchar *selectList,
-    cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(GENERIC_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_GenericController(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(GENERIC_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(GENERIC_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(GENERIC_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/controller/Solaris_GenericController.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_GENERICCONTROLLER_H_
-#define	_SOLARIS_GENERICCONTROLLER_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_GENERICCONTROLLER_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/controller/Solaris_IDEController.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,422 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "ctrl_descriptors.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "Solaris_IDEController.h"
-
-#define	IDE_GETINSTANCE		"IDE_CONTROLLER,GET_INSTANCE"
-#define	IDE_ENUMINSTANCES	"IDE_CONTROLLER,ENUM_INSTANCES"
-#define	IDE_ENUMINSTANCENAMES	"IDE_CONTROLLER,ENUM_INSTANCENAMES"
-#define	IDE_CREATEINSTANCE	"IDE_CONTROLLER,CREATE_INSTANCE"
-#define	IDE_DELETEINSTANCE	"IDE_CONTROLLER,DELETE_INSTANCE"
-#define	IDE_SETINSTANCE		"IDE_CONTROLLER,SET_INSTANCE"
-#define	IDE_GETPROPERTY		"IDE_CONTROLLER,GET_PROPERTY"
-#define	IDE_SETPROPERTY		"IDE_CONTROLLER,SET_PROPERTY"
-#define	IDE_INVOKEMETHOD	"IDE_CONTROLLER,INVOKE_METHOD"
-#define	IDE_EXECQUERY		"IDE_CONTROLLER,EXEC_QUERY"
-
-/*
- * Solaris_IDEController provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the CIMOM as the caller.
- */
-
-
-/*
- * Name: cp_getInstance_Solaris_IDEController
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_IDEController(CCIMObjectPath* pOP)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMPropertyList	*pCurPropList;
-	dm_descriptor_t		idectrl_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL ||
-	    pOP->mKeyProperties == NULL) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = pOP->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0 || name == NULL) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	idectrl_descriptor =
-	    dm_get_descriptor_by_name(DM_CONTROLLER, name, &error);
-
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	/* Turn this descriptor in to a ide controller instance */
-
-	inst = ctrl_descriptor_toCCIMInstance(
-	    hostName, idectrl_descriptor, IDE_CONTROLLER, &error);
-	dm_free_descriptor(idectrl_descriptor);
-
-	if (error != 0) {
-	    util_handleError(IDE_GETINSTANCE, CIM_ERR_FAILED,
-		IDECTRL_DESC_TO_INSTANCE_FAILURE, NULL,
-		&error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_IDEController
- *
- * Description: Returns an instance list of IDE controllers, if any found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instances.
- * Returns:
- *      CCIMInstanceList * if matches are found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_IDEController(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	dm_descriptor_t		*idectrl_descriptorp;
-	int			error;
-	int			filter[1];
-
-	filter[0] = DM_FILTER_END;
-
-	idectrl_descriptorp = dm_get_descriptors(DM_CONTROLLER, filter,
-	    &error);
-
-	if (idectrl_descriptorp == NULL ||
-	    idectrl_descriptorp[0] == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(IDE_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* convert controller to CCIMInstanceList */
-	instList = ctrl_descriptors_toCCIMInstanceList(IDE_CONTROLLER,
-	    idectrl_descriptorp, &error, 2, "ata", "pcata");
-	dm_free_descriptors(idectrl_descriptorp);
-
-	if (error != 0) {
-	    util_handleError(IDE_ENUMINSTANCES, CIM_ERR_FAILED,
-		IDECTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_IDEController
- *
- * Description: Returns an objectPath list of IDE controllers, if any found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instances.
- * Returns:
- *      CCIMObjectPathList * if matched instances are found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_IDEController(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(IDE_ENUMINSTANCENAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_IDEController(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_IDEController is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_IDEController(
-    CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(IDE_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath*)NULL);
-}
-
-/*
- * Deleting an instance of a Solaris_IDEController is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_IDEController(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(IDE_DELETEINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_IDEController
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_IDEController(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(IDE_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_IDEController(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-/*
- * Setting an instance of a Solaris_IDEController is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_IDEController(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-
-	int	error;
-
-	util_handleError(IDE_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Setting a property on an instance of a Solaris_IDEController is not
- * supported.
- */
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_IDEController(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-
-	int	error;
-
-	util_handleError(IDE_SETPROPERTY, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No methods available on an instance of a Solaris_IDEController
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_IDEController(CCIMObjectPath* op, cimchar* methodName,
-    CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_IDEController
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *      CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *      information on the class for which to find the instances.
- *
- *      selectList - Not used
- *      nonJoinExp - Not used
- *
- * Returns:
- *      CCIMInstanceList * if matched instances are found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_IDEController(CCIMObjectPath *op, cimchar *selectList,
-    cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(IDE_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_IDEController(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(IDE_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/controller/Solaris_IDEController.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_IDECONTROLLER_H_
-#define	_SOLARIS_IDECONTROLLER_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_IDECONTROLLER_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/controller/Solaris_MPXIOController.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,430 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "ctrl_descriptors.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "Solaris_MPXIOController.h"
-
-#define	MPXIO_GETINSTANCE	"MPXIO_CONTROLLER,GET_INSTANCE"
-#define	MPXIO_ENUMINSTANCES	"MPXIO_CONTROLLER,ENUM_INSTANCES"
-#define	MPXIO_ENUMINSTANCENAMES	"MPXIO_CONTROLLER,ENUM_INSTANCENAMES"
-#define	MPXIO_CREATEINSTANCE	"MPXIO_CONTROLLER,CREATE_INSTANCE"
-#define	MPXIO_DELETEINSTANCE	"MPXIO_CONTROLLER,DELETE_INSTANCE"
-#define	MPXIO_SETINSTANCE	"MPXIO_CONTROLLER,SET_INSTANCE"
-#define	MPXIO_GETPROPERTY	"MPXIO_CONTROLLER,GET_PROPERTY"
-#define	MPXIO_SETPROPERTY	"MPXIO_CONTROLLER,SET_PROPERTY"
-#define	MPXIO_INVOKEMETHOD	"MPXIO_CONTROLLER,INVOKE_METHOD"
-#define	MPXIO_EXECQUERY		"MPXIO_CONTROLLER,EXEC_QUERY"
-
-/*
- * Solaris_MPXIOController provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the CIMOM as the caller.
- */
-
-/*
- * Name: cp_getInstance_Solaris_MPXIOController
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_MPXIOController(CCIMObjectPath* pOP)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMPropertyList	*pCurPropList;
-	dm_descriptor_t		mpxioctrl_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL ||
-	    pOP->mKeyProperties == NULL) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = pOP->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0 || name == NULL) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	mpxioctrl_descriptor =
-	    dm_get_descriptor_by_name(DM_CONTROLLER, name, &error);
-
-	/*
-	 * Not found. Return a null instance.
-	 */
-	if (error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	/* Turn this descriptor in to a mpxio controller instance */
-
-	inst = ctrl_descriptor_toCCIMInstance(
-	    hostName, mpxioctrl_descriptor, MPXIO_CONTROLLER, &error);
-	dm_free_descriptor(mpxioctrl_descriptor);
-
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_FAILED,
-		MPXIOCTRL_DESC_TO_INSTANCE_FAILURE, NULL,
-		&error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_MPXIOController
- *
- * Description: Returns an instancelist of MPXIO controllers, if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstanceList * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_MPXIOController(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	dm_descriptor_t		*mpxioctrl_descriptorp;
-	int			error;
-	int			filter[1];
-
-	filter[0] = DM_FILTER_END;
-
-	mpxioctrl_descriptorp = dm_get_descriptors(DM_CONTROLLER, filter,
-	    &error);
-
-	/*
-	 * If no devices, return NULL. CIMOM expects NULL. Do not set
-	 * last error. If set, the CIMOM will assume an error and
-	 * throw an exception.
-	 */
-
-	if (mpxioctrl_descriptorp == NULL ||
-	    mpxioctrl_descriptorp[0] == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* convert controllers to CCIMInstanceList */
-	instList = ctrl_descriptors_toCCIMInstanceList(MPXIO_CONTROLLER,
-	    mpxioctrl_descriptorp, &error, 1, "scsi_vhci");
-	dm_free_descriptors(mpxioctrl_descriptorp);
-
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_FAILED,
-		MPXIOCTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_MPXIOController
- *
- * Description: Returns an object pathlist of MPXIO controllers, if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMObjectPathList * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_MPXIOController(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(MPXIO_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_MPXIOController(pOP);
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_MPXIOController is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_MPXIOController(CCIMObjectPath* pOP,
-    CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(MPXIO_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath*)NULL);
-}
-
-/*
- * Deleting an instance of a Solaris_MPXIOController is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_MPXIOController(CCIMObjectPath* pInst)
-{
-
-	int	error;
-
-	util_handleError(MPXIO_DELETEINSTANCE,
-	    CIM_ERR_NOT_SUPPORTED, NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_MPXIOController
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_MPXIOController(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(MPXIO_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_MPXIOController(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/*
- * Setting an instance of a Solaris_MPXIOController is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_MPXIOController(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-
-	int	error;
-
-	util_handleError(MPXIO_SETINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Setting properties on an instance of a Solaris_MPXIOController is not
- * supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_MPXIOController(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-
-	int	error;
-
-	util_handleError(MPXIO_SETPROPERTY, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- *  No methods available on an instance of a Solaris_MPXIOController.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_MPXIOController(CCIMObjectPath* op, cimchar* methodName,
-    CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_MPXIOController
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *      CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *      information on the class for which to find the instances.
- *
- *      selectList - Not used
- *      nonJoinExp - Not used
- *
- * Returns:
- *      CCIMInstanceList * if matched instance is found. Otherwise, NULL.
- */
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_MPXIOController(CCIMObjectPath *op, cimchar *selectList,
-    cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_MPXIOController(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    cim_freeInstance(emptyInst);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/controller/Solaris_MPXIOController.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_MPXIOCONTROLLER_H_
-#define	_SOLARIS_MPXIOCONTROLLER_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_MPXIOCONTROLLER_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/controller/Solaris_SCSIController.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,423 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "ctrl_descriptors.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "Solaris_SCSIController.h"
-
-#define	SCSI_GETINSTANCE	"SCSI_CONTROLLER,GET_INSTANCE"
-#define	SCSI_ENUMINSTANCES	"SCSI_CONTROLLER,ENUM_INSTANCES"
-#define	SCSI_ENUMINSTANCENAMES	"SCSI_CONTROLLER,ENUM_INSTANCENAMES"
-#define	SCSI_CREATEINSTANCE	"SCSI_CONTROLLER,CREATE_INSTANCE"
-#define	SCSI_DELETEINSTANCE	"SCSI_CONTROLLER,DELETE_INSTANCE"
-#define	SCSI_SETINSTANCE	"SCSI_CONTROLLER,SET_INSTANCE"
-#define	SCSI_GETPROPERTY	"SCSI_CONTROLLER,GET_PROPERTY"
-#define	SCSI_SETPROPERTY	"SCSI_CONTROLLER,SET_PROPERTY"
-#define	SCSI_INVOKEMETHOD	"SCSI_CONTROLLER,INVOKE_METHOD"
-#define	SCSI_EXECQUERY		"SCSI_CONTROLLER,EXEC_QUERY"
-
-/*
- * Solaris_SCSIController provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the CIMOM as the caller.
- */
-
-/*
- * Name: cp_getInstance_Solaris_SCSIController
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_SCSIController(CCIMObjectPath* pOP)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMPropertyList	*pCurPropList;
-	dm_descriptor_t		scsictrl_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL ||
-	    pOP->mKeyProperties == NULL) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = pOP->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-	if (error != 0 || name == NULL) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	scsictrl_descriptor =
-	    dm_get_descriptor_by_name(DM_CONTROLLER, name, &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-	/* Turn this descriptor in to a scsi controller instance */
-
-	inst = ctrl_descriptor_toCCIMInstance(
-	    hostName, scsictrl_descriptor, SCSI_CONTROLLER, &error);
-	dm_free_descriptor(scsictrl_descriptor);
-
-	if (error != 0) {
-	    util_handleError(SCSI_GETINSTANCE, CIM_ERR_FAILED,
-		SCSICTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_SCSIController
- *
- * Description: Returns an instancelist of SCSI controllers, if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstanceList * if matched instances are found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_SCSIController(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	dm_descriptor_t		*scsictrl_descriptorp;
-	int			error;
-	int			filter[1];
-
-	filter[0] = DM_FILTER_END;
-
-	scsictrl_descriptorp = dm_get_descriptors(DM_CONTROLLER, filter,
-	    &error);
-
-	if (scsictrl_descriptorp == NULL ||
-	    scsictrl_descriptorp[0] == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(SCSI_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* convert controller to CCIMInstanceList */
-	instList = ctrl_descriptors_toCCIMInstanceList(SCSI_CONTROLLER,
-	    scsictrl_descriptorp, &error, 2, "scsi", "fibre channel");
-	dm_free_descriptors(scsictrl_descriptorp);
-
-	if (error != 0) {
-	    util_handleError(SCSI_ENUMINSTANCES, CIM_ERR_FAILED,
-		SCSICTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_SCSIController
- *
- * Description: Returns an object path list of SCSI controllers, if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMObjectPathList * if matched instances are found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_SCSIController(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(SCSI_ENUMINSTANCENAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_SCSIController(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_SCSIController is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_SCSIController(
-    CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(SCSI_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath*)NULL);
-}
-
-/*
- * Deleting an instance of a Solaris_SCSIController is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_SCSIController(CCIMObjectPath* pInst)
-{
-
-	int	error;
-
-	util_handleError(SCSI_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_SCSIController
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_SCSIController(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(SCSI_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_SCSIController(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/*
- * Setting an instance of a Solaris_SCSIController is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_SCSIController(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-
-	int	error;
-
-	util_handleError(SCSI_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Setting a property of a Solaris_SCSIController is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_SCSIController(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-
-	int	error;
-
-	util_handleError(SCSI_SETPROPERTY, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No methods available for Solaris_SCSIController.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_SCSIController(CCIMObjectPath* op, cimchar* methodName,
-    CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_SCSIController
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *      CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *      information on the class for which to find the instances.
- *
- *      selectList - Not used
- *      nonJoinExp - Not used
- *
- * Returns:
- *      CCIMInstanceList * if matched instances are found. Otherwise, NULL.
- */
-
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_SCSIController(CCIMObjectPath *op, cimchar *selectList,
-    cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(SCSI_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_SCSIController(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(SCSI_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    cim_freeInstance(emptyInst);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/controller/Solaris_SCSIController.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_SCSICONTROLLER_H_
-#define	_SOLARIS_SCSICONTROLLER_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_SCSICONTROLLER_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/controller/Solaris_USBSCSIController.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,430 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "ctrl_descriptors.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "Solaris_USBSCSIController.h"
-
-#define	USB_GETINSTANCE		"USBSCSI_CONTROLLER,GET_INSTANCE"
-#define	USB_ENUMINSTANCES	"USBSCSI_CONTROLLER,ENUM_INSTANCES"
-#define	USB_ENUMINSTANCENAMES	"USBSCSI_CONTROLLER,ENUM_INSTANCENAMES"
-#define	USB_CREATEINSTANCE	"USBSCSI_CONTROLLER,CREATE_INSTANCE"
-#define	USB_DELETEINSTANCE	"USBSCSI_CONTROLLER,DELETE_INSTANCE"
-#define	USB_SETINSTANCE		"USBSCSI_CONTROLLER,SET_INSTANCE"
-#define	USB_GETPROPERTY		"USBSCSI_CONTROLLER,GET_PROPERTY"
-#define	USB_SETPROPERTY		"USBSCSI_CONTROLLER,SET_PROPERTY"
-#define	USB_INVOKEMETHOD	"USBSCSI_CONTROLLER,INVOKE_METHOD"
-#define	USB_EXECQUERY		"USBSCSI_CONTROLLER,EXEC_QUERY"
-
-/*
- * Solaris_USBSCSIController provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the CIMOM as the caller.
- */
-
-/*
- * Name: cp_getInstance_Solaris_USBSCSIController
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_USBSCSIController(CCIMObjectPath* pOP)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMPropertyList	*pCurPropList;
-	dm_descriptor_t		usbctrl_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL || pOP->mKeyProperties == NULL) {
-	    util_handleError(USB_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = pOP->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0 || name == NULL) {
-	    util_handleError(USB_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	usbctrl_descriptor =
-	    dm_get_descriptor_by_name(DM_CONTROLLER, name, &error);
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(USB_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	/* Turn this descriptor in to a usb controller instance */
-
-	inst = ctrl_descriptor_toCCIMInstance(
-	    hostName, usbctrl_descriptor, USBSCSI_CONTROLLER, &error);
-	dm_free_descriptor(usbctrl_descriptor);
-
-	if (error != 0) {
-	    util_handleError(USB_GETINSTANCE, CIM_ERR_FAILED,
-		USBCTRL_DESC_TO_INSTANCE_FAILURE, NULL,
-		&error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_USBSCSIController
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstanceList * if matched instances are found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_USBSCSIController(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	dm_descriptor_t		*usbctrl_descriptorp;
-	int			error;
-	int			filter[1];
-
-	filter[0] = DM_FILTER_END;
-
-	usbctrl_descriptorp = dm_get_descriptors(DM_CONTROLLER, filter,
-	    &error);
-
-	/*
-	 * If no devices, return empty list.
-	 */
-	if (usbctrl_descriptorp == NULL ||
-	    usbctrl_descriptorp[0] == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(USB_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* convert controller to CCIMInstanceList */
-	instList = ctrl_descriptors_toCCIMInstanceList(USBSCSI_CONTROLLER,
-	    usbctrl_descriptorp, &error, 1, "usb");
-	dm_free_descriptors(usbctrl_descriptorp);
-
-	if (error != 0) {
-	    util_handleError(USB_ENUMINSTANCES, CIM_ERR_FAILED,
-		USBCTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_USBSCSIController
- *
- * Description: Returns an object path list of Solaris_USBSCSIController if
- * found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMObjectPathList * if matched instances are found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_USBSCSIController(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(USB_ENUMINSTANCENAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_USBSCSIController(pOP);
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_USBSCSIController is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_USBSCSIController(
-    CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(USB_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath*)NULL);
-}
-
-/*
- * Deleting an instance of a Solaris_USBSCSIController is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_USBSCSIController(CCIMObjectPath* pInst)
-{
-
-	int	error;
-
-	util_handleError(USB_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_USBSCSIController
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_USBSCSIController(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(USB_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_USBSCSIController(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-/*
- * Setting an instance of a Solaris_USBSCSIController is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_USBSCSIController(CCIMObjectPath* pOP,
-	CCIMInstance* pInst)
-{
-
-	int	error;
-
-	util_handleError(USB_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Setting properties on an instance of a Solaris_USBSCSIController is not
- * supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_USBSCSIController(CCIMObjectPath* pOP,
-	CCIMProperty* pProp)
-{
-
-	int	error;
-
-	util_handleError(USB_SETPROPERTY, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * No methods avialable on an instance of a Solaris_USBSCSIController
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_USBSCSIController(CCIMObjectPath* op,
-	cimchar* methodName, CCIMPropertyList* inParams,
-	CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_USBSCSIController
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *      CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *      information on the class for which to find the instances.
- *
- *      selectList - Not used
- *      nonJoinExp - Not used
- *
- * Returns:
- *      CCIMInstanceList * if matched instances are found. Otherwise, NULL.
- */
-
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_USBSCSIController(CCIMObjectPath *op, cimchar *selectList,
-    cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(USB_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_USBSCSIController(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(USB_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(USB_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(USB_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/controller/Solaris_USBSCSIController.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_USBSCSICONTROLLER_H_
-#define	_SOLARIS_USBSCSICONTROLLER_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_USBSCSICONTROLLER_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/disk/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS		= Solaris_Disk.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL	=	$(ROOTWBEMINC) \
-		$(SRC)/lib/libdiskmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -Dpic -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_PICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _disk.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-
-install:	all
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/disk/Solaris_Disk.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,432 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "methods.h"
-#include "disk_descriptors.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-
-#define	DISK_GETINSTANCE	"DISK,GET_INSTANCE"
-#define	DISK_ENUMINSTANCES	"DISK,ENUM_INSTANCES"
-#define	DISK_ENUMINSTANCENAMES	"DISK,ENUM_INSTANCENAMES"
-#define	DISK_CREATEINSTANCE	"DISK,CREATE_INSTANCE"
-#define	DISK_DELETEINSTANCE	"DISK,DELETE_INSTANCE"
-#define	DISK_SETINSTANCE	"DISK,SET_INSTANCE"
-#define	DISK_GETPROPERTY	"DISK,GET_PROPERTY"
-#define	DISK_SETPROPERTY	"DISK,SET_PROPERTY"
-#define	DISK_INVOKEMETHOD	"DISK,INVOKE_METHOD"
-#define	DISK_EXECQUERY		"DISK,EXEC_QUERY"
-
-/*
- * Solaris_Disk provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the CIMOM as the caller.
- */
-
-
-/*
- * Name: cp_getInstance_Solaris_Disk
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_Disk(CCIMObjectPath* pOP)
-{
-	CCIMInstance		*inst = NULL;
-	CCIMPropertyList	*pCurPropList;
-	dm_descriptor_t		disk_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL || pOP->mKeyProperties == NULL) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = pOP->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, TAG, &error);
-
-	if (error != 0 || name == NULL) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	disk_descriptor = dm_get_descriptor_by_name(DM_MEDIA, name, &error);
-
-	/*
-	 * Not found. Return a null instance.
-	 */
-	if (error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	/* Turn this descriptor in to a disk drive instance */
-
-	inst = disk_descriptor_toCCIMInstance(
-	    hostName, disk_descriptor, DISK, &error);
-	dm_free_descriptor(disk_descriptor);
-
-	if (error != 0) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_FAILED,
-		DISK_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_Disk
- *
- * Description: Returns a list of instances if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstanceList * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_Disk(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList* 	instList = NULL;
-	dm_descriptor_t		*disk_descriptorp;
-	int			error;
-
-	disk_descriptorp = dm_get_descriptors(DM_MEDIA, NULL, &error);
-
-	if (disk_descriptorp == NULL ||
-	    disk_descriptorp[0] == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(DISK_ENUMINSTANCENAMES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* convert drive descriptors to CCIMInstanceList */
-	instList = disk_descriptors_toCCIMInstanceList(DISK,
-	    disk_descriptorp, &error);
-	dm_free_descriptors(disk_descriptorp);
-
-	if (error != 0) {
-	    util_handleError(DISK_ENUMINSTANCES, CIM_ERR_FAILED,
-		DISK_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_Disk
- *
- * Description: Returns a list of instances if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMObjectPathList * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_Disk(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(DISK_ENUMINSTANCENAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_Disk(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_Disk is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_Disk(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(DISK_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath *)NULL);
-}
-
-/*
- * Deleting an instance of a Solaris_Disk is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_Disk(CCIMObjectPath* pInst)
-{
-
-	int	error;
-
-	util_handleError(DISK_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_Disk
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_Disk(CCIMObjectPath *pOP, char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error;
-
-	if (pOP == NULL) {
-	    util_handleError(DISK_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_Disk(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-
-/* This provider cannot set an instance of a Solaris_Disk object. */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_Disk(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-
-	int	error;
-
-	util_handleError(DISK_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL, NULL,
-	    &error);
-	return (cim_false);
-}
-
-/* This provider cannot set an instance of a Solaris_Disk object. */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_Disk(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-
-	int	error;
-
-	util_handleError(DISK_SETPROPERTY, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/* invokeMethod function dispatches to the various method implementations */
-CCIMProperty*
-cp_invokeMethod_Solaris_Disk(CCIMObjectPath* op, cimchar* methodName,
-    CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty *)NULL;
-	int		error;
-
-	/* dispatch code for various methods */
-	if (strcasecmp("createFDiskPartitions", methodName) == 0) {
-		retVal = create_fdisk_partitions(inParams, op);
-		return (retVal);
-	} else if (strcasecmp("createPartitions", methodName) == 0) {
-		retVal = create_partitions(inParams, op);
-		return (retVal);
-	} else if (strcasecmp("labelDisk", methodName) == 0) {
-		retVal = label_disk(inParams, op);
-		return (retVal);
-	} else if (strcasecmp("getDiskGeometry", methodName) == 0) {
-		retVal = get_disk_geometry(outParams, op);
-		return (retVal);
-	}
-
-	/*
-	 * We fell through the dispatch logic.  There is no function
-	 * that matches 'methodName'.
-	 */
-
-	util_handleError(DISK_INVOKEMETHOD, CIM_ERR_FAILED,
-	    NO_SUCH_METHOD, NULL, &error);
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_Disk
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *      CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *      information on the class for which to find the instances.
- *
- *      selectList - Not used
- *      nonJoinExp - Not used
- *
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_Disk(CCIMObjectPath *op, cimchar *selectList,
-    cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_Disk(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/diskdrive/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS		= Solaris_DiskDrive.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL	=	$(ROOTWBEMINC) \
-		$(SRC)/lib/libdiskmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -Dpic -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_PICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _diskdrive.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-
-install:	all
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/diskdrive/Solaris_DiskDrive.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,461 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "methods.h"
-#include "cimKeys.h"
-#include "drive_descriptors.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-
-#define	DISK_GETINSTANCE	"DISK_DRIVE,GET_INSTANCE"
-#define	DISK_ENUMINSTANCES	"DISK_DRIVE,ENUM_INSTANCES"
-#define	DISK_ENUMINSTANCENAMES	"DISK_DRIVE,ENUM_INSTANCENAMES"
-#define	DISK_CREATEINSTANCE	"DISK_DRIVE,CREATE_INSTANCE"
-#define	DISK_DELETEINSTANCE	"DISK_DRIVE,DELETE_INSTANCE"
-#define	DISK_SETINSTANCE	"DISK_DRIVE,SET_INSTANCE"
-#define	DISK_GETPROPERTY	"DISK_DRIVE,GET_PROPERTY"
-#define	DISK_SETPROPERTY	"DISK_DRIVE,SET_PROPERTY"
-#define	DISK_INVOKEMETHOD	"DISK_DRIVE,INVOKE_METHOD"
-#define	DISK_EXECQUERY		"DISK_DRIVE,EXEC_QUERY"
-
-/*
- * Solaris_DiskDrive provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the CIMOM as the caller.
- */
-
-/*
- * Name: cp_getInstance_Solaris_DiskDrive
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_DiskDrive(CCIMObjectPath* pOP)
-{
-	CCIMInstance* 		inst = NULL;
-	CCIMPropertyList* 	pCurPropList;
-	dm_descriptor_t		dd_descriptor;
-	char			*name;
-	int			error;
-
-
-	if (pOP == NULL ||
-	    pOP->mKeyProperties == NULL) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = pOP->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0 || name == NULL) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-
-	dd_descriptor = dm_get_descriptor_by_name(DM_DRIVE, name, &error);
-
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-
-	/* Turn this descriptor in to a disk drive instance */
-
-	inst = drive_descriptor_toCCIMInstance(
-	    hostName, dd_descriptor, DISK_DRIVE, &error);
-	dm_free_descriptor(dd_descriptor);
-
-	if (error != 0) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_FAILED,
-		DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_DiskDrive
- *
- * Description: Returns a list of instances if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstanceList * if found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_DiskDrive(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList* 	instList = NULL;
-	dm_descriptor_t		*ddrive_descriptorp;
-	int			error;
-	int			filter[5];
-
-	/*
-	 * Get all disk drives, fixed or removable, but not CD-ROMs, floppy,
-	 * etc., since those are in a different branch of the CIM model.
-	 */
-	filter[0] = DM_DT_UNKNOWN;
-	filter[1] = DM_DT_FIXED;
-	filter[2] = DM_DT_ZIP;
-	filter[3] = DM_DT_JAZ;
-	filter[4] = DM_FILTER_END;
-
-	ddrive_descriptorp = dm_get_descriptors(DM_DRIVE, filter, &error);
-	if (ddrive_descriptorp == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (ddrive_descriptorp[0] == NULL) {
-	    dm_free_descriptors(ddrive_descriptorp);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(DISK_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* convert drive descriptors to CCIMInstanceList */
-	instList = drive_descriptors_toCCIMInstanceList(DISK_DRIVE,
-	    ddrive_descriptorp, &error);
-	dm_free_descriptors(ddrive_descriptorp);
-
-	if (error != 0) {
-	    util_handleError(DISK_ENUMINSTANCES, CIM_ERR_FAILED,
-		DRIVE_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_DiskDrive
- *
- * Description: Returns a list of instances if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstanceList * if found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_DiskDrive(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-
-	if (pOP == NULL) {
-	    util_handleError(DISK_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_DiskDrive(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_DiskDrive is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_DiskDrive(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(DISK_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return ((CCIMObjectPath*)NULL);
-}
-
-
-/* deletes an instance */
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_DiskDrive(CCIMObjectPath* pInst)
-{
-
-	int	error;
-
-	util_handleError(DISK_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_DiskDrive
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_DiskDrive(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(DISK_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_DiskDrive(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-/* This provider cannot set an instance of a Solaris_DiskDrive object. */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_DiskDrive(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-
-	int	error;
-
-	util_handleError(DISK_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Sets the property in the passed in instance to the new values of the passed
- * in property
- * params:
- *   CCIMInstance* - the instance in which teh property should be changed
- *   CCIMProperty* - a property structure which contains the new values
- * return:
- *   cim_true if property was updated otherwise cim_false
- * NOTE: This provider cannot set a property on a Solaris_DiskDrive object.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_DiskDrive(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-
-
-	int	error;
-
-	util_handleError(DISK_SETPROPERTY, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/* invokeMethod function dispatches to the various method implementations */
-CCIMProperty*
-cp_invokeMethod_Solaris_DiskDrive(CCIMObjectPath* op, cimchar* methodName,
-    CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty*)NULL;
-	int		error;
-
-	/* dispatch code for various methods */
-	if (strcasecmp("CreateFdiskPartitions", methodName) == 0) {
-		retVal = create_fdisk_partitions(inParams, op);
-		return (retVal);
-	} else if (strcasecmp(
-	    "CreateDefaultFdiskPartition", methodName) == 0) {
-		retVal = create_default_fdisk_partition(op);
-		return (retVal);
-	} else if (strcasecmp("GetFdiskPartitions", methodName) == 0) {
-		retVal = getFdisk(outParams, op);
-		return (retVal);
-	} else if (strcasecmp("LabelDisk", methodName) == 0) {
-		retVal = label_disk(inParams, op);
-		return (retVal);
-	}
-
-	/*
-	 * We fell through the dispatch logic.  There is no function
-	 * that matches 'methodName'.
-	 */
-
-	util_handleError(DISK_INVOKEMETHOD, CIM_ERR_FAILED,
-		NO_SUCH_METHOD, NULL, &error);
-	return (retVal);
-}
-/*
- * Name: cp_execQuery_Solaris_DiskDrive
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *      CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *      information on the class for which to find the instances.
- *
- *      selectList - Not used
- *      nonJoinExp - Not used
- *
- * Returns:
- *      CCIMInstanceList * if found. Otherwise, NULL.
- */
-
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_DiskDrive(CCIMObjectPath *op, cimchar *selectList,
-    cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_DiskDrive(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/diskpartition/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS		= Solaris_DiskPartition.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL	=	$(ROOTWBEMINC) \
-		$(SRC)/lib/libdiskmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include \
-		$(SRC)/cmd/wbem/provider/c/wbem_disk/disk 
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -Dpic -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_PICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _diskpartition.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-
-install:	all
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:		
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/diskpartition/Solaris_DiskPartition.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,461 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <errno.h>
-#include <sys/wait.h>
-#include "cimKeys.h"
-#include "util.h"
-#include "Solaris_DiskPartition.h"
-#include "partition_descriptors.h"
-#include "methods.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-
-#define	DISK_GETINSTANCE	"DISK_PARTITION,GET_INSTANCE"
-#define	DISK_ENUMINSTANCES	"DISK_PARTITION,ENUM_INSTANCES"
-#define	DISK_ENUMINSTANCENAMES	"DISK_PARTITION,ENUM_INSTANCENAMES"
-#define	DISK_CREATEINSTANCE	"DISK_PARTITION,CREATE_INSTANCE"
-#define	DISK_DELETEINSTANCE	"DISK_PARTITION,DELETE_INSTANCE"
-#define	DISK_SETINSTANCE	"DISK_PARTITION,SET_INSTANCE"
-#define	DISK_GETPROPERTY	"DISK_PARTITION,GET_PROPERTY"
-#define	DISK_SETPROPERTY	"DISK_PARTITION,SET_PROPERTY"
-#define	DISK_INVOKEMETHOD	"DISK_PARTITION,INVOKE_METHOD"
-#define	DISK_EXECQUERY		"DISK_PARTITION,EXEC_QUERY"
-
-/*
- * Name: cp_getInstance_Solaris_DiskPartition
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance *
-cp_getInstance_Solaris_DiskPartition(CCIMObjectPath *pOP)
-{
-
-	CCIMInstance*		inst = NULL;
-	CCIMPropertyList*	pCurPropList;
-	CCIMException*		ex;
-	dm_descriptor_t		dp_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL ||
-	    pOP->mKeyProperties == NULL) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = pOP->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0 || name == NULL) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	dp_descriptor = dm_get_descriptor_by_name(DM_SLICE, name, &error);
-
-	/*
-	 * If not found, could be an fdisk partition.
-	 */
-
-	if (error == ENODEV) {
-	    dp_descriptor = dm_get_descriptor_by_name(DM_PARTITION, name,
-		&error);
-	    if (error == ENODEV) {
-		return ((CCIMInstance *)NULL);
-	    } else if (error != 0) {
-		util_handleError(DISK_GETINSTANCE, CIM_ERR_FAILED,
-		    DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-		return ((CCIMInstance*)NULL);
-	    }
-	} else if (error != 0) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	/* Turn this descriptor in to a disk partition instance */
-
-	inst = partition_descriptor_toCCIMInstance(
-	    hostName, dp_descriptor, DISK_PARTITION, &error);
-	dm_free_descriptor(dp_descriptor);
-
-	if (error != 0) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_FAILED,
-		PART_DESC_TO_INSTANCE_FAILURE, ex, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_DiskPartition
- *
- * Description: Returns a list of instances if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_DiskPartition(CCIMObjectPath* pOP)
-{
-
-	CCIMInstanceList*	instList = NULL;
-	dm_descriptor_t		*dsolpart_descriptorp = NULL;
-	dm_descriptor_t		*dfdiskpart_descriptorp = NULL;
-	int			error;
-	int			filter[2];
-
-	filter[0] = DM_MT_FIXED;
-	filter[1] = DM_FILTER_END;
-
-	dsolpart_descriptorp = dm_get_descriptors(DM_SLICE, filter, &error);
-
-	if (error != 0) {
-	    util_handleError(DISK_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	dfdiskpart_descriptorp =
-	    dm_get_descriptors(DM_PARTITION, filter, &error);
-
-	if (error != 0) {
-	    if (dsolpart_descriptorp != NULL) {
-		dm_free_descriptors(dsolpart_descriptorp);
-	    }
-	    util_handleError(DISK_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-
-	/*
-	 * If both descriptor lists are null, then there is nothing to return.
-	 * otherwise, call the conversion function and return what is found.
-	 */
-
-	if (dsolpart_descriptorp == NULL && dfdiskpart_descriptorp == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* Convert the slice descriptors to a CCIMInstanceList */
-
-	instList = partition_descriptors_toCCIMInstanceList(DISK_PARTITION,
-	    dsolpart_descriptorp, dfdiskpart_descriptorp, &error);
-
-	if (dsolpart_descriptorp != NULL) {
-	    dm_free_descriptors(dsolpart_descriptorp);
-	}
-
-	if (dfdiskpart_descriptorp != NULL) {
-	    dm_free_descriptors(dfdiskpart_descriptorp);
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_DiskPartition
- *
- * Description: Returns a list of instances if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMObjectPathList * if found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList *
-cp_enumInstanceNames_Solaris_DiskPartition(CCIMObjectPath *pOP) {
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList = NULL;
-	int			error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(DISK_ENUMINSTANCENAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call to enumInstances and then convert instance list to a list
-	 * of object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_DiskPartition(pOP);
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_DiskPartition is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_DiskPartition(CCIMObjectPath* pOP,
-    CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(DISK_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return ((CCIMObjectPath*)NULL);
-}
-
-/*
- * Deleting an instance of a Solaris_DiskPartition is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_DiskPartition(CCIMObjectPath* pInst)
-{
-	int	error;
-
-	util_handleError(DISK_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_DiskPartition
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_DiskPartition(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(DISK_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_DiskPartition(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-/*
- * Deleting an instance of a Solaris_DiskPartition is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_DiskPartition(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int		error;
-
-	util_handleError(DISK_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Setting a property on an instance of a Solaris_DiskPartition is not
- * supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_DiskPartition(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-	int error;
-
-	util_handleError(DISK_SETPROPERTY, CIM_ERR_NOT_SUPPORTED,
-	    NULL, NULL, &error);
-	return (cim_false);
-}
-
-/* invokeMethod function dispatches to the various method implementations */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_DiskPartition(CCIMObjectPath* op, cimchar* methodName,
-    CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty*)NULL;
-	int		error = 0;
-
-
-	/* dispatch code for various methods */
-	if (strcasecmp("CreatePartitions", methodName) == 0) {
-	    retVal = create_partitions(inParams, op);
-	    return (retVal);
-	} else if (strcasecmp("CreateFileSystem", methodName) == 0) {
-	    retVal = create_filesystem(op);
-	    return (retVal);
-	}
-
-	/*
-	 * We fell through the dispatch logic.  There is no function
-	 * that matches 'methodName'.
-	 */
-
-	util_handleError(DISK_INVOKEMETHOD, CIM_ERR_FAILED,
-	    NO_SUCH_METHOD, NULL, &error);
-	return ((CCIMProperty*)NULL);
-}
-
-/*
- * Name: cp_execQuery_Solaris_DiskPartition
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *      CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *      information on the class for which to find the instances.
- *
- *      selectList - Not used
- *      nonJoinExp - Not used
- *
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_DiskPartition(CCIMObjectPath *op, cimchar *selectList,
-    cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* Enumerate all instances */
-	instList = cp_enumInstances_Solaris_DiskPartition(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/diskpartition/Solaris_DiskPartition.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_DISKPARTITION_H_
-#define	_SOLARIS_DISKPARTITION_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* include the cimapi headers */
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-#include <cimstructs.h>
-
-#include "libdiskmgt.h"
-
-#define	LINELEN	256
-#define	DISKIDSIZE 32
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_DISKPARTITION_H_ */
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/lib/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-LIBNAME =	libWBEMdisk
-LIBRARY	=	$(LIBNAME).so
-PROG =		$(LIBRARY)
-MSG_DOMAIN =	CIM_$(LIBNAME)
-TMPFILE =	classes.tmp
-TMPFILE1 =	assocclasses.tmp
-
-PROV_OBJECTS = \
-	../assoc/Solaris_DiskPartitionBasedOnDisk.o \
-	../assoc/Sol_DiskPartitionBasedOnFDisk.o \
-	../assoc/Solaris_MediaPresent.o \
-	../assoc/Solaris_RealizesExtent.o \
-	../assoc/Solaris_RealizesDiskDrive.o \
-	../assoc/Solaris_SCSIInterface.o \
-	../assoc/Solaris_IDEInterface.o \
-	../assoc/Solaris_MPXIOInterface.o \
-	../assoc/Sol_MPXIOCtrlrLogicalIdentity.o \
-	../assoc/Solaris_MPXIOComponent.o \
-	../controller/Solaris_USBSCSIController.o \
-	../controller/Solaris_SCSIController.o \
-	../controller/Solaris_MPXIOController.o \
-	../controller/Solaris_IDEController.o \
-	../controller/Solaris_GenericController.o \
-	../common/util.o \
-	../common/drive_descriptors.o \
-	../common/partition_descriptors.o \
-	../common/logicaldisk_descriptors.o \
-	../common/mpxiogroup_descriptors.o \
-	../common/ctrl_descriptors.o \
-	../common/partbasedon_descriptors.o \
-	../common/mediapresent_descriptors.o \
-	../common/methods.o \
-	../common/disk_descriptors.o \
-	../common/realizesextent_descriptors.o \
-	../common/realizesdiskdrive_descriptors.o \
-	../disk/Solaris_Disk.o \
-	../diskdrive/Solaris_DiskDrive.o \
-	../diskpartition/Solaris_DiskPartition.o \
-	../logicaldisk/Solaris_LogicalDisk.o \
-	../mpxio/Solaris_MPXIOGroup.o
-
-# Just add the name of your provider 
-# to this list.
-# IMPORTANT: 
-# $(LIBNAME) MUST be the last entry
-
-WBEM_DISK_CLASSES =	Solaris_DiskDrive \
-			Solaris_DiskPartition \
-			Solaris_Disk \
-			Solaris_LogicalDisk \
-			Solaris_SCSIController \
-			Solaris_IDEController \
-			Solaris_USBSCSIController \
-			Solaris_MPXIOController \
-			Solaris_GenericController \
-			Solaris_DiskPartitionBasedOnDisk \
-			Solaris_DiskPartitionBasedOnFDisk \
-			Solaris_MediaPresent \
-			Solaris_RealizesExtent \
-			Solaris_RealizesDiskDrive \
-			Solaris_SCSIInterface \
-			Solaris_MPXIOInterface \
-			Solaris_IDEInterface \
-			Solaris_MPXIOComponent \
-			Solaris_MPXIOGroup \
-			Solaris_MPXIOCtrlrLogicalIdentity \
-	                $(LIBNAME)
-
-WBEM_DISK_ASSOC_CLASSES =	Solaris_DiskPartitionBasedOnDisk \
-				Solaris_DiskPartitionBasedOnFDisk \
-				Solaris_MediaPresent \
-				Solaris_RealizesExtent \
-				Solaris_RealizesDiskDrive \
-				Solaris_SCSIInterface \
-				Solaris_MPXIOInterface \
-				Solaris_IDEInterface \
-				Solaris_MPXIOComponent \
-				Solaris_MPXIOCtrlrLogicalIdentity \
-	                	$(LIBNAME)
-
-OBJECTS =	libDispatch.o \
-		localFunc.o
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL	=	$(ROOTWBEMINC) \
-		$(SRC)/cmd/wbem/provider/c/include
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -DPORTMAP -D_REENTRANT -Dpic -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_PICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-LDFLAGS		+= -Mmapfile $(GSHARED) -R/usr/sadm/lib/wbem \
-		    $(ZTEXT) $(ZDEFS) $(SOFLAGS)
-
-LDLIBS		+= -L/usr/sadm/lib/wbem -lc -lcimapi -ldiskmgt \
-			-lnvpair
-
-POFILE		= _lib.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLEANFILES	= *.tmp master.h classes assocclasses Make.obj libname $(MSGFILES)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:	master.h $(LIBRARY)
-
-$(LIBRARY): $(OBJECTS)
-	$(CC) -o $@ $(LDFLAGS) \
-	$(PROV_OBJECTS) $(OBJECTS) $(LDLIBS)
-	$(POST_PROCESS_SO)
-
-catalog: master.h $(POFILE)
-
-$(POFILE): $(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-master.h: Makefile header.sh		
-	@echo ${WBEM_DISK_CLASSES} > ${TMPFILE}
-	@echo ${WBEM_DISK_ASSOC_CLASSES} > ${TMPFILE1}
-	sh header.sh
-
-install:	all $(ROOTWBEMPROG)
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:
-		$(RM) $(OBJECTS) $(LIBRARY) $(CLEANFILES) $(LINT_OBJS)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/lib/header.sh	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,426 +0,0 @@
-#! /usr/bin/sh
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-INFILE=classes.tmp
-INFILE1=assocclasses.tmp
-CLASSFILE=classes
-ASSOCCLASSFILE=assocclasses
-LIBFILE=libname
-TMPFILE=tmp.tmp
-TMPFILE1=tmp1.tmp
-PWD=`pwd`
-
-HEADER=${PWD}/master.h
-
-
-rm -f $HEADER $TMPFILE $TMPFILE1 $CLASSFILE $ASSOCCLASSFILE $LIBFILE
-
-# Convert into separate lines per class
-for x in `cat $INFILE`
-do
-	echo $x >> $TMPFILE
-done
-
-# Convert into separate lines per class
-for x in `cat $INFILE1`
-do
-	echo $x >> $TMPFILE1
-done
-#####################################################
-# Create file containing only the library name
-tail -1 $TMPFILE > $LIBFILE
-LIBNAME=`cat $LIBFILE`
-
-# Create file containing only the class names
-COUNT=`cat $TMPFILE | wc -l`
-COUNT=`expr $COUNT - 1`
-head -n $COUNT $TMPFILE > $CLASSFILE
-
-# Create file containing only the class names
-COUNT=`cat $TMPFILE1 | wc -l`
-COUNT=`expr $COUNT - 1`
-head -n $COUNT $TMPFILE1 > $ASSOCCLASSFILE
-##############################################################
-#
-# Create the header file
-#
-echo "#include <cimapi.h>" > $HEADER
-echo "#include <cimlogsvc.h>" > $HEADER
-
-#
-# Create the externs
-# cp_enumInstances
-# 
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMInstanceList*" >> $HEADER
-	echo "cp_enumInstances_$x(CCIMObjectPath* pOP);" >> $HEADER
-done
-
-
-#
-# Create the externs
-# cp_enumInstanceNames
-# 
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMObjectPathList*" >> $HEADER
-	echo "cp_enumInstanceNames_$x(CCIMObjectPath* pOP);" >> $HEADER
-done
-
-#
-# cp_createInstance
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMObjectPath*" >> $HEADER
-	echo "cp_createInstance_$x(CCIMObjectPath* pOP, CCIMInstance* pInst);" >> $HEADER
-done
-
-#
-# cp_deleteInstance
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CIMBool" >> $HEADER
-	echo "cp_deleteInstance_$x(CCIMObjectPath* pOP);" >> $HEADER
-done
-
-#
-# cp_getInstance
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMInstance*" >> $HEADER
-	echo "cp_getInstance_$x(CCIMObjectPath* pOP);" >> $HEADER
-done
-
-#
-# cp_setInstance
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CIMBool" >> $HEADER
-	echo "cp_setInstance_$x(CCIMObjectPath* pOP, CCIMInstance* pInst);" >> $HEADER
-done
-
-#
-# cp_setProperty
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do 
-	echo "extern CIMBool" >> $HEADER
-	echo "cp_setProperty_$x(CCIMObjectPath* pOP, CCIMProperty* pProp);" >> $HEADER
-done
-
-#
-# cp_invokeMethod
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMProperty*" >> $HEADER
-	echo "cp_invokeMethod_$x(CCIMObjectPath* pOP, cimchar* pName,CCIMPropertyList* pInParams,CCIMPropertyList* pInOutParams);" >> $HEADER
-done
-
-#
-# cp_execQuery
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE`
-do
-	echo "extern CCIMInstanceList *" >> $HEADER
-	echo "cp_execQuery_$x(CCIMObjectPath* pOP, char *selectList,char *nonJoinExp, char *queryExp, char *queryType);" >> $HEADER
-done
-
-
-#
-# cp_associators
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE1`
-do
-	echo "extern CCIMInstanceList *" >> $HEADER
-	echo "cp_associators_$x(CCIMObjectPath* pAssocName, CCIMObjectPath *pObjectName, char *pResultClass, char *pRole, char *pResultRole);" >> $HEADER
-done
-
-#
-# cp_associatorNames
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE1`
-do
-	echo "extern CCIMObjectPathList *" >> $HEADER
-	echo "cp_associatorNames_$x(CCIMObjectPath* pAssocName, CCIMObjectPath *pObjectName, char *pResultClass, char *pRole, char *pResultRole);" >> $HEADER
-done
-
-#
-# cp_reference
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE1`
-do
-	echo "extern CCIMObjectPathList *" >> $HEADER
-	echo "cp_references_$x(CCIMObjectPath* pAssocName, CCIMObjectPath *pObjectName, char *pRole);" >> $HEADER
-done
-
-#
-# cp_referenceNames
-#
-
-echo "" >> $HEADER
-for x in `cat $TMPFILE1`
-do
-	echo "extern CCIMObjectPathList *" >> $HEADER
-	echo "cp_referenceNames_$x(CCIMObjectPath* pAssocName, CCIMObjectPath *pObjectName, char *pRole);" >> $HEADER
-done
-
-##############################################################
-#
-# Create the dispatch tables
-#
-##############################################################
-
-
-#
-# *cpInvokeMethodTable
-#
-
-echo "" >> $HEADER
-echo "CCIMProperty *" >> $HEADER
-echo "(*cpInvokeMethodTable[])(CCIMObjectPath *, cimchar *, CCIMPropertyList *, CCIMPropertyList *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_invokeMethod_$x," >> $HEADER
-done
-
-echo "cp_invokeMethod_$LIBNAME};" >> $HEADER
-
-
-#
-# *createInstanceTable
-#
-
-echo "" >> $HEADER
-echo "CCIMObjectPath *" >> $HEADER
-echo "(*createInstanceTable[])(CCIMObjectPath *, CCIMInstance *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_createInstance_$x," >> $HEADER
-done
-echo "cp_createInstance_$LIBNAME};" >> $HEADER
-
-#
-# *deleteInstanceTable
-#
-
-echo "" >> $HEADER
-echo "CIMBool" >> $HEADER
-echo "(*deleteInstanceTable[])( CCIMObjectPath *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_deleteInstance_$x," >> $HEADER
-done
-echo "cp_deleteInstance_$LIBNAME};" >> $HEADER
-
-#
-# *enumInstanceTable
-#
-
-echo "" >> $HEADER
-echo "CCIMInstanceList *" >> $HEADER
-echo "(*enumInstanceTable[])(CCIMObjectPath *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_enumInstances_$x," >> $HEADER
-done
-echo "cp_enumInstances_$LIBNAME};" >> $HEADER
-
-#
-# *enumInstanceNamesTable
-#
-
-echo "" >> $HEADER
-echo "CCIMObjectPathList *" >> $HEADER
-echo "(*enumInstanceNamesTable[])(CCIMObjectPath *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_enumInstanceNames_$x," >> $HEADER
-done
-echo "cp_enumInstanceNames_$LIBNAME};" >> $HEADER
-
-#
-# *getInstanceTable
-#
-
-echo "" >> $HEADER
-echo "CCIMInstance *" >> $HEADER
-echo "(*getInstanceTable[])(CCIMObjectPath *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_getInstance_$x," >> $HEADER
-done
-echo "cp_getInstance_$LIBNAME};" >> $HEADER
-
-#
-# *setInstanceTable
-#
-
-echo "" >> $HEADER
-echo "CIMBool" >> $HEADER
-echo "(*setInstanceTable[])(CCIMObjectPath *, CCIMInstance *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_setInstance_$x," >> $HEADER
-done
-echo "cp_setInstance_$LIBNAME};" >> $HEADER
-
-#
-# *setPropertyTable
-#
-
-echo "" >> $HEADER
-echo "CIMBool" >> $HEADER
-echo "(*setPropertyTable[])(CCIMObjectPath *, CCIMProperty *) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_setProperty_$x," >> $HEADER
-done
-echo "cp_setProperty_$LIBNAME};" >> $HEADER
-
-#
-# *execQueryTable
-#
-
-echo "" >> $HEADER
-echo "CCIMInstanceList*" >> $HEADER
-echo "(*execQueryTable[])(CCIMObjectPath *, char *, char *, char *, char*) = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-	echo "cp_execQuery_$x," >> $HEADER
-done
-echo "cp_execQuery_$LIBNAME};" >> $HEADER
-
-
-#
-# *associatorsTable
-#
-
-echo "" >> $HEADER
-echo "CCIMInstanceList*" >> $HEADER
-echo "(*associatorsTable[])(CCIMObjectPath *, CCIMObjectPath *, char *, char *, char*) = {" >> $HEADER
-for x in `cat $ASSOCCLASSFILE`
-do
-	echo "cp_associators_$x," >> $HEADER
-done
-echo "cp_associators_$LIBNAME};" >> $HEADER
-
-##############################################################
-#
-# *associatorNamesTable
-#
-
-echo "" >> $HEADER
-echo "CCIMObjectPathList*" >> $HEADER
-echo "(*associatorNamesTable[])(CCIMObjectPath *, CCIMObjectPath *, char *, char *, char*) = {" >> $HEADER
-for x in `cat $ASSOCCLASSFILE`
-do
-	echo "cp_associatorNames_$x," >> $HEADER
-done
-echo "cp_associatorNames_$LIBNAME};" >> $HEADER
-
-
-##############################################################
-#
-# *referencesTable
-#
-
-echo "" >> $HEADER
-echo "CCIMObjectPathList*" >> $HEADER
-echo "(*referencesTable[])(CCIMObjectPath *, CCIMObjectPath *, char *) = {" >> $HEADER
-for x in `cat $ASSOCCLASSFILE`
-do
-	echo "cp_references_$x," >> $HEADER
-done
-echo "cp_references_$LIBNAME};" >> $HEADER
-
-##############################################################
-#
-# *referenceNamesTable
-#
-
-echo "" >> $HEADER
-echo "CCIMObjectPathList*" >> $HEADER
-echo "(*referenceNamesTable[])(CCIMObjectPath *, CCIMObjectPath *, char *) = {" >> $HEADER
-for x in `cat $ASSOCCLASSFILE`
-do
-	echo "cp_referenceNames_$x," >> $HEADER
-done
-echo "cp_referenceNames_$LIBNAME};" >> $HEADER
-#
-# Create Class Name table
-#
-echo "" >> $HEADER
-echo "static char *classNameTable [] = {" >> $HEADER
-for x in `cat $CLASSFILE`
-do
-        echo "\"$x\"," >> $HEADER
-done
-echo "\"$LIBNAME\"};" >> $HEADER
-
-##############################################################
-#
-# Create Assoc Class Name table
-#
-echo "" >> $HEADER
-echo "static char *assocclassNameTable [] = {" >> $HEADER
-for x in `cat $ASSOCCLASSFILE`
-do
-        echo "\"$x\"," >> $HEADER
-done
-echo "\"$LIBNAME\"};" >> $HEADER
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/lib/libDispatch.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,707 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <pthread.h>
-
-#include "master.h"
-#include "util.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-
-/* local function declarations */
-static int FindClassEntry(char *className);
-static int FindAssocClassEntry(char *className);
-
-
-/*
- * Encodes the CIM schema and provider version
- * into an unsigned long, use
- * getProviderVersion & getCimVersion to decode
- */
-
-unsigned long
-cp_getVersion()
-{
-	return (MAKEVERSION(1.0, 2.3));
-}
-
-
-/*
- * The function will take CCIMObjectPath
- * and search the classNameTable[]
- * for a className match, and then
- * call the corresponding cp_enumInstance
- * for that provider
- */
-
-CCIMInstanceList*
-cp_enumInstances(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList	*instList = NULL;
-	int 			index = 0;
-	int    			error;
-
-	/* Check if ObjectPath is NULL before continuing */
-	if (pOP == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(ENUM_INSTANCES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* Object path is NOT NULL, so find the entry in the table */
-	index = FindClassEntry(pOP->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(ENUM_INSTANCES, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* OK, Find enumInstance */
-	instList = (*enumInstanceTable[index])(pOP);
-	return ((CCIMInstanceList*)instList);
-
-}  /* cp_enumInstances */
-
-/* creates an instance */
-
-/*
- * The function will take CCIMObjectPath & CCIMInstance
- * and search the classNameTable[]
- * for a className match, and then
- * call the corresponding cp_createInstance
- * for that provider
- */
-
-CCIMObjectPath*
-cp_createInstance(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	CCIMObjectPath *objPath = NULL;
-	int index = 0;
-	int error;
-
-	/* check if NULL before finding the Instance to create */
-	if (pInst == NULL) {
-	    util_handleError(CREATE_INSTANCE,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* find entry in the table */
-	index = FindClassEntry(pInst->mClassName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(CREATE_INSTANCE,
-		CIM_ERR_INVALID_CLASS, NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	objPath = (*createInstanceTable[index])(pOP, pInst);
-
-	return ((CCIMObjectPath*) objPath);
-
-} /* cp_createInstances */
-
-
-/*
- * returns an array of CCIMObjectPaths for the class
- * params:
- * char* - the classname to enum
- */
-
-CCIMObjectPathList*
-cp_enumInstanceNames(CCIMObjectPath* pOP)
-{
-	CCIMObjectPathList	*objList = NULL;
-	CCIMInstanceList	*instList = NULL;
-	int			error = 0;
-
-	/*
-	 * create an instance list which contains all of the
-	 * instances this provider will produce First check
-	 * for valid ObjectPath
-	 */
-	if (pOP == NULL) {
-	    util_handleError(ENUM_INSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	instList = cp_enumInstances(pOP);
-
-	if (instList == NULL) {
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	objList = cim_createObjectPathList(instList);
-
-	/*
-	 * we no longer need the instList so free
-	 * the memory allocated for it
-	 */
-
-	cim_freeInstanceList(instList);
-	return (objList);
-}
-
-/* get an instance */
-
-CCIMInstance*
-cp_getInstance(CCIMObjectPath* pOP)
-{
-	CCIMInstance* inst = NULL;
-	int	index = 0;
-	int	error;
-
-	/* Check if ObjectPath is NULL before continuing */
-	if (pOP == NULL) {
-	    util_handleError(GET_INSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* Object path is NOT NULL, so find the entry in the table */
-	index = FindClassEntry(pOP->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(GET_INSTANCE, CIM_ERR_INVALID_CLASS, NULL,
-		NULL, &error);
-	    return (NULL);
-	}
-
-	inst = (*getInstanceTable[index])(pOP);
-	return ((CCIMInstance *)inst);
-}
-
-/*
- * returns the specified property,
- * should return NULL if not found
- *
- * params:
- * CCIMObjectPath* - ObjectPath to get the property from
- * char* - The property name to get
- *
- */
-
-CCIMProperty*
-cp_getProperty(CCIMObjectPath *pOP, char *pPropName)
-{
-	CCIMProperty*	prop = NULL;
-	CCIMInstance*	inst = NULL;
-	int		error;
-
-	/* See if ObjectPath is OK */
-	if (pOP == NULL) {
-	    util_handleError(GET_PROPERTY, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* Make sure property name isn't NULL */
-	if (pPropName == NULL) {
-	    util_handleError(GET_PROPERTY, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* see if we have any instances which match the obj path */
-	inst = cp_getInstance(pOP);
-
-	/* check for valid instance */
-	if (inst == NULL) {
-	    util_handleError(GET_PROPERTY, CIM_ERR_FAILED,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* see if it has the specified property */
-	prop = cim_getProperty(inst, pPropName);
-
-	/* free memory allocated for the instance */
-	cim_freeInstance(inst);
-
-	/* return the property */
-	return ((CCIMProperty *)prop);
-}
-
-/*
- * Sets the property in the passed in
- * instance to the new values of the
- * passed in property
- *
- * params:
- * CCIMObjectPath* - the Object Path in which the property should be changed
- * CCIMProperty* - a property structure which contains the new values
- *
- * return:
- * cim_true if property was updated otherwise cim_false
- *
- *
- * The function will take CCIMObjectPath & CCIMProperty
- * and search the classNameTable[]
- * for a className match, and then
- * call the corresponding setProperty
- * for that provider
- */
-
-CIMBool
-cp_setProperty(CCIMObjectPath* pObjPath, CCIMProperty* pProp)
-{
-	CIMBool retVal;
-	int index = 0;
-	int	error;
-
-	if (pObjPath == NULL) {
-	    util_handleError(SET_PROPERTY, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	index = FindClassEntry(pObjPath->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(SET_PROPERTY, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	retVal = (*setPropertyTable[index])(pObjPath, pProp);
-	return ((CIMBool)retVal);
-}
-
-
-/* sets an instance */
-
-/*
- * The function will take CCIMObjectPath & CCIMInstance
- * and search the classNameTable[]
- * for a className match, and then
- * call the corresponding cp_setInstance
- * for that provider
- */
-
-CIMBool
-cp_setInstance(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	CIMBool retVal;
-	int index = 0;
-	int	error;
-
-	if (pOP == NULL) {
-	    util_handleError(SET_INSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	if (pInst == NULL) {
-	    util_handleError(SET_INSTANCE, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* get the index into the table */
-	index = FindClassEntry(pInst->mClassName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(SET_INSTANCE, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	retVal = (*setInstanceTable[index])(pOP, pInst);
-	return ((CIMBool)retVal);
-}
-
-
-/*
- * deletes an instance
- *
- * The function will take CCIMObjectPath
- * and search the classNameTable[]
- * for a className match, and then
- * call the corresponding cp_deleteInstance
- * for that provider
- */
-
-CIMBool
-cp_deleteInstance(CCIMObjectPath* pOP)
-{
-	CIMBool retVal;
-	int index = 0;
-	int	error;
-
-	/* Verify ObjectPath is NOT NULL */
-	if (pOP == NULL) {
-	    util_handleError(DELETE_INSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* find Entry in table */
-	index = FindClassEntry(pOP->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(DELETE_INSTANCE, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	retVal = (*deleteInstanceTable[index])(pOP);
-	return ((CIMBool)retVal);
-}
-
-/*
- * Invokes the method and returns the results
- *   The caller is responsible for freeing the
- * memory allocated for the returned object
- *
- *  params:
- * CCIMObjectPath* - An object path of the instance
- *		to invoke the function on
- *  char* - name of the method to invoke
- * CCIMPropertyList* - input parameters to the function
- * CCIMPropertyList* - input/output parameters to the function
- *
- * returns:
- * NULL if it failed otherwise a CCIMProperty*
- *    which represents the return value of the function
- */
-
-CCIMProperty*
-cp_invokeMethod(CCIMObjectPath* pOP, cimchar* pName,
-    CCIMPropertyList* pInParams, CCIMPropertyList* pInOutParams)
-{
-	CCIMProperty *prop;
-	int index = 0;
-	int error;
-
-	/* First check for valid ObjectPath */
-	if (pOP == NULL) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	/* find entry in the table */
-	index = FindClassEntry(pOP->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    util_handleError(INVOKE_METHOD, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return (NULL);
-	}
-
-	prop = (*cpInvokeMethodTable[index])
-	    (pOP, pName, pInParams, pInOutParams);
-
-	return ((CCIMProperty*)prop);
-}
-
-/*
- * cp_execQuery
- */
-
-CCIMInstanceList*
-cp_execQuery(CCIMObjectPath *pOP, char *selectList,
-    char *nonJoinExp, char *queryExp, char *queryType)
-{
-	CCIMInstanceList 	*instList = NULL;
-	int			index = 0;
-	int			error = 0;
-
-
-	/* First check for valid ObjectPath */
-	if (pOP == NULL) {
-	    util_handleError(EXEC_QUERY, CIM_ERR_INVALID_PARAMETER, NULL, NULL,
-		&error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* find entry in the table */
-	index = FindClassEntry(pOP->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    /* Set error exception with localized message */
-	    util_handleError(EXEC_QUERY, CIM_ERR_INVALID_CLASS, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-	instList = (*execQueryTable[index])(pOP, selectList, nonJoinExp,
-	    queryExp, queryType);
-
-	return (instList);
-}
-
-/*
- * cp_associators
- */
-
-CCIMInstanceList*
-cp_associators(CCIMObjectPath *pAssocName, CCIMObjectPath *pObjectName,
-    char *pResultClass, char *pRole, char *pResultRole)
-{
-	CCIMInstanceList 	*instList;
-	int			index = 0;
-	int			error = 0;
-
-	/* First check for valid ObjectPath */
-	if (pAssocName == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(ASSOCIATORS, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* find entry in the table */
-	index = FindAssocClassEntry(pAssocName->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    /* Set error exception with localized message */
-	    util_handleError(ASSOCIATORS, CIM_ERR_INVALID_CLASS, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Call the appropriate associator function. Let the specific function
-	 * in the c provider handle the checking for correctness of the
-	 * other parameters.
-	 */
-
-	instList = (*associatorsTable[index])(pAssocName, pObjectName,
-	    pResultClass, pRole, pResultRole);
-	return ((CCIMInstanceList *)instList);
-}
-
-/*
- * cp_associatorNames
- */
-
-CCIMObjectPathList*
-cp_associatorNames(CCIMObjectPath *pAssocName, CCIMObjectPath *pObjectName,
-    char *pResultClass, char *pRole, char *pResultRole)
-{
-	CCIMObjectPathList 	*objList;
-	int			index = 0;
-	int			error = 0;
-
-	/* First check for valid ObjectPath */
-	if (pAssocName == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(ASSOCIATORS, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/* find entry in the table */
-	index = FindAssocClassEntry(pAssocName->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    /* Set error exception with localized message */
-	    util_handleError(ASSOCIATORS, CIM_ERR_INVALID_CLASS, NULL,
-		NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call the appropriate associatorName function. Let the specific
-	 * function in the c provider handle the checking for correctness of
-	 * the other parameters.
-	 */
-
-	objList = (*associatorNamesTable[index])(pAssocName, pObjectName,
-	    pResultClass, pRole, pResultRole);
-	return ((CCIMObjectPathList *)objList);
-}
-
-/*
- * cp_references
- */
-
-CCIMInstanceList*
-cp_references(CCIMObjectPath *pAssocName, CCIMObjectPath *pObjectName,
-    char *pRole)
-{
-	CCIMInstanceList 	*instList;
-	int			index = 0;
-	int			error = 0;
-
-	/* First check for valid ObjectPath */
-	if (pAssocName == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(REFERENCES, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* find entry in the table */
-	index = FindAssocClassEntry(pAssocName->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    /* Set error exception with localized message */
-	    util_handleError(REFERENCES, CIM_ERR_INVALID_CLASS, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Call the appropriate references function. Let the specific function
-	 * in the c provider handle the checking for correctness of the
-	 * other parameters.
-	 */
-
-	instList = (*referencesTable[index])(pAssocName, pObjectName, pRole);
-	return ((CCIMInstanceList *)instList);
-}
-
-/*
- * InParam: Class Name
- * Returns: Index into Name Table
- * If it hit libWBEMdisk, then we
- * have hit bottom, return err (-1)
- */
-
-static int
-FindClassEntry(char *className)
-{
-	int i = 0;
-
-	while (strcasecmp(className, classNameTable[i])) {
-		if (!strcasecmp(classNameTable[i], "libWBEMdisk")) {
-			i = -1;
-			break;
-		}
-		i++;
-	}
-
-	return (i);
-}
-/*
- * InParam: Class Name
- * Returns: Index into Name Table
- * If it hit libWBEMdisk, then we
- * have hit bottom, return err (-1)
- */
-
-static int
-FindAssocClassEntry(char *className)
-{
-	int i = 0;
-
-	while (strcasecmp(className, assocclassNameTable[i])) {
-		if (!strcasecmp(assocclassNameTable[i], "libWBEMdisk")) {
-			i = -1;
-			break;
-		}
-		i++;
-	}
-
-	return (i);
-}
-
-/*
- * cp_referenceNames
- */
-
-CCIMObjectPathList*
-cp_referenceNames(CCIMObjectPath *pAssocName, CCIMObjectPath *pObjectName,
-    char *pRole)
-{
-	CCIMObjectPathList 	*objList;
-	int			index = 0;
-	int			error = 0;
-
-	/* First check for valid ObjectPath */
-	if (pAssocName == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(REFERENCE_NAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/* find entry in the table */
-	index = FindAssocClassEntry(pAssocName->mName);
-
-	/* check for error (-1) */
-	if (index < 0) {
-	    /* Set error exception with localized message */
-	    util_handleError(REFERENCE_NAMES, CIM_ERR_INVALID_CLASS,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call the appropriate referenceName function. Let the specific
-	 * function in the c provider handle the checking for correctness of
-	 * the other parameters.
-	 */
-
-	objList = (*referenceNamesTable[index])(pAssocName, pObjectName, pRole);
-	return ((CCIMObjectPathList *)objList);
-}
-
-CIMBool
-cp_isAssociatorProvider(CCIMObjectPath *pOp)
-{
-
-	int 		index = 0;
-	int			error = 0;
-
-	/*
-	 * If the object path coming in matches any in the associator table,
-	 * return true, otherwise, return false.
-	 */
-
-	/* First check for valid ObjectPath */
-	if (pOp == NULL) {
-	    /* Set error exception with localized message */
-	    util_handleError(REFERENCE_NAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return (cim_false);
-	}
-
-	/* find entry in the table */
-	index = FindAssocClassEntry(pOp->mName);
-
-	if (index < 0) {
-	    return (cim_false);
-	}
-	return (cim_true);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/lib/localFunc.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/*
- * this is a place holder file
- * for the following functions.
- * They should never be called
- */
-/* everything is in here */
-
-#include <cimapi.h>
-#include <cp_associator.h>
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_libWBEMdisk(CCIMObjectPath* pOP)
-{
-	return ((CCIMInstanceList*) NULL);
-}
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_libWBEMdisk(CCIMObjectPath* pOP)
-{
-	return ((CCIMObjectPathList*) NULL);
-}
-
-/* creates an instance */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_libWBEMdisk(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	return ((CCIMObjectPath*)NULL);
-}
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_libWBEMdisk(CCIMObjectPath* pOP, cimchar* pName,
-	CCIMPropertyList* pInParams,
-	CCIMPropertyList* pInOutParams)
-{
-	return ((CCIMProperty*)NULL);
-}
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_libWBEMdisk(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	return (cim_false);
-}
-
-/* ARGSUSED */
-CCIMInstance *
-cp_getInstance_libWBEMdisk(CCIMObjectPath * pOP)
-{
-	return ((CCIMInstance *)NULL);
-}
-
-
-/* deletes an instance */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_libWBEMdisk(CCIMObjectPath *pOP)
-{
-	return (cim_false);
-}
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_libWBEMdisk(CCIMObjectPath* pObjPath, CCIMProperty* pProp)
-{
-	return (cim_false);
-}
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_libWBEMdisk(CCIMObjectPath *pOP, char *selectList,
-	char *nonJoinExp, char *queryExp, char *queryType)
-{
-	return ((CCIMInstanceList *) NULL);
-}
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_associators_libWBEMdisk(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole)
-{
-	return ((CCIMInstanceList *) NULL);
-}
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_associatorNames_libWBEMdisk(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, char *pResultClass, char *pRole,
-	char *pResultRole)
-{
-	return ((CCIMObjectPathList *) NULL);
-}
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_references_libWBEMdisk(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, char *pRole)
-{
-	return ((CCIMInstanceList *) NULL);
-}
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_referenceNames_libWBEMdisk(CCIMObjectPath *pAssocName,
-    CCIMObjectPath *pObjectName, char *pRole)
-{
-	return ((CCIMObjectPathList *) NULL);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/lib/mapfile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-#
-# Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# MAPFILE HEADER START
-#
-# WARNING:  STOP NOW.  DO NOT MODIFY THIS FILE.
-# Object versioning must comply with the rules detailed in
-#
-#	usr/src/lib/README.mapfiles
-#
-# You should not be making modifications here until you've read the most current
-# copy of that file. If you need help, contact a gatekeeper for guidance.
-#
-# MAPFILE HEADER END
-#
-
-$mapfile_version 2
-
-SYMBOL_VERSION SUNWprivate_1.1 {
-    global:
-	cp_associatorNames ;
-	cp_associators ;
-	cp_createInstance ;
-	cp_deleteInstance ;
-	cp_enumInstanceNames ;
-	cp_enumInstances ;
-	cp_execQuery ;
-	cp_getInstance ;
-	cp_getLastError ;
-	cp_getProperty ;
-	cp_getVersion ;
-	cp_invokeMethod ;
-	cp_isAssociatorProvider ;
-	cp_referenceNames ;
-	cp_references ;
-	cp_setInstance ;
-	cp_setProperty ;
-    local:
-	*;
-};
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/logicaldisk/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS		= Solaris_LogicalDisk.o 
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL	=	$(ROOTWBEMINC) \
-		$(SRC)/lib/libdiskmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -Dpic -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_PICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _logicaldisk.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-
-install:	all
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/logicaldisk/Solaris_LogicalDisk.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,425 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "logicaldisk_descriptors.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-
-#define	DISK_GETINSTANCE	"LOGICAL_DISK,GET_INSTANCE"
-#define	DISK_ENUMINSTANCES	"LOGICAL_DISK,ENUM_INSTANCES"
-#define	DISK_ENUMINSTANCENAMES	"LOGICAL_DISK,ENUM_INSTANCENAMES"
-#define	DISK_CREATEINSTANCE	"LOGICAL_DISK,CREATE_INSTANCE"
-#define	DISK_DELETEINSTANCE	"LOGICAL_DISK,DELETE_INSTANCE"
-#define	DISK_SETINSTANCE	"LOGICAL_DISK,SET_INSTANCE"
-#define	DISK_GETPROPERTY	"LOGICAL_DISK,GET_PROPERTY"
-#define	DISK_SETPROPERTY	"LOGICAL_DISK,SET_PROPERTY"
-#define	DISK_INVOKEMETHOD	"LOGICAL_DISK,INVOKE_METHOD"
-#define	DISK_EXECQUERY		"LOGICAL_DISK,EXEC_QUERY"
-
-/*
- * Solaris_LogicalDisk provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the CIMOM as the caller.
- */
-
-
-/*
- * Name: cp_getInstance_Solaris_LogicalDisk
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_LogicalDisk(CCIMObjectPath* pOP)
-{
-	CCIMInstance* 		inst = NULL;
-	CCIMPropertyList* 	pCurPropList;
-	dm_descriptor_t		logicaldisk_descriptor;
-	char			*name;
-	int			error;
-
-
-	if (pOP == NULL ||
-	    pOP->mKeyProperties == NULL) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = pOP->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0 || name == NULL) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	logicaldisk_descriptor =
-	    dm_get_descriptor_by_name(DM_MEDIA, name, &error);
-
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-
-	/* Turn this descriptor in to a disk drive instance */
-
-	inst = logicaldisk_descriptor_toCCIMInstance(
-	    hostName, logicaldisk_descriptor, LOGICAL_DISK, &error);
-	dm_free_descriptor(logicaldisk_descriptor);
-
-	if (error != 0) {
-	    util_handleError(DISK_GETINSTANCE, CIM_ERR_FAILED,
-		LOGICALDISK_DESC_TO_INSTANCE_FAILURE, NULL,
-		&error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_LogicalDisk
- *
- * Description: Returns a list of instances which if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstanceList * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_LogicalDisk(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList* 	instList = NULL;
-	dm_descriptor_t		*logicaldisk_descriptorp;
-	int			error;
-	int			filter[2];
-
-	filter[0] = DM_MT_FIXED;
-	filter[1] = DM_FILTER_END;
-
-	logicaldisk_descriptorp = dm_get_descriptors(DM_MEDIA, filter, &error);
-
-	if (logicaldisk_descriptorp == NULL ||
-	    logicaldisk_descriptorp[0] == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	if (error != 0) {
-	    util_handleError(DISK_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* convert drive descriptors to CCIMInstanceList */
-	instList = logicaldisk_descriptors_toCCIMInstanceList(LOGICAL_DISK,
-	    logicaldisk_descriptorp, &error);
-	dm_free_descriptors(logicaldisk_descriptorp);
-
-	if (error != 0) {
-	    util_handleError(DISK_ENUMINSTANCES, CIM_ERR_FAILED,
-		LOGICALDISK_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_LogicalDisk
- *
- * Description: Returns a list of instances which if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMObjectPathList * if found  Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_LogicalDisk(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(DISK_ENUMINSTANCENAMES, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_LogicalDisk(pOP);
-
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_LogicalDisk is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_LogicalDisk(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(DISK_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath*)NULL);
-}
-
-
-/*
- * Deleting an instance of a Solaris_LogicalDisk is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_LogicalDisk(CCIMObjectPath* pInst)
-{
-
-	int	error;
-
-	util_handleError(DISK_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_LogicalDisk
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_LogicalDisk(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(DISK_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_LogicalDisk(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-/*
- * Setting an instance of a Solaris_LogicalDisk is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_LogicalDisk(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-
-	int	error;
-
-	util_handleError(DISK_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Setting a property of a Solaris_LogicalDisk is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_LogicalDisk(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-
-	int	error;
-
-	util_handleError(DISK_SETPROPERTY, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/* invokeMethod function dispatches to the various method implementations */
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_LogicalDisk(CCIMObjectPath* op, cimchar* methodName,
-    CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty*)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_LogicalDisk
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *      CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *      information on the class for which to find the instances.
- *
- *      selectList - Not used
- *      nonJoinExp - Not used
- *
- * Returns:
- *      CCIMInstanceList * if found. Otherwise, NULL.
- */
-
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_LogicalDisk(CCIMObjectPath *op, cimchar *selectList,
-    cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_LogicalDisk(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex,
-		&error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(DISK_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/mpxio/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-OBJECTS		= Solaris_MPXIOGroup.o 
-
-LINT_OBJS	= $(OBJECTS:%.o=%.ln)
-
-GENERAL	=	$(ROOTWBEMINC) \
-		$(SRC)/lib/libdiskmgt/common \
-		$(SRC)/cmd/wbem/provider/c/include
-
-CPPFLAGS	+= -I. $(GENERAL:%=-I%) -D_REENTRANT -Dpic -D_TS_ERRNO
-
-CFLAGS		+= $(XREGSFLAG) $(C_PICFLAGS)
-
-LINTFLAGS	+= -um
-LINTLIBS	= $(LDLIBS.cmd)
-
-POFILE		= _mpxio.po
-MSGFILES	= $(OBJECTS:%.o=%.i)
-
-CLOBBERFILES	+= $(POFILE)
-
-.KEEP_STATE:
-
-all:		$(OBJECTS)
-
-install:	all
-
-lint: $(LINT_OBJS)
-	$(LINT.c) $(LINTFLAGS) $(LINT_OBJS) $(LINTLIBS)
-
-clean:
-		$(RM) $(OBJECTS) $(LINT_OBJS) $(MSGFILES)
-
-check:
-		$(CSTYLE) -p -P $(OBJECTS:%.o=%.c) *.h
-		$(HDRCHK) *.h
-
-catalog:	$(POFILE)
-
-$(POFILE):	$(MSGFILES)
-	$(BUILDPO.msgfiles)
-
-include $(SRC)/cmd/Makefile.targ
-include $(SRC)/Makefile.msg.targ
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/mpxio/Solaris_MPXIOGroup.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,432 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <unistd.h>
-#include <netdb.h>
-#include <errno.h>
-
-#include "util.h"
-#include "cimKeys.h"
-#include "ctrl_descriptors.h"
-#include "providerNames.h"
-#include "messageStrings.h"
-#include "mpxiogroup_descriptors.h"
-#include "Solaris_MPXIOGroup.h"
-
-#define	MPXIO_GETINSTANCE	"MPXIO_GROUP,GET_INSTANCE"
-#define	MPXIO_ENUMINSTANCES	"MPXIO_GROUP,ENUM_INSTANCES"
-#define	MPXIO_ENUMINSTANCENAMES	"MPXIO_GROUP,ENUM_INSTANCENAMES"
-#define	MPXIO_CREATEINSTANCE	"MPXIO_GROUP,CREATE_INSTANCE"
-#define	MPXIO_DELETEINSTANCE	"MPXIO_GROUP,DELETE_INSTANCE"
-#define	MPXIO_SETINSTANCE	"MPXIO_GROUP,SET_INSTANCE"
-#define	MPXIO_GETPROPERTY	"MPXIO_GROUP,GET_PROPERTY"
-#define	MPXIO_SETPROPERTY	"MPXIO_GROUP,SET_PROPERTY"
-#define	MPXIO_INVOKEMETHOD	"MPXIO_GROUP,INVOKE_METHOD"
-#define	MPXIO_EXECQUERY		"MPXIO_GROUP,EXEC_QUERY"
-
-
-/*
- * Solaris_MPXIOGroup provider
- *
- * It is important to note that all memory allocated by these functions
- * and passed to the CIMOM, is freed by the CIMOM as the caller.
- */
-
-
-/*
- * Name: cp_getInstance_Solaris_MPXIOGroup
- *
- * Description: Returns an instance which matches the passed in object path
- * if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstance * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstance*
-cp_getInstance_Solaris_MPXIOGroup(CCIMObjectPath* pOP)
-{
-	CCIMInstance* 		inst = NULL;
-	CCIMPropertyList* 	pCurPropList;
-	dm_descriptor_t		mpxioctrl_descriptor;
-	char			*name;
-	int			error;
-
-	if (pOP == NULL ||
-	    pOP->mKeyProperties == NULL) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER,
-		NULL, NULL, &error);
-	    return ((CCIMInstance *)NULL);
-	}
-
-	pCurPropList = pOP->mKeyProperties;
-	name = (cimchar *)util_getKeyValue(pCurPropList, string, DEVICEID,
-	    &error);
-
-	if (error != 0 || name == NULL) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	mpxioctrl_descriptor =
-	    dm_get_descriptor_by_name(DM_CONTROLLER, name, &error);
-
-	/*
-	 * Not found. Return a null instance.
-	 */
-
-	if (error == ENODEV) {
-	    return ((CCIMInstance *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_FAILED,
-		DM_GET_DESC_BYNAME_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	/* Turn this descriptor in to a mpxio group instance */
-
-	inst = mpxiogroup_descriptor_toCCIMInstance(mpxioctrl_descriptor,
-	    MPXIO_GROUP, &error);
-	dm_free_descriptor(mpxioctrl_descriptor);
-
-	if (error != 0) {
-	    util_handleError(MPXIO_GETINSTANCE, CIM_ERR_FAILED,
-		MPXIOCTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstance*)NULL);
-	}
-
-	return (inst);
-}
-
-/*
- * Name: cp_enumInstances_Solaris_MPXIOGroup
- *
- * Description: Returns a list of instances if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMInstanceList * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_enumInstances_Solaris_MPXIOGroup(CCIMObjectPath* pOP)
-{
-	CCIMInstanceList* 	instList = NULL;
-	dm_descriptor_t		*mpxioctrl_descriptorp;
-	int			error;
-	int			filter[1];
-
-	filter[0] = DM_FILTER_END;
-
-	mpxioctrl_descriptorp = dm_get_descriptors(DM_CONTROLLER, filter,
-	    &error);
-
-	/*
-	 * If no devices, return NULL. CIMOM expects NULL. Do not set
-	 * last error. If set, the CIMOM will assume an error and
-	 * throw an exception.
-	 */
-
-	if (mpxioctrl_descriptorp == NULL ||
-	    mpxioctrl_descriptorp[0] == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	if (error != 0) {
-	    util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		DM_GET_DESCRIPTORS, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/* convert controller to CCIMInstanceList */
-	instList = mpxiogroup_descriptors_toCCIMInstanceList(MPXIO_GROUP,
-	    mpxioctrl_descriptorp, &error);
-	dm_free_descriptors(mpxioctrl_descriptorp);
-
-	if (error != 0) {
-	    util_handleError(MPXIO_ENUMINSTANCES, CIM_ERR_FAILED,
-		MPXIOCTRL_DESC_TO_INSTANCE_FAILURE, NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	return (instList);
-}
-
-/*
- * Name: cp_enumInstanceNames_Solaris_MPXIOGroup
- *
- * Description: Returns a list of instances if found.
- *
- * Parameters:
- *      pOP - An CCIMObjectPath * which contains the information on
- *      the class for which to find the instance.
- * Returns:
- *      CCIMObjectPathList * if matched instance is found. Otherwise, NULL.
- */
-
-/* ARGSUSED */
-CCIMObjectPathList*
-cp_enumInstanceNames_Solaris_MPXIOGroup(CCIMObjectPath * pOP) {
-
-	CCIMInstanceList	*instList = NULL;
-	CCIMObjectPathList	*objList = NULL;
-	int			error;
-
-	if (pOP == NULL) {
-	    util_handleError(MPXIO_ENUMINSTANCENAMES,
-		CIM_ERR_INVALID_PARAMETER, NULL, NULL, &error);
-	    return ((CCIMObjectPathList *)NULL);
-	}
-
-	/*
-	 * Call in to enumInstances and then convert the instance list in
-	 * to an object list.
-	 */
-
-	instList = cp_enumInstances_Solaris_MPXIOGroup(pOP);
-	if (instList != NULL) {
-	    objList = cim_createObjectPathList(instList);
-	    cim_freeInstanceList(instList);
-	}
-
-	return (objList);
-}
-
-/*
- * Creating an instance of a Solaris_MPXIOGroup is not supported.
- */
-
-/* ARGSUSED */
-CCIMObjectPath*
-cp_createInstance_Solaris_MPXIOGroup(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-	int	error;
-
-	util_handleError(MPXIO_CREATEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return ((CCIMObjectPath*)NULL);
-}
-
-
-/*
- * Deleting an instance of a Solaris_MPXIOGroup is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_deleteInstance_Solaris_MPXIOGroup(CCIMObjectPath* pInst)
-{
-
-	int	error;
-
-	util_handleError(MPXIO_DELETEINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * Name: cp_getProperty_Solaris_MPXIOGroup
- *
- * Description: Returns the property requested, if found.
- *
- * Parameters:
- *	pOP - An CCIMObjectPath * which contains the information on
- *	the class for which to find the instances.
- * Returns:
- *	CCIMProperty * if found.
- */
-
-/* ARGSUSED */
-CCIMProperty	*
-cp_getProperty_Solaris_MPXIOGroup(CCIMObjectPath *pOP,
-    char *pPropName)
-{
-
-	CCIMProperty	*prop = NULL;
-	CCIMInstance	*inst = NULL;
-	int		error = 0;
-
-	if (pOP == NULL) {
-	    util_handleError(MPXIO_GETPROPERTY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMProperty *)NULL);
-	}
-
-	inst = cp_getInstance_Solaris_MPXIOGroup(pOP);
-	if (inst == NULL) {
-	    return ((CCIMProperty *)NULL);
-	}
-
-	prop = cim_getProperty(inst, pPropName);
-	cim_freeInstance(inst);
-	return (prop);
-}
-/*
- * Setting an instance of a Solaris_MPXIOGroup is not supported.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setInstance_Solaris_MPXIOGroup(CCIMObjectPath* pOP, CCIMInstance* pInst)
-{
-
-	int	error;
-
-	util_handleError(MPXIO_SETINSTANCE, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-
-/*
- * This provider cannot set a property on a Solaris_MPXIOGroup object.
- */
-
-/* ARGSUSED */
-CIMBool
-cp_setProperty_Solaris_MPXIOGroup(CCIMObjectPath* pOP, CCIMProperty* pProp)
-{
-
-	int	error;
-
-	util_handleError(MPXIO_SETPROPERTY, CIM_ERR_NOT_SUPPORTED, NULL,
-	    NULL, &error);
-	return (cim_false);
-}
-/*
- * No methods on this class.
- */
-
-/* ARGSUSED */
-CCIMProperty*
-cp_invokeMethod_Solaris_MPXIOGroup(CCIMObjectPath* op, cimchar* methodName,
-    CCIMPropertyList* inParams, CCIMPropertyList* outParams)
-{
-	CCIMProperty	*retVal = (CCIMProperty *)NULL;
-	return (retVal);
-}
-
-/*
- * Name: cp_execQuery_Solaris_MPXIOGroup
- *
- * Description:
- * Returns an instance list which matches the query if any are found.
- *
- * Parameters:
- *      CCIMObjectPath *op - An CCIMObjectPath * which contains the
- *      information on the class for which to find the instances.
- *
- *      selectList - Not used
- *      nonJoinExp - Not used
- *
- * Returns:
- *      CCIMInstanceList * if found. Otherwise, NULL.
- */
-
-/*
- * Currently, there is no WQL parser for the C providers. As a result,
- * what is returned to the CIMOM is a list of instances with
- * a NULL value at the beginning of the list. This NULL value indicates
- * to the CIMOM that it must do the filtering for the client.
- */
-
-/* ARGSUSED */
-CCIMInstanceList*
-cp_execQuery_Solaris_MPXIOGroup(CCIMObjectPath *op, cimchar *selectList,
-    cimchar *nonJoinExp, cimchar *queryExp, int queryType)
-{
-	CCIMInstanceList	*instList = NULL;
-	CCIMInstanceList	*result;
-	CCIMInstance		*emptyInst;
-	CCIMException		*ex;
-	int			error;
-
-	if (op == NULL) {
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_INVALID_PARAMETER, NULL,
-		NULL, &error);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	instList = cp_enumInstances_Solaris_MPXIOGroup(op);
-
-	if (instList == NULL) {
-	    return ((CCIMInstanceList *)NULL);
-	}
-	/*
-	 * Create a null instance and add it to the beginning
-	 * of the list to indicate to the CIMOM that no filtering
-	 * was done.
-	 */
-
-	emptyInst = cim_createInstance("");
-	if (emptyInst == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_createInstanceList();
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		CREATE_INSTANCE_LIST_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	result = cim_addInstance(result, emptyInst);
-	if (result == NULL) {
-	    ex = cim_getLastError();
-	    util_handleError(MPXIO_EXECQUERY, CIM_ERR_FAILED,
-		ADD_INSTANCE_FAILURE, ex, &error);
-	    cim_freeInstance(emptyInst);
-	    cim_freeInstanceList(instList);
-	    return ((CCIMInstanceList *)NULL);
-	}
-
-	/*
-	 * Since copying the original list to the new list will
-	 * leave no way to free the original list, manually
-	 * concatenate the original list to the new one.
-	 */
-
-	result->mNext = instList;
-	return (result);
-}
--- a/usr/src/cmd/wbem/provider/c/wbem_disk/mpxio/Solaris_MPXIOGroup.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_SOLARIS_MPXIOGROUP_H_
-#define	_SOLARIS_MPXIOGROUP_H_
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <cimapi.h>
-#include <cimprovider.h>
-#include <cimomhandle.h>
-#include <cimlogsvc.h>
-
-#include "libdiskmgt.h"
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _SOLARIS_MPXIOGROUP_H_ */
--- a/usr/src/cmd/wbem/provider/com/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# cmd/wbem/provider/com/Makefile
-#
-# Copyright (c) 2001 Sun Microsystems, Inc.  
-# All Rights Reserved.
-#
-
-# include global definitions
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-sparc_SUBDIRS =
-
-i386_SUBDIRS =
-
-ppc_SUBDIRS =
-
-COMMON_SUBDIRS= sun
-
-SUBDIRS=	$(COMMON_SUBDIRS) $($(ARCH)_SUBDIRS)
-
-all:=		TARGET=	all
-install:=	TARGET=	install
-clean:=		TARGET=	clean
-clobber:=	TARGET=	clobber
-check:=		TARGET= check
-
-.KEEP_STATE:
-
-all install check clean clobber : $(SUBDIRS)
-
-$(SUBDIRS): FRC
-	cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
--- a/usr/src/cmd/wbem/provider/com/sun/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# cmd/wbem/provider/com/sun/Makefile
-#
-# Copyright (c) 2001 Sun Microsystems, Inc.  
-# All rights reserved.
-#
-
-# include global definitions
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-sparc_SUBDIRS =
-
-i386_SUBDIRS =
-
-ppc_SUBDIRS =
-
-COMMON_SUBDIRS= wbem
-
-SUBDIRS=	$(COMMON_SUBDIRS) $($(ARCH)_SUBDIRS)
-
-all:=		TARGET=	all
-install:=	TARGET=	install
-clean:=		TARGET=	clean
-clobber:=	TARGET=	clobber
-check:=		TARGET= check
-
-.KEEP_STATE:
-
-all install check clean clobber: $(SUBDIRS)
-
-$(SUBDIRS): FRC
-	cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# cmd/wbem/provider/com/sun/wbem/Makefile
-#
-# Copyright (c) 2001 Sun Microsystems, Inc.  
-# All Rights Reserved.
-#
-
-# include global definitions
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-sparc_SUBDIRS =
-
-i386_SUBDIRS =
-
-ppc_SUBDIRS =
-
-COMMON_SUBDIRS= solarisprovider
-
-SUBDIRS=	$(COMMON_SUBDIRS) $($(ARCH)_SUBDIRS)
-
-all:=		TARGET=	all
-install:=	TARGET=	install
-clean:=		TARGET=	clean
-clobber:=	TARGET=	clobber
-check:= 	TARGET= check
-
-.KEEP_STATE:
-
-all install check clean clobber: $(SUBDIRS)
-
-$(SUBDIRS): FRC
-	cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# cmd/wbem/provider/com/sun/wbem/solarisprovider/Makefile
-#
-# Copyright (c) 2001 Sun Microsystems, Inc.  
-# All Rights Reserved.
-#
-
-# include global definitions
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-sparc_SUBDIRS =
-
-i386_SUBDIRS =
-
-ppc_SUBDIRS =
-
-COMMON_SUBDIRS= srm
-
-SUBDIRS=	$(COMMON_SUBDIRS) $($(ARCH)_SUBDIRS)
-
-all:=		TARGET=	all
-install:=	TARGET=	install
-clean:=		TARGET=	clean
-clobber:=	TARGET=	clobber
-check:=		TARGET= check
-
-.KEEP_STATE:
-
-all install check clean clobber: $(SUBDIRS)
-
-$(SUBDIRS): FRC
-	cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/ActiveProjectModel.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ActiveProjectModel.java
- */
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-import java.util.LinkedHashMap;
-
-
-/**
- * Data model of a Solaris project.
- * It encapsulates a CIM instance of the Solaris_ActiveProject class.
- * @author Sun Microsystems
- */
-
-public class ActiveProjectModel extends SRMProviderDataModel
-	implements SRMProviderProperties, Solaris_ActiveProjectProperties {
-
-    /**
-     * Construct an active project model and set the project name property
-     * to projName.
-     * @param   projName the project name
-     */
-    public ActiveProjectModel(String projName) {
-	name = projName;
-    }
-
-    /**
-     * Returns the string value of this object
-     */
-    public String toString() {
-	return "Project: " + name + "\n" + super.toString();
-    }
-
-    protected void setOpPropertiesVector() {
-	opProperties.add(new CIMProperty(CSCREATIONCLASSNAME,
-	    new CIMValue(SOLARIS_COMPUTERSYSTEM)));
-	opProperties.add(new CIMProperty(CSNAME, new CIMValue(csName)));
-	opProperties.add(new CIMProperty(OSCREATIONCLASSNAME,
-	    new CIMValue(SOLARIS_OPERATINGSYSTEM)));
-	opProperties.add(new CIMProperty(OSNAME, new CIMValue(osName)));
-	opProperties.add(new CIMProperty(PROJECTNAME, new CIMValue(name)));
-    }
-
-    protected void setCIMInstance(boolean newInstance) {
-	setStrProp(newInstance, CSCREATIONCLASSNAME, SOLARIS_COMPUTERSYSTEM);
-	setStrProp(newInstance, CSNAME, csName);
-	setStrProp(newInstance, OSCREATIONCLASSNAME, SOLARIS_OPERATINGSYSTEM);
-	setStrProp(newInstance, OSNAME, osName);
-	setStrProp(newInstance, CREATIONCLASSNAME, SOLARIS_ACTIVEPROJECT);
-    }
-
-    protected void initKeyValTable() {
-	keyValTab = new LinkedHashMap(2);
-	keyValTab.put(PROJECTID_KEY, new SetUI32Prop(PROJECTID));
-	keyValTab.put(PROJECTNAME_KEY, new SetStringProp(PROJECTNAME));
-    }
-
-} // end class ActiveProjectModel
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/ActiveUserModel.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ActiveUserModel.java
- */
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-import java.util.LinkedHashMap;
-
-
-/**
- * Data model of an active user that is actively running on an OperatingSystem.
- * It encapsulates a CIM instance of the Solaris_ActiveUser class.
- * @author Sun Microsystems
- */
-public class ActiveUserModel extends SRMProviderDataModel
-	implements SRMProviderProperties, Solaris_ActiveUserProperties {
-
-    /**
-     * Construct an active user model and set the user id property
-     * to uidStr.
-     * @param	uidStr the user id as a string
-     */
-    public ActiveUserModel(String uidStr) {
-	name = uidStr;
-    }
-
-    /**
-     * Returns the string value of this object
-     */
-    public String toString() {
-	return "\nUser ID " + name + '\n' + super.toString();
-    }
-
-    protected void setCIMInstance(boolean newInstance) {
-	setStrProp(newInstance, CSCREATIONCLASSNAME, SOLARIS_COMPUTERSYSTEM);
-	setStrProp(newInstance, CSNAME, csName);
-	setStrProp(newInstance, OSCREATIONCLASSNAME, SOLARIS_OPERATINGSYSTEM);
-	setStrProp(newInstance, OSNAME, osName);
-	setStrProp(newInstance, CREATIONCLASSNAME, SOLARIS_ACTIVEUSER);
-    }
-
-    protected void setOpPropertiesVector() {
-	opProperties.add(new CIMProperty(CSCREATIONCLASSNAME,
-	    new CIMValue(SOLARIS_COMPUTERSYSTEM)));
-	opProperties.add(new CIMProperty(CSNAME, new CIMValue(csName)));
-	opProperties.add(new CIMProperty(OSCREATIONCLASSNAME,
-	    new CIMValue(SOLARIS_OPERATINGSYSTEM)));
-	opProperties.add(new CIMProperty(OSNAME, new CIMValue(osName)));
-	opProperties.add(new CIMProperty(USERID, new CIMValue(name)));
-    }
-    
-    protected void initKeyValTable() {
-	keyValTab = new LinkedHashMap(2);
-	keyValTab.put(USERID_KEY, new SetUI32Prop(USERID));	  
-	keyValTab.put(USERNAME_KEY, new SetStringProp(USERNAME));	  
-    }
-
-} // end class ActiveUserModel
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/DataModel.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,552 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * DataModel.java
- */
-
-package com.sun.wbem.solarisprovider.srm;
-
-import java.util.HashMap;
-import java.util.Vector;
-import java.util.Iterator;
-
-
-/**
- * Aggregation of all users, projects, and sets metrics data.
- * Implements the singleton pattern
- * @author Sun Microsystems, Inc.
- */
-class DataModel {
-
-    private static DataModel		dm;
-    private static SRMDataReader	dr;
-    private static boolean		doAlive;
-    /** 
-     * syncObject guards the calls of SRMDataReader methods between the 
-     * current data model thread and the KeepAlive thread.
-     */
-    private static Object		syncObject;
-    /** 
-     * rdsKeepAliveTimeout: how long the KeepAlive thread should keep
-     * the connection opened.
-     */ 
-    private static int rdsKeepAliveTimeout = 30 * 60000;
-    private static KeepAlive	ka;
-    private static boolean	kaError;
-    private static boolean  	msacct = false;
-
-    private static final int PROCESSESHASHSIZE = 500;
-    private static final int USERPROCSHASHSIZE = 200;
-    private static final int PROJPROCSHASHSIZE = 100;
-    private static final int USERSHASHSIZE = 200;
-    private static final int PROJSHASHSIZE = 100;
-    private static final int L_PRC_SI = 1;
-    private static final int L_USR_SI = 2;
-    private static final int L_PRJ_SI = 3;
-    private static final int L_AC_USR = 4;
-    private static final int L_AC_PRJ = 5;
-    private static final int L_SYSTEM = 6;
-    private static final int L_ALL  = 20;
-
-    // RDS exec command
-    private static final String RDSPGM = "/usr/sadm/lib/wbem/rds";
-    
-    private static final int	TIMEOUTIDX  = 3;
-    private static final int	INTERVALIDX = 5;
-
-    // RDS commands
-    private static final String CMD_GETALL	= "-pUuJjS";
-    private static final String CMD_GETPL	= "-p";
-    private static final String CMD_GETUL	= "-u";
-    private static final String CMD_GETAUL	= "-U";
-    private static final String CMD_GETJL	= "-j";
-    private static final String CMD_GETAJL	= "-J";
-    private static final String CMD_GETASL	= "-S";
-    private static final String CMD_ALIVE	= "alive";
-    private static final String CMD_EXIT	= "exit";
-
-    private static boolean updating; // set if udpdateing is in progress
-    private static boolean running;  // set if the rds is running
-
-    private int rdsTimeout;
-    private int rdsInterval;
-    private String rdsArgs[];
-    protected HashMap processes	= new HashMap(PROCESSESHASHSIZE);
-    protected HashMap users	= new HashMap(USERSHASHSIZE);
-    protected HashMap userprocs	= new HashMap(USERPROCSHASHSIZE);
-    protected HashMap projs	= new HashMap(PROJSHASHSIZE);
-    protected HashMap projprocs	= new HashMap(PROJPROCSHASHSIZE);
-    protected SystemDataModel sdm = new  SystemDataModel();
-
-    /**
-     * Default constructor
-     */
-    private DataModel() {
-    }
-
-    /**
-     * Should be used to obtain the singleton instance of this class
-     * @return	the singleton instance of this class
-     */
-    static DataModel getHandle(Object syncObj) {
-
-    	if (dm == null) {
-	    dm = new DataModel();
-	    dr = new SRMDataReader(dm);
-	    syncObject = syncObj;
-	    try {
-	    	if (Util.propertyKEEPALIVETIMEOUT != null) {
-	    	    rdsKeepAliveTimeout =
-		    	Integer.parseInt(Util.propertyKEEPALIVETIMEOUT);
-	    	}
-	    	if (Util.propertyMSACCT != null) {
-	    	    msacct = Util.propertyMSACCT.equalsIgnoreCase("true");
-	    	}
-	    } catch (Exception e) { };
-    	}
-	return dm;
-    }
-
-    /**
-     * Initialize the rds timeouts, the actually opening is deleted
-     * until the first update call.
-     */
-    void open(int rdsTimeout, int rdsInterval) {
-    	Vector args  = new Vector(6);
-    	String dbfile = null;
-
-	this.rdsTimeout = rdsTimeout;
-	this.rdsInterval = rdsInterval;
-    	args.add(RDSPGM);
-    	args.add("-a");
-    	args.add("-t");
-    	args.add(""+rdsTimeout);
-    	args.add("-i");
-    	args.add(""+rdsInterval);
-	if (Util.propertyRDSDATABASE != null) {
-    	    args.add("-f");
-    	    args.add(Util.propertyRDSDATABASE);
-	}
-    	if (Util.propertyMSACCT != null &&
-	    Util.propertyMSACCT.equalsIgnoreCase("true")) {
-    	    args.add("-m");
-	}
-	if (Util.propertyRDSLOGFILE != null) {
-    	    args.add("-L");
-    	    args.add(Util.propertyRDSLOGFILE);
-	}
-	rdsArgs = new String[args.size()];
-	args.toArray(rdsArgs);
-	
-    } // end open
-
-    /**
-     * Close the rds communication pipe. 
-     */
-    void close() {
-
-	if (running) {
-	    doAlive = false;
-	    ka.interrupt();
-    	    synchronized (syncObject) {
-	    	/*
-		 * check again, since AliveThread could already close RDS
-		 * when this thread was waiting on syncObject
-		 */
-	    	if (running) {
-		    dr.closeRDS();
-		    running = false;
-		}
-	    }
-	}
-
-    } // end close
-    
-    /**
-     * Close the rds communication pipe after an error has raised. In this
-     * case the rds will be shutdown instead of gently closed.
-     */
-    void closeONError() {
-	doAlive = false;
-    	ka.interrupt();
-    	dr.shutdownRDS();		
-    	running = false;
-    }
-    
-    /**
-     * Get a provider data model object identified by id from the list defined
-     * by listt.
-     * @return	the provider data model object or null if other the  list type
-     *		or the provider object id are unsupported.
-     */
-    SRMProviderDataModel getProviderDataModel(int listt, String id) {
-
-	try {
-	    switch (listt) {
-		case  L_PRC_SI : return getProcess(Integer.parseInt(id));
-		case  L_USR_SI : return getUserprocs(id);
-		case  L_PRJ_SI : return getProjprocs(id);
-		case  L_AC_USR : return getUser(id);
-		case  L_AC_PRJ : return getProject(id);
-		case  L_SYSTEM : return sdm;
-		default: return null;
-	    }
-	} catch (NumberFormatException e) {
-	    return null;
-	}
-    }
-
-    /**
-     * Get process metrics object.
-     * @param	pid the process id
-     * @return	metrics object with process metrics or new empty
-     *		object at first call.
-     */
-    ProcessDataModel getProcess(int pid) {
-
-	ProcessDataModel pdm = null;
-	Integer pidI = new Integer(pid);
-
-	if ((pdm = (ProcessDataModel) processes.get(pidI)) == null) {
-	    if (updating == false)
-	    	return null;
-	    pdm = new ProcessDataModel(pid);
-	    processes.put(pidI, pdm);
-	}
-	if (updating == true)
-	    pdm.setUpdated(true);
-
-	return pdm;
-    }
-
-    /**
-     * Get user metrics object.
-     * @param	uid the user id
-     * @return	metrics object with process metrics or new empty object at
-     *		first call.
-     */
-    UserProcessAggregateDataModel getUserprocs(String uidStr) {
-
-	UserProcessAggregateDataModel  padm = null;
-
-	if ((padm = (UserProcessAggregateDataModel)
-		userprocs.get(uidStr)) == null) {
-	    if (updating == false)
-	    	return null;
-	    padm = new UserProcessAggregateDataModel(uidStr);
-	    userprocs.put(uidStr, padm);
-	}
-	
-	if (updating == true)
-	    padm.setUpdated(true);
-
-	return padm;
-    }
-
-    /**
-     * Get project metrics object.
-     * @return	metrics object with process metrics or new empty
-     *		object at first call.
-     */
-    ProjectProcessAggregateDataModel getProjprocs(String name) {
-
-	ProjectProcessAggregateDataModel  padm = null;
-
-	if ((padm = (ProjectProcessAggregateDataModel)
-		projprocs.get(name)) == null) {
-	    if (updating == false)
-	    	return null;
-	    padm = new ProjectProcessAggregateDataModel(name);
-	    projprocs.put(name, padm);
-	}
-	if (updating == true)
-	    padm.setUpdated(true);
-
-	return padm;
-    }
-
-    /**
-     * Get active user object.
-     * @param	name the user id as string
-     * @return	active user object.
-     */
-    ActiveUserModel getUser(String name) {
-
-	ActiveUserModel aum = null;
-
-	if ((aum = (ActiveUserModel) users.get(name)) == null) {
-	    if (updating == false)
-	    	return null;
-	    aum = new ActiveUserModel(name);
-	    users.put(name, aum);
-	}
-	if (updating == true)
-	    aum.setUpdated(true);
-
-	return aum;
-    }
-
-    /**
-     * Get active project object.
-     * @param	name the project
-     * @return	project object.
-     */
-    ActiveProjectModel getProject(String name) {
-
-	ActiveProjectModel apm = null;
-
-	if ((apm = (ActiveProjectModel) projs.get(name)) == null) {
-	    if (updating == false)
-	    	return null;
-	    apm = new ActiveProjectModel(name);
-	    projs.put(name, apm);
-	}
-	if (updating == true)
-	    apm.setUpdated(true);
-
-	return apm;
-    }
-
-    /**
-     * Returns an iterator over the Processes.
-     * @return iterator
-     */
-    Iterator getProcessIterator() {
-	return processes.values().iterator();
-    }
-
-    /**
-     * Returns an iterator over the Users.
-     * @return iterator
-     */
-    Iterator getUserIterator() {
-	return users.values().iterator();
-    }
-
-    /**
-     * Returns an iterator over the Projects.
-     * @return iterator
-     */
-    Iterator getProjectIterator() {
-	return projs.values().iterator();
-    }
-
-    /**
-     * Returns an iterator over the user process aggregation.
-     * @return iterator
-     */
-    Iterator getUserprocsIterator() {
-	    return userprocs.values().iterator();
-    }
-
-    /**
-     * Returns an iterator over the project process aggregation.
-     * @return iterator
-     */
-    Iterator getProjprocsIterator() {
-	return projprocs.values().iterator();
-    }
-
-    /**
-     * Update the metrics data.
-     * @exception SRMProtocolException
-     */
-    void  update() throws SRMProtocolException {
-
-	SRMProviderDataModel pdm;
-	int tries = 2;
-
-	while (tries-- > 0) {
-	    if (!running) {
-		dr.startRDS(rdsArgs);
-		running = true;
-	    	ka = new KeepAlive(rdsKeepAliveTimeout);
-		ka.start();
-	    }
-	    try {
-		synchronized (syncObject) {
-		    /* check if AliveThread has set error flag */
-		    if (kaError) {
-		    	closeONError();
-			continue;
-	    	    /* 
-		     * check if rds is still running, since AliveThread
-		     * could already close RDS when this thread was waiting
-		     * on syncObject
-		     */
-		    } else if (running) { 	
-    	    	    	updating = true;
-		    	dr.getUpdate(CMD_GETALL);
-		    } else {
-		    	tries = 2;
-		    	continue;
-		    }
-		}
-		ka.resetTimeout();
-		updating = false;
-		tries = 0;
-	    } catch (SRMProtocolException e) {
-	    	SRMDebug.trace(SRMDebug.TRACE_ALL, e.getMessage());	
-	    	closeONError();
-		if (tries == 0)
-		    throw e;		    
-	    }
-	}
-	cleanUp();
-
-    } // end update
-
-    /**
-     * Remove all dead processes, users or projects.
-     */
-    private void cleanUp() {
-
-	cleanUpList(processes);
-	cleanUpList(users);
-	cleanUpList(userprocs);
-	cleanUpList(projs);
-	cleanUpList(projprocs);
-    }
-
-    /**
-     * Remove all elements that heven't been updated in last update.
-     */
-    private void cleanUpList(HashMap map) {
-	Iterator i;
-	SRMProviderDataModel pdm;
-
-	for (i = map.values().iterator(); i.hasNext(); ) {
-	    if (!((pdm = (SRMProviderDataModel) i.next()).isUpdated())) {
-		i.remove();
-	    } else {
-		pdm.setUpdated(false);
-	    }
-	}
-    }
-
-    /**
-     * This thread keeps the rds and the communication with it alive by
-     * sending the alive message to rds.
-     */
-    class KeepAlive extends Thread {
-    	int keepAliveTimeout, save;
-	
-    	/**
-     	 * Constructor
-     	 * @param timeout how long to run at all
-     	 */
-	public KeepAlive(int timeout) {
-	    super("KeepAlive");
-	    kaError = false;
-	    keepAliveTimeout = timeout;
-	    save = keepAliveTimeout;
-	}
-	
-	synchronized public void run() {
-	    int myTimeout = 0;
-	    int waitTime = rdsTimeout / 2;
-	    
-	    doAlive = true;
-
-	    while (doAlive) {
-	    	/*
-		 * the keepAliveTimeout value is set in constructor and 
-		 * in the resetTimeout() method. If its value is reseted
-		 * the internal timer myTimeout value will be wind up.
-		 */
-	    	if (keepAliveTimeout > 0) {
-		    myTimeout = keepAliveTimeout;
-		    keepAliveTimeout = 0;
-		}
-		try {
-    	    	    synchronized (syncObject) {
-		    	/*
-			 * this thread has gained the sync object, but it
-			 * also should check the doAlive flag since
-			 * the dataModel thread could already removed it
-			 * because of a protocol error
-			 */
-		    	if (doAlive) {
-		    	    myTimeout -= waitTime;
-    	    	    	    kaError = true;
-		    	    if (myTimeout <= 0) {
-		    	    	dr.closeRDS();
-		    	    	running = false;
-		    	    	return;
-		    	    } else {
-		    	    	dr.alive();
-			    }
-			    kaError = false;
-			} else {
-			    return;
-			}
-		    }
-		    wait(waitTime);
-		} catch (InterruptedException e) {
-	    	    SRMDebug.trace(SRMDebug.TRACE_ALL, e.getMessage());
-		    return;
-    	    	} catch (SRMProtocolException e) {
-	    	    SRMDebug.trace(SRMDebug.TRACE_ALL, e.getMessage());
-		    return;
-		}
-	    }
-	}
-	
-    	/**
-     	 * Reset the absolute timeout 
-     	 */
-	public void resetTimeout() {
-	    keepAliveTimeout = save;    
-	}
-
-    } // end class KeepAlive
-
-
-    class ProjectProcessAggregateDataModel extends ProcessAggregateDataModel {
-	public ProjectProcessAggregateDataModel(String id) {
-	    super(id);
-	}
-	
-	protected void setCIMInstance(boolean newInstance) {
-	    super.setCIMInstance(newInstance);
-	    setStrProp(newInstance, CREATIONCLASSNAME,
-	      SOLARIS_PROJECTPROCESSAGGREGATESTATISTICALINFORMATION);
-	    setStrProp(newInstance, NAME, name);
-	}
-    }
-
-    class UserProcessAggregateDataModel extends ProcessAggregateDataModel {
-	public UserProcessAggregateDataModel(String id) {
-	    super(id);
-	}
-	
-	protected void setCIMInstance(boolean newInstance) {
-	    super.setCIMInstance(newInstance);
-	    setStrProp(newInstance, CREATIONCLASSNAME,
-	      SOLARIS_USERPROCESSAGGREGATESTATISTICALINFORMATION);
-	    setStrProp(newInstance, NAME, name);
-	}
-    }
-    
-} // end class DataModel
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Makefile
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-JARFILE=	perfprovider.jar
-PACKAGEPATH=	com/sun/wbem/solarisprovider/srm
-RESOURCE_PACKAGEPATH=	$(PACKAGEPATH)/resources
-DOCDIR=		doc
-
-DIRMODE= 755
-FILEMODE= 644
-
-ROOTCOM=				$(ROOTWBEM)/com
-ROOTCOMSUN=				$(ROOTCOM)/sun
-ROOTCOMSUNWBEM=				$(ROOTCOMSUN)/wbem
-ROOTCOMSUNWBEMSOLARISPROVIDER=		$(ROOTCOMSUNWBEM)/solarisprovider
-ROOTCOMSUNWBEMSOLARISPROVIDERSRM= 	$(ROOTCOMSUNWBEMSOLARISPROVIDER)/srm
-ROOTCOMSUNWBEMSOLARISPROVIDERSRMRESOURCES= $(ROOTCOMSUNWBEMSOLARISPROVIDERSRM)/resources
-
-PROVIDERDIRS=		$(ROOTCOM) 				\
-			$(ROOTCOMSUN)	 			\
-			$(ROOTCOMSUNWBEM)	 			\
-			$(ROOTCOMSUNWBEMSOLARISPROVIDER)	 	\
-			$(ROOTCOMSUNWBEMSOLARISPROVIDERSRM)	\
-			$(ROOTCOMSUNWBEMSOLARISPROVIDERSRMRESOURCES)
-
-ROOTPROVIDERFILE= 	$(FILE:%=$(ROOTCOMSUNWBEMSOLARISPROVIDERSRM)/%)
-ROOTRESOURCEFILE= 	$(FILE:%=$(ROOTCOMSUNWBEMSOLARISPROVIDERSRMRESOURCES)/%)
-
-$(PROVIDERDIRS): $(ROOTWBEMDIRS)
-	$(INS.dir)
-
-$(ROOTCOMSUNWBEMSOLARISPROVIDERSRM)/%: %
-	$(INS.file)
-
-$(ROOTCOMSUNWBEMSOLARISPROVIDERSRMRESOURCES)/%: %
-	$(INS.file)
-
-SOURCE:sh = ls *.java
-
-CLASSES:sh = ls *.class 2> /dev/null | sed 's/\$/\$\$/' 
-
-
-all: 		$(PROVIDERDIRS) jar 
-
-install: 	all resources mof $(PROG)   
-
-resources:	$(ROOTCOMSUNWBEMSOLARISPROVIDERSRMRESOURCES)/LogMessages.properties 	\
-		$(ROOTCOMSUNWBEMSOLARISPROVIDERSRMRESOURCES)/Exceptions.properties 	\
-		$(ROOTCOMSUNWBEMSOLARISPROVIDERSRM)/perfprovider.properties
-
-
-mof:		$(ROOTMOF)/Solaris_Performance1.0.mof
-
-jar:		jarfile $(ROOTWBEM)/$(JARFILE)
-
-jarfile:	$(SOURCE:java=class) 
-	cd $(PROVIDERSRC);\
-	$(JAR) -cvf0M $(JARFILE) $(PACKAGEPATH)/*class; \
-	cd $(PROVIDERSRC);\
-	$(JAR) -uvf0M $(JARFILE) $(RESOURCE_PACKAGEPATH:%=%/*.properties);
-	$(MV) $(PROVIDERSRC)/$(JARFILE) .
-
-doc:	.FORCE
-	$(JAVADOC) -d $(DOCDIR) -classpath $(CLASSPATH) $(SOURCE)
-
-clobber: clean
-
-clean:
-	$(RM) *.class
-
-check:
-	$(JSTYLE) $(JSTYLE_TAIL) $(SOURCE)
-
-.WAIT:
-
-.FORCE:
-
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/ProcessAggregateDataModel.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ProcessAggregateDataModel.java
- */
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-
-/**
- * Data model of aggregated process utilization
- * It encapsulates a CIM instance of
- * a Solaris_ProjectProcessAggregateStatisticalInformation
- * or Solaris_UserProcessAggregateStatisticalInformation class.
- * @author Sun Microsystems
- */
-public class ProcessAggregateDataModel extends ProcessDataModel {
-
-
-    /**
-     * Construct an aggregated process utilization model and set the user id
-     * or the project name propertyto uidStr.
-     * @param   idStr the user id or project name
-     */
-    public ProcessAggregateDataModel(String idStr) {
-	name = idStr;
-    }
-
-    protected void setOpPropertiesVector() {
-
-	opProperties.add(new CIMProperty(SYSTEMNAME,
-	      new CIMValue(csName)));
-	
-	opProperties.add(new CIMProperty(SYSTEMCREATIONCLASSNAME,
-	      new CIMValue(SOLARIS_COMPUTERSYSTEM)));
-	
-	opProperties.add(new CIMProperty(NAME,
-	      new CIMValue(name)));
-    }
-   
-    protected void setCIMInstance(boolean newInstance) {
-	super.setCIMInstance(newInstance);
-	setStrProp(newInstance, CREATIONCLASSNAME,
-	    SOLARIS_PROCESSAGGREGATESTATISTICALINFORMATION);
-    }
-
-    /**
-     * Returns the string value of this object
-     */
-    public String toString() {
-	return super.toString() + "Name    " + name + "\n" + super.toString();
-    }
-
-    protected void initKeyValTable() {
-	super.initKeyValTable();
-	keyValTab.put("id_nproc", new SetUI64Prop("NumProcs"));
-    }
-
-} // end class ProcessAggregateDataModel
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/ProcessDataModel.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,221 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ProcessDataModel.java
- */
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-import java.util.*;
-
-
-/**
- * Data model of Process Utilization. It encapsulates a CIM instance of
- * a Solaris_ProcessStatisticalInformation class.
- * @author Sun Microsystems
- */
-public class ProcessDataModel extends SRMProviderDataModel
-	implements SRMProviderProperties,
-	    Solaris_ProcessStatisticalInformationProperties {
-
-    /**
-     * Object path to the Solaris_Process instance
-     */
-    protected CIMObjectPath   opForProc;
-    int pid;
-    
-
-    public ProcessDataModel() {
-    	super();
-    }
-
-    
-    public ProcessDataModel(int pid) {
-    	this.pid = pid;
-    }
-    
-
-    /**
-     * Get a CIM object path to a Solaris_Process object.
-     * @returns object path to the Solaris_Process instance.
-     */
-    public CIMObjectPath getCIMObjectPathForProc() {
-        if (opForProc == null) {
-
-            opForProc = new CIMObjectPath(SOLARIS_PROCESS);
-	    opForProc.setNameSpace(NAMESPACE);
-	    
-            Vector properties = new Vector(5);
-	    
-            properties.add(
-		new CIMProperty(CSCREATIONCLASSNAME,
-		  new CIMValue(SOLARIS_COMPUTERSYSTEM)));
-
-	    properties.add(
-		new CIMProperty(CSNAME,
-		  new CIMValue(csName)));
-
-	    properties.add(
-		new CIMProperty(OSCREATIONCLASSNAME,
-		  new CIMValue(SOLARIS_OPERATINGSYSTEM)));
-
-	    properties.add(
-		new CIMProperty(OSNAME,
-		  new CIMValue(osName)));
-
-	    properties.add(
-		new CIMProperty(HANDLE,
-		  new CIMValue(Long.toString(pid))));
-
-	    opForProc.setKeys(properties);
-        }
-        return opForProc;
-    }
-
-    
-    public String toString() {
-
-    	return "Name    " + pid + "\n" + super.toString();
-    }
-
-    
-    protected void setOpPropertiesVector() {
-
-        opProperties.add(
-	    	new CIMProperty(CSCREATIONCLASSNAME,
-		new CIMValue(SOLARIS_COMPUTERSYSTEM)));
-	
-        opProperties.add(
-		new CIMProperty(CSNAME,
-		new CIMValue(csName)));
-	
-        opProperties.add(
-	    	new CIMProperty(OSCREATIONCLASSNAME,
-	  	new CIMValue(SOLARIS_OPERATINGSYSTEM)));
-	
-        opProperties.add(
-	    	new CIMProperty(OSNAME,
-		new CIMValue(osName)));
-	
-        opProperties.add(
-	    	new CIMProperty(NAME,
-		new CIMValue(Long.toString(pid))));
-    }
-
-    
-    protected void setCIMInstance(boolean newInstance) {
-
-        setStrProp(newInstance,
-		  	SYSTEMCREATIONCLASSNAME,
-		  	SOLARIS_COMPUTERSYSTEM);
-	
-        setStrProp(newInstance,
-			  SYSTEMNAME,
-			  csName);
-	
-        setStrProp(newInstance,
-			  CREATIONCLASSNAME,
-			  SOLARIS_PROCESSSTATISTICALINFORMATION);
-	
-        setStrProp(newInstance,
-			  CAPTION,
-			  "");
-	
-        setStrProp(newInstance,
-			  DESCRIPTION,
-			  "");
-	
-        setStrProp(newInstance,
-			  NAME,
-			  Long.toString(pid));
-    }
-
-    
-    protected void initKeyValTable() {
-    	keyValTab = new LinkedHashMap(30);
-	
-	keyValTab.put(WAITCPUTIME_KEY,
-	    new SetReal64Prop(WAITCPUTIME));	  
-	keyValTab.put(USERMODETIME_KEY,
-	    new SetReal64Prop(USERMODETIME));	  
-	keyValTab.put(SYSTEMMODETIME_KEY,
-	    new SetReal64Prop(SYSTEMMODETIME));	 
-	keyValTab.put(SYSTEMTRAPTIME_KEY,
-	    new SetReal64Prop(SYSTEMTRAPTIME));	 
-	keyValTab.put(TEXTPAGEFAULTSLEEPTIME_KEY,
-	    new SetReal64Prop(TEXTPAGEFAULTSLEEPTIME));
-	keyValTab.put(DATAPAGEFAULTSLEEPTIME_KEY,
-	    new SetReal64Prop(DATAPAGEFAULTSLEEPTIME));
-	keyValTab.put(SYSTEMPAGEFAULTSLEEPTIME_KEY,
-	    new SetReal64Prop(SYSTEMPAGEFAULTSLEEPTIME));
-	keyValTab.put(USERLOCKWAITSLEEPTIME_KEY,
-	    new SetReal64Prop(USERLOCKWAITSLEEPTIME));
-	keyValTab.put(OTHERSLEEPTIME_KEY,
-	    new SetReal64Prop(OTHERSLEEPTIME));	 
-	keyValTab.put(STOPPEDTIME_KEY,
-	    new SetReal64Prop(STOPPEDTIME)); 
-	keyValTab.put(MINORPAGEFAULTS_KEY,
-	    new SetUI64Prop(MINORPAGEFAULTS));	 
-	keyValTab.put(MAJORPAGEFAULTS_KEY,
-	    new SetUI64Prop(MAJORPAGEFAULTS));	 
-	keyValTab.put(SWAPOPERATIONS_KEY,
-	    new SetUI64Prop(SWAPOPERATIONS));	 
-	keyValTab.put(BLOCKSREAD_KEY,
-	    new SetUI64Prop(BLOCKSREAD));  	 
-	keyValTab.put(BLOCKSWRITTEN_KEY,
-	    new SetUI64Prop(BLOCKSWRITTEN));	 
-	keyValTab.put(MESSAGESSENT_KEY,
-	    new SetUI64Prop(MESSAGESSENT)); 	 
-	keyValTab.put(MESSAGESRECEIVED_KEY,
-	    new SetUI64Prop(MESSAGESRECEIVED));	 
-	keyValTab.put(SIGNALSRECEIVED_KEY,
-	    new SetUI64Prop(SIGNALSRECEIVED));	 
-	keyValTab.put(VOLUNTARYCONTEXTSWITCHES_KEY,
-	    new SetUI64Prop(VOLUNTARYCONTEXTSWITCHES));
-	keyValTab.put(INVOLUNTARYCONTEXTSWITCHES_KEY,
-	    new SetUI64Prop(INVOLUNTARYCONTEXTSWITCHES));
-	keyValTab.put(SYSTEMCALLSMADE_KEY,
-	    new SetUI64Prop(SYSTEMCALLSMADE));	 
-	keyValTab.put(CHARACTERIOUSAGE_KEY,
-	    new SetUI64Prop(CHARACTERIOUSAGE));	 
-	keyValTab.put(PROCESSHEAPSIZE_KEY,
-	    new SetUI64Prop(PROCESSHEAPSIZE));	 
-	keyValTab.put(PROCESSVMSIZE_KEY,
-	    new SetUI64Prop(PROCESSVMSIZE));	 
-	keyValTab.put(PROCESSRESIDENTSETSIZE_KEY,
-	    new SetUI64Prop(PROCESSRESIDENTSETSIZE));
-	keyValTab.put(PERCENTCPUTIME_KEY,
-	    new SetReal32Prop(PERCENTCPUTIME));	   
-	keyValTab.put(PERCENTMEMORYSIZE_KEY,
-	    new SetReal32Prop(PERCENTMEMORYSIZE));    
-	keyValTab.put(USERSYSTEMMODETIME_KEY,
-	    new SetUI64Prop(USERSYSTEMMODETIME));	
-	keyValTab.put(NUMTHREADS_KEY,
-	    new SetUI64Prop(NUMTHREADS));
-	keyValTab.put(TIMESTAMP_KEY,
-	    new SetUI64Prop(TIMESTAMP));
-    }
-}
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/PropertyAccessInterface.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * PropertyAccessInterface.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-
-/**
- * Defines the access methods to a properties of a CIM instance.
- */
-interface PropertyAccessInterface {
-
-    static final byte CACHE		= 1;
-    static final byte FLUSH		= 2;
-    static final byte CHECK_WTHROUGH	= 3;
-
-    /**
-     * Set the property to the value val. The action specifies how to access
-     * the property.
-     * CACHE - only cache the value, don't write it to the CIM instance.
-     * FLUSH - flush the cached value to the CIM instance.
-     * CHECK_WTHROUGH - if the value doesn't equal the current value do nothing,
-     *                  otherwise write the internal and the CIM instance value.
-     * @param	ci	the CIM instance
-     * @param	action	the set type (CACHE, FLUSH or CHECK_WTHROUGH)
-     * @param	val	the set value
-     */
-    void set(CIMInstance  ci, byte action, String val)
-	    throws NumberFormatException;
-
-    /**
-     * Returns the string value of this object
-     */
-    String toString();
-
-    /**
-     * Returns value string of this property
-     */
-    public String getValue();
-
-} // end interface PropertyAccessInterface
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/ResourceMonitor.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ResourceMonitor.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import	java.util.HashSet;
-
-/**
- * Mediator between data model the native interface and the client.
- * Implements the singleton pattern.
- * @author Sun Microsystems, Inc.
- */
-public final class ResourceMonitor {
-    /**
-     * The UPDATETIME defines a time window in which a data request will
-     *  be served from internal data cache instead of accessing rds, 5 sec.
-     */
-    private static final int UPDATETIME =  5000;
-     
-    /**
-     * The RDSTIMEOUT defines the timeout after which the rds 
-     * rds will exit, if it hasn't received command from client, 30 sec.
-     */
-    private static final int RDSTIMEOUT =  30000;
-    /**
-     * The RDSINTERVAL defines a interval in which the rds
-     * will update its data, 1 sec.
-     */
-    private static final int RDSINTERVAL =  1000;
-    
-    private static ResourceMonitor	rm;
-    private static DataModel	dataModel;
-    private long    lastUpdateTime;
-    private int     updateTime	= UPDATETIME;
-    private int     rdsTimeout	= RDSTIMEOUT; 
-    private int     rdsInterval = RDSINTERVAL;
-    
-    /**
-     * threads that hold access into the data model
-     */
-    private int			    	activeClients;
-
-    /**
-     * Ensure that DataModel will be opened and closed once. 
-     */
-    private boolean ifOpened = false;
-
-    /**
-     * Default constructor
-     */
-    private ResourceMonitor() {
-    }
-
-    /**
-     * Should be used to obtain the singleton instance of this class
-     * @return the singleton instance of this class
-     */
-    public static synchronized  ResourceMonitor getHandle() {
-    	if (rm == null) {
-            rm  = new ResourceMonitor();
-     	    // The provider data model used by this monitor
-            dataModel  = DataModel.getHandle(rm);
-    	}
-    	return rm;
-    }
-
-    /**
-     * Open the data model used by this monitor with the following default
-     * times, timeout after which the rds rds will exit 30 sec., interval in
-     * which the rds will update its data 1 sec., time in which the data model
-     * will refresh its cache 5 sec.
-     */
-    public synchronized void openDataModel() {
-	openDataModel(rdsTimeout, rdsInterval, updateTime);
-    }
-
-    /**
-     * Open the data model used by this monitor.
-     * @param rdsTimeout    timeout after which the rds rds will exit,
-     *	    	    	    if -1 the default value 30 sec. will be used 
-     * @param rdsInterval   interval in which the rds will update its data
-     *	    	    	    if -1 the default value 1 sec. will be used 
-     * @param updateTime    time in which the data model will refresh its cache
-     *	    	    	    if -1 the default value 5 sec. will be used 
-     */
-    public synchronized void openDataModel(int rdsTimeout,
-	    int rdsInterval, int updateTime) {
-
-	if (ifOpened == false) {
-	    if (updateTime != -1)
-    	    	this.updateTime = updateTime;
-	    if (rdsTimeout != -1)
-	    	this.rdsTimeout = rdsTimeout;
-	    if (rdsTimeout != -1)
-	    	this.rdsInterval = rdsInterval;
-	    dataModel.open(rdsTimeout, rdsInterval);
-	    ifOpened = true;
-	}
-
-    } // end openDataModel
-
-    /**
-     * Close the data model used by this monitor.
-     */
-    public synchronized void closeDataModel() {
-
-	if (ifOpened == true) {
-	    dataModel.close();
-	    ifOpened = false;
-	}
-
-    } // end closeDataModel
-
-    /**
-     * Get the access to the data model. The caller should invoke
-     * releaseDataModel() in order to allow the refresh of the data
-     * model cache after it has finished the data processing.
-     * @return the data model
-     * @throws com.sun.wbem.solarisprovider.srm.SRMException
-     *		if the data model couldn't be updated.
-     */
-    public synchronized
-    DataModel getDataModel(boolean forceUpdate)
-    throws SRMException {
-
-	if (ifOpened == false)
-	    throw new SRMException("Resource Data Model is not opened");
-
-	if (forceUpdate == true) {
-	    update();
-	} else {
-	    long currentTime = System.currentTimeMillis();
-	    if ((currentTime - lastUpdateTime) > updateTime) {
-		lastUpdateTime = currentTime;
-		update();
-	    }
-	}
-	activeClients++;
-    	SRMDebug.trace(SRMDebug.THREAD_SYNC, "srm data cache update locked by "
-	    	+ activeClients + " clients");
-	return dataModel;
-
-    } // end getDataModel
-
-    /**
-     * Release the lock into the data model. This allows the refresh of the
-     * data model cache.
-     * @param dm the data got from getDataModel() model must not be zero
-     */
-    public synchronized DataModel releaseDataModel(DataModel dm) {
-
-    	if (dm != null) {
-    	    activeClients--;
-    	    SRMDebug.trace(SRMDebug.THREAD_SYNC,
-	    	    "srm data cache update locked by "
-		    + activeClients + " clients");
-    	    notifyAll();
-	}
-	return null;
-    } // end releaseDataModel
-
-    /**
-     * Wait till all data model readers release their lock, then do the update
-     */
-    private void update() throws SRMException {
-   
-    	    beforeUpdate();
-	    SRMDebug.trace(SRMDebug.THREAD_SYNC,
-	    	"starting srm data cache update, at: "
-	    	+System.currentTimeMillis()+"ms");
-	    dataModel.update();
-	    SRMDebug.trace(SRMDebug.THREAD_SYNC,
-	    	"finished srm data cache update, at: "
-	    	+System.currentTimeMillis()+"ms");
-    }
-
-    private static final int WAITTIME =  500;
-
-    /**
-     * Wait till all data model readers release their lock. To ensure
-     * liveness only wait max. 10 * WAITTIME;
-     */
-    private synchronized void beforeUpdate() {
-    	int tries = 10;
-	
-	while (activeClients > 0) {
-	    try {
-	    	--tries;
-	    	wait(WAITTIME);
-		if (tries == 0)
-		    activeClients = 0;
-	    } catch (InterruptedException ex) {
-	    }
-    	}
-    }
-    
-} // end class ResourceMonitor
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SRMDataReader.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,727 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SRMDataReader.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import java.io.*;
-
-
-/**
- * This class works out the protocol layer of the unidirectional data interface
- * between the rds and the client. The protocol contains a header with a lists
- * of data. Each list has a header and some elements, which have again a header
- * and some fields of data:
- * protocol  = { pheader,  n * list }
- * pheader  == { "@RDS-MAG@", PROTV, LISTN }
- * PROTV    == { protocol version }
- * LISTN    == { number of lists }
- * list     == { lheader, n * element }
- * lheader  == { LISTT, ELEMN }
- * LISTT    == { type of the list }
- * ELEMN    == { number of elements in the list }
- * element  == { eheader, field }
- * eheader  == { ELMID, FILDN }
- * ELMID    == { element id, like pid, uid, project name }
- * field    == { KEY, VALUE }
- * All protocol elements has a key and a value separated by one space.
- * The value begins after the first space and ends at the new line character.
- * Protocol keys are: "@RDS-MAG@", PROTV, LISTN,  LISTT, ELEMN ELMID, FILDN,
- * RDERR. The special key RDERR can occur in any line indicates error condition,
- * where the VALUE is the error message from rds.
- * @author Sun Microsystems, Inc.
- * @version	1.1 08/31/01
- */
-class SRMDataReader {
-
-    // Protocol keys
-    private static final String PROTM = "@RDS-MAG@"; // protocol starts with it
-    private static final String RDERR = "RDERR"; // error notification from rds
-    private static final String PROTV = "PROTV"; // protocol version
-    private static final String LISTT = "LISTT"; // list type
-    private static final String LISTN = "LISTN"; // number of lists
-    private static final String ELEMN = "ELEMN"; // number of elements in a list
-    private static final String ELMID = "ELMID"; // element id
-    private static final String FILDN = "FILDN"; // number of fields in element
-    private static final String BUSY  = "BUSY";  // busy notification from rds
-
-    private static final String RDS_PV_ERR = "RDS protocol violation: ";
-    private static final int PROT_VERSION = 100; // supported protocol version
-
-    private static final String COMMAND  = "command ";
-    private static final String PROMPT = "@RDS@>";
-    private static final String PROMPT_WHAT = " ?";
-
-    // RDS commands
-    private static final String CMD_ALIVE =  "alive";
-    private static final String CMD_EXIT =   "exit";
-
-    private DataModel		dm;
-    private Process         	p;
-    private int         	exitV;
-    private BufferedReader	in, err;
-    private PrintWriter		pw;
-    private String		line; 	    // last read line
-    private String		stdErrline; // last read line
-    private String		errline;    // last read error line
-    private String		key;  // last read key
-    private String		val;  // last read value
-
-    // Timeout for waiting for the first line from rds after its start.
-    // Since rds can be busy for a long time reading and scanning its
-    // persistence file, this time must set be relative high.
-    private static final int OPEN_READTIMEOUT = 30000;	// ms
-
-    // Default timeout for reading RDS responses
-    private static final int DEFAULT_READTIMEOUT = 1000;	// ms
-
-    // If rds is too busy to respond, wait this long before retrying
-    private static final int RDS_RETRY_SLEEPTIME = 500;	// milliseconds
-
-    // Retry and rds command no more than this many times
-    private static final int MAX_RDS_RETRIES = 140;
-
-    protected int readTimeout = DEFAULT_READTIMEOUT;
-
-    private long charsRead = 0;
-
-    private SRMWorker worker;
-
-    /**
-     * Constructor.
-     * @param	dm	data model that reads and interprets the protocol data
-     *			fields.
-     */
-    public SRMDataReader(DataModel dm) {
-	this.dm = dm;
-
-	// initialize the response timeout according to resource property
-	String s = Util.propertyREADTIMEOUT;
-
-	if (s != null && s.length() > 0) {
-	    try {
-		readTimeout = Integer.parseInt(s);
-	    } catch (Exception e) {
-	    	SRMDebug.trace(SRMDebug.TRACE_ALL, e.getMessage());	
-	    }
-	}
-	worker = new SRMWorker();
-	worker.start();
-    }
-    
-    /**
-     * Start the by cmdArgs defined rds, and check the protocol header.
-     * @param	cmdArgs	contains the path of rds and the arguments to use.
-     * @exception SRMProtocolException if a protocol violation has occurred.
-     */
-    public void startRDS(String []cmdArgs) throws SRMProtocolException {
-    	worker.start(cmdArgs, OPEN_READTIMEOUT);
-    }
-    
-    /**
-     * Send exit command to rds and close the rds pipe.
-     */
-    public void closeRDS() {
-    	worker.close(readTimeout);
-    }
-
-    /**
-     * Close the rds pipe and shutdown the rds procces.
-     */
-    public void shutdownRDS() {
-    	worker.shutdown(readTimeout);
-    }
-
-    /**
-     * Start the udpate.
-     * If parse returns an error code it is assumed that rds is busy.
-     * The request will then be retried.
-     *
-     * @param option defines the rds command opion, -S -p ...
-     * @exception SRMProtocolException if a protocol violation has occurred.
-     */
-    public void getUpdate(String option) throws SRMProtocolException {
-    	worker.update(option, readTimeout);
-    }
-    
-    /**
-     * Force the RDS to keep alive by sending the ALIVE command
-     * @exception SRMProtocolException if a protocol violation has occurred.
-     */
-    public void alive() throws SRMProtocolException {
-	worker.alive(readTimeout);
-    }
-
-    /**
-     * Start the by cmdArgs defined rds, and check the protocol header.
-     * This method is called by the worker thread.
-     * @param	cmdArgs	contains the path of rds and the arguments to use.
-     * @exception SRMProtocolException if a protocol violation has occurred.
-     */
-    private void _startRDS(String []cmdArgs) throws SRMProtocolException {
-	open(cmdArgs);
-	try {
-	    readHeader();
-	} catch (SRMProtocolException e) {
-	    SRMDebug.trace(SRMDebug.TRACE_ALL, e.getMessage());
-	    shutdownRDS();
-	    throw e;
-	}
-    }
-
-    
-    /**
-     * Send exit command to rds and close the rds pipe.
-     * This method is called by the worker thread.
-     */
-    private void _closeRDS() {
-    
-    	/* 
-	 * First we try to close rds carefully by sending an exit command.
-	 * If it failed we will destroy the rds process. In both cases
-	 * we will wait for its termination.
-	 */
-    	try {
-    	    wrCmd(CMD_EXIT);
-    	    checkPrompt();
-    	    SRMDebug.trace(SRMDebug.RDS_CMD_IFC,
-	    	"waiting for rds to terminate");
-    	    p.waitFor();
-	    close();
-    	} catch (SRMProtocolException e) {
-    	    shutdownRDS();
-    	} catch (InterruptedException e) {
-    	    SRMDebug.trace(SRMDebug.TRACE_ALL, e.getMessage());	
-	} 
-    	SRMDebug.trace(SRMDebug.RDS_CMD_IFC, "done");
-    }
-    
-    /**
-     * Close the rds pipe and shutdown the rds procces.
-     * This method is called by the worker thread.
-     */
-    private void _shutdownRDS() {
-    
-    	/*
-    	 * First check if it is still running if so destroy it and wait
-	 * for its termination.
-	 */
-    	if (checkRDSrunning()) {
-	    p.destroy();
-    	    try {
-    		SRMDebug.trace(SRMDebug.RDS_CMD_IFC,
-		    "waiting for rds to terminate");
-    		p.waitFor();
-    	    } catch (InterruptedException e) {
-    		SRMDebug.trace(SRMDebug.TRACE_ALL, e.getMessage());	
-	    }
-    	    SRMDebug.trace(SRMDebug.RDS_CMD_IFC, "done");
-    	}
-	close();
-    }
-
-    /**
-     * Start the udpate.
-     * This method is called by the worker thread.
-     * If parse returns an error code it is assumed that rds is busy.
-     * The request will then be retried.
-     *
-     * @param option defines the rds command opion, -S -p ...
-     * @exception SRMProtocolException if a protocol violation has occurred.
-     */
-    private void _getUpdate(String option) throws SRMProtocolException {
-	int numRetries = MAX_RDS_RETRIES;
-
-	do {
-	    wrCmd(option);
-	    if (parse() == 0 || numRetries <= 0)
-		break;
-
-	    try {
-		Thread.sleep(RDS_RETRY_SLEEPTIME, 0);
-	    } catch (InterruptedException x) {
-		;
-	    }
-	} while (numRetries-- > 0);
-	
-    	if (numRetries == 0) {
-	    throw new SRMProtocolException(
-		"Cannot read rds '" + option + "' command output");
-	} else {
-	    SRMDebug.trace(SRMDebug.RDS_CMD_IFC, "charsRead = " + charsRead);
-	}
-    }
-
-    /**
-     * Force the RDS to keep alive
-     * This method is called by the worker thread.
-     * @exception SRMProtocolException if a protocol violation has occurred.
-     */
-    private void _alive() throws SRMProtocolException {
-	wrCmd(CMD_ALIVE);
-    }
-
-    /**
-     * Start the rds and create a BufferedReader input stream.
-     * @param	cmdArgs	contains the path of rds and the arguments to use.
-     */
-    private void open(String []cmdArgs) throws SRMProtocolException {
-
-	InputStream is, errs;
-	OutputStream os;
-	Runtime     r = Runtime.getRuntime();
-	
-	if (SRMDebug.isOn(SRMDebug.RDS_CMD_IFC)) {
-    	    StringBuffer rdsCallStr = new StringBuffer(cmdArgs[0]);
-	    for (int i = 1; i < cmdArgs.length; i++) {
-	    	rdsCallStr.append(" " + cmdArgs[i]);
-	    }
-    	    SRMDebug.trace(SRMDebug.RDS_CMD_IFC, rdsCallStr.toString());
-	}
-	try {
-	    p = r.exec(cmdArgs);
-	    is = p.getInputStream();
-	    errs = p.getErrorStream();
-	    os = p.getOutputStream();
-	} catch (IOException e) {
-	    throw new SRMProtocolException("Cannot start 'rds', " +
-		e.getMessage());
-	}
-    	if (!checkRDSrunning()) {
-	    throw new SRMProtocolException("Cannot start 'rds', " +
-			    "rds terminated with exit code =" + exitV);
-    	}
-	in = new BufferedReader(new InputStreamReader(is));
-	err = new BufferedReader(new InputStreamReader(errs));
-	pw  = new PrintWriter(os);
-
-    } // end open
-
-    /**
-     * Close the data stream to rds.
-     */
-    private void close() {
-
-    	SRMDebug.trace(SRMDebug.RDS_CMD_IFC, "");
-	try {
-	    in.close();
-	    pw.close();
-	    err.close();
-	} catch (IOException e) {
-	    SRMDebug.trace(SRMDebug.TRACE_ALL, e.getMessage());	
-	}
-
-    } // end close
-
-    /**
-     * Read the data stream and wait for RDS protocol header, check version.
-     * @exception SRMProtocolException if a protocol violation has occurred.
-     */
-    private void readHeader() throws SRMProtocolException  {
-
-	int protv;
-	try {
-	    // Waiting for header with the magic value @RDS-MAG@
-	    while ((line = in.readLine()) != null) {
-		if (line.length() < PROTM.length())
-		    continue;
-		if (line.equals(PROTM))
-		    break;
-	    }
-	    if (line == null) {
-		throw new SRMProtocolException(
-		    "Unexpected end of RDS input stream");
-	    }
-	    // Check the protocol version
-	    parseKeyValue();
-	    if (!key.equals(PROTV)) {
-		throw new SRMProtocolException(RDS_PV_ERR + line);
-	    } else {
-		protv = Integer.parseInt(val);
-		if (PROT_VERSION != protv) {
-		    throw new SRMProtocolException(
-			"Unsupported RDS protocol version: ex:" +
-			PROT_VERSION + ", ac: " + protv);
-		}
-	    }
-
-	} catch (IOException e) {
-	    if (SRMDebug.isOn(SRMDebug.RDS_CMD_IFC))
-	    	dumpStdErr();
-	    throw new SRMProtocolException("Cannot read RDS protocol header, " +
-		e.getMessage());
-	}
-
-    } // end readHeader
-
-    /**
-     * Parse the data stream from rds, evaluate and strip the protocol elements.
-     *
-     * Returns 0 if OK, 1 if rds responded 'busy'
-     *
-     * @exception SRMProtocolException if a protocol violation has occurred.
-     */
-    private int parse() throws SRMProtocolException  {
-
-	int protv, listn, listt, elemn;
-	try {
-	    // fetch the number of lists (or maybe it's busy)
-	    parseKeyValue();
-	    if (!key.equals(LISTN)) {
-		throw new SRMProtocolException(RDS_PV_ERR + line);
-	    } else {
-		listn = Integer.parseInt(val);
-	    }
-	    
-	    for (int lno = 0; lno < listn; lno++) {
-
-		// read the type of the list
-		parseKeyValue();
-		if (!key.equals(LISTT)) {
-		    throw new SRMProtocolException(RDS_PV_ERR + line);
-		} else {
-		    listt = Integer.parseInt(val);
-		}
-
-		// read the number of elements in the list
-		parseKeyValue();
-		if (!key.equals(ELEMN)) {
-		    throw new SRMProtocolException(RDS_PV_ERR + line);
-		} else {
-		    elemn = Integer.parseInt(val);
-		}
-		for (int eno = 0; eno < elemn; eno++) {
-		    parseElement(listt);
-		}
-	    }
-
-	} catch (NumberFormatException e) {
-	    throw new SRMProtocolException(RDS_PV_ERR + line);
-	} catch (SRMProtocolBusyException b) {
-	    return 1;
-	}
-
-	return 0;
-	
-    } // end parse
-
-    /**
-     * Parse the fields in a element of a list of type listt. The client
-     * should know the how to interpret the fields of a element of a particular
-     * list type.
-     * @param	listt	the type of the list.
-     * @exception SRMProtocolException if a protocol violation has occurred.
-     */
-    private void parseElement(int listt) throws SRMProtocolException {
-
-	int fieldn;
-	SRMProviderDataModel pdm;
-	String elemidStr;
-
-	parseKeyValue();
-	if (!key.equals(ELMID)) {
-	    throw new SRMProtocolException(RDS_PV_ERR + line);
-	} else {
-	    // get the consumer of fields of this element.
-	    if ((pdm = dm.getProviderDataModel(listt, val)) == null) {
-		throw new SRMProtocolException(RDS_PV_ERR +
-		    "wrong list type: " + line);
-		}
-	}
-	parseKeyValue();
-	if (!key.equals(FILDN)) {
-	    throw new SRMProtocolException(RDS_PV_ERR + line);
-	} else {
-	    fieldn = Integer.parseInt(val);
-	}
-	for (int fno = 0; fno < fieldn; fno++) {
-	    parseKeyValue();
-	    // The provider data model will take the value and set its property
-	    pdm.setProperty(key, val);
-	}
-
-    } // end parseElement
-
-    /**
-     * Parse one line of the input stream and split it into a KEY
-     * and VALUE. The read line is stored in the class field line,
-     * the KEY in key and VALUE in value. These fields should
-     * remains unchanged till the next call of this method. Since they
-     * are used in several places in this class.
-     * @exception SRMProtocolBusyException if the key is "busy"
-     * @exception SRMProtocolException if a protocol violation has occurred.
-     */
-    private void parseKeyValue() throws SRMProtocolException {
-
-	int idx;
-	try {
-	    if ((line = in.readLine()) != null) {
-		if (line.startsWith(BUSY)) {
-		    throw new SRMProtocolBusyException("RDS busy");
-		} else if ((idx = line.indexOf(' ')) == -1) {
-		    throw new SRMProtocolException(RDS_PV_ERR + line);
-		} else {
-		    key = line.substring(0, idx);
-		    val = line.substring(idx + 1);
-		    if (key.equals(RDERR)) {
-			throw new SRMProtocolException("RDS error: " + val);
-		    }
-		}
-	    }
-
-	} catch (IOException e) {
-	    throw new SRMProtocolException("Cannot read 'rds' input, " +
-		e.getMessage());
-	}
-
-    } // end parseKeyValue
-
-    /**
-     * To synchronize the protocol wait for RDS prompt and then send 
-     * a given command to RDS.
-     * @param cmd defines the rds command, -S -p ...
-     * @throws SRMProtocolException if a protocol violation has occurred.
-     */
-    private void wrCmd(String cmd) throws SRMProtocolException {
-
-	if (checkPrompt()) {
-	    SRMDebug.trace(SRMDebug.RDS_CMD_IFC, "> " + COMMAND + cmd);
-	    pw.println(COMMAND + cmd);
-	    pw.flush();
-	} else {
-	    throw new SRMProtocolException(
-		"Cannot execute \"" + cmd + "\" command");
-	}
-
-    } // end wrCmd
-
-    /**
-     * Read the data stream and wait for RDS prompt. This will synchronize
-     * the protocol flow.
-     * @throws SRMProtocolException if a protocol violation has occurred.
-     */
-    private boolean checkPrompt() throws SRMProtocolException {
-
-	int tries = 1000;
-	int idx;
-	try {
-	    while (tries-- > 0) {
-		if ((line = in.readLine()) != null) {
-		    SRMDebug.trace(SRMDebug.RDS_CMD_IFC, "< " + line);
-		    if ((idx = line.indexOf(' ')) == -1) {
-			key = line;
-			if (key.equals(PROMPT)) {
-			    return true;
-			} else {
-			    continue;
-			}
-		    } else {
-			key = line.substring(0, idx);
-			val = line.substring(idx + 1);
-			if (key.equals(RDERR)) {
-			    throw new SRMProtocolException("RDS error: " + val);
-			} else if (key.equals(PROMPT)) {
-			    return false;
-			} else {
-			    continue;
-			}
-		    }
-
-		} else {
-		    throw new SRMProtocolException("Cannot read 'rds' prompt");
-		}
-	    }
-
-	} catch (IOException e) {
-	    throw new SRMProtocolException("Cannot read 'rds' prompt," +
-		e.getMessage());
-	}
-	return false;
-
-    } // end checkPrompt
-
-    /**
-     * Check if rds is still running
-     */
-    private boolean checkRDSrunning() {
-    
-    	try {
-    	    exitV = p.exitValue();
-	    return false;
-	} catch (IllegalThreadStateException e) {
-	    return true;
-    	}
-    }
-
-    /**
-     * Dump remianders from rds stderr stream.
-     */
-    private void dumpStdErr() {
-    	String inLine;
-	
-    	try {	    
-    	    while (err.ready()) {
-	    	inLine = err.readLine();
-	    	SRMDebug.trace2("RDS stderr: " + inLine);
-	    }
-    	} catch (IOException e) {
-	    SRMDebug.trace(SRMDebug.TRACE_ALL, e.getMessage());	
-	}
-    }
-
-    private synchronized String readLine()
-	    throws IOException {
-
-	    return in.readLine();
-    }
-
-    /**
-     * This thread carries out the public methods start, update,
-     * alive, close and shutdown in its own execution thread. The caller
-     * of these methods waits for the results the from him specified timeout.
-     */
-    class SRMWorker extends Thread {
-    	// internal code method calls
-    	private final static int START_METHOD = 1;
-    	private final static int UPDATE_METHOD = 2;
-    	private final static int ALIVE_METHOD = 3;
-    	private final static int CLOSE_METHOD = 4;
-    	private final static int SHUTDOWN_METHOD = 5;
-    	// last method's exception is end in ran method and checked
-	// in 
-	private SRMProtocolException methodException;
-	// method to be called in run 
-    	private int methodToRun;
-	private boolean methodFinished = false;
-	// args to be passed in run
-    	private String	args;
-	private String	argsArray[];
-	// All clients should check this flag before calling notifyAll().
-	// If false, the client should  call wait() and wait till this
-	// thread is executing its run() method.
-    	private boolean readyToRun = false;
-    
-    	public SRMWorker() {
-	    super("SRMWorker");
-	}
-    
-    	public void start(String []cmdArgs, int timeout)
-	    throws SRMProtocolException {
-	    argsArray = cmdArgs;
-	    runMethod(START_METHOD, timeout);
-	}
-	public void update(String option, int timeout)
-	    throws SRMProtocolException {
-    	    args = option;
-    	    runMethod(UPDATE_METHOD, timeout);
-	}
-	public void alive(int timeout) throws SRMProtocolException {
-    	    args = null;
-    	    runMethod(ALIVE_METHOD, timeout);
-	}
-    	public void close(int timeout) {
-	    args = null;
-	    try {
-	    	runMethod(CLOSE_METHOD, timeout);
-	    } catch (SRMProtocolException e) {};
-	}
-	public void shutdown(int timeout) {
-    	    args = null;
-	    try {
-    	    	runMethod(SHUTDOWN_METHOD, timeout);
-	    } catch (SRMProtocolException e) {};
-	}
-
-    	public synchronized void run() {
-
-    	    readyToRun = true; // synchronize with posible clients
-	    notifyAll(); 
-	    try {
-    	    	while (true) {
-	    	    wait(); // wait for task
-			try {
-			    switch (methodToRun) {
-			    case START_METHOD : _startRDS(argsArray); break;
-			    case UPDATE_METHOD: _getUpdate(args); break;
-			    case ALIVE_METHOD: _alive(); break;
-			    case CLOSE_METHOD : _closeRDS(); break;
-			    case SHUTDOWN_METHOD : _shutdownRDS(); break;
-			    default : methodException =
-			    	new SRMProtocolException("unknown method: " +
-				    methodToRun);
-			    }
-			} catch (SRMProtocolException e) {
-			    // pass it to the caller
-			    methodException  = e;
-			}
-			methodFinished = true;
-			notifyAll();
-		}
-	    } catch (InterruptedException e) {};
-	}
-		
-	private synchronized void runMethod(int method, int timeout)
-	    throws SRMProtocolException {
-	
-    	    methodToRun = method;
-	    methodException = null;
-	    methodFinished = false;
-	    try {
-	    	// wait till this thread has reached its run method.
-    	    	if (readyToRun == false) {
-	    	    wait(timeout);
-	    	}
-	    	notifyAll();	// kick it off
-	    	wait(timeout); 
-	    } catch (InterruptedException e) {
-	    	return;
-	    }
-	    // pass an exception if any
-	    if (methodException != null)
-	    	throw methodException;
-	    // check if the call was finished in the given time 
-	    if (methodFinished == false)
-		throw new 
-		SRMProtocolException("can't execute rds command, timeout");
-	}
-    }
-    
-    /**
-     * An exception thrown by the parsing code if rds reports 'busy'.
-     */
-    class SRMProtocolBusyException extends SRMProtocolException {
-
-	public SRMProtocolBusyException(String s) {
-	    super(s);
-	}
-
-    } // end class SRMProtocolBusyException
-
-} // end class SRMDataReader
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SRMDebug.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,550 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SRMDebug.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import java.io.*;
-import java.util.*;
-import java.text.*;
-import java.sql.Time;
-
-/**
- * This class is a COPY of the com.sun.wbem.client.Debug class. It is
- * slightly modified for the srm package requirements.
- *
- * The Debug class provides the ability to write debug trace statements
- * to an output device; either stdout, stderr, or a file.  Tracing is
- * controlled by two perfprovider properties:
- *.p
- * ProviderDEBUGLEVEL  - Sets the level of detail of tracing statements
- * ProviderDEBUGDEVICE - Sets the output device: stdout, sdterr, file
- *.p
- * The trace level is a combination of detail level and optional
- * information to be included on each statement.  The level is
- * a hexadecimal value from zero to 0xff:
- * bits 7 6 5 4  3 2 1 0
- *      ^ ^ ^ ^  ^ ^ ^ ^----- - provider method calls
- *      | | | |  | | +------- - provider method return values
- *      | | | |  | +--------- - rds command interface
- *      | | | |  +----------- - rds data flow
- *      | | | |
- *      | | | +------------- - thread synchronization
- *      | | +--------------- - unused
- *      | +----------------- - unused
- *      +------------------- - unused
- *
- * Optional information is
- * controlled by adding one or more modifiers to the level number,
- * including "t" to include a time stamp, "m" to include the class
- * and method name writing the trace statement, and "p" to include
- * the thread identifier.  Thus, a value for ProviderDEBUGLEVEL
- * might appear as
- *.p
- * ProviderDEBUGLEVEL =01tmp
- *.p
- * If the debug device is set to "file", a default trace filename
- * consisting of the name "wbem_client_mmdd_hhmm" is used for client
- * side tracing, and the name "perfprovider_mmdd_hhmm" is used for
- * server side tracing.  The mmdd_hhmm is the current time the trace
- * file is opened.  The default directory for the trace file is
- * /var/tmp.  The debug device may be set to a fully qualified
- * file path name, if desired.  If the client application cannot
- * write to the log file, tracing will be turned off.
- * 
- * @version 1.5  05/29/01
- * @author	Sun Microsystems, Inc.
- */
-public final class SRMDebug {
-
-    // =====================================================================
-    //
-    // Static define constant to control compilation of trace methods
-    //
-    // =====================================================================
-
-    // If this flag is set to true, the trace method implementation code
-    // will be active and tracing can be controlled through the runtime
-    // wbem.debug.level system property.  If this flag is set to false,
-    // the compiler should remove the method implementation, leaving an
-    // empty method.  This should allow JIT compilers to inline these
-    // methods, resulting in the debugging trace method call being
-    // removed from the tracing code!
-
-    // XXXX - Typically set to true for development phases, reset to
-    // XXXX - false for shipped code.
-
-    private static final boolean ON = true;
-
-    // =====================================================================
-    //
-    // Private define constants
-    //
-    // =====================================================================
-
-    private final static String TRACE_DIR = "/var/tmp";
-    private final static String TRACE_STDERR_NAME = "stderr";
-    private final static int TRACE_OFF = 0;
-    private final static int TRACE_STDERR = 2;
-    private final static int TRACE_FILE = 3;
-    private final static int TRACE_RETRY = 5;
-
-    // =====================================================================
-    //
-    // Private attributes
-    //
-    // =====================================================================
-
-    // Private static attributes
-    private static boolean trace_init = false;
-    private static int trace_level = TRACE_OFF;
-    private static boolean trace_time = false;
-    private static boolean trace_method = false;
-    private static boolean trace_thread = false;
-    private static int trace_out = TRACE_STDERR;
-    private static FileWriter trace_fw;
-    private static BufferedWriter trace_bw;
-    private static PrintWriter trace_pw;
-
-    // =====================================================================
-    //
-    // Public static attributes
-    //
-    // =====================================================================
-
-    static final int METHOD_CALL = 0x01;
-    static final int METHOD_RETV = 0x02;
-    static final int RDS_CMD_IFC = 0x04;
-    static final int RDS_DATAFLW = 0x08;
-    static final int THREAD_SYNC = 0x10;
-    static final int UNUSED1 	 = 0x20;
-    static final int UNUSED2 	 = 0x40;
-    static final int UNUSED3 	 = 0x80;
-    static final int TRACE_ALL 	 = 0xFF;
-
-    // =====================================================================
-    //
-    // Public static methods
-    //
-    // =====================================================================
-
-    /**
-     * The traceOpen method initializes the client or server 
-     * for debug tracing.  The level of tracing is specified as a hexadecimal
-     * from zero (no tracing) to ff (most detailed tracing) with
-     * optional characters to indicate additional message prefix informatino.
-     * The trace file name argument can specify output to standard out,
-     * standard error, or a specific log trace file name.  The management
-     * client and management server will each specify a different trace
-     * file name.  The trace file will be written to the local system's
-     * /var/log directory.
-     *
-     * @param	level	    The debug trace level: {0|1|2|3} + t, m, p
-     * @param	filename    The debug trace log file name, stdout, or stderr
-     */
-    public static final void traceOpen(String level, String filename) {
-
-	if (SRMDebug.ON) {
-	    openTrace(level, filename);
-	}
-
-    }
-
-    /**
-     * The isOn method returns true if debug tracing is configured
-     * and the debug trace level is greater than zero (tracing is
-     * enabled at some level).
-     *
-     * @return	True if some level of tracing is enabled
-     */
-    public static final boolean isOn() {
-
-        if (SRMDebug.ON) {
-	    if (trace_level > 0) {
-		return (true);
-	    }
-	}
-	return (false);
-
-    }
-    
-    /**
-     * The isOn method returns true if debug tracing is configured
-     * and the debug trace level mask is equal to the level.
-     *
-     * @return	True if some level of tracing is enabled
-     */
-    public static final boolean isOn(int level) {
-
-        if (SRMDebug.ON) {
-	    if ((trace_level & level) != 0) {
-		return (true);
-	    }
-	}
-	return (false);
-
-    }
-
-    /**
-     * This debug trace message method writes the message to the trace
-     * log device if we are tracing at the level mask given by level.
-     *
-     * @param	message The debug trace message
-     */
-    public static final void trace(int level, String message) {
-
-	if (SRMDebug.ON) {
-	    if ((trace_level & level) != 0) {
-		writeTrace(message);
-	    }
-	}
-
-    }
-
-    /**
-     * This debug trace message method writes the message and an exception
-     * stack trace to the log if we are tracing at level 1.
-     *
-     * @param	message	The debug trace message
-     * @param	ex	The exception to trace back
-     */
-    public static final void trace1(String message, Throwable ex) {
-
-	if (SRMDebug.ON) {
-	    if (trace_level > 0) {
-		writeTrace(message);
-		if (ex != null) {
-		    writeStackTrace(ex);
-		}
-	    }
-	}
-
-    }
-
-    /**
-     * This debug trace message method writes the message to the trace
-     * log device if we are tracing at level 2.
-     *
-     * @param	message The debug trace message
-     */
-    public static final void trace2(String message) {
-
-	if (SRMDebug.ON) {
-	    if (trace_level > 1) {
-		writeTrace(message);
-	    }
-	}
-
-    }
-
-    /**
-     * This debug trace message method writes the message and an exception
-     * stack trace to the log if we are tracing at level 2.
-     *
-     * @param	message	The debug trace message
-     * @param	ex	The exception to trace back
-     */
-    public static final void trace2(String message, Throwable ex) {
-
-	if (SRMDebug.ON) {
-	    if (trace_level > 1) {
-		writeTrace(message);
-		if (ex != null) {
-		    writeStackTrace(ex);
-		}
-	    }
-	}
-
-    }
-
-    /**
-     * This debug trace message method writes the message to the trace
-     * log device if we are tracing at level 3.
-     *
-     * @param	message The debug trace message
-     */
-    public static final void trace3(String message) {
-
-	if (SRMDebug.ON) {
-	    if (trace_level > 2) {
-		writeTrace(message);
-	    }
-	}
-
-    }
-
-    /**
-     * This debug trace message method writes the message and an exception
-     * stack trace to the log if we are tracing at level 3.
-     *
-     * @param	message	The debug trace message
-     * @param	ex	The exception to trace back
-     */
-    public static final void trace3(String message, Throwable ex) {
-
-	if (SRMDebug.ON) {
-	    if (trace_level > 2) {
-		writeTrace(message);
-		if (ex != null) {
-		    writeStackTrace(ex);
-		}
-	    }
-	}
-
-    }
-
-    // ********************************************************************
-    //
-    // Private methods
-    //
-    // *******************************************************************
-
-    // Internal method to open the trace log file
-    private static void openTrace(String level, String filename) {
-
-	String trace_file = null;
-	String trace_sufx = null;
-	int i;
-
-	if (trace_init)
-	    return;
-
-	// Get the trace level and any optional flags
-	trace_level = TRACE_OFF;
-	trace_time = false;
-	trace_method = false;
-	trace_thread = false;
-	if (level != null) {
-	    try {
-	    	trace_level = Integer.parseInt(level.substring(0, 2), 16);
-	    } catch (Exception ex) {
-		trace_level = 0;
-	    }
-	    if (level.indexOf('t') > 0) {
-		trace_time = true;
-	    }
-	    if (level.indexOf('m') > 0) {
-		trace_method = true;
-	    }
-	    if (level.indexOf('p') > 0) {
-		trace_thread = true;
-	    }
-	}
-
-	// If tracing turned off at runtime, just return.
-	if (trace_level == 0) {
-	    return;
-	}
-
-	// Set the output device for tracing.  Must be stdout, stderr,
-	// or a file name.  If invalid, set tracing off silently!
-	if ((filename != null) && (filename.trim().length() != 0)) {
-    	    if (filename.equals(TRACE_STDERR_NAME))
-		trace_out = TRACE_STDERR;
-	    else {
-		trace_out = TRACE_FILE;
-		trace_file = filename.trim();
-	    }
-	} else {
-	    // Invalid or null trace file name; default to stderr.
-	    trace_level = TRACE_STDERR;
-	}
-
-	// If tracing to a file, form the fully qualified path name to the
-	// file.  Trace file suffix is .MMDD_HHMM from current time.
-	// Trace file will be opened in the system temp directory.
-	// If it already exists, add a numeric suffix until not found.
-	if ((trace_out == TRACE_FILE) && (trace_level > 0)) {
-	    if (trace_file.indexOf(File.separatorChar) < 0) {
-		trace_file = getLogDir() + File.separator + trace_file;
-	    }
-	    SimpleDateFormat sdf = new SimpleDateFormat("MMdd_HHmm");
-	    trace_sufx = "_" + sdf.format(new Date());
-	    trace_file = trace_file +  trace_sufx;
-	    String name = trace_file;
-	    for (i = 1; i < TRACE_RETRY; i++) {
-		try {
-		    File fd1 = new File(name);
-		    if (!(fd1.exists()))
-			break;
-		    name = trace_file + "_" + i;
-		} catch (Exception ex) {
-		    // Eat exceptions
-		}
-	    }				    // End of for
-	    if (i < TRACE_RETRY) {
-		try {
-		    trace_fw = new FileWriter(name);
-		    trace_bw = new BufferedWriter(trace_fw);
-		    trace_pw = new PrintWriter(trace_bw, true);
-		} catch (Exception ex) {
-		    // Eat exceptions and turn off tracing if errors
-		    trace_level = 0;
-		}
-	    } else			    // File already exists!
-		trace_level = 0;
-	}
-
-	// Indicate we have initialized tracing
-	trace_init = true;
-
-    }
-
-    // Internal method to write an exception stack trace to the log.
-
-    private static void writeStackTrace(Throwable ex) {
-
-	try {
-	    if (trace_out == TRACE_FILE) {
-		ex.printStackTrace(trace_pw);
-	    } else if (trace_out == TRACE_STDERR) {
-		ex.printStackTrace(System.err);
-	    }
-	} catch (Exception x) {
-	    // Eat exceptions
-	}
-
-    }
-
-    // Return the trace log file directory
-
-    private static String getLogDir() {
-
-	// For now, this is fixed.  Need to make is smarter when
-	// running client on a Wintel machine.
-	return (TRACE_DIR);
-
-    }
-
-    // Return the class name and method name that called the trace method.
-
-    private static String getClassMethod() {
-
-	String line;
-	String clm;
-
-	clm = null;
-	try {
-	    InputStream is = getStackStream();
-	    BufferedReader br = new BufferedReader(new InputStreamReader(is));
-	    br.readLine();		// Skip top five lines...
-	    br.readLine();
-	    br.readLine();
-	    br.readLine();
-	    br.readLine();
-	    line = br.readLine();	// This should be caller from stack
-	    clm = getCaller(line);	// Pull out class and method name
-	    br.close();
-	} catch (Exception ex) {
-	    clm = "??:??";		// If any errors, don't know names
-	}
-
-	return (clm);
-    }
-
-    // Write trace message.  Ignore exceptions...
-
-    private static synchronized void writeTrace(String msg) {
-
-	String trace_msg = "";
-	if (trace_time) {
-	    Time tim = new Time(System.currentTimeMillis());
-	    trace_msg = tim.toString() + " | ";
-	}
-	if (trace_thread) {
-	    Thread th = Thread.currentThread();
-	    trace_msg = trace_msg + th.getName() + " | ";
-	}
-	if (trace_method) {
-	    trace_msg = trace_msg + getClassMethod() + " | ";
-	}
-	trace_msg = trace_msg + msg;
-	try {
-	    if (trace_out == TRACE_FILE) {
-		trace_pw.println(trace_msg);
-	    } else if (trace_out == TRACE_STDERR) {
-		System.err.println(trace_msg);
-	    }
-	} catch (Exception ex) {
-	    // Eat exceptions
-	}
-
-    }
-
-    // Get stack trace for determining calling class and method
-
-    private static InputStream getStackStream() {
-
-	ByteArrayInputStream is = null;
-	ByteArrayOutputStream os = new ByteArrayOutputStream();
-
-	try {
-	    PrintWriter pw = new PrintWriter(os);
-	    new Exception().printStackTrace(pw);
-	    pw.close();
-	    is = new ByteArrayInputStream(os.toByteArray());
-	} catch (Exception ex) {
-	    is = null;
-	}
-
-	return (is);
-
-    }
-
-    // Get class name and method name from stack trace line
-
-    private static String getCaller(String line) {
-
-	String str, mth, cls;
-	int i;
-
-	str = line;
-	i = line.indexOf('(');
-	if (i > 0)
-	    str = line.substring(0, i);
-	i = str.indexOf("at");
-	if (i > 0)
-	    str = str.substring(i+3);
-	i = str.lastIndexOf('.');
-	if (i > 0) {
-	    mth = str.substring(i+1);
-	    str = str.substring(0, i);
-	    i = str.lastIndexOf('.');
-	    if (i > 0)
-		cls = str.substring(i+1);
-	    else
-		cls = str;
-	    str = cls + ":" + mth;
-	}
-
-	return (str);
-    }
-
-}
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SRMException.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SRMException.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-
-/**
- * The class Exception and its subclasses indicate error conditions in the
- * Solaris resource management classes.
- */
-class SRMException extends Exception {
-
-    public SRMException() {
-	super();
-    }
-
-    public SRMException(String s) {
-	super(s);
-    }
-
-} // end class SRMException
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SRMProtocolException.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SRMProtocolException.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-
-/**
- * The class Exception indicate error conditions in the
- * protocol between rds application and srm classes
- */
-class SRMProtocolException extends SRMException {
-
-    public SRMProtocolException(String s) {
-	super(s);
-    }
-
-} // end class SRMProtocolException
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SRMProvider.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,585 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SRMProvider.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-import javax.wbem.client.*;
-import javax.wbem.provider.*;
-import javax.wbem.query.*;
-
-import com.sun.wbem.utility.log.*;
-import com.sun.wbem.utility.authorization.AuthorizationUtility;
-import com.sun.wbem.solarisprovider.common.ProviderUtility;
-
-import java.util.Vector;
-
-
-/**
- * This is the base class for the SRM providers.
- * It contains default implementations of the WBEM provider API methods which
- * return the CIM_ERR_NOTSUPPORTED error. Each concrete user manager provider
- * subclass overrides the methods with its own implementation. This class also
- * contains several utility methods which may be useful to the individual
- * provider classes.
- * @author Sun Microsystems
- */
-public abstract class SRMProvider
-	implements InstanceProvider, MethodProvider, SRMProviderProperties {
-
-    /**
-     * The handle to the CIMOM.
-     */
-    private CIMOMHandle cimomhandle = null;
-
-    /**
-     * Handle to the log service.
-     */
-    LogUtil logUtil = null;
-
-    /**
-     * Some often used exception are defined here to save some memory.
-     */
-    protected static final CIMProviderException notFoundEx =
-    	new CIMProviderException(CIMException.CIM_ERR_NOT_FOUND);
-	
-    protected static final CIMProviderException generalEx =
-    	new CIMProviderException(CIMProviderException.GENERAL_EXCEPTION);
-		
-    protected static final CIMException	notSupported = 
-    	new CIMException(CIMException.CIM_ERR_NOT_SUPPORTED);
-
-    /**
-     * Severity indicator 'ERROR' for logging.
-     */
-    protected static final int LOGERROR = LogUtil.ERROR;
-
-    /**
-     * Severity indicator 'WARNING' for logging.
-     */
-    protected static final int LOGWARNING = LogUtil.WARNING;
-
-    /**
-     * Severity indicator 'INFO' for logging.
-     */
-    protected static final int LOGINFO = LogUtil.INFO;
-
-    /**
-     * Classname of resource messages for logging.
-     */
-    protected static final String RESOURCEBUNDLE =
-    	"com.sun.wbem.solarisprovider.srm.resources.LogMessages";
-    
-    /**
-     * Handle to the resource monitor, which controls the access
-     * into the resource data cache (DataModel).
-     */
-    ResourceMonitor resourceMonitor;
-
-    /**
-     * This must be implemented by each subclass to make its
-     * class name visible.
-     * @returns String provider class name
-     */
-    protected abstract String getProviderName(); 
-
-    
-    //
-    // Default implementations of the WBEM Provider API methods
-    //
-
-
-    /**
-     * Called by the CIMOM when the provider is initialized.
-     *
-     * @exception   CIMException    the client connection failed
-     */
-    public void initialize(CIMOMHandle cimomhandle)
-	throws CIMException {
-	
-    	int updateTime = -1;
-    	int rdsTimeout = -1;
-    	int rdsInterval = -1;
-
-	// Save the cimomhandle.
-	this.cimomhandle = cimomhandle;
-
-	// Establish the logging facility
-	logUtil = LogUtil.getInstance(cimomhandle);
-		
-	try {
-	    if (Util.propertyUPDATETIME != null) {
-	    	updateTime = Integer.parseInt(Util.propertyUPDATETIME);
-	    }
-	    if (Util.propertyRDSTIMEOUT != null) {
-	    	rdsTimeout = Integer.parseInt(Util.propertyRDSTIMEOUT);
-	    }
-	    if (Util.propertyRDSINTERVAL != null) {
-	    	rdsInterval = Integer.parseInt(Util.propertyRDSINTERVAL);
-	    }
-	} catch (Exception e)  { };
-
-	try {
-	    resourceMonitor = ResourceMonitor.getHandle();
-	    resourceMonitor.openDataModel(rdsTimeout, rdsInterval, updateTime);
-	} catch (Exception e) {
-	    String msg = writeLog(LOGERROR, "SRM_1000", "SRM_10000");
-	    writeLog(LOGERROR, e);
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-
-    } // end initialize
-
-    /**
-     * Called by the CIMOM when the provider is removed. Currently the CIMOM
-     * does not remove providers, but this method is provided for future
-     * versions.
-     *
-     * @exception CIMException	The method cleanup() throws a CIMException.
-     */
-    public void cleanup() throws CIMException {
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, "closing rds data model");		
-	resourceMonitor.closeDataModel();
-    }
-
-    /**
-     * This method must be implemented by instance providers to create
-     * the instance specified in the object path. If the instance does
-     * exist, CIMInstanceException with ID CIM_ERR_ALREADY_EXISTS
-     * must be thrown. The parameter should be the instance name.
-     *
-     * @param	op	The path of the instance to be set. The important part
-     *			in this parameter is the namespace component.
-     * @param	ci	The instance to be set.
-     * @return	CIMObjectPath of the instance that was created.
-     * @exception CIMException	This method throws a CIMException.
-     */
-    public synchronized CIMObjectPath createInstance(CIMObjectPath op,
-					CIMInstance ci)
-	    throws CIMException {
-
-	throw notSupported;
-    }
-
-    /**
-     * Retrieves the instance specified in the argument CIMObjectPath.
-     *
-     * @param op - the name of the instance to be retrieved. This must include
-     * all of the keys and values for the instance.
-     * @param localOnly - if true, only the local properties of the class are
-     * returned, otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be returned. Any duplicate properties will
-     * be ignored.
-     * @param cc - the class reference
-     *
-     * @return	CIMInstance the retrieved instance.
-     * @exception CIMException - the method getInstance throws a CIMException
-     * if the CIMObjectPath is incorrect or does not exist.
-     */
-    public synchronized CIMInstance getInstance(CIMObjectPath op,
-				   boolean localOnly,
-				   boolean includeQualifiers,
-				   boolean includeClassOrigin,
-				   String[] propList,
-				   CIMClass cc)
-	    throws CIMException {
-
-	throw notSupported;
-    }
-
-    /**
-     * This method must be implemented by instance providers to set
-     * the instance specified in the object path. If the instance does
-     * not exist, CIMInstanceException with ID CIM_ERR_NOT_FOUND
-     * must be thrown. The parameter should be the instance name.
-     *
-     * @param	op	The path of the instance to be set. The important part
-     *			in this parameter is the namespace component.
-     * @param	ci	The instance to be set.
-     * @exception CIMException	The setInstance method throws a CIMException.
-     */
-    public synchronized void setInstance(CIMObjectPath op,
-			    CIMInstance ci)
-	    throws CIMException {
-
-	throw notSupported;
-    }
-
-    /**
-     * This method must be implemented by instance providers to delete
-     * the instance specified in the object path.
-     *
-     * @param	ci	The instance to be deleted.
-     * @exception CIMException	The deleteInstance method throws a
-     *				CIMException.
-     */
-    public synchronized void deleteInstance(CIMObjectPath op)
-	    throws CIMException {
-
-	throw notSupported;
-    }
-
-    /**
-     * Enumerates all instances of the class which is specified by the
-     * CIMObjectPath argument. The entire instances and not just the names
-     * are returned.
-     *
-     * @param op - the object path specifies the class to be enumerated
-     * localOnly - if true, only the local properties of the class are returned,
-     * otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be
-     * returned. Any duplicate properties will be ignored.
-     * @param cc - the class reference
-     * @return An array of CIMInstance
-     * @exception CIMException - if the CIMObjectPath is incorrect or does not
-     * exist.
-     */
-    public synchronized CIMInstance[] enumerateInstances(CIMObjectPath op,
-					    boolean localOnly,
-					    boolean includeQualifiers,
-					    boolean includeClassOrigin,
-					    String[] propList,
-					    CIMClass cc)
-	    throws CIMException {
-
-	throw notSupported;
-    }
-   
-    /**
-     * Enumerates all of the instances of the class which is specified by
-     * the CIMObjectPath argument. Only the class name portion of the
-     * CIMObjectPath argument is used, any additional information will be
-     * ignored
-     *
-     * @param op - the class name to enumerate the instances
-     * @param cc - the class reference passed to the provider
-     * @return an array of CIMObjectPath containing names of the enumerated
-     * instances.
-     * @exception CIMException - if the classname is null or does not exist.
-     */
-    public synchronized CIMObjectPath[] enumerateInstanceNames(CIMObjectPath op,
-						boolean deep,
-						CIMClass cc)
-	    throws CIMException {
-
-	throw notSupported;
-    }
-
-    /**
-     * This method must be implemented by instance providers to enumerate
-     * instances of the class which is specified in op which meet the criteria
-     * defined by the query string.
-     *
-     * @param	op	The object path specifies the class that must
-     *			be enumerated.
-     * @param	query	The criteria.
-     * @param	ql	The CIM query.
-     * @param	cc	The class reference.
-     * @return CIMInstance The retrieved instance.
-     * @exception CIMException	This method throws a CIMException message if the
-     *				if operation is not supported.
-     */
-    public synchronized CIMInstance[] execQuery(CIMObjectPath op,
-				   String query,
-				   String ql,
-				   CIMClass cc)
-	    throws CIMException {
-
-	writeLog(LOGINFO,
-	  "SRM_0001",
-	  "SRM_5003",
-	  op.toString(), query, ql);
-	
-	throw notSupported;
-    }
-
-    /**
-     * This method contains the implementation for the method. The CIMOM calls
-     * this method when the method specified in the parameters is to be invoked.
-     * @param op	 Contains the path to the instance whose method must be
-     *			 invoked.
-     * @param methodName The name of the method.
-     * @param inParams	 This is a vector of CIMValues which are the input
-     *			 parameters for the method.
-     * @param outParams  This is a vector of CIMValues which are the output
-     *			 parameters for the method.
-     * @return CIMValue  The return value of the method. If the method has no
-     *			 return value, it must return null.
-     * @exception CIMException	This method throws a CIMException
-     */
-    public synchronized CIMValue invokeMethod(CIMObjectPath op, 
-    	String methodName, Vector inParams, Vector outParams)
-	throws CIMException {
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString() + methodName);	
-	if (methodName.equalsIgnoreCase("getBulkData")) {
-	    return getBulkData(outParams);
-	} else {
-            throw new CIMMethodException(CIMMethodException.NO_SUCH_METHOD,
-                methodName, op.getObjectName());
-	}
-
-    } // end invokeMethod
-
-    /**
-     * This method contains the implementation for the method. The CIMOM calls
-     * this method when the method specified in the parameters is to be invoked.
-     * @param op    Contains the path to the instance whose method must be
-     *	    	    invoked.
-     * @param methodName    The name of the method.
-     * @param outParams This is a vector of CIMValues which are the output
-     *      	    parameters for the method.
-     * @return CIMValue The return value of the method. If the method has
-     *	    	    no return value, it must return null.
-     * @exception CIMException The invokeMethod method throws a CIMException.
-     */
-    protected CIMValue getBulkData(Vector outParams)
-    	throws CIMException {
-	throw notSupported;
-    }
-
-    //
-    // Logging methods.
-    // 
-    
-    /**
-     * Utility logging method.
-     * @return the log message.
-     * @param 	severity 	the reported severity level.
-     * @param 	x 		an Exception to be logged.
-     */
-    protected String writeLog(int severity, Exception x) {
-	return writeLog(severity, x.toString());
-    }
-
-    
-    /**
-     * Utility logging method.
-     * @return the log message.
-     * @param 	severity 	the reported severity level.
-     * @param 	summary 	the short summary to be logged.
-     * @param 	x 		an Exception to be logged.
-     */
-    protected String writeLog(int severity,
-      			    String summary,
-                            Exception x) {
-	return writeLog(severity, summary, x.toString());
-    }
-
-    
-    /**
-     * Utility logging method.
-     * @return the log message.
-     * @param 	severity 	the reported severity level.
-     * @param 	summary 	the short summary to be logged.
-     * @param 	detail 		the detailed message to be logged.
-     * @param 	x 		an Exception to be logged.
-     */
-    protected String writeLog(int severity,
-                            String summary,
-                            String detail,
-                            Exception x) {
-	return writeLog(severity, summary, detail, x.toString());
-    }
-
-    
-    /**
-     * Utility logging method.
-     * @return the log message.
-     * @param 	severity 	the reported severity level.
-     * @param 	summary 	the short summary to be logged.
-     */
-    protected String writeLog(int severity, String summary) {
-	return writeLog(severity,
-	  summary,
-	  null,
-	  null,
-	  null,
-	  null,
-	  null);
-    }
-
-
-    /**
-     * Utility logging method.
-     * @return the log message.
-     * @param 	severity 	the reported severity level.
-     * @param 	summary 	the short summary to be logged.
-     * @param 	detail 		the detailed message to be logged.
-     */
-    protected String writeLog(int severity,
-      			    String summary,
-      			    String detail) {
-	return writeLog(severity,
-	  summary,
-	  detail,
-	  null,
-	  null,
-	  null,
-	  null);
-    }
-
-    
-    /**
-     * Utility logging method.
-     * @return the log message.
-     * @param 	severity 	the reported severity level.
-     * @param 	summary 	the short summary to be logged.
-     * @param 	detail	 	the detailed message to be logged.
-     * @param 	arg1 		the first parameter to substitute
-     *				into the logged message.
-     */
-    protected String writeLog(int severity,
-      			    String summary,
-      			    String detail,
-      			    String arg1) {
-	return writeLog(severity,
-	  summary,
-	  detail,
-	  arg1,
-	  null,
-	  null,
-	  null);
-    }
-
-
-    /**
-     * Utility logging method.
-     * @return the log message.
-     * @param 	severity 	the reported severity level.
-     * @param 	summary 	the short summary to be logged.
-     * @param 	detail	 	the detailed message to be logged.
-     * @param 	arg1 		the first parameter to substitute
-     *				into the logged message.
-     * @param 	arg2 		the second parameter to substitute
-     *				into the logged message.
-     */
-    protected String writeLog(int severity,
-      			    String summary,
-      			    String detail,
-      			    String arg1,
-      			    String arg2) {
-	return writeLog(severity,
-	  summary,
-	  detail,
-	  arg1,
-	  arg2,
-	  null,
-	  null);
-    }
-
-    
-    /**
-     * Utility logging method.
-     * @return the log message.
-     * @param 	severity 	the reported severity level.
-     * @param 	summary 	the short summary to be logged.
-     * @param 	detail	 	the detailed message to be logged.
-     * @param 	arg1 		the first parameter to substitute
-     *				into the logged message.
-     * @param 	arg2 		the second parameter to substitute
-     *				into the logged message.
-     * @param 	arg3 		the third parameter to substitute
-     * 				into the logged message.
-     */
-    protected String writeLog(int severity, String summary,
-      			    String detail,
-      			    String arg1,
-      			    String arg2,
-      			    String arg3) {
-	return writeLog(severity,
-	  summary,
-	  detail,
-	  arg1,
-	  arg2,
-	  arg3,
-	  null);
-    }
-
-    
-    /**
-     * Utility logging method (bottom-level implementation).
-     * @return a formatted version of the log message
-     *           (<providerName>: <summaryMessage>).
-     * @param severity the reported severity level.
-     * @param summary the short summary to be logged.
-     * @param detail the detailed message to be logged.
-     * @param arg1 the first parameter to substitute into the logged message.
-     * @param arg2 the second parameter to substitute into the logged message.
-     * @param arg3 the third parameter to substitute into the logged message.
-     * @param arg4 the fourth parameter to substitute into the logged message.
-     */
-    protected String writeLog(int severity,
-      			    String summary,
-      			    String detail,
-      			    String arg1,
-      			    String arg2,
-      			    String arg3,
-      			    String arg4) {
-	String[] args = {arg1, arg2, arg3, arg4};
-	String logmsg = "";
-
-	try {
-	    logUtil.writeLog(
-		getProviderName(),
-		  summary,
-		  detail,
-		  args,
-		  "",
-		  true, 
-		  LogUtil.APPLICATION_LOG,
-		  severity,
-		  RESOURCEBUNDLE);
-	    
-	    logmsg = getProviderName() +
-	      		": " +
-	      		logUtil.getSummaryMesg(summary, true, RESOURCEBUNDLE);
-	} catch (Exception x) {
-	    System.err.println("writeLog threw " + x);
-	    x.printStackTrace();
-	}
-
-	return logmsg;
-    }
-
-    protected static String getBundleName() {
-	return (RESOURCEBUNDLE);
-    }
-
-} // end class SRMProvider
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SRMProviderDataModel.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,231 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SRMProviderDataModel.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-import java.util.LinkedHashMap;
-import java.util.Iterator;
-import java.util.Vector;
-
-/**
- * This is the base class for the SRM provider data models.
- * @author Sun Microsystems
- */
-abstract class SRMProviderDataModel implements SRMProviderProperties {
-
-    /*
-     * The updated flag is set if this data model has been updated, data model
-     * be reomoved from their list.that hasn't been
-     */
-    private boolean		updated;
-    private CIMObjectPath	op;   // the CIM object path to 'ci'
-    protected CIMInstance	ci;   // the CIM instance of this data model
-    protected Vector		opProperties; // object path properties
-
-    /**
-     * The keyValTab table contains, for each properties of the CIM class,
-     * one entry, where the hash key is the key from the RDS protocol and
-     * the hash value is a object of a class that implements the
-     * PropertyAccessInterface interface. It knows the type of the property
-     * and consequently how to access it.
-     */
-    protected LinkedHashMap   keyValTab;
-
-    // Computer name, common for all instances
-    protected static String csName = null;
-    // OS name, common for all instances
-    protected static String osName = null;
-    // provider's key name
-    protected String name = null;
-
-
-    /**
-     * Constructor, initialize the keyValTab. So, the setProperty() method can
-     * find the suitable property access object.
-     */
-    public SRMProviderDataModel() {
-	initKeyValTable();
-    }
-
-    /**
-     * Get a cim object path to a Solaris_SRMxxy object.
-     * @param cc - the class reference
-     * @return	object path to a Solaris_SRMxxyy instance
-     *		hosted by this object.
-     */
-    public CIMInstance getCIMInstance(CIMClass cc) {
-
-        if (ci == null) {
-            ci = cc.newInstance();
-	    Iterator i = keyValTab.values().iterator();
-	    while (i.hasNext()) {
-		((PropertyAccessInterface) i.next()).
-		    set(ci, PropertyAccessInterface.FLUSH, null);
-	    }
-	    setCIMInstance(true);
-        }
-        return ci;
-    }
-
-    /**
-     * Get a CIM object path to the CIM instance hosted by this object.
-     * @param elementName The name of the instance 
-     * @return object path to the  CIM instance hosted by this object.
-     */
-    public CIMObjectPath getCIMObjectPath(String elementName) {
-
-        if (op == null) {
-            op = new CIMObjectPath(elementName);
-            op.setNameSpace(NAMESPACE);
-            if (opProperties == null) {
-		opProperties = new Vector();
-                setOpPropertiesVector();
-            }
-            op.setKeys(opProperties);
-        }
-        return op;
-    }
-
-    /**
-     * Return all properties of this CIM instance as a string of name and
-     * values pairs.
-     * @return	String of properties name and value pairs.
-     */
-    public String toString() {
-
-	Iterator i = keyValTab.values().iterator();
-	StringBuffer sb = new StringBuffer();
-	while (i.hasNext()) {
-	    sb.append(((PropertyAccessInterface) i.next()).toString());
-	}
-	return sb.toString();
-    }
-
-    /**
-     * Return all property values of this CIM instance as a string. The
-     * values are in order defined in mof file and separated by ' '.
-     * @return	String of property values separated by ' '.
-     */
-    public String toBulkData() {
-
-	Iterator i = keyValTab.values().iterator();
-	StringBuffer sb = new StringBuffer();
-	sb.append(name +  ' ');
-	while (i.hasNext()) {
-	    sb.append(((PropertyAccessInterface) i.next()).getValue() + ' ');
-	}
-	sb.append("\n");
-	return sb.toString();
-    }
-
-    /**
-     * Set a property to the given value. Which property and how to access it
-     * will be find in the keyValTab according to the given key.
-     * @param	key	hash key value
-     * @param	val	the property value
-     */
-    void setProperty(String key, String val) {
-
-	PropertyAccessInterface ac;
-
-	if ((ac = (PropertyAccessInterface) keyValTab.get(key)) == null) {
-	    /* 
-	     * The rds has sent unknown key value pair,
-	     * just keep it secret
-	     */
-	} else {
-	    /*
-	     * Since, this method can be called before the cim instance has been
-	     * created we have to check that.
-	     * If ci hasn't been created keep the value in cache, otherwise
-	     * write it through the cache into the CIM instance.
-	     */
-	    ac.set(ci, (ci == null) ? PropertyAccessInterface.CACHE :
-		PropertyAccessInterface.CHECK_WTHROUGH, val);
-	}
-
-    } // end setProperty
-
-    /**
-     * If the value v is different form the current property value,
-     * set a string property.
-     * @param	b	force to set the property
-     * @param	n	the name of the property
-     * @param	v	the property value
-     */
-    void setStrProp(boolean b, String n,  String v) {
-
-        if (b || v.equals((String) (ci.getProperty(n).getValue().getValue())))
-	    ci.setProperty(n, new CIMValue(v));
-    }
-
-    /**
-     * Should be used to mark this data model as updated.
-     * @param	b	true marks this model as currently updated.
-     */
-    void setUpdated(boolean b) {
-	updated = b;
-    }
-
-    /**
-     * Returns true if this data model has been updated in the last update
-     * process.
-     * @return	the updated flag
-     */
-    boolean isUpdated() {
-	return updated;
-    }
-
-    /**
-     * Set additional properties, that can't be set through the setProperty
-     * method.
-     * @param	newInstance indicates a new instance and therefore force to
-     * to set all properties.
-     * @return	the updated flag
-     */
-    abstract protected void setCIMInstance(boolean newInstance);
-
-    /**
-     * Set the properties of the CIM object path instance. The properties
-     * are saved in the opProperties class field.
-     */
-    abstract protected void setOpPropertiesVector();
-
-    /**
-     * Set the keyValTab hash table.
-     * The keyValTab table contains, for each properties of the CIM class,
-     * one entry, where the hash key is the key from the RDS protocol and
-     * the hash value is a object of a class that implements the
-     * PropertyAccessInterface interface. This object knows the type of
-     * the property and consequently how to access it.
-     */
-    abstract protected void initKeyValTable();
-
-} // end class SRMProviderDataModel
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SRMProviderProperties.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,211 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SRMProviderProperties.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-/**
- * This class defines common properties used in Acacia
- * providers.
- * @author SMI
- */
-public interface SRMProviderProperties {
-
-    // Solaris classes
-    
-    /**
-     * CIM class name
-     */
-    static final String SOLARIS_ACTIVEPROJECT = "Solaris_ActiveProject";
-
-    /**
-     * CIM class name
-     */
-    static final String SOLARIS_ACTIVEUSER = "Solaris_ActiveUser";
-
-    /**
-     * CIM class name
-     */
-    static final String SOLARIS_ACTIVEUSERPROCESSAGGREGATESTATISTICS =
-                        "Solaris_ActiveUserProcessAggregateStatistics";
-
-    /**
-     * CIM class name
-     */
-    static final String SOLARIS_ACTIVEPROJECTPROCESSAGGREGATESTATISTICS =
-                        "Solaris_ActiveProjectProcessAggregateStatistics";
-    
-    /**
-     * CIM class name
-     */
-    static final String SOLARIS_PROCESSSTATISTICS  =
-                        "Solaris_ProcessStatistics";
-    
-    /**
-     * CIM class name
-     */
-    static final String SOLARIS_PROCESSSTATISTICALINFORMATION  =
-                        "Solaris_ProcessStatisticalInformation";
-    
-    /**
-     * CIM class name
-     */
-    static final String SOLARIS_PROCESS  =
-                        "Solaris_Process";
-    
-    /**
-     * CIM class name
-     */
-    static final String SOLARIS_PROCESSAGGREGATESTATISTICALINFORMATION  =
-                        "Solaris_ProcessAggregateStatisticalInformation";
-    
-    /**
-     * CIM class name
-     */
-    static final String SOLARIS_USERPROCESSAGGREGATESTATISTICALINFORMATION  =
-                        "Solaris_UserProcessAggregateStatisticalInformation";
-    
-    /**
-     * CIM class name
-     */
-    static final String SOLARIS_PROJECTPROCESSAGGREGATESTATISTICALINFORMATION  =
-                        "Solaris_ProjectProcessAggregateStatisticalInformation";
-    
-    /**
-     * CIM class name
-     */
-    static final String SOLARIS_PROCESSAGGREGATESTATISTICS  =
-                        "Solaris_ProcessAggregateStatistics";
-
-    
-    // Common properties
-    
-    /**
-     * Reference to the monitoring object
-     */
-    static final String ELEMENT  = "Element";
-    
-    /**
-     * Reference to the statistical information object
-     */
-    static final String STATS    = "Stats";
-    static final String NAME	 = "Name";
-    
-    /**
-     * The scoping ComputerSystem's CreationClassName.
-     */
-    static final String CSCREATIONCLASSNAME =	"CSCreationClassName";
-    
-    /**
-     * The scoping ComputerSystem's Name.
-     */
-    static final String CSNAME =		"CSName";
-    
-    /**
-     * The key of CSNAME property in RDS protocol
-     */
-    static final String CSNAME_KEY =		"sys_name";
-    
-    /**
-     * The scoping OperatingSystem's CreationClassName.
-     */
-    static final String OSCREATIONCLASSNAME =	"OSCreationClassName";
-    
-    /**
-     * The scoping OperatingSystem's Name.
-     */
-    static final String OSNAME =		"OSName";
-    
-    /**
-     * The key of OSNAME property in RDS protocol
-     */
-    static final String OSNAME_KEY =		"sys_nodename";
-
-    /** 
-     * CreationClassName indicates the name of the class or the subclass
-     * used in the creation of an instance. When used with the other key
-     * properties of this class, this property allows all instances of
-     * this class and its subclasses to be uniquely identified.
-     */
-    static final String CREATIONCLASSNAME =	"CreationClassName";
-    
-    /**
-     * The scoping ComputerSystem's CreationClassName.
-     */
-    static final String SYSTEMCREATIONCLASSNAME = "SystemCreationClassName";
-    
-    /**
-     * The scoping ComputerSystem's Name.
-     */
-    static final String SYSTEMNAME =		"SystemName";
-
-
-    // properties in the CIM_ManagedElement supersupersuperclass
-    
-    /**
-     * The Caption property is a short textual description (one-line string
-     * of the object.
-     */
-    static String   CAPTION = "Caption";
-    
-    /**
-     * The Description property provides a textual description of the object.
-     */
-    static String   DESCRIPTION = "Description";
-
-    
-    // properties in the CIM_ManagedSystemElement supersuperclass
-
-    /** 
-     * A datetime value indicating when the object was installed. A lack of
-     * a value does not indicate that the object is not installed.
-     */
-    static String   INSTALL_DATE = "InstallDate";
-    
-    static String   STATUS	 = "Status";
-
-    
-    // properties in the CIM_Process
-    static String   HANDLE = "Handle";
-
-    
-    // common properties value
-    
-    /**
-     * Value of the SOLARIS_CSCREATIONCLASSNAME property
-     */
-    static String   SOLARIS_COMPUTERSYSTEM  = "Solaris_ComputerSystem";
-    
-    /**
-     * Value of the SOLARIS_OSCREATIONCLASSNAME property
-     */
-    static String   SOLARIS_OPERATINGSYSTEM = "Solaris_OperatingSystem";
-
-    
-    // common constants
-    static String   NAMESPACE	= "root/cimv2";
-}
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SetProp.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SetProp.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-/**
- * This is the base class for set property classes. Each
- * derived class can format a string into one CIM data format.
- * @author Sun Microsystems
- */
-abstract class SetProp implements PropertyAccessInterface {
-
-    protected String	n;  // the property name
-    protected String	vs; // property value as a string
-    
-    /**
-     * Constructor
-     * @param n - the name of this property
-     */
-    public SetProp(String  name) {
-	n = name;
-    }
-    
-    /**
-     * Set the property value. Depending of the action flag perform
-     * the following actions:
-     * CACHE: only save it in the vs variable
-     * FLASH: format the value in vs variable and set it in ci instance
-     * CHECK_WTHROUGH: save val in vs and check if it is deferent form 
-     * the property in ci instance, if so set a new property value.
-     * @param ci a cim instance
-     * @param action the action to be done: CACHE, FLASH or CHECK_WTHROUGH
-     * @param val the property value
-     */
-    abstract public void set(CIMInstance  ci, byte action, String val);
-    
-    /**
-     * Returns a formated name value string of this property
-     * @return formated name value string of this property
-     */
-    public String toString() {
-     	return (n + " " + vs + '\n');
-    }
-    
-    /**
-     * Returns value string of this property
-     * @return value string of this property
-     */
-    public String getValue() {
-     	return vs;
-    }
-
-} // end class SetProp
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SetReal32Prop.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SetReal32Prop.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-
-class SetReal32Prop extends SetProp {
-
-    private float   v;  // value
-    
-    /**
-     * Constructor
-     * @param n - the name of this property
-     */
-    public SetReal32Prop(String  name) {
-    	super(name);
-    }
-    
-    /**
-     * Set the property value. Depending of the action flag perform
-     * the following actions:
-     * CACHE: only save it in the vs variable
-     * FLASH: format the value in vs variable and set it in ci instance
-     * CHECK_WTHROUGH: save val in vs and check if it is deferent form 
-     * the property in ci instance, if so set a new property value.
-     * @param ci a cim instance
-     * @param action the action to be done: CACHE, FLASH or CHECK_WTHROUGH
-     * @param val the property value
-     */
-    public void set(CIMInstance  ci, byte action, String val)
-	    throws NumberFormatException {
-    	
-    	vs = val;
-    	if (action != FLUSH)
-	    v = Float.parseFloat(val);
-	switch (action) {
-	    case CACHE : break;
-	    case CHECK_WTHROUGH :
-		if (v == ((Float)(ci.getProperty(n).
-			getValue().getValue())).floatValue())
-		    break;
-	    default: ci.setProperty(n, new CIMValue(new Float(v)));
-	}
-    }
-
-} // end class SetReal32Prop
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SetReal64Prop.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SetReal64Prop.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-
-class SetReal64Prop extends SetProp {
-
-    private double  v;  // value
-
-    /**
-     * Constructor
-     * @param n - the name of this property
-     */
-    public SetReal64Prop(String  name) {
-    	super(name);
-    }
-    
-    /**
-     * Set the property value. Depending of the action flag perform
-     * the following actions:
-     * CACHE: only save it in the vs variable
-     * FLASH: format the value in vs variable and set it in ci instance
-     * CHECK_WTHROUGH: save val in vs and check if it is deferent form 
-     * the property in ci instance, if so set a new property value.
-     * @param ci a cim instance
-     * @param action the action to be done: CACHE, FLASH or CHECK_WTHROUGH
-     * @param val the property value
-     */
-    public void set(CIMInstance  ci, byte action, String val)
-	    throws NumberFormatException {
-    	
-    	vs = val;
-    	if (action != FLUSH)
-	    v = Double.parseDouble(val);
-	switch (action) {
-	    case CACHE : break;
-	    case CHECK_WTHROUGH :
-		if (v == ((Double)(ci.getProperty(n).
-			getValue().getValue())).doubleValue())
-		    break;
-	    default: ci.setProperty(n, new CIMValue(new Double(v)));
-	}
-    }
-
-} // end class SetReal64Prop
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SetStringProp.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SetStringProp.java
- */
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-class SetStringProp extends SetProp {
-
-    private String	v;	// the cached property value
-
-    /**
-     * Constructor
-     * @param n - the name of this property
-     */
-    public SetStringProp(String  name) {
-    	super(name);
-    }
-    
-    /**
-     * Set the property value. Depending of the action flag perform
-     * the following actions:
-     * CACHE: only save it in the vs variable
-     * FLASH: format the value in vs variable and set it in ci instance
-     * CHECK_WTHROUGH: save val in vs and check if it is deferent form 
-     * the property in ci instance, if so set a new property value.
-     * @param ci a cim instance
-     * @param action the action to be done: CACHE, FLASH or CHECK_WTHROUGH
-     * @param val the property value
-     */
-    public void set(CIMInstance  ci, byte action, String val) {
-
-    	vs = val;
-	if (action != FLUSH)
-	    v = val;
-	switch (action) {
-	    case CACHE : break;
-	    case CHECK_WTHROUGH :
-		if (v.equals((String)(ci.getProperty(n).getValue().getValue())))
-		    break;
-	    default: ci.setProperty(n, new CIMValue(v));
-	}
-    }
-
-} // end class SetStringProp
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SetUI32Prop.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SetUI32Prop.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-class SetUI32Prop extends SetProp {
-
-    private int     v;  // value
-
-    /**
-     * Constructor
-     * @param n - the name of this property
-     */
-    public SetUI32Prop(String  name) {
-    	super(name);
-    }
-    
-    /**
-     * Set the property value. Depending of the action flag perform
-     * the following actions:
-     * CACHE: only save it in the vs variable
-     * FLASH: format the value in vs variable and set it in ci instance
-     * CHECK_WTHROUGH: save val in vs and check if it is deferent form 
-     * the property in ci instance, if so set a new property value.
-     * @param ci a cim instance
-     * @param action the action to be done: CACHE, FLASH or CHECK_WTHROUGH
-     * @param val the property value
-     */
-    public void set(CIMInstance  ci, byte action, String val)
-	    throws NumberFormatException {
-
-    	vs = val;
-	if (action != FLUSH)
-	    v = Integer.parseInt(val);
-	switch (action) {
-	    case CACHE : break;
-	    case CHECK_WTHROUGH :
-		if (v == ((UnsignedInt32)(ci.getProperty(n).
-			getValue().getValue())).longValue())
-		break;
-	    default: ci.setProperty(n, new CIMValue(new UnsignedInt32(v)));
-	}
-
-    } // end set
-
-} // end class SetUI32Prop
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SetUI64Prop.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,75 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SetUI64Prop.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-class SetUI64Prop extends SetProp {
-
-    private long	v;  // value
-        
-    /**
-     * Constructor
-     * @param n - the name of this property
-     */
-    public SetUI64Prop(String  name) {
-    	super(name);
-    }
-    
-    /**
-     * Set the property value. Depending of the action flag perform
-     * the following actions:
-     * CACHE: only save it in the vs variable
-     * FLASH: format the value in vs variable and set it in ci instance
-     * CHECK_WTHROUGH: save val in vs and check if it is deferent form 
-     * the property in ci instance, if so set a new property value.
-     * @param ci a cim instance
-     * @param action the action to be done: CACHE, FLASH or CHECK_WTHROUGH
-     * @param val the property value
-     */
-    public void set(CIMInstance  ci, byte action, String val)
-	    throws NumberFormatException {
-
-    	vs = val;
-    	if (action != FLUSH)
-	    v = Long.parseLong(val);
-	switch (action) {
-	    case CACHE : break;
-	    case CHECK_WTHROUGH :
-		if (v == ((UnsignedInt64)(ci.getProperty(n).
-			getValue().getValue())).longValue())
-		    break;
-	    default: ci.setProperty(n, new CIMValue(Util.longToUI64(v)));
-    	}
-    }
-
-} // end class SetUI64Prop
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_ActiveProject.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,261 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * Solaris_ActiveProject.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-import javax.wbem.client.*;
-import javax.wbem.provider.*;
-import javax.wbem.query.*;
-
-import com.sun.wbem.solarisprovider.common.ProviderUtility;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-
-
-/**
- * Provider of the Solaris_ActiveProject class. This class represents
- * a Project that is actively running on an OperatingSystem.
- * @author Sun Microsystems
- */
-public class Solaris_ActiveProject extends SRMProvider
-	implements Authorizable, Solaris_ActiveProjectProperties {
-
-    /**
-     * The name of the provider implemented by this class.
-     */
-    protected String providerName = SOLARIS_ACTIVEPROJECT;
-
-    /**
-     * Get the name of the provider implemented by this class.
-     * @returns String provider name
-     */
-    protected String getProviderName() {
-	return providerName;
-    }
-
-
-    /**
-     * Returns a specific CIMInstance.
-     * @param op - the name of the instance to be retrieved. This must include
-     * all of the keys and values for the instance.
-     * @param localOnly - if true, only the local properties of the class are
-     * returned, otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be returned. Any duplicate properties will
-     * be ignored.
-     * @param cc - the class reference
-     *
-     * @return	CIMInstance the retrieved instance.
-     * @exception CIMException - the method getInstance throws a CIMException
-     * if the CIMObjectPath is incorrect or does not exist.
-     */
-    public synchronized CIMInstance getInstance(CIMObjectPath op,
-				   boolean localOnly,
-				   boolean includeQualifiers,
-				   boolean includeClassOrigin,
-				   String[] propList,
-				   CIMClass cc)
-	    throws CIMException {
-
-
-        String projName = null;
-	CIMProperty cp;
-	CIMInstance ci = null;
-	DataModel   dm = null;
-	ActiveProjectModel apm;
-	
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-        try {
-	    Enumeration e = op.getKeys().elements();
-            while (e.hasMoreElements()) {
-                cp = (CIMProperty) e.nextElement();
-                if (cp.getName().equalsIgnoreCase(PROJECTNAME)) {
-		    projName =
-		      (String) (((CIMValue)(cp.getValue())).getValue());
-                }
-            }
-	    dm = resourceMonitor.getDataModel(false);
-	    if ((apm = dm.getProject(projName)) == null) {
-	    	resourceMonitor.releaseDataModel(dm);
-	    	throw notFoundEx;
-	    }
-	    ci = apm.getCIMInstance(cc);
-	    dm = resourceMonitor.releaseDataModel(dm);
-        } catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1001");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-            throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-    	SRMDebug.trace(SRMDebug.METHOD_RETV, ci.toString());
-	return ci;
-
-    } // end getInstance
-
-    
-    /**
-     * Returns all instances of Solaris_ActiveProject.
-     * @param op - the object path specifies the class to be enumerated
-     * localOnly - if true, only the local properties of the class are returned,
-     * otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be
-     * returned. Any duplicate properties will be ignored.
-     * @param cc - the class reference
-     * @return An array of CIMInstance
-     * @exception CIMException - if the CIMObjectPath is incorrect or does not
-     * exist.
-     */
-    public synchronized CIMInstance[] enumerateInstances(CIMObjectPath op,
-					    boolean localOnly,
-					    boolean includeQualifiers,
-					    boolean includeClassOrigin,
-					    String[] propList,
-					    CIMClass cc)
-	    throws CIMException {
-    	DataModel   dm = null;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-        try {
-            Vector  projInstances = new Vector();
-	    CIMInstance ci;
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getProjectIterator();
-
-	    while (i.hasNext()) {
-		ci = ((ActiveProjectModel) i.next()).getCIMInstance(cc);
-		projInstances.addElement(ci);
-            }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    CIMInstance[] ciArray = new CIMInstance[projInstances.size()];
-	    projInstances.toArray(ciArray);
-	    SRMDebug.trace(SRMDebug.METHOD_RETV, "instance[0]: " +
-	    	    	ciArray[0].toString());
-            return ciArray;
-        } catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-            throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-
-    } // end enumerateInstances
-
-    
-    /**
-     * Returns the names of all Solaris_ActiveProject instances,
-     *
-     * @param op - the class name to enumerate the instances
-     * @param cc - the class reference passed to the provider
-     * @return an array of CIMObjectPath containing names of the enumerated
-     * instances.
-     * @exception CIMException - if the classname is null or does not exist.
-     */
-    public synchronized CIMObjectPath[] enumerateInstanceNames(CIMObjectPath op,
-						  CIMClass cc)
-	    throws CIMException {
-
-	DataModel   dm = null;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-        try {
-            ActiveProjectModel apm;
-            Vector projInstances = new Vector();
-	    CIMObjectPath cop;
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getProjectIterator();
-	    while (i.hasNext()) {
-                apm = (ActiveProjectModel) i.next();
-                cop = new CIMObjectPath(op.getObjectName(), op.getNameSpace());
-                cop.addKey(PROJECTNAME, new CIMValue(apm.name));
-                projInstances.addElement(cop);
-            }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    CIMObjectPath[] copArray = new CIMObjectPath[projInstances.size()];
-	    projInstances.toArray(copArray);
-	    SRMDebug.trace(SRMDebug.METHOD_RETV, "instanceName[0]: "
-	    	    + copArray[0].toString());
-            return copArray;
-        } catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-            throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-    
-    } // end enumerateInstanceNames
-
-    protected CIMValue getBulkData(Vector outParams) throws CIMException {
-	DataModel   dm = null;
-	
-	try {
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getProjectIterator();
-            // Fill the array; each obj takes the bulk data for one user.
-            Vector  vOutParam = new Vector();
-	    while (i.hasNext()) {	    
-    	    	vOutParam.addElement(((ActiveProjectModel) i.next()).
-		    	toBulkData());
-	    }
-            // rem:  we can only return CIMValues in our outParams
-            CIMDataType dtype = new CIMDataType(CIMDataType.STRING_ARRAY);
-            CIMValue outVal = new CIMValue(vOutParam, dtype);
-	    outParams.addElement(outVal);
-	    
-	    dm = resourceMonitor.releaseDataModel(dm);
-
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-
-        CIMValue rv = new CIMValue(new Integer(0));
-	return (rv);
-    } // end getBulkData
-
-} // end class Solaris_ActiveProject
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_ActiveProjectProcessAggregateStatistics.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,242 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * Solaris_ActiveProjectProcessAggregateStatistics.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-import javax.wbem.provider.*;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-
-
-/**
- * Provider of the Solaris_ActiveProjectProcessAggregateStatistics class.
- * This class represents a link between a Project active on a system and the
- * aggregated resource usage of its Process(es).
- * @author Sun Microsystems
- */
-public class  Solaris_ActiveProjectProcessAggregateStatistics
-	extends SRMProvider {
-
-    /**
-     * The name of the provider implemented by this class
-     */
-    protected String providerName =
-	SOLARIS_ACTIVEPROJECTPROCESSAGGREGATESTATISTICS;
-
-    
-    /**
-     * Get the name of the provider implemented by this class.
-     * @returns String provider name
-     */
-    protected String getProviderName() {
-	return providerName;
-    }
-
-
-    /**
-     * Returns a specific CIMInstance.
-     * @param op - the name of the instance to be retrieved. This must include
-     * all of the keys and values for the instance.
-     * @param localOnly - if true, only the local properties of the class are
-     * returned, otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be returned. Any duplicate properties will
-     * be ignored.
-     * @param cc - the class reference
-     *
-     * @return	CIMInstance the retrieved instance.
-     * @exception CIMException - the method getInstance throws a CIMException
-     * if the CIMObjectPath is incorrect or does not exist.
-     */
-    public synchronized CIMInstance getInstance(CIMObjectPath op,
-				   boolean localOnly,
-				   boolean includeQualifiers,
-				   boolean includeClassOrigin,
-				   String[] propList,
-				   CIMClass cc)
-	    throws CIMException {
-
-	CIMObjectPath procaggreCOP = null;
-	CIMObjectPath activeprojCOP = null;
-	CIMInstance ci = null;
-	CIMProperty cp;
-	
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    Enumeration e = op.getKeys().elements();
-	    while (e.hasMoreElements()) {
-		cp = (CIMProperty) e.nextElement();
-		if (cp.getName().equalsIgnoreCase(ELEMENT)) {
-		    activeprojCOP = (CIMObjectPath)((CIMValue)(cp.getValue())).
-			getValue();
-		}
-		if (cp.getName().equalsIgnoreCase(STATS)) {
-		    procaggreCOP = (CIMObjectPath)((CIMValue)(cp.getValue())).
-			getValue();
-		}
-	    }
-
-	    ci = cc.newInstance();
-	    ci.setProperty(ELEMENT, new CIMValue(activeprojCOP));
-	    ci.setProperty(STATS, new CIMValue(procaggreCOP));
-
-	} catch (Exception e) {
-	    String msg = writeLog(LOGERROR, "SRM_1001");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-    	SRMDebug.trace(SRMDebug.METHOD_RETV, ci.toString());
-	return ci;
-
-    } // end getInstance
-
-    
-    /**
-     * Enumerates all instances of Solaris_ActiveProjectAggregateStatistics.
-     * @param op - the object path specifies the class to be enumerated
-     * localOnly - if true, only the local properties of the class are returned,
-     * otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be
-     * returned. Any duplicate properties will be ignored.
-     * @param cc - the class reference
-     * @return An array of CIMInstance
-     * @exception CIMException - if the CIMObjectPath is incorrect or does not
-     * exist.
-     */
-    public synchronized CIMInstance[] enumerateInstances(CIMObjectPath op,
-					    boolean localOnly,
-					    boolean includeQualifiers,
-					    boolean includeClassOrigin,
-					    String[] propList,
-					    CIMClass cc)
-	    throws CIMException {
-
-	Vector installedElements = new Vector();
-	ActiveProjectModel apm;
-	CIMObjectPath procaggreCOP;
-	CIMObjectPath activeprojCOP;
-	CIMInstance ci;
-    	DataModel   dm = null;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    dm = resourceMonitor.getDataModel(false);
-	    for (Iterator i = dm.getProjectIterator(); i.hasNext(); ) {
-		apm = (ActiveProjectModel) i.next();
-		activeprojCOP = apm.getCIMObjectPath(SOLARIS_ACTIVEPROJECT);
-		procaggreCOP = dm.getProjprocs(apm.name).getCIMObjectPath(
-		    SOLARIS_PROJECTPROCESSAGGREGATESTATISTICALINFORMATION);
-		ci = cc.newInstance();
-		ci.setProperty(ELEMENT, new CIMValue(activeprojCOP));
-		ci.setProperty(STATS, new CIMValue(procaggreCOP));
-		installedElements.addElement(ci);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-	CIMInstance[] ciArray = new CIMInstance[installedElements.size()];
-	installedElements.toArray(ciArray);
-	SRMDebug.trace(SRMDebug.METHOD_RETV, "instance[0]: "
-	    	+ ciArray[0].toString());
-        return ciArray;
-
-    } // end enumerateInstances
-
-    
-    /**
-     * Returns all object paths.
-     *
-     * @param op - the class name to enumerate the instances
-     * @param cc - the class reference passed to the provider
-     * @return an array of CIMObjectPath containing names of the enumerated
-     * instances.
-     * @exception CIMException - if the classname is null or does not exist.
-     */
-    public synchronized  CIMObjectPath[]
-    	enumerateInstanceNames(CIMObjectPath op, CIMClass cc)
-	    throws CIMException {
-
-	Vector installedElements = new Vector();
-	ActiveProjectModel apm;
-	CIMObjectPath procaggreCOP;
-	CIMObjectPath activeprojCOP;
-	CIMObjectPath cop;
-	DataModel   dm = null;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getProjectIterator();
-	    while (i.hasNext()) {
-		apm = (ActiveProjectModel) i.next();
-		activeprojCOP = apm.getCIMObjectPath(SOLARIS_ACTIVEPROJECT);
-		procaggreCOP = dm.getProjprocs(apm.name).getCIMObjectPath(
-		    SOLARIS_PROJECTPROCESSAGGREGATESTATISTICALINFORMATION);
-		cop = new CIMObjectPath(op.getObjectName(),
-		op.getNameSpace());
-		cop.addKey(ELEMENT, new CIMValue(activeprojCOP));
-		cop.addKey(STATS, new CIMValue(procaggreCOP));
-		installedElements.add(cop);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1003");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-    	CIMObjectPath[] copArray = new CIMObjectPath[installedElements.size()];
-	installedElements.toArray(copArray);
-	SRMDebug.trace(SRMDebug.METHOD_RETV, "instanceName[0]: "
-	    	+ copArray[0].toString());
-	return copArray;
-    }
-
-} // end class Solaris_ActiveProjectProcessAggregateStatistics
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_ActiveProjectProperties.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * Solaris_ActiveProjectProperties.java
- */
-
-package com.sun.wbem.solarisprovider.srm;
-
-/**
- * Defines property names of the Solaris_ActiveProjectProperties class and
- * the corresponding keys in the RDS protocol
- */
-public interface Solaris_ActiveProjectProperties {
-    /** The name of the project name property */
-    static final String PROJECTNAME =	"ProjectName";
-    static final String PROJECTNAME_KEY =	"prj_name";
-    /** The name of the project ID property */
-    static final String PROJECTID =	"ProjectID";
-    static final String PROJECTID_KEY =	"prj_id";
-}
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_ActiveUser.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,256 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * Solaris_ActiveUser.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-import javax.wbem.client.*;
-import javax.wbem.provider.*;
-import javax.wbem.query.*;
-
-import com.sun.wbem.solarisprovider.common.ProviderUtility;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-
-
-/**
- * Provider of the Solaris_ActiveUser class. This class represents
- * a ActiveUser that is actively running on an OperatingSystem.
- * @author Sun Microsystems
- */
-public class Solaris_ActiveUser extends SRMProvider
-	implements Authorizable, Solaris_ActiveUserProperties {
-
-    /**
-     * The name of the provider implemented by this class.
-     */
-    protected String providerName = SOLARIS_ACTIVEUSER;
-
-    /**
-     * Get the name of the provider implemented by this class.
-     * @returns String provider name
-     */
-    protected String getProviderName() {
-	return providerName;
-    }
-
-    
-    /**
-     * Returns a specific CIMInstance.
-     * @param op - the name of the instance to be retrieved. This must include
-     * all of the keys and values for the instance.
-     * @param localOnly - if true, only the local properties of the class are
-     * returned, otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be returned. Any duplicate properties will
-     * be ignored.
-     * @param cc - the class reference
-     *
-     * @return	CIMInstance the retrieved instance.
-     * @exception CIMException - the method getInstance throws a CIMException
-     * if the CIMObjectPath is incorrect or does not exist.
-     */
-    public synchronized CIMInstance getInstance(CIMObjectPath op,
-				   boolean localOnly,
-				   boolean includeQualifiers,
-				   boolean includeClassOrigin,
-				   String[] propList,
-				   CIMClass cc)
-	    throws CIMException {
-
-	String userID = null;
-	CIMProperty cp;
-	CIMInstance ci;
-	DataModel   dm = null;
-	ActiveUserModel aum;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    Enumeration e = op.getKeys().elements();
-	    while (e.hasMoreElements()) {
-		cp = (CIMProperty) e.nextElement();		
-		if (cp.getName().equalsIgnoreCase(USERID)) {
-		    userID = (String) (((CIMValue) (cp.getValue())).getValue());
-		}
-	    }
-
-	    dm = resourceMonitor.getDataModel(false);
-	    if ((aum = dm.getUser(userID)) == null) {
-	    	resourceMonitor.releaseDataModel(dm);
-	    	throw notFoundEx;
-	    }
-	    ci = aum.getCIMInstance(cc);
-	    dm = resourceMonitor.releaseDataModel(dm);
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1001");
-	    writeLog(LOGERROR, e);
-	    SRMDebug.trace1(providerName, e);	
-    	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-    	SRMDebug.trace(SRMDebug.METHOD_RETV, ci.toString());	
-	return ci;
-
-    } // end getInstance
-
-    
-    /**
-     * Returns all instances of Solaris_ActiveUser.
-     * @param op - the object path specifies the class to be enumerated
-     * localOnly - if true, only the local properties of the class are returned,
-     * otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be
-     * returned. Any duplicate properties will be ignored.
-     * @param cc - the class reference
-     * @return An array of CIMInstance
-     * @exception CIMException - if the CIMObjectPath is incorrect or does not
-     * exist.
-     */
-    public synchronized CIMInstance[] enumerateInstances(CIMObjectPath op,
-					    boolean localOnly,
-					    boolean includeQualifiers,
-					    boolean includeClassOrigin,
-					    String[] propList,
-					    CIMClass cc)
-	throws CIMException {
-    	DataModel   dm = null;
-	CIMInstance ci;
-	
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    Vector  userInstances = new Vector();
-	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getUserIterator();
-	    while (i.hasNext()) {
-		ci = ((ActiveUserModel) i.next()).getCIMInstance(cc);
-		userInstances.addElement(ci);
-	    }
-    	    dm = resourceMonitor.releaseDataModel(dm);
-	    CIMInstance[] ciArray = new CIMInstance[userInstances.size()];
-	    userInstances.toArray(ciArray);
-	    SRMDebug.trace(SRMDebug.METHOD_RETV, "instance[0]: " +
-	    	    	ciArray[0].toString());
-            return ciArray;
-	} catch (Exception e) {
-    	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    msg += " (" + e.getClass().toString() + ")";
-	    writeLog(LOGERROR, e);
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-
-    } // end enumerateInstances
-
-    
-    /**
-     * Returns the names of all Solaris_ActiveUser instances.
-     *
-     * @param op - the class name to enumerate the instances
-     * @param cc - the class reference passed to the provider
-     * @return an array of CIMObjectPath containing names of the enumerated
-     * instances.
-     * @exception CIMException - if the classname is null or does not exist.
-     */
-    public synchronized CIMObjectPath[] enumerateInstanceNames(CIMObjectPath op,
-						  CIMClass cc)
-	throws CIMException {
-    	DataModel dm = null;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    ActiveUserModel aum;
-	    Vector userInstances = new Vector();
-	    CIMObjectPath cop;
-
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getUserIterator();
-	    while (i.hasNext()) {
-		aum = (ActiveUserModel) i.next();
-		cop = new CIMObjectPath(op.getObjectName(), op.getNameSpace());
-		cop.addKey(USERID, new CIMValue(aum.name));
-		userInstances.addElement(cop);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    CIMObjectPath[] copArray = new CIMObjectPath[userInstances.size()];
-	    userInstances.toArray(copArray);
-	    SRMDebug.trace(SRMDebug.METHOD_RETV, "instanceName[0]: "
-	    	    + copArray[0].toString());
-            return copArray;
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1003");
-	    writeLog(LOGERROR, e);
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-
-    } // end enumerateInstanceNames
-
-    protected CIMValue getBulkData(Vector outParams) throws CIMException {
-	DataModel   dm = null;
-	
-	try {
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getUserIterator();
-            // Fill the array; each obj takes the bulk data for one user.
-            Vector  vOutParam = new Vector();
-	    while (i.hasNext()) {	    
-    	    	vOutParam.addElement(((ActiveUserModel) i.next()).toBulkData());
-	    }
-            // rem:  we can only return CIMValues in our outParams
-            CIMDataType dtype = new CIMDataType(CIMDataType.STRING_ARRAY);
-            CIMValue outVal = new CIMValue(vOutParam, dtype);
-	    outParams.addElement(outVal);
-	    
-	    dm = resourceMonitor.releaseDataModel(dm);
-
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-
-        CIMValue rv = new CIMValue(new Integer(0));
-	return (rv);
-    } // end getBulkData
-
-} // end class Solaris_ActiveUser
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_ActiveUserProcessAggregateStatistics.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,245 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * Solaris_ActiveUserProcessAggregateStatistics.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-import javax.wbem.provider.*;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-
-
-/**
- * Provider of the Solaris_ProjectProcessAggregateStatisticalInformation class.
- * This class represents a link between an User active on a system and the
- * aggregated resource usage of its Process(es).
- * @author Sun Microsystems
- */
-public class  Solaris_ActiveUserProcessAggregateStatistics extends SRMProvider {
-
-    /**
-     * The name of the provider implemented by this class
-     */
-    protected String providerName =
-    	SOLARIS_ACTIVEUSERPROCESSAGGREGATESTATISTICS;
-
-    
-    /**
-     * Get the name of the provider implemented by this class.
-     * @returns String provider name
-     */
-    protected String getProviderName() {
-	return providerName;
-    }
-
-
-    /**
-     * Returns a specific CIMInstance
-     * @param op - the name of the instance to be retrieved. This must include
-     * all of the keys and values for the instance.
-     * @param localOnly - if true, only the local properties of the class are
-     * returned, otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be returned. Any duplicate properties will
-     * be ignored.
-     * @param cc - the class reference
-     *
-     * @return	CIMInstance the retrieved instance.
-     * @exception CIMException - the method getInstance throws a CIMException
-     * if the CIMObjectPath is incorrect or does not exist.
-     */
-    public CIMInstance getInstance(CIMObjectPath op,
-				   boolean localOnly,
-				   boolean includeQualifiers,
-				   boolean includeClassOrigin,
-				   String[] propList,
-				   CIMClass cc)
-	    throws CIMException {
-
-
-	CIMObjectPath procaggreCOP = null;
-	CIMObjectPath activeusrCOP = null;
-	CIMInstance ci = null;
-	CIMProperty cp;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    Enumeration e = op.getKeys().elements();
-	    while (e.hasMoreElements()) {
-		cp = (CIMProperty)e.nextElement();
-		if (cp.getName().equalsIgnoreCase(ELEMENT)) {
-		    activeusrCOP = (CIMObjectPath)((CIMValue)(cp.getValue())).
-			getValue();
-		}
-		if (cp.getName().equalsIgnoreCase(STATS)) {
-		    procaggreCOP = (CIMObjectPath)((CIMValue)(cp.getValue())).
-			getValue();
-		}
-	    }
-
-	    ci = cc.newInstance();
-	    ci.setProperty(ELEMENT, new CIMValue(activeusrCOP));
-	    ci.setProperty(STATS, new CIMValue(procaggreCOP));
-
-	} catch (Exception e) {
-	    String msg = writeLog(LOGERROR, "SRM_1001");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-    	SRMDebug.trace(SRMDebug.METHOD_RETV, ci.toString());
-	return ci;
-
-    } // end getInstance
-
-    
-    /**
-     * Enumerates all instances of Solaris_ActiveUserAggregateStatistics.
-     * @param op - the object path specifies the class to be enumerated
-     * localOnly - if true, only the local properties of the class are returned,
-     * otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be
-     * returned. Any duplicate properties will be ignored.
-     * @param cc - the class reference
-     * @return An array of CIMInstance
-     * @exception CIMException - if the CIMObjectPath is incorrect or does not
-     * exist.
-     */
-    public CIMInstance[] enumerateInstances(CIMObjectPath op,
-					    boolean localOnly,
-					    boolean includeQualifiers,
-					    boolean includeClassOrigin,
-					    String[] propList,
-					    CIMClass cc)
-	    throws CIMException {
-
-	Vector installedElements = new Vector();
-	DataModel       dm = null;
-	ActiveUserModel aum;
-	CIMObjectPath   procaggreCOP;
-	CIMObjectPath   activeusrCOP;
-	CIMInstance     ci;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getUserIterator();
-	    while (i.hasNext()) {
-		aum = (ActiveUserModel) i.next();
-		activeusrCOP = aum.getCIMObjectPath(SOLARIS_ACTIVEUSER);
-		procaggreCOP = dm.getUserprocs(aum.name).getCIMObjectPath(
-		    SOLARIS_USERPROCESSAGGREGATESTATISTICALINFORMATION);
-		ci = cc.newInstance();
-		ci.setProperty(ELEMENT, new CIMValue(activeusrCOP));
-		ci.setProperty(STATS, new CIMValue(procaggreCOP));
-		installedElements.addElement(ci);
-	    }    
-	    dm = resourceMonitor.releaseDataModel(dm);
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-	CIMInstance[] ciArray = new CIMInstance[installedElements.size()];
-	installedElements.toArray(ciArray);
-	SRMDebug.trace(SRMDebug.METHOD_RETV, "instance[0]: "
-	    	+ ciArray[0].toString());
-        return ciArray;
-
-    } // end enumerateInstances
-
-    
-    /**
-     * Returns all object paths
-     *
-     * @param op - the class name to enumerate the instances
-     * @param cc - the class reference passed to the provider
-     * @return an array of CIMObjectPath containing names of the enumerated
-     * instances.
-     * @exception CIMException - if the classname is null or does not exist.
-     */
-    public CIMObjectPath[] enumerateInstanceNames(CIMObjectPath op,
-						  CIMClass cc)
-	    throws CIMException {
-
-	Vector installedElements = new Vector();
-	DataModel       dm = null;
-	ActiveUserModel aum;
-	CIMObjectPath procaggreCOP;
-	CIMObjectPath activeusrCOP;
-	CIMObjectPath cop;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getUserIterator();
-	    while (i.hasNext()) {
-		aum = (ActiveUserModel) i.next();
-		activeusrCOP = aum.getCIMObjectPath(SOLARIS_ACTIVEUSER);
-		procaggreCOP = dm.getUserprocs(aum.name).getCIMObjectPath(
-		    SOLARIS_USERPROCESSAGGREGATESTATISTICALINFORMATION);
-		cop = new CIMObjectPath(op.getObjectName(),
-		    op.getNameSpace());
-		cop.addKey(ELEMENT, new CIMValue(activeusrCOP));
-		cop.addKey(STATS, new CIMValue(procaggreCOP));
-		installedElements.add(cop);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1003");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-
-	CIMObjectPath[] copArray = new CIMObjectPath[installedElements.size()];
-	installedElements.toArray(copArray);
-	SRMDebug.trace(SRMDebug.METHOD_RETV, "instanceName[0]: "
-	    	+ copArray[0].toString());
-	return copArray;
-
-    } // end enumerateInstanceNames
-
-} // end class Solaris_ActiveUserProcessAggregateStatistics
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_ActiveUserProperties.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * Solaris_ActiveUserProperties.java
- */
-
-package com.sun.wbem.solarisprovider.srm;
-
-/**
- * Defines property names of the Solaris_ActiveUse class and
- * the corresponding keys in the RDS protocol
- */
-
-public interface Solaris_ActiveUserProperties {
-    /** The name of the user name property */
-    static final String USERNAME = "UserName";
-    static final String USERNAME_KEY = "usr_name";
-    /** The name of the user ID property */
-    static final String USERID = "UserID";
-    static final String USERID_KEY = "usr_id";
-}
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_Performance1.0.mof	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,640 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Title: Resource Utilization and Performance Monitoring 
- *
- * Description: Classes providing visibility to computing resource metrics.
- * 
- * Date: %G%
- * 
- * Version: %I%
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- * 
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- */
-
-
-#pragma Locale ("en_US")
-
-/*
- * User and Project entities.
- */
-
-//==================================================================
-// Solaris_ActiveUser
-//==================================================================
-[Provider("java:com.sun.wbem.solarisprovider.srm.Solaris_ActiveUser"),
- Description(
-    "Represents a UserAccount that is actively "
-    "running on an OperatingSystem.")
-]
-class Solaris_ActiveUser: CIM_LogicalElement
-{
-        [Propagated("CIM_OperatingSystem.CSCreationClassName"),
-         Key,
-         Description ("The scoping ComputerSystem's CreationClassName."),
-         MaxLen (256)
-        ]  
-    string CSCreationClassName;
-
-        [Propagated("CIM_OperatingSystem.CSName"),
-         Key,
-         Description ("The scoping ComputerSystem's Name."),
-         MaxLen (256)
-        ]  
-    string CSName;
-
-        [Propagated("CIM_OperatingSystem.CreationClassName"),
-         Key,
-         Description ("The scoping OperatingSystem's CreationClassName."),
-         MaxLen (256)
-        ]  
-    string OSCreationClassName;
-
-        [Propagated("CIM_OperatingSystem.Name"),
-         Key,
-         Description ("The scoping OperatingSystem's Name."),
-         MaxLen (256)
-        ]  
-    string OSName;
-
-        [Key,
-         Description (
-                "CreationClassName indicates the name of the class or the "
-                "subclass used in the creation of an instance. When used "
-                "with the other key properties of this class, this property "
-                "allows all instances of this class and its subclasses to "
-                "be uniquely identified."),
-         MaxLen (256)
-        ]        
-    string CreationClassName;
-
-        [Read,
-         Description("User Name"),
-         MaxLen (256)
-        ]
-    string UserName;
-
-    	[Description(
-		"Get properties for all instances of Solaris_ActiveUser"
-		" as an array of strings.  Each string contains the values"
-		" of the UserID and UserName properties for a"
-		" single instance.")
-	]
-    sint32 getBulkData([OUT] string data[]);
-
-        [Key,
-         Read,
-         Description("User ID")
-        ]
-    sint32 UserID;
-
-};
-
-
-//==================================================================
-// Solaris_ActiveProject
-//==================================================================
-[Provider("java:com.sun.wbem.solarisprovider.srm.Solaris_ActiveProject"),
- Description("Represents a Project that is actively"
-             "running on an OperatingSystem.")
-]
-class Solaris_ActiveProject: CIM_LogicalElement
-{
-        [Propagated("CIM_OperatingSystem.CSCreationClassName"),
-         Key,
-         Description ("The scoping ComputerSystem's CreationClassName."),
-         MaxLen (256)
-        ]  
-    string CSCreationClassName;
-
-        [Propagated("CIM_OperatingSystem.CSName"),
-         Key,
-         Description ("The scoping ComputerSystem's Name."),
-         MaxLen (256)
-        ]  
-    string CSName;
-
-        [Propagated("CIM_OperatingSystem.CreationClassName"),
-         Key,
-         Description ("The scoping OperatingSystem's CreationClassName."),
-         MaxLen (256)
-        ]  
-    string OSCreationClassName;
-
-        [Propagated("CIM_OperatingSystem.Name"),
-         Key,
-         Description ("The scoping OperatingSystem's Name."),
-         MaxLen (256)
-        ]  
-    string OSName;
-
-        [Key,
-         Description (
-                "CreationClassName indicates the name of the class or the "
-                "subclass used in the creation of an instance. When used "
-                "with the other key properties of this class, this property "
-                "allows all instances of this class and its subclasses to "
-                "be uniquely identified."),
-         MaxLen (256)
-        ]  
-    string CreationClassName;
-
-        [Key,
-         Read,
-         Description("Project Name"),
-         MaxLen (256)
-          ]
-    string ProjectName;
-
-        [Read,
-         Description("Project ID")
-        ]
-    sint32 ProjectID;
-
-    	[Description(
-		"Get properties for all instances of Solaris_ActiveProject"
-		" as an array of strings.  Each string contains the values"
-		" of the ProjectID and ProjectName properties for a"
-		" single instance.")
-	]
-    sint32 getBulkData([OUT] string data[]);
-};
-
-
-/*
- * Statistical properties of Processes and Process Aggregates.
- */
-
-//==================================================================
-// Solaris_ProcessStatisticalInformation
-//==================================================================
-[
-Description("Raw resource utilization measurements for a process.")
-]
-class Solaris_ProcessStatisticalInformation : CIM_SystemStatisticalInformation
-{
-
-	// CPU state times
-
-        [Read,
-         Description (
-                "The cumulative number of seconds that this process "
-		"has spent in User mode over its lifetime."),
-         Units("Seconds")
-        ]
-    real64 UserModeTime;
-
-        [Read,
-         Description (
-                "The cumulative number of seconds that this process "
-		"has spent in System mode over its lifetime."),
-         Units("Seconds")
-        ]
-    real64 SystemModeTime;
-
-        [Read,
-         Description (
-                "The cumulative number of seconds that this process "
-		"has spent in System Traps over its lifetime."),
-         Units("Seconds")
-        ]
-    real64 SystemTrapTime;
-
-        [Read,
-         Description (
-                "The cumulative number of seconds that this process "
-		"has spent sleeping in Text Page Faults over its lifetime."),
-         Units("Seconds")
-        ]
-    real64 TextPageFaultSleepTime;
-
-        [Read,
-         Description (
-                "The cumulative number of seconds that this process "
-		"has spent sleeping in Data Page Faults over its lifetime."),
-         Units("Seconds")
-        ]
-    real64 DataPageFaultSleepTime;
-
-        [Read,
-         Description (
-                "The cumulative number of seconds that this process "
-		"has spent sleeping in System Page Faults over its lifetime."),
-         Units("Seconds")
-        ]
-    real64 SystemPageFaultSleepTime;
-
-        [Read,
-         Description (
-                "The cumulative number of seconds that this process "
-                "has spent sleeping on User Lock Waits over its lifetime."),
-         Units("Seconds")
-        ]
-    real64 UserLockWaitSleepTime;
-
-        [Read,
-         Description (
-                "The cumulative number of seconds that this process "
-                "has spent sleeping in all other ways over its lifetime."),
-         Units("Seconds")
-        ]
-    real64 OtherSleepTime;
-
-        [Read,
-         Description (
-                "The cumulative number of seconds that this process "
-                "has spent Waiting for CPU over its lifetime."),
-         Units("Seconds")
-        ]
-    real64 WaitCPUTime;
-
-        [Read,
-         Description (
-                "The cumulative number of seconds that this process "
-                "has spent Stopped over its lifetime."),
-         Units("Seconds")
-        ]
-    real64 StoppedTime;
-
-
-	// Event counts
-
-	[Read,
-         Description (
-                "The cumulative number of Minor Page Faults engendered by the "
-                "process over its lifetime.")
-        ]
-    uint64 MinorPageFaults;
-
-	[Read,
-         Description (
-                "The cumulative number of Major Page Faults engendered by the "
-                "process over its lifetime.")
-        ]
-    uint64 MajorPageFaults;
-
-
-	[Read,
-         Description (
-                "The cumulative number of swap operations engendered by the "
-                "process over its lifetime.")
-        ]
-    uint64 SwapOperations;
-
-        [Read,
-         Description (
-                "The cumulative number of blocks Read by the process "
-                "over its lifetime.")
-        ]
-    uint64 BlocksRead;
-
-        [Read,
-         Description (
-                "The cumulative number of blocks Written by the process "
-                "over its lifetime.")
-        ]
-    uint64 BlocksWritten;
-
-        [Read,
-         Description (
-                "The cumulative number of Messages Received by the process "
-                "over its lifetime.")
-        ]
-    uint64 MessagesReceived;
-
-        [Read,
-         Description (
-                "The cumulative number of Messages Sent by the process "
-                "over its lifetime.")
-        ]
-    uint64 MessagesSent;
-
-        [Read,
-         Description (
-                "The cumulative number of Signals taken by the "
-                "process over its lifetime.")
-        ]
-    uint64 SignalsReceived;
-
-        [Read,
-         Description (
-                "The cumulative number of Voluntary Context Switches "
-                "made by the process over its lifetime.")
-        ]
-    uint64 VoluntaryContextSwitches;
-
-        [Read,
-         Description (
-                "The cumulative number of Involuntary Context Switches "
-                "made by the process over its lifetime.")
-        ]
-    uint64 InvoluntaryContextSwitches;
-
-        [Read,
-         Description (
-                "The cumulative number of system calls made by the "
-                "process over its lifetime.")
-        ]
-    uint64 SystemCallsMade;
-
-        [Read,
-         Description (
-                "The cumulative number of character I/O bytes "
-                "Read and Written by the process over its lifetime."),
-            Units ("Bytes")
-        ]
-    uint64 CharacterIOUsage;
-
-
-	// Memory usage statistics
-
-        [Read,
-         Description (
-                "The total number of KiloBytes of memory consumed by the "
-                "process heap at the time that it is sampled."),
-         Units ("KiloBytes")
-        ] 
-    uint64 ProcessHeapSize;
-
-        [Read,
-         Description(
-                "The size of the process virtual address space "
-                "in KiloBytes."),
-         Units ("KiloBytes")
-        ]
-    uint64 ProcessVMSize;
-
-        [Read,
-         Description("The resident set size of the process in KiloBytes "),
-         Units ("KiloBytes")
-        ]
-    uint64 ProcessResidentSetSize;
-
-
-	// Composite statistics
-
-        [Read,
-         Description("The percent CPU time used by the process.")
-        ]
-    real32 PercentCPUTime;
-
-        [Read,
-         Description(
-                "The ratio of the process resident set size to "
-                "physical memory.")
-        ]
-    real32 PercentMemorySize;
-
-        [Read,
-         Description(
-                "Time in User mode and System mode spent by the process," 
-                "in milliseconds. If this information is not available,"
-                "a value of 0 should be used."),
-         Units("MilliSeconds")
-        ]
-    real64 UserSystemModeTime;
-
-        [Read,
-         Description(
-                "The number of threads active in the current Process. ")
-	]
-    uint32 NumThreads;
-
-	[Read,
-	 Description (
-		"The system clock time at which the sample was taken.") ]
-    uint64 Timestamp;
-
-        [Override ("Name"),
-         Key,
-         Description ("Process ID of the owning process.")
-        ]
-    String Name;
-};
-
-
-//==================================================================
-// Solaris_UserProcessAggregateStatisticalInformation
-//==================================================================
-[Provider("java:com.sun.wbem.solarisprovider.srm.Solaris_UserProcessAggregateStatisticalInformation"),
- Description(
-        "Accumulated resource utilization measurements for "
-        "an aggregation of processes sharing a common User.  "
-        "The (inherited) ProcessStatisticalInformation properties "
-        "are populated by summing the underlying process' usage. ")
-]
-class Solaris_UserProcessAggregateStatisticalInformation :
-        Solaris_ProcessStatisticalInformation
-{
-        [Description("The number of processes measured in the aggregate.") ]
-    uint32 NumProcs;
-
-    	[Description(
-		"Get properties for all instances of"
-		" Solaris_UserProcessAggregateStatisticalInformation" 
-		" as an array of strings.  Each string contains the values"
-		" of a single instance's properties.  The values are "
-		" separated by whitespace and appear in the same order "
-		" as they do in the MOF definition of the class.")
-	]
-    sint32 getBulkData([OUT] string data[]);
-    
-        [Override ("Name"),
-         Key,
-         Description (
-                "The unique User ID (in String form) of aggregate's owner.")
-        ]
-    String Name;
-};
-
-
-//==================================================================
-// Solaris_ProjectProcessAggregateStatisticalInformation
-//==================================================================
-[Provider("java:com.sun.wbem.solarisprovider.srm.Solaris_ProjectProcessAggregateStatisticalInformation"),
- Description(
-        "Accumulated resource utilization measurements for "
-        "an aggregation of processes sharing a common Project.  "
-        "The (inherited) ProcessStatisticalInformation properties "
-        "are populated by summing the underlying process' usage. ")
-]
-class Solaris_ProjectProcessAggregateStatisticalInformation :
-        Solaris_ProcessStatisticalInformation
-{
-        [Description("The number of processes measured in the aggregate.") ]
-    uint32 NumProcs;
-
-    	[Description(
-		"Get properties for all instances of"
-		" Solaris_ProjectProcessAggregateStatisticalInformation" 
-		" as an array of strings.  Each string contains the values"
-		" of a single instance's properties.  The values are "
-		" separated by whitespace and appear in the same order "
-		" as they do in the MOF definition of the class.")
-	]
-    sint32 getBulkData([OUT] string data[]);
-
-        [Override ("Name"),
-         Key,
-         Description (
-                "The unique Project name of the aggregate's owner.")
-        ]
-    String Name;
-};
-
-
-/*
- * Association between a Process and its statistics.
- */
-
-//==================================================================
-// Solaris_ProcessStatistics
-//==================================================================
-[Association,
- Provider("java:com.sun.wbem.solarisprovider.srm.Solaris_ProcessStatistics"),
- Description("An association linking a Solaris_Process and its "
-        "Solaris_ProcessStatisticalInformation instance.")
-]
-class Solaris_ProcessStatistics : CIM_SystemStatistics
-{
-        [Override ("Element"), 
-         Key,
-         Description ("The Process whose utilization is being monitored.")
-        ]
-    Solaris_Process REF Element;
-
-        [Override ("Stats"), 
-         Key,
-         Description (
-                "The statistical information object that contains "
-                "utilization data for the associated Process.")
-        ]
-    Solaris_ProcessStatisticalInformation REF Stats;
-
-};
-
-
-/*
- * Associations between Users/Projects and Processes/Process Aggregates.
- */
-/*
-//==================================================================
-// Solaris_UserProcessStatistics
-//==================================================================
-[Association,
- Aggregation,
- Provider("java:com.sun.wbem.solarisprovider.srm.Solaris_UserProcessStatistics"),
- Description("A link between a User active on a system and the "
-        "Statistics of all Processes running on its behalf.")
-]
-class Solaris_UserProcessStatistics: CIM_SystemStatistics
-{
-        [Override ("Element"),
-         Description ("The User active on a System")
-        ]
-    Solaris_ActiveUser REF Element;
-
-        [Override ("Stats"),
-         Description ("The Process Statistics belonging to the User.")
-        ]
-    Solaris_ProcessStatisticalInformation REF Stats;
-};
-
-
-//==================================================================
-// Solaris_ProjectProcessStatistics
-//==================================================================
-[Association,
- Aggregation,
- Provider("java:com.sun.wbem.solarisprovider.srm.Solaris_ProjectProcessStatistics"),
- Description("A link between a Project active on a system and the "
-        "Statistics of all Processes running on its behalf.")
-
-]
-class Solaris_ProjectProcessStatistics: CIM_SystemStatistics
-{
-        [Override ("Element"),
-         Description ("The Project active on a System")
-        ]
-    Solaris_ActiveProject REF Element;
-
-        [Override ("Stats"),
-         Description ("The Process Statistics belonging to the Project")
-        ]
-    Solaris_ProcessStatisticalInformation REF Stats ;
-};
-
-*/
-
-//==================================================================
-// Solaris_ActiveUserProcessAggregateStatistics
-//==================================================================
-[Association,
- Provider("java:com.sun.wbem.solarisprovider.srm.Solaris_ActiveUserProcessAggregateStatistics"),
- Description("A link between an User active on a system and the "
-        "aggregated resource usage of its Process(es).")
-]
-class Solaris_ActiveUserProcessAggregateStatistics: CIM_SystemStatistics
-{
-        [Override ("Element"),
-         Key,
-         Description ("The User active on a System.")
-        ]
-    Solaris_ActiveUser REF Element;
-
-        [Override ("Stats"),
-         Key,
-         Description ("The Process Aggregate Statistics for the User.")
-        ]
-    Solaris_UserProcessAggregateStatisticalInformation REF Stats;
-};
-
-
-
-//==================================================================
-// Solaris_ActiveProjectProcessAggregateStatistics
-//==================================================================
-[Association,
- Provider("java:com.sun.wbem.solarisprovider.srm.Solaris_ActiveProjectProcessAggregateStatistics"),
- Description("A link between a Project active on a system and the "
-        "aggregated resource usage of its Process(es).")
-]
-class Solaris_ActiveProjectProcessAggregateStatistics: CIM_SystemStatistics
-{
-        [Override ("Element"),
-         Key,
-         Description ("The Project active on a System.")
-        ]
-    Solaris_ActiveProject REF Element;
-
-        [Override ("Stats"),
-         Key,
-         Description ("The Process Aggregate Statistics for the Project.")
-        ]
-    Solaris_ProjectProcessAggregateStatisticalInformation REF Stats;
-};
-
-
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_ProcessStatisticalInformation.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,229 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * Solaris_ProcessStatisticalInformation.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-import javax.wbem.client.*;
-import javax.wbem.provider.*;
-import javax.wbem.query.*;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-
-
-/**
- * Provider of the Solaris_ProcessStatisticalInformation class.
- * This class provides raw resource utilization measurements for a process.
- * @author Sun Microsystems
- */
-public class Solaris_ProcessStatisticalInformation extends SRMProvider
-	implements Solaris_ProcessStatisticalInformationProperties {
-
-        
-    /**
-     * The name of the provider implemented by this class
-     */
-    protected String providerName = SOLARIS_PROCESSSTATISTICALINFORMATION;
-
-   
-    /**
-     * Get the name of the provider implemented by this class.
-     * @returns String provider name
-     */
-    protected String getProviderName() {
-	return providerName;
-    }
-
-
-    /**
-     * Returns an instance specified by the PID key.
-     * @param op - the name of the instance to be retrieved. This must include
-     * all of the keys and values for the instance.
-     * @param localOnly - if true, only the local properties of the class are
-     * returned, otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be returned. Any duplicate properties will
-     * be ignored.
-     * @param cc - the class reference
-     *
-     * @return	CIMInstance the retrieved instance.
-     * @exception CIMException - the method getInstance throws a CIMException
-     * if the CIMObjectPath is incorrect or does not exist.
-     */
-    public synchronized CIMInstance getInstance(CIMObjectPath op,
-				   boolean localOnly,
-				   boolean includeQualifiers,
-				   boolean includeClassOrigin,
-				   String[] propList,
-				   CIMClass cc)
-	    throws CIMException {
-
-	String pid = null;
-	CIMInstance ci = null;
-	CIMProperty cp = null;
-    	DataModel   dm = null;
-	ProcessDataModel pdm;
-	
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    Enumeration e = op.getKeys().elements();
-	    while (e.hasMoreElements()) {
-		cp = (CIMProperty) e.nextElement();
-		if (cp.getName().equalsIgnoreCase(NAME)) {
-		    pid = (String)((CIMValue)(cp.getValue())).getValue();
-		}
-	    }
-	    dm = resourceMonitor.getDataModel(false);
-	    if ((pdm = dm.getProcess(Integer.parseInt(pid))) == null) {
-	    	resourceMonitor.releaseDataModel(dm);
-	    	throw notFoundEx;
-	    }
-	    ci = pdm.getCIMInstance(cc);
-	    dm = resourceMonitor.releaseDataModel(dm);
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1001");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-    	SRMDebug.trace(SRMDebug.METHOD_RETV, ci.toString());
-	return ci;
-
-    } // end getInstance
-
-    
-    /**
-     * Returns all instances of Solaris_ProcessUtilizationInformation.
-     * @param op - the object path specifies the class to be enumerated
-     * localOnly - if true, only the local properties of the class are returned,
-     * otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be
-     * returned. Any duplicate properties will be ignored.
-     * @param cc - the class reference
-     * @return An array of CIMInstance
-     * @exception CIMException - if the CIMObjectPath is incorrect or does not
-     * exist.
-     */
-    public synchronized CIMInstance[] enumerateInstances(CIMObjectPath op,
-					    boolean localOnly,
-					    boolean includeQualifiers,
-					    boolean includeClassOrigin,
-					    String[] propList,
-					    CIMClass cc)
-	    throws CIMException {
-	    
-    	DataModel   dm = null;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    Vector procInstances = new Vector();
-	    CIMInstance ci;
-	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getProcessIterator();
-	    while (i.hasNext()) {
-		ci = ((ProcessDataModel) i.next()).getCIMInstance(cc);
-		procInstances.addElement(ci);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    CIMInstance[] ciArray = new CIMInstance[procInstances.size()];
-	    procInstances.toArray(ciArray);
-	    SRMDebug.trace(SRMDebug.METHOD_RETV, "instance[0]: " +
-	    	    	ciArray[0].toString());
-	    return ciArray;
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-
-    } // end enumerateInstances
-
-    
-    /**
-     * Returns the names of all Solaris_ProcessUtilizationInformation instances.
-     *
-     * @param op - the class name to enumerate the instances
-     * @param cc - the class reference passed to the provider
-     * @return an array of CIMObjectPath containing names of the enumerated
-     * instances.
-     * @exception CIMException - if the classname is null or does not exist.
-     */
-    public synchronized CIMObjectPath[]
-    	    enumerateInstanceNames(CIMObjectPath op, CIMClass cc)
-	    throws CIMException {
-
-    	DataModel   dm = null;
-	
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    ProcessDataModel pdm;
-	    Vector procInstances = new Vector();
-	    int	pid;
-	    CIMObjectPath cop;
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getProcessIterator();
-	    while (i.hasNext()) {
-		pdm = (ProcessDataModel)i.next();
-		cop = new CIMObjectPath(op.getObjectName(), op.getNameSpace());
-		cop.addKey(NAME, new CIMValue(Long.toString(pdm.pid)));
-		procInstances.addElement(cop);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    CIMObjectPath[] copArray = new CIMObjectPath[procInstances.size()];
-	    procInstances.toArray(copArray);
-	    SRMDebug.trace(SRMDebug.METHOD_RETV, "instanceName[0]: "
-	    	    + copArray[0].toString());
-	    return copArray;
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1003");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-
-    } // end enumerateInstanceNames
-
-} // end class Solaris_ProcessStatisticalInformation
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_ProcessStatisticalInformationProperties.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * Solaris_ProcessStatisticalInformationProperties.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-/**
- * Defines property names of the Solaris_ProcessStatisticalInformation and
- * the corresponding keys in the RDS protocol
- * @author SMI
- */
-public interface Solaris_ProcessStatisticalInformationProperties {
-    /**
-     * The cumulative number of nanoseconds that this process has spent in
-     * User mode over its lifetime.
-     */
-    static final String USERMODETIME = "UserModeTime";
-    static final String USERMODETIME_KEY = "id_usr";
-    /**
-     * The cumulative number of nanoseconds that this process has spent in
-     * System mode over its lifetime.
-     */
-    static final String SYSTEMMODETIME = "SystemModeTime";
-    static final String SYSTEMMODETIME_KEY = "id_sys";
-    /**
-     * The cumulative number of nanoseconds that this process has spent in
-     * System Traps over its lifetime.
-     */
-    static final String SYSTEMTRAPTIME = "SystemTrapTime";
-    static final String SYSTEMTRAPTIME_KEY = "id_ttime";
-    /**
-     * The cumulative number of nanoseconds that this process has spent
-     * sleeping in Text Page Faults over its lifetime.
-     */
-    static final String TEXTPAGEFAULTSLEEPTIME = "TextPageFaultSleepTime";
-    static final String TEXTPAGEFAULTSLEEPTIME_KEY = "id_tpftime";
-    /**
-     * The cumulative number of nanoseconds that this process has spent
-     * sleeping in Data Page Faults over its lifetime.
-     */
-    static final String DATAPAGEFAULTSLEEPTIME = "DataPageFaultSleepTime";
-    static final String DATAPAGEFAULTSLEEPTIME_KEY = "id_dpftime";
-    /**
-     * The cumulative number of nanoseconds that this process has spent
-     * sleeping in System Page Faults over its lifetime.
-     */
-    static final String SYSTEMPAGEFAULTSLEEPTIME = "SystemPageFaultSleepTime";
-    static final String SYSTEMPAGEFAULTSLEEPTIME_KEY = "id_kpftime";
-    /**
-     * The cumulative number of nanoseconds that this process has spent
-     * sleeping on User Lock Waits over its lifetime.
-     */
-    static final String USERLOCKWAITSLEEPTIME = "UserLockWaitSleepTime";
-    static final String USERLOCKWAITSLEEPTIME_KEY = "id_lck";
-    /**
-     * The cumulative number of nanoseconds that this process has spent
-     * sleeping in all other ways over its lifetime.
-     */
-    static final String OTHERSLEEPTIME = "OtherSleepTime";
-    static final String OTHERSLEEPTIME_KEY = "id_slp";
-    /**
-     * The cumulative number of nanoseconds that this process has spent
-     * Waiting for CPU over its lifetime.
-     */
-    static final String WAITCPUTIME = "WaitCPUTime";
-    static final String WAITCPUTIME_KEY = "id_lat";
-    /**
-     * The cumulative number of nanoseconds that this process has spent
-     * Stopped over its lifetime.
-     */
-    static final String STOPPEDTIME = "StoppedTime";
-    static final String STOPPEDTIME_KEY = "id_stime";
-    /**
-     * The cumulative number of Minor Page Faults engendered by the process
-     * over its lifetime
-     */
-    static final String MINORPAGEFAULTS = "MinorPageFaults";
-    static final String MINORPAGEFAULTS_KEY = "id_minf";
-    /**
-     * The cumulative number of Major Page Faults engendered by the process
-     * over its lifetime.
-     */
-    static final String MAJORPAGEFAULTS = "MajorPageFaults";
-    static final String MAJORPAGEFAULTS_KEY = "id_majf";
-    /**
-     * The cumulative number of swap operations engendered by the process
-     * over its lifetime.
-     */
-    static final String SWAPOPERATIONS = "SwapOperations";
-    static final String SWAPOPERATIONS_KEY = "id_nswap";
-    /**
-     * The cumulative number of blocks Read by the process over its lifetime.
-     */
-    static final String BLOCKSREAD = "BlocksRead";
-    static final String BLOCKSREAD_KEY = "id_inblk";
-    /**
-     * The cumulative number of blocks Written by the process over its lifetime.
-     */
-    static final String BLOCKSWRITTEN = "BlocksWritten";
-    static final String BLOCKSWRITTEN_KEY = "id_oublk";
-    /**
-     * The cumulative number of Messages Sent by the process over its lifetime
-     */
-    static final String MESSAGESSENT = "MessagesSent";
-    static final String MESSAGESSENT_KEY = "id_msnd";
-    /**
-     * The cumulative number of Messages Received by the process over
-     * its lifetime.
-     */
-    static final String MESSAGESRECEIVED = "MessagesReceived";
-    static final String MESSAGESRECEIVED_KEY = "id_mrcv";
-    /**
-     * The cumulative number of Signals taken by the process over its lifetime.
-     */
-    static final String SIGNALSRECEIVED = "SignalsReceived";
-    static final String SIGNALSRECEIVED_KEY = "id_sigs";
-    /**
-     * The cumulative number of Voluntary Context Switches made by the process
-     * over its lifetime.
-     */
-    static final String VOLUNTARYCONTEXTSWITCHES = "VoluntaryContextSwitches";
-    static final String VOLUNTARYCONTEXTSWITCHES_KEY = "id_vctx";
-    /**
-     * The cumulative number of Involuntary Context Switches made by
-     * the process over its lifetime.
-     */
-    static final String INVOLUNTARYCONTEXTSWITCHES =
-    "InvoluntaryContextSwitches";
-    static final String INVOLUNTARYCONTEXTSWITCHES_KEY =
-    "id_ictx";
-    /**
-     * The cumulative number of system calls made by the process over its
-     * lifetime.
-     */
-    static final String SYSTEMCALLSMADE = "SystemCallsMade";
-    static final String SYSTEMCALLSMADE_KEY = "id_scl";
-    /**
-     * The cumulative number of character I/O bytes Read and Written
-     * by the process over its lifetime.
-     */
-    static final String CHARACTERIOUSAGE = "CharacterIOUsage";
-    static final String CHARACTERIOUSAGE_KEY = "id_ioch";
-    /**
-     * The total number of KiloBytes of memory consumed by the process
-     * heap at the time that it is sampled.
-     */
-    static final String PROCESSHEAPSIZE = "ProcessHeapSize";
-    static final String PROCESSHEAPSIZE_KEY = "id_hpsize";
-    /**
-     * The size of the process virtual address space in KiloBytes.
-     */
-    static final String PROCESSVMSIZE = "ProcessVMSize";
-    static final String PROCESSVMSIZE_KEY = "id_size";
-    /**
-     * The resident set size of the process in KiloBytes
-     */
-    static final String PROCESSRESIDENTSETSIZE = "ProcessResidentSetSize";
-    static final String PROCESSRESIDENTSETSIZE_KEY = "id_rssize";
-    /**
-     * The percent CPU time used by the process.
-     */
-    static final String PERCENTCPUTIME = "PercentCPUTime";
-    static final String PERCENTCPUTIME_KEY = "id_pctcpu";
-    /**
-     * The ratio of the process resident set size to physical memory
-     */
-    static final String PERCENTMEMORYSIZE = "PercentMemorySize";
-    static final String PERCENTMEMORYSIZE_KEY = "id_pctmem";
-    /**
-     * Time in User mode and System mode spent by the process in milliseconds.
-     * If this information is not available, a value of 0 should be used.
-     */
-    static final String USERSYSTEMMODETIME = "UserSystemModeTime";
-    static final String USERSYSTEMMODETIME_KEY = "id_time";
-    /**
-     * The number of threads active in the current Process.
-     */
-    static final String NUMTHREADS = "NumThreads";
-    static final String NUMTHREADS_KEY = "id_nlwps";
-    /**
-     * The system clock time at which the sample was taken.
-     */
-    static final String TIMESTAMP = "Timestamp";
-    static final String TIMESTAMP_KEY = "id_timestamp";
-}
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_ProcessStatistics.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2001-2002 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-import javax.wbem.client.*;
-import javax.wbem.provider.*;
-
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-
-
-/**
- * Provider of the Solaris_ProcessStatistics class. This class represents
- * an association linking a Solaris_Process and its
- * Solaris_ProcessStatisticalInformation instance a raw resource utilization
- * measurements for a process.
- * @author Sun Microsystems, Inc.
- */
-public class Solaris_ProcessStatistics extends SRMProvider {
-
-    /**
-     * The name of the provider implemented by this class
-     */
-    String providerName = SOLARIS_PROCESSSTATISTICS;
-
-    private DataModel dm;
-
-    
-    /**
-     * Get the name of the provider implemented by this class.
-     * @returns String provider name
-     */
-    protected String getProviderName() {
-	return providerName;
-    }
-
-    
-    /**
-     * Returns a specific instance.
-     * @param op - the name of the instance to be retrieved. This must include
-     * all of the keys and values for the instance.
-     * @param localOnly - if true, only the local properties of the class are
-     * returned, otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be returned. Any duplicate properties will
-     * be ignored.
-     * @param cc - the class reference
-     *
-     * @return	CIMInstance the retrieved instance.
-     * @exception CIMException - the method getInstance throws a CIMException
-     * if the CIMObjectPath is incorrect or does not exist.
-     */
-    public synchronized  CIMInstance getInstance(CIMObjectPath op,
-				   boolean localOnly,
-				   boolean includeQualifiers,
-				   boolean includeClassOrigin,
-				   String[] propList,
-				   CIMClass cc)
-	    throws CIMException {
-
-	CIMObjectPath procstatCOP = null;
-	CIMObjectPath procCOP = null;
-	CIMInstance ci = null;
-	CIMProperty cp = null;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    Enumeration e = op.getKeys().elements();
-	    while (e.hasMoreElements()) {
-		cp = (CIMProperty) e.nextElement();
-		if (cp.getName().equalsIgnoreCase(ELEMENT)) {
-		    procCOP = (CIMObjectPath)((CIMValue)(cp.getValue())).
-			getValue();
-		}
-		if (cp.getName().equalsIgnoreCase(STATS)) {
-		    procstatCOP = (CIMObjectPath)((CIMValue)(cp.getValue())).
-			getValue();
-		}
-	    }
-
-	    ci = cc.newInstance();
-	    ci.setProperty(ELEMENT, new CIMValue(procCOP));
-	    ci.setProperty(STATS, new CIMValue(procstatCOP));
-
-	} catch (Exception e) {
-	    String msg = writeLog(LOGERROR, "SRM_1001");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-	}
-    	SRMDebug.trace(SRMDebug.METHOD_RETV, ci.toString());
-	return ci;
-
-    } // end getInstance
-
-
-    /**
-     * Returns all instances of Solaris_ProcessStatistics.
-     * @param op - the object path specifies the class to be enumerated
-     * localOnly - if true, only the local properties of the class are returned,
-     * otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be
-     * returned. Any duplicate properties will be ignored.
-     * @param cc - the class reference
-     * @return An array of CIMInstance
-     * @exception CIMException - if the CIMObjectPath is incorrect or does not
-     * exist.
-     */
-    public synchronized  CIMInstance[] enumerateInstances(CIMObjectPath op,
-					    boolean localOnly,
-					    boolean includeQualifiers,
-					    boolean includeClassOrigin,
-					    String[] propList,
-					    CIMClass cc)
-	    throws CIMException {
-
-	Vector installedElements = new Vector();
-	ProcessDataModel pdm;
-	CIMObjectPath procstatCOP;
-	CIMObjectPath procCOP;
-	CIMInstance ci;
-    	DataModel   dm = null;
-	
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getProcessIterator();
-	    while (i.hasNext()) {
-		pdm = (ProcessDataModel)i.next();
-		procstatCOP  = pdm.getCIMObjectPath(
-		    SOLARIS_PROCESSSTATISTICALINFORMATION);
-		procCOP = pdm.getCIMObjectPathForProc();
-		ci = cc.newInstance();
-		ci.setProperty(ELEMENT, new CIMValue(procCOP));
-		ci.setProperty(STATS, new CIMValue(procstatCOP));
-		installedElements.addElement(ci);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-            String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-
-	CIMInstance[] ciArray = new CIMInstance[installedElements.size()];
-	installedElements.toArray(ciArray);
-	SRMDebug.trace(SRMDebug.METHOD_RETV, "instance[0]: "
-	    + (String)(ciArray.length > 0 ? ciArray[0].toString() : "null"));
-        return ciArray;
-
-    } // end enumerateInstances
-
-    
-    /**
-     * Returns the names of all Solaris_ProcessUtilizationInformation instances.
-     *
-     * @param op - the class name to enumerate the instances
-     * @param cc - the class reference passed to the provider
-     * @return an array of CIMObjectPath containing names of the enumerated
-     * instances.
-     * @exception CIMException - if the classname is null or does not exist.
-     */
-    public synchronized  CIMObjectPath[]
-    	    enumerateInstanceNames(CIMObjectPath op, CIMClass cc)
-	    throws CIMException {
-
-	Vector installedElements = new Vector();
-	ProcessDataModel pdm;
-	CIMObjectPath procstatCOP;
-	CIMObjectPath procCOP;
-	CIMObjectPath cop;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getProcessIterator();
-	    while (i.hasNext()) {
-		pdm = (ProcessDataModel) i.next();
-		procstatCOP  = pdm.getCIMObjectPath(
-		    SOLARIS_PROCESSSTATISTICALINFORMATION);
-		procCOP = pdm.getCIMObjectPathForProc();
-		cop = new CIMObjectPath(op.getObjectName(),
-		op.getNameSpace());
-		cop.addKey(ELEMENT, new CIMValue(procCOP));
-		cop.addKey(STATS, new CIMValue(procstatCOP));
-		installedElements.add(cop);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1003");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-	
-	CIMObjectPath[] copArray = new CIMObjectPath[installedElements.size()];
-	installedElements.toArray(copArray);
-	SRMDebug.trace(SRMDebug.METHOD_RETV, "instanceName[0]: "
-	    + (String)(copArray.length > 0 ? copArray[0].toString() : "null"));
-        return copArray;
-
-    } // end enumerateInstanceNames
-
-} // end class Solaris_ProcessStatistics
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_ProjectProcessAggregateStatisticalInformation.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,269 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * Solaris_ProjectProcessAggregateStatisticalInformation.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-import javax.wbem.client.*;
-import javax.wbem.provider.*;
-import javax.wbem.query.*;
-
-import com.sun.wbem.solarisprovider.common.ProviderUtility;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-
-
-/**
- * Provider of the Solaris_ProjectProcessAggregateStatisticalInformation class.
- * This class provides accumulated resource utilization measurements for
- * an aggregation of processes sharing a common Project. The (inherited)
- * ProcessStatisticalInformation properties are populated by summing the
- * underlying process's usage.
- * @author Sun Microsystems
- */
-public class Solaris_ProjectProcessAggregateStatisticalInformation
-	extends SRMProvider
-	implements Authorizable, 
-	    Solaris_ProcessStatisticalInformationProperties {
-
-    /**
-     * The name of the provider implemented by this class
-     */
-    String providerName =
-    	SOLARIS_PROJECTPROCESSAGGREGATESTATISTICALINFORMATION;
-
-    /**
-     * Get the name of the provider implemented by this class.
-     * @returns String provider name
-     */
-    protected String getProviderName() {
-	return providerName;
-    }
-
-    
-    /**
-     * Returns an instance specified by the Name key.
-     * @param op - the name of the instance to be retrieved. This must include
-     * all of the keys and values for the instance.
-     * @param localOnly - if true, only the local properties of the class are
-     * returned, otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be returned. Any duplicate properties will
-     * be ignored.
-     * @param cc - the class reference
-     *
-     * @return	CIMInstance the retrieved instance.
-     * @exception CIMException - the method getInstance throws a CIMException
-     * if the CIMObjectPath is incorrect or does not exist.
-     */
-    public synchronized CIMInstance getInstance(CIMObjectPath op,
-				   boolean localOnly,
-				   boolean includeQualifiers,
-				   boolean includeClassOrigin,
-				   String[] propList,
-				   CIMClass cc)
-	    throws CIMException {
-
-	String name = null;
-	CIMProperty cp;
-	CIMInstance ci = null;
-    	DataModel   dm = null;
-	ProcessAggregateDataModel padm;
-	
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());	
-	try {
-	    Enumeration e = op.getKeys().elements();
-	    while (e.hasMoreElements()) {
-		cp = (CIMProperty) e.nextElement();
-		if (cp.getName().equalsIgnoreCase(NAME)) {
-		    name = (String)((CIMValue)(cp.getValue())).getValue();
-		}
-	    }
-	    dm = resourceMonitor.getDataModel(false);
-	    if ((padm = dm.getProjprocs(name)) == null) {
-	    	dm = resourceMonitor.releaseDataModel(dm);
-	    	throw notFoundEx;
-	    }
-	    ci = padm.getCIMInstance(cc);
-	    dm = resourceMonitor.releaseDataModel(dm);
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1001");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-	SRMDebug.trace(SRMDebug.METHOD_RETV, ci.toString());	
-	return ci;
-
-    } // end getInstance
-
-    
-    /**
-     * Returns all instances of
-     * Solaris_ProjectProcessAggregateUtilizationInformation.
-     * @param op - the object path specifies the class to be enumerated
-     * localOnly - if true, only the local properties of the class are returned,
-     * otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be
-     * returned. Any duplicate properties will be ignored.
-     * @param cc - the class reference
-     * @return An array of CIMInstance
-     * @exception CIMException - if the CIMObjectPath is incorrect or does not
-     * exist.
-     */
-    public synchronized CIMInstance[] enumerateInstances(CIMObjectPath op,
-					    boolean localOnly,
-					    boolean includeQualifiers,
-					    boolean includeClassOrigin,
-					    String[] propList,
-					    CIMClass cc)
-	    throws CIMException {
-    	DataModel   dm = null;
-	
-	long t0 = System.currentTimeMillis();
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());	
-	try {
-	    Vector procAggrInstances = new Vector();
-	    CIMInstance ci;
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getProjprocsIterator();
-	    while (i.hasNext()) {
-		ci = ((ProcessAggregateDataModel) i.next()).getCIMInstance(cc);
-		procAggrInstances.addElement(ci);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    CIMInstance[] ciArray = new CIMInstance[procAggrInstances.size()];
-	    procAggrInstances.toArray(ciArray);
-	    SRMDebug.trace(SRMDebug.METHOD_RETV, "instance[0]: " +
-	    	    ciArray[0].toString());
-            return ciArray;
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-
-    } // end enumerateInstances
-
-    
-    /**
-     * Returns the names of all Solaris_ProjectProcessUtilizationInformation
-     * instances.
-     *
-     * @param op - the class name to enumerate the instances
-     * @param cc - the class reference passed to the provider
-     * @return an array of CIMObjectPath containing names of the enumerated
-     * instances.
-     * @exception CIMException - if the classname is null or does not exist.
-     */
-    public synchronized CIMObjectPath[] enumerateInstanceNames(CIMObjectPath op,
-    	    	CIMClass cc) throws CIMException {
-    	DataModel   dm = null;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());	
-	try {
-	    ProcessAggregateDataModel padm;
-	    Vector procAggrInstances = new Vector();
-	    int	pid;
-	    CIMObjectPath cop;
-
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getProjprocsIterator();
-	    
-	    while (i.hasNext()) {
-		padm = (ProcessAggregateDataModel) i.next();
-		cop = new CIMObjectPath(op.getObjectName(), op.getNameSpace());
-		cop.addKey(NAME, new CIMValue(padm.name));
-		procAggrInstances.addElement(cop);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    CIMObjectPath[] copArray =
-		new CIMObjectPath[procAggrInstances.size()];
-	    procAggrInstances.toArray(copArray);
-	    SRMDebug.trace(SRMDebug.METHOD_RETV, "instanceName[0]: " +
-	    	    copArray[0].toString());
-            return copArray;
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1003");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-
-    } // end enumerateInstanceNames
-
-    protected synchronized CIMValue getBulkData(Vector outParams)
-    	throws CIMException {
-	DataModel   dm = null;
-	
-	try {
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getProjprocsIterator();
-            Vector  vOutParam = new Vector();
-	    while (i.hasNext()) {	    
-    	    	vOutParam.addElement(((ProcessAggregateDataModel) i.next()).
-		    	toBulkData());
-	    }
-            // rem:  we can only return CIMValues in our outParams
-            CIMDataType dtype = new CIMDataType(CIMDataType.STRING_ARRAY);
-            CIMValue outVal = new CIMValue(vOutParam, dtype);
-	    outParams.addElement(outVal);
-	    dm = resourceMonitor.releaseDataModel(dm);
-
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-
-        CIMValue rv = new CIMValue(new Integer(0));
-	return (rv);
-    } // end getBulkData
-
-} // end class Solaris_ProjectProcessAggregateStatisticalInformation
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Solaris_UserProcessAggregateStatisticalInformation.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,264 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * Solaris_UserProcessAggregateStatisticalInformation.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-import javax.wbem.client.*;
-import javax.wbem.provider.*;
-import javax.wbem.query.*;
-
-import com.sun.wbem.solarisprovider.common.ProviderUtility;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Vector;
-
-
-/**
- * Provider of the Solaris_UserProcessAggregateStatisticalInformation class.
- * This class provides an accumulated resource utilization measurements for
- * an aggregation of processes sharing a common User. The (inherited)
- * ProcessStatisticalInformation properties are populated by summing the
- * underlying process' usage.
- * @author Sun Microsystems
- */
-public class Solaris_UserProcessAggregateStatisticalInformation
-	extends SRMProvider
-	implements Authorizable,
-	    Solaris_ProcessStatisticalInformationProperties {
-
-    String providerName =
-    	SOLARIS_USERPROCESSAGGREGATESTATISTICALINFORMATION;
-
-    /**
-     * Get the name of the provider implemented by this class.
-     * @returns String provider name
-     */
-    protected String getProviderName() {
-	return providerName;
-    }
-
-    
-    /**
-     * Returns an instance specified by the Name key
-     * @param op - the name of the instance to be retrieved. This must include
-     * all of the keys and values for the instance.
-     * @param localOnly - if true, only the local properties of the class are
-     * returned, otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be returned. Any duplicate properties will
-     * be ignored.
-     * @param cc - the class reference
-     *
-     * @return	CIMInstance the retrieved instance.
-     * @exception CIMException - the method getInstance throws a CIMException
-     * if the CIMObjectPath is incorrect or does not exist.
-     */
-    public synchronized CIMInstance getInstance(CIMObjectPath op,
-				   boolean localOnly,
-				   boolean includeQualifiers,
-				   boolean includeClassOrigin,
-				   String[] propList,
-				   CIMClass cc)
-	    throws CIMException {
-
-	String name = null;
-	CIMProperty cp = null;
-	CIMInstance ci = null;
-	DataModel   dm = null;
-	ProcessAggregateDataModel padm;
-	
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());
-	try {
-	    Enumeration e = op.getKeys().elements();
-	    while (e.hasMoreElements()) {
-		cp = (CIMProperty) e.nextElement();
-		if (cp.getName().equalsIgnoreCase(NAME)) {
-		    name = (String)((CIMValue)(cp.getValue())).getValue();
-		}
-	    }
-	    	    
-    	    dm = resourceMonitor.getDataModel(false);
-	    if ((padm = dm.getUserprocs(name)) == null) {
-	    	dm = resourceMonitor.releaseDataModel(dm);
-	    	throw notFoundEx;
-	    }
-	    ci = padm.getCIMInstance(cc);
-	    dm = resourceMonitor.releaseDataModel(dm);
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1001");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-    	SRMDebug.trace(SRMDebug.METHOD_RETV, ci.toString());
-	return ci;
-
-    } // end getInstance
-
-    
-    /**
-     * Returns all instances of Solaris_ProcessUtilizationInformation
-     * @param op - the object path specifies the class to be enumerated
-     * localOnly - if true, only the local properties of the class are returned,
-     * otherwise all properties are required
-     * @param includeQualifiers - if true, the qualifiers are returned as part
-     * of of the returned instancei, otherwise no qualifiers will be returned
-     * @param includeClassOrigin - if true, the class origin of each property
-     * will be returned
-     * @param String[] - if null, all properties are returned, otherwise only
-     * the properties specified will be
-     * returned. Any duplicate properties will be ignored.
-     * @param cc - the class reference
-     * @return An array of CIMInstance
-     * @exception CIMException - if the CIMObjectPath is incorrect or does not
-     * exist.
-     */
-    public synchronized CIMInstance[] enumerateInstances(CIMObjectPath op,
-					    boolean localOnly,
-					    boolean includeQualifiers,
-					    boolean includeClassOrigin,
-					    String[] propList,
-					    CIMClass cc)
-	    throws CIMException {
-    	DataModel   dm = null;
-
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    Vector  procAggrInstances = new Vector();
-	    CIMInstance ci;
-
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getUserprocsIterator();
-	    while (i.hasNext()) {
-		ci = ((ProcessAggregateDataModel) i.next()).getCIMInstance(cc);
-		procAggrInstances.addElement(ci);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    CIMInstance[] ciArray = new CIMInstance[procAggrInstances.size()];
-	    procAggrInstances.toArray(ciArray);
-	    SRMDebug.trace(SRMDebug.METHOD_RETV, "instance[0]: " +
-	    	    	ciArray[0].toString());
-            return ciArray;
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-    } // end enumerateInstances
-
-    
-    /**
-     * Returns the names of all Solaris_UserProcessUtilizationInformation
-     * instances.
-     *
-     * @param op - the class name to enumerate the instances
-     * @param cc - the class reference passed to the provider
-     * @return an array of CIMObjectPath containing names of the enumerated
-     * instances.
-     * @exception CIMException - if the classname is null or does not exist.
-     */
-    public synchronized CIMObjectPath[] enumerateInstanceNames(CIMObjectPath op,
-						  CIMClass cc)
-	    throws CIMException {
-    	DataModel   dm = null;
-	
-	SRMDebug.trace(SRMDebug.METHOD_CALL, op.toString());		
-	try {
-	    ProcessAggregateDataModel padm;
-	    Vector procAggrInstances = new Vector();
-	    int	pid;
-	    CIMObjectPath cop;
-
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getUserprocsIterator();
-	    while (i.hasNext()) {
-		padm = (ProcessAggregateDataModel) i.next();
-		cop = new CIMObjectPath(op.getObjectName(), op.getNameSpace());
-		cop.addKey(NAME, new CIMValue(padm.name));
-		procAggrInstances.addElement(cop);
-	    }
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    CIMObjectPath[] copArray =
-		new CIMObjectPath[procAggrInstances.size()];
-	    procAggrInstances.toArray(copArray);
-	    SRMDebug.trace(SRMDebug.METHOD_RETV, "instanceName[0]: "
-	    	    + copArray[0].toString());
-            return copArray;
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1003");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-
-    } // end enumerateInstanceNames
-
-    protected CIMValue getBulkData(Vector outParams) throws CIMException {
-	DataModel   dm = null;
-	
-	try {
-    	    dm = resourceMonitor.getDataModel(false);
-	    Iterator i = dm.getUserprocsIterator();
-            // Fill the array; each obj takes the bulk data for one user.
-            Vector  vOutParam = new Vector();
-	    while (i.hasNext()) {	    
-    	    	vOutParam.addElement(((ProcessAggregateDataModel) i.next()).
-		    	toBulkData());
-	    }
-            // rem:  we can only return CIMValues in our outParams
-            CIMDataType dtype = new CIMDataType(CIMDataType.STRING_ARRAY);
-            CIMValue outVal = new CIMValue(vOutParam, dtype);
-	    outParams.addElement(outVal);
-	    dm = resourceMonitor.releaseDataModel(dm);
-
-	} catch (Exception e) {
-	    dm = resourceMonitor.releaseDataModel(dm);
-	    String msg = writeLog(LOGERROR, "SRM_1002");
-	    writeLog(LOGERROR, e);
-	    msg += " (" + e.getClass().toString() + ")";
-	    SRMDebug.trace1(providerName, e);	
-	    throw new CIMException(CIMException.CIM_ERR_FAILED, msg);
-    	}
-
-        CIMValue rv = new CIMValue(new Integer(0));
-	return (rv);
-    } // end getBulkData
-
-} // end class Solaris_UserProcessAggregateStatisticalInformation
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/SystemDataModel.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,67 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * SystemDataModel.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-import java.util.*;
-
-/**
- * The global system properties, osname and csname, are handled by this
- * class. The data fields are defined as static in the superclass, since they
- * should be accessible by all provider data models.
- * @author Sun Microsystems, Inc.
- */
-public class SystemDataModel extends SRMProviderDataModel
-	implements SRMProviderProperties {
-
-    protected void setCIMInstance(boolean newInstance) {
-	return;
-    }
-
-    protected void setOpPropertiesVector() {
-	return;
-    }
-
-    protected void initKeyValTable() {
-    	return;
-    }
-
-    void setProperty(String key, String val) {
-
-	PropertyAccessInterface ac;
-
-	if (!key.equals(CSNAME_KEY)) {
-	    csName = val;
-	} else if (!key.equals(OSNAME_KEY)) {
-	    osName = val;
-	}
-    }
-
-} // end class SystemDataModel
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/Util.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * Util.java
- */
-
-package com.sun.wbem.solarisprovider.srm;
-
-import javax.wbem.cim.*;
-
-import java.math.*;
-
-import java.util.PropertyResourceBundle;
-import java.io.InputStream;
-
-/**
- * Utility class 
- * @author Sun Microsystems
- */
-class Util {
-    
-    public static String propertyUPDATETIME;
-    public static String propertyRDSTIMEOUT;
-    public static String propertyRDSINTERVAL;
-    public static String propertyRDSDATABASE;
-    public static String propertyKEEPALIVETIMEOUT;
-    public static String propertyMSACCT;
-    public static String propertyREADTIMEOUT;
-    public static String propertyRDSLOGFILE;
-
-
-    /**
-     * Converts a java long into CIM UnsignedInt64 object.
-     * @param l the long to be converted
-     * @returns a CIM UnsignedInt64 object
-     */
-    public static UnsignedInt64 longToUI64(long l) {
-        byte a[] = new byte[9];
-        
-        for (int i = 8; i > 0; i--, l >>= 8) {
-            a[i] = (byte)(l & 0x0ff);
-        }
-        a[0] = 0;
-        return new UnsignedInt64(a);
-    }
-
-    /**
-     * Waits some milliseconds.
-     *
-     * @param ms time to wait in milliseconds
-     */
-    public static void napms(int ms) {
-	try {
-	    Thread.sleep(ms);
-	} catch (InterruptedException e) {}
-    }
-    
-    private static final String classNameForResourceBundle =
-    	    	"com.sun.wbem.solarisprovider.srm.Util";
-    private static final String nameForResourceBundle =
-    	    	"perfprovider.properties";
-    private static final String nameForDebugPropertyLevel =
-    	    	"ProviderDEBUGLEVEL";
-    private static final String nameForDebugPropertyDevice =
-    	    	"ProviderDEBUGDEVICE";
-    private static final String nameForUPDATETIME =
-    	    	"ProviderUPDATETIME";
-    private static final String nameForRDSTIMEOUT =
-    	    	"ProviderRDSTIMEOUT";
-    private static final String nameForRDSINTERVAL =
-    	    	"ProviderRDSINTERVAL";
-    private static final String nameForRDSDATABASE =
-    	    	"ProviderRDSDATABASE";
-    private static final String nameForKEEPALIVETIMEOUT =
-    	    	"ProviderKEEPALIVETIMEOUT";
-    private static final String nameForMSACCT =
-    	    	"ProviderMSACCT";
-    private static final String nameForREADTIMEOUT=
-    	    	"ProviderREADTIMEOUT";
-    private static final String nameForRDSLOGFILE=
-    	    	"ProviderRDSLOGFILE";
-
-    // look for debug flag as a local resource
-    static {
-	try {
-	    Class c = Class.forName(classNameForResourceBundle);
-
-	    InputStream is = c.getResourceAsStream(nameForResourceBundle);
-
-	    PropertyResourceBundle prb = new PropertyResourceBundle(is);
-
-	    try {
-		propertyUPDATETIME = prb.getString(nameForUPDATETIME);
-	    } catch (java.util.MissingResourceException x) {
-		;
-	    }
-
-	    try {
-		propertyRDSTIMEOUT = prb.getString(nameForRDSTIMEOUT);
-	    } catch (java.util.MissingResourceException x) {
-		;
-	    }
-
-	    try {
-		propertyRDSINTERVAL = prb.getString(nameForRDSINTERVAL);
-	    } catch (java.util.MissingResourceException x) {
-		;
-	    }
-
-	    try {
-		propertyRDSDATABASE = prb.getString(nameForRDSDATABASE);
-	    } catch (java.util.MissingResourceException x) {
-		;
-	    }
-
-	    try {
-		propertyKEEPALIVETIMEOUT =
-		    prb.getString(nameForKEEPALIVETIMEOUT);
-	    } catch (java.util.MissingResourceException x) {
-		;
-	    }
-
-	    try {
-		propertyMSACCT = prb.getString(nameForMSACCT);
-	    } catch (java.util.MissingResourceException x) {
-		;
-	    }
-
-	    try {
-		propertyREADTIMEOUT = prb.getString(nameForREADTIMEOUT);
-	    } catch (java.util.MissingResourceException x) {
-		;
-	    }
-
-	    try {
-		propertyRDSLOGFILE = prb.getString(nameForRDSLOGFILE);
-	    } catch (java.util.MissingResourceException x) {
-		;
-	    }
-	    String level = null;
-	    String device = null;
-
-	    try {
-		level = prb.getString(nameForDebugPropertyLevel);
-		device = prb.getString(nameForDebugPropertyDevice);
-	    } catch (java.util.MissingResourceException x) {
-		;
-	    }
-
-	    if ((device != null) && (device.equalsIgnoreCase("file"))) {
-	    	device = "perfprovider";
-	    }
-	    SRMDebug.traceOpen(level, device);
-	    SRMDebug.trace(SRMDebug.TRACE_ALL,
-		"Starting SRM provider trace level = "
-		+ level + ", device = " + device);
-
-	} catch (Exception x) {
-		;
-	}
-    }
-    
-}
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/perfprovider.properties	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# The ProviderDEBUGLEVEL controls server tracing. To turn on a tracing
-# category, set the appropriate bit in the ProviderDEBUGLEVEL value to one:
-#
-# bits 7 6 5 4  3 2 1 0
-#      ^ ^ ^ ^  ^ ^ ^ ^----- - provider method calls
-#      | | | |  | | +------- - provider method return values
-#      | | | |  | +--------- - rds command interface
-#      | | | |  +----------- - rds data flow
-#      | | | |
-#      | | | +------------- - thread synchronization
-#      | | +--------------- - unused
-#      | +----------------- - unused
-#      +------------------- - unused
-#
-# Optionally add any of these characters after the hexadecimal number:
-#   t - include time stamp prefix
-#   m - include class and method name prefix
-#   p - include thread name prefix
-# Example, "fftmp" gives all details with all prefaces
-ProviderDEBUGLEVEL=0
-
-#
-# Set trace device to "stdout", "stderr", or "file".  If file,
-# trace file is written as /var/tmp/perfprovider_mmdd_hhmm
-ProviderDEBUGDEVICE=stderr
-
-#
-# The ProviderUPDATETIME property defines the time window in which
-# a data request will be served from internal data cache instead of
-# accessing rds, default time is 5 sec.
-#
-ProviderUPDATETIME=5000
-
-#
-# The ProviderRDSTIMEOUT property defines the timeout after which rds
-# will exit if it hasn't received command from client, default time is 30 sec.
-#
-ProviderRDSTIMEOUT=30000
-
-#
-# The ProviderRDSINTERVAL property defines an interval in which rds
-# will update its data structure, default time is 1 sec.
-#
-ProviderRDSINTERVAL=1000
-
-#
-# The ProviderRDSDATABASE property defines if and where rds will store
-# the state of the internal statistic lists. Comment out this property
-# if you want to have this feature disabled.
-#
-ProviderRDSDATABASE=/var/run/rds_db
-
-# 
-# The ProviderKEPPALIVETIMEOUT property defines how long the connection
-# to rds should be kept open even when no client request has been
-# received in this time, default time is 10 minutes.
-ProviderKEEPALIVETIMEOUT=600000
-
-# 
-# The ProviderMSACCT property, if set to true, enables the microstate
-# accounting
-ProviderMSACCT=true
-
-# 
-# The ProviderREADTIMEOUT property defines the number of milliseconds to 
-# wait for rds to respond to a command.  This value may need to be 
-# increased for heavily loaded systems.
-ProviderREADTIMEOUT=60000
-
-#
-# The ProviderRDSLOGFILE property defines if and where rds will write
-# its log messages. If this property is not defined, the log messages
-# will be directed to the 'stderr'.
-#
-ProviderRDSLOGFILE=/var/tmp/rds_log
-
-
-
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/resources/Exceptions.properties	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-# currently empty
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/resources/LogMessages.properties	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-SRM_0001=Performance provider debug
-
-SRM_1000=Provider initialization failed.
-SRM_1001=GetInstance failed.
-SRM_1002=EnumerateInstances failed.
-SRM_1003=EnumerateInstanceNames failed.
-
-SRM_5000=GetInstance({0})
-SRM_5001=EnumerateInstances({0})
-SRM_5002=EnumerateInstanceNames({0})
-SRM_5003=ExecQuery({0}): `{1}' `{2}'
-
-SRM_10000=Resource monitor could not be opened.
-SRM_10001=No such instance `{0}'.
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/rmon.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,192 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * rmon.java
- */
-
-
-package com.sun.wbem.solarisprovider.srm;
-
-import java.util.Iterator;
-
-
-/**
- * Simple CLI to test ResourceMonitor class. Prints the current user, projects
- * and processor sets metrics on the stdout.
- * @author Sun Microsystems, Inc.
- */
-public class rmon {
-
-    static String usage =
-"rmon [-p <pid> -u [<usr>] | -j [<prj>] | -s [<set>] -l [<cnt>] -i [<ms>] -d]";
-
-    public  static void main(String []args) {
-
-	int pID = -1, uID = -1, jID = -1, sID = -1;
-	boolean pFlag = false, uFlag = false, jFlag = false, sFlag = false,
-	lFlag = false, selected = false, debF = false;
-	int loopCnt = 1, interval = 1000;
-	int argc;
-
-	ProcessDataModel pui;
-	ActiveUserModel aum;
-	ActiveProjectModel apm;
-	ProcessAggregateDataModel padm;
-	ResourceMonitor resourceMonitor = null;
-	Object	sync = new Object();
-
-	try {
-	    if ((argc = args.length) > 0) {
-		for (int argix = 0; argix < argc; argix++)  {
-		    if (args[argix].startsWith("-u")) {
-			uFlag = true; selected = true;
-			if (((argix + 1) < argc) &&
-				(!args[argix + 1].startsWith("-"))) {
-			    uID = Integer.parseInt(args[++argix]);
-			}
-		    } else if (args[argix].startsWith("-p")) {
-			pFlag = true; selected = true;
-			if (((argix + 1) < argc) &&
-				(!args[argix + 1].startsWith("-"))) {
-			    pID = Integer.parseInt(args[++argix]);
-			}
-		    } else if (args[argix].startsWith("-j")) {
-			jFlag = true; selected = true;
-			if (((argix + 1) < argc) &&
-				(!args[argix + 1].startsWith("-"))) {
-			    jID = Integer.parseInt(args[++argix]);
-			}
-		    } else if (args[argix].startsWith("-s")) {
-			sFlag = true; selected = true;
-			if (((argix + 1) < argc) &&
-				(!args[argix + 1].startsWith("-"))) {
-			    sID = Integer.parseInt(args[++argix]);
-			}
-		    } else if (args[argix].startsWith("-l")) {
-			lFlag = true;
-			if (((argix + 1) < argc) &&
-				(!args[argix + 1].startsWith("-"))) {
-			    loopCnt = Integer.parseInt(args[++argix]);
-			} else {
-			    loopCnt = 60;
-			}
-		    } else if (args[argix].startsWith("-i")) {
-			lFlag = true;
-			if (((argix + 1) < argc) &&
-				(!args[argix + 1].startsWith("-"))) {
-			    interval = Integer.parseInt(args[++argix]);
-			}
-		    } else if (args[argix].startsWith("-d")) {
-			debF = true;
-		    } else {
-			System.err.println(usage);
-			return;
-		    }
-		}
-	    }
-
-	    resourceMonitor = ResourceMonitor.getHandle();
-	    resourceMonitor.openDataModel(10000, 1000, 5000);
-	    int ret;
-	    Iterator iterator;
-	    DataModel dm = null;
-
-	    for (int l = 0; l < loopCnt; l++) {
-		System.out.println("\n------- Loop cnt = "+l+" -------------");
-		if (!selected || pFlag) {
-		    System.out.println("\n--------- PROCESSES ----------");
-		    dm = resourceMonitor.getDataModel(false);
-		    iterator = dm.getProcessIterator();
-		    while (iterator.hasNext()) {
-			pui = (ProcessDataModel) iterator.next();
-			if ((pID == -1) || ((ProcessDataModel)pui).pid == pID)
-			    System.out.println(pui);
-		    }
-		    resourceMonitor.releaseDataModel(dm);
-		}
-		if (!selected || uFlag) {
-		    System.out.println("\n--------- USERS ----------");
-		    dm = resourceMonitor.getDataModel(false);
-		    iterator = dm.getProcessIterator();
-		    while (iterator.hasNext()) {
-			aum = (ActiveUserModel) iterator.next();
-			System.out.println(aum);
-		    }
-		    resourceMonitor.releaseDataModel(dm);
-		}
-		if (!selected || uFlag) {
-		    System.out.println("\n--------- USERS PROCS ----------");
-		    dm = resourceMonitor.getDataModel(false);
-		    iterator = dm.getProcessIterator();
-		    while (iterator.hasNext()) {
-			padm = (ProcessAggregateDataModel) iterator.next();
-			System.out.println(padm);
-		    }
-		    resourceMonitor.releaseDataModel(dm);
-		}
-		if (!selected || jFlag) {
-		    System.out.println("\n--------- PROJECT ----------");
-		    dm = resourceMonitor.getDataModel(false);
-		    iterator = dm.getProcessIterator();
-		    while (iterator.hasNext()) {
-			apm = (ActiveProjectModel) iterator.next();
-			System.out.println(apm);
-		    }
-		    resourceMonitor.releaseDataModel(dm);
-		}
-		if (!selected || jFlag) {
-		    System.out.println("\n--------- USERS PROCS ----------");
-		    dm = resourceMonitor.getDataModel(false);
-		    iterator = dm.getProcessIterator();
-		    while (iterator.hasNext()) {
-			padm = (ProcessAggregateDataModel) iterator.next();
-			System.out.println(padm);
-		    }
-		    resourceMonitor.releaseDataModel(dm);
-		}
-		napms(6000);
-	    }
-
-	} catch (Exception e) {
-	    System.err.println(e);
-	    System.err.println(usage);
-	    resourceMonitor.closeDataModel();
-	    return;
-	}
-	resourceMonitor.closeDataModel();
-
-    } // end main
-
-    /**
-    * Waits some milliseconds.
-    *
-    * @param ms time to wait in milliseconds
-    */
-    public static void napms(int ms) {
-	try {
-	    Thread.sleep(ms);
-	} catch (InterruptedException e) {}
-    }
-
-} // end class rmon
--- a/usr/src/cmd/wbem/provider/com/sun/wbem/solarisprovider/srm/stats.java	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,477 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * ident	"%Z%%M%	%I%	%E% SMI"
- *
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * stats.java
- */
-
-package com.sun.wbem.solarisprovider.srm;
-
-import java.util.*;
-import java.net.InetAddress;
-import javax.wbem.cim.*;
-import javax.wbem.client.*;
-
-public class stats {
-    /*
-     * -u username
-     * -p project
-     * -h host
-     * -I id to auth
-     * -P passwd
-     */
-
-    CIMClient client = null;
-    String user = new String("");
-    String project = new String("");
-    String host = "";
-    String id = new String("");
-    String passwd = new String("");
-    boolean showproject = false;
-    boolean listprops = false;
-    boolean checkonly = false;
-    int intervalms = 5000;
-    
-    String usage = new String(
-	"Usage: " + this.getClass().getName() + "\n" +
-	  "\t" + "-u userid  -p projectname\n" +
-	  "\t" + "-r{aw} [property name] -d{elta} [property name]\n" +
-	  "\t" + "-L{ist all property names}\n" +
-	  "\t" + "-C{heck for existence}\n" + 
-	  "\t" + "-i [update interval (sec)]\n" +
-	  "\t" + "-h host -I auth_user_id  -P auth_user_passwd\n" +
-	  "\n" +
-	  "-I and -P are always required.\n" +
-	  "At least one of -r or -d is required unless -L or -C are used.\n" +
-	  "If -L is specifed, -r, -d, and -i are ignored.\n" +
-	  "If -C is specified, one of -u or -p must be used.\n" +
-	  "Default value for -i is " +
-	  	Integer.toString(intervalms / 1000) + " seconds.\n" +
-	  "Default value for -h is \"localhost\".");
-    
-    
-    void badarg(String s) {
-	System.err.println("Ignoring invalid argument \"" + s + "\"");
-    }
-
-    
-    void parseargs(String args[]) {
-	int argc = args.length;
-	int i, l;
-	
-	for (i = 0; i < argc; i++)  {
-
-	    if (args[i].startsWith("-u")) {
-
-		// specific user to monitor
-		if ((l = args[i].length()) > 2)
-		    user = args[i].substring(2, l);
-		else if ((i < argc - 1) && (!args[i + 1].startsWith("-"))) 
-		    user = args[++i];
-		else
-		    badarg(args[i]);
-		
-	    } else if (args[i].startsWith("-p")) {
-		
-		// specific project to monitor
-		if ((l = args[i].length()) > 2)
-		    project = args[i].substring(2, l);
-		else if ((i < argc - 1) && (!args[i + 1].startsWith("-"))) 
-		    project = args[++i];
-		else
-		    badarg(args[i]);
-		
-	    } else if (args[i].startsWith("-h")) {
-		
-		// hostname
-		if ((l = args[i].length()) > 2)
-		    host = args[i].substring(2, l);
-		else if ((i < argc - 1) && (!args[i + 1].startsWith("-"))) 
-		    host = args[++i];
-		else
-		    badarg(args[i]);
-		
-	    } else if (args[i].startsWith("-i")) {
-		
-		// update interval
-		String s = Integer.toString(intervalms / 1000);
-		if ((l = args[i].length()) > 2)
-		     s = args[i].substring(2, l);
-		else if ((i < argc - 1) && (!args[i + 1].startsWith("-"))) 
-		    s = args[++i];
-		else
-		    badarg(args[i]);
-		intervalms = Integer.valueOf(s).intValue() * 1000;
-		
-	    } else if (args[i].startsWith("-I")) {
-		
-		// user authentication identity 
-		if ((l = args[i].length()) > 2)
-		    id = args[i].substring(2, l);
-		else if ((i < argc - 1) && (!args[i + 1].startsWith("-"))) {
-		    id = args[++i];
-		}
-		else
-		    badarg(args[i]);
-		
-	    } else if (args[i].startsWith("-P")) {
-		
-		// user authentication password 
-		if ((l = args[i].length()) > 2)
-		    passwd = args[i].substring(2, l);
-		else if ((i < argc - 1) && (!args[i + 1].startsWith("-"))) 
-		    passwd = args[++i];
-		else
-		    badarg(args[i]);
-		
-	    } else if (args[i].startsWith("-r")) {
-		
-		// raw property to be monitored
-		String tmp = new String("");
-		if ((l = args[i].length()) > 2)
-		    tmp = args[i].substring(2, l);
-		else if ((i < argc - 1) && (!args[i + 1].startsWith("-"))) 
-		    tmp = args[++i];
-		else {
-		    badarg(args[i]);
-		    continue;
-		}
-		props.addElement(tmp);
-		
-	    } else if (args[i].startsWith("-d")) {
-		
-		// delta property to be monitored
-		String tmp = new String("");
-		if ((l = args[i].length()) > 2)
-		    tmp = args[i].substring(2, l);
-		else if ((i < argc - 1) && (!args[i + 1].startsWith("-"))) 
-		    tmp = args[++i];
-		else {
-		    badarg(args[i]);
-		    continue;
-		}
-		props.addElement(tmp);
-		deltaprops.add(tmp);
-		
-	    } else if (args[i].startsWith("-L")) {
-
-		// list property names only
-		listprops = true;
-		
-	    } else if (args[i].startsWith("-C")) {
-
-		// check for existence  only
-		checkonly = true;
-		
-	    } else {
-
-		// unknown arg
-		System.err.println(usage);
-		return;
-		
-	    }
-	}
-    }
-
-    Vector props = new Vector();
-    HashSet deltaprops = new HashSet();
-    
-    void printHeader(String s, Vector v) {
-	System.out.println((showproject ? "Project " : " User ") + s);
-	Enumeration e = v.elements();
-	while (e.hasMoreElements()) 
-	    System.out.print((String) e.nextElement() + "\t");
-	System.out.println("");
-    }
-
-
-    // compute val1 - val2
-    String delta(CIMValue val1, CIMValue val2) {
-	String rv = new String("empty");
-
-	if (val1 == null || val2 == null)
-	    return new String("null");
-	
-      	Object a = val1.getValue();
-	Object b = val2.getValue();
-
-	if (!(a instanceof Number) || !(b instanceof Number))
-	    rv = new String("NAN");
-	else if (a instanceof UnsignedInt64 && b instanceof UnsignedInt64) {
-	    long x = ((UnsignedInt64) a).longValue();
-	    long y = ((UnsignedInt64) b).longValue();
-	    long z = x - y;
-	    rv = new String(Long.toString(z));
-	} else if (a instanceof UnsignedInt32 && b instanceof UnsignedInt32) {
-	    int x = ((UnsignedInt32) a).intValue();
-	    int y = ((UnsignedInt32) b).intValue();
-	    int z = x - y;
-	    rv = new String(Integer.toString(z));
-	} else if (a instanceof Float && b instanceof Float) {
-	    float x = ((Float) a).floatValue();
-	    float y = ((Float) b).floatValue();
-	    float z = x - y;
-	    rv = new String(Float.toString(z));
-	} else
-	    rv = new String("unknown");
-
-	return rv;
-    }
-
-
-    void checkOnly(String name) {
-	CIMInstance ci = null;
-
-	String className = new String("Solaris_Active");
-	className += (showproject ? "Project" : "User");
-
-	CIMObjectPath op = new CIMObjectPath(className);
-
-	if (showproject) {
-	    op.addKey("ProjectName",
-	      new CIMValue(new String(name)));
-	    op.addKey("CreationClassName",
-	      new CIMValue("Solaris_ActiveProject"));
-	} else {
-	    op.addKey("UserID",
-	      new CIMValue(new Integer(name)));
-	    op.addKey("CreationClassName",
-	      new CIMValue("Solaris_ActiveUser"));
-	}
-	op.addKey("CSCreationClassName",
-	  new CIMValue("Solaris_ComputerSystem"));
-	op.addKey("CSName",
-	  new CIMValue(host));
-	op.addKey("OSCreationClassName",
-	  new CIMValue("Solaris_OperatingSystem"));
-	op.addKey("OSName",
-	  new CIMValue("SunOS"));
-	
-	try {
-	    ci = client.getInstance(op, false);
-	} catch (CIMException x) {
-	    System.err.println(x);
-	    Runtime.getRuntime().exit(-1);
-	}
-	
-	System.err.println("CI: " + ci);
-
-	Runtime.getRuntime().exit(0);
-    }
-    
-
-    void validateProps() {
-	// assume User and ProcessAggregate are the same...
-	String className = new String(
-	    "Solaris_UserProcessAggregateStatisticalInformation");
-	CIMObjectPath op = new CIMObjectPath(className);
-	CIMClass c = null;
-
-	try {
-	    c = client.getClass(op, false);
-	} catch (CIMException x) {
-	    System.err.println(x);
-	    Runtime.getRuntime().exit(-1);
-	}
-	    
-	String propname = null;
-	Enumeration e = props.elements();
-	while (e.hasMoreElements()) {
-	    propname = (String) e.nextElement();
-	    if (c.getProperty(propname) == null) {
-		System.err.println(
-		    "Unknown property `" + propname + "' -- try -L.");
-		Runtime.getRuntime().exit(-1);
-	    }
-	}
-    }
-
-    
-    void listProps() {
-	// assume User and ProcessAggregate are the same...
-	String className = new String(
-	    "Solaris_UserProcessAggregateStatisticalInformation");
-
-	try {
-	    CIMObjectPath op = new CIMObjectPath(className);
-	    CIMClass c = client.getClass(op, false);
-	    Vector v = c.getAllProperties();
-	    Enumeration e = v.elements();
-	    while (e.hasMoreElements()) {
-		CIMProperty p = (CIMProperty) e.nextElement();
-		System.out.println("\t" + p.getName());
-	    }
-	} catch (Exception x) {
-	    System.out.println(x);
-	}
-    }
-
-    
-    public void _main(String args[]) {
-	String name = new String("");
-
-	// handle comd-line args
-	parseargs(args);
-
-	// default to localhost
-	if (host.length() == 0) {
-	    try {
-		host = new String(InetAddress.getLocalHost().getHostName());
-	    } catch (Exception x) {
-		System.err.println(x);
-		Runtime.getRuntime().exit(-1);
-	    }
-	}
-
-	// always need auth id
-	if (id.length() == 0 || passwd.length() == 0) {
-	    System.err.println("Username (-I) and password (-P) are required.");
-	    System.err.println(usage);
-	    Runtime.getRuntime().exit(-1);
-	}
-
-	// initialize client connection to CIMOM
-	try {
-	    CIMNameSpace ns = new CIMNameSpace(host);
-	    UserPrincipal principal = new UserPrincipal(id);
-            PasswordCredential credential = new PasswordCredential(passwd);
-	    client = new CIMClient(ns, principal, credential);
-	    // System.err.println("CLIENT: " + client);
-	} catch (CIMException x) {
-	    System.err.println(x);
-	    Runtime.getRuntime().exit(-1);
-	}
-
-	// just list available properties?
-	if (listprops) {
-	    listProps();
-	    Runtime.getRuntime().exit(0);
-	}
-
-	// always need a user id or project name
-	if (user.length() == 0) {
-	    if (project.length() == 0) {
-		System.err.println(
-		    "User (-u) or project (-p) must be specified.");
-		System.err.println(usage);
-		Runtime.getRuntime().exit(-1);
-	    } else {
-		name = project;
-		showproject = true;
-	    }
-	} else
-	    name = user;
-
-	// just check for entity existence?
-	if (checkonly) {
-	    checkOnly(name);
-	    Runtime.getRuntime().exit(0);
-	}
-
-
-	// examine specified process aggregate 
-	String className = new String("Solaris_");
-	className += (showproject ? "Project" : "User");
-	className += "ProcessAggregateStatisticalInformation";
-
-	// check that all specified props exist
-	validateProps();
-	
-	printHeader(name, props);
-
-	long timestamp = 0;
-	long lastTimestamp = 0;
-
-	Hashtable oldVals = new Hashtable();
-	Hashtable newVals = new Hashtable();
-	String p;
-	
-	try {
-	    
-	    CIMObjectPath op = new CIMObjectPath(className);
-	    op.addKey("Name", new CIMValue(name));
-	    // System.err.println("OP: " + op);
-
-	    while (true) {
-		CIMInstance ci = client.getInstance(op, false);
-		// System.err.println("CI: " + ci);
-
-		CIMValue val = ci.getProperty("Timestamp").getValue();
-		timestamp = ((UnsignedInt64) val.getValue()).longValue();
-		newVals.put("Timestamp", val);
-		
-		if (timestamp > lastTimestamp) {
-		    Enumeration e = props.elements();
-		    while (e.hasMoreElements()) {
-			p = (String) e.nextElement();
-			val = ci.getProperty(p).getValue();
-			newVals.put(p, val);
-		    }
-		    lastTimestamp = timestamp;
-
-		    e = props.elements();
-		    while (e.hasMoreElements()) {
-			p = (String) e.nextElement();
-			String s = new String();
-			CIMValue o = (CIMValue) oldVals.get(p);
-			CIMValue n = (CIMValue) newVals.get(p);
-
-			{
-			    String a = "x";
-			    String b = "x";
-			    if (o != null)
-				a = o.toString();
-			    if (n != null)
-				b = n.toString();
-			    // System.out.print(p + ": " + a + "/" + b + "\t");
-			}
-			
-			if (deltaprops.contains(p)) {
-			    s = delta(n, o);
-			    oldVals.put(p, n);
-			} else {
-			    s = n.toString();
-			}
-			System.out.print(s + "\t");
-		    }
-		    System.out.println();
-		    
-		}
-		Thread.sleep(intervalms);
-	    }
-		
-	} catch (Exception x) {
-	    x.printStackTrace();
-	}
-    }
-
-    
-    public static void main(String args[]) {
-	stats inst = new stats();
-	inst._main(args);
-
-    }
-}
--- a/usr/src/cmd/wbem/provider/tools/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# cmd/wbem/provider/tools/Makefile
-#
-# Copyright (c) 2001 Sun Microsystems, Inc.  
-# All rights reserved.
-#
-
-# include global definitions
-include $(SRC)/cmd/wbem/Makefile.wbem
-
-SUBDIRS=	rds
-
-all:=		TARGET=	all
-install:=	TARGET=	install
-clean:=		TARGET=	clean
-clobber:=	TARGET=	clobber
-lint:=		TARGET= lint
-
-.KEEP_STATE:
-
-all install install_h clean clobber lint: $(SUBDIRS)
-
-$(SUBDIRS): FRC
-	cd $@; pwd; $(MAKE) $(TARGET)
-
-FRC:
--- a/usr/src/cmd/wbem/provider/tools/rds/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# cmd/wbem/provider/tools/rds/Makefile
-#
-# Copyright (c) 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-
-
-PROG = rds
-OBJS = rds.o rdutil.o rdfile.o rdtable.o rdkstat.o rdimpl.o rdprot.o prtelement.o
-POFILES = $(OBJS:.o=.po)
-CLOBBERFILES = $(POFILE) $(POFILES)
-
-include $(SRC)/cmd/wbem/Makefile.cmd
-
-POFILE = prds.po
-
-.KEEP_STATE:
-
-SUBDIRS =	$(MACH)
-$(BUILD64)SUBDIRS += $(MACH64)
-
-
-all	:=	TARGET = all
-install	:=	TARGET = install
-clean	:=	TARGET = clean
-clobber	:=	TARGET = clobber
-lint	:=	TARGET = lint
-test	:=	TARGET = test
-
-all:		$(WBEMTOOLDIRS) $(SUBDIRS)
-clean:		$(SUBDIRS)
-clobber:	$(SUBDIRS)
-lint:		$(SUBDIRS)
-test:		$(SUBDIRS)
-
-install: all $(SUBDIRS)
-	-$(RM) $(ROOTWBEMPROG)
-	-$(LN) $(ISAEXEC) $(ROOTWBEMPROG)
-
-$(SUBDIRS):	FRC
-	@cd $@; pwd; $(MAKE) $(TARGET)
-
-$(POFILE): $(POFILES)
-	$(RM) $@
-	$(CAT) $(POFILES) > $@
-
-FRC:
-
-include $(SRC)/cmd/Makefile.targ
-
--- a/usr/src/cmd/wbem/provider/tools/rds/Makefile.com	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# cmd/wbem/provider/tools/rds/Makefile.com
-#
-
-
-PROG = rds
-OBJS = rds.o rdutil.o rdfile.o rdtable.o rdimpl.o rdprot.o rdlist.o prtelement.o
-SRCS = $(OBJS:%.o=../%.c)
-
-include $(SRC)/cmd/wbem/Makefile.cmd
-
-CPPFLAGS += -D_REENTRANT
-CFLAGS += $(CCVERBOSE)
-CFLAGS64 += $(CCVERBOSE)
-LDLIBS += -lproject
-LINTFLAGS += -u
-LINTFLAGS64 += -u
-
-# i.e. permission and group for /usr/bin-style executables
-FILEMODE = 0555
-
-.KEEP_STATE:
-
-.PARALLEL : $(OBJS)
-
-all: $(PROG)
-
-test:
-	echo WBEMPROG32 $(ROOTWBEMPROG32)
-
-clean:
-	$(RM) $(OBJS)
-
-$(PROG): $(OBJS)
-	$(LINK.c) -o $@ $(OBJS) $(LDLIBS)
-	$(POST_PROCESS)
-
-%.o:	../%.c
-	$(COMPILE.c) -o $@ $<
-	$(POST_PROCESS_O)
-
-lint:
-	$(LINT.c) $(SRCS) $(LDLIBS)
-
-include $(SRC)/cmd/Makefile.targ
--- a/usr/src/cmd/wbem/provider/tools/rds/amd64/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
-
-.KEEP_STATE:
-
-
-include ../Makefile.com
-include $(SRC)/cmd/Makefile.cmd.64
-
-install: all $(ROOTWBEMPROG64)
-
-
--- a/usr/src/cmd/wbem/provider/tools/rds/i386/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# cmd/wbem/provider/tools/rds/i386/Makefile
-#
-# Copyright (c) 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-
-.KEEP_STATE:
-
-include ../Makefile.com
-
-install: all $(ROOTWBEMPROG32)
--- a/usr/src/cmd/wbem/provider/tools/rds/prtelement.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2000-2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-
-#include "rdimpl.h"
-
-
-void
-prtelement(FILE *fp, id_info_t *id)
-{
-	(void) fprintf(fp, "\n"
-	"processID                   = %d\n"
-	"userID                      = %d\n"
-	"taskID                      = %d\n"
-	"projectID		     = %d\n"
-	"setID                       = %d\n"
-	"UserModeTime                = %f\n"
-	"SystemModeTime              = %f\n"
-	"SystemTrapTime              = %f\n"
-	"TextPageFaultSleepTime      = %f\n"
-	"DataPageFaultSleepTime      = %f\n"
-	"SystemPageFaultSleepTime    = %f\n"
-	"UserLockWaitSleepTime       = %f\n"
-	"OtherSleepTime              = %f\n"
-	"WaitCPUTime                 = %f\n"
-	"StoppedTime                 = %f\n"
-	"MinorPageFaults             = %" PRId64 "\n"
-	"MajorPageFaults             = %" PRId64 "\n"
-	"SwapOperations              = %" PRId64 "\n"
-	"BlocksRead                  = %" PRId64 "\n"
-	"BlocksWritten               = %" PRId64 "\n"
-	"MessagesSent                = %" PRId64 "\n"
-	"MessagesReceived            = %" PRId64 "\n"
-	"SignalsReceived             = %" PRId64 "\n"
-	"VoluntaryContextSwitches    = %" PRId64 "\n"
-	"InvoluntaryContextSwitches  = %" PRId64 "\n"
-	"SystemCallsMade             = %" PRId64 "\n"
-	"CharacterIOUsage            = %" PRId64 "\n"
-	"ProcessHeapSize             = %" PRId64 "\n"
-	"ProcessVMSize               = %" PRId64 "\n"
-	"ProcessResidentSetSize      = %" PRId64 "\n"
-	"PercentCPUTime              = %f\n"
-	"PercentMemorySize           = %f\n"
-	"UserSystemModeTime          = %" PRId64 "\n"
-	"NumThreads                  = %d\n"
-	"NumProcesses                = %d\n"
-	"TIMESTAMP in us             = %" PRId64 "\n"
-	"name                        = %s\n",
-	id->id_pid,
-	id->id_uid,
-	id->id_taskid,
-	id->id_projid,
-	id->id_psetid,
-	id->id_usr,
-	id->id_sys,
-	id->id_ttime,
-	id->id_tpftime,
-	id->id_dpftime,
-	id->id_kpftime,
-	id->id_lck,
-	id->id_slp,
-	id->id_lat,
-	id->id_stime,
-	id->id_minf,
-	id->id_majf,
-	id->id_nswap,
-	id->id_inblk,
-	id->id_oublk,
-	id->id_msnd,
-	id->id_mrcv,
-	id->id_sigs,
-	id->id_vctx,
-	id->id_ictx,
-	id->id_scl,
-	id->id_ioch,
-	id->id_hpsize,
-	id->id_size,
-	id->id_rssize,
-	id->id_pctcpu,
-	id->id_pctmem,
-	id->id_time,
-	id->id_nlwps,
-	id->id_nproc,
-	id->id_timestamp,
-	id->id_name);
-}
--- a/usr/src/cmd/wbem/provider/tools/rds/rdfile.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,226 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2000-2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <strings.h>
-
-#include "rdimpl.h"
-#include "rdtable.h"
-#include "rdutil.h"
-#include "rdfile.h"
-
-#define	FDS_TABLE_SIZE	1024
-
-static fd_t *fd_tbl = NULL;
-static int fd_max;
-static int fd_cnt;
-static int fd_cnt_cur;
-static int fd_cnt_old;
-static fds_t *fds_tbl[FDS_TABLE_SIZE];
-
-void
-fd_init(int n)
-{
-	fd_max = n;
-	fd_cnt = fd_cnt_cur = fd_cnt_old = 0;
-	fd_tbl = Zalloc(sizeof (fd_t) * n);
-	(void) memset(fds_tbl, 0, sizeof (fds_t *) * FDS_TABLE_SIZE);
-}
-
-void
-fd_exit()
-{
-	if (fd_tbl)
-		free(fd_tbl);
-}
-
-void
-fd_close(fd_t *fdp)
-{
-	if (fdp) {
-		if (fdp->fd_fd >= 0 && fdp->fd_name[0] != '\0') {
-			(void) close(fdp->fd_fd);
-			fd_cnt--;
-		}
-
-		(void) memset(fdp, 0, sizeof (fd_t));
-		fdp->fd_fd = -1;
-	}
-}
-
-void
-fd_closeall()
-{
-	fd_t *fdp = fd_tbl;
-	int i;
-
-	for (i = 0; i < fd_max; i++) {
-		fd_close(fdp);
-		fdp++;
-	}
-}
-
-
-int
-fd_count()
-{
-	fd_t *fdp = fd_tbl;
-	int count = 0;
-	int i;
-
-	for (i = 0; i < fd_max; i++, fdp++) {
-		if (fdp->fd_name[0] != '\0') {
-			++count;
-		}
-	}
-	return (count);
-}
-
-
-static void
-fd_recycle()
-{
-	fd_t *fdp = fd_tbl;
-	int counter;
-	int i;
-
-	counter = abs(fd_cnt_old - fd_cnt) + NUM_RESERVED_FD;
-
-	for (i = 0; i < fd_max; i++, fdp++) {
-
-		if (fdp->fd_fd == -1)
-			continue;	/* skip recycled ones */
-
-		if (fdp->fd_name[0] != '\0') {	/* file has name */
-			(void) close(fdp->fd_fd);
-			fd_cnt--;
-			counter--;
-			fdp->fd_fd = -1;
-		}
-
-		if (counter == 0)
-			break;
-	}
-}
-
-fd_t *
-fd_open(char *name, int flags, fd_t *fdp)
-{
-	fd_t *fdp_new;
-	int fd;
-
-	if (fd_cnt > fd_max - NUM_RESERVED_FD)
-		fd_recycle();
-
-	if (fdp != NULL) {
-		if ((strcmp(fdp->fd_name, name) == 0) && (fdp->fd_fd >= 0)) {
-			fd_cnt_cur++;
-			return (fdp);
-		}
-	}
-
-again:	fd = open(name, flags);
-
-	if (fd == -1) {
-		if ((errno == EMFILE) || (errno == ENFILE)) {
-			fd_recycle();
-			goto again;
-		}
-		fdp_new = NULL;
-	} else {
-		fdp_new = &fd_tbl[fd];
-		fdp_new->fd_fd = fd;
-		fdp_new->fd_flags = flags;
-		(void) strcpy(fdp_new->fd_name, name);
-		fd_cnt++;
-		fd_cnt_cur++;
-	}
-	return (fdp_new);
-}
-
-int
-fd_getfd(fd_t *fdp)
-{
-	return (fdp->fd_fd);
-}
-
-void
-fd_update()
-{
-	fd_cnt_old = fd_cnt_cur;
-	fd_cnt_cur = 0;
-}
-
-fds_t *
-fds_get(pid_t pid)
-{
-	fds_t *fdsp;
-	int hash = pid % FDS_TABLE_SIZE;
-
-	for (fdsp = fds_tbl[hash]; fdsp; fdsp = fdsp->fds_next)
-		if (fdsp->fds_pid == pid)	/* searching for pid */
-			return (fdsp);
-
-	fdsp = Zalloc(sizeof (fds_t));	/* adding new if pid was not found */
-	fdsp->fds_pid = pid;
-	fdsp->fds_next = fds_tbl[hash];
-	fds_tbl[hash] = fdsp;
-	return (fdsp);
-}
-
-void
-fds_rm(pid_t pid)
-{
-	fds_t *fds;
-	fds_t *fds_prev = NULL;
-	int hash = pid % FDS_TABLE_SIZE;
-
-	for (fds = fds_tbl[hash]; fds && fds->fds_pid != pid;
-		fds = fds->fds_next) /* finding pid */
-		fds_prev = fds;
-
-	if (fds) {			/* if pid was found */
-
-		fd_close(fds->fds_psinfo);
-		fd_close(fds->fds_usage);
-		fd_close(fds->fds_lpsinfo);
-		fd_close(fds->fds_lusage);
-
-		if (fds_prev)
-			fds_prev->fds_next = fds->fds_next;
-		else
-			fds_tbl[hash] = fds->fds_next;
-
-		free(fds);
-	}
-}
--- a/usr/src/cmd/wbem/provider/tools/rds/rdfile.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_RDFILE_H
-#define	_RDFILE_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#define	MAX_PROCFS_PATH	40
-#define	NUM_RESERVED_FD	10
-
-typedef struct fd {
-	int	fd_fd;
-	int	fd_flags;
-	char	fd_name[MAX_PROCFS_PATH];
-} fd_t;
-
-typedef struct fds {
-	pid_t	fds_pid;
-	fd_t	*fds_psinfo;
-	fd_t	*fds_usage;
-	fd_t	*fds_lpsinfo;
-	fd_t	*fds_lusage;
-	struct fds *fds_next;
-} fds_t;
-
-extern void fd_init(int);
-extern void fd_exit();
-extern fd_t *fd_open(char *, int, fd_t *);
-extern int fd_getfd(fd_t *);
-extern void fd_close(fd_t *);
-extern void fd_closeall();
-extern void fd_update();
-extern fds_t *fds_get(pid_t);
-extern void fds_rm(pid_t);
-extern int fd_count();
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _RDFILE_H */
--- a/usr/src/cmd/wbem/provider/tools/rds/rdimpl.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,747 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/types.h>
-#include <sys/resource.h>
-#include <sys/loadavg.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-#include <sys/utsname.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <string.h>
-#include <errno.h>
-#include <poll.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <time.h>
-#include <project.h>
-#include <libintl.h>
-#include <pthread.h>
-
-#include "rdimpl.h"
-#include "rdutil.h"
-#include "rdtable.h"
-#include "rdfile.h"
-#include "rdlist.h"
-
-/* global variables */
-
-extern pthread_mutex_t listLock;
-
-list_t	lwps;		/* list of lwps/processes */
-list_t	users;		/* list of users */
-list_t	projects;	/* list of projects */
-list_t	processes;	/* list of processes */
-
-sys_info_t sys_info;
-
-jmp_buf dm_jmpbuffer;
-char	errmsg[NL_TEXTMAX];	/* error message max 255 */
-
-static float	total_mem;	/* total memory usage */
-static float	total_cpu;	/* total cpu usage */
-static char *nullstr = "null";
-static double		loadavg[3];
-static DIR		*procdir;
-
-
-/*
- * Add a LWP entry to the specifed list.
- */
-lwp_info_t *
-list_add_lwp(list_t *list, pid_t pid, id_t lwpid)
-{
-	lwp_info_t *lwp;
-
-	if (list->l_head == NULL) {
-		list->l_head = list->l_tail = lwp = Zalloc(sizeof (lwp_info_t));
-	} else {
-		lwp = Zalloc(sizeof (lwp_info_t));
-		lwp->li_prev = list->l_tail;
-		((lwp_info_t *)list->l_tail)->li_next = lwp;
-		list->l_tail = lwp;
-	}
-	lwp->li_lwpsinfo = Zalloc(sizeof (lwpsinfo_t));
-	lwp->li_psinfo = Zalloc(sizeof (psinfo_t));
-	lwp->li_psinfo->pr_pid = pid;
-	lwp->li_lwpsinfo->pr_lwpid = lwpid;
-	lwpid_add(lwp, pid, lwpid);
-	list->l_count++;
-	return (lwp);
-}
-
-
-/*
- * Remove an LWP entry from the specified list.
- */
-static void
-list_remove_lwp(list_t *list, lwp_info_t *lwp)
-{
-
-	if (lwp->li_prev)
-		lwp->li_prev->li_next = lwp->li_next;
-	else
-		list->l_head = lwp->li_next;	/* removing the head */
-	if (lwp->li_next)
-		lwp->li_next->li_prev = lwp->li_prev;
-	else
-		list->l_tail = lwp->li_prev;	/* removing the tail */
-	lwpid_del(lwp->li_psinfo->pr_pid, lwp->li_lwpsinfo->pr_lwpid);
-	if (lwpid_pidcheck(lwp->li_psinfo->pr_pid) == 0)
-		fds_rm(lwp->li_psinfo->pr_pid);
-	list->l_count--;
-	Free(lwp->li_lwpsinfo);
-	Free(lwp->li_psinfo);
-	Free(lwp);
-}
-
-
-/*
- * Remove entry from the specified list.
- */
-static void
-list_remove_id(list_t *list, id_info_t *id)
-{
-
-	if (id->id_prev)
-		id->id_prev->id_next = id->id_next;
-	else
-		list->l_head = id->id_next;	/* removing the head */
-	if (id->id_next)
-		id->id_next->id_prev = id->id_prev;
-	else
-		list->l_tail = id->id_prev;	/* removing the tail */
-
-	list->l_count--;
-	/* anly free if doesn't point to static 'nullstr' def */
-	if (id->id_name != nullstr)
-		Free(id->id_name);
-	Free(id);
-}
-
-
-/*
- * Empty the specified list.
- * If it's an LWP list, this will traverse /proc to
- * restore microstate accounting to its original value.
- */
-void
-list_clear(list_t *list)
-{
-	if (list->l_type == LT_LWPS) {
-		lwp_info_t	*lwp = list->l_tail;
-		lwp_info_t	*lwp_tmp;
-
-		fd_closeall();
-		while (lwp) {
-			lwp_tmp = lwp;
-			lwp = lwp->li_prev;
-			list_remove_lwp(&lwps, lwp_tmp);
-		}
-	} else {
-		id_info_t *id = list->l_head;
-		id_info_t *nextid;
-		while (id) {
-			nextid = id->id_next;
-			/* anly free if doesn't point to static 'nullstr' def */
-			if (id->id_name != nullstr)
-				Free(id->id_name);
-			Free(id);
-			id = nextid;
-		}
-		list->l_count = 0;
-		list->l_head = list->l_tail = NULL;
-	}
-}
-
-
-/*
- * Calculate a process' statistics from its lwp statistics.
- */
-static void
-id_update(id_info_t *id, lwp_info_t *lwp, int l_type) {
-	char usrname[LOGNAME_MAX+1];
-	char projname[PROJNAME_MAX+1];
-
-	/*
-	 * When an id is processed first time in an update run its
-	 * id_alive flag set to false.
-	 * The next values are gauges, their old values from the previous
-	 * calculation should be set to null.
-	 * The names and timestamp must be set once.
-	 */
-	if (id->id_alive == B_FALSE) {
-		id->id_hpsize = 0;
-		id->id_size = 0;
-		id->id_rssize = 0;
-		id->id_pctmem = 0;
-		id->id_timestamp = 0;
-		id->id_time = 0;
-		id->id_pctcpu = 0;
-		id->id_nlwps = 0;
-		id->id_nproc = 0;
-		id->id_pid = (int)-1;
-		id->id_taskid	= lwp->li_psinfo->pr_taskid;
-		id->id_projid	= lwp->li_psinfo->pr_projid;
-		id->id_psetid	= lwp->li_lwpsinfo->pr_bindpset;
-		id->id_uid	= lwp->li_psinfo->pr_uid;
-		if (l_type == LT_USERS) {
-			getusrname(id->id_uid, usrname, LOGNAME_MAX+1);
-			id->id_name = Realloc(id->id_name,
-					strlen(usrname) + 1);
-			(void) strcpy(id->id_name, usrname);
-		} else if (l_type == LT_PROJECTS) {
-			getprojname(id->id_projid, projname, PROJNAME_MAX);
-			id->id_name = Realloc(id->id_name,
-					strlen(projname) + 1);
-			(void) strcpy(id->id_name, projname);
-		} else {
-			id->id_name = nullstr;
-		}
-		id->id_timestamp = get_timestamp();
-		/* mark this id as changed in this update run */
-		id->id_alive = B_TRUE;
-	}
-
-	if (lwp->li_psinfo->pr_nlwp > 0) {
-	    id->id_nlwps++;
-	}
-
-	/*
-	 * The next values are calculated only one time for each pid.
-	 */
-	if ((id->id_pid != lwp->li_psinfo->pr_pid) &&
-		(lwp->rlwpid == lwp->li_lwpsinfo->pr_lwpid)) {
-		id->id_nproc++;
-		id->id_hpsize	+= (lwp->li_hpsize/1024);
-		id->id_size	+= lwp->li_psinfo->pr_size;
-		id->id_rssize	+= lwp->li_psinfo->pr_rssize;
-		id->id_pctmem	+= FRC2PCT(lwp->li_psinfo->pr_pctmem);
-		id->id_pid	= lwp->li_psinfo->pr_pid;
-		if (l_type == LT_PROCESS)
-			total_mem += FRC2PCT(lwp->li_psinfo->pr_pctmem);
-	}
-
-	id->id_pctcpu	+= FRC2PCT(lwp->li_lwpsinfo->pr_pctcpu);
-	if (l_type == LT_PROCESS)
-		total_cpu += FRC2PCT(lwp->li_lwpsinfo->pr_pctcpu);
-	id->id_time	+= TIME2SEC(lwp->li_lwpsinfo->pr_time);
-	id->id_usr	+= lwp->li_usr;
-	id->id_sys	+= lwp->li_sys;
-	id->id_ttime	+= lwp->li_ttime;
-	id->id_tpftime	+= lwp->li_tpftime;
-	id->id_dpftime	+= lwp->li_dpftime;
-	id->id_kpftime	+= lwp->li_kpftime;
-	id->id_lck	+= lwp->li_lck;
-	id->id_slp	+= lwp->li_slp;
-	id->id_lat	+= lwp->li_lat;
-	id->id_stime	+= lwp->li_stime;
-	id->id_minf	+= lwp->li_minf;
-	id->id_majf	+= lwp->li_majf;
-	id->id_nswap	+= lwp->li_nswap;
-	id->id_inblk	+= lwp->li_inblk;
-	id->id_oublk	+= lwp->li_oublk;
-	id->id_msnd	+= lwp->li_msnd;
-	id->id_mrcv	+= lwp->li_mrcv;
-	id->id_sigs	+= lwp->li_sigs;
-	id->id_vctx	+= lwp->li_vctx;
-	id->id_ictx	+= lwp->li_ictx;
-	id->id_scl	+= lwp->li_scl;
-	id->id_ioch	+= lwp->li_ioch;
-}
-
-static void
-list_update(list_t *list, lwp_info_t *lwp)
-{
-	id_info_t *id;
-	if (list->l_head == NULL) {			/* first element */
-		list->l_head = list->l_tail = id = Zalloc(sizeof (id_info_t));
-		id_update(id, lwp, list->l_type);
-		list->l_count++;
-		return;
-	}
-
-	for (id = list->l_head; id; id = id->id_next) {
-		if ((list->l_type == LT_PROCESS) &&
-		    (id->id_pid != lwp->li_psinfo->pr_pid))
-			continue;
-		if ((list->l_type == LT_USERS) &&
-		    (id->id_uid != lwp->li_psinfo->pr_uid))
-			continue;
-		if ((list->l_type == LT_PROJECTS) &&
-		    (id->id_projid != lwp->li_psinfo->pr_projid))
-			continue;
-		id_update(id, lwp, list->l_type);
-		return;
-	}
-
-	/* a new element */
-	id = list->l_tail;
-	id->id_next = Zalloc(sizeof (id_info_t));
-	id->id_next->id_prev = list->l_tail;
-	id->id_next->id_next = NULL;
-	list->l_tail = id->id_next;
-	id = list->l_tail;
-	id_update(id, lwp, list->l_type);
-	list->l_count++;
-}
-
-/*
- * This procedure removes all dead procs/user/.. from the specified list.
- */
-static void
-list_refresh_id(list_t *list)
-{
-	id_info_t *id, *id_next;
-
-	if (!(list->l_type & LT_PROCESS) && !(list->l_type & LT_USERS) &&
-	    !(list->l_type & LT_TASKS) && !(list->l_type & LT_PROJECTS) &&
-	    !(list->l_type & LT_PSETS)) {
-		return;
-	}
-	id = list->l_head;
-
-	while (id) {
-		if (id->id_alive == B_FALSE) {	/* id is dead */
-			id_next = id->id_next;
-			list_remove_id(list, id);
-			id = id_next;
-		} else {
-
-			/* normalize total mem and cpu across all processes. */
-			if (total_mem >= 100)
-				id->id_pctmem = (100 * id->id_pctmem) /
-				    total_mem;
-			if (total_cpu >= 100)
-				id->id_pctcpu = (100 * id->id_pctcpu) /
-				    total_cpu;
-
-			id->id_alive = B_FALSE;
-			id = id->id_next;
-		}
-	}
-}
-
-/*
- * This procedure removes all dead lwps from the specified lwp list.
- */
-static void
-list_refresh(list_t *list)
-{
-	lwp_info_t *lwp, *lwp_next;
-
-	if (!(list->l_type & LT_LWPS))
-		return;
-	lwp = list->l_head;
-
-	while (lwp) {
-		if (lwp->li_alive == B_FALSE) {	/* lwp is dead */
-			lwp_next = lwp->li_next;
-			list_remove_lwp(&lwps, lwp);
-			lwp = lwp_next;
-		} else {
-			lwp->li_alive = B_FALSE;
-			lwp = lwp->li_next;
-		}
-	}
-}
-
-
-/*
- * Update a LWP entry according to the specified usage data.
- */
-static void
-lwp_update(lwp_info_t *lwp, struct prusage *usage_buf)
-{
-	lwp->li_usr	= (double)(TIME2NSEC(usage_buf->pr_utime) -
-	    TIME2NSEC(lwp->li_usage.pr_utime)) / NANOSEC;
-	lwp->li_sys	= (double)(TIME2NSEC(usage_buf->pr_stime) -
-	    TIME2NSEC(lwp->li_usage.pr_stime)) / NANOSEC;
-	lwp->li_ttime	= (double)(TIME2NSEC(usage_buf->pr_ttime) -
-	    TIME2NSEC(lwp->li_usage.pr_ttime)) / NANOSEC;
-	lwp->li_tpftime = (double)(TIME2NSEC(usage_buf->pr_tftime) -
-	    TIME2NSEC(lwp->li_usage.pr_tftime)) / NANOSEC;
-	lwp->li_dpftime = (double)(TIME2NSEC(usage_buf->pr_dftime) -
-	    TIME2NSEC(lwp->li_usage.pr_dftime)) / NANOSEC;
-	lwp->li_kpftime = (double)(TIME2NSEC(usage_buf->pr_kftime) -
-	    TIME2NSEC(lwp->li_usage.pr_kftime)) / NANOSEC;
-	lwp->li_lck	= (double)(TIME2NSEC(usage_buf->pr_ltime) -
-	    TIME2NSEC(lwp->li_usage.pr_ltime)) / NANOSEC;
-	lwp->li_slp	= (double)(TIME2NSEC(usage_buf->pr_slptime) -
-	    TIME2NSEC(lwp->li_usage.pr_slptime)) / NANOSEC;
-	lwp->li_lat	= (double)(TIME2NSEC(usage_buf->pr_wtime) -
-	    TIME2NSEC(lwp->li_usage.pr_wtime)) / NANOSEC;
-	lwp->li_stime	= (double)(TIME2NSEC(usage_buf->pr_stoptime) -
-	    TIME2NSEC(lwp->li_usage.pr_stoptime)) / NANOSEC;
-	lwp->li_minf = usage_buf->pr_minf - lwp->li_usage.pr_minf;
-	lwp->li_majf = usage_buf->pr_majf - lwp->li_usage.pr_majf;
-	lwp->li_nswap = usage_buf->pr_nswap - lwp->li_usage.pr_nswap;
-	lwp->li_inblk = usage_buf->pr_inblk - lwp->li_usage.pr_inblk;
-	lwp->li_oublk = usage_buf->pr_oublk -lwp->li_usage.pr_oublk;
-	lwp->li_msnd = usage_buf->pr_msnd - lwp->li_usage.pr_msnd;
-	lwp->li_mrcv = usage_buf->pr_mrcv - lwp->li_usage.pr_mrcv;
-	lwp->li_sigs = usage_buf->pr_sigs - lwp->li_usage.pr_sigs;
-	lwp->li_vctx = usage_buf->pr_vctx - lwp->li_usage.pr_vctx;
-	lwp->li_ictx = usage_buf->pr_ictx - lwp->li_usage.pr_ictx;
-	lwp->li_scl = usage_buf->pr_sysc - lwp->li_usage.pr_sysc;
-	lwp->li_ioch = usage_buf->pr_ioch - lwp->li_usage.pr_ioch;
-	lwp->li_timestamp = TIME2NSEC(usage_buf->pr_tstamp);
-	(void) memcpy(&lwp->li_usage, usage_buf, sizeof (prusage_t));
-}
-
-
-/*
- * This is the meat of the /proc scanner.
- * It will visit every single LWP in /proc.
- */
-static void
-collect_lwp_data()
-{
-	char *pidstr;
-	pid_t pid;
-	id_t lwpid;
-	size_t entsz;
-	long nlwps, nent, i;
-	char *buf, *ptr;
-	char pfile[MAX_PROCFS_PATH];
-
-	fds_t *fds;
-	lwp_info_t *lwp;
-
-	dirent_t *direntp;
-
-	prheader_t	header_buf;
-	psinfo_t	psinfo_buf;
-	prusage_t	usage_buf;
-	lwpsinfo_t	*lwpsinfo_buf;
-	prusage_t	*lwpusage_buf;
-
-	log_msg("->collect_lwp_data(): %d files open\n", fd_count());
-	for (rewinddir(procdir); (direntp = readdir(procdir)); ) {
-		pidstr = direntp->d_name;
-		if (pidstr[0] == '.')	/* skip "." and ".."  */
-			continue;
-		pid = atoi(pidstr);
-		if (pid == 0 || pid == 2 || pid == 3)
-			continue;	/* skip sched, pageout and fsflush */
-
-		fds = fds_get(pid);	/* get ptr to file descriptors */
-
-		/*
-		 * Here we are going to read information about
-		 * current process (pid) from /proc/pid/psinfo file.
-		 * If process has more than one lwp, we also should
-		 * read /proc/pid/lpsinfo for information about all lwps.
-		 */
-		(void) snprintf(pfile, MAX_PROCFS_PATH,
-		    "/proc/%s/psinfo", pidstr);
-		if ((fds->fds_psinfo = fd_open(pfile, O_RDONLY,
-		    fds->fds_psinfo)) == NULL)
-			continue;
-		if (pread(fd_getfd(fds->fds_psinfo), &psinfo_buf,
-			sizeof (struct psinfo), 0) != sizeof (struct psinfo)) {
-			fd_close(fds->fds_psinfo);
-			continue;
-		}
-
-		fd_close(fds->fds_psinfo);
-
-		nlwps = psinfo_buf.pr_nlwp + psinfo_buf.pr_nzomb;
-		if (nlwps > 1) {
-			(void) snprintf(pfile, MAX_PROCFS_PATH,
-			    "/proc/%s/lpsinfo", pidstr);
-			if ((fds->fds_lpsinfo = fd_open(pfile, O_RDONLY,
-			    fds->fds_lpsinfo)) == NULL)
-				continue;
-			entsz = sizeof (struct prheader);
-			if (pread(fd_getfd(fds->fds_lpsinfo), &header_buf,
-			    entsz, 0) != entsz) {
-				fd_close(fds->fds_lpsinfo);
-				continue;
-			}
-			nent = header_buf.pr_nent;
-			entsz = header_buf.pr_entsize * nent;
-			ptr = buf = Malloc(entsz);
-			if (pread(fd_getfd(fds->fds_lpsinfo), buf,
-			    entsz, sizeof (struct prheader)) != entsz) {
-				fd_close(fds->fds_lpsinfo);
-				Free(buf);
-				continue;
-			}
-
-			fd_close(fds->fds_lpsinfo);
-
-			for (i = 0; i < nent;
-			    i++, ptr += header_buf.pr_entsize) {
-				/*LINTED ALIGNMENT*/
-				lwpsinfo_buf = (lwpsinfo_t *)ptr;
-				lwpid = lwpsinfo_buf->pr_lwpid;
-				if ((lwp = lwpid_get(pid, lwpid)) == NULL) {
-					lwp = list_add_lwp(&lwps, pid, lwpid);
-				}
-				if (i == 0)
-					lwp->rlwpid = lwpid;
-				(void) memcpy(lwp->li_psinfo, &psinfo_buf,
-				    sizeof (psinfo_t) - sizeof (lwpsinfo_t));
-				lwp->li_alive = B_TRUE;
-				(void) memcpy(lwp->li_lwpsinfo,
-				    lwpsinfo_buf, sizeof (lwpsinfo_t));
-			}
-			Free(buf);
-		} else {
-			lwpid = psinfo_buf.pr_lwp.pr_lwpid;
-			if ((lwp = lwpid_get(pid, lwpid)) == NULL) {
-				lwp = list_add_lwp(&lwps, pid, lwpid);
-			}
-			lwp->rlwpid = lwpid;
-			(void) memcpy(lwp->li_psinfo, &psinfo_buf,
-			    sizeof (psinfo_t) - sizeof (lwpsinfo_t));
-			lwp->li_alive = B_TRUE;
-			(void) memcpy(lwp->li_lwpsinfo,
-			    &psinfo_buf.pr_lwp, sizeof (lwpsinfo_t));
-			lwp->li_lwpsinfo->pr_pctcpu = lwp->li_psinfo->pr_pctcpu;
-		}
-
-		/*
-		 * At this part of scandir we read additional information
-		 * about processes from /proc/pid/usage file.
-		 * Again, if process has more than one lwp, then we
-		 * will get information about all its lwps from
-		 * /proc/pid/lusage file.
-		 */
-		if (nlwps > 1) {
-			(void) snprintf(pfile, MAX_PROCFS_PATH,
-			    "/proc/%s/lusage", pidstr);
-			if ((fds->fds_lusage = fd_open(pfile, O_RDONLY,
-			    fds->fds_lusage)) == NULL)
-				continue;
-			entsz = sizeof (struct prheader);
-			if (pread(fd_getfd(fds->fds_lusage), &header_buf,
-			    entsz, 0) != entsz) {
-				fd_close(fds->fds_lusage);
-				continue;
-			}
-
-			nent = header_buf.pr_nent;
-			entsz = header_buf.pr_entsize * nent;
-			buf = Malloc(entsz);
-			if (pread(fd_getfd(fds->fds_lusage), buf,
-				entsz, sizeof (struct prheader)) != entsz) {
-				fd_close(fds->fds_lusage);
-				Free(buf);
-				continue;
-			}
-
-			fd_close(fds->fds_lusage);
-
-			for (i = 1, ptr = buf + header_buf.pr_entsize; i < nent;
-			    i++, ptr += header_buf.pr_entsize) {
-				/*LINTED ALIGNMENT*/
-				lwpusage_buf = (prusage_t *)ptr;
-				lwpid = lwpusage_buf->pr_lwpid;
-				if ((lwp = lwpid_get(pid, lwpid)) == NULL)
-					continue;
-				lwp_update(lwp, lwpusage_buf);
-			}
-			Free(buf);
-		} else {
-			(void) snprintf(pfile, MAX_PROCFS_PATH,
-			    "/proc/%s/usage", pidstr);
-			if ((fds->fds_usage = fd_open(pfile, O_RDONLY,
-			    fds->fds_usage)) == NULL)
-				continue;
-			entsz = sizeof (prusage_t);
-			if (pread(fd_getfd(fds->fds_usage), &usage_buf,
-			    entsz, 0) != entsz) {
-				fd_close(fds->fds_usage);
-				continue;
-			}
-
-			fd_close(fds->fds_usage);
-
-			lwpid = psinfo_buf.pr_lwp.pr_lwpid;
-			if ((lwp = lwpid_get(pid, lwpid)) == NULL)
-				continue;
-			lwp_update(lwp, &usage_buf);
-		}
-	}
-	list_refresh(&lwps);
-	fd_update();
-	log_msg("<-collect_lwp_data(): %d files open\n", fd_count());
-}
-
-
-/*
- * Create linked lists of users, projects and sets.
- *
- * Updates of the process, users and projects lists are done in
- * a critical section so that the consumer of these lists will
- * always get consistent data.
- */
-static void
-list_create()
-{
-	struct utsname	utsn;
-	lwp_info_t *lwp;
-	hrtime_t t1, t2, t3;
-	double d;
-	int rv;
-
-	lwp = lwps.l_head;
-	total_mem = 0;
-	total_cpu = 0;
-	log_msg("->list_create()\n");
-	t1 = gethrtime();
-	if ((rv = pthread_mutex_lock(&listLock)) == 0) {
-		t2 = gethrtime();
-		d = (double)(t2 - t1) / 1000000000.0;
-		log_msg("Scanner process lock wait was %1.5f sec\n", d);
-
-		while (lwp) {
-			list_update(&processes, lwp);
-			list_update(&users, lwp);
-			list_update(&projects, lwp);
-			lwp = lwp->li_next;
-		}
-		list_refresh_id(&processes);
-		list_refresh_id(&users);
-		list_refresh_id(&projects);
-		/* release the mutex */
-		if ((rv = pthread_mutex_unlock(&listLock)) != 0)
-			log_msg("pthread_mutex_unlock failed with %d\n", rv);
-
-		t3 = gethrtime();
-
-		d = (double)(t3 - t2) / 1000000000.0;
-		log_msg("Scanner process lock time was %1.5f sec\n", d);
-
-	} else {
-		log_msg("pthread_mutex_lock failed with %d\n", rv);
-	}
-
-	if (uname(&utsn) != -1) {
-		sys_info.name =
-		    Realloc(sys_info.name, strlen(utsn.sysname) + 1);
-		(void) strcpy(sys_info.name, utsn.sysname);
-		sys_info.nodename =
-		    Realloc(sys_info.nodename, strlen(utsn.nodename) + 1);
-		(void) strcpy(sys_info.nodename, utsn.nodename);
-	} else {
-		log_err("uname()\n");
-	}
-
-	log_msg("<-list_create()\n");
-}
-
-
-static void
-collect_data() {
-
-	collect_lwp_data();
-	if (getloadavg(loadavg, 3) == -1)
-		dmerror("cannot get load average\n");
-}
-
-
-void
-monitor_stop()
-{
-	/* store the list state */
-	if (ltdb_file != NULL)
-		(void) list_store(ltdb_file);
-	list_clear(&lwps);
-	list_clear(&processes);
-	list_clear(&users);
-	list_clear(&projects);
-	fd_exit();
-}
-
-
-/*
- * Initialize the monitor.
- * Creates list data structures.
- * If a saved list data file exists it is loaded.
- * The /proc directory is opened.
- * No actual scanning of /proc is done.
- *
- * Returns 0 if OK or -1 on error (leaving errno unchanged)
- */
-int
-monitor_start()
-{
-
-	if (setjmp(dm_jmpbuffer) == 0) {
-		lwpid_init();
-		fd_init(Setrlimit());
-
-		list_alloc(&lwps, LS_LWPS);
-		list_alloc(&processes, LT_PROCESS);
-		list_alloc(&users, LS_USERS);
-		list_alloc(&projects, LS_PROJECTS);
-
-		list_init(&lwps, LT_LWPS);
-		list_init(&processes, LT_PROCESS);
-		list_init(&users, LT_USERS);
-		list_init(&projects, LT_PROJECTS);
-
-		sys_info.name = NULL;
-		sys_info.nodename = NULL;
-
-		if ((procdir = opendir("/proc")) == NULL)
-			dmerror("cannot open /proc directory\n");
-
-		/* restore the lists state */
-		if (ltdb_file != NULL)
-			(void) list_restore(ltdb_file);
-
-		return (0);
-	} else {
-		return (-1);
-	}
-}
-
-
-/*
- * Update the monitor data lists.
- * return 0, or -1 on error and leave errno unchanged
- */
-int
-monitor_update()
-{
-	if (setjmp(dm_jmpbuffer) == 0) {
-		collect_data();
-		list_create();
-		return (0);
-	} else {
-		return (-1);
-	}
-}
--- a/usr/src/cmd/wbem/provider/tools/rds/rdimpl.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef	_RDIMPL_H
-#define	_RDIMPL_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/sysmacros.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <procfs.h>
-#include <setjmp.h>
-#include <time.h>
-#include <inttypes.h>
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-extern int monitor_start();
-extern void monitor_stop();
-extern int monitor_update();
-extern void list_clear();
-extern char *ltdb_file;
-extern int mo; /* option flag for microstate accounting	*/
-
-/*
- * FRC2PCT macro is used to convert 16-bit binary fractions in the range
- * 0.0 to 1.0 with binary point to the right of the high order bit
- * (i.e. 1.0 == 0x8000) to percentage value.
- */
-
-#define	FRC2PCT(pp)	(((float)(pp))/0x8000*100)
-
-#define	TIME2NSEC(__t)\
-(hrtime_t)(((hrtime_t)__t.tv_sec * (hrtime_t)NANOSEC) + (hrtime_t)__t.tv_nsec)
-#define	TIME2SEC(__t)\
-(hrtime_t)(__t.tv_sec)
-
-/*
- * Possible list types
- */
-#define	LT_LWPS		0x0001
-#define	LT_USERS	0x0002
-#define	LT_TASKS	0x0004
-#define	LT_PROJECTS	0x0008
-#define	LT_PSETS	0x0010
-#define	LT_SYS		0x0020
-#define	LT_PROCESS	0x0040
-
-/*
- * Default list sizes
- */
-#define	LS_LWPS		1024
-#define	LS_PROCESSES	512
-#define	LS_USERS	32
-#define	LS_PROJECTS	16
-#define	LS_PSETS	8
-#define	LS_SYS		1
-
-/*
- * Linked list of per-process or per-lwp statistics
- */
-typedef struct lwp_info {
-	psinfo_t	*li_psinfo;	/* data read from psinfo file	*/
-	lwpsinfo_t	*li_lwpsinfo;
-	prusage_t	li_usage;	/* data read from usage file	*/
-	int		li_alive;	/* flag for alive lwps	*/
-	int		rlwpid;		/* id of the representative lwp	*/
-
-	double	li_usr;		/* user level CPU time		*/
-	double	li_sys;		/* system call CPU time		*/
-	double	li_ttime;	/* SystemTrapTime		*/
-	double	li_tpftime;	/* TextPageFaultSleepTime	*/
-	double	li_dpftime;	/* DataPageFaultSleepTime	*/
-	double	li_kpftime;	/* SystemPageFaultSleepTime	*/
-	double	li_lck;		/* user lock wait sleep time	*/
-	double	li_slp;		/* all other sleep time		*/
-	double	li_lat;		/* wait-cpu (latency) time	*/
-	double	li_stime;	/* StoppedTime			*/
-	ulong_t	li_minf;	/* MinorPageFaults		*/
-	ulong_t	li_majf;	/* MajorPageFaults		*/
-	ulong_t	li_nswap;	/* SwapOperations		*/
-	ulong_t	li_inblk;	/* BlocksRead			*/
-	ulong_t	li_oublk;	/* BlocksWritten		*/
-	ulong_t	li_msnd;	/* MessagesSent			*/
-	ulong_t	li_mrcv;	/* MessagesReceived		*/
-	ulong_t	li_sigs;	/* SignalsReceived		*/
-	ulong_t	li_vctx;	/* VoluntaryContextSwitches	*/
-	ulong_t	li_ictx;	/* InvoluntaryContextSwitches 	*/
-	ulong_t	li_scl;		/* SystemCallsMade		*/
-	ulong_t	li_ioch;	/* CharacterIOUsage		*/
-	ulong_t	li_hpsize;	/* process heap in byte		*/
-	ulong_t	li_timestamp;   /* system clock time od this snapshot	*/
-	struct lwp_info *li_next;	/* pointer to next lwp		*/
-	struct lwp_info *li_prev;	/* pointer to previous lwp	*/
-} lwp_info_t;
-
-typedef struct {
-	char *nodename;
-	char *name;
-} sys_info_t;
-
-typedef struct {
-	int  id;
-	void *id_next;	/* pointer to next entry */
-	void *id_prev;	/* pointer to previous entry */
-} info_head_t;
-
-/*
- * Linked list of collective per-uid, per-set, or per-projid statistics
- */
-typedef struct id_info {
-
-	int	id_alive;	/* flag for alive id	*/
-	uint_t	id_pid;		/* user process id	*/
-	uint_t	id_uid;		/* user id */
-	uint_t	id_taskid;	/* task id */
-	uint_t	id_projid;	/* project id */
-	uint_t	id_psetid;	/* processor set to which lwp is bound */
-
-	double	id_usr;		/* UserModeTime */
-	double	id_sys;		/* SystemModeTime */
-	double	id_ttime;	/* SystemTrapTime */
-	double	id_tpftime;	/* TextPageFaultSleepTime */
-	double	id_dpftime;	/* DataPageFaultSleepTime */
-	double	id_kpftime;	/* SystemPageFaultSleepTime */
-	double	id_lck;		/* UserLockWaitSleepTime */
-	double	id_slp;		/* OtherSleepTime */
-	double	id_lat;		/* WaitCPUTime */
-	double	id_stime;	/* StoppedTime */
-	int64_t id_minf;	/* MinorPageFaults */
-	int64_t id_majf;	/* MajorPageFaults */
-	int64_t id_nswap;	/* SwapOperations */
-	int64_t id_inblk;	/* BlocksRead */
-	int64_t id_oublk;	/* BlocksWritten */
-	int64_t id_msnd;	/* MessagesSent */
-	int64_t id_mrcv;	/* MessagesReceived */
-	int64_t id_sigs;	/* SignalsReceived */
-	int64_t id_vctx;	/* VoluntaryContextSwitches */
-	int64_t id_ictx;	/* InvoluntaryContextSwitches */
-	int64_t id_scl;		/* SystemCallsMade */
-	int64_t id_ioch;	/* CharacterIOUsage */
-	int64_t id_hpsize;	/* ProcessHeapSize # pstatus */
-	int64_t id_size;	/* ProcessVMSize	*/
-	int64_t id_rssize;	/* ProcessResidentSetSize # psinfo */
-	float	id_pctcpu;	/* PercentCPUTime # psinfo	*/
-	float	id_pctmem;	/* PercentMemorySize # psinfo	*/
-	int64_t id_time;	/* UserSystemModeTime		*/
-	uint_t	id_nlwps;	/* NumThreads	# psinfo	*/
-	uint_t	id_nproc;	/* number of processes		*/
-	int64_t id_timestamp;
-
-	char	*id_name;
-	int64_t	id_inpkg;	/* net input packets		*/
-	int64_t	id_oupkg;	/* net output packets		*/
-	uint_t		id_key;		/* sort key value 		*/
-	struct id_info *id_next;	/* pointer to next entry	*/
-	struct id_info *id_prev;	/* pointer to previous entry 	*/
-} id_info_t;
-
-/*
- * Per-list structure
- */
-typedef struct list {
-	int		l_type;		/* list type */
-	int		l_count;	/* number of entries in the list   */
-	void		*l_head;	/* pointer to the head of the list */
-	void		*l_tail;	/* pointer to the tail of the list */
-	int		l_size;		/* number of allocated pointers */
-	int		l_used;		/* number of used pointers	*/
-	void		**l_ptrs;	/* pointer to an array of pointers */
-} list_t;
-
-typedef struct swap_info {
-	size_t	allocated; /* not free swap memory		*/
-	size_t	reserved;  /* reserved  but not allocated swap memory in KB */
-	size_t  available; /* available swap memory in KB	*/
-	float   pctswap;   /* percentage of used swap		*/
-} swap_info_t;
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _RDIMPL_H */
--- a/usr/src/cmd/wbem/provider/tools/rds/rdlist.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,390 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2000-2003 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "rdlist.h"
-#include "rdtable.h"
-
-static int	list_read(int listt, int elemn);
-static int	lwp_write(list_t *list);
-static int	lwp_read(int lwpn);
-
-/*
- * This procedure stores the current state of the lists (lwps, processes,
- * users and project) into the file defined by 'file'.
- * param file - the file name to be used
- * return 0, or -1 on error and store the error message in
- *		the global buffer 'errmsg'.
- */
-int
-list_store(char *file)
-{
-	int	storefd;
-	time_t  tv;
-	char 	*tstr;
-	int 	ret = -1;
-
-	if ((storefd = open(file, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR))
-			== -1) {
-		format_err("can't open list db: %s\n", file);
-		(void) fprintf(stderr, errmsg);
-		return (-1);
-	}
-	log_msg("writing persistence file: %s\n", file);
-
-	/*
-	 * the next do {..} while (false); statement is a replacement
-	 * of goto;
-	 */
-	do {
-		if (open_prot(storefd, "w") == -1) {
-			format_err("can't open list db: %s\n", file);
-			(void) fprintf(stderr, errmsg);
-			break;
-		}
-		(void) time(&tv);
-		tstr = ctime(&tv);
-		if (wr_string("# RDS data base file generated on: ") == -1)
-			break;
-		if (wr_string(tstr) == -1)
-			break;
-		if (wr_value(LTDB_VERSION_KEY, LTDB_VERSION) == -1)
-			break;
-		if (wr_value(LTDB_TIMESTAMP, tv) == -1)
-			break;
-		/* we will write 4 lists */
-		if (wr_lshead(4) != 0) {
-			format_err("can't write into list db: %s\n",
-					"./listdb");
-			break;
-		}
-		if (list_write(L_LWP, 0) == -1)
-			break;
-		if (list_write(L_PRC_SI, 0) == -1)
-			break;
-		if (list_write(L_USR_SI, 0) == -1)
-			break;
-		if (list_write(L_PRJ_SI, 0) == -1)
-			break;
-		ret = 0;
-	} while (ret);
-
-	if (ret == 0) {
-		struct stat stat_buf;
-		(void) fstat(storefd, &stat_buf);
-		log_msg("wrote: %ld bytes\n", stat_buf.st_size);
-	}
-
-	/* close_prot(); */
-	(void) close(storefd);
-
-	return (ret);
-}
-
-/*
- * This procedure restores the last state of the lists (lwps, processes,
- * users and project) from the file defined by 'file'.
- * param file - the file name to be used
- * return 0, or -1 on error and store the error message in
- *		the global buffer 'errmsg'.
- */
-int
-list_restore(char *file)
-{
-	int	storefd;
-	int	listt, elemn, listn;
-	int64_t	timestamp;
-	time_t  tv;
-	int	version;
-	int 	ret = -1;
-
-	if ((storefd = open(file, O_RDONLY)) == -1)
-		return (ret);
-	log_msg("reading persistence file: %s\n", file);
-
-	/*
-	 * the next do {..} while (false); statement is a replacement
-	 * of goto;
-	 */
-	do {
-		if (open_prot(storefd, "r") == -1)
-			break;
-		if (skip_line() == -1)
-			break;
-		if ((version = r_value(LTDB_VERSION_KEY)) == -1)
-			break;
-		if (version != LTDB_VERSION) {
-			(void) fprintf(stderr,
-				"wrong version %d of db file %s\n",
-				version, file);
-			break;
-		}
-		if ((timestamp = r_value(LTDB_TIMESTAMP)) == -1)
-			break;
-		/* check the file decay time is expired */
-		(void) time(&tv);
-		if ((tv - timestamp) > LTDB_DECAYTIME)
-			break;
-		if ((listn = r_lshead()) == -1)
-			break;
-		while (listn-- > 0) {
-			if ((elemn = r_lhead(&listt)) == -1)
-				break;
-			if (list_read(listt, elemn) != 0) {
-				break;
-			}
-		}
-		ret = 0;
-	} while (ret);
-
-	if (ret == 0) {
-		struct stat stat_buf;
-		(void) fstat(storefd, &stat_buf);
-		log_msg("read: %ld bytes\n", stat_buf.st_size);
-	}
-
-	/* close_prot(); */
-	(void) close(storefd);
-	(void) unlink(file);
-	return (ret);
-}
-
-/*
- * This procedure writes a list of type 'listt' according to the
- * rds interface protocol. It uses the already opened and initialized
- * protocol module (see file protocol.[c,h]).
- * param listt	- the type of the list, see rdimpl.h
- * param Po	- print option, if 1 the list will be also printed on stdout.
- * return 0, or -1 on error and store the error message in
- *		the global buffer 'errmsg'.
- */
-int
-list_write(int listt, int Po)
-{
-	char		idstr[P_MAXVAL];
-	list_t 		*list;
-	id_info_t	*id = NULL, *nextid;
-
-	if (listt == L_LWP) {
-		return (lwp_write(&lwps));
-	} else if (listt == L_SYSTEM) {
-		if (wr_lhead(listt, 1) != 0) {
-			format_err(
-				"RDS protocol error: cannot write list header");
-			return (-1);
-		}
-		(void) snprintf(idstr, sizeof (idstr), "%s", sys_info.name);
-		if (wr_element(listt, (char *)(&sys_info), idstr) != 0) {
-			format_err(
-				"RDS protocol error: cannot write list header");
-			return (-1);
-		}
-
-	} else {
-		switch (listt) {
-		case L_PRC_SI : list =  &processes;
-				break;
-		case L_AC_USR :
-		case L_USR_SI : list =  &users;
-				break;
-		case L_AC_PRJ :
-		case L_PRJ_SI : list =  &projects;
-				break;
-		}
-		id = list->l_head;
-
-		if (wr_lhead(listt, list->l_count) != 0) {
-			format_err(
-				"RDS protocol error: cannot write list header");
-			return (-1);
-		}
-		while (id != NULL) {
-			switch (listt) {
-			case L_PRC_SI :
-				(void) sprintf(idstr, "%d", id->id_pid);
-				break;
-			case L_AC_USR :
-			case L_USR_SI :
-				(void) sprintf(idstr, "%d", id->id_uid);
-				break;
-			case L_AC_PRJ :
-			case L_PRJ_SI :
-				(void) snprintf(idstr, sizeof (idstr), "%s",
-				    id->id_name);
-				break;
-			}
-			if (wr_element(listt, (char *)id, idstr) != 0) {
-					format_err(
-				"RDS protocol error: cannot write list header");
-			}
-			if (Po == 1)
-				prtelement(stderr, id);
-			nextid = id->id_next;
-			id = nextid;
-		}
-	}
-	return (0);
-}
-
-/*
- * This procedure prints out all list elements on stdout. The elements
- * int the list must be of type id_info_t.
- * param list - the list to be printed
- */
-void
-list_print(list_t *list, int xid)
-{
-
-	id_info_t *id = list->l_head;
-	id_info_t *nextid;
-
-	while (id) {
-		if (xid == -1) {
-			prtelement(stdout, id);
-		} else {
-			switch (list->l_type) {
-			case LT_PROCESS : if (xid == id->id_pid)
-						prtelement(stdout, id);
-					break;
-			case LT_USERS 	: if (xid == id->id_uid)
-						prtelement(stdout, id);
-					break;
-			case LT_PROJECTS : if (xid == id->id_projid)
-						prtelement(stdout, id);
-					break;
-			default: prtelement(stdout, id);
-			}
-		}
-		nextid = id->id_next;
-		id = nextid;
-	}
-
-}
-
-static int
-list_read(int listt, int elemn)
-{
-	char	idstr[P_MAXVAL];
-	list_t	*list;
-	id_info_t *id;
-
-	if (listt == L_LWP)
-		return (lwp_read(elemn));
-
-	while (elemn-- > 0) {
-		switch (listt) {
-			case L_PRC_SI 	: list = &processes;
-					break;
-			case L_USR_SI 	: list = &users;
-					break;
-			case L_PRJ_SI 	: list = &projects;
-					break;
-		}
-
-		if (list->l_head == NULL) { /* first element */
-			list->l_head = list->l_tail = id =
-					Zalloc(sizeof (id_info_t));
-			list->l_count++;
-		} else {
-			/* a new element */
-			id = list->l_tail;
-			id->id_next = Zalloc(sizeof (id_info_t));
-			id->id_next->id_prev = list->l_tail;
-			id->id_next->id_next = NULL;
-			list->l_tail = id->id_next;
-			id = list->l_tail;
-			list->l_count++;
-		}
-		if (r_element((char *)id, idstr) == -1) {
-			list_clear(list);
-			return (-1);
-		}
-	}
-	return (0);
-}
-
-static int
-lwp_write(list_t *list)
-{
-	lwpinfo_t	lwpsi;
-	lwp_info_t	*li = NULL, *nextli;
-
-	li = list->l_head;
-
-	if (wr_lhead(L_LWP, list->l_count) != 0) {
-		format_err(
-			"RDS protocol error: cannot write list header");
-		err_exit();
-	}
-	while (li != NULL) {
-		lwpsi.pr_pid	= li->li_psinfo->pr_pid;
-		lwpsi.pr_lwpid	= li->li_lwpsinfo->pr_lwpid;
-
-		if (wr_element(L_LWP__I, (char *)&lwpsi, "lwpi") != 0) {
-			format_err(
-			"RDS protocol error: cannot write list header");
-		}
-		if (wr_element(L_LWP__U, (char *)&(li->li_usage), "lwpu")
-				!= 0) {
-			format_err(
-			"RDS protocol error: cannot write list header");
-		}
-		if (wr_element(L_LWP, (char *)li, "lwp") != 0) {
-			format_err(
-			"RDS protocol error: cannot write list header");
-		}
-		nextli = li->li_next;
-		li = nextli;
-	}
-	return (0);
-}
-
-static int
-lwp_read(int lwpn)
-{
-	lwp_info_t	*lwp;
-	lwpinfo_t	lwpsi;
-
-	char		idstr[P_MAXVAL];
-
-	while (lwpn-- > 0) {
-		if (r_element((char *)&lwpsi, idstr) == -1) {
-			return (-1);
-		}
-		lwp = list_add_lwp(&lwps, lwpsi.pr_pid, lwpsi.pr_lwpid);
-		lwp->li_psinfo->pr_pid		= lwpsi.pr_pid;
-		lwp->li_lwpsinfo->pr_lwpid	= lwpsi.pr_lwpid;
-		if (r_element((char *)&(lwp->li_usage), idstr) == -1) {
-			return (-1);
-		}
-		if (r_element((char *)lwp, idstr) == -1) {
-			return (-1);
-		}
-
-	}
-	return (0);
-}
--- a/usr/src/cmd/wbem/provider/tools/rds/rdlist.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#ifndef	_RDLIST_H
-#define	_RDLIST_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/processor.h>
-#include <sys/types.h>
-
-#include "rdimpl.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/time.h>
-#include <strings.h>
-#include <limits.h>
-#include <unistd.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <time.h>
-#include "rdimpl.h"
-#include "rdprot.h"
-#include "rdutil.h"
-
-#define	LTDB_TIMESTAMP "TIMESTAMP"
-#define	LTDB_DECAYTIME 3600
-/* The current DB file version */
-#define	LTDB_VERSION_KEY  "VERSION"
-#define	LTDB_VERSION	100
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-extern void list_print(list_t *list, int xid);
-extern int list_write(int listt, int Po);
-extern int list_store();
-extern int list_restore();
-
-extern list_t   users;		/* list of users */
-extern list_t   projects;	/* list of projects */
-extern list_t   processes;	/* list of processes */
-extern list_t   lwps;
-extern char 	errmsg[];
-extern void	prtelement(FILE *fp, id_info_t *id);
-extern lwp_info_t *
-	list_add_lwp(list_t *list, pid_t pid, id_t lwpid);
-extern void 	err_exit();
-extern sys_info_t sys_info;
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _RDLIST_H */
--- a/usr/src/cmd/wbem/provider/tools/rds/rdprot.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,788 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <search.h>
-#include <stdlib.h>
-
-#include <sys/utsname.h>
-#include "rdprot.h"
-#include "rdutil.h"
-/*
- * This file works out the protocol layer of the bidirectional data interface
- * between the rds and the client. In the server mode rds writes greetings and
- * a protocol header to the output stream.
- * pheader  == { "@RDS-MAG@"  PROTV }
- * PROTV    == { protocol version }
- * Then it sends a prompt and waits for command from client.
- * PROMPT   == { "@RDS@>" }
- * COMMAND  == { "command"  cmd }
- * cmd	    == { "-pUuJjS" | "-p" | "-u" | "-U" |
- *		 "-j" | "-J" | "-S" | "-i100" | "alive"| "exit" }
- * The answer from rds is always a lists of data. The header of the answer data
- * contains the number of lists in the package. Each list has a header and
- * some elements, which have again a header and some fields of data:
- * answer   == { lshead,  n * list }
- * lshead   == { number of lists }
- * list     == { lheader, n * element }
- * lheader  == { LISTT, ELEMN }
- * LISTT    == { type of the list }
- * ELEMN    == { number of elements in the list }
- * element  == { eheader, field }
- * eheader  == { ELMID, FILDN }
- * ELMID    == { element id, like pid, uid, project name }
- * field    == { KEY, VALUE }
- * All protocol elements have a key and a value separated by one space.
- * The value begins after the first space and ends with the new line character.
- * Protocol keys are: "@RDS-MAG@", PROTV, LISTN,  LISTT, ELEMN ELMID, FILDN,
- * RDERR. The special key RDERR can occur in any line and indicates that an
- * error condition occurred, where the VALUE is the error message.
- */
-
-static char line[P_MAXLEN];
-static char error[P_MAXLEN];
-static char value[P_MAXVAL];
-static char key[P_MAXKEY];
-
-static char *nullstr = "";
-static FILE *wstream, *rstream;
-
-static int format_int64(int, char *, char *, int);
-static int format_int32(int, char *, char *, int);
-static int format_ulong(int, char *, char *, int);
-static int format_float(int, char *, char *, int);
-static int format_double(int, char *, char *, int);
-static int format_string(int, char *, char *, int);
-static int format_timestruc(int, char *, char *, int);
-
-/*
- * The kv_pair_t represents an field in a  c-sturcture. An filed
- * is defined by a key 'field name', format function and an offset
- * in this structure
- */
-
-/*
- * Array of fields from id_info_t structure, that are sent/received
- * in a process/user/project utilization list.
- */
-static kv_pair_t id_stub[] =
-{
-{ "id_pid",	{ format_int32, offsetof(id_info_t, id_pid) }},
-{ "id_uid",	{ format_int32, offsetof(id_info_t, id_uid) }},
-{ "id_projid",	{ format_int32, offsetof(id_info_t, id_projid) }},
-{ "id_usr", 	{ format_double, offsetof(id_info_t, id_usr) }},
-{ "id_sys", 	{ format_double, offsetof(id_info_t, id_sys) }},
-{ "id_ttime", 	{ format_double, offsetof(id_info_t, id_ttime) }},
-{ "id_tpftime", { format_double, offsetof(id_info_t, id_tpftime) }},
-{ "id_dpftime", { format_double, offsetof(id_info_t, id_dpftime) }},
-{ "id_kpftime", { format_double, offsetof(id_info_t, id_kpftime) }},
-{ "id_lck", 	{ format_double, offsetof(id_info_t, id_lck) }},
-{ "id_slp", 	{ format_double, offsetof(id_info_t, id_slp) }},
-{ "id_lat", 	{ format_double, offsetof(id_info_t, id_lat) }},
-{ "id_stime", 	{ format_double, offsetof(id_info_t, id_stime) }},
-{ "id_minf", 	{ format_int64, offsetof(id_info_t, id_minf) }},
-{ "id_majf", 	{ format_int64, offsetof(id_info_t, id_majf) }},
-{ "id_nswap", 	{ format_int64, offsetof(id_info_t, id_nswap) }},
-{ "id_inblk", 	{ format_int64, offsetof(id_info_t, id_inblk) }},
-{ "id_oublk", 	{ format_int64, offsetof(id_info_t, id_oublk) }},
-{ "id_msnd", 	{ format_int64, offsetof(id_info_t, id_msnd) }},
-{ "id_mrcv", 	{ format_int64, offsetof(id_info_t, id_mrcv) }},
-{ "id_sigs", 	{ format_int64, offsetof(id_info_t, id_sigs) }},
-{ "id_vctx", 	{ format_int64, offsetof(id_info_t, id_vctx) }},
-{ "id_ictx", 	{ format_int64, offsetof(id_info_t, id_ictx) }},
-{ "id_scl", 	{ format_int64, offsetof(id_info_t, id_scl) }},
-{ "id_ioch", 	{ format_int64, offsetof(id_info_t, id_ioch) }},
-{ "id_hpsize", 	{ format_int64, offsetof(id_info_t, id_hpsize) }},
-{ "id_size", 	{ format_int64, offsetof(id_info_t, id_size) }},
-{ "id_rssize", 	{ format_int64, offsetof(id_info_t, id_rssize) }},
-{ "id_pctcpu", 	{ format_float, offsetof(id_info_t, id_pctcpu) }},
-{ "id_pctmem", 	{ format_float, offsetof(id_info_t, id_pctmem) }},
-{ "id_time", 	{ format_int64, offsetof(id_info_t, id_time) }},
-{ "id_nlwps", 	{ format_int32, offsetof(id_info_t, id_nlwps) }},
-{ "id_timestamp", { format_int64, offsetof(id_info_t, id_timestamp) }},
-{ "id_nproc", 	{ format_int32, offsetof(id_info_t, id_nproc) }},
-{ "id_inpkg", 	{ format_int64, offsetof(id_info_t, id_inpkg) }},
-{ "id_oupkg", 	{ format_int64, offsetof(id_info_t, id_oupkg) }},
-{ "id_name", 	{ format_string, offsetof(id_info_t, id_name) }}
-};
-
-static kv_pair_t lwp_stub[] =
-{
-{"li_usage",	{ format_ulong, offsetof(lwp_info_t, li_usr) }},
-{"li_usr",	{ format_ulong, offsetof(lwp_info_t, li_usr) }},
-{"li_sys",	{ format_ulong, offsetof(lwp_info_t, li_sys) }},
-{"li_ttime",	{ format_ulong, offsetof(lwp_info_t, li_ttime) }},
-{"li_tpftime",	{ format_ulong, offsetof(lwp_info_t, li_tpftime) }},
-{"li_dpftime",	{ format_ulong, offsetof(lwp_info_t, li_dpftime) }},
-{"li_kpftime",	{ format_ulong, offsetof(lwp_info_t, li_kpftime) }},
-{"li_lck",	{ format_ulong, offsetof(lwp_info_t, li_lck) }},
-{"li_slp",	{ format_ulong, offsetof(lwp_info_t, li_slp) }},
-{"li_lat",	{ format_ulong, offsetof(lwp_info_t, li_lat) }},
-{"li_stime",	{ format_ulong, offsetof(lwp_info_t, li_stime) }},
-{"li_minf",	{ format_ulong, offsetof(lwp_info_t, li_minf) }},
-{"li_majf",	{ format_ulong, offsetof(lwp_info_t, li_majf) }},
-{"li_nswap",	{ format_ulong, offsetof(lwp_info_t, li_nswap) }},
-{"li_inblk",	{ format_ulong, offsetof(lwp_info_t, li_inblk) }},
-{"li_oublk",	{ format_ulong, offsetof(lwp_info_t, li_oublk) }},
-{"li_msnd",	{ format_ulong, offsetof(lwp_info_t, li_msnd) }},
-{"li_mrcv",	{ format_ulong, offsetof(lwp_info_t, li_mrcv) }},
-{"li_sigs",	{ format_ulong, offsetof(lwp_info_t, li_sigs) }},
-{"li_vctx",	{ format_ulong, offsetof(lwp_info_t, li_vctx) }},
-{"li_ictx",	{ format_ulong, offsetof(lwp_info_t, li_ictx) }},
-{"li_scl",	{ format_ulong, offsetof(lwp_info_t, li_scl) }},
-{"li_ioch",	{ format_ulong, offsetof(lwp_info_t, li_ioch) }},
-{"li_hpsize",	{ format_ulong, offsetof(lwp_info_t, li_hpsize) }},
-{"li_timestamp", { format_ulong, offsetof(lwp_info_t, li_timestamp) }},
-};
-
-static kv_pair_t lwpinfo_stub[] =
-{
-{"lwpr_pid",	{ format_int32, offsetof(lwpinfo_t, pr_pid) }},
-{"lwpr_lwpid",	{ format_int32, offsetof(lwpinfo_t, pr_lwpid) }},
-};
-
-static kv_pair_t prusage_stub[] =
-{
-{"pr_tstamp",	{ format_timestruc, offsetof(prusage_t, pr_tstamp) }},
-{"pr_create",	{ format_timestruc, offsetof(prusage_t, pr_create) }},
-{"pr_term",	{ format_timestruc, offsetof(prusage_t, pr_term) }},
-{"pr_rtime",	{ format_timestruc, offsetof(prusage_t, pr_rtime) }},
-{"pr_utime",	{ format_timestruc, offsetof(prusage_t, pr_utime) }},
-{"pr_stime",	{ format_timestruc, offsetof(prusage_t, pr_stime) }},
-{"pr_ttime",	{ format_timestruc, offsetof(prusage_t, pr_ttime) }},
-{"pr_tftime",	{ format_timestruc, offsetof(prusage_t, pr_tftime) }},
-{"pr_dftime",	{ format_timestruc, offsetof(prusage_t, pr_dftime) }},
-{"pr_kftime",	{ format_timestruc, offsetof(prusage_t, pr_kftime) }},
-{"pr_ltime",	{ format_timestruc, offsetof(prusage_t, pr_ltime) }},
-{"pr_slptime",	{ format_timestruc, offsetof(prusage_t, pr_slptime) }},
-{"pr_wtime",	{ format_timestruc, offsetof(prusage_t, pr_wtime) }},
-{"pr_stoptime", { format_timestruc, offsetof(prusage_t, pr_stoptime) }},
-{"pr_minf",	{ format_ulong, offsetof(prusage_t, pr_minf) }},
-{"pr_majf",	{ format_ulong, offsetof(prusage_t, pr_majf) }},
-{"pr_nswap",	{ format_ulong, offsetof(prusage_t, pr_nswap) }},
-{"pr_inblk",	{ format_ulong, offsetof(prusage_t, pr_inblk) }},
-{"pr_oublk",	{ format_ulong, offsetof(prusage_t, pr_oublk) }},
-{"pr_msnd",	{ format_ulong, offsetof(prusage_t, pr_msnd) }},
-{"pr_mrcv",	{ format_ulong, offsetof(prusage_t, pr_mrcv) }},
-{"pr_sigs",	{ format_ulong, offsetof(prusage_t, pr_sigs) }},
-{"pr_vctx",	{ format_ulong, offsetof(prusage_t, pr_vctx) }},
-{"pr_ictx",	{ format_ulong, offsetof(prusage_t, pr_ictx) }},
-{"pr_sysc",	{ format_ulong, offsetof(prusage_t, pr_sysc) }},
-{"pr_ioch",	{ format_ulong, offsetof(prusage_t, pr_ioch) }},
-};
-
-/*
- * Array of fields in id_info_t structure, that are sent/received
- * in an active user list.
- */
-static kv_pair_t usr_stub[] =
-{
-{ "usr_id", 	{ format_int32, offsetof(id_info_t, id_uid) }},
-{ "usr_name", 	{ format_string, offsetof(id_info_t, id_name) }}
-};
-
-/*
- * Array of fields in id_info_t structure, that are sent/received
- * in an active project list.
- */
-static kv_pair_t prj_stub[] =
-{
-{ "prj_id", 	{ format_int32, offsetof(id_info_t, id_projid) }},
-{ "prj_name", 	{ format_string, offsetof(id_info_t, id_name)   }}
-};
-
-/*
- * Array of fields in id_info_t structure, that are sent/received
- * in a system list.
- */
-static kv_pair_t sys_stub[] =
-{
-{ "sys_nodename", { format_string, offsetof(sys_info_t, nodename) }},
-{ "sys_name",	{ format_string, offsetof(sys_info_t, name) }}
-};
-
-/*
- * Array of fields in id_info_t structure, that are sent/received
- * in command.
- */
-static kv_pair_t cmd_stub[] =
-{
-{ "command",	{ format_int32, offsetof(cmd_t, command) }}
-};
-
-#define	stubsize(stub) ((sizeof (stub))/(sizeof (kv_pair_t)))
-
-/*
- * Each list type has its own fields description, the list type is
- * the index into this table:
- * L_PRC_SI - processes statistical information
- * L_USR_SI - useres statistical information
- * L_PRJ_SI - projects statistical information
- * L_AC_USR - active users
- * L_AC_PRJ - active projects
- * L_SYSTEM - system
- */
-#define	NOF_STUBS   10
-static stub_t stubs[NOF_STUBS + 1] = {
-{ 0, NULL},
-{ stubsize(id_stub), id_stub},
-{ stubsize(id_stub), id_stub},
-{ stubsize(id_stub), id_stub},
-{ stubsize(usr_stub), usr_stub},
-{ stubsize(prj_stub), prj_stub},
-{ stubsize(sys_stub), sys_stub},
-{ stubsize(cmd_stub), cmd_stub},
-{ stubsize(lwp_stub), lwp_stub},
-{ stubsize(lwpinfo_stub), lwpinfo_stub},
-{ stubsize(prusage_stub), prusage_stub},
-};
-
-/*
- * read a protocol line, do some checks and extract its key
- * and value part.
- */
-static int
-r_line() {
-	size_t len;
-
-	if (fgets(line, P_MAXLEN, rstream) == NULL) {
-		format_err("can't read line");
-		return (-1);
-	}
-	len = strlen(line);
-	if (len > P_MAXLEN) {
-		format_err("%s: \"%s\"", "wrong line length", line);
-		return (-1);
-	}
-	/* carriage return */
-	if (len == 1) {
-		value[0] = line[0];
-		return (0);
-	}
-	/* see P_MAXKEY and P_MAXVAL for string sizes */
-	if (sscanf(line, "%19s %58s", key, value) != 2) {
-		format_err("%s: \"%s\"", "wrong line format", line);
-		return (-1);
-	}
-	if (strcmp(key, RDERR) == 0) {
-		(void) strcpy(error, line + strlen(RDERR) + 1);
-		return (-1);
-	}
-	return (0);
-}
-
-#define	STRUCT_TO_STR	1
-#define	STR_TO_STRUCT	2
-
-/*
- * if STR_TO_STRUCT read a 64 bit value from string buffer, format it and
- * write it into the structure.
- * if STRUCT_TO_STR read a 64 bit value from structure and write it as
- * a string into buffer.
- */
-static int
-format_int64(int set, char *buf, char *strct, int off)
-{
-	int64_t v;
-
-	if (set == STR_TO_STRUCT) {
-		if (sscanf(buf, "%" SCNd64, &v) != 1) {
-			format_err("%s: \"%s\"", "wrong line format", line);
-			return (-1);
-		}
-		*(int64_t *)(void *)(strct + off) = v;
-
-	} else {
-		v = *((int64_t *)(void *)(strct + off));
-		(void) sprintf(buf, "%" PRId64, v);
-
-	}
-	return (0);
-}
-
-/*
- * if STR_TO_STRUCT read a 32 bit value from string buffer, format it and
- * write it into the structure.
- * if STRUCT_TO_STR read a 32 bit value from structure and write it as
- * a string into buffer.
- */
-static int
-format_int32(int set, char *buf, char *id, int off)
-{
-	int32_t v;
-
-	if (set == STR_TO_STRUCT) {
-		if (sscanf(buf, "%d", &v) != 1) {
-			format_err("%s: \"%s\"", "wrong line format", line);
-			return (-1);
-		}
-		*(int32_t *)(void *)(id + off) = v;
-
-	} else {
-		v = *((int32_t *)(void *)(id + off));
-		(void) sprintf(buf, "%d", v);
-
-	}
-	return (0);
-}
-
-/*
- */
-static int
-format_ulong(int set, char *buf, char *id, int off)
-{
-	ulong_t v;
-
-	if (set == STR_TO_STRUCT) {
-		if (sscanf(buf, "%lu", &v) != 1) {
-			format_err("%s: \"%s\"", "wrong line format", line);
-			return (-1);
-		}
-		*(ulong_t *)(void *)(id + off) = v;
-
-	} else {
-		v = *((ulong_t *)(void *)(id + off));
-		(void) sprintf(buf, "%ld", v);
-
-	}
-	return (0);
-}
-
-/*
- * if STR_TO_STRUCT read a float value from string buffer, format it and
- * write it into the structure.
- * if STRUCT_TO_STR read a float value from structure and write it as
- * a string into buffer.
- */
-static int
-format_float(int set, char *buf, char *id, int off)
-{
-	float v;
-
-	if (set == STR_TO_STRUCT) {
-		if (sscanf(buf, "%f", &v) != 1) {
-			format_err("%s: \"%s\"", "wrong line format", line);
-			return (-1);
-		}
-		*(float *)(void *)(id + off) = v;
-
-	} else {
-		v = *((float *)(void *)(id + off));
-		(void) sprintf(buf, "%f", v);
-
-	}
-	return (0);
-}
-
-/*
- * if STR_TO_STRUCT read a double value from string buffer, format it and
- * write it into the structure.
- * if STRUCT_TO_STR read a double value from structure and write it as
- * a string into buffer.
- */
-static int
-format_double(int set, char *buf, char *id, int off)
-{
-	double v;
-
-	if (set == STR_TO_STRUCT) {
-		if (sscanf(buf, "%lf", &v) != 1) {
-			format_err("wrong line format: \"%s\"", line);
-			return (-1);
-		}
-		*(double *)(void *)(id + off) = v;
-
-	} else {
-		v = *((double *)(void *)(id + off));
-		(void) sprintf(buf, "%f", v);
-
-	}
-	return (0);
-}
-
-/*
- * if STR_TO_STRUCT read a string from string buffer, format it and
- * write it into the structure.
- * if STRUCT_TO_STR read a string from structure and write it as
- * a string into buffer.
- */
-static int
-format_string(int set, char *buf, char *id, int off)
-{
-	char *v;
-
-	if (set == STR_TO_STRUCT) {
-		if ((v = (char *)malloc(strlen(buf) + 1))  != 0) {
-			(void) strcpy(v, buf);
-		} else {
-			v = nullstr;
-			return (-1);
-		}
-		*(char **)(void *)(id + off) = v;
-	} else {
-		if ((*((char **)(void *)(id + off))) != NULL) {
-			(void) snprintf(buf, P_MAXVAL, "%s",
-			    *((char **)(void *)(id + off)));
-		}
-	}
-	return (0);
-}
-
-static int
-format_timestruc(int set, char *buf, char *strct, int off)
-{
-	int64_t v1;
-	int64_t v2;
-
-	if (set == STR_TO_STRUCT) {
-		if (sscanf(buf, "%" SCNd64 ",%" SCNd64, &v1, &v2) != 2) {
-			format_err("%s: \"%s\"", "wrong line format", line);
-			return (-1);
-		}
-		((timestruc_t *)(void *)(strct + off))->tv_sec = v1;
-		((timestruc_t *)(void *)(strct + off))->tv_nsec = v2;
-
-	} else {
-		v1 = ((timestruc_t *)(void *)(strct + off))->tv_sec;
-		/*
-		 * Since the times in prusage start with millisecond
-		 * precision after the micro state accounting was enabled
-		 * discard the nano/micro second fraction in the saved
-		 * values otherwise we will get negative values in next run.
-		 */
-		v2 = ((((timestruc_t *)(void *)(strct + off))->tv_nsec) /
-			MICROSEC) * MICROSEC;
-		(void) sprintf(buf, "%" PRId64 ",%" PRId64, v1, v2);
-
-	}
-	return (0);
-}
-
-/*
- * A hash table of keys == names and data == { formats and offsets }.
- */
-static int
-init_hashtab() {
-	ENTRY item;
-	int   i, j, size = 0;
-
-	for (i = 0; i < NOF_STUBS + 1; i++) {
-		size += stubs[i].size;
-	}
-	if (hcreate(size) == 0) {
-		format_err("can't create hash table");
-		return (-1);
-	}
-	for (i = 0; i < NOF_STUBS + 1; i++) {
-		for (j = 0; j < stubs[i].size; j++) {
-			item.key = stubs[i].stub[j].key;
-			item.data = (void *) &(stubs[i].stub[j].info);
-			if (hsearch(item, ENTER) == NULL) {
-				format_err("can't insert into hash table");
-				return (-1);
-			}
-		}
-	}
-	return (0);
-}
-
-int
-open_prot(int fd, char *rw)
-{
-	if (strcmp(rw, "r") == 0) {
-		if ((rstream = fdopen(fd, rw)) == NULL) {
-			format_err("can't open read stream");
-			return (-1);
-		}
-		if (init_hashtab() != 0) {
-			format_err("can't initialize hashtab");
-			return (-1);
-		}
-	} else if (strcmp(rw, "w") == 0) {
-		if ((wstream = fdopen(fd, rw)) == NULL) {
-			format_err("can't open write stream");
-			return (-1);
-		}
-	} else {
-		format_err("open_prot(), wrong argument  %s", rw);
-			return (-1);
-	}
-	return (0);
-}
-
-void
-close_prot()
-{
-
-	(void) fclose(rstream);
-	(void) fclose(wstream);
-	hdestroy();
-}
-
-/*
- * @RDS-MAG@
- * PROTV 100
- */
-int
-wr_phead()
-{
-	(void) fprintf(wstream, "%s\n%s %d\n",
-	    PROTM, PROTV, PROT_VERSION);
-	(void) fflush(wstream);
-	return (0);
-}
-/*
- * @RDS@> [code]
- */
-int
-wr_prompt(char *code) {
-
-	(void) fprintf(wstream, "%s%s\n", PROMPT, code);
-	(void) fflush(wstream);
-	return (0);
-}
-
-int
-wr_lshead(int n)
-{
-	(void) fprintf(wstream, "%s %d\n", LISTN, n);
-	(void) fflush(wstream);
-	return (0);
-}
-
-/*
- * LISTT [type]
- * ELEMN [n]
- */
-int
-wr_lhead(int type, int n)
-{
-	(void) fprintf(wstream, "%s %d\n%s %d\n", LISTT, type, ELEMN, n);
-	(void) fflush(wstream);
-	return (0);
-}
-/*
- * ELMID [elemid]
- * FILDN [number of elements]
- * e.g.
- * id_usr 11050000000
- * id_sys 7850000000
- * id_ttime 0
- * id_tpftime 0
- *
- * Write all fields defined by stub[stubidx]. The src is the source pointer.
- * For each element read the key, grab the format function and the offset.
- * Read and format the element from the source and write it out as a string.
- */
-int
-wr_element(int stubidx, char *src, char *elemid)
-{
-	int i;
-
-	(void) fprintf(wstream, "%s %s\n%s %d\n",
-	    ELMID, elemid, FILDN, stubs[stubidx].size);
-	for (i = 0; i < stubs[stubidx].size; i++) {
-		stubs[stubidx].stub[i].info.format(STRUCT_TO_STR,
-		    value, src, stubs[stubidx].stub[i].info.off);
-		(void) fprintf(wstream, "%s %s\n",
-		    stubs[stubidx].stub[i].key, value);
-	}
-	(void) fflush(wstream);
-	return (0);
-}
-
-int
-wr_string(char *str)
-{
-
-	(void) fprintf(wstream, "%s", str);
-	(void) fflush(wstream);
-	return (0);
-}
-
-int
-wr_value(char *key, int64_t v)
-{
-
-	(void) fprintf(wstream, "%s %" PRId64 "\n", key, v);
-	(void) fflush(wstream);
-	return (0);
-}
-/*
- * RDERR [err]
- */
-void
-wr_error(char *err)
-{
-	size_t len = strlen(RDERR + 1);
-	if (strlen(err) > P_MAXLEN - len) {
-		*(err + P_MAXLEN - len - 4) = '.';
-		*(err + P_MAXLEN - len - 3) = '.';
-		*(err + P_MAXLEN - len - 2) = '.';
-		*(err + P_MAXLEN - len - 1) = 0;
-	}
-	len = strlen(err) - 1;
-	if (strlen(err) == 0) {
-		return;
-	}
-	while (len-- > 0) {
-		if (*(err + len) == '\n')
-			*(err + len) = ' ';
-	}
-
-	(void) fprintf(wstream, "%s %s\n", RDERR, err);
-	(void) fflush(wstream);
-}
-
-/*
- * read a protocol line, check the key and return the value associated
- * with it.
- */
-int64_t
-r_value(char *check_key) {
-	int64_t v = -1;
-
-	if ((r_line() == -1) ||
-			(strcmp(check_key, key) != 0) ||
-			(sscanf(value, "%" SCNd64, &v) != 1)) {
-		return (-1);
-	}
-	return (v);
-}
-
-char *
-r_cmd()
-{
-
-	if (r_line() == -1) {
-		format_err("can't read command");
-		return (NULL);
-	}
-	return (value);
-}
-
-int
-r_phead()
-{
-	int protv;
-	size_t len = strlen(PROTM);
-	size_t errorlen = strlen(RDERR);
-	int i = 0;
-
-	while (i++ < MAX_RETRIES) {
-		if (fgets(line, P_MAXLEN, rstream) == NULL) {
-			format_err("can't read prot. head");
-			return (-1);
-		}
-		len = strlen(line);
-		if (len > P_MAXLEN)
-			continue;
-		if (strcmp(line, PROTM) == 0)
-			break;
-		if (strncmp(line, RDERR, errorlen) == 0) {
-			(void) strcpy(error, line + strlen(RDERR) + 1);
-			return (-1);
-		}
-	}
-	if ((protv = r_value(PROTV)) == -1) {
-		format_err("can't read prot. version");
-		return (-1);
-	}
-	if (protv != PROT_VERSION) {
-		format_err("unsupported prot. version");
-		return (-1);
-	}
-	return (0);
-}
-
-int
-r_lshead()
-{
-	int  ret;
-
-	if ((ret = r_value(LISTN)) == -1) {
-		format_err("can't read number of lists");
-		return (-1);
-	}
-	return (ret);
-}
-
-int
-r_lhead(int *type)
-{
-
-	if ((*type = r_value(LISTT)) == -1) {
-		format_err("can't read list type");
-		return (-1);
-	}
-	return (r_value(ELEMN));
-}
-
-int
-r_element(char *src, char *elemid)
-{
-	int fn, i;
-	ENTRY item, *fitem;
-
-	if (r_line() == -1) {
-		format_err("can't read element id");
-		return (-1);
-	} else {
-		(void) strcpy(elemid, value);
-	}
-	if ((fn = r_value(FILDN)) == -1) {
-		format_err("can't read number of fields");
-		return (-1);
-	}
-	for (i = 0; i < fn; i++) {
-		if (r_line() == -1) {
-			return (-1);
-		} else {
-			item.key = key;
-			if ((fitem = hsearch(item, FIND)) == NULL) {
-				format_err("%s: \"%s\" ",
-						"unknown key ", line);
-				return (-1);
-			}
-			((info_t *)(void *)fitem->data)->
-				format(STR_TO_STRUCT, value, src,
-					((info_t *)(void *)fitem->data)->off);
-			}
-	}
-	return (0);
-}
-
-int
-skip_line()
-{
-	if (r_line() == -1) {
-		format_err("can't read element id");
-		return (-1);
-	} else {
-		return (0);
-	}
-}
--- a/usr/src/cmd/wbem/provider/tools/rds/rdprot.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#ifndef	_RDPROT_H
-#define	_RDPROT_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <stdio.h>
-#include <strings.h>
-#include <sys/utsname.h>
-
-#include "rdimpl.h"
-
-#define	offsetof(s, m)  ((size_t)(&(((s *)0)->m)))
-
-/* some maximal values */
-#define	P_MAXLEN	80
-#define	P_MAXKEY	20
-#define	P_MAXVAL	59
-#define	MAX_RETRIES 	20
-
-/* Tags definitions */
-
-#define	PROTM "@RDS-MAG@"
-#define	RDERR "RDERR"
-#define	PROTV "PROTV"
-#define	LISTT "LISTT"
-#define	LISTN "LISTN"
-#define	ELEMN "ELEMN"
-#define	ELMID "ELMID"
-#define	FILDN "FILDN"
-#define	PROMPT "@RDS@>"
-#define	PROMPT_OK ""
-#define	PROMPT_WHAT " ?"
-#define	CRETURN		"\n"
-
-#define	PROT_VERSION 100
-
-/* list types */
-#define	L_PRC_SI 1
-#define	L_USR_SI 2
-#define	L_PRJ_SI 3
-#define	L_AC_USR 4
-#define	L_AC_PRJ 5
-#define	L_SYSTEM 6
-#define	L_LWP	 8
-#define	L_LWP__I 9
-#define	L_LWP__U 10
-
-#define	CMD_EMPTY 0
-#define	CMD_GETALL   	"-pUuJjS"
-#define	CMD_GETPL	"-p"
-#define	CMD_GETUL	"-u"
-#define	CMD_GETAUL	"-U"
-#define	CMD_GETJL	"-j"
-#define	CMD_GETAJL	"-J"
-#define	CMD_GETASL	"-S"
-#define	CMD_SETINTERVAL "-i100"
-#define	CMD_ALIVE 	"alive"
-#define	CMD_EXIT  	"exit"
-
-extern int open_prot(int fd, char *rw);
-extern void close_prot(void);
-extern void wr_error(char *err);
-extern int wr_phead(void);
-extern int wr_lshead(int n);
-extern int wr_lhead(int type, int n);
-extern int wr_element(int stubidx, char *src, char *elemid);
-extern int wr_ctrl(int code);
-extern int wr_prompt(char *code);
-extern int wr_string(char *code);
-extern int wr_value(char *key, int64_t v);
-extern int skip_line(void);
-extern int r_phead(void);
-extern int r_lshead();
-extern int r_lhead(int *type);
-extern int r_element(char *src, char *elemid);
-extern int64_t r_value(char *key);
-extern int r_ctrl(void);
-extern char *r_cmd(void);
-
-extern char rderr[];
-
-typedef struct {
-	int (* format)(int, char *, char *, int);
-	size_t   off;
-} info_t;
-
-typedef struct {
-	char *key;
-	info_t info;
-} kv_pair_t;
-
-typedef struct {
-	int size;
-	kv_pair_t *stub;
-} stub_t;
-
-typedef struct {
-	int32_t pr_pid;
-	int32_t pr_lwpid;
-	int32_t pr_pctcpu;
-	int64_t	pr_time_tv_sec;
-	int64_t	pr_time_tv_nsec;
-	int32_t pr_bindpset;
-} lwpinfo_t;
-
-typedef struct {
-	int command;
-} cmd_t;
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif /* _RDPROT_H */
--- a/usr/src/cmd/wbem/provider/tools/rds/rds.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1021 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <stdio.h>
-#include <stdio_ext.h>
-#include <stdlib.h>
-#include <sys/time.h>
-#include <strings.h>
-#include <limits.h>
-#include <unistd.h>
-#include <errno.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-#include <pthread.h>
-#include "rdimpl.h"
-#include "rdprot.h"
-#include "rdutil.h"
-#include "rdlist.h"
-#include "rdfile.h"
-
-#define	RDS_VERSION		"RDS Version 1.0\n"
-#define	TIMEOUT_MSG		"Timeout"
-#define	NOTREADY_RESPONSE	"BUSY"
-
-#define	DEFAULT_SCAN_INTERVAL	1000   /* milliseconds */
-#define	MAXIMAL_SCAN_INTERVAL	30000  /* milliseconds */
-#define	DEFAULT_CMD_TIMEOUT	2000   /* milliseconds */
-
-extern list_t	users;		/* list of users */
-extern list_t	projects;	/* list of projects */
-extern list_t	sys;		/* list with one sys entry */
-extern list_t	processes;	/* list of processes */
-extern list_t	lwps;		/* list of lwps */
-extern char	errmsg[];	/* global message buffer */
-
-static char	greeting[] =		\
-	"Resource Data Server\n"	\
-	"Copyright 2001 SMI.\n"		\
-	"Version 1.0\n";
-
-/* ms timeout between successive cmds */
-static int	timeout = DEFAULT_CMD_TIMEOUT;
-
-/* ms interval between successive scans */
-static int	interval = DEFAULT_SCAN_INTERVAL;
-
-/* global signal flag */
-static int	sigterm = 0;
-
-/* print all cmd data on stdout in server mode flag */
-static int	Po = 0;
-
-/* count of scans performed in server mode */
-static long	scans_done = 0;
-
-/* name of rds logging file */
-static char		*log_file = NULL;
-
-/* enable microstate accounting flag */
-int		mo = 0;
-
-/* name of stored data file */
-char		*ltdb_file = NULL;
-
-
-/* mutex lock for data lists */
-pthread_mutex_t listLock = PTHREAD_MUTEX_INITIALIZER;
-
-/* mutex lock for log */
-pthread_mutex_t logLock = PTHREAD_MUTEX_INITIALIZER;
-
-/* identifiers for the various threads */
-static pthread_t scanner = 0;
-static pthread_t server = 0;
-static pthread_t master = 0;
-
-
-/*
- * Clean up calling thread's state.
- */
-static void
-thread_cleanup()
-{
-	pthread_t this = pthread_self();
-
-	if (pthread_equal(this, server)) {
-
-		/* shut down the command protocol */
-		(void) fprintf(stderr,
-			"cleanup_state: server thread shutdown\n");
-		log_msg("server thread shutdown init\n");
-		wr_error(errmsg);
-		log_msg("server thread shutdown complete\n");
-
-	} else if (pthread_equal(this, scanner)) {
-
-		/* shut down the scanner */
-		(void) fprintf(stderr,
-			"cleanup_state: scanner thread shutdown\n");
-		log_msg("scanner thread shutdown init\n");
-
-		log_msg("Waiting for server thread %d join from %d\n",
-		    (int)server, (int)this);
-
-		if (pthread_join(server, NULL) != 0) {
-			int e = errno;
-
-			perror("server join (cleanup)");
-			log_msg("server join (cleanup) failed with %d\n", e);
-		}
-
-		log_msg("Server thread joined %d.\n", (int)this);
-
-		monitor_stop();
-		log_msg("scanner thread shutdown complete\n");
-
-	} else if (pthread_equal(this, master)) {
-
-		(void) fprintf(stderr,
-			"cleanup_state: master thread shutdown\n");
-		log_msg("master thread shutdown\n");
-
-	} else {
-
-		(void) fprintf(stderr,
-		    "cleanup_state: unknown thread id %d\n", (int)this);
-		log_msg("unknown thread %d shutdown\n", (int)this);
-
-	}
-}
-
-
-/*
- * Called by any of the threads, this should set state
- * that the other threads will pick up so they will (eventually)
- * shut themselves down cleanly, then call pthread_exit
- * to properly shut down the calling thread.
- * The calling thread will exit with its code set to 1.
- */
-static void
-generic_exit(char *msg, int status)
-{
-	char wb[256];
-
-	/* cannot be on the stack since thread terminates with pthread_exit */
-	static int retcode = 0;
-
-	retcode = status;
-
-	/* worker-specific cleanup */
-	thread_cleanup();
-
-	/* announce the calling thread's demise */
-	(void) snprintf(wb, sizeof (wb) - 2, "(%d) %s",
-			(int)pthread_self(), msg);
-	log_msg(wb);
-	(void) fprintf(stderr, "%s", wb);
-
-	/* everybody checks this periodically */
-	sigterm = 1;
-
-	log_msg("calling thread_exit() from %d\n", (int)pthread_self());
-
-	/* return status as the calling thread's exit code */
-	pthread_exit(&retcode);
-
-}
-
-
-/*
- * Called by any of the threads, this should set state
- * that the other threads will pick up so they will (eventually)
- * shut themselves down cleanly, then call pthread_exit
- * to properly shut down the calling thread.
- * The calling thread will exit with its code set to 1.
- */
-void
-err_exit()
-{
-	generic_exit(errmsg, 1);
-}
-
-
-/*
- * Called by any of the threads, this should set state
- * that the other threads will pick up so they will (eventually)
- * shut themselves down cleanly, then call pthread_exit
- * to properly shut down the calling thread.
- * The calling thread will exit with its code set to 0.
- */
-static void
-ok_exit()
-{
-	generic_exit("Normal exit.\n", 0);
-}
-
-
-static void
-usage()
-{
-	(void) printf("rds [ options ]\n" \
-	    "-u\t\t- print stats for all users\n" \
-	    "-U<uid>\t\t- print stats for <uid>\n" \
-	    "-j\t\t- print stats for all projects\n" \
-	    "-J<projid>\t- print stats for <projid>\n" \
-	    "-p\t\t- print stats for all processes\n" \
-	    "-P <pid>\t- print stats for <pid>\n" \
-	    "-m\t\t- enable microstate accounting\n" \
-	    "-a\t\t- run in server mode\n" \
-	    "-t<time>\t- set command timeout to <time>\n" \
-	    "-i<interval>\t- set interval between scans to <time>\n" \
-	    "-f<file>\t- use <file> to save/restore state\n" \
-	    "-d\t\t- in server mode print stats on stdout\n" \
-	    "-L<file>|stderr - write log messages into <file> or stderr\n" \
-	    "-v\t\t- print rds version\n");
-}
-
-
-/*
- * Initiate the rds command protocol from the server side.
- * Emits the header and version strings.
- */
-static void
-start_protocol()
-{
-	/* emit version and header strings */
-	if (wr_string(greeting) != 0)
-		err_exit();
-	if (wr_phead() != 0)
-		err_exit();
-}
-
-
-/*
- * Emit the "not ready" message and a prompt.
- */
-static void
-notready()
-{
-	(void) wr_string(NOTREADY_RESPONSE);
-	(void) wr_string("\n");
-	(void) wr_prompt(PROMPT_OK);
-}
-
-
-/*
- * process_cmds() implements the rds server running in threaded mode.
- *
- * It assumes that the /proc scanner is running in another thread and
- * guarding access to critical sections.
- *
- * This function writes version and header to the output stream and waits
- * for commands on the input stream.
- *
- * Each received command may block on a mutex while the scanner thread is
- * updating.
- *
- * If the timeout expires without receiving a command, it will write an
- * error message and terminate.	 A received command resets the timeout.
- *
- * Each command is acknowledged with a prompt.
- */
-
-/*ARGSUSED*/
-static void *
-process_cmds(void *p)
-{
-	fd_set	readfs;
-	struct	timeval timev;
-	int	interval_cnt = timeout / interval;
-	int	ret;
-	char	*cmd;
-	hrtime_t t1, t2, wt1, wt2;
-	double	d;
-	int 	cmd_is_noop;
-
-	/* start the protocol so the client knows we're alive */
-	start_protocol();
-
-	/* establish timeout value */
-	timev.tv_sec = interval / 1000;
-	timev.tv_usec = (interval - (timev.tv_sec * 1000)) * 1000;
-
-	/* initialize stdin object */
-	(void) FD_ZERO(&readfs);
-	FD_SET(STDIN_FILENO, &readfs);
-
-	/* emit initial prompt */
-	(void) wr_prompt(PROMPT_OK);
-
-	while (interval_cnt > 0) {
-
-		/* time to shut down, exit gracefully */
-		if (sigterm == 1) {
-			break;		/* ok_exit(); */
-		}
-
-		/* check for stdin status */
-		FD_SET(STDIN_FILENO, &readfs);
-
-		/* block on stdin, max timeout */
-		if ((ret = select(1, &readfs, NULL, NULL, &timev)) == 0) {
-
-			/* timed out waiting for a command */
-			--interval_cnt;
-			continue;
-		}
-
-		/* if interrupted system call then exit gracefully */
-		if (ret == -1 && errno == EINTR) {
-			log_msg("select() interrupted\n");
-			ok_exit();
-		}
-
-		/* weird error condition */
-		if (ret != 1) {
-			perror("RDS Select error");
-			log_msg("select() error = %d\n", errno);
-			continue;
-		}
-
-		/* process whatever is waiting on stdin */
-		if (FD_ISSET(STDIN_FILENO, &readfs)) {
-
-			cmd_is_noop = 0;
-
-			/* try to parse out a valid command */
-			if ((cmd = r_cmd()) == NULL) {
-				err_exit();
-			}
-			log_msg("received '%s' command\n", cmd);
-			t1 = gethrtime();
-
-			/* handle the various commands */
-			if (strcmp(cmd, CMD_EXIT) == 0) {
-
-				/* exit now */
-				(void) wr_prompt(PROMPT_OK);
-				ok_exit();
-
-			} else if (strcmp(cmd, CRETURN) == 0) {
-
-				/* null command */
-				(void) wr_prompt(PROMPT_OK);
-				++cmd_is_noop;
-
-			} else if (strcmp(cmd, CMD_ALIVE) == 0) {
-
-				/* keepalive, another null command */
-				(void) wr_prompt(PROMPT_OK);
-				++cmd_is_noop;
-
-			} else if (strcmp(cmd, CMD_GETALL) == 0) {
-
-				/* get all project/user data */
-
-				/*
-				 * If the first scan has not yet
-				 * completed, notify the requester and
-				 * wait for a new command.  The
-				 * command timeout counter is
-				 * suspended until the next command
-				 * arrives.
-				 */
-				if (scans_done == 0) {
-					notready();
-					continue;
-				}
-
-				/* grab the mutex */
-				wt1 = gethrtime();
-
-				if ((ret = pthread_mutex_lock(
-					&listLock)) == 0) {
-
-					wt2 = gethrtime();
-					d = (double)
-					    (wt2 - wt1) / 1000000000.0;
-					log_msg("Server lock wait"
-					    " was %1.5f sec\n", d);
-
-					if (wr_lshead(5) != 0)
-						err_exit();
-
-					if (list_write(L_AC_USR, Po) == -1)
-						break;
-					if (list_write(L_USR_SI, Po) == -1)
-						break;
-					if (list_write(L_AC_PRJ, Po) == -1)
-						break;
-					if (list_write(L_PRJ_SI, Po) == -1)
-						break;
-					if (list_write(L_SYSTEM, Po) == -1)
-						break;
-
-					/* release the mutex */
-					if ((ret = pthread_mutex_unlock(
-						&listLock)) != 0) {
-						log_msg("pthread_mutex_unlock" \
-						    "failed with %d\n", ret);
-					}
-
-				} else {
-					log_msg("pthread_mutex_lock failed" \
-					    "with %d\n", ret);
-				}
-
-				(void) wr_prompt(PROMPT_OK);
-
-			} else if (strcmp(cmd, CMD_GETPL) == 0) {
-
-				/* get all process data (deprecated?) */
-
-				if (scans_done == 0) {
-					notready();
-					continue;
-				}
-
-				/* grab the mutex */
-				if ((ret = pthread_mutex_lock(
-					&listLock)) == 0) {
-
-					if (wr_lshead(1) != 0)
-						err_exit();
-
-					if (list_write(L_PRC_SI, Po) == -1)
-						break;
-
-					/* release the mutex */
-					if ((ret = pthread_mutex_unlock(
-						&listLock)) != 0) {
-						log_msg("pthread_mutex_unlock"\
-						    "failed with %d\n", ret);
-					}
-
-				} else {
-					log_msg("pthread_mutex_lock"\
-					    "failed with %d\n", ret);
-				}
-
-				(void) wr_prompt(PROMPT_OK);
-
-			} else if (strcmp(cmd, CMD_GETUL) == 0) {
-
-				/* get the active user list */
-
-				if (scans_done == 0) {
-					notready();
-					continue;
-				}
-
-				/* grab the mutex */
-				if ((ret = pthread_mutex_lock(
-					&listLock)) == 0) {
-
-					if (wr_lshead(1) != 0)
-						err_exit();
-
-
-					if (list_write(L_USR_SI, Po) == -1)
-						break;
-
-					/* release the mutex */
-					if ((ret = pthread_mutex_unlock(
-						&listLock)) != 0) {
-						log_msg("pthread_mutex_unlock"\
-						    "failed with %d\n", ret);
-					}
-
-				} else {
-					log_msg("pthread_mutex_lock" \
-					    "failed with %d\n", ret);
-				}
-
-				(void) wr_prompt(PROMPT_OK);
-
-			} else if (strcmp(cmd, CMD_GETAUL) == 0) {
-
-				/* get data for a particular user */
-
-				if (scans_done == 0) {
-					notready();
-					continue;
-				}
-
-				/* grab the mutex */
-				if ((ret = pthread_mutex_lock(
-					&listLock)) == 0) {
-
-					if (wr_lshead(1) != 0)
-						err_exit();
-
-					if (list_write(L_AC_USR, Po) == -1)
-						break;
-
-					/* release the mutex */
-					if ((ret = pthread_mutex_unlock(
-						&listLock)) != 0) {
-						log_msg("pthread_mutex_unlock" \
-						    "failed with %d\n", ret);
-					}
-
-				} else {
-					log_msg("pthread_mutex_lock" \
-					    "failed with %d\n", ret);
-				}
-
-				(void) wr_prompt(PROMPT_OK);
-
-			} else if (strcmp(cmd, CMD_GETJL) == 0) {
-
-				if (scans_done == 0) {
-					notready();
-					continue;
-				}
-
-				/* grab the mutex */
-				if ((ret = pthread_mutex_lock(
-					&listLock)) == 0) {
-
-					if (wr_lshead(1) != 0)
-						err_exit();
-
-					/* grab the mutex here */
-
-					if (list_write(L_PRJ_SI, Po) == -1)
-						break;
-
-					/* release the mutex */
-					if ((ret = pthread_mutex_unlock(
-						&listLock)) != 0) {
-						log_msg("pthread_mutex_unlock" \
-						    "failed with %d\n", ret);
-					}
-
-				} else {
-					log_msg("pthread_mutex_lock" \
-					    "failed with %d\n", ret);
-				}
-
-				(void) wr_prompt(PROMPT_OK);
-
-			} else if (strcmp(cmd, CMD_GETAJL) == 0) {
-
-				if (scans_done == 0) {
-					notready();
-					continue;
-				}
-
-				/* grab the mutex */
-				if ((ret = pthread_mutex_lock(
-					&listLock)) == 0) {
-
-					if (wr_lshead(1) != 0)
-						err_exit();
-
-					if (list_write(L_AC_PRJ, Po) == -1)
-						break;
-
-					/* release the mutex */
-					if ((ret = pthread_mutex_unlock(
-						&listLock)) != 0) {
-						log_msg("pthread_mutex_unlock" \
-						    "failed with %d\n", ret);
-					}
-
-				} else {
-					log_msg("pthread_mutex_lock" \
-					    "failed with %d\n", ret);
-				}
-
-				(void) wr_prompt(PROMPT_OK);
-
-			} else if (strcmp(cmd, CMD_GETASL) == 0) {
-
-				if (scans_done == 0) {
-					notready();
-					continue;
-				}
-
-				/* grab the mutex */
-				if ((ret = pthread_mutex_lock(
-					&listLock)) == 0) {
-
-					if (wr_lshead(1) != 0)
-						err_exit();
-
-					if (list_write(L_SYSTEM, Po) == -1)
-						break;
-
-					/* release the mutex */
-					if ((ret = pthread_mutex_unlock(
-						&listLock)) != 0) {
-						log_msg("pthread_mutex_unlock"
-						    "failed with %d\n", ret);
-					}
-
-				} else {
-					log_msg("pthread_mutex_lock"
-					    "failed with %d\n", ret);
-				}
-
-				(void) wr_prompt(PROMPT_OK);
-
-			} else {
-
-				/* bad command */
-				(void) wr_prompt(PROMPT_WHAT);
-				format_err("RDS protocol error:"
-				    "unknown command");
-				++cmd_is_noop;
-
-			}
-
-			if (!cmd_is_noop) {
-				t2 = gethrtime();
-				d = (double)(t2 - t1) / 1000000000.0;
-				log_msg("Command took %2.3f sec"
-				    " (%ld scans done)\n",
-				    d, scans_done);
-			}
-
-			/* reset the interval counter for timeout */
-			interval_cnt = timeout / interval;
-
-			continue;
-		}
-
-		/* timed out, one less interval to wait */
-		--interval_cnt;
-	}
-
-	/* timed out, print message */
-	if (interval_cnt == 0) {
-		format_err("%s %d sec. left", TIMEOUT_MSG, timeout / 1000);
-		err_exit();
-	}
-
-	/* clean exit */
-	log_msg("process_cmds exits\n");
-	ok_exit();			/* calls pthread_exit() */
-
-	return (NULL);
-}
-
-
-/*
- * The thread procedure for the /proc scanner.
- * Does a full scan of /proc, then sleeps for a specified time.
- *
- * The specified time ('interval') is adjusted according to
- * the average of the last three scan times.
- * The sleep time is increase if the average scan duration time
- * exceeds a threshold. The threshold is set to 50% of the current
- * sleep time.
- * The sleep time is decreased in a similar way.
- *
- * The update of the project and user lists is guarded by aggregate_list_mutex.
- * The update of the process list is guarded by process_list_mutex.
- */
-
-/*ARGSUSED*/
-static void *
-scanprocfs(void *p)
-{
-	hrtime_t t1;
-
-	double d0; /* duration of the for last scan */
-	double d1; /* duration of the last scan */
-	double d2; /* duration of current scan */
-	double ad; /* average duration of the last three scans */
-	double threshold_up; /* threshold for increasing scan duration */
-	double threshold_down; /* threshold for decreasing scan duration */
-	double thf =  0.5; /* */
-	int new_interval = interval;
-	int time_to_sleep;
-
-	threshold_up = new_interval * thf;
-	threshold_down = 0;
-	d0 = d1 = d2 = ad = 0;
-
-
-	while (sigterm != 1) {
-		t1 = gethrtime();
-
-		if (monitor_update() != 0)
-			err_exit();
-
-		++scans_done;
-
-		/* make sure we're sleeping a reasonable amount of time */
-		d0 = d1; d1 = d2;
-		d2 = (gethrtime() - t1) / 1000000.0;
-		ad = (d0 + d1 + d2) / 3.0;
-
-		if (threshold_up < ad) {
-			/* increase the new_interval in 1000 ms steps	*/
-			new_interval += (int)((ad - threshold_up) / thf);
-			if (new_interval > MAXIMAL_SCAN_INTERVAL)
-				new_interval = MAXIMAL_SCAN_INTERVAL;
-			if ((new_interval % 1000) > 500)
-				new_interval += 500;
-			new_interval = (new_interval / 1000) * 1000;
-			/* pull up the thresholds */
-			threshold_down = threshold_up;
-			threshold_up = new_interval * thf;
-		}
-
-		if (threshold_down > ad) {
-			/* decrease the new_interval in 1000 ms steps	*/
-			new_interval -= (int)((threshold_down - ad) / thf);
-			if ((new_interval % 1000) > 500)
-				new_interval += 500;
-			new_interval = (new_interval / 1000) * 1000;
-			/* pull down the thresholds */
-			if (new_interval < interval) {
-				/* just as at the beginning	*/
-				new_interval = interval;
-				threshold_down = 0;
-				threshold_up = new_interval * thf;
-			} else {
-				threshold_up = threshold_down;
-				threshold_down = new_interval * thf;
-			}
-		}
-
-		log_msg("scan %.0f ms, ad %.0f ms, thold_up %.0f ms,"
-		    " thold_down %.0f ms, interval %d ms\n",
-		    d2, ad, threshold_up, threshold_down, new_interval);
-		log_msg("%d files open\n", fd_count());
-
-		time_to_sleep = new_interval;
-		while (time_to_sleep > 0) {
-			napms(1000);
-			time_to_sleep -= 1000;
-			if (sigterm == 1)
-				break;
-		}
-	}
-
-	log_msg("scanprocfs exits\n");
-	ok_exit();
-
-	return (NULL);
-}
-
-static void
-sig_rds(int sig)
-{
-	log_msg("caught signal #%d\n", sig);
-	switch (sig) {
-	case SIGINT:
-	case SIGTERM:
-		sigterm = 1;
-		break;
-	}
-}
-
-
-/*
- * Run the command processor, with the /proc scanner and rds command processor
- * in separate threads.
- *
- * Initializes the mutex as a side effect.
- *
- * Returns on exit of the command process or as a result of a signal.
- */
-static void
-runserver()
-{
-	int rv;
-
-	/* keep track of main()'s thread */
-	master = pthread_self();
-	log_msg("master thread = %d\n", (int)master);
-
-	/* initialize the mutexes for later use */
-	rv = pthread_mutex_init(&listLock, NULL);
-	if (rv != 0) {
-		(void) sprintf(errmsg, "Mutex init failed with %d", rv);
-		err_exit();
-	}
-
-	rv = pthread_mutex_init(&listLock, NULL);
-	if (rv != 0) {
-		(void) sprintf(errmsg, "Mutex init failed with %d", rv);
-		err_exit();
-	}
-
-	log_msg("pthread_mutex_init returns %d\n", rv);
-
-	/* launch the command processor in its thread */
-	rv = pthread_create(&server, NULL, process_cmds, NULL);
-	if (rv != 0) {
-		(void) sprintf(errmsg,
-		    "Server thread create failed with %d", rv);
-		err_exit();
-
-	}
-	log_msg("Server pthread_create = %d returns %d\n",
-	    (int)server, rv);
-
-
-	/* launch the scanner in its thread */
-	rv = pthread_create(&scanner, NULL, scanprocfs, NULL);
-	if (rv != 0) {
-		(void) sprintf(errmsg,
-		    "Scanner thread create failed with %d", rv);
-		err_exit();
-	}
-	log_msg("Scanner pthread_create = %d returns %d\n",
-	    (int)scanner, rv);
-
-
-	/* nothing much else to do here */
-	while (sigterm != 1)
-		(void) sleep(1);
-
-	/* wait for the scanner & server threads to shut down */
-	log_msg("Waiting for scanner thread %d join from %d\n",
-	    (int)scanner, (int)pthread_self());
-	if (pthread_join(scanner, NULL) != 0) {
-		int e = errno;
-		perror("scanner join");
-		log_msg("scanner join failed with %d\n", e);
-	}
-	log_msg("Scanner thread joined.\n");
-
-	/* finish cleaning up global state */
-	(void) pthread_mutex_destroy(&listLock);
-
-	log_msg("Global cleanup completed.\n");
-}
-
-
-int
-main(int argc, char *argv[])
-{
-	int i,	uo = 0, jo = 0, po = 0, do_server_mode = 0,
-	    selected = 0;
-	int	lo_arg = 1;
-	int	uid = -1, pid = -1, jid = -1;
-	int	rv;
-
-	/* parse args */
-	while ((i = getopt(argc, argv, "uU:jJ:pP:mat:i:l:f:dvL:")) != EOF)
-		switch (i) {
-		case 'U':
-			uid = atoi(optarg);
-			uo = 1; selected = 1;
-			break;
-		case 'u':
-			uo = 1; selected = 1;
-			break;
-		case 'J':
-			jid = atoi(optarg);
-			jo = 1; selected = 1;
-			break;
-		case 'j':
-			jo = 1; selected = 1;
-			break;
-		case 'P':
-			pid = atoi(optarg);
-			po = 1; selected = 1;
-			break;
-		case 'p':
-			po = 1; selected = 1;
-			break;
-		case 'a':
-			do_server_mode = 1;
-			break;
-		case 'l':
-			if ((lo_arg = atoi(optarg)) == 0) {
-				usage();
-				exit(1);
-			}
-			break;
-		case 'd':
-			Po = 1;
-			break;
-		case 't':
-			if ((timeout  = atoi(optarg)) < 1000) {
-				usage();
-				exit(1);
-			}
-			break;
-		case 'i':
-			if ((interval  = atoi(optarg)) < 100) {
-				usage();
-				exit(1);
-			}
-			break;
-		case 'f':
-			ltdb_file = optarg;
-			break;
-		case 'L':
-			log_file = optarg;
-			break;
-		case 'm':
-			mo = 1;
-			break;
-		case 'v': (void) printf(RDS_VERSION);
-			exit(1);
-			break;
-		case '?':
-			usage();
-			exit(1);
-		default:
-			usage();
-			exit(1);
-		}
-
-
-	/* set handlers */
-	(void) signal(SIGINT, sig_rds);
-	(void) signal(SIGTERM, sig_rds);
-	(void) sigignore(SIGPIPE);
-
-	(void) enable_extended_FILE_stdio(-1, -1);
-
-	/* initialize the log mutex */
-	rv = pthread_mutex_init(&logLock, NULL);
-	if (rv != 0) {
-		(void) sprintf(errmsg, "Mutex init failed with %d", rv);
-		err_exit();
-	}
-
-	if (log_file != NULL)
-		log_open(log_file);
-
-	if (do_server_mode == 1) {
-
-		/*
-		 * Initialize list data structures, possibly
-		 * reading saved data.
-		 *
-		 * As a side effect this messes with the protocol
-		 * state since the list reader pretends it's reading
-		 * the protocol.
-		 *
-		 * A problem here is that we cannot start the server
-		 * thread until this has completed because it will try to
-		 * use the same state hidden inside the protocol code.
-		 *
-		 * The consequence is that this may occupy the main
-		 * thread for an arbitrarily long time *before* the server
-		 * thread is started and the app becomes able to respond
-		 * to commands.
-		 */
-		if (monitor_start() != 0)
-			err_exit();
-
-		/* Open pipes in and out for the command protocol */
-		if (open_prot(STDOUT_FILENO, "w") == -1) {
-			err_exit();
-		}
-		if (open_prot(STDIN_FILENO, "r") == -1) {
-			err_exit();
-		}
-
-		/* Waits for the child threads to end */
-		runserver();
-
-		/* Close command I/O pipes */
-		close_prot();
-
-	} else {
-
-		if (monitor_start() != 0)
-			err_exit();
-
-		for (i = 0; i < lo_arg; i ++) {
-			if (sigterm == 1)
-				break;
-			if (monitor_update()  != 0)
-				err_exit();
-			if (selected == 0 || uo == 1) {
-				list_print(&users, uid);
-			}
-			if (selected == 0 || jo == 1) {
-				list_print(&projects, jid);
-			}
-			if (selected == 0 || po == 1) {
-				list_print(&processes, pid);
-			}
-			if (i < lo_arg - 1)
-				napms(interval);
-		}
-	}
-
-	/* clean up the log stuff at the very end */
-	log_close();
-	(void) pthread_mutex_destroy(&logLock);
-
-	return (0);
-}
--- a/usr/src/cmd/wbem/provider/tools/rds/rdtable.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2000-2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <string.h>
-#include <stdlib.h>
-
-#include "rdutil.h"
-#include "rdtable.h"
-
-static lwpid_t	*lwpid_tbl[LWPID_TBL_SZ];
-
-void
-lwpid_init()
-{
-	(void) memset(&lwpid_tbl, 0, sizeof (lwpid_t *) * LWPID_TBL_SZ);
-}
-
-void
-lwpid_add(lwp_info_t *lwp, pid_t pid, id_t lwpid)
-{
-	lwpid_t	*elm = Zalloc(sizeof (lwpid_t));
-	int hash = pid % LWPID_TBL_SZ;
-
-	elm->l_pid = pid;
-	elm->l_lwpid = lwpid;
-	elm->l_lwp = lwp;
-	elm->l_next = lwpid_tbl[hash]; /* add in front of chain */
-	lwpid_tbl[hash] = elm;
-}
-
-void
-lwpid_del(pid_t pid, id_t lwpid)
-{
-	lwpid_t	*elm, *elm_prev;
-	int hash = pid % LWPID_TBL_SZ;
-
-	elm = lwpid_tbl[hash];
-	elm_prev = NULL;
-
-	while (elm) {
-		if ((elm->l_pid == pid) && (elm->l_lwpid == lwpid)) {
-			if (!elm_prev)	/* first chain element */
-				lwpid_tbl[hash] = elm->l_next;
-			else
-				elm_prev->l_next = elm->l_next;
-			free(elm);
-			break;
-		} else {
-			elm_prev = elm;
-			elm = elm->l_next;
-		}
-	}
-}
-
-static lwpid_t *
-lwpid_getptr(pid_t pid, id_t lwpid)
-{
-	lwpid_t *elm = lwpid_tbl[pid % LWPID_TBL_SZ];
-	while (elm) {
-		if ((elm->l_pid == pid) && (elm->l_lwpid == lwpid))
-			return (elm);
-		else
-			elm = elm->l_next;
-	}
-	return (NULL);
-}
-
-lwp_info_t *
-lwpid_get(pid_t pid, id_t lwpid)
-{
-	lwpid_t	*elm = lwpid_getptr(pid, lwpid);
-	if (elm)
-		return (elm->l_lwp);
-	else
-		return (NULL);
-}
-
-int
-lwpid_pidcheck(pid_t pid)
-{
-	lwpid_t *elm;
-	elm = lwpid_tbl[pid % LWPID_TBL_SZ];
-	while (elm) {
-		if (elm->l_pid == pid)
-			return (1);
-		else
-			elm = elm->l_next;
-	}
-	return (0);
-}
--- a/usr/src/cmd/wbem/provider/tools/rds/rdtable.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#ifndef	_RDTABLE_H
-#define	_RDTABLE_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#include <limits.h>
-
-#include "rdimpl.h"
-
-#define	LWPID_TBL_SZ	4096		/* hash table of lwpid_t structures */
-#define	LWP_ACTIVE	1
-
-typedef struct {
-	size_t		t_size;
-	size_t		t_nent;
-	long		*t_list;
-} table_t;
-
-typedef struct {
-	uid_t		u_id;
-	char		u_name[LOGNAME_MAX+1];
-} name_t;
-
-typedef struct {
-	size_t		n_size;
-	size_t		n_nent;
-	name_t		*n_list;
-} nametbl_t;
-
-typedef struct lwpid {			/* linked list of pointers to lwps */
-	pid_t		l_pid;
-	id_t		l_lwpid;
-	int		l_active;
-	lwp_info_t	*l_lwp;
-	struct lwpid	*l_next;
-} lwpid_t;
-
-
-extern void 		lwpid_init();
-extern void 		lwpid_add(lwp_info_t *lwp, pid_t pid, id_t lwpid);
-extern void 		lwpid_del(pid_t pid, id_t lwpid);
-extern lwp_info_t 	*lwpid_get(pid_t pid, id_t lwpid);
-extern int 		lwpid_pidcheck(pid_t pid);
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _RDTABLE_H */
--- a/usr/src/cmd/wbem/provider/tools/rds/rdutil.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,323 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/resource.h>
-#include <sys/time.h>
-#include <stdlib.h>
-#include <libintl.h>
-#include <string.h>
-#include <stdio.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <poll.h>
-#include <unistd.h>
-#include <project.h>
-#include <pwd.h>
-#include <pthread.h>
-
-#include "rdfile.h"
-#include "rdimpl.h"
-#include "rdutil.h"
-
-static char PRG_FMT[] = "%s: ";
-static char ERR_FMT[] = ": %s\n";
-static char *modulname = "srm provider";
-
-extern jmp_buf  dm_jmpbuffer;
-extern char errmsg[];
-extern void monitor_stop();
-
-extern pthread_mutex_t logLock;
-
-/*PRINTFLIKE1*/
-void
-format_err(char *format, ...)
-{
-	int pos = 0;
-	va_list alist;
-	pos += sprintf(errmsg, PRG_FMT, modulname);
-	va_start(alist, format);
-	pos += vsprintf(errmsg + pos, format, alist);
-	va_end(alist);
-	if (strchr(format, '\n') == NULL)
-		(void) sprintf(errmsg + pos, "\n");
-}
-
-/*PRINTFLIKE1*/
-void
-format_errno(char *format, ...)
-{
-	int err = errno, pos = 0;
-	va_list alist;
-	pos += sprintf(errmsg, PRG_FMT, modulname);
-	va_start(alist, format);
-	pos += vsprintf(errmsg + pos, format, alist);
-	va_end(alist);
-	if (strchr(format, '\n') == NULL)
-		pos += sprintf(errmsg + pos, ERR_FMT,
-				(err != 0) ? strerror(err) : "");
-}
-
-/*PRINTFLIKE1*/
-void
-dmerror(char *format, ...)
-{
-	int err = errno, pos = 0;
-	va_list alist;
-
-	pos += sprintf(errmsg, PRG_FMT, modulname);
-	va_start(alist, format);
-	pos += vsprintf(errmsg + pos, format, alist);
-	va_end(alist);
-	if (strchr(format, '\n') == NULL)
-		pos += sprintf(errmsg + pos, ERR_FMT, strerror(err));
-	longjmp(dm_jmpbuffer, 1);
-}
-
-void *
-Realloc(void *ptr, size_t size)
-{
-	int	cnt = 0;
-	void    *sav = ptr;
-
-eagain: if ((ptr = realloc(ptr, size)))
-		return (ptr);
-
-	log_err("realloc(ptr=0x%p, size=%u)", (void *)ptr, (uint_t)size);
-	if ((++cnt <= 3) && (errno == EAGAIN)) {
-		napms(5000); /* wait for 5 seconds */
-		ptr = sav;
-		goto eagain;
-	}
-	ptr = sav;
-	dmerror("not enough memory");
-	/*NOTREACHED*/
-	return (NULL);	/* keep gcc happy */
-}
-
-void *
-Malloc(size_t size)
-{
-	return (Realloc(NULL, size));
-}
-
-void *
-Zalloc(size_t size)
-{
-	return (memset(Realloc(NULL, size), 0, size));
-}
-
-void
-Free(void *ptr)
-{
-	free(ptr);
-}
-
-int
-Setrlimit()
-{
-	struct rlimit rlim;
-	int rv, fd_limit;
-
-	if (getrlimit(RLIMIT_NOFILE, &rlim) == -1)
-		dmerror("getrlimit failed");
-	fd_limit = (int)rlim.rlim_cur;
-
-	rlim.rlim_cur = rlim.rlim_max;
-
-	if (setrlimit(RLIMIT_NOFILE, &rlim) == -1)
-	    rv = fd_limit;
-	else
-	    rv = (int)rlim.rlim_cur;
-
-	log_msg("fd_limit set to %d\n", rv);
-
-	return (rv);
-}
-
-void
-list_alloc(list_t *list, int size)
-{
-	if (size > 0) {
-		list->l_size = size;
-		list->l_ptrs = Zalloc(sizeof (void *) * (size + 1));
-	}
-}
-
-void
-list_init(list_t *list, int type)
-{
-	if (list == NULL)
-		return;
-
-	list->l_type = type;
-
-	list->l_type = type;
-}
-
-
-void
-getusrname(int uid, char *name, int length)
-{
-	struct passwd *pwd;
-
-	if ((pwd = getpwuid(uid)) == NULL) {
-		log_err("getpwuid(uid=%d,..)", uid);
-		(void) snprintf(name, length, "%d", uid);
-	} else {
-		(void) snprintf(name, length, "%s", pwd->pw_name);
-	}
-}
-
-void
-getprojname(projid_t projid, char *str, int len)
-{
-	struct project proj;
-	char projbuf[PROJECT_BUFSZ];
-
-	if (getprojbyid(projid, &proj, projbuf, PROJECT_BUFSZ) != NULL) {
-	    (void) snprintf(str, len, "%s", proj.pj_name);
-	} else {
-	    log_err("getprojbyid(projid=%ld,..)", (long)projid);
-	    (void) snprintf(str, len, "%-6ld", (long)projid);
-	}
-
-}
-
-
-void
-napms(int ms)
-{
-
-	(void) poll(NULL, 0, ms);
-}
-
-longlong_t get_timestamp() {
-	struct timeval tv;
-	struct timezone tz;
-
-	(void) gettimeofday(&tv, &tz);
-	return (tv.tv_usec  + ((longlong_t)tv.tv_sec * MICROSEC));
-}
-
-
-static FILE *logf = NULL;
-static char buf[RDS_MAXLINE];
-static hrtime_t hrt_base = 0;
-static int call_cnt = 0;
-static int bytes_written = 0;
-
-void
-log_open(char *file)
-{
-	if (strcmp(file, "stderr") == 0)
-		logf = stderr;
-	else
-		logf = fopen(file, "w+");
-}
-
-
-void
-log_close()
-{
-	if (logf != NULL && logf != stderr)
-		(void) fclose(logf);
-}
-
-
-/*PRINTFLIKE1*/
-void
-log_msg(char *fmt, ...)
-{
-	va_list	ap;
-	int n;
-	hrtime_t hrt;
-
-	if (logf == NULL)
-		return;
-	if (pthread_mutex_lock(&logLock) == 0) {
-	    if (logf != stderr && bytes_written > RDS_MAXLOG_FILE) {
-		bytes_written = 0;
-		rewind(logf);
-	    }
-
-	    if (hrt_base == 0)
-		hrt_base =  gethrtime() / 1000000;
-
-	    hrt = gethrtime() / 1000000;
-	    va_start(ap, fmt);
-	    (void) vsnprintf(buf, RDS_MAXLINE, fmt, ap);
-	    if ((n = fprintf(logf, "%4d:%08lld ms:%s",
-			call_cnt++, hrt - hrt_base, buf)) != -1)
-		bytes_written += n;
-	    (void) fflush(logf);
-	    va_end(ap);
-
-	    if (pthread_mutex_unlock(&logLock) != 0)
-		perror("log pthread_mutex_unlock");
-
-	} else
-	    perror("log pthread_mutex_lock");
-}
-
-/*PRINTFLIKE1*/
-void
-log_err(char *fmt, ...)
-{
-	va_list	ap;
-	int n;
-	hrtime_t hrt;
-	int err = errno;
-
-	if (logf == NULL)
-		return;
-	if (pthread_mutex_lock(&logLock) == 0) {
-	    if (logf != stderr && bytes_written > RDS_MAXLOG_FILE) {
-		    bytes_written = 0;
-		    rewind(logf);
-	    }
-
-	    if (hrt_base == 0)
-		    hrt_base =  gethrtime() / 1000000;
-
-	    hrt = gethrtime() / 1000000;
-	    va_start(ap, fmt);
-	    (void) vsnprintf(buf, RDS_MAXLINE, fmt, ap);
-	    if ((n = fprintf(logf, "%4d:%08lld ms:ERROR: %s: (errno %d), %s\n",
-			    call_cnt++, hrt - hrt_base, buf, err,
-			    (err != 0) ? strerror(err) : "")) != -1)
-		    bytes_written += n;
-	    (void) fflush(logf);
-	    va_end(ap);
-
-	    if (pthread_mutex_unlock(&logLock) != 0)
-		perror("log pthread_mutex_unlock");
-
-	} else
-	    perror("log pthread_mutex_lock");
-}
--- a/usr/src/cmd/wbem/provider/tools/rds/rdutil.h	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright (c) 2001 by Sun Microsystems, Inc.
- * All rights reserved.
- */
-
-#ifndef	_RDUTIL_H
-#define	_RDUTIL_H
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include <sys/processor.h>
-#include <sys/types.h>
-
-#include "rdimpl.h"
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#define	RDS_MAXLINE	512
-#define	RDS_MAXLOG_FILE (1024 * 1024)
-extern void format_err(char *, ...);
-extern void dmerror(char *, ...);
-extern void *Realloc(void *ptr, size_t size);
-extern void *Malloc(size_t);
-extern void *Zalloc(size_t);
-extern void Free(void *ptr);
-extern void list_alloc(list_t *, int);
-extern void list_init(list_t *, int);
-extern int Setrlimit();
-extern longlong_t get_timestamp();
-extern size_t ctok(pgcnt_t clicks);
-extern void getusrname(int uid, char *name, int length);
-extern void getprojname(projid_t projid, char *str, int len);
-extern void napms(int ms);
-extern void log_open(char *file);
-extern void log_close();
-extern void log_msg(char *fmt, ...);
-extern void log_err(char *fmt, ...);
-extern void log_dumpf(char *file);
-#ifdef	__cplusplus
-}
-#endif
-
-#endif	/* _RDUTIL_H */
--- a/usr/src/cmd/wbem/provider/tools/rds/sparc/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# cmd/wbem/provider/tools/rds/sparc/Makefile
-#
-# Copyright (c) 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-
-.KEEP_STATE:
-
-include ../Makefile.com
-
-install: all $(ROOTWBEMPROG32)
-
--- a/usr/src/cmd/wbem/provider/tools/rds/sparcv9/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# cmd/wbem/provider/tools/rds/sparcv9/Makefile
-#
-# Copyright (c) 2001 by Sun Microsystems, Inc.
-# All rights reserved.
-#
-
-.KEEP_STATE:
-
-
-include ../Makefile.com
-include $(SRC)/cmd/Makefile.cmd.64
-
-install: all $(ROOTWBEMPROG64)
-
-
Binary file usr/src/grub/splash.xpm.gz has changed
--- a/usr/src/head/regex.h	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/head/regex.h	Thu Sep 09 11:46:43 2010 -0400
@@ -28,12 +28,14 @@
  * Copyright 1989, 1994 by Mortice Kern Systems Inc.
  * All rights reserved.
  */
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
 
 #ifndef	_REGEX_H
 #define	_REGEX_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <sys/feature_tests.h>
 #include <sys/types.h>
 
@@ -69,18 +71,24 @@
 typedef ssize_t regoff_t;
 
 /* regcomp flags */
+#define	REG_BASIC	0x00
 #define	REG_EXTENDED	0x01		/* Use Extended Regular Expressions */
 #define	REG_NEWLINE	0x08		/* Treat \n as regular character */
 #define	REG_ICASE	0x04		/* Ignore case in match */
 #define	REG_NOSUB	0x02		/* Don't set subexpression */
 #define	REG_EGREP	0x1000		/* running as egrep(1) */
 
-/* non-standard flags */
+/* non-standard flags - note that most of these are not supported */
 #define	REG_DELIM	0x10		/* string[0] is delimiter */
 #define	REG_DEBUG	0x20		/* Debug recomp and regexec */
 #define	REG_ANCHOR	0x40		/* Implicit ^ and $ */
 #define	REG_WORDS	0x80		/* \< and \> match word boundries */
 
+/* FreeBSD additions */
+#define	REG_DUMP	0x2000
+#define	REG_PEND	0x4000
+#define	REG_NOSPEC	0x8000
+
 /* internal flags */
 #define	REG_MUST	0x100		/* check for regmust substring */
 
@@ -119,11 +127,14 @@
 	size_t  re_nsub;	/* # of subexpressions in RE pattern */
 
 	/*
-	 * Internal use only
+	 * Internal use only.  Note that any changes to this structure
+	 * have to preserve sizing, as it is baked into applications.
 	 */
-	void	*re_comp;	/* compiled RE; freed by regfree() */
-	int	re_cflags;	/* saved cflags for regexec() */
-	size_t	re_erroff;	/* RE pattern error offset */
+	struct re_guts *re_g;
+	int re_magic;
+	const char *re_endp;
+
+	/* here for compat */
 	size_t	re_len;		/* # wchar_t chars in compiled pattern */
 	struct _regex_ext_t *re_sc;	/* for binary compatibility */
 } regex_t;
--- a/usr/src/head/wctype.h	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/head/wctype.h	Thu Sep 09 11:46:43 2010 -0400
@@ -95,6 +95,14 @@
 	wchar_t *code;		/* conversion code */
 };
 
+
+#ifdef	_ILLUMOS_PRIVATE
+extern	int __iswrune(wint_t);
+extern	wint_t __nextwctype(wint_t, wctype_t);
+#define	iswrune(c)		__iswrune(c)
+#define	nextwctype(c, t)	__nextwctype(c, t)
+#endif
+
 /* character classification functions */
 
 /* iswascii is still a macro */
--- a/usr/src/lib/libbe/common/be_utils.c	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libbe/common/be_utils.c	Thu Sep 09 11:46:43 2010 -0400
@@ -475,7 +475,13 @@
 			if (strstr(line, BE_GRUB_COMMENT) != NULL ||
 			    strstr(line, "BOOTADM") != NULL)
 				continue;
-			entries[num_lines] = strdup(temp_line);
+			if (strcmp(tok, "splashimage") == 0) {
+				entries[num_lines] =
+				    strdup("splashimage "
+				    "/boot/splashimage.xpm\n");
+			} else {
+				entries[num_lines] = strdup(temp_line);
+			}
 			num_lines++;
 		} else if (found_title && !found_orig_be) {
 			tmp_entries[num_tmp_lines] = strdup(temp_line);
--- a/usr/src/lib/libc/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -21,6 +21,8 @@
 #
 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
 #
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+# Use is subject to license terms.
 #
 
 LIBBASENAME=	libc
@@ -125,28 +127,11 @@
 
 .KEEP_STATE:
 
-all:	check_i18n .WAIT lib32 $(BUILD64) .WAIT lib64 .WAIT etc
-
-check_i18n:
-	@if [ ! -f $(ROOTFS_LIBDIR)/libc_i18n.a -o \
-	    ! -f $(ROOTFS_LIBDIR64)/libc_i18n.a ]; then \
-		if [ "$$CLOSED_IS_PRESENT" = no ]; then \
-			$(ECHO) "Warning: closed binaries not" \
-			    "properly unpacked." >&2;\
-			$(ECHO) "Missing libc_i18n.a" >&2; \
-			exit 1; \
-		else \
-			$(ECHO) "Warning: libc_i18n.a must be built" \
-			    "before libc can be built." >&2; \
-			exit 1; \
-		fi \
-	fi
+all:	lib32 $(BUILD64) .WAIT lib64 .WAIT etc
 
 etc:	$($(MACH)_ETC)
 
 lib32:	$(MACH_COMP) $(MACHLIBS) $(MACH)/$(LIB_PIC) $(VARIANTLIBS)
-	mkdir -p $(MACH)/i18n_pics
-	cd $(MACH)/i18n_pics ; $(AR) -x $(ROOTFS_LIBDIR)/libc_i18n.a
 	@if $(ELFDUMP) -r $(MACH)/$(DYNLIB) | $(GREP) -w environ ; then \
 		$(ECHO) "Error: Invalid reference to environ" ; \
 		$(ECHO) "Error: See comments in port/gen/env_data.c" ; \
@@ -156,8 +141,6 @@
 $(MACHLIBS):	$(MACH_COMP)
 
 lib64:	$(MACH_COMP) $(MACHLIBS64) $(MACH64)/$(LIB_PIC) $(VARIANTLIBS64)
-	mkdir -p $(MACH64)/i18n_pics
-	cd $(MACH64)/i18n_pics ; $(AR) -x $(ROOTFS_LIBDIR64)/libc_i18n.a
 	@if $(ELFDUMP) -r $(MACH64)/$(DYNLIB) | $(GREP) -w environ ; then \
 		$(ECHO) "Error: Invalid reference to environ" ; \
 		$(ECHO) "Error: See comments in port/gen/env_data.c" ; \
@@ -250,8 +233,6 @@
 	@cd $@; pwd; VERSION='$(VERSION)' $(MAKE) $(TARGET)
 
 clean clobber: $(SUBDIRS)
-	$(RM) -r $(MACH)/i18n_pics
-	$(BUILD64)$(RM) -r $(MACH64)/i18n_pics
 
 lint: $(SUBDIRS)
 
--- a/usr/src/lib/libc/Makefile.targ	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/Makefile.targ	Thu Sep 09 11:46:43 2010 -0400
@@ -172,6 +172,11 @@
 	$(COMPILE.c) -o $@ $<
 	$(POST_PROCESS_O)
 
+# locale rules
+pics/%.o %.o: $(LIBCBASE)/../port/locale/%.c
+	$(COMPILE.c) -o $@ $<
+	$(POST_PROCESS_O)
+
 # print rules
 pics/%.o: $(LIBCBASE)/../port/print/%.c
 	$(COMPILE.c) -o $@ $<
--- a/usr/src/lib/libc/amd64/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/amd64/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -21,6 +21,9 @@
 #
 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 #
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
 
 LIBCBASE=	.
 LIBCDIR=	$(SRC)/lib/libc
@@ -646,11 +649,6 @@
 	wscanf.o
 
 PORTI18N=			\
-	__fgetwc_xpg5.o		\
-	__fgetws_xpg5.o		\
-	__fputwc_xpg5.o		\
-	__fputws_xpg5.o		\
-	__ungetwc_xpg5.o	\
 	getwchar.o		\
 	putwchar.o		\
 	putws.o			\
@@ -695,6 +693,7 @@
 	gettext_gnu.o		\
 	gettext_real.o		\
 	gettext_util.o		\
+	isdigit.o		\
 	plural_parser.o		\
 	wdresolve.o		\
 	_ctype.o		\
@@ -705,6 +704,77 @@
 	wcstol_longlong.o	\
 	wcstoul_longlong.o
 
+PORTLOCALE=			\
+	ascii.o			\
+	big5.o			\
+	btowc.o			\
+	collate.o		\
+	collcmp.o		\
+	euc.o			\
+	fnmatch.o		\
+	fgetwc.o		\
+	fgetws.o		\
+	fix_grouping.o		\
+	fputwc.o		\
+	fputws.o		\
+	fwide.o			\
+	gb18030.o		\
+	gb2312.o		\
+	gbk.o			\
+	getdate.o		\
+	iswctype.o		\
+	ldpart.o		\
+	lmessages.o		\
+	lnumeric.o		\
+	lmonetary.o		\
+	localeconv.o		\
+	mbftowc.o		\
+	mblen.o			\
+	mbrlen.o		\
+	mbrtowc.o		\
+	mbsinit.o		\
+	mbsnrtowcs.o		\
+	mbsrtowcs.o		\
+	mbstowcs.o		\
+	mbtowc.o		\
+	mskanji.o		\
+	nextwctype.o		\
+	nl_langinfo.o		\
+	none.o			\
+	regcomp.o		\
+	regfree.o		\
+	regerror.o		\
+	regexec.o		\
+	rune.o			\
+	runetype.o		\
+	setlocale.o		\
+	setrunelocale.o		\
+	strcoll.o		\
+	strfmon.o		\
+	strftime.o		\
+	strptime.o		\
+	strxfrm.o		\
+	table.o			\
+	timelocal.o		\
+	tolower.o		\
+	towlower.o		\
+	ungetwc.o		\
+	utf8.o			\
+	wcrtomb.o		\
+	wcscoll.o		\
+	wcsftime.o		\
+	wcsnrtombs.o		\
+	wcsrtombs.o		\
+	wcswidth.o		\
+	wcstombs.o		\
+	wcsxfrm.o		\
+	wctob.o			\
+	wctomb.o		\
+	wctrans.o		\
+	wctype.o		\
+	wcwidth.o		\
+	wscol.o
+
 AIOOBJS=			\
 	aio.o			\
 	aio_alloc.o		\
@@ -853,6 +923,7 @@
 	$(PORTGEN64)		\
 	$(PORTI18N)		\
 	$(PORTI18N_COND)	\
+	$(PORTLOCALE)		\
 	$(PORTPRINT)		\
 	$(PORTPRINT_W)		\
 	$(PORTREGEX)		\
@@ -895,12 +966,6 @@
 include ../../Makefile.lib
 include ../../Makefile.lib.64
 
-# NOTE: libc_i18n.a will be part of libc.so.1.  Therefore, the compilation
-# conditions such as the settings of CFLAGS and CPPFLAGS for the libc_i18n stuff
-# need to be compatible with the ones for the libc stuff.  Whenever the changes
-# that affect the compilation conditions of libc happened, those for libc_i18n
-# also need to be updated.
-
 CFLAGS64 += $(CTF_FLAGS)
 
 # This is necessary to avoid problems with calling _ex_unwind().
@@ -918,7 +983,6 @@
 
 ALTPICS= $(TRACEOBJS:%=pics/%)
 
-$(DYNLIB) := PICS += $(ROOTFS_LIBDIR64)/libc_i18n.a
 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS)
 
 MAPFILES =	$(LIBCDIR)/port/mapfile-vers
@@ -979,6 +1043,7 @@
 	$(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c)			\
 	$(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c)			\
 	$(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c)		\
+	$(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c)		\
 	$(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c)		\
 	$(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c)		\
 	$(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c)		\
--- a/usr/src/lib/libc/i386/Makefile.com	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/i386/Makefile.com	Thu Sep 09 11:46:43 2010 -0400
@@ -21,6 +21,9 @@
 #
 # Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
 #
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
 
 LIBCDIR=	$(SRC)/lib/libc
 LIB_PIC=	libc_pic.a
@@ -688,11 +691,6 @@
 	wscanf.o
 
 PORTI18N=			\
-	__fgetwc_xpg5.o		\
-	__fgetws_xpg5.o		\
-	__fputwc_xpg5.o		\
-	__fputws_xpg5.o		\
-	__ungetwc_xpg5.o	\
 	getwchar.o		\
 	putwchar.o		\
 	putws.o			\
@@ -737,6 +735,7 @@
 	gettext_gnu.o		\
 	gettext_real.o		\
 	gettext_util.o		\
+	isdigit.o		\
 	plural_parser.o		\
 	wdresolve.o		\
 	_ctype.o		\
@@ -747,6 +746,77 @@
 	wcstol_longlong.o	\
 	wcstoul_longlong.o
 
+PORTLOCALE=			\
+	ascii.o			\
+	big5.o			\
+	btowc.o			\
+	collate.o		\
+	collcmp.o		\
+	euc.o			\
+	fnmatch.o		\
+	fgetwc.o		\
+	fgetws.o		\
+	fix_grouping.o		\
+	fputwc.o		\
+	fputws.o		\
+	fwide.o			\
+	gb18030.o		\
+	gb2312.o		\
+	gbk.o			\
+	getdate.o		\
+	iswctype.o		\
+	ldpart.o		\
+	lmessages.o		\
+	lnumeric.o		\
+	lmonetary.o		\
+	localeconv.o		\
+	mbftowc.o		\
+	mblen.o			\
+	mbrlen.o		\
+	mbrtowc.o		\
+	mbsinit.o		\
+	mbsnrtowcs.o		\
+	mbsrtowcs.o		\
+	mbstowcs.o		\
+	mbtowc.o		\
+	mskanji.o		\
+	nextwctype.o		\
+	nl_langinfo.o		\
+	none.o			\
+	regcomp.o		\
+	regfree.o		\
+	regerror.o		\
+	regexec.o		\
+	rune.o			\
+	runetype.o		\
+	setlocale.o		\
+	setrunelocale.o		\
+	strcoll.o		\
+	strfmon.o		\
+	strftime.o		\
+	strptime.o		\
+	strxfrm.o		\
+	table.o			\
+	timelocal.o		\
+	tolower.o		\
+	towlower.o		\
+	ungetwc.o		\
+	utf8.o			\
+	wcrtomb.o		\
+	wcscoll.o		\
+	wcsftime.o		\
+	wcsnrtombs.o		\
+	wcsrtombs.o		\
+	wcswidth.o		\
+	wcstombs.o		\
+	wcsxfrm.o		\
+	wctob.o			\
+	wctomb.o		\
+	wctrans.o		\
+	wctype.o		\
+	wcwidth.o		\
+	wscol.o
+
 AIOOBJS=			\
 	aio.o			\
 	aio_alloc.o		\
@@ -888,6 +958,7 @@
 	$(PORTGEN64)		\
 	$(PORTI18N)		\
 	$(PORTI18N_COND)	\
+	$(PORTLOCALE)		\
 	$(PORTPRINT)		\
 	$(PORTPRINT_C89)	\
 	$(PORTPRINT_W)		\
@@ -933,12 +1004,6 @@
 # include common library definitions
 include ../../Makefile.lib
 
-# NOTE: libc_i18n.a will be part of libc.so.1.  Therefore, the compilation
-# conditions such as the settings of CFLAGS and CPPFLAGS for the libc_i18n stuff
-# need to be compatible with the ones for the libc stuff.  Whenever the changes
-# that affect the compilation conditions of libc happened, those for libc_i18n
-# also need to be updated.
-
 # we need to override the default SONAME here because we might
 # be building a variant object (still libc.so.1, but different filename)
 SONAME = libc.so.1
@@ -961,7 +1026,6 @@
 
 ALTPICS= $(TRACEOBJS:%=pics/%)
 
-$(DYNLIB) := PICS += $(ROOTFS_LIBDIR)/libc_i18n.a
 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) \
 		$(EXTPICS) $(LDLIBS)
 
@@ -1037,6 +1101,7 @@
 	$(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c)			\
 	$(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c)			\
 	$(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c)		\
+	$(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c)		\
 	$(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c)		\
 	$(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c)		\
 	$(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c)		\
--- a/usr/src/lib/libc/inc/lint.h	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/inc/lint.h	Thu Sep 09 11:46:43 2010 -0400
@@ -31,6 +31,9 @@
 extern "C" {
 #endif
 
+/* we need the following to pick up _LP64 */
+#include <sys/feature_tests.h>
+
 /*
  * We must include "lint.h" as the first #include in all libc source files
  * for the purpose of running lint over libc, else lint errors occur due to
--- a/usr/src/lib/libc/inc/mbstatet.h	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/inc/mbstatet.h	Thu Sep 09 11:46:43 2010 -0400
@@ -24,17 +24,22 @@
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
 #ifndef	_MBSTATET_H
 #define	_MBSTATET_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
+/*
+ * This structure is totally opaque. The value mirrors wchar_impl.h.
+ */
 typedef struct __mbstate_t {
-	void	*__lc_locale;	/* pointer to _LC_locale_t */
-	void	*__state;		/* currently unused state flag */
-	char	__consumed[8];	/* 8 bytes */
-	char	__nconsumed;
-	char	__fill[7];
+#if defined(_LP64)
+        long    __filler[4];
+#else
+        int     __filler[6];
+#endif
 } __mbstate_t;
 
 #endif	/* _MBSTATET_H */
--- a/usr/src/lib/libc/inc/mse.h	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/inc/mse.h	Thu Sep 09 11:46:43 2010 -0400
@@ -23,12 +23,16 @@
  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
 
 #ifndef	_MSE_H
 #define	_MSE_H
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
+#include "lint.h"
+#include "file64.h"
 #include <stdio.h>
 #include <wchar.h>
 #include <string.h>
@@ -89,38 +93,10 @@
  * otherwise alter the orientation of a stream.
  */
 
-/*
- * libc_i18n provides the following functions:
- */
-extern int	_set_orientation_wide(FILE *, void **, void (*(*))(void), int);
-extern void	*__mbst_get_lc_and_fp(const mbstate_t *,
-    void (*(*))(void), int);
-/*
- * Above two functions take either FP_WCTOMB or FP_FGETWC for the integer
- * argument.
- */
-#define	FP_WCTOMB	0
-#define	FP_FGETWC	1
-
 #define	_SET_ORIENTATION_BYTE(iop) \
 { \
 	if (GET_NO_MODE(iop)) \
 		_setorientation(iop, _BYTE_MODE); \
 }
 
-/* The following is specified in the argument of _get_internal_mbstate() */
-#define	_MBRLEN		0
-#define	_MBRTOWC	1
-#define	_WCRTOMB	2
-#define	_MBSRTOWCS	3
-#define	_WCSRTOMBS	4
-#define	_MAX_MB_FUNC	_WCSRTOMBS
-
-extern void	_clear_internal_mbstate(void);
-extern mbstate_t	*_get_internal_mbstate(int);
-
-#define	MBSTATE_INITIAL(ps)	MBSTATE_RESTART(ps)
-#define	MBSTATE_RESTART(ps) \
-	(void) memset((void *)ps, 0, sizeof (mbstate_t))
-
 #endif	/* _MSE_H */
--- a/usr/src/lib/libc/port/gen/nss_common.c	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/port/gen/nss_common.c	Thu Sep 09 11:46:43 2010 -0400
@@ -61,7 +61,7 @@
 /*
  * PSARC/2005/133 updated the buffering mechanisms to handle
  * up to 2^64 buffering.  But sets a practical limit of 512*1024.
- * the expectation is the practical limit will be dynamic from
+ * The expectation is the practical limit will be dynamic from
  * nscd.  For now, set the group limit to this value.
  */
 
@@ -2286,7 +2286,7 @@
 
 /*
  * Internal private API to return default suggested buffer sizes
- * for nsswitch API requests
+ * for nsswitch API requests.
  */
 
 size_t
--- a/usr/src/lib/libc/port/i18n/__fgetwc_xpg5.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-#include "lint.h"
-#include "file64.h"
-#include "mse_int.h"
-#include "mtlib.h"
-#include <stdio.h>
-#include <widec.h>
-#include <euc.h>
-#include <errno.h>
-#include "stdiom.h"
-#include "mse.h"
-
-wint_t
-__fgetwc_xpg5(FILE *iop)
-{
-	wint_t	result;
-	void	*lc;
-	wint_t	(*fp_fgetwc)(void *, FILE *);
-	rmutex_t	*lk;
-
-	FLOCKFILE(lk, iop);
-
-	if (_set_orientation_wide(iop, &lc,
-	    (void (*(*))(void))&fp_fgetwc, FP_FGETWC) == -1) {
-		errno = EBADF;
-		FUNLOCKFILE(lk);
-		return (WEOF);
-	}
-
-	result = fp_fgetwc(lc, iop);
-	FUNLOCKFILE(lk);
-	return (result);
-}
-
-wint_t
-__getwc_xpg5(FILE *iop)
-{
-	return (__fgetwc_xpg5(iop));
-}
--- a/usr/src/lib/libc/port/i18n/__fgetws_xpg5.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/*	Copyright (c) 1986 AT&T	*/
-/*	  All Rights Reserved  	*/
-
-
-/*	This module is created for NLS on Sep.03.86		*/
-
-/*
- * Fgetws reads multibyte characters from the "iop", converts
- * them to process codes, and places them in the wchar_t
- * array pointed to by "ptr". Fgetws reads until n-1 process
- * codes are transferred to "ptr", or EOF.
- */
-
-#include "lint.h"
-#include "file64.h"
-#include "mse_int.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <widec.h>
-#include <errno.h>
-#include "mtlib.h"
-#include "stdiom.h"
-#include "libc.h"
-#include "mse.h"
-
-wchar_t *
-__fgetws_xpg5(wchar_t *ptr, int size, FILE *iop)
-{
-	wchar_t	*ptr0 = ptr;
-	int	c;
-	void	*lc;
-	wint_t	(*fp_fgetwc)(void *, FILE *);
-	rmutex_t	*lk;
-
-	FLOCKFILE(lk, iop);
-
-	if (_set_orientation_wide(iop, &lc,
-	    (void (*(*))(void))&fp_fgetwc, FP_FGETWC) == -1) {
-		errno = EBADF;
-		FUNLOCKFILE(lk);
-		return (NULL);
-	}
-
-	for (size--; size > 0; size--) {
-		if ((c = fp_fgetwc(lc, iop)) == EOF) {
-			if (ptr == ptr0) {
-				FUNLOCKFILE(lk);
-				return (NULL);
-			}
-			break;
-		}
-		*ptr++ = c;
-		if (c == '\n')
-			break;
-	}
-	*ptr = 0;
-	FUNLOCKFILE(lk);
-	return (ptr0);
-}
--- a/usr/src/lib/libc/port/i18n/__fputwc_xpg5.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/*	Copyright (c) 1986 AT&T	*/
-/*	  All Rights Reserved  	*/
-
-
-/*
- * Fputwc transforms the wide character c into the multibyte character,
- * and writes it onto the output stream "iop".
- */
-
-#include "lint.h"
-#include "file64.h"
-#include "mse_int.h"
-#include "mtlib.h"
-#include <stdlib.h>
-#include <stdio.h>
-#include <wchar.h>
-#include <limits.h>
-#include <errno.h>
-#include "stdiom.h"
-#include "mse.h"
-
-wint_t
-__fputwc_xpg5(wint_t wc, FILE *iop)
-{
-	char	mbs[MB_LEN_MAX];
-	unsigned char	*p;
-	int	n;
-	void	*lc;
-	int	(*fp_wctomb)(void *, char *, wchar_t);
-	rmutex_t	*lk;
-
-	FLOCKFILE(lk, iop);
-
-	if (_set_orientation_wide(iop, &lc,
-	    (void (*(*))(void))&fp_wctomb, FP_WCTOMB) == -1) {
-		errno = EBADF;
-		FUNLOCKFILE(lk);
-		return (WEOF);
-	}
-
-	if (wc == WEOF) {
-		FUNLOCKFILE(lk);
-		return (WEOF);
-	}
-	n = fp_wctomb(lc, mbs, (wchar_t)wc);
-	if (n <= 0) {
-		FUNLOCKFILE(lk);
-		return (WEOF);
-	}
-	p = (unsigned char *)mbs;
-	while (n--) {
-		/* Can wide I/O functions call byte I/O functions */
-		/* because a steam bound to WIDE should not be used */
-		/* by byte I/O functions ? */
-		/* Anyway, I assume PUTC() macro has appropriate */
-		/* definition here. */
-		if (PUTC((*p++), iop) == EOF) {
-			FUNLOCKFILE(lk);
-			return (WEOF);
-		}
-	}
-	FUNLOCKFILE(lk);
-	return (wc);
-}
-
-wint_t
-__putwc_xpg5(wint_t wc, FILE *iop)
-{
-	return (__fputwc_xpg5(wc, iop));
-}
--- a/usr/src/lib/libc/port/i18n/__fputws_xpg5.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-/*	Copyright (c) 1986 AT&T	*/
-/*	  All Rights Reserved  	*/
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/*
- * fputws transforms the process code string pointed to by "ptr"
- * into a byte string, and writes the string to the named
- * output "iop".
- *
- * Use an intermediate buffer to transform a string from wchar_t to
- * multibyte char.  In order to not overflow the intermediate buffer,
- * impose a limit on the length of string to output to PC_MAX process
- * codes.  If the input string exceeds PC_MAX process codes, process
- * the string in a series of smaller buffers.
- */
-
-#include "lint.h"
-#include "file64.h"
-#include "mse_int.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <widec.h>
-#include <macros.h>
-#include <errno.h>
-#include "libc.h"
-#include "stdiom.h"
-#include "mse.h"
-
-#define	PC_MAX 		256
-#define	MBBUFLEN	(PC_MAX * MB_LEN_MAX)
-
-int
-__fputws_xpg5(const wchar_t *ptr, FILE *iop)
-{
-	int	pcsize, ret;
-	ssize_t	pclen, pccnt;
-	int	nbytes, i;
-	char	mbbuf[MBBUFLEN], *mp;
-	void	*lc;
-	int	(*fp_wctomb)(void *, char *, wchar_t);
-	rmutex_t	*lk;
-
-	FLOCKFILE(lk, iop);
-
-	if (_set_orientation_wide(iop, &lc,
-	    (void (*(*))(void))&fp_wctomb, FP_WCTOMB) == -1) {
-		errno = EBADF;
-		FUNLOCKFILE(lk);
-		return (EOF);
-	}
-
-	pclen = pccnt = wcslen(ptr);
-	while (pclen > 0) {
-		pcsize = (int)min(pclen, PC_MAX - 1);
-		nbytes = 0;
-		for (i = 0, mp = mbbuf; i < pcsize; i++, mp += ret) {
-			if ((ret = fp_wctomb(lc, mp, *ptr++)) == -1) {
-				FUNLOCKFILE(lk);
-				return (EOF);
-			}
-			nbytes += ret;
-		}
-		*mp = '\0';
-		/*
-		 * In terms of locking, since libc is using rmutex_t
-		 * for locking iop, we can call fputs() with iop that
-		 * has been already locked.
-		 * But again,
-		 * can wide I/O functions call byte I/O functions
-		 * because a steam bound to WIDE should not be used
-		 * by byte I/O functions ?
-		 */
-		if (fputs(mbbuf, iop) != nbytes) {
-			FUNLOCKFILE(lk);
-			return (EOF);
-		}
-		pclen -= pcsize;
-	}
-	FUNLOCKFILE(lk);
-	if (pccnt <= INT_MAX)
-		return ((int)pccnt);
-	else
-		return (EOF);
-}
--- a/usr/src/lib/libc/port/i18n/__ungetwc_xpg5.c	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
- * Use is subject to license terms.
- */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
-/*	Copyright (c) 1986 AT&T	*/
-/*	  All Rights Reserved  	*/
-
-
-/*	This module is created for NLS on Sep.03.86		*/
-
-/*
- * Ungetwc saves the process code c into the one character buffer
- * associated with an input stream "iop". That character, c,
- * will be returned by the next getwc call on that stream.
- */
-
-#include "lint.h"
-#include "file64.h"
-#include "mse_int.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <widec.h>
-#include <limits.h>
-#include <errno.h>
-#include "libc.h"
-#include "stdiom.h"
-#include "mse.h"
-
-wint_t
-__ungetwc_xpg5(wint_t wc, FILE *iop)
-{
-	char	mbs[MB_LEN_MAX];
-	unsigned char	*p;
-	int	n;
-	void	*lc;
-	int	(*fp_wctomb)(void *, char *, wchar_t);
-	rmutex_t	*lk;
-
-	FLOCKFILE(lk, iop);
-
-	if (_set_orientation_wide(iop, &lc,
-	    (void (*(*))(void))&fp_wctomb, FP_WCTOMB) == -1) {
-		errno = EBADF;
-		FUNLOCKFILE(lk);
-		return (WEOF);
-	}
-
-	if ((wc == WEOF) || ((iop->_flag & _IOREAD) == 0)) {
-		FUNLOCKFILE(lk);
-		return (WEOF);
-	}
-
-	n = fp_wctomb(lc, mbs, (wchar_t)wc);
-	if (n <= 0) {
-		FUNLOCKFILE(lk);
-		return (WEOF);
-	}
-
-	if (iop->_ptr <= iop->_base) {
-		if (iop->_base == NULL) {
-			FUNLOCKFILE(lk);
-			return (WEOF);
-		}
-		if (iop->_ptr == iop->_base && iop->_cnt == 0) {
-			++iop->_ptr;
-		} else if ((iop->_ptr - n) < (iop->_base - PUSHBACK)) {
-			FUNLOCKFILE(lk);
-			return (WEOF);
-		}
-	}
-
-	p = (unsigned char *)(mbs + n - 1);
-	while (n--) {
-		*--(iop)->_ptr = (*p--);
-		++(iop)->_cnt;
-	}
-	iop->_flag &= ~_IOEOF;
-	FUNLOCKFILE(lk);
-	return (wc);
-}
--- a/usr/src/lib/libc/port/i18n/_ctype.c	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/port/i18n/_ctype.c	Thu Sep 09 11:46:43 2010 -0400
@@ -24,11 +24,14 @@
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
 /*	Copyright (c) 1988 AT&T	*/
 /*	  All Rights Reserved  	*/
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #pragma weak _ctype = __ctype
 
 #include "lint.h"
@@ -37,6 +40,79 @@
 #include <ctype.h>
 #include <sys/types.h>
 
+unsigned char __ctype_C[SZ_TOTAL] =
+{
+	0, /* EOF */
+	_C,	_C,	_C,	_C,	_C,	_C,	_C,	_C,
+	_C,	_S|_C,	_S|_C,	_S|_C,	_S|_C,	_S|_C,	_C,	_C,
+	_C,	_C,	_C,	_C,	_C,	_C,	_C,	_C,
+	_C,	_C,	_C,	_C,	_C,	_C,	_C,	_C,
+	_S|_B,	_P,	_P,	_P,	_P,	_P,	_P,	_P,
+	_P,	_P,	_P,	_P,	_P,	_P,	_P,	_P,
+	_N|_X,	_N|_X,	_N|_X,	_N|_X,	_N|_X,	_N|_X,	_N|_X,	_N|_X,
+	_N|_X,	_N|_X,	_P,	_P,	_P,	_P,	_P,	_P,
+	_P,	_U|_X,	_U|_X,	_U|_X,	_U|_X,	_U|_X,	_U|_X,	_U,
+	_U,	_U,	_U,	_U,	_U,	_U,	_U,	_U,
+	_U,	_U,	_U,	_U,	_U,	_U,	_U,	_U,
+	_U,	_U,	_U,	_P,	_P,	_P,	_P,	_P,
+	_P,	_L|_X,	_L|_X,	_L|_X,	_L|_X,	_L|_X,	_L|_X,	_L,
+	_L,	_L,	_L,	_L,	_L,	_L,	_L,	_L,
+	_L,	_L,	_L,	_L,	_L,	_L,	_L,	_L,
+	_L,	_L,	_L,	_P,	_P,	_P,	_P,	_C,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+
+/* tolower()  and toupper() conversion table */	0,
+	0,	1,	2,	3,	4,	5,	6,	7,
+	8,	9,	10,	11,	12,	13,	14,	15,
+	16,	17,	18,	19,	20,	21,	22,	23,
+	24,	25,	26,	27,	28,	29,	30,	31,
+	32,	33,	34,	35,	36,	37,	38,	39,
+	40,	41,	42,	43,	44,	45,	46,	47,
+	48,	49,	50,	51,	52,	53,	54,	55,
+	56,	57,	58,	59,	60,	61,	62,	63,
+	64,	97,	98,	99,	100,	101,	102,	103,
+	104,	105,	106,	107,	108,	109,	110,	111,
+	112,	113,	114,	115,	116,	117,	118,	119,
+	120,	121,	122,	91,	92,	93,	94,	95,
+	96,	65,	66,	67,	68,	69,	70,	71,
+	72,	73,	74,	75,	76,	77,	78,	79,
+	80,	81,	82,	83,	84,	85,	86,	87,
+	88,	89,	90,	123,	124,	125,	126,	127,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+	0,	0,	0,	0,	0,	0,	0,	0,
+/* CSWIDTH information */
+	1,	0,	0,	1,	0,	0,	1,
+};
+
 unsigned char __ctype[SZ_TOTAL] =
 {
 	0, /* EOF */
--- a/usr/src/lib/libc/port/i18n/getwchar.c	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/port/i18n/getwchar.c	Thu Sep 09 11:46:43 2010 -0400
@@ -23,8 +23,10 @@
  * Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
 
 /*	Copyright (c) 1986 AT&T	*/
 /*	  All Rights Reserved  	*/
@@ -48,7 +50,7 @@
 wint_t
 getwchar(void)
 {
-	return (_getwc(stdin));
+	return (getwc(stdin));
 }
 
 wint_t
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/i18n/isdigit.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,159 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * This file contains the implementation of various functional forms
+ * of the ctype tests, specifically the required by ISO C.  These are defined
+ * in the "C" (POSIX) locale.
+ */
+
+#include "lint.h"
+#include <ctype.h>
+
+/*
+ * We are supplying functional forms, so make sure to suppress any macros
+ * we might have imported.
+ */
+
+#ifdef isblank
+#undef isblank
+#endif
+
+int
+isblank(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISBLANK));
+}
+
+#ifdef isupper
+#undef isupper
+#endif
+
+int
+isupper(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISUPPER));
+}
+
+#ifdef islower
+#undef islower
+#endif
+
+int
+islower(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISLOWER));
+}
+
+#ifdef isdigit
+#undef isdigit
+#endif
+
+int
+isdigit(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISDIGIT));
+}
+
+#ifdef isxdigit
+#undef isxdigit
+#endif
+
+int
+isxdigit(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISXDIGIT));
+}
+
+#ifdef isalpha
+#undef isalpha
+#endif
+
+int
+isalpha(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISALPHA));
+}
+
+#ifdef isalnum
+#undef isalnum
+#endif
+
+int
+isalnum(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISALNUM));
+}
+
+#ifdef isspace
+#undef isspace
+#endif
+
+int
+isspace(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISSPACE));
+}
+
+#ifdef iscntrl
+#undef iscntrl
+#endif
+
+int
+iscntrl(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISCNTRL));
+}
+
+#ifdef isgraph
+#undef isgraph
+#endif
+
+int
+isgraph(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISGRAPH));
+}
+
+#ifdef ispunct
+#undef ispunct
+#endif
+
+int
+ispunct(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISPUNCT));
+}
+
+#ifdef isprint
+#undef isprint
+#endif
+
+int
+isprint(int c)
+{
+	return (((unsigned)c > 255) ? 0 : (__ctype_mask[c] & _ISPRINT));
+}
--- a/usr/src/lib/libc/port/llib-lc	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/port/llib-lc	Thu Sep 09 11:46:43 2010 -0400
@@ -1773,3 +1773,7 @@
 extern int u8_strcmp(const char *, const char *, size_t, int, size_t, int *);
 extern size_t u8_textprep_str(char *, size_t *, char *, size_t *, int, size_t,
 	int *);
+
+/* private locale interfaces */
+wint_t __nextwctype(wint_t, wctype_t);
+int __iswrune(wint_t);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/_ctype.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef __CTYPE_H_
+#define	__CTYPE_H_
+
+/*
+ * Please take careful note.  It turns out that the _ISxxx macros
+ * occupy the lower order byte, except for _ISGRAPH, _ISALPHA, and _ISPRINT.
+ * Those occupt 0x2000, 0x4000, and 0x8000.  Now, noting *very* carefully,
+ * it turns out that this leaves some gaps in the extended bits, which
+ * are occupied by _E1 = phonogram, _E2 = ideogram, and _E3 = English.
+ * The *other* _Ex bits are reserved.  We don't think these higher order
+ * bits are baked into applications (because they haven't been used before),
+ * so we believe it is safe to reuse them how we see fit.
+ *
+ * This makes it possible to define a single space which overlaps both the
+ * wctype types, and the ctype types.
+ */
+
+#define	_CTYPE_A	_ISALPHA		/* Alpha */
+#define	_CTYPE_C	_ISCNTRL		/* Control */
+#define	_CTYPE_D	_ISDIGIT		/* Digit */
+#define	_CTYPE_G	_ISGRAPH		/* Graph */
+#define	_CTYPE_L	_ISLOWER		/* Lower */
+#define	_CTYPE_P	_ISPUNCT		/* Punct */
+#define	_CTYPE_S	_ISSPACE		/* Space */
+#define	_CTYPE_U	_ISUPPER		/* Upper */
+#define	_CTYPE_X	_ISXDIGIT		/* X digit */
+#define	_CTYPE_B	_ISBLANK		/* Blank */
+#define	_CTYPE_R	_ISPRINT		/* Print */
+
+#define	_CTYPE_Q	_E1			/* Phonogram */
+#define	_CTYPE_I	_E2			/* Ideogram */
+#define	_CTYPE_E	_E3			/* English (Solaris) */
+#define	_CTYPE_N	_E4			/* Number  */
+#define	_CTYPE_T	_E5			/* Special */
+
+/* These high order bits were never used for anything at all. */
+#define	_CTYPE_SW0	0x20000000U		/* 0 width character */
+#define	_CTYPE_SW1	0x40000000U		/* 1 width character */
+#define	_CTYPE_SW2	0x80000000U		/* 2 width character */
+#define	_CTYPE_SW3	0xc0000000U		/* 3 width character */
+#define	_CTYPE_SWM	0xe0000000U		/* Mask for screen width data */
+#define	_CTYPE_SWS	30			/* Bits to shift to get width */
+
+unsigned int	___runetype(int);
+
+#endif /* !__CTYPE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/ascii.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,198 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved.
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <sys/types.h>
+#include <errno.h>
+#include <limits.h>
+#include "runetype.h"
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <note.h>
+#include "mblocal.h"
+
+static size_t	_ascii_mbrtowc(wchar_t *_RESTRICT_KYWD,
+		    const char *_RESTRICT_KYWD,
+		    size_t, mbstate_t *_RESTRICT_KYWD);
+static int	_ascii_mbsinit(const mbstate_t *);
+static size_t	_ascii_mbsnrtowcs(wchar_t *_RESTRICT_KYWD dst,
+		    const char **_RESTRICT_KYWD src, size_t nms, size_t len,
+		    mbstate_t *_RESTRICT_KYWD ps);
+static size_t	_ascii_wcrtomb(char *_RESTRICT_KYWD, wchar_t,
+		    mbstate_t *_RESTRICT_KYWD);
+static size_t	_ascii_wcsnrtombs(char *_RESTRICT_KYWD,
+		    const wchar_t **_RESTRICT_KYWD,
+		    size_t, size_t, mbstate_t *_RESTRICT_KYWD);
+
+int
+_ascii_init(_RuneLocale *rl)
+{
+
+	__mbrtowc = _ascii_mbrtowc;
+	__mbsinit = _ascii_mbsinit;
+	__mbsnrtowcs = _ascii_mbsnrtowcs;
+	__wcrtomb = _ascii_wcrtomb;
+	__wcsnrtombs = _ascii_wcsnrtombs;
+	_CurrentRuneLocale = rl;
+	__ctype[520] = 1;
+	charset_is_ascii = 1;
+	return (0);
+}
+
+static int
+_ascii_mbsinit(const mbstate_t *ps)
+{
+	_NOTE(ARGUNUSED(ps));
+	/*
+	 * Encoding is not state dependent - we are always in the
+	 * initial state.
+	 */
+	return (1);
+}
+
+static size_t
+_ascii_mbrtowc(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s,
+    size_t n, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_NOTE(ARGUNUSED(ps));
+	if (s == NULL)
+		/* Reset to initial shift state (no-op) */
+		return (0);
+	if (n == 0)
+		/* Incomplete multibyte sequence */
+		return ((size_t)-2);
+	if (*s & 0x80) {
+		errno = EILSEQ;
+		return ((size_t)-1);
+	}
+	if (pwc != NULL)
+		*pwc = (unsigned char)*s;
+	return (*s == '\0' ? 0 : 1);
+}
+
+static size_t
+_ascii_wcrtomb(char *_RESTRICT_KYWD s, wchar_t wc,
+    mbstate_t *_RESTRICT_KYWD ps)
+{
+	_NOTE(ARGUNUSED(ps));
+
+	if (s == NULL)
+		/* Reset to initial shift state (no-op) */
+		return (1);
+	if (wc < 0 || wc > 127) {
+		errno = EILSEQ;
+		return ((size_t)-1);
+	}
+	*s = (unsigned char)wc;
+	return (1);
+}
+
+static size_t
+_ascii_mbsnrtowcs(wchar_t *_RESTRICT_KYWD dst, const char **_RESTRICT_KYWD src,
+    size_t nms, size_t len, mbstate_t *_RESTRICT_KYWD ps)
+{
+	const char *s;
+	size_t nchr;
+
+	_NOTE(ARGUNUSED(ps));
+
+	if (dst == NULL) {
+		for (s = *src; nms > 0 && *s != '\0'; s++, nms--) {
+			if (*s & 0x80) {
+				errno = EILSEQ;
+				return ((size_t)-1);
+			}
+		}
+		return (s - *src);
+	}
+
+	s = *src;
+	nchr = 0;
+	while (len-- > 0 && nms-- > 0) {
+		if (*s & 0x80) {
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		if ((*dst++ = (unsigned char)*s++) == L'\0') {
+			*src = NULL;
+			return (nchr);
+		}
+		nchr++;
+	}
+	*src = s;
+	return (nchr);
+}
+
+static size_t
+_ascii_wcsnrtombs(char *_RESTRICT_KYWD dst, const wchar_t **_RESTRICT_KYWD src,
+    size_t nwc, size_t len, mbstate_t *_RESTRICT_KYWD ps)
+{
+	const wchar_t *s;
+	size_t nchr;
+
+	_NOTE(ARGUNUSED(ps));
+
+	if (dst == NULL) {
+		for (s = *src; nwc > 0 && *s != L'\0'; s++, nwc--) {
+			if (*s < 0 || *s > 127) {
+				errno = EILSEQ;
+				return ((size_t)-1);
+			}
+		}
+		return (s - *src);
+	}
+
+	s = *src;
+	nchr = 0;
+	while (len-- > 0 && nwc-- > 0) {
+		if (*s < 0 || *s > 127) {
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		if ((*dst++ = *s++) == '\0') {
+			*src = NULL;
+			return (nchr);
+		}
+		nchr++;
+	}
+	*src = s;
+	return (nchr);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/big5.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,174 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved.
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <sys/types.h>
+#include <errno.h>
+#include "runetype.h"
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+static size_t	_BIG5_mbrtowc(wchar_t *_RESTRICT_KYWD,
+		    const char *_RESTRICT_KYWD,
+		    size_t, mbstate_t *RESTRICT_KYWD);
+static int	_BIG5_mbsinit(const mbstate_t *);
+static size_t	_BIG5_wcrtomb(char *_RESTRICT_KYWD, wchar_t,
+		    mbstate_t *_RESTRICT_KYWD);
+
+typedef struct {
+	wchar_t	ch;
+} _BIG5State;
+
+int
+_BIG5_init(_RuneLocale *rl)
+{
+
+	__mbrtowc = _BIG5_mbrtowc;
+	__wcrtomb = _BIG5_wcrtomb;
+	__mbsinit = _BIG5_mbsinit;
+	_CurrentRuneLocale = rl;
+	__ctype[520] = 2;
+	charset_is_ascii = 0;
+	return (0);
+}
+
+static int
+_BIG5_mbsinit(const mbstate_t *ps)
+{
+
+	return (ps == NULL || ((const _BIG5State *)ps)->ch == 0);
+}
+
+static int
+_big5_check(uint_t c)
+{
+
+	c &= 0xff;
+	return ((c >= 0xa1 && c <= 0xfe) ? 2 : 1);
+}
+
+static size_t
+_BIG5_mbrtowc(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s,
+    size_t n, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_BIG5State *bs;
+	wchar_t wc;
+	size_t len;
+
+	bs = (_BIG5State *)ps;
+
+	if ((bs->ch & ~0xFF) != 0) {
+		/* Bad conversion state. */
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL) {
+		s = "";
+		n = 1;
+		pwc = NULL;
+	}
+
+	if (n == 0)
+		/* Incomplete multibyte sequence */
+		return ((size_t)-2);
+
+	if (bs->ch != 0) {
+		if (*s == '\0') {
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		wc = (bs->ch << 8) | (*s & 0xFF);
+		if (pwc != NULL)
+			*pwc = wc;
+		bs->ch = 0;
+		return (1);
+	}
+
+	len = (size_t)_big5_check(*s);
+	wc = *s++ & 0xff;
+	if (len == 2) {
+		if (n < 2) {
+			/* Incomplete multibyte sequence */
+			bs->ch = wc;
+			return ((size_t)-2);
+		}
+		if (*s == '\0') {
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		wc = (wc << 8) | (*s++ & 0xff);
+		if (pwc != NULL)
+			*pwc = wc;
+		return (2);
+	} else {
+		if (pwc != NULL)
+			*pwc = wc;
+		return (wc == L'\0' ? 0 : 1);
+	}
+}
+
+static size_t
+_BIG5_wcrtomb(char *_RESTRICT_KYWD s, wchar_t wc, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_BIG5State *bs;
+
+	bs = (_BIG5State *)ps;
+
+	if (bs->ch != 0) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL)
+		/* Reset to initial shift state (no-op) */
+		return (1);
+	if (wc & 0x8000) {
+		*s++ = (wc >> 8) & 0xff;
+		*s = wc & 0xff;
+		return (2);
+	}
+	*s = wc & 0xff;
+	return (1);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/btowc.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 2002, 2003 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <stdio.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+wint_t
+btowc(int c)
+{
+	static const mbstate_t initial = { 0 };
+	mbstate_t mbs = initial;
+	char cc;
+	wchar_t wc;
+
+	if (c == EOF)
+		return (WEOF);
+	/*
+	 * We expect mbrtowc() to return 0 or 1, hence the check for n > 1
+	 * which detects error return values as well as "impossible" byte
+	 * counts.
+	 */
+	cc = (char)c;
+	if (__mbrtowc(&wc, &cc, 1, &mbs) > 1)
+		return (WEOF);
+	return (wc);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/cname.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,135 @@
+/*
+ * Copyright (c) 1992, 1993, 1994 Henry Spencer.
+ * Copyright (c) 1992, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Henry Spencer.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/* character-name table */
+static struct cname {
+	char *name;
+	char code;
+} cnames[] = {
+	{"NUL",			'\0'},
+	{"SOH",			'\001'},
+	{"STX",			'\002'},
+	{"ETX",			'\003'},
+	{"EOT",			'\004'},
+	{"ENQ",			'\005'},
+	{"ACK",			'\006'},
+	{"BEL",			'\007'},
+	{"alert",		'\007'},
+	{"BS",			'\010'},
+	{"backspace",		'\b'},
+	{"HT",			'\011'},
+	{"tab",			'\t'},
+	{"LF",			'\012'},
+	{"newline",		'\n'},
+	{"VT",			'\013'},
+	{"vertical-tab",	'\v'},
+	{"FF",			'\014'},
+	{"form-feed",		'\f'},
+	{"CR",			'\015'},
+	{"carriage-return",	'\r'},
+	{"SO",			'\016'},
+	{"SI",			'\017'},
+	{"DLE",			'\020'},
+	{"DC1",			'\021'},
+	{"DC2",			'\022'},
+	{"DC3",			'\023'},
+	{"DC4",			'\024'},
+	{"NAK",			'\025'},
+	{"SYN",			'\026'},
+	{"ETB",			'\027'},
+	{"CAN",			'\030'},
+	{"EM",			'\031'},
+	{"SUB",			'\032'},
+	{"ESC",			'\033'},
+	{"IS4",			'\034'},
+	{"FS",			'\034'},
+	{"IS3",			'\035'},
+	{"GS",			'\035'},
+	{"IS2",			'\036'},
+	{"RS",			'\036'},
+	{"IS1",			'\037'},
+	{"US",			'\037'},
+	{"space",		' '},
+	{"exclamation-mark",	'!'},
+	{"quotation-mark",	'"'},
+	{"number-sign",		'#'},
+	{"dollar-sign",		'$'},
+	{"percent-sign",	'%'},
+	{"ampersand",		'&'},
+	{"apostrophe",		'\''},
+	{"left-parenthesis",	'('},
+	{"right-parenthesis",	')'},
+	{"asterisk",		'*'},
+	{"plus-sign",		'+'},
+	{"comma",		','},
+	{"hyphen",		'-'},
+	{"hyphen-minus",	'-'},
+	{"period",		'.'},
+	{"full-stop",		'.'},
+	{"slash",		'/'},
+	{"solidus",		'/'},
+	{"zero",		'0'},
+	{"one",			'1'},
+	{"two",			'2'},
+	{"three",		'3'},
+	{"four",		'4'},
+	{"five",		'5'},
+	{"six",			'6'},
+	{"seven",		'7'},
+	{"eight",		'8'},
+	{"nine",		'9'},
+	{"colon",		':'},
+	{"semicolon",		';'},
+	{"less-than-sign",	'<'},
+	{"equals-sign",		'='},
+	{"greater-than-sign",	'>'},
+	{"question-mark",	'?'},
+	{"commercial-at",	'@'},
+	{"left-square-bracket",	'['},
+	{"backslash",		'\\'},
+	{"reverse-solidus",	'\\'},
+	{"right-square-bracket", ']'},
+	{"circumflex",		'^'},
+	{"circumflex-accent",	'^'},
+	{"underscore",		'_'},
+	{"low-line",		'_'},
+	{"grave-accent",	'`'},
+	{"left-brace",		'{'},
+	{"left-curly-bracket",	'{'},
+	{"vertical-line",	'|'},
+	{"right-brace",		'}'},
+	{"right-curly-bracket",	'}'},
+	{"tilde",		'~'},
+	{"DEL",	'\177'},
+	{NULL,	0}
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/collate.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,251 @@
+/*
+ * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
+ *		at Electronni Visti IA, Kiev, Ukraine.
+ *			All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ */
+
+#include "lint.h"
+#include "file64.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <unistd.h>
+#include <sysexits.h>
+#include <netinet/in.h>
+
+#include "collate.h"
+#include "setlocale.h"
+#include "ldpart.h"
+
+int __collate_load_error = 1;
+int __collate_substitute_nontrivial;
+
+char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN];
+struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1];
+struct __collate_st_chain_pri *__collate_chain_pri_table;
+
+int
+__collate_load_tables(const char *encoding)
+{
+	FILE *fp;
+	int i, saverr, chains;
+	uint32_t u32;
+	char strbuf[STR_LEN], buf[PATH_MAX];
+	void *TMP_substitute_table, *TMP_char_pri_table, *TMP_chain_pri_table;
+	static char collate_encoding[ENCODING_LEN + 1];
+
+	/* 'encoding' must be already checked. */
+	if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) {
+		__collate_load_error = 1;
+		return (_LDP_CACHE);
+	}
+
+	/*
+	 * If the locale name is the same as our cache, use the cache.
+	 */
+	if (strcmp(encoding, collate_encoding) == 0) {
+		__collate_load_error = 0;
+		return (_LDP_CACHE);
+	}
+
+	/*
+	 * Slurp the locale file into the cache.
+	 */
+
+	(void) snprintf(buf, sizeof (buf), "%s/%s/LC_COLLATE/LCL_DATA",
+	    _PathLocale, encoding);
+
+	if ((fp = fopen(buf, "r")) == NULL)
+		return (_LDP_ERROR);
+
+	if (fread(strbuf, sizeof (strbuf), 1, fp) != 1) {
+		saverr = errno;
+		(void) fclose(fp);
+		errno = saverr;
+		return (_LDP_ERROR);
+	}
+	chains = -1;
+	if (strcmp(strbuf, COLLATE_VERSION) == 0)
+		chains = 0;
+	else if (strcmp(strbuf, COLLATE_VERSION1_2) == 0)
+		chains = 1;
+	if (chains < 0) {
+		(void) fclose(fp);
+		errno = EINVAL;
+		return (_LDP_ERROR);
+	}
+	if (chains) {
+		if (fread(&u32, sizeof (u32), 1, fp) != 1) {
+			saverr = errno;
+			(void) fclose(fp);
+			errno = saverr;
+			return (_LDP_ERROR);
+		}
+		if ((chains = (int)ntohl(u32)) < 1) {
+			(void) fclose(fp);
+			errno = EINVAL;
+			return (_LDP_ERROR);
+		}
+	} else
+		chains = TABLE_SIZE;
+
+	if ((TMP_substitute_table =
+	    malloc(sizeof (__collate_substitute_table))) == NULL) {
+		saverr = errno;
+		(void) fclose(fp);
+		errno = saverr;
+		return (_LDP_ERROR);
+	}
+	if ((TMP_char_pri_table =
+	    malloc(sizeof (__collate_char_pri_table))) == NULL) {
+		saverr = errno;
+		free(TMP_substitute_table);
+		(void) fclose(fp);
+		errno = saverr;
+		return (_LDP_ERROR);
+	}
+	if ((TMP_chain_pri_table =
+	    malloc(sizeof (*__collate_chain_pri_table) * chains)) == NULL) {
+		saverr = errno;
+		free(TMP_substitute_table);
+		free(TMP_char_pri_table);
+		(void) fclose(fp);
+		errno = saverr;
+		return (_LDP_ERROR);
+	}
+
+#define	FREAD(a, b, c, d) \
+{ \
+	if (fread(a, b, c, d) != c) { \
+		saverr = errno; \
+		free(TMP_substitute_table); \
+		free(TMP_char_pri_table); \
+		free(TMP_chain_pri_table); \
+		(void) fclose(d); \
+		errno = saverr; \
+		return (_LDP_ERROR); \
+	} \
+}
+
+	FREAD(TMP_substitute_table, sizeof (__collate_substitute_table), 1, fp);
+	FREAD(TMP_char_pri_table, sizeof (__collate_char_pri_table), 1, fp);
+	FREAD(TMP_chain_pri_table,
+	    sizeof (*__collate_chain_pri_table), chains, fp);
+	(void) fclose(fp);
+
+	(void) strcpy(collate_encoding, encoding);
+	if (__collate_substitute_table_ptr != NULL)
+		free(__collate_substitute_table_ptr);
+	__collate_substitute_table_ptr = TMP_substitute_table;
+	if (__collate_char_pri_table_ptr != NULL)
+		free(__collate_char_pri_table_ptr);
+	__collate_char_pri_table_ptr = TMP_char_pri_table;
+	for (i = 0; i < UCHAR_MAX + 1; i++) {
+		__collate_char_pri_table[i].prim =
+		    ntohl(__collate_char_pri_table[i].prim);
+		__collate_char_pri_table[i].sec =
+		    ntohl(__collate_char_pri_table[i].sec);
+	}
+	if (__collate_chain_pri_table != NULL)
+		free(__collate_chain_pri_table);
+	__collate_chain_pri_table = TMP_chain_pri_table;
+	for (i = 0; i < chains; i++) {
+		__collate_chain_pri_table[i].prim =
+		    ntohl(__collate_chain_pri_table[i].prim);
+		__collate_chain_pri_table[i].sec =
+		    ntohl(__collate_chain_pri_table[i].sec);
+	}
+	__collate_substitute_nontrivial = 0;
+	for (i = 0; i < UCHAR_MAX + 1; i++) {
+		if (__collate_substitute_table[i][0] != i ||
+		    __collate_substitute_table[i][1] != 0) {
+			__collate_substitute_nontrivial = 1;
+			break;
+		}
+	}
+	__collate_load_error = 0;
+
+	return (_LDP_LOADED);
+}
+
+char *
+__collate_substitute(const char *str)
+{
+	int dest_len, len, nlen;
+	int delta;
+	char *dest_str = NULL;
+	uchar_t *s = (uchar_t *)str;
+
+	if (s == NULL || *s == '\0') {
+		return (strdup(""));
+	}
+
+	delta = strlen(str);
+	delta += delta / 8;
+	dest_str = malloc(dest_len = delta);
+	if (dest_str == NULL)
+		return (NULL);
+	len = 0;
+	while (*s) {
+		nlen = len + strlen(__collate_substitute_table[*s]);
+		if (dest_len <= nlen) {
+			char *new_str;
+			new_str = realloc(dest_str, dest_len = nlen + delta);
+			if (new_str == NULL) {
+				free(dest_str);
+				return (NULL);
+			}
+			dest_str = new_str;
+		}
+		(void) strcpy(dest_str + len,
+		    (char *)__collate_substitute_table[*s++]);
+		len = nlen;
+	}
+	return (dest_str);
+}
+
+void
+__collate_lookup(const char *t, int *len, int *prim, int *sec)
+{
+	struct __collate_st_chain_pri *p2;
+
+	*len = 1;
+	*prim = *sec = 0;
+	for (p2 = __collate_chain_pri_table; p2->str[0] != '\0'; p2++) {
+		if (*t == p2->str[0] &&
+		    strncmp(t, (char *)p2->str, strlen((char *)p2->str)) == 0) {
+			*len = strlen((char *)p2->str);
+			*prim = p2->prim;
+			*sec = p2->sec;
+			return;
+		}
+	}
+	*prim = __collate_char_pri_table[(uchar_t)*t].prim;
+	*sec = __collate_char_pri_table[(uchar_t)*t].sec;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/collate.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,61 @@
+/*
+ * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
+ *		at Electronni Visti IA, Kiev, Ukraine.
+ *			All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _COLLATE_H_
+#define	_COLLATE_H_
+
+#include <sys/types.h>
+#include <limits.h>
+
+#define	STR_LEN 10
+#define	TABLE_SIZE 100
+#define	COLLATE_VERSION    "1.0\n"
+#define	COLLATE_VERSION1_2 "1.2\n"
+
+struct __collate_st_char_pri {
+	int prim, sec;
+};
+struct __collate_st_chain_pri {
+	char str[STR_LEN];
+	int prim, sec;
+};
+
+extern int __collate_load_error;
+extern int __collate_substitute_nontrivial;
+
+#define	__collate_substitute_table (*__collate_substitute_table_ptr)
+extern char __collate_substitute_table[UCHAR_MAX + 1][STR_LEN];
+#define	__collate_char_pri_table (*__collate_char_pri_table_ptr)
+extern struct __collate_st_char_pri __collate_char_pri_table[UCHAR_MAX + 1];
+extern struct __collate_st_chain_pri *__collate_chain_pri_table;
+
+char	*__collate_substitute(const char *);
+int	__collate_load_tables(const char *);
+void	__collate_lookup(const char *, int *, int *, int *);
+int	__collate_range_cmp(int, int);
+
+#endif /* !_COLLATE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/collcmp.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 1996 by Andrey A. Chernov, Moscow, Russia.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "lint.h"
+#include <string.h>
+#include "collate.h"
+
+/*
+ * Compare two characters using collate
+ */
+
+int
+__collate_range_cmp(int c1, int c2)
+{
+	static char s1[2], s2[2];
+
+	s1[0] = c1;
+	s2[0] = c2;
+	return (strcoll(s1, s2));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/engine.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,1157 @@
+/*
+ * Copyright (c) 1992, 1993, 1994 Henry Spencer.
+ * Copyright (c) 1992, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Henry Spencer.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * The matching engine and friends.  This file is #included by regexec.c
+ * after suitable #defines of a variety of macros used herein, so that
+ * different state representations can be used without duplicating masses
+ * of code.
+ */
+
+#ifdef SNAMES
+#define	matcher	smatcher
+#define	fast	sfast
+#define	slow	sslow
+#define	dissect	sdissect
+#define	backref	sbackref
+#define	step	sstep
+#define	print	sprint
+#define	at	sat
+#define	match	smat
+#endif
+#ifdef LNAMES
+#define	matcher	lmatcher
+#define	fast	lfast
+#define	slow	lslow
+#define	dissect	ldissect
+#define	backref	lbackref
+#define	step	lstep
+#define	print	lprint
+#define	at	lat
+#define	match	lmat
+#endif
+#ifdef MNAMES
+#define	matcher	mmatcher
+#define	fast	mfast
+#define	slow	mslow
+#define	dissect	mdissect
+#define	backref	mbackref
+#define	step	mstep
+#define	print	mprint
+#define	at	mat
+#define	match	mmat
+#endif
+
+/* another structure passed up and down to avoid zillions of parameters */
+struct match {
+	struct re_guts *g;
+	int eflags;
+	regmatch_t *pmatch;	/* [nsub+1] (0 element unused) */
+	const char *offp;	/* offsets work from here */
+	const char *beginp;	/* start of string -- virtual NUL precedes */
+	const char *endp;	/* end of string -- virtual NUL here */
+	const char *coldp;	/* can be no match starting before here */
+	const char **lastpos;	/* [nplus+1] */
+	STATEVARS;
+	states st;		/* current states */
+	states fresh;		/* states for a fresh start */
+	states tmp;		/* temporary */
+	states empty;		/* empty set of states */
+	mbstate_t mbs;		/* multibyte conversion state */
+};
+
+/* ========= begin header generated by ./mkh ========= */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* === engine.c === */
+static int matcher(struct re_guts *, const char *, size_t, regmatch_t[], int);
+static const char *dissect(struct match *, const char *, const char *,
+    sopno, sopno);
+static const char *backref(struct match *, const char *, const char *, sopno,
+    sopno, sopno, int);
+static const char *fast(struct match *, const char *, const char *, sopno,
+    sopno);
+static const char *slow(struct match *, const char *, const char *, sopno,
+    sopno);
+static states step(struct re_guts *, sopno, sopno, states, wint_t, states);
+#define	MAX_RECURSION	100
+#define	BOL	(OUT-1)
+#define	EOL	(BOL-1)
+#define	BOLEOL	(BOL-2)
+#define	NOTHING	(BOL-3)
+#define	BOW	(BOL-4)
+#define	EOW	(BOL-5)
+#define	BADCHAR	(BOL-6)
+#define	NONCHAR(c)	((c) <= OUT)
+#ifdef REDEBUG
+static void print(struct match *, const char *, states, int, FILE *);
+#endif
+#ifdef REDEBUG
+static void at(struct match *, const char *, const char *, const char *,
+    sopno, sopno);
+#endif
+#ifdef REDEBUG
+static const char *pchar(int ch);
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+/* ========= end header generated by ./mkh ========= */
+
+#ifdef REDEBUG
+#define	SP(t, s, c)	print(m, t, s, c, stdout)
+#define	AT(t, p1, p2, s1, s2)	at(m, t, p1, p2, s1, s2)
+#define	NOTE(str)	{ if (m->eflags&REG_TRACE) printf("=%s\n", (str)); }
+#else
+#define	SP(t, s, c)	/* nothing */
+#define	AT(t, p1, p2, s1, s2)	/* nothing */
+#define	NOTE(s)	/* nothing */
+#endif
+
+/*
+ * matcher - the actual matching engine
+ */
+static int			/* 0 success, REG_NOMATCH failure */
+matcher(struct re_guts *g,
+	const char *string,
+	size_t nmatch,
+	regmatch_t pmatch[],
+	int eflags)
+{
+	const char *endp;
+	int i;
+	struct match mv;
+	struct match *m = &mv;
+	const char *dp;
+	const sopno gf = g->firststate+1;	/* +1 for OEND */
+	const sopno gl = g->laststate;
+	const char *start;
+	const char *stop;
+	/* Boyer-Moore algorithms variables */
+	const char *pp;
+	int cj, mj;
+	const char *mustfirst;
+	const char *mustlast;
+	int *matchjump;
+	int *charjump;
+
+	/* simplify the situation where possible */
+	if (g->cflags&REG_NOSUB)
+		nmatch = 0;
+#ifdef	REG_STARTEND
+	if (eflags&REG_STARTEND) {
+		start = string + pmatch[0].rm_so;
+		stop = string + pmatch[0].rm_eo;
+	} else {
+		start = string;
+		stop = start + strlen(start);
+	}
+#else
+	start = string;
+	stop = start + strlen(start);
+#endif
+	if (stop < start)
+		return (REG_EFATAL);
+
+	/* prescreening; this does wonders for this rather slow code */
+	if (g->must != NULL) {
+		if (g->charjump != NULL && g->matchjump != NULL) {
+			mustfirst = g->must;
+			mustlast = g->must + g->mlen - 1;
+			charjump = g->charjump;
+			matchjump = g->matchjump;
+			pp = mustlast;
+			for (dp = start+g->mlen-1; dp < stop; ) {
+				/* Fast skip non-matches */
+				while (dp < stop && charjump[(int)*dp])
+					dp += charjump[(int)*dp];
+
+				if (dp >= stop)
+					break;
+
+				/* Greedy matcher */
+				/*
+				 * We depend on not being used for
+				 * for strings of length 1
+				 */
+				while (*--dp == *--pp && pp != mustfirst)
+					;
+
+				if (*dp == *pp)
+					break;
+
+				/* Jump to next possible match */
+				mj = matchjump[pp - mustfirst];
+				cj = charjump[(int)*dp];
+				dp += (cj < mj ? mj : cj);
+				pp = mustlast;
+			}
+			if (pp != mustfirst)
+				return (REG_NOMATCH);
+		} else {
+			for (dp = start; dp < stop; dp++)
+				if (*dp == g->must[0] &&
+				    stop - dp >= g->mlen &&
+				    memcmp(dp, g->must, (size_t)g->mlen) == 0)
+					break;
+			if (dp == stop)		/* we didn't find g->must */
+				return (REG_NOMATCH);
+		}
+	}
+
+	/* match struct setup */
+	m->g = g;
+	m->eflags = eflags;
+	m->pmatch = NULL;
+	m->lastpos = NULL;
+	m->offp = string;
+	m->beginp = start;
+	m->endp = stop;
+	STATESETUP(m, 4);
+	SETUP(m->st);
+	SETUP(m->fresh);
+	SETUP(m->tmp);
+	SETUP(m->empty);
+	CLEAR(m->empty);
+	ZAPSTATE(&m->mbs);
+
+	/* Adjust start according to moffset, to speed things up */
+	if (g->moffset > -1)
+		start = ((dp - g->moffset) < start) ? start : dp - g->moffset;
+
+	SP("mloop", m->st, *start);
+
+	/* this loop does only one repetition except for backrefs */
+	for (;;) {
+		endp = fast(m, start, stop, gf, gl);
+		if (endp == NULL) {		/* a miss */
+			if (m->pmatch != NULL)
+				free((char *)m->pmatch);
+			if (m->lastpos != NULL)
+				free((char *)m->lastpos);
+			STATETEARDOWN(m);
+			return (REG_NOMATCH);
+		}
+		if (nmatch == 0 && !g->backrefs)
+			break;		/* no further info needed */
+
+		/* where? */
+		assert(m->coldp != NULL);
+		for (;;) {
+			NOTE("finding start");
+			endp = slow(m, m->coldp, stop, gf, gl);
+			if (endp != NULL)
+				break;
+			assert(m->coldp < m->endp);
+			m->coldp += XMBRTOWC(NULL, m->coldp,
+			    m->endp - m->coldp, &m->mbs, 0);
+		}
+		if (nmatch == 1 && !g->backrefs)
+			break;		/* no further info needed */
+
+		/* oh my, he wants the subexpressions... */
+		if (m->pmatch == NULL)
+			m->pmatch = (regmatch_t *)malloc((m->g->nsub + 1) *
+			    sizeof (regmatch_t));
+		if (m->pmatch == NULL) {
+			STATETEARDOWN(m);
+			return (REG_ESPACE);
+		}
+		for (i = 1; i <= m->g->nsub; i++)
+			m->pmatch[i].rm_so = m->pmatch[i].rm_eo = -1;
+		/* NB: FreeBSD has REG_BACKR, we do not */
+		if (!g->backrefs /* && !(m->eflags&REG_BACKR) */) {
+			NOTE("dissecting");
+			dp = dissect(m, m->coldp, endp, gf, gl);
+		} else {
+			if (g->nplus > 0 && m->lastpos == NULL)
+				m->lastpos = malloc((g->nplus+1) *
+				    sizeof (const char *));
+			if (g->nplus > 0 && m->lastpos == NULL) {
+				free(m->pmatch);
+				STATETEARDOWN(m);
+				return (REG_ESPACE);
+			}
+			NOTE("backref dissect");
+			dp = backref(m, m->coldp, endp, gf, gl, (sopno)0, 0);
+		}
+		if (dp != NULL)
+			break;
+
+		/* uh-oh... we couldn't find a subexpression-level match */
+		assert(g->backrefs);	/* must be back references doing it */
+		assert(g->nplus == 0 || m->lastpos != NULL);
+		for (;;) {
+			if (dp != NULL || endp <= m->coldp)
+				break;		/* defeat */
+			NOTE("backoff");
+			endp = slow(m, m->coldp, endp-1, gf, gl);
+			if (endp == NULL)
+				break;		/* defeat */
+			/* try it on a shorter possibility */
+#ifndef NDEBUG
+			for (i = 1; i <= m->g->nsub; i++) {
+				assert(m->pmatch[i].rm_so == -1);
+				assert(m->pmatch[i].rm_eo == -1);
+			}
+#endif
+			NOTE("backoff dissect");
+			dp = backref(m, m->coldp, endp, gf, gl, (sopno)0, 0);
+		}
+		assert(dp == NULL || dp == endp);
+		if (dp != NULL)		/* found a shorter one */
+			break;
+
+		/* despite initial appearances, there is no match here */
+		NOTE("false alarm");
+		/* recycle starting later */
+		start = m->coldp + XMBRTOWC(NULL, m->coldp,
+		    stop - m->coldp, &m->mbs, 0);
+		assert(start <= stop);
+	}
+
+	/* fill in the details if requested */
+	if (nmatch > 0) {
+		pmatch[0].rm_so = m->coldp - m->offp;
+		pmatch[0].rm_eo = endp - m->offp;
+	}
+	if (nmatch > 1) {
+		assert(m->pmatch != NULL);
+		for (i = 1; i < nmatch; i++)
+			if (i <= m->g->nsub)
+				pmatch[i] = m->pmatch[i];
+			else {
+				pmatch[i].rm_so = -1;
+				pmatch[i].rm_eo = -1;
+			}
+	}
+
+	if (m->pmatch != NULL)
+		free((char *)m->pmatch);
+	if (m->lastpos != NULL)
+		free((char *)m->lastpos);
+	STATETEARDOWN(m);
+	return (0);
+}
+
+/*
+ * dissect - figure out what matched what, no back references
+ */
+static const char *
+dissect(struct match *m, const char *start, const char *stop, sopno startst,
+    sopno stopst)
+{
+	int i;
+	sopno ss;		/* start sop of current subRE */
+	sopno es;		/* end sop of current subRE */
+	const char *sp;		/* start of string matched by it */
+	const char *stp;	/* string matched by it cannot pass here */
+	const char *rest;	/* start of rest of string */
+	const char *tail;	/* string unmatched by rest of RE */
+	sopno ssub;		/* start sop of subsubRE */
+	sopno esub;		/* end sop of subsubRE */
+	const char *ssp;	/* start of string matched by subsubRE */
+	const char *sep;	/* end of string matched by subsubRE */
+	const char *oldssp;	/* previous ssp */
+	const char *dp;
+
+	AT("diss", start, stop, startst, stopst);
+	sp = start;
+	for (ss = startst; ss < stopst; ss = es) {
+		/* identify end of subRE */
+		es = ss;
+		switch (OP(m->g->strip[es])) {
+		case OPLUS_:
+		case OQUEST_:
+			es += OPND(m->g->strip[es]);
+			break;
+		case OCH_:
+			while (OP(m->g->strip[es]) != O_CH)
+				es += OPND(m->g->strip[es]);
+			break;
+		}
+		es++;
+
+		/* figure out what it matched */
+		switch (OP(m->g->strip[ss])) {
+		case OEND:
+			assert(0);
+			break;
+		case OCHAR:
+			sp += XMBRTOWC(NULL, sp, stop - start, &m->mbs, 0);
+			break;
+		case OBOL:
+		case OEOL:
+		case OBOW:
+		case OEOW:
+			break;
+		case OANY:
+		case OANYOF:
+			sp += XMBRTOWC(NULL, sp, stop - start, &m->mbs, 0);
+			break;
+		case OBACK_:
+		case O_BACK:
+			assert(0);
+			break;
+		/* cases where length of match is hard to find */
+		case OQUEST_:
+			stp = stop;
+			for (;;) {
+				/* how long could this one be? */
+				rest = slow(m, sp, stp, ss, es);
+				assert(rest != NULL);	/* it did match */
+				/* could the rest match the rest? */
+				tail = slow(m, rest, stop, es, stopst);
+				if (tail == stop)
+					break;		/* yes! */
+				/* no -- try a shorter match for this one */
+				stp = rest - 1;
+				assert(stp >= sp);	/* it did work */
+			}
+			ssub = ss + 1;
+			esub = es - 1;
+			/* did innards match? */
+			if (slow(m, sp, rest, ssub, esub) != NULL) {
+				dp = dissect(m, sp, rest, ssub, esub);
+				assert(dp == rest);
+#if defined(__lint)
+				(void) dp;
+#endif
+			} else		/* no */
+				assert(sp == rest);
+			sp = rest;
+			break;
+		case OPLUS_:
+			stp = stop;
+			for (;;) {
+				/* how long could this one be? */
+				rest = slow(m, sp, stp, ss, es);
+				assert(rest != NULL);	/* it did match */
+				/* could the rest match the rest? */
+				tail = slow(m, rest, stop, es, stopst);
+				if (tail == stop)
+					break;		/* yes! */
+				/* no -- try a shorter match for this one */
+				stp = rest - 1;
+				assert(stp >= sp);	/* it did work */
+			}
+			ssub = ss + 1;
+			esub = es - 1;
+			ssp = sp;
+			oldssp = ssp;
+			for (;;) {	/* find last match of innards */
+				sep = slow(m, ssp, rest, ssub, esub);
+				if (sep == NULL || sep == ssp)
+					break;	/* failed or matched null */
+				oldssp = ssp;	/* on to next try */
+				ssp = sep;
+			}
+			if (sep == NULL) {
+				/* last successful match */
+				sep = ssp;
+				ssp = oldssp;
+			}
+			assert(sep == rest);	/* must exhaust substring */
+			assert(slow(m, ssp, sep, ssub, esub) == rest);
+			dp = dissect(m, ssp, sep, ssub, esub);
+			assert(dp == sep);
+			sp = rest;
+			break;
+		case OCH_:
+			stp = stop;
+			for (;;) {
+				/* how long could this one be? */
+				rest = slow(m, sp, stp, ss, es);
+				assert(rest != NULL);	/* it did match */
+				/* could the rest match the rest? */
+				tail = slow(m, rest, stop, es, stopst);
+				if (tail == stop)
+					break;		/* yes! */
+				/* no -- try a shorter match for this one */
+				stp = rest - 1;
+				assert(stp >= sp);	/* it did work */
+			}
+			ssub = ss + 1;
+			esub = ss + OPND(m->g->strip[ss]) - 1;
+			assert(OP(m->g->strip[esub]) == OOR1);
+			for (;;) {	/* find first matching branch */
+				if (slow(m, sp, rest, ssub, esub) == rest)
+					break;	/* it matched all of it */
+				/* that one missed, try next one */
+				assert(OP(m->g->strip[esub]) == OOR1);
+				esub++;
+				assert(OP(m->g->strip[esub]) == OOR2);
+				ssub = esub + 1;
+				esub += OPND(m->g->strip[esub]);
+				if (OP(m->g->strip[esub]) == OOR2)
+					esub--;
+				else
+					assert(OP(m->g->strip[esub]) == O_CH);
+			}
+			dp = dissect(m, sp, rest, ssub, esub);
+			assert(dp == rest);
+			sp = rest;
+			break;
+		case O_PLUS:
+		case O_QUEST:
+		case OOR1:
+		case OOR2:
+		case O_CH:
+			assert(0);
+			break;
+		case OLPAREN:
+			i = OPND(m->g->strip[ss]);
+			assert(0 < i && i <= m->g->nsub);
+			m->pmatch[i].rm_so = sp - m->offp;
+			break;
+		case ORPAREN:
+			i = OPND(m->g->strip[ss]);
+			assert(0 < i && i <= m->g->nsub);
+			m->pmatch[i].rm_eo = sp - m->offp;
+			break;
+		default:		/* uh oh */
+			assert(0);
+			break;
+		}
+	}
+
+	assert(sp == stop);
+	return (sp);
+}
+
+/*
+ * backref - figure out what matched what, figuring in back references
+ */
+static const char *
+backref(struct match *m, const char *start, const char *stop, sopno startst,
+    sopno stopst, sopno lev,		/* PLUS nesting level */
+    int rec)
+{
+	int i;
+	sopno ss;		/* start sop of current subRE */
+	const char *sp;		/* start of string matched by it */
+	sopno ssub;		/* start sop of subsubRE */
+	sopno esub;		/* end sop of subsubRE */
+	const char *ssp;	/* start of string matched by subsubRE */
+	const char *dp;
+	size_t len;
+	int hard;
+	sop s;
+	regoff_t offsave;
+	cset *cs;
+	wint_t wc;
+
+	AT("back", start, stop, startst, stopst);
+	sp = start;
+
+	/* get as far as we can with easy stuff */
+	hard = 0;
+	for (ss = startst; !hard && ss < stopst; ss++)
+		switch (OP(s = m->g->strip[ss])) {
+		case OCHAR:
+			if (sp == stop)
+				return (NULL);
+			sp += XMBRTOWC(&wc, sp, stop - sp, &m->mbs, BADCHAR);
+			if (wc != OPND(s))
+				return (NULL);
+			break;
+		case OANY:
+			if (sp == stop)
+				return (NULL);
+			sp += XMBRTOWC(&wc, sp, stop - sp, &m->mbs, BADCHAR);
+			if (wc == BADCHAR)
+				return (NULL);
+			break;
+		case OANYOF:
+			if (sp == stop)
+				return (NULL);
+			cs = &m->g->sets[OPND(s)];
+			sp += XMBRTOWC(&wc, sp, stop - sp, &m->mbs, BADCHAR);
+			if (wc == BADCHAR || !CHIN(cs, wc))
+				return (NULL);
+			break;
+		case OBOL:
+			if ((sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
+			    (sp < m->endp && *(sp-1) == '\n' &&
+			    (m->g->cflags&REG_NEWLINE))) {
+				break;
+			}
+			else
+				return (NULL);
+			break;
+		case OEOL:
+			if ((sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
+			    (sp < m->endp && *sp == '\n' &&
+			    (m->g->cflags&REG_NEWLINE))) {
+				break;
+			}
+			else
+				return (NULL);
+			break;
+		case OBOW:
+			if (((sp == m->beginp && !(m->eflags&REG_NOTBOL)) ||
+			    (sp < m->endp && *(sp-1) == '\n' &&
+			    (m->g->cflags&REG_NEWLINE)) ||
+			    (sp > m->beginp && !ISWORD(*(sp-1)))) &&
+			    (sp < m->endp && ISWORD(*sp))) {
+				break;
+			} else
+				return (NULL);
+			break;
+		case OEOW:
+			if (((sp == m->endp && !(m->eflags&REG_NOTEOL)) ||
+			    (sp < m->endp && *sp == '\n' &&
+			    (m->g->cflags&REG_NEWLINE)) ||
+			    (sp < m->endp && !ISWORD(*sp))) &&
+			    (sp > m->beginp && ISWORD(*(sp-1)))) {
+				break;
+			} else
+				return (NULL);
+			break;
+		case O_QUEST:
+			break;
+		case OOR1:	/* matches null but needs to skip */
+			ss++;
+			s = m->g->strip[ss];
+			do {
+				assert(OP(s) == OOR2);
+				ss += OPND(s);
+			} while (OP(s = m->g->strip[ss]) != O_CH);
+			/* note that the ss++ gets us past the O_CH */
+			break;
+		default:	/* have to make a choice */
+			hard = 1;
+			break;
+		}
+	if (!hard) {		/* that was it! */
+		if (sp != stop)
+			return (NULL);
+		return (sp);
+	}
+	ss--;			/* adjust for the for's final increment */
+
+	/* the hard stuff */
+	AT("hard", sp, stop, ss, stopst);
+	s = m->g->strip[ss];
+	switch (OP(s)) {
+	case OBACK_:		/* the vilest depths */
+		i = OPND(s);
+		assert(0 < i && i <= m->g->nsub);
+		if (m->pmatch[i].rm_eo == -1)
+			return (NULL);
+		assert(m->pmatch[i].rm_so != -1);
+		len = m->pmatch[i].rm_eo - m->pmatch[i].rm_so;
+		if (len == 0 && rec++ > MAX_RECURSION)
+			return (NULL);
+		assert(stop - m->beginp >= len);
+		if (sp > stop - len)
+			return (NULL);	/* not enough left to match */
+		ssp = m->offp + m->pmatch[i].rm_so;
+		if (memcmp(sp, ssp, len) != 0)
+			return (NULL);
+		while (m->g->strip[ss] != SOP(O_BACK, i))
+			ss++;
+		return (backref(m, sp+len, stop, ss+1, stopst, lev, rec));
+		break;
+	case OQUEST_:		/* to null or not */
+		dp = backref(m, sp, stop, ss+1, stopst, lev, rec);
+		if (dp != NULL)
+			return (dp);	/* not */
+		return (backref(m, sp, stop, ss+OPND(s)+1, stopst, lev, rec));
+		break;
+	case OPLUS_:
+		assert(m->lastpos != NULL);
+		assert(lev+1 <= m->g->nplus);
+		m->lastpos[lev+1] = sp;
+		return (backref(m, sp, stop, ss+1, stopst, lev+1, rec));
+		break;
+	case O_PLUS:
+		if (sp == m->lastpos[lev])	/* last pass matched null */
+			return (backref(m, sp, stop, ss+1, stopst, lev-1, rec));
+		/* try another pass */
+		m->lastpos[lev] = sp;
+		dp = backref(m, sp, stop, ss-OPND(s)+1, stopst, lev, rec);
+		if (dp == NULL)
+			return (backref(m, sp, stop, ss+1, stopst, lev-1, rec));
+		else
+			return (dp);
+		break;
+	case OCH_:		/* find the right one, if any */
+		ssub = ss + 1;
+		esub = ss + OPND(s) - 1;
+		assert(OP(m->g->strip[esub]) == OOR1);
+		for (;;) {	/* find first matching branch */
+			dp = backref(m, sp, stop, ssub, esub, lev, rec);
+			if (dp != NULL)
+				return (dp);
+			/* that one missed, try next one */
+			if (OP(m->g->strip[esub]) == O_CH)
+				return (NULL);	/* there is none */
+			esub++;
+			assert(OP(m->g->strip[esub]) == OOR2);
+			ssub = esub + 1;
+			esub += OPND(m->g->strip[esub]);
+			if (OP(m->g->strip[esub]) == OOR2)
+				esub--;
+			else
+				assert(OP(m->g->strip[esub]) == O_CH);
+		}
+		break;
+	case OLPAREN:		/* must undo assignment if rest fails */
+		i = OPND(s);
+		assert(0 < i && i <= m->g->nsub);
+		offsave = m->pmatch[i].rm_so;
+		m->pmatch[i].rm_so = sp - m->offp;
+		dp = backref(m, sp, stop, ss+1, stopst, lev, rec);
+		if (dp != NULL)
+			return (dp);
+		m->pmatch[i].rm_so = offsave;
+		return (NULL);
+		break;
+	case ORPAREN:		/* must undo assignment if rest fails */
+		i = OPND(s);
+		assert(0 < i && i <= m->g->nsub);
+		offsave = m->pmatch[i].rm_eo;
+		m->pmatch[i].rm_eo = sp - m->offp;
+		dp = backref(m, sp, stop, ss+1, stopst, lev, rec);
+		if (dp != NULL)
+			return (dp);
+		m->pmatch[i].rm_eo = offsave;
+		return (NULL);
+		break;
+	default:		/* uh oh */
+		assert(0);
+		break;
+	}
+
+	/* "can't happen" */
+	assert(0);
+	return (NULL);
+}
+
+/*
+ * fast - step through the string at top speed
+ */
+static const char *
+fast(struct match *m, const char *start, const char *stop, sopno startst,
+    sopno stopst)
+{
+	states st = m->st;
+	states fresh = m->fresh;
+	states tmp = m->tmp;
+	const char *p = start;
+	wint_t c;
+	wint_t lastc;		/* previous c */
+	wint_t flagch;
+	int i;
+	const char *coldp;	/* last p after which no match was underway */
+	size_t clen;
+
+	CLEAR(st);
+	SET1(st, startst);
+	SP("fast", st, *p);
+	st = step(m->g, startst, stopst, st, NOTHING, st);
+	ASSIGN(fresh, st);
+	SP("start", st, *p);
+	coldp = NULL;
+	if (start == m->beginp)
+		c = OUT;
+	else {
+		/*
+		 * XXX Wrong if the previous character was multi-byte.
+		 * Newline never is (in encodings supported by FreeBSD),
+		 * so this only breaks the ISWORD tests below.
+		 */
+		c = (uch)*(start - 1);
+	}
+	for (;;) {
+		/* next character */
+		lastc = c;
+		if (p == m->endp) {
+			clen = 0;
+			c = OUT;
+		} else
+			clen = XMBRTOWC(&c, p, m->endp - p, &m->mbs, BADCHAR);
+		if (EQ(st, fresh))
+			coldp = p;
+
+		/* is there an EOL and/or BOL between lastc and c? */
+		flagch = '\0';
+		i = 0;
+		if ((lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
+		    (lastc == OUT && !(m->eflags&REG_NOTBOL))) {
+			flagch = BOL;
+			i = m->g->nbol;
+		}
+		if ((c == '\n' && m->g->cflags&REG_NEWLINE) ||
+		    (c == OUT && !(m->eflags&REG_NOTEOL))) {
+			flagch = (flagch == BOL) ? BOLEOL : EOL;
+			i += m->g->neol;
+		}
+		if (i != 0) {
+			for (; i > 0; i--)
+				st = step(m->g, startst, stopst, st,
+				    flagch, st);
+			SP("boleol", st, c);
+		}
+
+		/* how about a word boundary? */
+		if ((flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
+		    (c != OUT && ISWORD(c))) {
+			flagch = BOW;
+		}
+		if ((lastc != OUT && ISWORD(lastc)) &&
+		    (flagch == EOL || (c != OUT && !ISWORD(c)))) {
+			flagch = EOW;
+		}
+		if (flagch == BOW || flagch == EOW) {
+			st = step(m->g, startst, stopst, st, flagch, st);
+			SP("boweow", st, c);
+		}
+
+		/* are we done? */
+		if (ISSET(st, stopst) || p == stop || clen > stop - p)
+			break;		/* NOTE BREAK OUT */
+
+		/* no, we must deal with this character */
+		ASSIGN(tmp, st);
+		ASSIGN(st, fresh);
+		assert(c != OUT);
+		st = step(m->g, startst, stopst, tmp, c, st);
+		SP("aft", st, c);
+		assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
+		p += clen;
+	}
+
+	assert(coldp != NULL);
+	m->coldp = coldp;
+	if (ISSET(st, stopst))
+		return (p+XMBRTOWC(NULL, p, stop - p, &m->mbs, 0));
+	else
+		return (NULL);
+}
+
+/*
+ * slow - step through the string more deliberately
+ */
+static const char *
+slow(struct match *m, const char *start, const char *stop, sopno startst,
+    sopno stopst)
+{
+	states st = m->st;
+	states empty = m->empty;
+	states tmp = m->tmp;
+	const char *p = start;
+	wint_t c;
+	wint_t lastc;		/* previous c */
+	wint_t flagch;
+	int i;
+	const char *matchp;	/* last p at which a match ended */
+	size_t clen;
+
+	AT("slow", start, stop, startst, stopst);
+	CLEAR(st);
+	SET1(st, startst);
+	SP("sstart", st, *p);
+	st = step(m->g, startst, stopst, st, NOTHING, st);
+	matchp = NULL;
+	if (start == m->beginp)
+		c = OUT;
+	else {
+		/*
+		 * XXX Wrong if the previous character was multi-byte.
+		 * Newline never is (in encodings supported by FreeBSD),
+		 * so this only breaks the ISWORD tests below.
+		 */
+		c = (uch)*(start - 1);
+	}
+	for (;;) {
+		/* next character */
+		lastc = c;
+		if (p == m->endp) {
+			c = OUT;
+			clen = 0;
+		} else
+			clen = XMBRTOWC(&c, p, m->endp - p, &m->mbs, BADCHAR);
+
+		/* is there an EOL and/or BOL between lastc and c? */
+		flagch = '\0';
+		i = 0;
+		if ((lastc == '\n' && m->g->cflags&REG_NEWLINE) ||
+		    (lastc == OUT && !(m->eflags&REG_NOTBOL))) {
+			flagch = BOL;
+			i = m->g->nbol;
+		}
+		if ((c == '\n' && m->g->cflags&REG_NEWLINE) ||
+		    (c == OUT && !(m->eflags&REG_NOTEOL))) {
+			flagch = (flagch == BOL) ? BOLEOL : EOL;
+			i += m->g->neol;
+		}
+		if (i != 0) {
+			for (; i > 0; i--)
+				st = step(m->g, startst, stopst, st,
+				    flagch, st);
+			SP("sboleol", st, c);
+		}
+
+		/* how about a word boundary? */
+		if ((flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
+		    (c != OUT && ISWORD(c))) {
+			flagch = BOW;
+		}
+		if ((lastc != OUT && ISWORD(lastc)) &&
+		    (flagch == EOL || (c != OUT && !ISWORD(c)))) {
+			flagch = EOW;
+		}
+		if (flagch == BOW || flagch == EOW) {
+			st = step(m->g, startst, stopst, st, flagch, st);
+			SP("sboweow", st, c);
+		}
+
+		/* are we done? */
+		if (ISSET(st, stopst))
+			matchp = p;
+		if (EQ(st, empty) || p == stop || clen > stop - p)
+			break;		/* NOTE BREAK OUT */
+
+		/* no, we must deal with this character */
+		ASSIGN(tmp, st);
+		ASSIGN(st, empty);
+		assert(c != OUT);
+		st = step(m->g, startst, stopst, tmp, c, st);
+		SP("saft", st, c);
+		assert(EQ(step(m->g, startst, stopst, st, NOTHING, st), st));
+		p += clen;
+	}
+
+	return (matchp);
+}
+
+
+/*
+ * step - map set of states reachable before char to set reachable after
+ */
+static states
+step(struct re_guts *g,
+	sopno start,		/* start state within strip */
+	sopno stop,		/* state after stop state within strip */
+	states bef,		/* states reachable before */
+	wint_t ch,		/* character or NONCHAR code */
+	states aft)		/* states already known reachable after */
+{
+	cset *cs;
+	sop s;
+	sopno pc;
+	onestate here;		/* note, macros know this name */
+	sopno look;
+	int i;
+
+	for (pc = start, INIT(here, pc); pc != stop; pc++, INC(here)) {
+		s = g->strip[pc];
+		switch (OP(s)) {
+		case OEND:
+			assert(pc == stop-1);
+			break;
+		case OCHAR:
+			/* only characters can match */
+			assert(!NONCHAR(ch) || ch != OPND(s));
+			if (ch == OPND(s))
+				FWD(aft, bef, 1);
+			break;
+		case OBOL:
+			if (ch == BOL || ch == BOLEOL)
+				FWD(aft, bef, 1);
+			break;
+		case OEOL:
+			if (ch == EOL || ch == BOLEOL)
+				FWD(aft, bef, 1);
+			break;
+		case OBOW:
+			if (ch == BOW)
+				FWD(aft, bef, 1);
+			break;
+		case OEOW:
+			if (ch == EOW)
+				FWD(aft, bef, 1);
+			break;
+		case OANY:
+			if (!NONCHAR(ch))
+				FWD(aft, bef, 1);
+			break;
+		case OANYOF:
+			cs = &g->sets[OPND(s)];
+			if (!NONCHAR(ch) && CHIN(cs, ch))
+				FWD(aft, bef, 1);
+			break;
+		case OBACK_:		/* ignored here */
+		case O_BACK:
+			FWD(aft, aft, 1);
+			break;
+		case OPLUS_:		/* forward, this is just an empty */
+			FWD(aft, aft, 1);
+			break;
+		case O_PLUS:		/* both forward and back */
+			FWD(aft, aft, 1);
+			i = ISSETBACK(aft, OPND(s));
+			BACK(aft, aft, OPND(s));
+			if (!i && ISSETBACK(aft, OPND(s))) {
+				/* oho, must reconsider loop body */
+				pc -= OPND(s) + 1;
+				INIT(here, pc);
+			}
+			break;
+		case OQUEST_:		/* two branches, both forward */
+			FWD(aft, aft, 1);
+			FWD(aft, aft, OPND(s));
+			break;
+		case O_QUEST:		/* just an empty */
+			FWD(aft, aft, 1);
+			break;
+		case OLPAREN:		/* not significant here */
+		case ORPAREN:
+			FWD(aft, aft, 1);
+			break;
+		case OCH_:		/* mark the first two branches */
+			FWD(aft, aft, 1);
+			assert(OP(g->strip[pc+OPND(s)]) == OOR2);
+			FWD(aft, aft, OPND(s));
+			break;
+		case OOR1:		/* done a branch, find the O_CH */
+			if (ISSTATEIN(aft, here)) {
+				for (look = 1;
+				    OP(s = g->strip[pc+look]) != O_CH;
+				    look += OPND(s))
+					assert(OP(s) == OOR2);
+				FWD(aft, aft, look + 1);
+			}
+			break;
+		case OOR2:		/* propagate OCH_'s marking */
+			FWD(aft, aft, 1);
+			if (OP(g->strip[pc+OPND(s)]) != O_CH) {
+				assert(OP(g->strip[pc+OPND(s)]) == OOR2);
+				FWD(aft, aft, OPND(s));
+			}
+			break;
+		case O_CH:		/* just empty */
+			FWD(aft, aft, 1);
+			break;
+		default:		/* ooooops... */
+			assert(0);
+			break;
+		}
+	}
+
+	return (aft);
+}
+
+#ifdef REDEBUG
+/*
+ * print - print a set of states
+ */
+static void
+print(struct match *m, const char *caption, states st, int ch, FILE *d)
+{
+	struct re_guts *g = m->g;
+	int i;
+	int first = 1;
+
+	if (!(m->eflags&REG_TRACE))
+		return;
+
+	(void) fprintf(d, "%s", caption);
+	if (ch != '\0')
+		(void) fprintf(d, " %s", pchar(ch));
+	for (i = 0; i < g->nstates; i++)
+		if (ISSET(st, i)) {
+			(void) fprintf(d, "%s%d", (first) ? "\t" : ", ", i);
+			first = 0;
+		}
+	(void) fprintf(d, "\n");
+}
+
+/*
+ * at - print current situation
+ */
+static void
+at(struct match *m, const char *title, const char *start, const char *stop,
+    sopno startst, sopno stopst)
+{
+	if (!(m->eflags&REG_TRACE))
+		return;
+
+	(void) printf("%s %s-", title, pchar(*start));
+	(void) printf("%s ", pchar(*stop));
+	(void) printf("%ld-%ld\n", (long)startst, (long)stopst);
+}
+
+#ifndef PCHARDONE
+#define	PCHARDONE	/* never again */
+/*
+ * pchar - make a character printable
+ *
+ * Is this identical to regchar() over in debug.c?  Well, yes.  But a
+ * duplicate here avoids having a debugging-capable regexec.o tied to
+ * a matching debug.o, and this is convenient.  It all disappears in
+ * the non-debug compilation anyway, so it doesn't matter much.
+ */
+static const char *
+pchar(int ch)
+{
+	static char pbuf[10];
+
+	if (isprint((uch)ch) || ch == ' ')
+		(void) sprintf(pbuf, "%c", ch);
+	else
+		(void) sprintf(pbuf, "\\%o", ch);
+	return (pbuf);
+}
+#endif
+#endif
+
+#undef	matcher
+#undef	fast
+#undef	slow
+#undef	dissect
+#undef	backref
+#undef	step
+#undef	print
+#undef	at
+#undef	match
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/euc.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,274 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved.
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *	This product includes software developed by the University of
+ *	California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <sys/types.h>
+#include "runetype.h"
+#include "mblocal.h"
+
+#define	MIN(a, b)	((a) < (b) ? (a) : (b))
+
+static size_t	_EUC_mbrtowc(wchar_t *_RESTRICT_KYWD,
+		    const char *_RESTRICT_KYWD,
+		    size_t, mbstate_t *_RESTRICT_KYWD);
+static int	_EUC_mbsinit(const mbstate_t *);
+static size_t	_EUC_wcrtomb(char *_RESTRICT_KYWD, wchar_t,
+		    mbstate_t *_RESTRICT_KYWD);
+
+typedef struct {
+	int	count[4];
+	wchar_t	bits[4];
+	wchar_t	mask;
+} _EucInfo;
+
+typedef struct {
+	wchar_t	ch;
+	int	set;
+	int	want;
+} _EucState;
+
+int
+_EUC_init(_RuneLocale *rl)
+{
+	_EucInfo *ei;
+	int x, new__mb_cur_max;
+	char *v, *e;
+
+	if (rl->__variable == NULL)
+		return (EINVAL);
+
+	v = (char *)rl->__variable;
+
+	while (*v == ' ' || *v == '\t')
+		++v;
+
+	if ((ei = malloc(sizeof (_EucInfo))) == NULL)
+		return (errno == 0 ? ENOMEM : errno);
+
+	new__mb_cur_max = 0;
+	for (x = 0; x < 4; ++x) {
+		ei->count[x] = (int)strtol(v, &e, 0);
+		if (v == e || !(v = e)) {
+			free(ei);
+			return (EINVAL);
+		}
+		if (new__mb_cur_max < ei->count[x])
+			new__mb_cur_max = ei->count[x];
+		while (*v == ' ' || *v == '\t')
+			++v;
+		ei->bits[x] = (int)strtol(v, &e, 0);
+		if (v == e || !(v = e)) {
+			free(ei);
+			return (EINVAL);
+		}
+		while (*v == ' ' || *v == '\t')
+			++v;
+	}
+	ei->mask = (int)strtol(v, &e, 0);
+	if (v == e || !(v = e)) {
+		free(ei);
+		return (EINVAL);
+	}
+	rl->__variable = ei;
+	rl->__variable_len = sizeof (_EucInfo);
+	_CurrentRuneLocale = rl;
+	__ctype[520] = new__mb_cur_max;
+	__mbrtowc = _EUC_mbrtowc;
+	__wcrtomb = _EUC_wcrtomb;
+	__mbsinit = _EUC_mbsinit;
+	charset_is_ascii = 0;
+	return (0);
+}
+
+static int
+_EUC_mbsinit(const mbstate_t *ps)
+{
+
+	return (ps == NULL || ((const _EucState *)ps)->want == 0);
+}
+
+#define	CEI	((_EucInfo *)(_CurrentRuneLocale->__variable))
+
+#define	_SS2	0x008e
+#define	_SS3	0x008f
+
+#define	GR_BITS	0x80808080 /* XXX: to be fixed */
+
+static int
+_euc_set(uint_t c)
+{
+
+	c &= 0xff;
+	return ((c & 0x80) ? c == _SS3 ? 3 : c == _SS2 ? 2 : 1 : 0);
+}
+
+static size_t
+_EUC_mbrtowc(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s,
+    size_t n, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_EucState *es;
+	int i, set, want;
+	wchar_t wc;
+	const char *os;
+
+	es = (_EucState *)ps;
+
+	if (es->want < 0 || es->want > MB_CUR_MAX || es->set < 0 ||
+	    es->set > 3) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL) {
+		s = "";
+		n = 1;
+		pwc = NULL;
+	}
+
+	if (n == 0)
+		/* Incomplete multibyte sequence */
+		return ((size_t)-2);
+
+	os = s;
+
+	if (es->want == 0) {
+		want = CEI->count[set = _euc_set(*s)];
+		if (set == 2 || set == 3) {
+			--want;
+			if (--n == 0) {
+				/* Incomplete multibyte sequence */
+				es->set = set;
+				es->want = want;
+				es->ch = 0;
+				return ((size_t)-2);
+			}
+			++s;
+			if (*s == '\0') {
+				errno = EILSEQ;
+				return ((size_t)-1);
+			}
+		}
+		wc = (unsigned char)*s++;
+	} else {
+		set = es->set;
+		want = es->want;
+		wc = es->ch;
+	}
+	for (i = (es->want == 0) ? 1 : 0; i < MIN(want, n); i++) {
+		if (*s == '\0') {
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		wc = (wc << 8) | (unsigned char)*s++;
+	}
+	if (i < want) {
+		/* Incomplete multibyte sequence */
+		es->set = set;
+		es->want = want - i;
+		es->ch = wc;
+		return ((size_t)-2);
+	}
+	wc = (wc & ~CEI->mask) | CEI->bits[set];
+	if (pwc != NULL)
+		*pwc = wc;
+	es->want = 0;
+	return (wc == L'\0' ? 0 : s - os);
+}
+
+static size_t
+_EUC_wcrtomb(char *_RESTRICT_KYWD s, wchar_t wc, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_EucState *es;
+	wchar_t m, nm;
+	int i, len;
+
+	es = (_EucState *)ps;
+
+	if (es->want != 0) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL)
+		/* Reset to initial shift state (no-op) */
+		return (1);
+
+	m = wc & CEI->mask;
+	nm = wc & ~m;
+
+	if (m == CEI->bits[1]) {
+CodeSet1:
+		/* Codeset 1: The first byte must have 0x80 in it. */
+		i = len = CEI->count[1];
+		while (i-- > 0) {
+			*(unsigned char *)s = (nm >> (i << 3)) | 0x80;
+			s++;
+		}
+	} else {
+		if (m == CEI->bits[0])
+			i = len = CEI->count[0];
+		else if (m == CEI->bits[2]) {
+			i = len = CEI->count[2];
+			*(unsigned char *)s = _SS2;
+			s++;
+			--i;
+			/* SS2 designates G2 into GR */
+			nm |= GR_BITS;
+		} else if (m == CEI->bits[3]) {
+			i = len = CEI->count[3];
+			*(unsigned char *)s = _SS3;
+			s++;
+			--i;
+			/* SS3 designates G3 into GR */
+			nm |= GR_BITS;
+		} else
+			goto CodeSet1;	/* Bletch */
+		while (i-- > 0)
+			*s++ = (nm >> (i << 3)) & 0xff;
+	}
+	return (len);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/fgetwc.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include "mse_int.h"
+#include "file64.h"
+#include "mtlib.h"
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include "mblocal.h"
+#include "stdiom.h"
+
+/*
+ * Non-MT-safe version.
+ */
+wint_t
+_fgetwc_unlocked(FILE *fp)
+{
+	wchar_t wc;
+	size_t nconv;
+	int	c;
+	mbstate_t	*statep;
+
+	if ((c = GETC(fp)) == EOF)
+		return (WEOF);
+
+	if (MB_CUR_MAX == 1) {
+		/* Fast path for single-byte encodings. */
+		return ((wint_t)c);
+	}
+	if ((statep = _getmbstate(fp)) == NULL) {
+		fp->_flag = _IOERR;
+		errno = EBADF;
+		return (WEOF);
+	}
+	do {
+		char	x = (char)c;
+		nconv = __mbrtowc(&wc, &x, 1, statep);
+		if (nconv == (size_t)-1) {
+			break;
+		} else if (nconv == (size_t)-2) {
+			/* Incompletely decoded, consume another char */
+			continue;
+		} else if (nconv == 0) {
+			/*
+			 * Assume that the only valid representation of
+			 * the null wide character is a single null byte.
+			 */
+			return (L'\0');
+		} else {
+			return (wc);
+		}
+	} while ((c = GETC(fp)) != EOF);
+
+	/*
+	 * If we got here it means we got truncated in a character, or
+	 * the character did not decode properly.  Note that in the case
+	 * of a botched decoding, we don't UNGETC the bad bytes.  Should
+	 * we?
+	 */
+	fp->_flag |= _IOERR;
+	errno = EILSEQ;
+	return (WEOF);
+}
+
+
+/*
+ * MT safe version
+ */
+wint_t
+fgetwc(FILE *fp)
+{
+	wint_t		r;
+	rmutex_t	*l;
+
+	FLOCKFILE(l, fp);
+	r = _fgetwc_unlocked(fp);
+	FUNLOCKFILE(l);
+
+	return (r);
+}
+
+#undef	getwc
+wint_t
+getwc(FILE *fp)
+{
+	return (getwc(fp));
+}
+
+/*
+ * XPG5 version.
+ */
+wint_t
+__fgetwc_xpg5(FILE *fp)
+{
+	wint_t		r;
+	rmutex_t	*l;
+
+	FLOCKFILE(l, fp);
+	if (GET_NO_MODE(fp))
+		_setorientation(fp, _WC_MODE);
+	r = _fgetwc_unlocked(fp);
+	FUNLOCKFILE(l);
+
+	return (r);
+}
+
+#undef	__getwc_xpg5
+wint_t
+__getwc_xpg5(FILE *fp)
+{
+	return (__fgetwc_xpg5(fp));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/fgetws.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,139 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include "mse_int.h"
+#include "file64.h"
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+#include "mblocal.h"
+#include "mse.h"
+#include "stdiom.h"
+#include "libc.h"
+
+/*
+ * FreeBSD implementation here included a full version that tried to be more
+ * efficient with memory strings.  However, for simplicity's sake, we are
+ * going to just use fgetwc().  We also do the stream orientation thing for
+ * XPG5 if we need to.
+ */
+
+wchar_t *
+_fgetws_impl(wchar_t *_RESTRICT_KYWD ws, int n, FILE *_RESTRICT_KYWD fp,
+    int orient)
+{
+	wint_t wc;
+	wchar_t *wsp;
+	rmutex_t *lk;
+
+	FLOCKFILE(lk, fp);
+	if (orient && GET_NO_MODE(fp))
+		_setorientation(fp, _WC_MODE);
+
+	if (n <= 0) {
+		errno = EINVAL;
+		FUNLOCKFILE(lk);
+		return (NULL);
+	}
+
+	wsp = ws;
+	while (n--) {
+		wc = _fgetwc_unlocked(fp);
+		if (wc == EOF) {
+			/*
+			 * This can happen because of an EOF on
+			 * the stream, or because of a decoding error.
+			 * Its up to the caller to check errno.
+			 */
+			if (wsp == ws) {
+				/* EOF with no data read */
+				FUNLOCKFILE(lk);
+				return (NULL);
+			}
+			break;
+		}
+		*wsp++ = wc;
+
+		if (wc == L'\n')
+			break;
+	}
+	*wsp = 0;
+	FUNLOCKFILE(lk);
+	return (ws);
+}
+
+wchar_t *
+fgetws(wchar_t *_RESTRICT_KYWD ws, int n, FILE *_RESTRICT_KYWD fp)
+{
+	return (_fgetws_impl(ws, n, fp, 0));
+}
+
+wchar_t *
+__fgetws_xpg5(wchar_t *ws, int n, FILE *fp)
+{
+	return (_fgetws_impl(ws, n, fp, 1));
+}
+
+wchar_t *
+getws(wchar_t *ws)
+{
+	wint_t wc;
+	wchar_t *wsp;
+	rmutex_t *lk;
+
+	FLOCKFILE(lk, stdin);
+
+	wsp = ws;
+	for (;;) {
+		wc = _fgetwc_unlocked(stdin);
+		if (wc == EOF) {
+			/*
+			 * This can happen because of an EOF on
+			 * the stream, or because of a decoding error.
+			 * Its up to the caller to check errno.
+			 */
+			if (wsp == ws) {
+				/* EOF with no data read */
+				FUNLOCKFILE(lk);
+				return (NULL);
+			}
+			break;
+		}
+		*wsp++ = wc;
+
+		if (wc == L'\n')
+			break;
+	}
+	*wsp = 0;
+	FUNLOCKFILE(lk);
+	return (ws);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/fix_grouping.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <ctype.h>
+#include <limits.h>
+#include <stddef.h>
+
+static const char nogrouping[] = { CHAR_MAX, '\0' };
+
+/*
+ * Internal helper used to convert grouping sequences from string
+ * representation into POSIX specified form, i.e.
+ *
+ * "3;3;-1" -> "\003\003\177\000"
+ */
+
+const char *
+__fix_locale_grouping_str(const char *str)
+{
+	char *src, *dst;
+	char n;
+
+	if (str == NULL || *str == '\0') {
+		return (nogrouping);
+	}
+
+	for (src = (char *)str, dst = (char *)str; *src != '\0'; src++) {
+
+		/* input string examples: "3;3", "3;2;-1" */
+		if (*src == ';')
+			continue;
+
+		if (*src == '-' && *(src+1) == '1') {
+			*dst++ = CHAR_MAX;
+			src++;
+			continue;
+		}
+
+		if (!isdigit((unsigned char)*src)) {
+			/* broken grouping string */
+			return (nogrouping);
+		}
+
+		/* assume all numbers <= 99 */
+		n = *src - '0';
+		if (isdigit((unsigned char)*(src+1))) {
+			src++;
+			n *= 10;
+			n += *src - '0';
+		}
+
+		*dst = n;
+		/* NOTE: assume all input started with "0" as 'no grouping' */
+		if (*dst == '\0')
+			return ((dst == (char *)str) ? nogrouping : str);
+		dst++;
+	}
+	*dst = '\0';
+	return (str);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/fnmatch.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,291 @@
+/*
+ * Copyright (c) 1989, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Guido van Rossum.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * Function fnmatch() as specified in POSIX 1003.2-1992, section B.6.
+ * Compares a filename or pathname to a pattern.
+ */
+
+/*
+ * Some notes on multibyte character support:
+ * 1. Patterns with illegal byte sequences match nothing.
+ * 2. Illegal byte sequences in the "string" argument are handled by treating
+ *    them as single-byte characters with a value of the first byte of the
+ *    sequence cast to wchar_t.
+ * 3. Multibyte conversion state objects (mbstate_t) are passed around and
+ *    used for most, but not all, conversions. Further work will be required
+ *    to support state-dependent encodings.
+ */
+
+#include "lint.h"
+#include <fnmatch.h>
+#include <limits.h>
+#include <string.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#include "collate.h"
+
+#define	EOS	'\0'
+
+#define	RANGE_MATCH	1
+#define	RANGE_NOMATCH	0
+#define	RANGE_ERROR	(-1)
+
+static int rangematch(const char *, wchar_t, int, char **, mbstate_t *);
+static int fnmatch1(const char *, const char *, const char *, int, mbstate_t,
+    mbstate_t);
+
+int
+fnmatch(pattern, string, flags)
+	const char *pattern, *string;
+	int flags;
+{
+	static const mbstate_t initial = { 0 };
+
+	return (fnmatch1(pattern, string, string, flags, initial, initial));
+}
+
+static int
+fnmatch1(const char *pattern, const char *string, const char *stringstart,
+    int flags, mbstate_t patmbs, mbstate_t strmbs)
+{
+	char *newp;
+	char c;
+	wchar_t pc, sc;
+	size_t pclen, sclen;
+
+	for (;;) {
+		pclen = mbrtowc(&pc, pattern, MB_LEN_MAX, &patmbs);
+		if (pclen == (size_t)-1 || pclen == (size_t)-2)
+			return (FNM_NOMATCH);
+		pattern += pclen;
+		sclen = mbrtowc(&sc, string, MB_LEN_MAX, &strmbs);
+		if (sclen == (size_t)-1 || sclen == (size_t)-2) {
+			sc = (unsigned char)*string;
+			sclen = 1;
+			(void) memset(&strmbs, 0, sizeof (strmbs));
+		}
+		switch (pc) {
+		case EOS:
+			/*
+			 * Removed FNM_LEADING_DIR, as it is not present
+			 * on Solaris.
+			 */
+			return (sc == EOS ? 0 : FNM_NOMATCH);
+		case '?':
+			if (sc == EOS)
+				return (FNM_NOMATCH);
+			if (sc == '/' && (flags & FNM_PATHNAME))
+				return (FNM_NOMATCH);
+			if (sc == '.' && (flags & FNM_PERIOD) &&
+			    (string == stringstart ||
+			    ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
+				return (FNM_NOMATCH);
+			string += sclen;
+			break;
+		case '*':
+			c = *pattern;
+			/* Collapse multiple stars. */
+			while (c == '*')
+				c = *++pattern;
+
+			if (sc == '.' && (flags & FNM_PERIOD) &&
+			    (string == stringstart ||
+			    ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
+				return (FNM_NOMATCH);
+
+			/* Optimize for pattern with * at end or before /. */
+			if (c == EOS)
+				if (flags & FNM_PATHNAME)
+					return (strchr(string, '/') == NULL ?
+					    0 : FNM_NOMATCH);
+				else
+					return (0);
+			else if (c == '/' && flags & FNM_PATHNAME) {
+				if ((string = strchr(string, '/')) == NULL)
+					return (FNM_NOMATCH);
+				break;
+			}
+
+			/* General case, use recursion. */
+			while (sc != EOS) {
+				if (!fnmatch1(pattern, string, stringstart,
+				    flags, patmbs, strmbs))
+					return (0);
+				sclen = mbrtowc(&sc, string, MB_LEN_MAX,
+				    &strmbs);
+				if (sclen == (size_t)-1 ||
+				    sclen == (size_t)-2) {
+					sc = (unsigned char)*string;
+					sclen = 1;
+					(void) memset(&strmbs, 0,
+					    sizeof (strmbs));
+				}
+				if (sc == '/' && flags & FNM_PATHNAME)
+					break;
+				string += sclen;
+			}
+			return (FNM_NOMATCH);
+		case '[':
+			if (sc == EOS)
+				return (FNM_NOMATCH);
+			if (sc == '/' && (flags & FNM_PATHNAME))
+				return (FNM_NOMATCH);
+			if (sc == '.' && (flags & FNM_PERIOD) &&
+			    (string == stringstart ||
+			    ((flags & FNM_PATHNAME) && *(string - 1) == '/')))
+				return (FNM_NOMATCH);
+
+			switch (rangematch(pattern, sc, flags, &newp,
+			    &patmbs)) {
+			case RANGE_ERROR:
+				goto norm;
+			case RANGE_MATCH:
+				pattern = newp;
+				break;
+			case RANGE_NOMATCH:
+				return (FNM_NOMATCH);
+			}
+			string += sclen;
+			break;
+		case '\\':
+			if (!(flags & FNM_NOESCAPE)) {
+				pclen = mbrtowc(&pc, pattern, MB_LEN_MAX,
+				    &patmbs);
+				if (pclen == (size_t)-1 || pclen == (size_t)-2)
+					return (FNM_NOMATCH);
+				if (pclen == 0)
+					pc = '\\';
+				pattern += pclen;
+			}
+			/* FALLTHROUGH */
+		default:
+		norm:
+			if (pc == sc)
+				string += sclen;
+
+			else if ((flags & FNM_IGNORECASE) &&
+			    (towlower(pc) == towlower(sc)))
+				string += sclen;
+			else
+				return (FNM_NOMATCH);
+
+			break;
+		}
+	}
+	/* NOTREACHED */
+}
+
+static int
+rangematch(pattern, test, flags, newp, patmbs)
+	const char *pattern;
+	wchar_t test;
+	int flags;
+	char **newp;
+	mbstate_t *patmbs;
+{
+	int negate, ok;
+	wchar_t c, c2;
+	size_t pclen;
+	const char *origpat;
+
+	/*
+	 * A bracket expression starting with an unquoted circumflex
+	 * character produces unspecified results (IEEE 1003.2-1992,
+	 * 3.13.2).  This implementation treats it like '!', for
+	 * consistency with the regular expression syntax.
+	 * J.T. Conklin (conklin@ngai.kaleida.com)
+	 */
+	if ((negate = (*pattern == '!' || *pattern == '^')) != 0)
+		++pattern;
+
+	if (flags & FNM_IGNORECASE)
+		test = towlower(test);
+
+	/*
+	 * A right bracket shall lose its special meaning and represent
+	 * itself in a bracket expression if it occurs first in the list.
+	 * -- POSIX.2 2.8.3.2
+	 */
+	ok = 0;
+	origpat = pattern;
+	for (;;) {
+		if (*pattern == ']' && pattern > origpat) {
+			pattern++;
+			break;
+		} else if (*pattern == '\0') {
+			return (RANGE_ERROR);
+		} else if (*pattern == '/' && (flags & FNM_PATHNAME)) {
+			return (RANGE_NOMATCH);
+		} else if (*pattern == '\\' && !(flags & FNM_NOESCAPE))
+			pattern++;
+		pclen = mbrtowc(&c, pattern, MB_LEN_MAX, patmbs);
+		if (pclen == (size_t)-1 || pclen == (size_t)-2)
+			return (RANGE_NOMATCH);
+		pattern += pclen;
+
+		if (flags & FNM_IGNORECASE)
+			c = towlower(c);
+
+		if (*pattern == '-' && *(pattern + 1) != EOS &&
+		    *(pattern + 1) != ']') {
+			if (*++pattern == '\\' && !(flags & FNM_NOESCAPE))
+				if (*pattern != EOS)
+					pattern++;
+			pclen = mbrtowc(&c2, pattern, MB_LEN_MAX, patmbs);
+			if (pclen == (size_t)-1 || pclen == (size_t)-2)
+				return (RANGE_NOMATCH);
+			pattern += pclen;
+			if (c2 == EOS)
+				return (RANGE_ERROR);
+
+			if (flags & FNM_IGNORECASE)
+				c2 = towlower(c2);
+
+			if (__collate_load_error ?
+			    c <= test && test <= c2 :
+			    __collate_range_cmp(c, test) <= 0 &&
+			    __collate_range_cmp(test, c2) <= 0)
+				ok = 1;
+		} else if (c == test)
+			ok = 1;
+	}
+
+	*newp = (char *)pattern;
+	return (ok == negate ? RANGE_NOMATCH : RANGE_MATCH);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/fputwc.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include "file64.h"
+#include "mtlib.h"
+#include "mse_int.h"
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <synch.h>
+#include "mblocal.h"
+#include "stdiom.h"
+#include "mse.h"
+
+#pragma weak	_putwc = putwc
+
+/*
+ * FreeBSD had both a MT safe and non-MT safe version.  For whatever reason,
+ * we don't need the non-MT safe version.  We do this because its faster,
+ * since we don't have to lock the file while doing the potentially expensive
+ * conversion from wide to mb.
+ *
+ * Solaris also has XPG5 and legacy semantics.  The new standard requires
+ * that the stream orientation change, but legacy calls don't do that.
+ *
+ * Note that we had the source for the XPG5 version of this, but it relied
+ * on closed implementation bits that we lack, so we supply replacements
+ * here.
+ */
+static wint_t
+__fputwc_impl(wchar_t wc, FILE *fp, int orient)
+{
+	char buf[MB_LEN_MAX];
+	size_t		i, len;
+	rmutex_t	*mx;
+
+	/* If we are given WEOF, then we have to stop */
+	if (wc == WEOF)
+		return (WEOF);
+
+	if (MB_CUR_MAX == 1 && wc > 0 && wc <= UCHAR_MAX) {
+		/*
+		 * Assume single-byte locale with no special encoding.
+		 * A more careful test would be to check
+		 * _CurrentRuneLocale->encoding.
+		 */
+		*buf = (unsigned char)wc;
+		len = 1;
+	} else {
+		/*
+		 * FreeBSD used restartable wcrtomb.  I think we can use
+		 * the simpler wctomb form here.  We should have a complete
+		 * decode.
+		 */
+		if ((len = wctomb(buf, wc)) == (size_t)-1) {
+			fp->_flag |= _IOERR;
+			errno = EILSEQ;
+			return (WEOF);
+		}
+	}
+
+	FLOCKFILE(mx, fp);
+	/*
+	 * This is used for XPG 5 semantics, which requires the stream
+	 * orientation to be changed when the function is called.
+	 */
+	if (orient && GET_NO_MODE(fp)) {
+		_setorientation(fp, _WC_MODE);
+	}
+	for (i = 0; i < len; i++) {
+		if (PUTC((unsigned char)buf[i], fp) == EOF) {
+			FUNLOCKFILE(mx);
+			return (WEOF);
+		}
+	}
+	FUNLOCKFILE(mx);
+	return ((wint_t)wc);
+}
+
+wint_t
+fputwc(wchar_t wc, FILE *fp)
+{
+	return (__fputwc_impl(wc, fp, 0));
+}
+
+/*
+ * Trivial functional form of the typical macro.
+ */
+#undef __putwc
+wint_t
+putwc(wchar_t wc, FILE *fp)
+{
+	return (__fputwc_impl(wc, fp, 0));
+}
+
+wint_t
+__fputwc_xpg5(wint_t wc, FILE *fp)
+{
+	return (__fputwc_impl(wc, fp, 1));
+}
+
+#undef __putwc_xpg5
+wint_t
+__putwc_xpg5(wint_t wc, FILE *fp)
+{
+	return (__fputwc_impl(wc, fp, 1));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/fputws.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,98 @@
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+#include "lint.h"
+#include "mse_int.h"
+#include "file64.h"
+#include "mtlib.h"
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include "mblocal.h"
+#include "stdiom.h"
+
+static int
+_fputws_impl(const wchar_t *_RESTRICT_KYWD ws, FILE *_RESTRICT_KYWD fp,
+    int orient)
+{
+	int nchars;
+	int nwritten;
+	char buf[BUFSIZ];
+	rmutex_t *lk;
+
+	/*
+	 * The FreeBSD implementation here was a bit more complex, because
+	 * it repeated much of what is in fputs.  For simplicity's sake, we
+	 * juse wctomb to convert the wide string to a mbs, and then use
+	 * fputs to print the mbs.
+	 */
+
+	nchars = wcslen(ws);
+	nwritten = 0;
+
+	FLOCKFILE(lk, fp);
+	if (orient && GET_NO_MODE(fp))
+		_setorientation(fp, _WC_MODE);
+
+	while (nchars > 0) {
+		int nbytes = 0;
+		char *ptr = buf;
+		while ((nbytes < (BUFSIZ - (MB_LEN_MAX * 2))) && nchars) {
+			int n;
+			if ((n = wctomb(ptr, *ws)) < 0) {
+				FUNLOCKFILE(lk);
+				fp->_flag |= _IOERR;
+				errno = EILSEQ;
+				return (EOF);
+			}
+			ws++;
+			ptr += n;
+			nbytes += n;
+			nchars--;
+		}
+		*ptr = '\0';
+		if (fputs(buf, fp) < nbytes) {
+			FUNLOCKFILE(lk);
+			return (EOF);
+		}
+		nwritten += nbytes;
+	}
+	FUNLOCKFILE(lk);
+	return (nwritten);
+}
+
+int
+fputws(const wchar_t *_RESTRICT_KYWD ws, FILE *_RESTRICT_KYWD fp)
+{
+	return (_fputws_impl(ws, fp, 0));
+}
+
+int
+__fputws_xpg5(const wchar_t *ws, FILE *fp)
+{
+	return (_fputws_impl(ws, fp, 1));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/fwide.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2002 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include "mse_int.h"
+#include "file64.h"
+#include "mse.h"
+#include <errno.h>
+#include <stdio.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+int
+fwide(FILE *fp, int mode)
+{
+	int m;
+	rmutex_t	*lk;
+
+	FLOCKFILE(lk, fp);
+	/* Only change the orientation if the stream is not oriented yet. */
+	m = _getorientation(fp);
+	if (mode != 0 && m == _NO_MODE)
+		_setorientation(fp, (mode > 0) ? _WC_MODE : _BYTE_MODE);
+	FUNLOCKFILE(lk);
+
+	switch (m) {
+	case _WC_MODE:
+		mode = 1;
+		break;
+	case _NO_MODE:
+		mode = 0;
+		break;
+	case _BYTE_MODE:
+		mode = -1;
+		break;
+	}
+
+	return (mode);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/gb18030.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,227 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * PRC National Standard GB 18030-2000 encoding of Chinese text.
+ *
+ * See gb18030(5) for details.
+ */
+
+#include "lint.h"
+#include <sys/types.h>
+#include <errno.h>
+#include "runetype.h"
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+
+static size_t	_GB18030_mbrtowc(wchar_t *_RESTRICT_KYWD,
+		    const char *_RESTRICT_KYWD,
+		    size_t, mbstate_t *_RESTRICT_KYWD);
+static int	_GB18030_mbsinit(const mbstate_t *);
+static size_t	_GB18030_wcrtomb(char *_RESTRICT_KYWD, wchar_t,
+		    mbstate_t *_RESTRICT_KYWD);
+
+typedef struct {
+	int	count;
+	uchar_t	bytes[4];
+} _GB18030State;
+
+int
+_GB18030_init(_RuneLocale *rl)
+{
+
+	__mbrtowc = _GB18030_mbrtowc;
+	__wcrtomb = _GB18030_wcrtomb;
+	__mbsinit = _GB18030_mbsinit;
+	_CurrentRuneLocale = rl;
+	__ctype[520] = 4;
+	charset_is_ascii = 0;
+
+	return (0);
+}
+
+static int
+_GB18030_mbsinit(const mbstate_t *ps)
+{
+
+	return (ps == NULL || ((const _GB18030State *)ps)->count == 0);
+}
+
+static size_t
+_GB18030_mbrtowc(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s,
+    size_t n, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_GB18030State *gs;
+	wchar_t wch;
+	int ch, len, ocount;
+	size_t ncopy;
+
+	gs = (_GB18030State *)ps;
+
+	if (gs->count < 0 || gs->count > sizeof (gs->bytes)) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL) {
+		s = "";
+		n = 1;
+		pwc = NULL;
+	}
+
+	ncopy = MIN(MIN(n, MB_CUR_MAX), sizeof (gs->bytes) - gs->count);
+	(void) memcpy(gs->bytes + gs->count, s, ncopy);
+	ocount = gs->count;
+	gs->count += ncopy;
+	s = (char *)gs->bytes;
+	n = gs->count;
+
+	if (n == 0)
+		/* Incomplete multibyte sequence */
+		return ((size_t)-2);
+
+	/*
+	 * Single byte:		[00-7f]
+	 * Two byte:		[81-fe][40-7e,80-fe]
+	 * Four byte:		[81-fe][30-39][81-fe][30-39]
+	 */
+	ch = (unsigned char)*s++;
+	if (ch <= 0x7f) {
+		len = 1;
+		wch = ch;
+	} else if (ch >= 0x81 && ch <= 0xfe) {
+		wch = ch;
+		if (n < 2)
+			return ((size_t)-2);
+		ch = (unsigned char)*s++;
+		if ((ch >= 0x40 && ch <= 0x7e) || (ch >= 0x80 && ch <= 0xfe)) {
+			wch = (wch << 8) | ch;
+			len = 2;
+		} else if (ch >= 0x30 && ch <= 0x39) {
+			/*
+			 * Strip high bit off the wide character we will
+			 * eventually output so that it is positive when
+			 * cast to wint_t on 32-bit twos-complement machines.
+			 */
+			wch = ((wch & 0x7f) << 8) | ch;
+			if (n < 3)
+				return ((size_t)-2);
+			ch = (unsigned char)*s++;
+			if (ch < 0x81 || ch > 0xfe)
+				goto ilseq;
+			wch = (wch << 8) | ch;
+			if (n < 4)
+				return ((size_t)-2);
+			ch = (unsigned char)*s++;
+			if (ch < 0x30 || ch > 0x39)
+				goto ilseq;
+			wch = (wch << 8) | ch;
+			len = 4;
+		} else
+			goto ilseq;
+	} else
+		goto ilseq;
+
+	if (pwc != NULL)
+		*pwc = wch;
+	gs->count = 0;
+	return (wch == L'\0' ? 0 : len - ocount);
+ilseq:
+	errno = EILSEQ;
+	return ((size_t)-1);
+}
+
+static size_t
+_GB18030_wcrtomb(char *_RESTRICT_KYWD s, wchar_t wc,
+    mbstate_t *_RESTRICT_KYWD ps)
+{
+	_GB18030State *gs;
+	size_t len;
+	int c;
+
+	gs = (_GB18030State *)ps;
+
+	if (gs->count != 0) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL)
+		/* Reset to initial shift state (no-op) */
+		return (1);
+	if ((wc & ~0x7fffffff) != 0)
+		goto ilseq;
+	if (wc & 0x7f000000) {
+		/* Replace high bit that mbrtowc() removed. */
+		wc |= 0x80000000;
+		c = (wc >> 24) & 0xff;
+		if (c < 0x81 || c > 0xfe)
+			goto ilseq;
+		*s++ = c;
+		c = (wc >> 16) & 0xff;
+		if (c < 0x30 || c > 0x39)
+			goto ilseq;
+		*s++ = c;
+		c = (wc >> 8) & 0xff;
+		if (c < 0x81 || c > 0xfe)
+			goto ilseq;
+		*s++ = c;
+		c = wc & 0xff;
+		if (c < 0x30 || c > 0x39)
+			goto ilseq;
+		*s++ = c;
+		len = 4;
+	} else if (wc & 0x00ff0000)
+		goto ilseq;
+	else if (wc & 0x0000ff00) {
+		c = (wc >> 8) & 0xff;
+		if (c < 0x81 || c > 0xfe)
+			goto ilseq;
+		*s++ = c;
+		c = wc & 0xff;
+		if (c < 0x40 || c == 0x7f || c == 0xff)
+			goto ilseq;
+		*s++ = c;
+		len = 2;
+	} else if (wc <= 0x7f) {
+		*s++ = wc;
+		len = 1;
+	} else
+		goto ilseq;
+
+	return (len);
+ilseq:
+	errno = EILSEQ;
+	return ((size_t)-1);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/gb2312.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,161 @@
+/*
+ * Copyright (c) 2004 Tim J. Robbins. All rights reserved.
+ * Copyright (c) 2003 David Xu <davidxu@freebsd.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <sys/types.h>
+#include <errno.h>
+#include "runetype.h"
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+static size_t	_GB2312_mbrtowc(wchar_t *_RESTRICT_KYWD,
+		    const char *_RESTRICT_KYWD,
+		    size_t, mbstate_t *_RESTRICT_KYWD);
+static int	_GB2312_mbsinit(const mbstate_t *);
+static size_t	_GB2312_wcrtomb(char *_RESTRICT_KYWD, wchar_t,
+		    mbstate_t *_RESTRICT_KYWD);
+
+typedef struct {
+	int	count;
+	uchar_t	bytes[2];
+} _GB2312State;
+
+int
+_GB2312_init(_RuneLocale *rl)
+{
+
+	_CurrentRuneLocale = rl;
+	__mbrtowc = _GB2312_mbrtowc;
+	__wcrtomb = _GB2312_wcrtomb;
+	__mbsinit = _GB2312_mbsinit;
+	__ctype[520] = 2;
+	charset_is_ascii = 0;
+	return (0);
+}
+
+static int
+_GB2312_mbsinit(const mbstate_t *ps)
+{
+
+	return (ps == NULL || ((const _GB2312State *)ps)->count == 0);
+}
+
+static int
+_GB2312_check(const char *str, size_t n)
+{
+	const uchar_t *s = (const uchar_t *)str;
+
+	if (n == 0)
+		/* Incomplete multibyte sequence */
+		return (-2);
+	if (s[0] >= 0xa1 && s[0] <= 0xfe) {
+		if (n < 2)
+			/* Incomplete multibyte sequence */
+			return (-2);
+		if (s[1] < 0xa1 || s[1] > 0xfe)
+			/* Invalid multibyte sequence */
+			return (-1);
+		return (2);
+	} else if (s[0] & 0x80) {
+		/* Invalid multibyte sequence */
+		return (-1);
+	}
+	return (1);
+}
+
+static size_t
+_GB2312_mbrtowc(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s,
+    size_t n, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_GB2312State *gs;
+	wchar_t wc;
+	int i, len, ocount;
+	size_t ncopy;
+
+	gs = (_GB2312State *)ps;
+
+	if (gs->count < 0 || gs->count > sizeof (gs->bytes)) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL) {
+		s = "";
+		n = 1;
+		pwc = NULL;
+	}
+
+	ncopy = MIN(MIN(n, MB_CUR_MAX), sizeof (gs->bytes) - gs->count);
+	(void) memcpy(gs->bytes + gs->count, s, ncopy);
+	ocount = gs->count;
+	gs->count += ncopy;
+	s = (char *)gs->bytes;
+	n = gs->count;
+
+	if ((len = _GB2312_check(s, n)) < 0)
+		return ((size_t)len);
+	wc = 0;
+	i = len;
+	while (i-- > 0)
+		wc = (wc << 8) | (unsigned char)*s++;
+	if (pwc != NULL)
+		*pwc = wc;
+	gs->count = 0;
+	return (wc == L'\0' ? 0 : len - ocount);
+}
+
+static size_t
+_GB2312_wcrtomb(char *_RESTRICT_KYWD s, wchar_t wc,
+    mbstate_t *_RESTRICT_KYWD ps)
+{
+	_GB2312State *gs;
+
+	gs = (_GB2312State *)ps;
+
+	if (gs->count != 0) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL)
+		/* Reset to initial shift state (no-op) */
+		return (1);
+	if (wc & 0x8000) {
+		*s++ = (wc >> 8) & 0xff;
+		*s = wc & 0xff;
+		return (2);
+	}
+	*s = wc & 0xff;
+	return (1);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/gbk.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,170 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved.
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <sys/types.h>
+#include <errno.h>
+#include "runetype.h"
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+static size_t	_GBK_mbrtowc(wchar_t *_RESTRICT_KYWD,
+		    const char *_RESTRICT_KYWD,
+		    size_t, mbstate_t *_RESTRICT_KYWD);
+static int	_GBK_mbsinit(const mbstate_t *);
+static size_t	_GBK_wcrtomb(char *_RESTRICT_KYWD, wchar_t,
+		    mbstate_t *_RESTRICT_KYWD);
+
+typedef struct {
+	wchar_t	ch;
+} _GBKState;
+
+int
+_GBK_init(_RuneLocale *rl)
+{
+
+	__mbrtowc = _GBK_mbrtowc;
+	__wcrtomb = _GBK_wcrtomb;
+	__mbsinit = _GBK_mbsinit;
+	_CurrentRuneLocale = rl;
+	__ctype[520] = 2;
+	charset_is_ascii = 0;
+	return (0);
+}
+
+static int
+_GBK_mbsinit(const mbstate_t *ps)
+{
+
+	return (ps == NULL || ((const _GBKState *)ps)->ch == 0);
+}
+
+static int
+_gbk_check(uint_t c)
+{
+
+	c &= 0xff;
+	return ((c >= 0x81 && c <= 0xfe) ? 2 : 1);
+}
+
+static size_t
+_GBK_mbrtowc(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s,
+    size_t n, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_GBKState *gs;
+	wchar_t wc;
+	size_t len;
+
+	gs = (_GBKState *)ps;
+
+	if ((gs->ch & ~0xFF) != 0) {
+		/* Bad conversion state. */
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL) {
+		s = "";
+		n = 1;
+		pwc = NULL;
+	}
+
+	if (n == 0)
+		/* Incomplete multibyte sequence */
+		return ((size_t)-2);
+
+	if (gs->ch != 0) {
+		if (*s == '\0') {
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		wc = (gs->ch << 8) | (*s & 0xFF);
+		if (pwc != NULL)
+			*pwc = wc;
+		gs->ch = 0;
+		return (1);
+	}
+
+	len = (size_t)_gbk_check(*s);
+	wc = *s++ & 0xff;
+	if (len == 2) {
+		if (n < 2) {
+			/* Incomplete multibyte sequence */
+			gs->ch = wc;
+			return ((size_t)-2);
+		}
+		if (*s == '\0') {
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		wc = (wc << 8) | (*s++ & 0xff);
+		if (pwc != NULL)
+			*pwc = wc;
+		return (2);
+	} else {
+		if (pwc != NULL)
+			*pwc = wc;
+		return (wc == L'\0' ? 0 : 1);
+	}
+}
+
+static size_t
+_GBK_wcrtomb(char *_RESTRICT_KYWD s, wchar_t wc, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_GBKState *gs;
+
+	gs = (_GBKState *)ps;
+
+	if (gs->ch != 0) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL)
+		/* Reset to initial shift state (no-op) */
+		return (1);
+	if (wc & 0x8000) {
+		*s++ = (wc >> 8) & 0xff;
+		*s = wc & 0xff;
+		return (2);
+	}
+	*s = wc & 0xff;
+	return (1);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/getdate.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,301 @@
+/*
+ * Copyright (c) 2009 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Brian Ginsbach.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include "file64.h"
+#include <sys/types.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+#include <sys/stat.h>
+
+#define	TMSENTINEL	(-1)
+
+
+/*
+ * getdate_err is set to one of the following values on error.
+ *
+ * 1	The DATEMSK environment variable is null or undefined.
+ * 2	The template file cannot be opened for reading.
+ * 3	Failed to get file status information.
+ * 4	Template file is not a regular file.
+ * 5	Encountered an error while reading the template file.
+ * 6	Cannot allocate memory.
+ * 7	Input string does not match any line in the template.
+ * 8	Input string is invalid (for example, February 31) or could not
+ *	be represented in a time_t.
+ *
+ * Note that on Solaris, getdate_err is possibly a function, to account
+ * for reentrancy.  See the code for getdate_err.c for details.
+ */
+
+
+#pragma	weak	_getdate = getdate
+struct tm *
+getdate(const char *str)
+{
+	char *datemsk, *line, *rp;
+	FILE *fp;
+	struct stat sb;
+	static struct tm rtm, tmnow;
+	struct tm *tmp, *rtmp = &rtm;
+	time_t now;
+	char buf[514];
+
+	if (((datemsk = getenv("DATEMSK")) == NULL) || *datemsk == '\0') {
+		getdate_err = 1;
+		return (NULL);
+	}
+
+	if (stat(datemsk, &sb) < 0) {
+		getdate_err = 3;
+		return (NULL);
+	}
+
+	if ((sb.st_mode & S_IFMT) != S_IFREG) {
+		getdate_err = 4;
+		return (NULL);
+	}
+
+	if ((fp = fopen(datemsk, "r")) == NULL) {
+		getdate_err = 2;
+		return (NULL);
+	}
+
+	/* loop through datemsk file */
+	errno = 0;
+	rp = NULL;
+
+	/*
+	 * The NetBSD implementation supports a rich flexible file format
+	 * with embedded escapes, etc.  We don't need any of that.  Solaris
+	 * just reads the template file and (undocumented!) requires that
+	 * each line not exceed 512 bytes, using a fixed buffer.   We could
+	 * improve on that, but this may grow the stack unreasonably, so
+	 * we keep it to the same 512 limit.  Some day we can be smarter.
+	 * (Note FreeBSD doesn't even have getdate(), and IMO nobody sane
+	 * should be using this crufty API.  strptime is better.)
+	 */
+
+	(void) memset(buf, 0, sizeof (buf));
+	while ((line = fgets(buf, sizeof (buf), fp)) != NULL) {
+		/*
+		 * If the buffer consumed the entire string, then
+		 * the input line was too long.  We just check to
+		 * see if the 2nd to last byte is set.  If it isn't,
+		 * then we hit a null byte first, and the line is
+		 * short enough.
+		 */
+		if (buf[sizeof (buf) - 2] != 0) {
+			getdate_err = 5;
+			(void) fclose(fp);
+			return (NULL);
+		}
+		/* initialize tmp with sentinels */
+		rtm.tm_sec = rtm.tm_min = rtm.tm_hour = TMSENTINEL;
+		rtm.tm_mday = rtm.tm_mon = rtm.tm_year = TMSENTINEL;
+		rtm.tm_wday = rtm.tm_yday = rtm.tm_isdst = TMSENTINEL;
+		rp = strptime(str, line, rtmp);
+		if (rp != NULL)
+			break;
+		errno = 0;
+	}
+	if (errno != 0 || ferror(fp)) {
+		if (errno == ENOMEM)
+			getdate_err = 6;
+		else
+			getdate_err = 5;
+		(void) fclose(fp);
+		return (NULL);
+	}
+	if (feof(fp) || (rp != NULL && *rp != '\0')) {
+		getdate_err = 7;
+		return (NULL);
+	}
+	(void) fclose(fp);
+
+	(void) time(&now);
+	tmp = localtime(&now);
+	tmnow = *tmp;
+
+	/*
+	 * This implementation does not accept setting the broken-down time
+	 * to anything other than the localtime().  It is not possible to
+	 * change the scanned timezone with %Z.
+	 *
+	 * Note IRIX and Solaris accept only the current zone for %Z.
+	 * XXX Is there any implementation that matches the standard?
+	 * XXX (Or am I reading the standard wrong?)
+	 *
+	 * Note: Neither XPG 6 (POSIX 2004) nor XPG 7 (POSIX 2008)
+	 * requires strptime(3) support for %Z.
+	 */
+
+	/*
+	 * Given only a weekday find the first matching weekday starting
+	 * with the current weekday and moving into the future.
+	 */
+	if (rtm.tm_wday != TMSENTINEL && rtm.tm_year == TMSENTINEL &&
+	    rtm.tm_mon == TMSENTINEL && rtm.tm_mday == TMSENTINEL) {
+		rtm.tm_year = tmnow.tm_year;
+		rtm.tm_mon = tmnow.tm_mon;
+		rtm.tm_mday = tmnow.tm_mday +
+		    (rtm.tm_wday - tmnow.tm_wday + 7) % 7;
+	}
+
+	/*
+	 * Given only a month (and no year) find the first matching month
+	 * starting with the current month and moving into the future.
+	 */
+	if (rtm.tm_mon != TMSENTINEL) {
+		if (rtm.tm_year == TMSENTINEL) {
+			rtm.tm_year = tmnow.tm_year +
+			    ((rtm.tm_mon < tmnow.tm_mon)? 1 : 0);
+		}
+		if (rtm.tm_mday == TMSENTINEL) {
+			/* assume the first of the month */
+			rtm.tm_mday = 1;
+			/*
+			 * XXX This isn't documented! Just observed behavior.
+			 *
+			 * Given the weekday find the first matching weekday
+			 * starting with the weekday of the first day of the
+			 * the month and moving into the future.
+			 */
+			if (rtm.tm_wday != TMSENTINEL) {
+				struct tm tm;
+
+				(void) memset(&tm, 0, sizeof (struct tm));
+				tm.tm_year = rtm.tm_year;
+				tm.tm_mon = rtm.tm_mon;
+				tm.tm_mday = 1;
+				(void) mktime(&tm);
+				rtm.tm_mday +=
+				    (rtm.tm_wday - tm.tm_wday + 7) % 7;
+			}
+		}
+	}
+
+	/*
+	 * Given no time of day assume the current time of day.
+	 */
+	if (rtm.tm_hour == TMSENTINEL &&
+	    rtm.tm_min == TMSENTINEL && rtm.tm_sec == TMSENTINEL) {
+		rtm.tm_hour = tmnow.tm_hour;
+		rtm.tm_min = tmnow.tm_min;
+		rtm.tm_sec = tmnow.tm_sec;
+	}
+	/*
+	 * Given an hour and no date, find the first matching hour starting
+	 * with the current hour and moving into the future
+	 */
+	if (rtm.tm_hour != TMSENTINEL &&
+	    rtm.tm_year == TMSENTINEL && rtm.tm_mon == TMSENTINEL &&
+	    rtm.tm_mday == TMSENTINEL) {
+		rtm.tm_year = tmnow.tm_year;
+		rtm.tm_mon = tmnow.tm_mon;
+		rtm.tm_mday = tmnow.tm_mday;
+		if (rtm.tm_hour < tmnow.tm_hour)
+			rtm.tm_hour += 24;
+	}
+
+	/*
+	 * Set to 'sane' values; mktime(3) does funny things otherwise.
+	 * No hours, no minutes, no seconds, no service.
+	 */
+	if (rtm.tm_hour == TMSENTINEL)
+		rtm.tm_hour = 0;
+	if (rtm.tm_min == TMSENTINEL)
+		rtm.tm_min = 0;
+	if (rtm.tm_sec == TMSENTINEL)
+		rtm.tm_sec = 0;
+
+	/*
+	 * Given only a year the values of month, day of month, day of year,
+	 * week day and is daylight (summer) time are unspecified.
+	 * (Specified on the Solaris man page not POSIX.)
+	 */
+	if (rtm.tm_year != TMSENTINEL &&
+	    rtm.tm_mon == TMSENTINEL && rtm.tm_mday == TMSENTINEL) {
+		rtm.tm_mon = 0;
+		rtm.tm_mday = 1;
+		/*
+		 * XXX More undocumented functionality but observed.
+		 *
+		 * Given the weekday find the first matching weekday
+		 * starting with the weekday of the first day of the
+		 * month and moving into the future.
+		 */
+		if (rtm.tm_wday != TMSENTINEL) {
+			struct tm tm;
+
+			(void) memset(&tm, 0, sizeof (struct tm));
+			tm.tm_year = rtm.tm_year;
+			tm.tm_mon = rtm.tm_mon;
+			tm.tm_mday = 1;
+			(void) mktime(&tm);
+			rtm.tm_mday += (rtm.tm_wday - tm.tm_wday + 7) % 7;
+		}
+	}
+
+	/*
+	 * Given only the century but no year within, the current year
+	 * is assumed.  (Specified on the Solaris man page not POSIX.)
+	 *
+	 * Warning ugly end case
+	 *
+	 * This is more work since strptime(3) doesn't "do the right thing".
+	 */
+	if (rtm.tm_year != TMSENTINEL && (rtm.tm_year - 1900) >= 0) {
+		rtm.tm_year -= 1900;
+		rtm.tm_year += (tmnow.tm_year % 100);
+	}
+
+	/*
+	 * mktime() will normalize all values and also check that the
+	 * value will fit into a time_t.
+	 *
+	 * This is only for POSIX correctness.	A date >= 1900 is
+	 * really ok, but using a time_t limits things.
+	 */
+	if (mktime(rtmp) < 0) {
+		getdate_err = 8;
+		return (NULL);
+	}
+
+	return (rtmp);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/iswctype.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,237 @@
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <wctype.h>
+#include "runefile.h"
+#include "runetype.h"
+#include "_ctype.h"
+
+/*
+ * We removed: iswascii, iswrune, iswhexnumber, and iswnumber, as
+ * these are not present on Solaris.  Note that the standard requires
+ * iswascii to be a macro, so it is defined in our headers.
+ *
+ * We renamed (per Solaris) iswideogram, iswspecial, iswspecial to the
+ * equivalent values without "w".  We added a new isnumber, that looks
+ * for non-ASCII numbers.
+ */
+
+static int
+__istype(wint_t c, unsigned int f)
+{
+	unsigned int rt;
+
+	/* Fast path for single byte locales */
+	if (c < 0 || c >= _CACHED_RUNES)
+		rt =  ___runetype(c);
+	else
+		rt = _CurrentRuneLocale->__runetype[c];
+	return (rt & f);
+}
+
+static int
+__isctype(wint_t c, unsigned int f)
+{
+	unsigned int rt;
+
+	/* Fast path for single byte locales */
+	if (c < 0 || c >= _CACHED_RUNES)
+		return (0);
+	else
+		rt = _CurrentRuneLocale->__runetype[c];
+	return (rt & f);
+}
+
+#undef iswctype
+int
+iswctype(wint_t wc, wctype_t class)
+{
+	return (__istype(wc, class));
+}
+
+#undef _iswctype
+unsigned
+_iswctype(wchar_t wc, int class)
+{
+	return (__istype((wint_t)wc, (unsigned int)class));
+}
+
+#undef iswalnum
+int
+iswalnum(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_A|_CTYPE_D));
+}
+
+#undef iswalpha
+int
+iswalpha(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_A));
+}
+
+#undef iswblank
+int
+iswblank(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_B));
+}
+
+#undef iswcntrl
+int
+iswcntrl(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_C));
+}
+
+#undef iswdigit
+int
+iswdigit(wint_t wc)
+{
+	return (__isctype(wc, _CTYPE_D));
+}
+
+#undef iswgraph
+int
+iswgraph(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_G));
+}
+
+#undef isideogram
+int
+isideogram(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_I));
+}
+
+#undef iswlower
+int
+iswlower(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_L));
+}
+
+#undef isphonogram
+int
+isphonogram(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_Q));
+}
+
+#undef iswprint
+int
+iswprint(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_R));
+}
+
+#undef iswpunct
+int
+iswpunct(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_P));
+}
+
+#undef iswspace
+int
+iswspace(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_S));
+}
+
+#undef iswupper
+int
+iswupper(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_U));
+}
+
+#undef iswxdigit
+int
+iswxdigit(wint_t wc)
+{
+	return (__isctype(wc, _CTYPE_X));
+}
+
+#undef isenglish
+int
+isenglish(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_E));
+}
+
+#undef isspecial
+int
+isspecial(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_T));
+}
+
+#undef isnumber
+int
+isnumber(wint_t wc)
+{
+	return (__istype(wc, _CTYPE_N));
+}
+
+/*
+ * FreeBSD has iswrune() for use by external programs, and this is used by
+ * the "tr" program.  As that program is part of our consolidation, we
+ * provide an _ILLUMOS_PRIVATE version of this function that we can use.
+ *
+ * No programs that are not part of the illumos stack itself should use
+ * this function -- programs that do reference will not be portable to
+ * other versions of SunOS or Solaris.
+ */
+int
+__iswrune(wint_t wc)
+{
+	/*
+	 * Note, FreeBSD ignored the low order byte, as they encode their
+	 * ctype values differently.  We can't do that (ctype is baked into
+	 * applications), but instead can just check if *any* bit is set in
+	 * the ctype.  Any bit being set indicates its a valid rune.
+	 */
+	return (__istype(wc, 0xffffffffU));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/ldpart.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ */
+
+#include "lint.h"
+#include "file64.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <stdio.h>
+
+#include "ldpart.h"
+#include "setlocale.h"
+
+static int split_lines(char *, const char *);
+
+int
+__part_load_locale(const char *name, int *using_locale,
+    char **locale_buf, const char *category_filename,
+    int locale_buf_size_max, int locale_buf_size_min,
+    const char **dst_localebuf)
+{
+	int		saverr, fd, i, num_lines;
+	char		*lbuf, *p;
+	const char	*plim;
+	char		filename[PATH_MAX];
+	struct stat	st;
+	size_t		namesize, bufsize;
+
+	/* 'name' must be already checked. */
+	if (strcmp(name, "C") == 0 || strcmp(name, "POSIX") == 0) {
+		*using_locale = 0;
+		return (_LDP_CACHE);
+	}
+
+	/*
+	 * If the locale name is the same as our cache, use the cache.
+	 */
+	if (*locale_buf != NULL && strcmp(name, *locale_buf) == 0) {
+		*using_locale = 1;
+		return (_LDP_CACHE);
+	}
+
+	/*
+	 * Slurp the locale file into the cache.
+	 */
+	namesize = strlen(name) + 1;
+
+	/* 'PathLocale' must be already set & checked. */
+
+	(void) snprintf(filename, sizeof (filename), "%s/%s/%s/LCL_DATA",
+	    _PathLocale, name, category_filename);
+
+	if ((fd = open(filename, O_RDONLY)) < 0)
+		return (_LDP_ERROR);
+	if (fstat(fd, &st) != 0)
+		goto bad_locale;
+	if (st.st_size <= 0) {
+		errno = EINVAL;
+		goto bad_locale;
+	}
+	bufsize = namesize + st.st_size;
+	if ((lbuf = malloc(bufsize)) == NULL) {
+		errno = ENOMEM;
+		goto bad_locale;
+	}
+	(void) strcpy(lbuf, name);
+	p = lbuf + namesize;
+	plim = p + st.st_size;
+	if (read(fd, p, (size_t)st.st_size) != st.st_size)
+		goto bad_lbuf;
+	/*
+	 * Parse the locale file into localebuf.
+	 */
+	if (plim[-1] != '\n') {
+		errno = EINVAL;
+		goto bad_lbuf;
+	}
+	num_lines = split_lines(p, plim);
+	if (num_lines >= locale_buf_size_max)
+		num_lines = locale_buf_size_max;
+	else if (num_lines >= locale_buf_size_min)
+		num_lines = locale_buf_size_min;
+	else {
+		errno = EINVAL;
+		goto bad_lbuf;
+	}
+	(void) close(fd);
+	/*
+	 * Record the successful parse in the cache.
+	 */
+	if (*locale_buf != NULL)
+		free(*locale_buf);
+	*locale_buf = lbuf;
+	for (p = *locale_buf, i = 0; i < num_lines; i++)
+		dst_localebuf[i] = (p += strlen(p) + 1);
+	for (i = num_lines; i < locale_buf_size_max; i++)
+		dst_localebuf[i] = NULL;
+	*using_locale = 1;
+
+	return (_LDP_LOADED);
+
+bad_lbuf:
+	saverr = errno;
+	free(lbuf);
+	errno = saverr;
+bad_locale:
+	saverr = errno;
+	(void) close(fd);
+	errno = saverr;
+
+	return (_LDP_ERROR);
+}
+
+static int
+split_lines(char *p, const char *plim)
+{
+	int i;
+
+	i = 0;
+	while (p < plim) {
+		if (*p == '\n') {
+			*p = '\0';
+			i++;
+		}
+		p++;
+	}
+	return (i);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/ldpart.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _LDPART_H_
+#define	_LDPART_H_
+
+#define	_LDP_LOADED 0
+#define	_LDP_ERROR  (-1)
+#define	_LDP_CACHE  1
+
+int	__part_load_locale(const char *, int *, char **, const char *,
+		    int, int, const char **);
+
+#endif /* !_LDPART_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/lmessages.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,77 @@
+/*
+ * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <stddef.h>
+#include "ldpart.h"
+#include "lmessages.h"
+
+#define	LCMESSAGES_SIZE_FULL (sizeof (struct lc_messages_T) / sizeof (char *))
+#define	LCMESSAGES_SIZE_MIN \
+	(offsetof(struct lc_messages_T, yesstr) / sizeof (char *))
+
+static char empty[] = "";
+
+static const struct lc_messages_T _C_messages_locale = {
+	"^[yY]",	/* yesexpr */
+	"^[nN]",	/* noexpr */
+	"yes",		/* yesstr */
+	"no"		/* nostr */
+};
+
+static struct lc_messages_T _messages_locale;
+static int	_messages_using_locale;
+static char	*_messages_locale_buf;
+
+int
+__messages_load_locale(const char *name)
+{
+	int ret;
+
+	ret = __part_load_locale(name, &_messages_using_locale,
+	    &_messages_locale_buf, "LC_MESSAGES",
+	    LCMESSAGES_SIZE_FULL, LCMESSAGES_SIZE_MIN,
+	    (const char **)&_messages_locale);
+	if (ret == _LDP_LOADED) {
+		if (_messages_locale.yesstr == NULL)
+			_messages_locale.yesstr = empty;
+		if (_messages_locale.nostr == NULL)
+			_messages_locale.nostr = empty;
+	}
+	return (ret);
+}
+
+struct lc_messages_T *
+__get_current_messages_locale(void)
+{
+	return (_messages_using_locale ? &_messages_locale :
+	    (struct lc_messages_T *)&_C_messages_locale);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/lmessages.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,40 @@
+/*
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _LMESSAGES_H_
+#define	_LMESSAGES_H_
+
+struct	lc_messages_T {
+	const char	*yesexpr;
+	const char	*noexpr;
+	const char	*yesstr;
+	const char	*nostr;
+};
+
+struct lc_messages_T *__get_current_messages_locale(void);
+int	__messages_load_locale(const char *);
+
+#endif /* !_LMESSAGES_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/lmonetary.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <limits.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include "ldpart.h"
+#include "lmonetary.h"
+
+extern int __mlocale_changed;
+extern const char *__fix_locale_grouping_str(const char *);
+
+#define	LCMONETARY_SIZE_FULL (sizeof (struct lc_monetary_T) / sizeof (char *))
+#define	LCMONETARY_SIZE_MIN \
+	(offsetof(struct lc_monetary_T, int_p_cs_precedes) / sizeof (char *))
+
+static char	empty[] = "";
+static char	numempty[] = { CHAR_MAX, '\0' };
+
+static const struct lc_monetary_T _C_monetary_locale = {
+	empty,		/* int_curr_symbol */
+	empty,		/* currency_symbol */
+	empty,		/* mon_decimal_point */
+	empty,		/* mon_thousands_sep */
+	numempty,	/* mon_grouping */
+	empty,		/* positive_sign */
+	empty,		/* negative_sign */
+	numempty,	/* int_frac_digits */
+	numempty,	/* frac_digits */
+	numempty,	/* p_cs_precedes */
+	numempty,	/* p_sep_by_space */
+	numempty,	/* n_cs_precedes */
+	numempty,	/* n_sep_by_space */
+	numempty,	/* p_sign_posn */
+	numempty,	/* n_sign_posn */
+	numempty,	/* int_p_cs_precedes */
+	numempty,	/* int_n_cs_precedes */
+	numempty,	/* int_p_sep_by_space */
+	numempty,	/* int_n_sep_by_space */
+	numempty,	/* int_p_sign_posn */
+	numempty	/* int_n_sign_posn */
+};
+
+static struct lc_monetary_T _monetary_locale;
+static int	_monetary_using_locale;
+static char	*_monetary_locale_buf;
+
+static char
+cnv(const char *str)
+{
+	int i = strtol(str, NULL, 10);
+
+	if (i == -1)
+		i = CHAR_MAX;
+	return ((char)i);
+}
+
+int
+__monetary_load_locale(const char *name)
+{
+	int ret;
+
+	ret = __part_load_locale(name, &_monetary_using_locale,
+	    &_monetary_locale_buf, "LC_MONETARY",
+	    LCMONETARY_SIZE_FULL, LCMONETARY_SIZE_MIN,
+	    (const char **)&_monetary_locale);
+	if (ret != _LDP_ERROR)
+		__mlocale_changed = 1;
+	if (ret == _LDP_LOADED) {
+		_monetary_locale.mon_grouping =
+		    __fix_locale_grouping_str(_monetary_locale.mon_grouping);
+
+#define	M_ASSIGN_CHAR(NAME) \
+		(((char *)_monetary_locale.NAME)[0] = \
+			cnv(_monetary_locale.NAME))
+
+		M_ASSIGN_CHAR(int_frac_digits);
+		M_ASSIGN_CHAR(frac_digits);
+		M_ASSIGN_CHAR(p_cs_precedes);
+		M_ASSIGN_CHAR(p_sep_by_space);
+		M_ASSIGN_CHAR(n_cs_precedes);
+		M_ASSIGN_CHAR(n_sep_by_space);
+		M_ASSIGN_CHAR(p_sign_posn);
+		M_ASSIGN_CHAR(n_sign_posn);
+
+		/*
+		 * The six additional C99 international monetary formatting
+		 * parameters default to the national parameters when
+		 * reading FreeBSD LC_MONETARY data files.
+		 */
+#define	M_ASSIGN_ICHAR(NAME)					\
+		if (_monetary_locale.int_##NAME == NULL)	\
+			_monetary_locale.int_##NAME =		\
+			    _monetary_locale.NAME;		\
+		else						\
+			M_ASSIGN_CHAR(int_##NAME);
+
+		M_ASSIGN_ICHAR(p_cs_precedes);
+		M_ASSIGN_ICHAR(n_cs_precedes);
+		M_ASSIGN_ICHAR(p_sep_by_space);
+		M_ASSIGN_ICHAR(n_sep_by_space);
+		M_ASSIGN_ICHAR(p_sign_posn);
+		M_ASSIGN_ICHAR(n_sign_posn);
+	}
+	return (ret);
+}
+
+struct lc_monetary_T *
+__get_current_monetary_locale(void)
+{
+	return (_monetary_using_locale ? &_monetary_locale :
+	    (struct lc_monetary_T *)&_C_monetary_locale);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/lmonetary.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _LMONETARY_H_
+#define	_LMONETARY_H_
+
+struct lc_monetary_T {
+	const char	*int_curr_symbol;
+	const char	*currency_symbol;
+	const char	*mon_decimal_point;
+	const char	*mon_thousands_sep;
+	const char	*mon_grouping;
+	const char	*positive_sign;
+	const char	*negative_sign;
+	const char	*int_frac_digits;
+	const char	*frac_digits;
+	const char	*p_cs_precedes;
+	const char	*p_sep_by_space;
+	const char	*n_cs_precedes;
+	const char	*n_sep_by_space;
+	const char	*p_sign_posn;
+	const char	*n_sign_posn;
+	const char	*int_p_cs_precedes;
+	const char	*int_n_cs_precedes;
+	const char	*int_p_sep_by_space;
+	const char	*int_n_sep_by_space;
+	const char	*int_p_sign_posn;
+	const char	*int_n_sign_posn;
+};
+
+struct lc_monetary_T *__get_current_monetary_locale(void);
+int	__monetary_load_locale(const char *);
+
+#endif /* !_LMONETARY_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/lnumeric.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <limits.h>
+#include "ldpart.h"
+#include "lnumeric.h"
+#include "../i18n/_locale.h"
+
+extern int __nlocale_changed;
+extern const char *__fix_locale_grouping_str(const char *);
+
+#define	LCNUMERIC_SIZE (sizeof (struct lc_numeric_T) / sizeof (char *))
+
+static char	numempty[] = { CHAR_MAX, '\0' };
+
+static const struct lc_numeric_T _C_numeric_locale = {
+	".",		/* decimal_point */
+	"",		/* thousands_sep */
+	numempty	/* grouping */
+};
+
+static struct lc_numeric_T _numeric_locale;
+static int	_numeric_using_locale;
+static char	*_numeric_locale_buf;
+
+int
+__numeric_load_locale(const char *name)
+{
+	int ret;
+
+	ret = __part_load_locale(name, &_numeric_using_locale,
+	    &_numeric_locale_buf, "LC_NUMERIC", LCNUMERIC_SIZE, LCNUMERIC_SIZE,
+	    (const char **)&_numeric_locale);
+	if (ret != _LDP_ERROR)
+		__nlocale_changed = 1;
+	if (ret == _LDP_LOADED) {
+		/* Can't be empty according to C99 */
+		if (*_numeric_locale.decimal_point == '\0')
+			_numeric_locale.decimal_point =
+			    _C_numeric_locale.decimal_point;
+		_numeric_locale.grouping =
+		    __fix_locale_grouping_str(_numeric_locale.grouping);
+
+		/* This is Solaris legacy, required for _doprnt */
+		_numeric[0] = *_numeric_locale.decimal_point;
+		_numeric[1] = *_numeric_locale.grouping;
+	}
+	return (ret);
+}
+
+struct lc_numeric_T *
+__get_current_numeric_locale(void)
+{
+	return (_numeric_using_locale ? &_numeric_locale :
+	    (struct lc_numeric_T *)&_C_numeric_locale);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/lnumeric.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2000, 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _LNUMERIC_H_
+#define	_LNUMERIC_H_
+
+struct lc_numeric_T {
+	const char	*decimal_point;
+	const char	*thousands_sep;
+	const char	*grouping;
+};
+
+struct lc_numeric_T *__get_current_numeric_locale(void);
+int	__numeric_load_locale(const char *);
+
+#endif /* !_LNUMERIC_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/localeconv.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_LCONV_C99
+#define	_LCONV_C99	/* so we get all the extensions */
+#endif
+
+#include "lint.h"
+#include <locale.h>
+#include "lmonetary.h"
+#include "lnumeric.h"
+
+/*
+ * The localeconv() function constructs a struct lconv from the current
+ * monetary and numeric locales.
+ *
+ * Because localeconv() may be called many times (especially by library
+ * routines like printf() & strtod()), the approprate members of the
+ * lconv structure are computed only when the monetary or numeric
+ * locale has been changed.
+ */
+int __mlocale_changed = 1;
+int __nlocale_changed = 1;
+
+/*
+ * Return the current locale conversion.
+ */
+struct lconv *
+localeconv(void)
+{
+	static struct lconv ret;
+
+	if (__mlocale_changed) {
+		/* LC_MONETARY part */
+		struct lc_monetary_T *mptr;
+
+#define	M_ASSIGN_STR(NAME) (ret.NAME = (char *)mptr->NAME)
+#define	M_ASSIGN_CHAR(NAME) (ret.NAME = mptr->NAME[0])
+
+		mptr = __get_current_monetary_locale();
+		M_ASSIGN_STR(int_curr_symbol);
+		M_ASSIGN_STR(currency_symbol);
+		M_ASSIGN_STR(mon_decimal_point);
+		M_ASSIGN_STR(mon_thousands_sep);
+		M_ASSIGN_STR(mon_grouping);
+		M_ASSIGN_STR(positive_sign);
+		M_ASSIGN_STR(negative_sign);
+		M_ASSIGN_CHAR(int_frac_digits);
+		M_ASSIGN_CHAR(frac_digits);
+		M_ASSIGN_CHAR(p_cs_precedes);
+		M_ASSIGN_CHAR(p_sep_by_space);
+		M_ASSIGN_CHAR(n_cs_precedes);
+		M_ASSIGN_CHAR(n_sep_by_space);
+		M_ASSIGN_CHAR(p_sign_posn);
+		M_ASSIGN_CHAR(n_sign_posn);
+		M_ASSIGN_CHAR(int_p_cs_precedes);
+		M_ASSIGN_CHAR(int_n_cs_precedes);
+		M_ASSIGN_CHAR(int_p_sep_by_space);
+		M_ASSIGN_CHAR(int_n_sep_by_space);
+		M_ASSIGN_CHAR(int_p_sign_posn);
+		M_ASSIGN_CHAR(int_n_sign_posn);
+		__mlocale_changed = 0;
+	}
+
+	if (__nlocale_changed) {
+		/* LC_NUMERIC part */
+		struct lc_numeric_T *nptr;
+
+#define	N_ASSIGN_STR(NAME) (ret.NAME = (char *)nptr->NAME)
+
+		nptr = __get_current_numeric_locale();
+		N_ASSIGN_STR(decimal_point);
+		N_ASSIGN_STR(thousands_sep);
+		N_ASSIGN_STR(grouping);
+		__nlocale_changed = 0;
+	}
+
+	return (&ret);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/mbftowc.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "lint.h"
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+
+/*
+ * This function is apparently referenced by parts of ON.  It is
+ * not intended for public API usage -- and it is not documented.
+ *
+ * The usage appears to be to consume bytes until a character is
+ * gathered, using a supplied function.   It reads exactly one
+ * character and returns the number of bytes in the multibyte string
+ * that were consumed.
+ *
+ * The string "s" is storage for the multibyte string, the
+ * wc will receive the interpreted character, the peek function
+ * obtains the next character (as an int so we can get EOF),
+ * and errorc is stuffed with the character that is responsible
+ * for a parse error, if any.
+ */
+
+int
+_mbftowc(char *s, wchar_t *wc, int (*peek)(void), int *errorc)
+{
+	int		c;
+	mbstate_t	mbs;
+	char		*start = s;
+	size_t		cons = 0;
+
+	for (;;) {
+		c = peek();
+		if (c < 0) {
+			/* No bytes returned? */
+			return (s - start);
+		}
+
+		*s = (char)c;
+		s++;
+
+		(void) memset(&mbs, 0, sizeof (mbs));
+		cons = mbrtowc(wc, start, s - start, &mbs);
+		if ((int)cons >= 0) {
+			/* fully translated character */
+			return (cons);
+		}
+		if (cons == (size_t)-2) {
+			/* incomplete, recycle */
+			continue;
+		}
+
+		/*
+		 * Parse error, don't consider the first character part
+		 * of the error.
+		 */
+		s--;
+		cons = (s - start);
+		*errorc = c >= 0 ?  c : 0;
+		break;
+	}
+
+	return (cons);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/mblen.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <stdlib.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+int
+mblen(const char *s, size_t n)
+{
+	static const mbstate_t initial = { 0 };
+	static mbstate_t mbs;
+	size_t rval;
+
+	if (s == NULL) {
+		/* No support for state dependent encodings. */
+		mbs = initial;
+		return (0);
+	}
+	rval = __mbrtowc(NULL, s, n, &mbs);
+	if (rval == (size_t)-1 || rval == (size_t)-2)
+		return (-1);
+	return ((int)rval);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/mblocal.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,74 @@
+/*
+ * Copyright (c) 2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _MBLOCAL_H_
+#define	_MBLOCAL_H_
+
+#include "runetype.h"
+
+/*
+ * Rune initialization function prototypes.
+ */
+int	_none_init(_RuneLocale *);
+int	_ascii_init(_RuneLocale *);
+int	_UTF8_init(_RuneLocale *);
+int	_EUC_init(_RuneLocale *);
+int	_GB18030_init(_RuneLocale *);
+int	_GB2312_init(_RuneLocale *);
+int	_GBK_init(_RuneLocale *);
+int	_BIG5_init(_RuneLocale *);
+int	_MSKanji_init(_RuneLocale *);
+
+/*
+ * Conversion function pointers for current encoding.
+ */
+extern size_t (*__mbrtowc)(wchar_t *_RESTRICT_KYWD,
+    const char *_RESTRICT_KYWD, size_t, mbstate_t *_RESTRICT_KYWD);
+extern int (*__mbsinit)(const mbstate_t *);
+extern size_t (*__mbsnrtowcs)(wchar_t *_RESTRICT_KYWD,
+    const char **_RESTRICT_KYWD, size_t, size_t, mbstate_t *_RESTRICT_KYWD);
+
+extern size_t (*__wcrtomb)(char *_RESTRICT_KYWD, wchar_t,
+    mbstate_t *_RESTRICT_KYWD);
+
+extern size_t (*__wcsnrtombs)(char *_RESTRICT_KYWD,
+    const wchar_t **_RESTRICT_KYWD, size_t, size_t, mbstate_t *_RESTRICT_KYWD);
+
+extern int charset_is_ascii;
+
+size_t __mbsnrtowcs_std(wchar_t *_RESTRICT_KYWD, const char **_RESTRICT_KYWD,
+    size_t, size_t, mbstate_t *_RESTRICT_KYWD);
+size_t __wcsnrtombs_std(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD,
+    size_t, size_t, mbstate_t *_RESTRICT_KYWD);
+
+#define	MIN(a, b)	((a) < (b) ? (a) : (b))
+
+#endif	/* _MBLOCAL_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/mbrlen.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <wchar.h>
+#include "mblocal.h"
+
+size_t
+mbrlen(const char *_RESTRICT_KYWD s, size_t n, mbstate_t *_RESTRICT_KYWD ps)
+{
+	static mbstate_t mbs;
+
+	if (ps == NULL)
+		ps = &mbs;
+	return (__mbrtowc(NULL, s, n, ps));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/mbrtowc.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <wchar.h>
+#include "mblocal.h"
+
+size_t
+mbrtowc(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s,
+    size_t n, mbstate_t *_RESTRICT_KYWD ps)
+{
+	static mbstate_t mbs;
+
+	if (ps == NULL)
+		ps = &mbs;
+	return (__mbrtowc(pwc, s, n, ps));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/mbsinit.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <wchar.h>
+#include "mblocal.h"
+
+int
+mbsinit(const mbstate_t *ps)
+{
+
+	return (__mbsinit(ps));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/mbsnrtowcs.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+size_t
+mbsnrtowcs(wchar_t *_RESTRICT_KYWD dst, const char **_RESTRICT_KYWD src,
+    size_t nms, size_t len, mbstate_t *_RESTRICT_KYWD ps)
+{
+	static mbstate_t mbs;
+
+	if (ps == NULL)
+		ps = &mbs;
+	return (__mbsnrtowcs(dst, src, nms, len, ps));
+}
+
+size_t
+__mbsnrtowcs_std(wchar_t *_RESTRICT_KYWD dst, const char **_RESTRICT_KYWD src,
+    size_t nms, size_t len, mbstate_t *_RESTRICT_KYWD ps)
+{
+	const char *s;
+	size_t nchr;
+	wchar_t wc;
+	size_t nb;
+
+	s = *src;
+	nchr = 0;
+
+	if (dst == NULL) {
+		for (;;) {
+			if ((nb = __mbrtowc(&wc, s, nms, ps)) == (size_t)-1)
+				/* Invalid sequence - mbrtowc() sets errno. */
+				return ((size_t)-1);
+			else if (nb == 0 || nb == (size_t)-2)
+				return (nchr);
+			s += nb;
+			nms -= nb;
+			nchr++;
+		}
+		/*NOTREACHED*/
+	}
+
+	while (len-- > 0) {
+		if ((nb = __mbrtowc(dst, s, nms, ps)) == (size_t)-1) {
+			*src = s;
+			return ((size_t)-1);
+		} else if (nb == (size_t)-2) {
+			*src = s + nms;
+			return (nchr);
+		} else if (nb == 0) {
+			*src = NULL;
+			return (nchr);
+		}
+		s += nb;
+		nms -= nb;
+		nchr++;
+		dst++;
+	}
+	*src = s;
+	return (nchr);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/mbsrtowcs.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+size_t
+mbsrtowcs(wchar_t *_RESTRICT_KYWD dst, const char **_RESTRICT_KYWD src,
+    size_t len, mbstate_t *_RESTRICT_KYWD ps)
+{
+	static mbstate_t mbs;
+
+	if (ps == NULL)
+		ps = &mbs;
+	return (__mbsnrtowcs(dst, src, ULONG_MAX, len, ps));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/mbstowcs.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <limits.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+size_t
+mbstowcs(wchar_t *_RESTRICT_KYWD pwcs, const char *_RESTRICT_KYWD s, size_t n)
+{
+	static const mbstate_t initial = { 0 };
+	mbstate_t mbs;
+	const char *sp;
+
+	mbs = initial;
+	sp = s;
+	return (__mbsnrtowcs(pwcs, &sp, ULONG_MAX, n, &mbs));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/mbtowc.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <stdlib.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+int
+mbtowc(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s, size_t n)
+{
+	static const mbstate_t initial = { 0 };
+	static mbstate_t mbs;
+	size_t rval;
+
+	if (s == NULL) {
+		/* No support for state dependent encodings. */
+		mbs = initial;
+		return (0);
+	}
+	rval = __mbrtowc(pwc, s, n, &mbs);
+	if (rval == (size_t)-1 || rval == (size_t)-2)
+		return (-1);
+	return ((int)rval);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/mskanji.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved.
+ *
+ *    ja_JP.SJIS locale table for BSD4.4/rune
+ *    version 1.0
+ *    (C) Sin'ichiro MIYATANI / Phase One, Inc
+ *    May 12, 1995
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ *    must display the following acknowledgement:
+ *      This product includes software developed by Phase One, Inc.
+ * 4. The name of Phase One, Inc. may be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <sys/types.h>
+#include <errno.h>
+#include "runetype.h"
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+static size_t	_MSKanji_mbrtowc(wchar_t *_RESTRICT_KYWD,
+		    const char *_RESTRICT_KYWD,
+		    size_t, mbstate_t *_RESTRICT_KYWD);
+static int	_MSKanji_mbsinit(const mbstate_t *);
+static size_t	_MSKanji_wcrtomb(char *_RESTRICT_KYWD, wchar_t,
+		    mbstate_t *_RESTRICT_KYWD);
+
+typedef struct {
+	wchar_t	ch;
+} _MSKanjiState;
+
+int
+_MSKanji_init(_RuneLocale *rl)
+{
+
+	__mbrtowc = _MSKanji_mbrtowc;
+	__wcrtomb = _MSKanji_wcrtomb;
+	__mbsinit = _MSKanji_mbsinit;
+	_CurrentRuneLocale = rl;
+	__ctype[520] = 2;
+	charset_is_ascii = 0;
+	return (0);
+}
+
+static int
+_MSKanji_mbsinit(const mbstate_t *ps)
+{
+
+	return (ps == NULL || ((const _MSKanjiState *)ps)->ch == 0);
+}
+
+static size_t
+_MSKanji_mbrtowc(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s,
+    size_t n, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_MSKanjiState *ms;
+	wchar_t wc;
+
+	ms = (_MSKanjiState *)ps;
+
+	if ((ms->ch & ~0xFF) != 0) {
+		/* Bad conversion state. */
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL) {
+		s = "";
+		n = 1;
+		pwc = NULL;
+	}
+
+	if (n == 0)
+		/* Incomplete multibyte sequence */
+		return ((size_t)-2);
+
+	if (ms->ch != 0) {
+		if (*s == '\0') {
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		wc = (ms->ch << 8) | (*s & 0xFF);
+		if (pwc != NULL)
+			*pwc = wc;
+		ms->ch = 0;
+		return (1);
+	}
+	wc = *s++ & 0xff;
+	if ((wc > 0x80 && wc < 0xa0) || (wc >= 0xe0 && wc < 0xfd)) {
+		if (n < 2) {
+			/* Incomplete multibyte sequence */
+			ms->ch = wc;
+			return ((size_t)-2);
+		}
+		if (*s == '\0') {
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		wc = (wc << 8) | (*s++ & 0xff);
+		if (pwc != NULL)
+			*pwc = wc;
+		return (2);
+	} else {
+		if (pwc != NULL)
+			*pwc = wc;
+		return (wc == L'\0' ? 0 : 1);
+	}
+}
+
+static size_t
+_MSKanji_wcrtomb(char *_RESTRICT_KYWD s, wchar_t wc,
+    mbstate_t *_RESTRICT_KYWD ps)
+{
+	_MSKanjiState *ms;
+	int len, i;
+
+	ms = (_MSKanjiState *)ps;
+
+	if (ms->ch != 0) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL)
+		/* Reset to initial shift state (no-op) */
+		return (1);
+	len = (wc > 0x100) ? 2 : 1;
+	for (i = len; i-- > 0; )
+		*s++ = wc >> (i << 3);
+	return (len);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/nextwctype.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,88 @@
+/*
+ * Copyright (c) 2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "lint.h"
+#include "runetype.h"
+#include <wchar.h>
+#include <wctype.h>
+
+wint_t
+__nextwctype(wint_t wc, wctype_t wct)
+{
+	size_t lim;
+	_RuneRange *rr = &_CurrentRuneLocale->__runetype_ext;
+	_RuneEntry *base, *re;
+	int noinc;
+
+	noinc = 0;
+	if (wc < _CACHED_RUNES) {
+		wc++;
+		while (wc < _CACHED_RUNES) {
+			if (_CurrentRuneLocale->__runetype[wc] & wct)
+				return (wc);
+			wc++;
+		}
+		wc--;
+	}
+	if (rr->__ranges != NULL && wc < rr->__ranges[0].__min) {
+		wc = rr->__ranges[0].__min;
+		noinc = 1;
+	}
+
+	/* Binary search -- see bsearch.c for explanation. */
+	base = rr->__ranges;
+	for (lim = rr->__nranges; lim != 0; lim >>= 1) {
+		re = base + (lim >> 1);
+		if (re->__min <= wc && wc <= re->__max)
+			goto found;
+		else if (wc > re->__max) {
+			base = re + 1;
+			lim--;
+		}
+	}
+	return (-1);
+found:
+	if (!noinc)
+		wc++;
+	if (re->__min <= wc && wc <= re->__max) {
+		if (re->__types != NULL) {
+			for (; wc <= re->__max; wc++)
+				if (re->__types[wc - re->__min] & wct)
+					return (wc);
+		} else if (re->__map & wct)
+			return (wc);
+	}
+	while (++re < rr->__ranges + rr->__nranges) {
+		wc = re->__min;
+		if (re->__types != NULL) {
+			for (; wc <= re->__max; wc++)
+				if (re->__types[wc - re->__min] & wct)
+					return (wc);
+		} else if (re->__map & wct)
+			return (wc);
+	}
+	return (-1);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/nl_langinfo.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,200 @@
+/*
+ * Copyright (c) 2001, 2003 Alexey Zelkin <phantom@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <langinfo.h>
+#include <limits.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "lnumeric.h"
+#include "lmessages.h"
+#include "lmonetary.h"
+#include "timelocal.h"
+
+#define	_REL(BASE) ((int)item-BASE)
+
+#define	MONETARY	(__get_current_monetary_locale())
+#define	TIME		(__get_current_time_locale())
+#define	MESSAGES	(__get_current_messages_locale())
+#define	NUMERIC		(__get_current_numeric_locale())
+
+#pragma weak _nl_langinfo = nl_langinfo
+
+char *
+nl_langinfo(nl_item item)
+{
+	char *ret, *s, *cs;
+	static char *csym = NULL;
+
+	switch (item) {
+	case CODESET:
+		ret = "";
+		/*
+		 * The codeset is the suffix of a locale, for most it will
+		 * will be UTF-8, as in "en.UTF-8".  Short form locales are
+		 * not supported.  Note also that although FreeBSD uses
+		 * US-ASCII, Solaris historically has reported "646" for the
+		 * C locale.
+		 */
+		if ((s = setlocale(LC_CTYPE, NULL)) != NULL) {
+			if ((cs = strchr(s, '.')) != NULL)
+				ret = cs + 1;
+			else if (strcmp(s, "C") == 0 || strcmp(s, "POSIX") == 0)
+				ret = "646";
+		}
+		break;
+	case D_T_FMT:
+		ret = (char *)TIME->c_fmt;
+		break;
+	case D_FMT:
+		ret = (char *)TIME->x_fmt;
+		break;
+	case T_FMT:
+		ret = (char *)TIME->X_fmt;
+		break;
+	case T_FMT_AMPM:
+		ret = (char *)TIME->ampm_fmt;
+		break;
+	case AM_STR:
+		ret = (char *)TIME->am;
+		break;
+	case PM_STR:
+		ret = (char *)TIME->pm;
+		break;
+	case DAY_1: case DAY_2: case DAY_3:
+	case DAY_4: case DAY_5: case DAY_6: case DAY_7:
+		ret = (char *)TIME->weekday[_REL(DAY_1)];
+		break;
+	case ABDAY_1: case ABDAY_2: case ABDAY_3:
+	case ABDAY_4: case ABDAY_5: case ABDAY_6: case ABDAY_7:
+		ret = (char *)TIME->wday[_REL(ABDAY_1)];
+		break;
+	case MON_1: case MON_2: case MON_3: case MON_4:
+	case MON_5: case MON_6: case MON_7: case MON_8:
+	case MON_9: case MON_10: case MON_11: case MON_12:
+		ret = (char *)TIME->month[_REL(MON_1)];
+		break;
+	case ABMON_1: case ABMON_2: case ABMON_3: case ABMON_4:
+	case ABMON_5: case ABMON_6: case ABMON_7: case ABMON_8:
+	case ABMON_9: case ABMON_10: case ABMON_11: case ABMON_12:
+		ret = (char *)TIME->mon[_REL(ABMON_1)];
+		break;
+	case ERA:
+		/* XXX: need to be implemented  */
+		ret = "";
+		break;
+	case ERA_D_FMT:
+		/* XXX: need to be implemented  */
+		ret = "";
+		break;
+	case ERA_D_T_FMT:
+		/* XXX: need to be implemented  */
+		ret = "";
+		break;
+	case ERA_T_FMT:
+		/* XXX: need to be implemented  */
+		ret = "";
+		break;
+	case ALT_DIGITS:
+		/* XXX: need to be implemented  */
+		ret = "";
+		break;
+	case RADIXCHAR:
+		ret = (char *)NUMERIC->decimal_point;
+		break;
+	case THOUSEP:
+		ret = (char *)NUMERIC->thousands_sep;
+		break;
+	case YESEXPR:
+		ret = (char *)MESSAGES->yesexpr;
+		break;
+	case NOEXPR:
+		ret = (char *)MESSAGES->noexpr;
+		break;
+	/*
+	 * YESSTR and NOSTR items marked with LEGACY are available, but not
+	 * recomended by SUSv2 to be used in portable applications since
+	 * they're subject to remove in future specification editions.
+	 */
+	case YESSTR:	/* LEGACY  */
+		ret = (char *)MESSAGES->yesstr;
+		break;
+	case NOSTR:	/* LEGACY  */
+		ret = (char *)MESSAGES->nostr;
+		break;
+	/*
+	 * SUSv2 special formatted currency string
+	 */
+	case CRNCYSTR:
+		ret = "";
+		cs = (char *)MONETARY->currency_symbol;
+		if (*cs != '\0') {
+			char pos = localeconv()->p_cs_precedes;
+
+			if (pos == localeconv()->n_cs_precedes) {
+				char psn = '\0';
+
+				if (pos == CHAR_MAX) {
+					if (strcmp(cs,
+					    MONETARY->mon_decimal_point) == 0)
+						psn = '.';
+				} else
+					psn = pos ? '-' : '+';
+				if (psn != '\0') {
+					int clen = strlen(cs);
+					char *newc;
+
+					newc = realloc(csym, clen + 2);
+					if (newc != NULL) {
+						free(csym);
+						csym = newc;
+						*csym = psn;
+						(void) strcpy(csym + 1, cs);
+						ret = csym;
+					}
+				}
+			}
+		}
+		break;
+	case _DATE_FMT:		/* Solaris specific extension */
+		ret = (char *)TIME->date_fmt;
+		break;
+	/*
+	 * Note that FreeBSD also had a private D_MD_ORDER, but that appears
+	 * to have been specific to FreeBSD, so we have not included it here.
+	 */
+	default:
+		ret = "";
+	}
+	return (ret);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/none.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,221 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins. All rights reserved.
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <errno.h>
+#include <limits.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <note.h>
+#include "runetype.h"
+#include "mblocal.h"
+#include "../i18n/_locale.h"
+
+static size_t	_none_mbrtowc(wchar_t *_RESTRICT_KYWD,
+    const char *_RESTRICT_KYWD, size_t, mbstate_t *_RESTRICT_KYWD);
+
+static int	_none_mbsinit(const mbstate_t *);
+static size_t	_none_mbsnrtowcs(wchar_t *_RESTRICT_KYWD dst,
+    const char **_RESTRICT_KYWD src, size_t nms, size_t len,
+    mbstate_t *_RESTRICT_KYWD);
+static size_t	_none_wcrtomb(char *_RESTRICT_KYWD, wchar_t,
+    mbstate_t *_RESTRICT_KYWD);
+static size_t	_none_wcsnrtombs(char *_RESTRICT_KYWD,
+    const wchar_t **_RESTRICT_KYWD,
+    size_t, size_t, mbstate_t *_RESTRICT_KYWD);
+
+/* setup defaults */
+
+extern unsigned char __ctype_C[];
+
+int
+_none_init(_RuneLocale *rl)
+{
+	/*
+	 * We need to populate the ctype stuff.  This means the
+	 * tolower table, the type masks, etc.
+	 * There are 257 entries for the type array, 257 entries for the
+	 * tolower/toupper array, and 7 bytes for CSWIDTH array.
+	 *
+	 * We have to set this stuff up because for POSIX/C we short
+	 * circuit most of the logic in setrunelocale that would handle it.
+	 */
+	(void) memcpy(__ctype, __ctype_C, SZ_TOTAL);
+
+	charset_is_ascii = 1;
+
+	__ctype_mask = rl->__runetype;
+	__trans_upper = rl->__mapupper;
+	__trans_lower = rl->__maplower;
+
+	__mbrtowc = _none_mbrtowc;
+	__mbsinit = _none_mbsinit;
+	__mbsnrtowcs = _none_mbsnrtowcs;
+	__wcrtomb = _none_wcrtomb;
+	__wcsnrtombs = _none_wcsnrtombs;
+	_CurrentRuneLocale = rl;
+	return (0);
+}
+
+static int
+_none_mbsinit(const mbstate_t *unused)
+{
+	_NOTE(ARGUNUSED(unused));
+
+	/*
+	 * Encoding is not state dependent - we are always in the
+	 * initial state.
+	 */
+	return (1);
+}
+
+static size_t
+_none_mbrtowc(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s,
+    size_t n, mbstate_t *_RESTRICT_KYWD unused)
+{
+	_NOTE(ARGUNUSED(unused));
+
+	if (s == NULL)
+		/* Reset to initial shift state (no-op) */
+		return (0);
+	if (n == 0)
+		/* Incomplete multibyte sequence */
+		return ((size_t)-2);
+	if (pwc != NULL)
+		*pwc = (unsigned char)*s;
+	return (*s == '\0' ? 0 : 1);
+}
+
+static size_t
+_none_wcrtomb(char *_RESTRICT_KYWD s, wchar_t wc,
+    mbstate_t *_RESTRICT_KYWD unused)
+{
+	_NOTE(ARGUNUSED(unused));
+
+	if (s == NULL)
+		/* Reset to initial shift state (no-op) */
+		return (1);
+	if (wc < 0 || wc > UCHAR_MAX) {
+		errno = EILSEQ;
+		return ((size_t)-1);
+	}
+	*s = (unsigned char)wc;
+	return (1);
+}
+
+static size_t
+_none_mbsnrtowcs(wchar_t *_RESTRICT_KYWD dst, const char **_RESTRICT_KYWD src,
+    size_t nms, size_t len, mbstate_t *_RESTRICT_KYWD unused)
+{
+	const char *s;
+	size_t nchr;
+
+	_NOTE(ARGUNUSED(unused));
+
+	if (dst == NULL) {
+		s = memchr(*src, '\0', nms);
+		return (s != NULL ? s - *src : nms);
+	}
+
+	s = *src;
+	nchr = 0;
+	while (len-- > 0 && nms-- > 0) {
+		if ((*dst++ = (unsigned char)*s++) == L'\0') {
+			*src = NULL;
+			return (nchr);
+		}
+		nchr++;
+	}
+	*src = s;
+	return (nchr);
+}
+
+static size_t
+_none_wcsnrtombs(char *_RESTRICT_KYWD dst, const wchar_t **_RESTRICT_KYWD src,
+    size_t nwc, size_t len, mbstate_t *_RESTRICT_KYWD unused)
+{
+	const wchar_t *s;
+	size_t nchr;
+
+	_NOTE(ARGUNUSED(unused));
+
+	if (dst == NULL) {
+		for (s = *src; nwc > 0 && *s != L'\0'; s++, nwc--) {
+			if (*s < 0 || *s > UCHAR_MAX) {
+				errno = EILSEQ;
+				return ((size_t)-1);
+			}
+		}
+		return (s - *src);
+	}
+
+	s = *src;
+	nchr = 0;
+	while (len-- > 0 && nwc-- > 0) {
+		if (*s < 0 || *s > UCHAR_MAX) {
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		if ((*dst++ = *s++) == '\0') {
+			*src = NULL;
+			return (nchr);
+		}
+		nchr++;
+	}
+	*src = s;
+	return (nchr);
+}
+
+/* setup defaults */
+
+size_t (*__mbrtowc)(wchar_t *_RESTRICT_KYWD, const char *_RESTRICT_KYWD,
+    size_t, mbstate_t *_RESTRICT_KYWD) = _none_mbrtowc;
+
+int (*__mbsinit)(const mbstate_t *) = _none_mbsinit;
+
+size_t (*__mbsnrtowcs)(wchar_t *_RESTRICT_KYWD, const char **_RESTRICT_KYWD,
+    size_t, size_t, mbstate_t *_RESTRICT_KYWD) = _none_mbsnrtowcs;
+
+size_t (*__wcrtomb)(char *_RESTRICT_KYWD, wchar_t, mbstate_t *_RESTRICT_KYWD) =
+    _none_wcrtomb;
+
+size_t (*__wcsnrtombs)(char *_RESTRICT_KYWD, const wchar_t **_RESTRICT_KYWD,
+    size_t, size_t, mbstate_t *_RESTRICT_KYWD) = _none_wcsnrtombs;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/regcomp.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,1746 @@
+/*
+ * Copyright (c) 1992, 1993, 1994 Henry Spencer.
+ * Copyright (c) 1992, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Henry Spencer.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include "file64.h"
+#include <sys/types.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <regex.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#include "runetype.h"
+#include "collate.h"
+
+#include "utils.h"
+#include "regex2.h"
+
+#include "cname.h"
+#include "mblocal.h"
+
+/*
+ * parse structure, passed up and down to avoid global variables and
+ * other clumsinesses
+ */
+struct parse {
+	char *next;		/* next character in RE */
+	char *end;		/* end of string (-> NUL normally) */
+	int error;		/* has an error been seen? */
+	sop *strip;		/* malloced strip */
+	sopno ssize;		/* malloced strip size (allocated) */
+	sopno slen;		/* malloced strip length (used) */
+	int ncsalloc;		/* number of csets allocated */
+	struct re_guts *g;
+#define	NPAREN	10		/* we need to remember () 1-9 for back refs */
+	sopno pbegin[NPAREN];	/* -> ( ([0] unused) */
+	sopno pend[NPAREN];	/* -> ) ([0] unused) */
+};
+
+/* ========= begin header generated by ./mkh ========= */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* === regcomp.c === */
+static void p_ere(struct parse *p, wint_t stop);
+static void p_ere_exp(struct parse *p);
+static void p_str(struct parse *p);
+static void p_bre(struct parse *p, wint_t end1, wint_t end2);
+static int p_simp_re(struct parse *p, int starordinary);
+static int p_count(struct parse *p);
+static void p_bracket(struct parse *p);
+static void p_b_term(struct parse *p, cset *cs);
+static void p_b_cclass(struct parse *p, cset *cs);
+static void p_b_eclass(struct parse *p, cset *cs);
+static wint_t p_b_symbol(struct parse *p);
+static wint_t p_b_coll_elem(struct parse *p, wint_t endc);
+static wint_t othercase(wint_t ch);
+static void bothcases(struct parse *p, wint_t ch);
+static void ordinary(struct parse *p, wint_t ch);
+static void nonnewline(struct parse *p);
+static void repeat(struct parse *p, sopno start, int from, int to);
+static int seterr(struct parse *p, int e);
+static cset *allocset(struct parse *p);
+static void freeset(struct parse *p, cset *cs);
+static void CHadd(struct parse *p, cset *cs, wint_t ch);
+static void CHaddrange(struct parse *p, cset *cs, wint_t min, wint_t max);
+static void CHaddtype(struct parse *p, cset *cs, wctype_t wct);
+static wint_t singleton(cset *cs);
+static sopno dupl(struct parse *p, sopno start, sopno finish);
+static void doemit(struct parse *p, sop op, size_t opnd);
+static void doinsert(struct parse *p, sop op, size_t opnd, sopno pos);
+static void dofwd(struct parse *p, sopno pos, sop value);
+static void enlarge(struct parse *p, sopno size);
+static void stripsnug(struct parse *p, struct re_guts *g);
+static void findmust(struct parse *p, struct re_guts *g);
+static int altoffset(sop *scan, int offset);
+static void computejumps(struct parse *p, struct re_guts *g);
+static void computematchjumps(struct parse *p, struct re_guts *g);
+static sopno pluscount(struct parse *p, struct re_guts *g);
+static wint_t wgetnext(struct parse *p);
+
+#ifdef __cplusplus
+}
+#endif
+/* ========= end header generated by ./mkh ========= */
+
+static char nuls[10];		/* place to point scanner in event of error */
+
+/*
+ * macros for use with parse structure
+ * BEWARE:  these know that the parse structure is named `p' !!!
+ */
+#define	PEEK()	(*p->next)
+#define	PEEK2()	(*(p->next+1))
+#define	MORE()	(p->next < p->end)
+#define	MORE2()	(p->next+1 < p->end)
+#define	SEE(c)	(MORE() && PEEK() == (c))
+#define	SEETWO(a, b)	(MORE() && MORE2() && PEEK() == (a) && PEEK2() == (b))
+#define	EAT(c)	((SEE(c)) ? (NEXT(), 1) : 0)
+#define	EATTWO(a, b)	((SEETWO(a, b)) ? (NEXT2(), 1) : 0)
+#define	NEXT()	(p->next++)
+#define	NEXT2()	(p->next += 2)
+#define	NEXTn(n)	(p->next += (n))
+#define	GETNEXT()	(*p->next++)
+#define	WGETNEXT()	wgetnext(p)
+#define	SETERROR(e)	((void)seterr(p, (e)))
+#define	REQUIRE(co, e)	((co) || seterr(p, e))
+#define	MUSTSEE(c, e)	(REQUIRE(MORE() && PEEK() == (c), e))
+#define	MUSTEAT(c, e)	(REQUIRE(MORE() && GETNEXT() == (c), e))
+#define	MUSTNOTSEE(c, e)	(REQUIRE(!MORE() || PEEK() != (c), e))
+#define	EMIT(op, sopnd)	doemit(p, (sop)(op), (size_t)(sopnd))
+#define	INSERT(op, pos)	doinsert(p, (sop)(op), HERE()-(pos)+1, pos)
+#define	AHEAD(pos)		dofwd(p, pos, HERE()-(pos))
+#define	ASTERN(sop, pos)	EMIT(sop, HERE()-pos)
+#define	HERE()		(p->slen)
+#define	THERE()		(p->slen - 1)
+#define	THERETHERE()	(p->slen - 2)
+#define	DROP(n)	(p->slen -= (n))
+
+#ifndef NDEBUG
+static int never = 0;		/* for use in asserts; shuts lint up */
+#else
+#define	never	0		/* some <assert.h>s have bugs too */
+#endif
+
+/*
+ * regcomp - interface for parser and compilation
+ */
+int				/* 0 success, otherwise REG_something */
+regcomp(regex_t *_RESTRICT_KYWD preg,
+	const char *_RESTRICT_KYWD pattern,
+	int cflags)
+{
+	struct parse pa;
+	struct re_guts *g;
+	struct parse *p = &pa;
+	int i;
+	size_t len;
+#ifdef REDEBUG
+#define	GOODFLAGS(f)	(f)
+#else
+#define	GOODFLAGS(f)	((f)&~REG_DUMP)
+#endif
+
+	/* We had REG_INVARG, but we don't have that on Solaris. */
+	cflags = GOODFLAGS(cflags);
+	if ((cflags&REG_EXTENDED) && (cflags&REG_NOSPEC))
+		return (REG_EFATAL);
+
+	if (cflags&REG_PEND) {
+		if (preg->re_endp < pattern)
+			return (REG_EFATAL);
+		len = preg->re_endp - pattern;
+	} else
+		len = strlen((char *)pattern);
+
+	/* do the mallocs early so failure handling is easy */
+	g = (struct re_guts *)malloc(sizeof (struct re_guts));
+	if (g == NULL)
+		return (REG_ESPACE);
+	p->ssize = len/(size_t)2*(size_t)3 + (size_t)1;	/* ugh */
+	p->strip = (sop *)malloc(p->ssize * sizeof (sop));
+	p->slen = 0;
+	if (p->strip == NULL) {
+		free((char *)g);
+		return (REG_ESPACE);
+	}
+
+	/* set things up */
+	p->g = g;
+	p->next = (char *)pattern;	/* convenience; we do not modify it */
+	p->end = p->next + len;
+	p->error = 0;
+	p->ncsalloc = 0;
+	for (i = 0; i < NPAREN; i++) {
+		p->pbegin[i] = 0;
+		p->pend[i] = 0;
+	}
+	g->sets = NULL;
+	g->ncsets = 0;
+	g->cflags = cflags;
+	g->iflags = 0;
+	g->nbol = 0;
+	g->neol = 0;
+	g->must = NULL;
+	g->moffset = -1;
+	g->charjump = NULL;
+	g->matchjump = NULL;
+	g->mlen = 0;
+	g->nsub = 0;
+	g->backrefs = 0;
+
+	/* do it */
+	EMIT(OEND, 0);
+	g->firststate = THERE();
+	if (cflags&REG_EXTENDED)
+		p_ere(p, OUT);
+	else if (cflags&REG_NOSPEC)
+		p_str(p);
+	else
+		p_bre(p, OUT, OUT);
+	EMIT(OEND, 0);
+	g->laststate = THERE();
+
+	/* tidy up loose ends and fill things in */
+	stripsnug(p, g);
+	findmust(p, g);
+	/*
+	 * only use Boyer-Moore algorithm if the pattern is bigger
+	 * than three characters
+	 */
+	if (g->mlen > 3) {
+		computejumps(p, g);
+		computematchjumps(p, g);
+		if (g->matchjump == NULL && g->charjump != NULL) {
+			free(g->charjump);
+			g->charjump = NULL;
+		}
+	}
+	g->nplus = pluscount(p, g);
+	g->magic = MAGIC2;
+	preg->re_nsub = g->nsub;
+	preg->re_g = g;
+	preg->re_magic = MAGIC1;
+#ifndef REDEBUG
+	/* not debugging, so can't rely on the assert() in regexec() */
+	if (g->iflags&BAD)
+		SETERROR(REG_EFATAL);
+#endif
+
+	/* win or lose, we're done */
+	if (p->error != 0)	/* lose */
+		regfree(preg);
+	return (p->error);
+}
+
+/*
+ * p_ere - ERE parser top level, concatenation and alternation
+ */
+static void
+p_ere(struct parse *p,
+    wint_t stop)		/* character this ERE should end at */
+{
+	char c;
+	sopno prevback;
+	sopno prevfwd;
+	sopno conc;
+	int first = 1;		/* is this the first alternative? */
+
+	for (;;) {
+		/* do a bunch of concatenated expressions */
+		conc = HERE();
+		while (MORE() && (c = PEEK()) != '|' && c != stop)
+			p_ere_exp(p);
+		/* require nonempty */
+		(void) REQUIRE(HERE() != conc, REG_BADPAT);
+
+		if (!EAT('|'))
+			break;		/* NOTE BREAK OUT */
+
+		if (first) {
+			INSERT(OCH_, conc);	/* offset is wrong */
+			prevfwd = conc;
+			prevback = conc;
+			first = 0;
+		}
+		ASTERN(OOR1, prevback);
+		prevback = THERE();
+		AHEAD(prevfwd);			/* fix previous offset */
+		prevfwd = HERE();
+		EMIT(OOR2, 0);			/* offset is very wrong */
+	}
+
+	if (!first) {		/* tail-end fixups */
+		AHEAD(prevfwd);
+		ASTERN(O_CH, prevback);
+	}
+
+	assert(!MORE() || SEE(stop));
+}
+
+/*
+ * p_ere_exp - parse one subERE, an atom possibly followed by a repetition op
+ */
+static void
+p_ere_exp(struct parse *p)
+{
+	char c;
+	wint_t wc;
+	sopno pos;
+	int count;
+	int count2;
+	sopno subno;
+	int wascaret = 0;
+
+	assert(MORE());		/* caller should have ensured this */
+	c = GETNEXT();
+
+	pos = HERE();
+	switch (c) {
+	case '(':
+		(void) REQUIRE(MORE(), REG_EPAREN);
+		p->g->nsub++;
+		subno = p->g->nsub;
+		if (subno < NPAREN)
+			p->pbegin[subno] = HERE();
+		EMIT(OLPAREN, subno);
+		if (!SEE(')'))
+			p_ere(p, ')');
+		if (subno < NPAREN) {
+			p->pend[subno] = HERE();
+			assert(p->pend[subno] != 0);
+		}
+		EMIT(ORPAREN, subno);
+		(void) MUSTEAT(')', REG_EPAREN);
+		break;
+#ifndef POSIX_MISTAKE
+	case ')':		/* happens only if no current unmatched ( */
+		/*
+		 * You may ask, why the ifndef?  Because I didn't notice
+		 * this until slightly too late for 1003.2, and none of the
+		 * other 1003.2 regular-expression reviewers noticed it at
+		 * all.  So an unmatched ) is legal POSIX, at least until
+		 * we can get it fixed.
+		 */
+		SETERROR(REG_EPAREN);
+		break;
+#endif
+	case '^':
+		EMIT(OBOL, 0);
+		p->g->iflags |= USEBOL;
+		p->g->nbol++;
+		wascaret = 1;
+		break;
+	case '$':
+		EMIT(OEOL, 0);
+		p->g->iflags |= USEEOL;
+		p->g->neol++;
+		break;
+	case '|':
+		SETERROR(REG_BADPAT);
+		break;
+	case '*':
+	case '+':
+	case '?':
+		SETERROR(REG_BADRPT);
+		break;
+	case '.':
+		if (p->g->cflags&REG_NEWLINE)
+			nonnewline(p);
+		else
+			EMIT(OANY, 0);
+		break;
+	case '[':
+		p_bracket(p);
+		break;
+	case '\\':
+		(void) REQUIRE(MORE(), REG_EESCAPE);
+		wc = WGETNEXT();
+		ordinary(p, wc);
+		break;
+	case '{':		/* okay as ordinary except if digit follows */
+		(void) REQUIRE(!MORE() || !isdigit((uch)PEEK()), REG_BADRPT);
+		/* FALLTHROUGH */
+	default:
+		p->next--;
+		wc = WGETNEXT();
+		ordinary(p, wc);
+		break;
+	}
+
+	if (!MORE())
+		return;
+	c = PEEK();
+	/* we call { a repetition if followed by a digit */
+	if (!(c == '*' || c == '+' || c == '?' ||
+	    (c == '{' && MORE2() && isdigit((uch)PEEK2()))))
+		return;		/* no repetition, we're done */
+	NEXT();
+
+	(void) REQUIRE(!wascaret, REG_BADRPT);
+	switch (c) {
+	case '*':	/* implemented as +? */
+		/* this case does not require the (y|) trick, noKLUDGE */
+		INSERT(OPLUS_, pos);
+		ASTERN(O_PLUS, pos);
+		INSERT(OQUEST_, pos);
+		ASTERN(O_QUEST, pos);
+		break;
+	case '+':
+		INSERT(OPLUS_, pos);
+		ASTERN(O_PLUS, pos);
+		break;
+	case '?':
+		/* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
+		INSERT(OCH_, pos);		/* offset slightly wrong */
+		ASTERN(OOR1, pos);		/* this one's right */
+		AHEAD(pos);			/* fix the OCH_ */
+		EMIT(OOR2, 0);			/* offset very wrong... */
+		AHEAD(THERE());			/* ...so fix it */
+		ASTERN(O_CH, THERETHERE());
+		break;
+	case '{':
+		count = p_count(p);
+		if (EAT(',')) {
+			if (isdigit((uch)PEEK())) {
+				count2 = p_count(p);
+				(void) REQUIRE(count <= count2, REG_BADBR);
+			} else		/* single number with comma */
+				count2 = INFINITY;
+		} else		/* just a single number */
+			count2 = count;
+		repeat(p, pos, count, count2);
+		if (!EAT('}')) {	/* error heuristics */
+			while (MORE() && PEEK() != '}')
+				NEXT();
+			(void) REQUIRE(MORE(), REG_EBRACE);
+			SETERROR(REG_BADBR);
+		}
+		break;
+	}
+
+	if (!MORE())
+		return;
+	c = PEEK();
+	if (!(c == '*' || c == '+' || c == '?' ||
+	    (c == '{' && MORE2() && isdigit((uch)PEEK2()))))
+		return;
+	SETERROR(REG_BADRPT);
+}
+
+/*
+ * p_str - string (no metacharacters) "parser"
+ */
+static void
+p_str(struct parse *p)
+{
+	(void) REQUIRE(MORE(), REG_BADPAT);
+	while (MORE())
+		ordinary(p, WGETNEXT());
+}
+
+/*
+ * p_bre - BRE parser top level, anchoring and concatenation
+ * Giving end1 as OUT essentially eliminates the end1/end2 check.
+ *
+ * This implementation is a bit of a kludge, in that a trailing $ is first
+ * taken as an ordinary character and then revised to be an anchor.
+ * The amount of lookahead needed to avoid this kludge is excessive.
+ */
+static void
+p_bre(struct parse *p,
+    wint_t end1,		/* first terminating character */
+    wint_t end2)		/* second terminating character */
+{
+	sopno start = HERE();
+	int first = 1;			/* first subexpression? */
+	int wasdollar = 0;
+
+	if (EAT('^')) {
+		EMIT(OBOL, 0);
+		p->g->iflags |= USEBOL;
+		p->g->nbol++;
+	}
+	while (MORE() && !SEETWO(end1, end2)) {
+		wasdollar = p_simp_re(p, first);
+		first = 0;
+	}
+	if (wasdollar) {	/* oops, that was a trailing anchor */
+		DROP(1);
+		EMIT(OEOL, 0);
+		p->g->iflags |= USEEOL;
+		p->g->neol++;
+	}
+
+	(void) REQUIRE(HERE() != start, REG_BADPAT);	/* require nonempty */
+}
+
+/*
+ * p_simp_re - parse a simple RE, an atom possibly followed by a repetition
+ */
+static int			/* was the simple RE an unbackslashed $? */
+p_simp_re(struct parse *p,
+	int starordinary)	/* is a leading * an ordinary character? */
+{
+	int c;
+	int count;
+	int count2;
+	sopno pos;
+	int i;
+	wint_t wc;
+	sopno subno;
+#define	BACKSL	(1<<CHAR_BIT)
+
+	pos = HERE();		/* repetion op, if any, covers from here */
+
+	assert(MORE());		/* caller should have ensured this */
+	c = GETNEXT();
+	if (c == '\\') {
+		(void) REQUIRE(MORE(), REG_EESCAPE);
+		c = BACKSL | GETNEXT();
+	}
+	switch (c) {
+	case '.':
+		if (p->g->cflags&REG_NEWLINE)
+			nonnewline(p);
+		else
+			EMIT(OANY, 0);
+		break;
+	case '[':
+		p_bracket(p);
+		break;
+	case BACKSL|'{':
+		SETERROR(REG_BADRPT);
+		break;
+	case BACKSL|'(':
+		p->g->nsub++;
+		subno = p->g->nsub;
+		if (subno < NPAREN)
+			p->pbegin[subno] = HERE();
+		EMIT(OLPAREN, subno);
+		/* the MORE here is an error heuristic */
+		if (MORE() && !SEETWO('\\', ')'))
+			p_bre(p, '\\', ')');
+		if (subno < NPAREN) {
+			p->pend[subno] = HERE();
+			assert(p->pend[subno] != 0);
+		}
+		EMIT(ORPAREN, subno);
+		(void) REQUIRE(EATTWO('\\', ')'), REG_EPAREN);
+		break;
+	case BACKSL|')':	/* should not get here -- must be user */
+	case BACKSL|'}':
+		SETERROR(REG_EPAREN);
+		break;
+	case BACKSL|'1':
+	case BACKSL|'2':
+	case BACKSL|'3':
+	case BACKSL|'4':
+	case BACKSL|'5':
+	case BACKSL|'6':
+	case BACKSL|'7':
+	case BACKSL|'8':
+	case BACKSL|'9':
+		i = (c&~BACKSL) - '0';
+		assert(i < NPAREN);
+		if (p->pend[i] != 0) {
+			assert(i <= p->g->nsub);
+			EMIT(OBACK_, i);
+			assert(p->pbegin[i] != 0);
+			assert(OP(p->strip[p->pbegin[i]]) == OLPAREN);
+			assert(OP(p->strip[p->pend[i]]) == ORPAREN);
+			(void) dupl(p, p->pbegin[i]+1, p->pend[i]);
+			EMIT(O_BACK, i);
+		} else
+			SETERROR(REG_ESUBREG);
+		p->g->backrefs = 1;
+		break;
+	case '*':
+		(void) REQUIRE(starordinary, REG_BADRPT);
+		/* FALLTHROUGH */
+	default:
+		p->next--;
+		wc = WGETNEXT();
+		ordinary(p, wc);
+		break;
+	}
+
+	if (EAT('*')) {		/* implemented as +? */
+		/* this case does not require the (y|) trick, noKLUDGE */
+		INSERT(OPLUS_, pos);
+		ASTERN(O_PLUS, pos);
+		INSERT(OQUEST_, pos);
+		ASTERN(O_QUEST, pos);
+	} else if (EATTWO('\\', '{')) {
+		count = p_count(p);
+		if (EAT(',')) {
+			if (MORE() && isdigit((uch)PEEK())) {
+				count2 = p_count(p);
+				(void) REQUIRE(count <= count2, REG_BADBR);
+			} else		/* single number with comma */
+				count2 = INFINITY;
+		} else		/* just a single number */
+			count2 = count;
+		repeat(p, pos, count, count2);
+		if (!EATTWO('\\', '}')) {	/* error heuristics */
+			while (MORE() && !SEETWO('\\', '}'))
+				NEXT();
+			(void) REQUIRE(MORE(), REG_EBRACE);
+			SETERROR(REG_BADBR);
+		}
+	} else if (c == '$')	/* $ (but not \$) ends it */
+		return (1);
+
+	return (0);
+}
+
+/*
+ * p_count - parse a repetition count
+ */
+static int			/* the value */
+p_count(struct parse *p)
+{
+	int count = 0;
+	int ndigits = 0;
+
+	while (MORE() && isdigit((uch)PEEK()) && count <= DUPMAX) {
+		count = count*10 + (GETNEXT() - '0');
+		ndigits++;
+	}
+
+	(void) REQUIRE(ndigits > 0 && count <= DUPMAX, REG_BADBR);
+	return (count);
+}
+
+/*
+ * p_bracket - parse a bracketed character list
+ */
+static void
+p_bracket(struct parse *p)
+{
+	cset *cs;
+	wint_t ch;
+
+	/* Dept of Truly Sickening Special-Case Kludges */
+	if (p->next + 5 < p->end && strncmp(p->next, "[:<:]]", 6) == 0) {
+		EMIT(OBOW, 0);
+		NEXTn(6);
+		return;
+	}
+	if (p->next + 5 < p->end && strncmp(p->next, "[:>:]]", 6) == 0) {
+		EMIT(OEOW, 0);
+		NEXTn(6);
+		return;
+	}
+
+	if ((cs = allocset(p)) == NULL)
+		return;
+
+	if (p->g->cflags&REG_ICASE)
+		cs->icase = 1;
+	if (EAT('^'))
+		cs->invert = 1;
+	if (EAT(']'))
+		CHadd(p, cs, ']');
+	else if (EAT('-'))
+		CHadd(p, cs, '-');
+	while (MORE() && PEEK() != ']' && !SEETWO('-', ']'))
+		p_b_term(p, cs);
+	if (EAT('-'))
+		CHadd(p, cs, '-');
+	(void) MUSTEAT(']', REG_EBRACK);
+
+	if (p->error != 0)	/* don't mess things up further */
+		return;
+
+	if (cs->invert && p->g->cflags&REG_NEWLINE)
+		cs->bmp['\n' >> 3] |= 1 << ('\n' & 7);
+
+	if ((ch = singleton(cs)) != OUT) {	/* optimize singleton sets */
+		ordinary(p, ch);
+		freeset(p, cs);
+	} else
+		EMIT(OANYOF, (int)(cs - p->g->sets));
+}
+
+/*
+ * p_b_term - parse one term of a bracketed character list
+ */
+static void
+p_b_term(struct parse *p, cset *cs)
+{
+	char c;
+	wint_t start, finish;
+	wint_t i;
+
+	/* classify what we've got */
+	switch ((MORE()) ? PEEK() : '\0') {
+	case '[':
+		c = (MORE2()) ? PEEK2() : '\0';
+		break;
+	case '-':
+		SETERROR(REG_ERANGE);
+		return;			/* NOTE RETURN */
+		break;
+	default:
+		c = '\0';
+		break;
+	}
+
+	switch (c) {
+	case ':':		/* character class */
+		NEXT2();
+		(void) REQUIRE(MORE(), REG_EBRACK);
+		c = PEEK();
+		(void) REQUIRE(c != '-' && c != ']', REG_ECTYPE);
+		p_b_cclass(p, cs);
+		(void) REQUIRE(MORE(), REG_EBRACK);
+		(void) REQUIRE(EATTWO(':', ']'), REG_ECTYPE);
+		break;
+	case '=':		/* equivalence class */
+		NEXT2();
+		(void) REQUIRE(MORE(), REG_EBRACK);
+		c = PEEK();
+		(void) REQUIRE(c != '-' && c != ']', REG_ECOLLATE);
+		p_b_eclass(p, cs);
+		(void) REQUIRE(MORE(), REG_EBRACK);
+		(void) REQUIRE(EATTWO('=', ']'), REG_ECOLLATE);
+		break;
+	default:		/* symbol, ordinary character, or range */
+		start = p_b_symbol(p);
+		if (SEE('-') && MORE2() && PEEK2() != ']') {
+			/* range */
+			NEXT();
+			if (EAT('-'))
+				finish = '-';
+			else
+				finish = p_b_symbol(p);
+		} else
+			finish = start;
+		if (start == finish)
+			CHadd(p, cs, start);
+		else {
+			if (__collate_load_error) {
+				(void) REQUIRE((uch)start <= (uch)finish,
+				    REG_ERANGE);
+				CHaddrange(p, cs, start, finish);
+			} else {
+				(void) REQUIRE(__collate_range_cmp(start,
+				    finish) <= 0, REG_ERANGE);
+				for (i = 0; i <= UCHAR_MAX; i++) {
+					if (__collate_range_cmp(start, i) <=
+					    0 &&
+					    __collate_range_cmp(i, finish) <=
+					    0)
+						CHadd(p, cs, i);
+				}
+			}
+		}
+		break;
+	}
+}
+
+/*
+ * p_b_cclass - parse a character-class name and deal with it
+ */
+static void
+p_b_cclass(struct parse *p, cset *cs)
+{
+	char *sp = p->next;
+	size_t len;
+	wctype_t wct;
+	char clname[16];
+
+	while (MORE() && isalpha((uch)PEEK()))
+		NEXT();
+	len = p->next - sp;
+	if (len >= sizeof (clname) - 1) {
+		SETERROR(REG_ECTYPE);
+		return;
+	}
+	(void) memcpy(clname, sp, len);
+	clname[len] = '\0';
+	if ((wct = wctype(clname)) == 0) {
+		SETERROR(REG_ECTYPE);
+		return;
+	}
+	CHaddtype(p, cs, wct);
+}
+
+/*
+ * p_b_eclass - parse an equivalence-class name and deal with it
+ *
+ * This implementation is incomplete. xxx
+ */
+static void
+p_b_eclass(struct parse *p, cset *cs)
+{
+	wint_t c;
+
+	c = p_b_coll_elem(p, '=');
+	CHadd(p, cs, c);
+}
+
+/*
+ * p_b_symbol - parse a character or [..]ed multicharacter collating symbol
+ */
+static wint_t			/* value of symbol */
+p_b_symbol(struct parse *p)
+{
+	wint_t value;
+
+	(void) REQUIRE(MORE(), REG_EBRACK);
+	if (!EATTWO('[', '.'))
+		return (WGETNEXT());
+
+	/* collating symbol */
+	value = p_b_coll_elem(p, '.');
+	(void) REQUIRE(EATTWO('.', ']'), REG_ECOLLATE);
+	return (value);
+}
+
+/*
+ * p_b_coll_elem - parse a collating-element name and look it up
+ */
+static wint_t			/* value of collating element */
+p_b_coll_elem(struct parse *p,
+	wint_t endc)		/* name ended by endc,']' */
+{
+	char *sp = p->next;
+	struct cname *cp;
+	int len;
+	mbstate_t mbs;
+	wchar_t wc;
+	size_t clen;
+
+	while (MORE() && !SEETWO(endc, ']'))
+		NEXT();
+	if (!MORE()) {
+		SETERROR(REG_EBRACK);
+		return (0);
+	}
+	len = p->next - sp;
+	for (cp = cnames; cp->name != NULL; cp++)
+		if (strncmp(cp->name, sp, len) == 0 && cp->name[len] == '\0')
+			return (cp->code);	/* known name */
+	(void) memset(&mbs, 0, sizeof (mbs));
+	if ((clen = mbrtowc(&wc, sp, len, &mbs)) == len)
+		return (wc);			/* single character */
+	else if (clen == (size_t)-1 || clen == (size_t)-2)
+		SETERROR(REG_ECHAR);
+	else
+		SETERROR(REG_ECOLLATE);		/* neither */
+	return (0);
+}
+
+/*
+ * othercase - return the case counterpart of an alphabetic
+ */
+static wint_t			/* if no counterpart, return ch */
+othercase(wint_t ch)
+{
+	assert(iswalpha(ch));
+	if (iswupper(ch))
+		return (towlower(ch));
+	else if (iswlower(ch))
+		return (towupper(ch));
+	else			/* peculiar, but could happen */
+		return (ch);
+}
+
+/*
+ * bothcases - emit a dualcase version of a two-case character
+ *
+ * Boy, is this implementation ever a kludge...
+ */
+static void
+bothcases(struct parse *p, wint_t ch)
+{
+	char *oldnext = p->next;
+	char *oldend = p->end;
+	char bracket[3 + MB_LEN_MAX];
+	size_t n;
+	mbstate_t mbs;
+
+	assert(othercase(ch) != ch);	/* p_bracket() would recurse */
+	p->next = bracket;
+	(void) memset(&mbs, 0, sizeof (mbs));
+	n = wcrtomb(bracket, ch, &mbs);
+	assert(n != (size_t)-1);
+	bracket[n] = ']';
+	bracket[n + 1] = '\0';
+	p->end = bracket+n+1;
+	p_bracket(p);
+	assert(p->next == p->end);
+	p->next = oldnext;
+	p->end = oldend;
+}
+
+/*
+ * ordinary - emit an ordinary character
+ */
+static void
+ordinary(struct parse *p, wint_t ch)
+{
+	cset *cs;
+
+	if ((p->g->cflags&REG_ICASE) && iswalpha(ch) && othercase(ch) != ch)
+		bothcases(p, ch);
+	else if ((ch & OPDMASK) == ch)
+		EMIT(OCHAR, ch);
+	else {
+		/*
+		 * Kludge: character is too big to fit into an OCHAR operand.
+		 * Emit a singleton set.
+		 */
+		if ((cs = allocset(p)) == NULL)
+			return;
+		CHadd(p, cs, ch);
+		EMIT(OANYOF, (int)(cs - p->g->sets));
+	}
+}
+
+/*
+ * nonnewline - emit REG_NEWLINE version of OANY
+ *
+ * Boy, is this implementation ever a kludge...
+ */
+static void
+nonnewline(struct parse *p)
+{
+	char *oldnext = p->next;
+	char *oldend = p->end;
+	char bracket[4];
+
+	p->next = bracket;
+	p->end = bracket+3;
+	bracket[0] = '^';
+	bracket[1] = '\n';
+	bracket[2] = ']';
+	bracket[3] = '\0';
+	p_bracket(p);
+	assert(p->next == bracket+3);
+	p->next = oldnext;
+	p->end = oldend;
+}
+
+/*
+ * repeat - generate code for a bounded repetition, recursively if needed
+ */
+static void
+repeat(struct parse *p,
+    sopno start,		/* operand from here to end of strip */
+    int from,			/* repeated from this number */
+    int to)			/* to this number of times (maybe INFINITY) */
+{
+	sopno finish = HERE();
+#define	N	2
+#define	INF	3
+#define	REP(f, t)	((f)*8 + (t))
+#define	MAP(n)	(((n) <= 1) ? (n) : ((n) == INFINITY) ? INF : N)
+	sopno copy;
+
+	if (p->error != 0)	/* head off possible runaway recursion */
+		return;
+
+	assert(from <= to);
+
+	switch (REP(MAP(from), MAP(to))) {
+	case REP(0, 0):			/* must be user doing this */
+		DROP(finish-start);	/* drop the operand */
+		break;
+	case REP(0, 1):			/* as x{1,1}? */
+	case REP(0, N):			/* as x{1,n}? */
+	case REP(0, INF):		/* as x{1,}? */
+		/* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
+		INSERT(OCH_, start);		/* offset is wrong... */
+		repeat(p, start+1, 1, to);
+		ASTERN(OOR1, start);
+		AHEAD(start);			/* ... fix it */
+		EMIT(OOR2, 0);
+		AHEAD(THERE());
+		ASTERN(O_CH, THERETHERE());
+		break;
+	case REP(1, 1):			/* trivial case */
+		/* done */
+		break;
+	case REP(1, N):			/* as x?x{1,n-1} */
+		/* KLUDGE: emit y? as (y|) until subtle bug gets fixed */
+		INSERT(OCH_, start);
+		ASTERN(OOR1, start);
+		AHEAD(start);
+		EMIT(OOR2, 0);			/* offset very wrong... */
+		AHEAD(THERE());			/* ...so fix it */
+		ASTERN(O_CH, THERETHERE());
+		copy = dupl(p, start+1, finish+1);
+		assert(copy == finish+4);
+		repeat(p, copy, 1, to-1);
+		break;
+	case REP(1, INF):		/* as x+ */
+		INSERT(OPLUS_, start);
+		ASTERN(O_PLUS, start);
+		break;
+	case REP(N, N):			/* as xx{m-1,n-1} */
+		copy = dupl(p, start, finish);
+		repeat(p, copy, from-1, to-1);
+		break;
+	case REP(N, INF):		/* as xx{n-1,INF} */
+		copy = dupl(p, start, finish);
+		repeat(p, copy, from-1, to);
+		break;
+	default:			/* "can't happen" */
+		SETERROR(REG_EFATAL);	/* just in case */
+		break;
+	}
+}
+
+/*
+ * wgetnext - helper function for WGETNEXT() macro. Gets the next wide
+ * character from the parse struct, signals a REG_ILLSEQ error if the
+ * character can't be converted. Returns the number of bytes consumed.
+ */
+static wint_t
+wgetnext(struct parse *p)
+{
+	mbstate_t mbs;
+	wchar_t wc;
+	size_t n;
+
+	(void) memset(&mbs, 0, sizeof (mbs));
+	n = mbrtowc(&wc, p->next, p->end - p->next, &mbs);
+	if (n == (size_t)-1 || n == (size_t)-2) {
+		SETERROR(REG_ECHAR);
+		return (0);
+	}
+	if (n == 0)
+		n = 1;
+	p->next += n;
+	return (wc);
+}
+
+/*
+ * seterr - set an error condition
+ */
+static int			/* useless but makes type checking happy */
+seterr(struct parse *p, int e)
+{
+	if (p->error == 0)	/* keep earliest error condition */
+		p->error = e;
+	p->next = nuls;		/* try to bring things to a halt */
+	p->end = nuls;
+	return (0);		/* make the return value well-defined */
+}
+
+/*
+ * allocset - allocate a set of characters for []
+ */
+static cset *
+allocset(struct parse *p)
+{
+	cset *cs, *ncs;
+
+	ncs = realloc(p->g->sets, (p->g->ncsets + 1) * sizeof (*ncs));
+	if (ncs == NULL) {
+		SETERROR(REG_ESPACE);
+		return (NULL);
+	}
+	p->g->sets = ncs;
+	cs = &p->g->sets[p->g->ncsets++];
+	(void) memset(cs, 0, sizeof (*cs));
+
+	return (cs);
+}
+
+/*
+ * freeset - free a now-unused set
+ */
+static void
+freeset(struct parse *p, cset *cs)
+{
+	cset *top = &p->g->sets[p->g->ncsets];
+
+	free(cs->wides);
+	free(cs->ranges);
+	free(cs->types);
+	(void) memset(cs, 0, sizeof (*cs));
+	if (cs == top-1)	/* recover only the easy case */
+		p->g->ncsets--;
+}
+
+/*
+ * singleton - Determine whether a set contains only one character,
+ * returning it if so, otherwise returning OUT.
+ */
+static wint_t
+singleton(cset *cs)
+{
+	wint_t i, s, n;
+
+	for (i = n = 0; i < NC; i++)
+		if (CHIN(cs, i)) {
+			n++;
+			s = i;
+		}
+	if (n == 1)
+		return (s);
+	if (cs->nwides == 1 && cs->nranges == 0 && cs->ntypes == 0 &&
+	    cs->icase == 0)
+		return (cs->wides[0]);
+	/* Don't bother handling the other cases. */
+	return (OUT);
+}
+
+/*
+ * CHadd - add character to character set.
+ */
+static void
+CHadd(struct parse *p, cset *cs, wint_t ch)
+{
+	wint_t nch, *newwides;
+	assert(ch >= 0);
+	if (ch < NC)
+		cs->bmp[ch >> 3] |= 1 << (ch & 7);
+	else {
+		newwides = realloc(cs->wides, (cs->nwides + 1) *
+		    sizeof (*cs->wides));
+		if (newwides == NULL) {
+			SETERROR(REG_ESPACE);
+			return;
+		}
+		cs->wides = newwides;
+		cs->wides[cs->nwides++] = ch;
+	}
+	if (cs->icase) {
+		if ((nch = towlower(ch)) < NC)
+			cs->bmp[nch >> 3] |= 1 << (nch & 7);
+		if ((nch = towupper(ch)) < NC)
+			cs->bmp[nch >> 3] |= 1 << (nch & 7);
+	}
+}
+
+/*
+ * CHaddrange - add all characters in the range [min,max] to a character set.
+ */
+static void
+CHaddrange(struct parse *p, cset *cs, wint_t min, wint_t max)
+{
+	crange *newranges;
+
+	for (; min < NC && min <= max; min++)
+		CHadd(p, cs, min);
+	if (min >= max)
+		return;
+	newranges = realloc(cs->ranges, (cs->nranges + 1) *
+	    sizeof (*cs->ranges));
+	if (newranges == NULL) {
+		SETERROR(REG_ESPACE);
+		return;
+	}
+	cs->ranges = newranges;
+	cs->ranges[cs->nranges].min = min;
+	cs->ranges[cs->nranges].min = max;
+	cs->nranges++;
+}
+
+/*
+ * CHaddtype - add all characters of a certain type to a character set.
+ */
+static void
+CHaddtype(struct parse *p, cset *cs, wctype_t wct)
+{
+	wint_t i;
+	wctype_t *newtypes;
+
+	for (i = 0; i < NC; i++)
+		if (iswctype(i, wct))
+			CHadd(p, cs, i);
+	newtypes = realloc(cs->types, (cs->ntypes + 1) *
+	    sizeof (*cs->types));
+	if (newtypes == NULL) {
+		SETERROR(REG_ESPACE);
+		return;
+	}
+	cs->types = newtypes;
+	cs->types[cs->ntypes++] = wct;
+}
+
+/*
+ * dupl - emit a duplicate of a bunch of sops
+ */
+static sopno			/* start of duplicate */
+dupl(struct parse *p,
+	sopno start,		/* from here */
+	sopno finish)		/* to this less one */
+{
+	sopno ret = HERE();
+	sopno len = finish - start;
+
+	assert(finish >= start);
+	if (len == 0)
+		return (ret);
+	enlarge(p, p->ssize + len);	/* this many unexpected additions */
+	assert(p->ssize >= p->slen + len);
+	(void) memcpy((char *)(p->strip + p->slen),
+	    (char *)(p->strip + start), (size_t)len*sizeof (sop));
+	p->slen += len;
+	return (ret);
+}
+
+/*
+ * doemit - emit a strip operator
+ *
+ * It might seem better to implement this as a macro with a function as
+ * hard-case backup, but it's just too big and messy unless there are
+ * some changes to the data structures.  Maybe later.
+ */
+static void
+doemit(struct parse *p, sop op, size_t opnd)
+{
+	/* avoid making error situations worse */
+	if (p->error != 0)
+		return;
+
+	/* deal with oversize operands ("can't happen", more or less) */
+	assert(opnd < 1<<OPSHIFT);
+
+	/* deal with undersized strip */
+	if (p->slen >= p->ssize)
+		enlarge(p, (p->ssize+1) / 2 * 3);	/* +50% */
+	assert(p->slen < p->ssize);
+
+	/* finally, it's all reduced to the easy case */
+	p->strip[p->slen++] = SOP(op, opnd);
+}
+
+/*
+ * doinsert - insert a sop into the strip
+ */
+static void
+doinsert(struct parse *p, sop op, size_t opnd, sopno pos)
+{
+	sopno sn;
+	sop s;
+	int i;
+
+	/* avoid making error situations worse */
+	if (p->error != 0)
+		return;
+
+	sn = HERE();
+	EMIT(op, opnd);		/* do checks, ensure space */
+	assert(HERE() == sn+1);
+	s = p->strip[sn];
+
+	/* adjust paren pointers */
+	assert(pos > 0);
+	for (i = 1; i < NPAREN; i++) {
+		if (p->pbegin[i] >= pos) {
+			p->pbegin[i]++;
+		}
+		if (p->pend[i] >= pos) {
+			p->pend[i]++;
+		}
+	}
+
+	(void) memmove((char *)&p->strip[pos+1], (char *)&p->strip[pos],
+	    (HERE()-pos-1)*sizeof (sop));
+	p->strip[pos] = s;
+}
+
+/*
+ * dofwd - complete a forward reference
+ */
+static void
+dofwd(struct parse *p, sopno pos, sop value)
+{
+	/* avoid making error situations worse */
+	if (p->error != 0)
+		return;
+
+	assert(value < 1<<OPSHIFT);
+	p->strip[pos] = OP(p->strip[pos]) | value;
+}
+
+/*
+ * enlarge - enlarge the strip
+ */
+static void
+enlarge(struct parse *p, sopno size)
+{
+	sop *sp;
+
+	if (p->ssize >= size)
+		return;
+
+	sp = (sop *)realloc(p->strip, size*sizeof (sop));
+	if (sp == NULL) {
+		SETERROR(REG_ESPACE);
+		return;
+	}
+	p->strip = sp;
+	p->ssize = size;
+}
+
+/*
+ * stripsnug - compact the strip
+ */
+static void
+stripsnug(struct parse *p, struct re_guts *g)
+{
+	g->nstates = p->slen;
+	g->strip = (sop *)realloc((char *)p->strip, p->slen * sizeof (sop));
+	if (g->strip == NULL) {
+		SETERROR(REG_ESPACE);
+		g->strip = p->strip;
+	}
+}
+
+/*
+ * findmust - fill in must and mlen with longest mandatory literal string
+ *
+ * This algorithm could do fancy things like analyzing the operands of |
+ * for common subsequences.  Someday.  This code is simple and finds most
+ * of the interesting cases.
+ *
+ * Note that must and mlen got initialized during setup.
+ */
+static void
+findmust(struct parse *p, struct re_guts *g)
+{
+	sop *scan;
+	sop *start;
+	sop *newstart;
+	sopno newlen;
+	sop s;
+	char *cp;
+	int offset;
+	char buf[MB_LEN_MAX];
+	size_t clen;
+	mbstate_t mbs;
+
+	/* avoid making error situations worse */
+	if (p->error != 0)
+		return;
+
+	/*
+	 * It's not generally safe to do a ``char'' substring search on
+	 * multibyte character strings, but it's safe for at least
+	 * UTF-8 (see RFC 3629).
+	 */
+	if (MB_CUR_MAX > 1 &&
+	    strcmp(_CurrentRuneLocale->__encoding, "UTF-8") != 0)
+		return;
+
+	/* find the longest OCHAR sequence in strip */
+	newlen = 0;
+	offset = 0;
+	g->moffset = 0;
+	scan = g->strip + 1;
+	do {
+		s = *scan++;
+		switch (OP(s)) {
+		case OCHAR:		/* sequence member */
+			if (newlen == 0) {		/* new sequence */
+				(void) memset(&mbs, 0, sizeof (mbs));
+				newstart = scan - 1;
+			}
+			clen = wcrtomb(buf, OPND(s), &mbs);
+			if (clen == (size_t)-1)
+				goto toohard;
+			newlen += clen;
+			break;
+		case OPLUS_:		/* things that don't break one */
+		case OLPAREN:
+		case ORPAREN:
+			break;
+		case OQUEST_:		/* things that must be skipped */
+		case OCH_:
+			offset = altoffset(scan, offset);
+			scan--;
+			do {
+				scan += OPND(s);
+				s = *scan;
+				/* assert() interferes w debug printouts */
+				if (OP(s) != O_QUEST && OP(s) != O_CH &&
+				    OP(s) != OOR2) {
+					g->iflags |= BAD;
+					return;
+				}
+			} while (OP(s) != O_QUEST && OP(s) != O_CH);
+			/* FALLTHROUGH */
+		case OBOW:		/* things that break a sequence */
+		case OEOW:
+		case OBOL:
+		case OEOL:
+		case O_QUEST:
+		case O_CH:
+		case OEND:
+			if (newlen > g->mlen) {		/* ends one */
+				start = newstart;
+				g->mlen = newlen;
+				if (offset > -1) {
+					g->moffset += offset;
+					offset = newlen;
+				} else
+					g->moffset = offset;
+			} else {
+				if (offset > -1)
+					offset += newlen;
+			}
+			newlen = 0;
+			break;
+		case OANY:
+			if (newlen > g->mlen) {		/* ends one */
+				start = newstart;
+				g->mlen = newlen;
+				if (offset > -1) {
+					g->moffset += offset;
+					offset = newlen;
+				} else
+					g->moffset = offset;
+			} else {
+				if (offset > -1)
+					offset += newlen;
+			}
+			if (offset > -1)
+				offset++;
+			newlen = 0;
+			break;
+		case OANYOF:		/* may or may not invalidate offset */
+			/* First, everything as OANY */
+			if (newlen > g->mlen) {		/* ends one */
+				start = newstart;
+				g->mlen = newlen;
+				if (offset > -1) {
+					g->moffset += offset;
+					offset = newlen;
+				} else
+					g->moffset = offset;
+			} else {
+				if (offset > -1)
+					offset += newlen;
+			}
+			if (offset > -1)
+				offset++;
+			newlen = 0;
+			break;
+		toohard:
+		default:
+			/*
+			 * Anything here makes it impossible or too hard
+			 * to calculate the offset -- so we give up;
+			 * save the last known good offset, in case the
+			 * must sequence doesn't occur later.
+			 */
+			if (newlen > g->mlen) {		/* ends one */
+				start = newstart;
+				g->mlen = newlen;
+				if (offset > -1)
+					g->moffset += offset;
+				else
+					g->moffset = offset;
+			}
+			offset = -1;
+			newlen = 0;
+			break;
+		}
+	} while (OP(s) != OEND);
+
+	if (g->mlen == 0) {		/* there isn't one */
+		g->moffset = -1;
+		return;
+	}
+
+	/* turn it into a character string */
+	g->must = malloc((size_t)g->mlen + 1);
+	if (g->must == NULL) {		/* argh; just forget it */
+		g->mlen = 0;
+		g->moffset = -1;
+		return;
+	}
+	cp = g->must;
+	scan = start;
+	(void) memset(&mbs, 0, sizeof (mbs));
+	while (cp < g->must + g->mlen) {
+		while (OP(s = *scan++) != OCHAR)
+			continue;
+		clen = wcrtomb(cp, OPND(s), &mbs);
+		assert(clen != (size_t)-1);
+		cp += clen;
+	}
+	assert(cp == g->must + g->mlen);
+	*cp++ = '\0';		/* just on general principles */
+}
+
+/*
+ * altoffset - choose biggest offset among multiple choices
+ *
+ * Compute, recursively if necessary, the largest offset among multiple
+ * re paths.
+ */
+static int
+altoffset(sop *scan, int offset)
+{
+	int largest;
+	int try;
+	sop s;
+
+	/* If we gave up already on offsets, return */
+	if (offset == -1)
+		return (-1);
+
+	largest = 0;
+	try = 0;
+	s = *scan++;
+	while (OP(s) != O_QUEST && OP(s) != O_CH) {
+		switch (OP(s)) {
+		case OOR1:
+			if (try > largest)
+				largest = try;
+			try = 0;
+			break;
+		case OQUEST_:
+		case OCH_:
+			try = altoffset(scan, try);
+			if (try == -1)
+				return (-1);
+			scan--;
+			do {
+				scan += OPND(s);
+				s = *scan;
+				if (OP(s) != O_QUEST && OP(s) != O_CH &&
+				    OP(s) != OOR2)
+					return (-1);
+			} while (OP(s) != O_QUEST && OP(s) != O_CH);
+			/*
+			 * We must skip to the next position, or we'll
+			 * leave altoffset() too early.
+			 */
+			scan++;
+			break;
+		case OANYOF:
+		case OCHAR:
+		case OANY:
+			try++;
+			/*FALLTHRU*/
+		case OBOW:
+		case OEOW:
+		case OLPAREN:
+		case ORPAREN:
+		case OOR2:
+			break;
+		default:
+			try = -1;
+			break;
+		}
+		if (try == -1)
+			return (-1);
+		s = *scan++;
+	}
+
+	if (try > largest)
+		largest = try;
+
+	return (largest+offset);
+}
+
+/*
+ * computejumps - compute char jumps for BM scan
+ *
+ * This algorithm assumes g->must exists and is has size greater than
+ * zero. It's based on the algorithm found on Computer Algorithms by
+ * Sara Baase.
+ *
+ * A char jump is the number of characters one needs to jump based on
+ * the value of the character from the text that was mismatched.
+ */
+static void
+computejumps(struct parse *p, struct re_guts *g)
+{
+	int ch;
+	int mindex;
+
+	/* Avoid making errors worse */
+	if (p->error != 0)
+		return;
+
+	g->charjump = (int *)malloc((NC + 1) * sizeof (int));
+	if (g->charjump == NULL)	/* Not a fatal error */
+		return;
+	/* Adjust for signed chars, if necessary */
+	g->charjump = &g->charjump[-(CHAR_MIN)];
+
+	/*
+	 * If the character does not exist in the pattern, the jump
+	 * is equal to the number of characters in the pattern.
+	 */
+	for (ch = CHAR_MIN; ch < (CHAR_MAX + 1); ch++)
+		g->charjump[ch] = g->mlen;
+
+	/*
+	 * If the character does exist, compute the jump that would
+	 * take us to the last character in the pattern equal to it
+	 * (notice that we match right to left, so that last character
+	 * is the first one that would be matched).
+	 */
+	for (mindex = 0; mindex < g->mlen; mindex++)
+		g->charjump[(int)g->must[mindex]] = g->mlen - mindex - 1;
+}
+
+/*
+ * computematchjumps - compute match jumps for BM scan
+ *
+ * This algorithm assumes g->must exists and is has size greater than
+ * zero. It's based on the algorithm found on Computer Algorithms by
+ * Sara Baase.
+ *
+ * A match jump is the number of characters one needs to advance based
+ * on the already-matched suffix.
+ * Notice that all values here are minus (g->mlen-1), because of the way
+ * the search algorithm works.
+ */
+static void
+computematchjumps(struct parse *p, struct re_guts *g)
+{
+	int mindex;		/* General "must" iterator */
+	int suffix;		/* Keeps track of matching suffix */
+	int ssuffix;		/* Keeps track of suffixes' suffix */
+	int *pmatches;
+				/*
+				 * pmatches[k] points to the next i
+				 * such that i+1...mlen is a substring
+				 * of k+1...k+mlen-i-1
+				 */
+
+	/* Avoid making errors worse */
+	if (p->error != 0)
+		return;
+
+	pmatches = (int *)malloc(g->mlen * sizeof (unsigned int));
+	if (pmatches == NULL) {
+		g->matchjump = NULL;
+		return;
+	}
+
+	g->matchjump = (int *)malloc(g->mlen * sizeof (unsigned int));
+	if (g->matchjump == NULL)	/* Not a fatal error */
+		return;
+
+	/* Set maximum possible jump for each character in the pattern */
+	for (mindex = 0; mindex < g->mlen; mindex++)
+		g->matchjump[mindex] = 2*g->mlen - mindex - 1;
+
+	/* Compute pmatches[] */
+	for (mindex = g->mlen - 1, suffix = g->mlen; mindex >= 0;
+	    mindex--, suffix--) {
+		pmatches[mindex] = suffix;
+
+		/*
+		 * If a mismatch is found, interrupting the substring,
+		 * compute the matchjump for that position. If no
+		 * mismatch is found, then a text substring mismatched
+		 * against the suffix will also mismatch against the
+		 * substring.
+		 */
+		while (suffix < g->mlen && g->must[mindex] != g->must[suffix]) {
+			g->matchjump[suffix] = MIN(g->matchjump[suffix],
+			    g->mlen - mindex - 1);
+			suffix = pmatches[suffix];
+		}
+	}
+
+	/*
+	 * Compute the matchjump up to the last substring found to jump
+	 * to the beginning of the largest must pattern prefix matching
+	 * it's own suffix.
+	 */
+	for (mindex = 0; mindex <= suffix; mindex++)
+		g->matchjump[mindex] = MIN(g->matchjump[mindex],
+		    g->mlen + suffix - mindex);
+
+	ssuffix = pmatches[suffix];
+	while (suffix < g->mlen) {
+		while (suffix <= ssuffix && suffix < g->mlen) {
+			g->matchjump[suffix] = MIN(g->matchjump[suffix],
+			    g->mlen + ssuffix - suffix);
+			suffix++;
+		}
+		if (suffix < g->mlen)
+			ssuffix = pmatches[ssuffix];
+	}
+
+	free(pmatches);
+}
+
+/*
+ * pluscount - count + nesting
+ */
+static sopno			/* nesting depth */
+pluscount(struct parse *p, struct re_guts *g)
+{
+	sop *scan;
+	sop s;
+	sopno plusnest = 0;
+	sopno maxnest = 0;
+
+	if (p->error != 0)
+		return (0);	/* there may not be an OEND */
+
+	scan = g->strip + 1;
+	do {
+		s = *scan++;
+		switch (OP(s)) {
+		case OPLUS_:
+			plusnest++;
+			break;
+		case O_PLUS:
+			if (plusnest > maxnest)
+				maxnest = plusnest;
+			plusnest--;
+			break;
+		}
+	} while (OP(s) != OEND);
+	if (plusnest != 0)
+		g->iflags |= BAD;
+	return (maxnest);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/regerror.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,113 @@
+/*
+ * Copyright (c) 1992, 1993, 1994 Henry Spencer.
+ * Copyright (c) 1992, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Henry Spencer.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include "file64.h"
+#include <sys/types.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <regex.h>
+
+#include "utils.h"
+
+static struct rerr {
+	int code;
+	char *name;
+	char *explain;
+} rerrs[] = {
+	{REG_NOMATCH,	"REG_NOMATCH",	"regexec() failed to match"},
+	{REG_BADPAT,	"REG_BADPAT",	"invalid regular expression"},
+	{REG_ECOLLATE,	"REG_ECOLLATE",	"invalid collating element"},
+	{REG_ECTYPE,	"REG_ECTYPE",	"invalid character class"},
+	{REG_EESCAPE,	"REG_EESCAPE",	"trailing backslash (\\)"},
+	{REG_ESUBREG,	"REG_ESUBREG",	"invalid backreference number"},
+	{REG_EBRACK,	"REG_EBRACK",	"brackets ([ ]) not balanced"},
+	{REG_EPAREN,	"REG_EPAREN",	"parentheses not balanced"},
+	{REG_EBRACE,	"REG_EBRACE",	"braces not balanced"},
+	{REG_BADBR,	"REG_BADBR",	"invalid repetition count(s)"},
+	{REG_ERANGE,	"REG_ERANGE",	"invalid character range"},
+	{REG_ESPACE,	"REG_ESPACE",	"out of memory"},
+	{REG_BADRPT,	"REG_BADRPT",	"repetition-operator operand invalid"},
+#ifdef	REG_EMPTY
+	{REG_EMPTY,	"REG_EMPTY",	"empty (sub)expression"},
+#endif
+	{REG_EFATAL,	"REG_EFATAL",	"\"can't happen\" -- you found a bug"},
+#ifdef	REG_INVARG
+	{REG_INVARG,	"REG_INVARG",	"invalid argument to regex routine"},
+#endif
+	{REG_ECHAR,	"REG_ECHAR",	"illegal byte sequence"},
+	{REG_ENOSYS,	"REG_ENOSYS",	"function not supported"},
+	{REG_STACK,	"REG_STACK",	"backtrack stack overflow"},
+	{REG_ENSUB,	"REG_ENSUB",	"more than 9 \\( \\) pairs"},
+	{REG_ENEWLINE,	"REG_ENEWLINE",	"\n found before end of pattern"},
+	{0,		"",		"*** unknown regexp error code ***"}
+};
+
+
+/*
+ * regerror - the interface to error numbers
+ */
+/* ARGSUSED */
+size_t
+regerror(int errcode, const regex_t *_RESTRICT_KYWD preg,
+    char *_RESTRICT_KYWD errbuf, size_t errbuf_size)
+{
+	struct rerr *r;
+	size_t len;
+	char *s;
+
+	for (r = rerrs; r->code != 0; r++)
+		if (r->code == errcode)
+			break;
+
+	s = r->explain;
+
+	len = strlen(s) + 1;
+	if (errbuf_size > 0) {
+		if (errbuf_size > len)
+			(void) strcpy(errbuf, s);
+		else {
+			(void) strncpy(errbuf, s, errbuf_size-1);
+			errbuf[errbuf_size-1] = '\0';
+		}
+	}
+
+	return (len);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/regex2.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 1992, 1993, 1994 Henry Spencer.
+ * Copyright (c) 1992, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Henry Spencer.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ *	@(#)regex2.h	8.4 (Berkeley) 3/20/94
+ * $FreeBSD: src/lib/libc/regex/regex2.h,v 1.11 2007/01/09 00:28:04 imp Exp $
+ */
+
+/*
+ * First, the stuff that ends up in the outside-world include file
+ * typedef off_t regoff_t;
+ * typedef struct {
+ * 	int re_magic;
+ * 	size_t re_nsub;		// number of parenthesized subexpressions
+ * 	const char *re_endp;	// end pointer for REG_PEND
+ * 	struct re_guts *re_g;	// none of your business :-)
+ * } regex_t;
+ * typedef struct {
+ * 	regoff_t rm_so;		// start of match
+ * 	regoff_t rm_eo;		// end of match
+ * } regmatch_t;
+ */
+/*
+ * internals of regex_t
+ */
+#define	MAGIC1	((('r'^0200)<<8) | 'e')
+
+/*
+ * The internal representation is a *strip*, a sequence of
+ * operators ending with an endmarker.  (Some terminology etc. is a
+ * historical relic of earlier versions which used multiple strips.)
+ * Certain oddities in the representation are there to permit running
+ * the machinery backwards; in particular, any deviation from sequential
+ * flow must be marked at both its source and its destination.  Some
+ * fine points:
+ *
+ * - OPLUS_ and O_PLUS are *inside* the loop they create.
+ * - OQUEST_ and O_QUEST are *outside* the bypass they create.
+ * - OCH_ and O_CH are *outside* the multi-way branch they create, while
+ *   OOR1 and OOR2 are respectively the end and the beginning of one of
+ *   the branches.  Note that there is an implicit OOR2 following OCH_
+ *   and an implicit OOR1 preceding O_CH.
+ *
+ * In state representations, an operator's bit is on to signify a state
+ * immediately *preceding* "execution" of that operator.
+ */
+typedef unsigned int sop;	/* strip operator */
+typedef int sopno;
+#define	OPRMASK	0xf8000000U
+#define	OPDMASK	0x07ffffffU
+#define	OPSHIFT	((unsigned)27)
+#define	OP(n)	((n)&OPRMASK)
+#define	OPND(n)	((n)&OPDMASK)
+#define	SOP(op, opnd)	((op)|(opnd))
+/* operators			   meaning	operand			*/
+/*						(back, fwd are offsets)	*/
+#define	OEND	(1U<<OPSHIFT)	/* endmarker	-			*/
+#define	OCHAR	(2U<<OPSHIFT)	/* character	wide character		*/
+#define	OBOL	(3U<<OPSHIFT)	/* left anchor	-			*/
+#define	OEOL	(4U<<OPSHIFT)	/* right anchor	-			*/
+#define	OANY	(5U<<OPSHIFT)	/* .		-			*/
+#define	OANYOF	(6U<<OPSHIFT)	/* [...]	set number		*/
+#define	OBACK_	(7U<<OPSHIFT)	/* begin \d	paren number		*/
+#define	O_BACK	(8U<<OPSHIFT)	/* end \d	paren number		*/
+#define	OPLUS_	(9U<<OPSHIFT)	/* + prefix	fwd to suffix		*/
+#define	O_PLUS	(10U<<OPSHIFT)	/* + suffix	back to prefix		*/
+#define	OQUEST_	(11U<<OPSHIFT)	/* ? prefix	fwd to suffix		*/
+#define	O_QUEST	(12U<<OPSHIFT)	/* ? suffix	back to prefix		*/
+#define	OLPAREN	(13U<<OPSHIFT)	/* (		fwd to )		*/
+#define	ORPAREN	(14U<<OPSHIFT)	/* )		back to (		*/
+#define	OCH_	(15U<<OPSHIFT)	/* begin choice	fwd to OOR2		*/
+#define	OOR1	(16U<<OPSHIFT)	/* | pt. 1	back to OOR1 or OCH_	*/
+#define	OOR2	(17U<<OPSHIFT)	/* | pt. 2	fwd to OOR2 or O_CH	*/
+#define	O_CH	(18U<<OPSHIFT)	/* end choice	back to OOR1		*/
+#define	OBOW	(19U<<OPSHIFT)	/* begin word	-			*/
+#define	OEOW	(20U<<OPSHIFT)	/* end word	-			*/
+
+/*
+ * Structures for [] character-set representation.
+ */
+typedef struct {
+	wint_t		min;
+	wint_t		max;
+} crange;
+typedef struct {
+	unsigned char	bmp[NC / 8];
+	wctype_t	*types;
+	int		ntypes;
+	wint_t		*wides;
+	int		nwides;
+	crange		*ranges;
+	int		nranges;
+	int		invert;
+	int		icase;
+} cset;
+
+static int
+CHIN1(cset *cs, wint_t ch)
+{
+	int i;
+
+	assert(ch >= 0);
+	if (ch < NC)
+		return (((cs->bmp[ch >> 3] & (1 << (ch & 7))) != 0) ^
+		    cs->invert);
+	for (i = 0; i < cs->nwides; i++)
+		if (ch == cs->wides[i])
+			return (!cs->invert);
+	for (i = 0; i < cs->nranges; i++)
+		if (cs->ranges[i].min <= ch && ch <= cs->ranges[i].max)
+			return (!cs->invert);
+	for (i = 0; i < cs->ntypes; i++)
+		if (iswctype(ch, cs->types[i]))
+			return (!cs->invert);
+	return (cs->invert);
+}
+
+static int
+CHIN(cset *cs, wint_t ch)
+{
+
+	assert(ch >= 0);
+	if (ch < NC)
+		return (((cs->bmp[ch >> 3] & (1 << (ch & 7))) != 0) ^
+		    cs->invert);
+	else if (cs->icase)
+		return (CHIN1(cs, ch) || CHIN1(cs, towlower(ch)) ||
+		    CHIN1(cs, towupper(ch)));
+	else
+		return (CHIN1(cs, ch));
+}
+
+/*
+ * main compiled-expression structure
+ */
+struct re_guts {
+	int magic;
+#define	MAGIC2	((('R'^0200)<<8)|'E')
+	sop *strip;		/* malloced area for strip */
+	int ncsets;		/* number of csets in use */
+	cset *sets;		/* -> cset [ncsets] */
+	int cflags;		/* copy of regcomp() cflags argument */
+	sopno nstates;		/* = number of sops */
+	sopno firststate;	/* the initial OEND (normally 0) */
+	sopno laststate;	/* the final OEND */
+	int iflags;		/* internal flags */
+#define	USEBOL	01	/* used ^ */
+#define	USEEOL	02	/* used $ */
+#define	BAD	04	/* something wrong */
+	int nbol;		/* number of ^ used */
+	int neol;		/* number of $ used */
+	char *must;		/* match must contain this string */
+	int moffset;		/* latest point at which must may be located */
+	int *charjump;		/* Boyer-Moore char jump table */
+	int *matchjump;		/* Boyer-Moore match jump table */
+	int mlen;		/* length of must */
+	size_t nsub;		/* copy of re_nsub */
+	int backrefs;		/* does it use back references? */
+	sopno nplus;		/* how deep does it nest +s? */
+};
+
+/* misc utilities */
+#define	OUT	(CHAR_MIN - 1)	/* a non-character value */
+#define	ISWORD(c)	(iswalnum((uch)(c)) || (c) == '_')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/regexec.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,234 @@
+/*
+ * Copyright (c) 1992, 1993, 1994 Henry Spencer.
+ * Copyright (c) 1992, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Henry Spencer.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*
+ * the outer shell of regexec()
+ *
+ * This file includes engine.c three times, after muchos fiddling with the
+ * macros that code uses.  This lets the same code operate on two different
+ * representations for state sets and characters.
+ */
+#include "lint.h"
+#include "file64.h"
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+#include <ctype.h>
+#include <regex.h>
+#include <wchar.h>
+#include <wctype.h>
+#include <note.h>
+#include <assert.h>
+
+#include "utils.h"
+#include "regex2.h"
+
+/* we want _NOTE, but not NOTE (which collides with our own use) */
+#undef	NOTE
+
+static size_t
+xmbrtowc(wint_t *wi, const char *s, size_t n, mbstate_t *mbs, wint_t dummy)
+{
+	size_t nr;
+	wchar_t wc;
+
+	nr = mbrtowc(&wc, s, n, mbs);
+	if (wi != NULL)
+		*wi = wc;
+	if (nr == 0)
+		return (1);
+	else if (nr == (size_t)-1 || nr == (size_t)-2) {
+		(void) memset(mbs, 0, sizeof (*mbs));
+		if (wi != NULL)
+			*wi = dummy;
+		return (1);
+	} else
+		return (nr);
+}
+
+static size_t
+xmbrtowc_dummy(wint_t *wi, const char *s, size_t n, mbstate_t *mbs,
+    wint_t dummy)
+{
+	_NOTE(ARGUNUSED(n));
+	_NOTE(ARGUNUSED(mbs));
+	_NOTE(ARGUNUSED(dummy));
+
+	if (wi != NULL)
+		*wi = (unsigned char)*s;
+	return (1);
+}
+
+/* macros for manipulating states, small version */
+#define	states	long
+#define	states1	states		/* for later use in regexec() decision */
+#define	CLEAR(v)	((v) = 0)
+#define	SET0(v, n)	((v) &= ~((unsigned long)1 << (n)))
+#define	SET1(v, n)	((v) |= (unsigned long)1 << (n))
+#define	ISSET(v, n)	(((v) & ((unsigned long)1 << (n))) != 0)
+#define	ASSIGN(d, s)	((d) = (s))
+#define	EQ(a, b)	((a) == (b))
+#define	STATEVARS	long dummy	/* dummy version */
+#define	STATESETUP(m, n)	/* nothing */
+#define	STATETEARDOWN(m)	/* nothing */
+#define	SETUP(v)	((v) = 0)
+#define	onestate	long
+#define	INIT(o, n)	((o) = (unsigned long)1 << (n))
+#define	INC(o)	((o) <<= 1)
+#define	ISSTATEIN(v, o)	(((v) & (o)) != 0)
+/* some abbreviations; note that some of these know variable names! */
+/* do "if I'm here, I can also be there" etc without branches */
+#define	FWD(dst, src, n)	((dst) |= ((unsigned long)(src)&(here)) << (n))
+#define	BACK(dst, src, n)	((dst) |= ((unsigned long)(src)&(here)) >> (n))
+#define	ISSETBACK(v, n)	(((v) & ((unsigned long)here >> (n))) != 0)
+/* no multibyte support */
+#define	XMBRTOWC	xmbrtowc_dummy
+#define	ZAPSTATE(mbs)	((void)(mbs))
+/* function names */
+#define	SNAMES			/* engine.c looks after details */
+
+#include "engine.c"
+
+/* now undo things */
+#undef	states
+#undef	CLEAR
+#undef	SET0
+#undef	SET1
+#undef	ISSET
+#undef	ASSIGN
+#undef	EQ
+#undef	STATEVARS
+#undef	STATESETUP
+#undef	STATETEARDOWN
+#undef	SETUP
+#undef	onestate
+#undef	INIT
+#undef	INC
+#undef	ISSTATEIN
+#undef	FWD
+#undef	BACK
+#undef	ISSETBACK
+#undef	SNAMES
+#undef	XMBRTOWC
+#undef	ZAPSTATE
+
+/* macros for manipulating states, large version */
+#define	states	char *
+#define	CLEAR(v)	(void) memset(v, 0, m->g->nstates)
+#define	SET0(v, n)	((v)[n] = 0)
+#define	SET1(v, n)	((v)[n] = 1)
+#define	ISSET(v, n)	((v)[n])
+#define	ASSIGN(d, s)	(void) memcpy(d, s, m->g->nstates)
+#define	EQ(a, b)	(memcmp(a, b, m->g->nstates) == 0)
+#define	STATEVARS	long vn; char *space
+#define	STATESETUP(m, nv) { (m)->space = malloc((nv)*(m)->g->nstates); \
+	if ((m)->space == NULL) \
+		return (REG_ESPACE); \
+	(m)->vn = 0; }
+#define	STATETEARDOWN(m)	{ free((m)->space); }
+#define	SETUP(v)	((v) = &m->space[m->vn++ * m->g->nstates])
+#define	onestate	long
+#define	INIT(o, n)	((o) = (n))
+#define	INC(o)	((o)++)
+#define	ISSTATEIN(v, o)	((v)[o])
+/* some abbreviations; note that some of these know variable names! */
+/* do "if I'm here, I can also be there" etc without branches */
+#define	FWD(dst, src, n)	((dst)[here+(n)] |= (src)[here])
+#define	BACK(dst, src, n)	((dst)[here-(n)] |= (src)[here])
+#define	ISSETBACK(v, n)	((v)[here - (n)])
+/* no multibyte support */
+#define	XMBRTOWC	xmbrtowc_dummy
+#define	ZAPSTATE(mbs)	((void)(mbs))
+/* function names */
+#define	LNAMES			/* flag */
+
+#include "engine.c"
+
+/* multibyte character & large states version */
+#undef	LNAMES
+#undef	XMBRTOWC
+#undef	ZAPSTATE
+#define	XMBRTOWC	xmbrtowc
+#define	ZAPSTATE(mbs)	(void) memset((mbs), 0, sizeof (*(mbs)))
+#define	MNAMES
+
+#include "engine.c"
+
+/*
+ * regexec - interface for matching
+ *
+ * We put this here so we can exploit knowledge of the state representation
+ * when choosing which matcher to call.  Also, by this point the matchers
+ * have been prototyped.
+ */
+int				/* 0 success, REG_NOMATCH failure */
+regexec(const regex_t *_RESTRICT_KYWD preg,
+    const char *_RESTRICT_KYWD string, size_t nmatch,
+	regmatch_t pmatch[_RESTRICT_KYWD], int eflags)
+{
+	struct re_guts *g = preg->re_g;
+#ifdef REDEBUG
+#define	GOODFLAGS(f)	(f)
+#else
+#ifdef	REG_STARTEND
+#define	GOODFLAGS(f)	((f)&(REG_NOTBOL|REG_NOTEOL|REG_STARTEND))
+#else
+#define	GOODFLAGS(f)	((f)&(REG_NOTBOL|REG_NOTEOL))
+#endif
+#endif
+
+	if (preg->re_magic != MAGIC1 || g->magic != MAGIC2)
+		return (REG_BADPAT);
+	assert(!(g->iflags&BAD));
+	if (g->iflags&BAD)		/* backstop for no-debug case */
+		return (REG_BADPAT);
+	eflags = GOODFLAGS(eflags);
+
+	if (MB_CUR_MAX > 1)
+		return (mmatcher(g, (char *)string, nmatch, pmatch, eflags));
+#ifdef	REG_LARGE
+	else if (g->nstates <= CHAR_BIT*sizeof (states1) && !(eflags&REG_LARGE))
+#else
+	else if (g->nstates <= CHAR_BIT*sizeof (states1))
+#endif
+		return (smatcher(g, (char *)string, nmatch, pmatch, eflags));
+	else
+		return (lmatcher(g, (char *)string, nmatch, pmatch, eflags));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/regfree.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 1992, 1993, 1994 Henry Spencer.
+ * Copyright (c) 1992, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Henry Spencer.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include "file64.h"
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <regex.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#include "utils.h"
+#include "regex2.h"
+
+/*
+ * regfree - free everything
+ */
+void
+regfree(regex_t *preg)
+{
+	struct re_guts *g;
+	int i;
+
+#ifdef	__lint
+	/* shut up lint! */
+	CHIN(NULL, 0);
+#endif
+
+	if (preg->re_magic != MAGIC1)	/* oops */
+		return;			/* nice to complain, but hard */
+
+	g = preg->re_g;
+	if (g == NULL || g->magic != MAGIC2)	/* oops again */
+		return;
+	preg->re_magic = 0;		/* mark it invalid */
+	g->magic = 0;			/* mark it invalid */
+
+	if (g->strip != NULL)
+		free((char *)g->strip);
+	if (g->sets != NULL) {
+		for (i = 0; i < g->ncsets; i++) {
+			free(g->sets[i].ranges);
+			free(g->sets[i].wides);
+			free(g->sets[i].types);
+		}
+		free((char *)g->sets);
+	}
+	if (g->must != NULL)
+		free(g->must);
+	if (g->charjump != NULL)
+		free(&g->charjump[CHAR_MIN]);
+	if (g->matchjump != NULL)
+		free(g->matchjump);
+	free((char *)g);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/rune.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,284 @@
+/*
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include "file64.h"
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <netinet/in.h>
+
+#include "runetype.h"
+#include "runefile.h"
+
+_RuneLocale *_Read_RuneMagi(FILE *);
+
+_RuneLocale *
+_Read_RuneMagi(FILE *fp)
+{
+	char *fdata, *data;
+	void *lastp;
+	_FileRuneLocale *frl;
+	_RuneLocale *rl;
+	_FileRuneEntry *frr;
+	_RuneEntry *rr;
+	struct stat sb;
+	int x, saverr;
+	void *variable;
+	_FileRuneEntry *runetype_ext_ranges;
+	_FileRuneEntry *maplower_ext_ranges;
+	_FileRuneEntry *mapupper_ext_ranges;
+	int runetype_ext_len = 0;
+
+	if (fstat(fileno(fp), &sb) < 0)
+		return (NULL);
+
+	if ((size_t)sb.st_size < sizeof (_FileRuneLocale)) {
+		errno = EINVAL;
+		return (NULL);
+	}
+
+	if ((fdata = malloc(sb.st_size)) == NULL)
+		return (NULL);
+
+	errno = 0;
+	rewind(fp); /* Someone might have read the magic number once already */
+	if (errno) {
+		saverr = errno;
+		free(fdata);
+		errno = saverr;
+		return (NULL);
+	}
+
+	if (fread(fdata, sb.st_size, 1, fp) != 1) {
+		saverr = errno;
+		free(fdata);
+		errno = saverr;
+		return (NULL);
+	}
+
+	frl = (_FileRuneLocale *)(void *)fdata;
+	lastp = fdata + sb.st_size;
+
+	variable = frl + 1;
+
+	if (memcmp(frl->magic, _FILE_RUNE_MAGIC_1, sizeof (frl->magic))) {
+		free(fdata);
+		errno = EINVAL;
+		return (NULL);
+	}
+
+	frl->variable_len = ntohl(frl->variable_len);
+	frl->runetype_ext_nranges = ntohl(frl->runetype_ext_nranges);
+	frl->maplower_ext_nranges = ntohl(frl->maplower_ext_nranges);
+	frl->mapupper_ext_nranges = ntohl(frl->mapupper_ext_nranges);
+
+	for (x = 0; x < _CACHED_RUNES; ++x) {
+		frl->runetype[x] = ntohl(frl->runetype[x]);
+		frl->maplower[x] = ntohl(frl->maplower[x]);
+		frl->mapupper[x] = ntohl(frl->mapupper[x]);
+	}
+
+	runetype_ext_ranges = (_FileRuneEntry *)variable;
+	variable = runetype_ext_ranges + frl->runetype_ext_nranges;
+	if (variable > lastp) {
+		free(fdata);
+		errno = EINVAL;
+		return (NULL);
+	}
+
+	maplower_ext_ranges = (_FileRuneEntry *)variable;
+	variable = maplower_ext_ranges + frl->maplower_ext_nranges;
+	if (variable > lastp) {
+		free(fdata);
+		errno = EINVAL;
+		return (NULL);
+	}
+
+	mapupper_ext_ranges = (_FileRuneEntry *)variable;
+	variable = mapupper_ext_ranges + frl->mapupper_ext_nranges;
+	if (variable > lastp) {
+		free(fdata);
+		errno = EINVAL;
+		return (NULL);
+	}
+
+	frr = runetype_ext_ranges;
+	for (x = 0; x < frl->runetype_ext_nranges; ++x) {
+		uint32_t *types;
+
+		frr[x].min = ntohl(frr[x].min);
+		frr[x].max = ntohl(frr[x].max);
+		frr[x].map = ntohl(frr[x].map);
+		if (frr[x].map == 0) {
+			int len = frr[x].max - frr[x].min + 1;
+			types = variable;
+			variable = types + len;
+			runetype_ext_len += len;
+			if (variable > lastp) {
+				free(fdata);
+				errno = EINVAL;
+				return (NULL);
+			}
+			while (len-- > 0)
+				types[len] = ntohl(types[len]);
+		}
+	}
+
+	frr = maplower_ext_ranges;
+	for (x = 0; x < frl->maplower_ext_nranges; ++x) {
+		frr[x].min = ntohl(frr[x].min);
+		frr[x].max = ntohl(frr[x].max);
+		frr[x].map = ntohl(frr[x].map);
+	}
+
+	frr = mapupper_ext_ranges;
+	for (x = 0; x < frl->mapupper_ext_nranges; ++x) {
+		frr[x].min = ntohl(frr[x].min);
+		frr[x].max = ntohl(frr[x].max);
+		frr[x].map = ntohl(frr[x].map);
+	}
+	if ((char *)variable + frl->variable_len > (char *)lastp) {
+		free(fdata);
+		errno = EINVAL;
+		return (NULL);
+	}
+
+	/*
+	 * Convert from disk format to host format.
+	 */
+	data = malloc(sizeof (_RuneLocale) +
+	    (frl->runetype_ext_nranges + frl->maplower_ext_nranges +
+	    frl->mapupper_ext_nranges) * sizeof (_RuneEntry) +
+	    runetype_ext_len * sizeof (*rr->__types) +
+	    frl->variable_len);
+	if (data == NULL) {
+		saverr = errno;
+		free(fdata);
+		errno = saverr;
+		return (NULL);
+	}
+
+	rl = (_RuneLocale *)(void *)data;
+	rl->__variable = rl + 1;
+
+	(void) memcpy(rl->__magic, _RUNE_MAGIC_1, sizeof (rl->__magic));
+	(void) memcpy(rl->__encoding, frl->encoding, sizeof (rl->__encoding));
+
+	rl->__variable_len = frl->variable_len;
+	rl->__runetype_ext.__nranges = frl->runetype_ext_nranges;
+	rl->__maplower_ext.__nranges = frl->maplower_ext_nranges;
+	rl->__mapupper_ext.__nranges = frl->mapupper_ext_nranges;
+
+	for (x = 0; x < _CACHED_RUNES; ++x) {
+		rl->__runetype[x] = frl->runetype[x];
+		rl->__maplower[x] = frl->maplower[x];
+		rl->__mapupper[x] = frl->mapupper[x];
+	}
+
+	rl->__runetype_ext.__ranges = (_RuneEntry *)rl->__variable;
+	rl->__variable = rl->__runetype_ext.__ranges +
+	    rl->__runetype_ext.__nranges;
+
+	rl->__maplower_ext.__ranges = (_RuneEntry *)rl->__variable;
+	rl->__variable = rl->__maplower_ext.__ranges +
+	    rl->__maplower_ext.__nranges;
+
+	rl->__mapupper_ext.__ranges = (_RuneEntry *)rl->__variable;
+	rl->__variable = rl->__mapupper_ext.__ranges +
+	    rl->__mapupper_ext.__nranges;
+
+	variable = mapupper_ext_ranges + frl->mapupper_ext_nranges;
+	frr = runetype_ext_ranges;
+	rr = rl->__runetype_ext.__ranges;
+	for (x = 0; x < rl->__runetype_ext.__nranges; ++x) {
+		uint32_t *types;
+
+		rr[x].__min = frr[x].min;
+		rr[x].__max = frr[x].max;
+		rr[x].__map = frr[x].map;
+		if (rr[x].__map == 0) {
+			int len = rr[x].__max - rr[x].__min + 1;
+			types = variable;
+			variable = types + len;
+			rr[x].__types = rl->__variable;
+			rl->__variable = rr[x].__types + len;
+			while (len-- > 0)
+				rr[x].__types[len] = types[len];
+		} else
+			rr[x].__types = NULL;
+	}
+
+	frr = maplower_ext_ranges;
+	rr = rl->__maplower_ext.__ranges;
+	for (x = 0; x < rl->__maplower_ext.__nranges; ++x) {
+		rr[x].__min = frr[x].min;
+		rr[x].__max = frr[x].max;
+		rr[x].__map = frr[x].map;
+	}
+
+	frr = mapupper_ext_ranges;
+	rr = rl->__mapupper_ext.__ranges;
+	for (x = 0; x < rl->__mapupper_ext.__nranges; ++x) {
+		rr[x].__min = frr[x].min;
+		rr[x].__max = frr[x].max;
+		rr[x].__map = frr[x].map;
+	}
+
+	(void) memcpy(rl->__variable, variable, rl->__variable_len);
+	free(fdata);
+
+	/*
+	 * Go out and zero pointers that should be zero.
+	 */
+	if (!rl->__variable_len)
+		rl->__variable = NULL;
+
+	if (!rl->__runetype_ext.__nranges)
+		rl->__runetype_ext.__ranges = NULL;
+
+	if (!rl->__maplower_ext.__nranges)
+		rl->__maplower_ext.__ranges = NULL;
+
+	if (!rl->__mapupper_ext.__nranges)
+		rl->__mapupper_ext.__ranges = NULL;
+
+	return (rl);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/runefile.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2005 Ruslan Ermilov
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _RUNEFILE_H_
+#define	_RUNEFILE_H_
+
+#include <sys/types.h>
+
+#ifndef _CACHED_RUNES
+#define	_CACHED_RUNES	(1 << 8)
+#endif
+
+typedef struct {
+	int32_t		min;
+	int32_t		max;
+	int32_t		map;
+} _FileRuneEntry;
+
+typedef struct {
+	char		magic[8];
+	char		encoding[32];
+
+	uint32_t	runetype[_CACHED_RUNES];
+	int32_t		maplower[_CACHED_RUNES];
+	int32_t		mapupper[_CACHED_RUNES];
+
+	int32_t		runetype_ext_nranges;
+	int32_t		maplower_ext_nranges;
+	int32_t		mapupper_ext_nranges;
+
+	int32_t		variable_len;
+} _FileRuneLocale;
+
+#define	_FILE_RUNE_MAGIC_1	"RuneMag1"
+
+#endif	/* !_RUNEFILE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/runetype.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <ctype.h>
+#include <stdio.h>
+#include "runetype.h"
+
+unsigned int
+___runetype(__ct_rune_t c)
+{
+	size_t lim;
+	_RuneRange *rr = &_CurrentRuneLocale->__runetype_ext;
+	_RuneEntry *base, *re;
+
+	if (c < 0 || c == EOF)
+		return (0L);
+
+	/* Binary search -- see bsearch.c for explanation. */
+	base = rr->__ranges;
+	for (lim = rr->__nranges; lim != 0; lim >>= 1) {
+		re = base + (lim >> 1);
+		if (re->__min <= c && c <= re->__max) {
+			if (re->__types)
+				return (re->__types[c - re->__min]);
+			else
+				return (re->__map);
+		} else if (c > re->__max) {
+			base = re + 1;
+			lim--;
+		}
+	}
+
+	return (0L);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/runetype.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/*
+ * Because we borrowed the __rune_t defintions from _types.h, we need
+ * this copyright notice as well:
+ *
+ * Copyright (c) 2002 Mike Barcroft <mike@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_RUNETYPE_H_
+#define	_RUNETYPE_H_
+
+#define	_CACHED_RUNES	(1 << 8)		/* Must be a power of 2 */
+#define	_CRMASK		(~(_CACHED_RUNES - 1))
+
+/*
+ * rune_t is declared to be an ``int'' instead of the more natural
+ * ``unsigned long'' or ``long''.  Two things are happening here.  It is not
+ * unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
+ * it looks like 10646 will be a 31 bit standard.  This means that if your
+ * ints cannot hold 32 bits, you will be in trouble.  The reason an int was
+ * chosen over a long is that the is*() and to*() routines take ints (says
+ * ANSI C), but they use __ct_rune_t instead of int.
+ *
+ * NOTE: rune_t is not covered by ANSI nor other standards, and should not
+ * be instantiated outside of lib/libc/locale.  Use wchar_t.  wchar_t and
+ * rune_t must be the same type.  Also, wint_t must be no narrower than
+ * wchar_t, and should be able to hold all members of the largest
+ * character set plus one extra value (WEOF), and must be at least 16 bits.
+ *
+ * For compatibility with Solaris, we want to use long in ILP32, and int in
+ * LP64.  This is due to historical Solaris legacy.  (See <wchar.h> for
+ * the definition.)
+ */
+
+#if	defined(_LP64)
+typedef int		__ct_rune_t;	/* arg type for ctype funcs */
+#else
+typedef	int		__ct_rune_t;
+#endif
+
+typedef	int		__rune_t;	/* rune_t (see above) */
+
+/*
+ * The lower 8 bits of runetype[] contain the digit value of the rune.
+ */
+typedef struct {
+	__rune_t	__min;		/* First rune of the range */
+	__rune_t	__max;		/* Last rune (inclusive) of the range */
+	__rune_t	__map;		/* What first maps to in maps */
+	unsigned	*__types;	/* Array of types in range */
+} _RuneEntry;
+
+typedef struct {
+	int		__nranges;	/* Number of ranges stored */
+	_RuneEntry	*__ranges;	/* Pointer to the ranges */
+} _RuneRange;
+
+typedef struct {
+	char		__magic[8];	/* Magic saying what version we are */
+	char		__encoding[32];	/* ASCII name of this encoding */
+
+	unsigned int	__runetype[_CACHED_RUNES];
+	__rune_t	__maplower[_CACHED_RUNES];
+	__rune_t	__mapupper[_CACHED_RUNES];
+
+	/*
+	 * The following are to deal with Runes larger than _CACHED_RUNES - 1.
+	 * Their data is actually contiguous with this structure so as to make
+	 * it easier to read/write from/to disk.
+	 */
+	_RuneRange	__runetype_ext;
+	_RuneRange	__maplower_ext;
+	_RuneRange	__mapupper_ext;
+
+	void		*__variable;	/* Data which depends on the encoding */
+	int		__variable_len;	/* how long that data is */
+} _RuneLocale;
+
+#define	_RUNE_MAGIC_1	"RuneMagi"	/* Indicates version 0 of RuneLocale */
+
+extern _RuneLocale _DefaultRuneLocale;
+extern _RuneLocale *_CurrentRuneLocale;
+
+#endif	/* !_RUNETYPE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/setlocale.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,332 @@
+/*
+ * Copyright (c) 1996 - 2002 FreeBSD Project
+ * Copyright (c) 1991, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ */
+
+#include "lint.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <errno.h>
+#include <limits.h>
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <alloca.h>
+#include <stdio.h>
+#include "collate.h"
+#include "lmonetary.h"	/* for __monetary_load_locale() */
+#include "lnumeric.h"	/* for __numeric_load_locale() */
+#include "lmessages.h"	/* for __messages_load_locale() */
+#include "setlocale.h"
+#include "ldpart.h"
+#include "timelocal.h" /* for __time_load_locale() */
+#include "../i18n/_loc_path.h"
+
+/*
+ * Category names for getenv()  Note that this was modified
+ * for Solaris.  See <iso/locale_iso.h>.
+ */
+#define NUM_CATS	7
+static char *categories[7] = {
+	"LC_CTYPE",
+	"LC_NUMERIC",
+	"LC_TIME",
+	"LC_COLLATE",
+	"LC_MONETARY",
+	"LC_MESSAGES",
+	"LC_ALL",
+};
+
+/*
+ * Current locales for each category
+ */
+static char current_categories[NUM_CATS][ENCODING_LEN + 1] = {
+	"C",
+	"C",
+	"C",
+	"C",
+	"C",
+	"C",
+	"C",
+};
+
+/*
+ * Path to locale storage directory.  See ../i18n/_loc_path.h
+ */
+char	*_PathLocale = _DFLT_LOC_PATH;
+
+/*
+ * The locales we are going to try and load
+ */
+static char new_categories[NUM_CATS][ENCODING_LEN + 1];
+static char saved_categories[NUM_CATS][ENCODING_LEN + 1];
+static char current_locale_string[NUM_CATS * (ENCODING_LEN + 1 + 1)];
+
+static char	*currentlocale(void);
+static char	*loadlocale(int);
+static const char *__get_locale_env(int);
+
+char *
+setlocale(int category, const char *locale)
+{
+	int i, j, saverr;
+	const char *env, *r;
+
+	if (category < 0 || category >= NUM_CATS) {
+		errno = EINVAL;
+		return (NULL);
+	}
+
+	if (locale == NULL)
+		return (category != LC_ALL ?
+		    current_categories[category] : currentlocale());
+
+	/*
+	 * Default to the current locale for everything.
+	 */
+	for (i = 0; i < NUM_CATS; ++i)
+		(void) strcpy(new_categories[i], current_categories[i]);
+
+	/*
+	 * Now go fill up new_categories from the locale argument
+	 */
+	if (!*locale) {
+		if (category == LC_ALL) {
+			for (i = 0; i < NUM_CATS; ++i) {
+				if (i == LC_ALL)
+					continue;
+				env = __get_locale_env(i);
+				if (strlen(env) > ENCODING_LEN) {
+					errno = EINVAL;
+					return (NULL);
+				}
+				(void) strcpy(new_categories[i], env);
+			}
+		} else {
+			env = __get_locale_env(category);
+			if (strlen(env) > ENCODING_LEN) {
+				errno = EINVAL;
+				return (NULL);
+			}
+			(void) strcpy(new_categories[category], env);
+		}
+	} else if (category != LC_ALL) {
+		if (strlen(locale) > ENCODING_LEN) {
+			errno = EINVAL;
+			return (NULL);
+		}
+		(void) strcpy(new_categories[category], locale);
+	} else {
+		if ((r = strchr(locale, '/')) == NULL) {
+			if (strlen(locale) > ENCODING_LEN) {
+				errno = EINVAL;
+				return (NULL);
+			}
+			for (i = 0; i < NUM_CATS; ++i)
+				(void) strcpy(new_categories[i], locale);
+		} else {
+			char	*buf;
+			char	*save;
+
+			buf = alloca(strlen(locale) + 1);
+			(void) strcpy(buf, locale);
+
+			save = NULL;
+			r = strtok_r(buf, "/", &save);
+			for (i = 0;  i < NUM_CATS; i++) {
+				if (i == LC_ALL)
+					continue;
+				if (r == NULL) {
+					/*
+					 * Composite Locale is inadequately
+					 * specified!   (Or with empty fields.)
+					 * The old code would fill fields
+					 * out from the last one, but I think
+					 * this is suboptimal.
+					 */
+					errno = EINVAL;
+					return (NULL);
+				}
+				(void) strlcpy(new_categories[i], r,
+				    ENCODING_LEN);
+				r = strtok_r(NULL, "/", &save);
+			}
+			if (r != NULL) {
+				/*
+				 * Too many components - we had left over
+				 * data in the LC_ALL.  It is malformed.
+				 */
+				errno = EINVAL;
+				return (NULL);
+			}
+		}
+	}
+
+	if (category != LC_ALL)
+		return (loadlocale(category));
+
+	for (i = 0; i < NUM_CATS; ++i) {
+		(void) strcpy(saved_categories[i], current_categories[i]);
+		if (i == LC_ALL)
+			continue;
+		if (loadlocale(i) == NULL) {
+			saverr = errno;
+			for (j = 0; j < i; j++) {
+				(void) strcpy(new_categories[j],
+				    saved_categories[j]);
+				if (i == LC_ALL)
+					continue;
+				if (loadlocale(j) == NULL) {
+					(void) strcpy(new_categories[j], "C");
+					(void) loadlocale(j);
+				}
+			}
+			errno = saverr;
+			return (NULL);
+		}
+	}
+	return (currentlocale());
+}
+
+static char *
+currentlocale(void)
+{
+	int i;
+	int composite = 0;
+
+	/* Look to see if any category is different */
+	for (i = 1; i < NUM_CATS; ++i) {
+		if (i == LC_ALL)
+			continue;
+		if (strcmp(current_categories[0], current_categories[i])) {
+			composite = 1;
+			break;
+		}
+	}
+
+	if (composite) {
+		/*
+		 * Note ordering of these follows the numeric order,
+		 * if the order is changed, then setlocale() will need
+		 * to be changed as well.
+		 */
+		(void) snprintf(current_locale_string,
+		    sizeof (current_locale_string),
+		    "%s/%s/%s/%s/%s/%s",
+		    current_categories[LC_CTYPE],
+		    current_categories[LC_NUMERIC],
+		    current_categories[LC_TIME],
+		    current_categories[LC_COLLATE],
+		    current_categories[LC_MONETARY],
+		    current_categories[LC_MESSAGES]);
+	} else {
+		(void) strlcpy(current_locale_string, current_categories[0],
+		    sizeof (current_locale_string));
+	}
+	return (current_locale_string);
+}
+
+static char *
+loadlocale(int category)
+{
+	char *new = new_categories[category];
+	char *old = current_categories[category];
+	int (*func)(const char *);
+
+	if ((new[0] == '.' &&
+	    (new[1] == '\0' || (new[1] == '.' && new[2] == '\0'))) ||
+	    strchr(new, '/') != NULL) {
+		errno = EINVAL;
+		return (NULL);
+	}
+
+	switch (category) {
+	case LC_CTYPE:
+		func = __wrap_setrunelocale;
+		break;
+	case LC_COLLATE:
+		func = __collate_load_tables;
+		break;
+	case LC_TIME:
+		func = __time_load_locale;
+		break;
+	case LC_NUMERIC:
+		func = __numeric_load_locale;
+		break;
+	case LC_MONETARY:
+		func = __monetary_load_locale;
+		break;
+	case LC_MESSAGES:
+		func = __messages_load_locale;
+		break;
+	default:
+		errno = EINVAL;
+		return (NULL);
+	}
+
+	if (strcmp(new, old) == 0)
+		return (old);
+
+	if (func(new) != _LDP_ERROR) {
+		(void) strcpy(old, new);
+		return (old);
+	}
+
+	return (NULL);
+}
+
+static const char *
+__get_locale_env(int category)
+{
+	const char *env;
+
+	/* 1. check LC_ALL. */
+	env = getenv(categories[LC_ALL]);
+
+	/* 2. check LC_* */
+	if (env == NULL || !*env)
+		env = getenv(categories[category]);
+
+	/* 3. check LANG */
+	if (env == NULL || !*env)
+		env = getenv("LANG");
+
+	/* 4. if none is set, fall to "C" */
+	if (env == NULL || !*env)
+		env = "C";
+
+	return (env);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/setlocale.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 1997 by Andrey A. Chernov, Moscow, Russia.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef _SETLOCALE_H_
+#define	_SETLOCALE_H_
+
+#define	_PATH_LOCALE	"/usr/share/locale"
+#define	ENCODING_LEN 31
+#define	CATEGORY_LEN 11
+
+extern char *_PathLocale;
+
+int	__detect_path_locale(void);
+int	__wrap_setrunelocale(const char *);
+
+#endif /* !_SETLOCALE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/setrunelocale.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,242 @@
+/*
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ */
+
+#include "lint.h"
+#include "file64.h"
+#include <errno.h>
+#include <limits.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <wchar.h>
+#include "runetype.h"
+#include "ldpart.h"
+#include "mblocal.h"
+#include "setlocale.h"
+#include "_ctype.h"
+
+extern _RuneLocale	*_Read_RuneMagi(FILE *);
+
+static int		__setrunelocale(const char *);
+
+static int
+__setrunelocale(const char *encoding)
+{
+	FILE *fp;
+	char name[PATH_MAX];
+	_RuneLocale *rl;
+	int saverr, ret;
+	size_t (*old__mbrtowc)(wchar_t *_RESTRICT_KYWD,
+	    const char *_RESTRICT_KYWD, size_t, mbstate_t *_RESTRICT_KYWD);
+	size_t (*old__wcrtomb)(char *_RESTRICT_KYWD, wchar_t,
+	    mbstate_t *_RESTRICT_KYWD);
+	int (*old__mbsinit)(const mbstate_t *);
+	size_t (*old__mbsnrtowcs)(wchar_t *_RESTRICT_KYWD,
+	    const char **_RESTRICT_KYWD, size_t, size_t,
+	    mbstate_t *_RESTRICT_KYWD);
+	size_t (*old__wcsnrtombs)(char *_RESTRICT_KYWD,
+	    const wchar_t **_RESTRICT_KYWD, size_t, size_t,
+	    mbstate_t *_RESTRICT_KYWD);
+	static char ctype_encoding[ENCODING_LEN + 1];
+	static _RuneLocale *CachedRuneLocale;
+	static size_t (*Cached__mbrtowc)(wchar_t *_RESTRICT_KYWD,
+	    const char *_RESTRICT_KYWD, size_t, mbstate_t *_RESTRICT_KYWD);
+	static size_t (*Cached__wcrtomb)(char *_RESTRICT_KYWD, wchar_t,
+	    mbstate_t *_RESTRICT_KYWD);
+	static int (*Cached__mbsinit)(const mbstate_t *);
+	static size_t (*Cached__mbsnrtowcs)(wchar_t *_RESTRICT_KYWD,
+	    const char **_RESTRICT_KYWD, size_t, size_t,
+	    mbstate_t *_RESTRICT_KYWD);
+	static size_t (*Cached__wcsnrtombs)(char *_RESTRICT_KYWD,
+	    const wchar_t **_RESTRICT_KYWD, size_t, size_t,
+	    mbstate_t *_RESTRICT_KYWD);
+
+	/*
+	 * The "C" and "POSIX" locale are always here.
+	 */
+	if (strcmp(encoding, "C") == 0 || strcmp(encoding, "POSIX") == 0) {
+		(void) _none_init(&_DefaultRuneLocale);
+		return (0);
+	}
+
+	/*
+	 * If the locale name is the same as our cache, use the cache.
+	 */
+	if (CachedRuneLocale != NULL &&
+	    strcmp(encoding, ctype_encoding) == 0) {
+		_CurrentRuneLocale = CachedRuneLocale;
+		__mbrtowc = Cached__mbrtowc;
+		__mbsinit = Cached__mbsinit;
+		__mbsnrtowcs = Cached__mbsnrtowcs;
+		__wcrtomb = Cached__wcrtomb;
+		__wcsnrtombs = Cached__wcsnrtombs;
+		return (0);
+	}
+
+	/*
+	 * Slurp the locale file into the cache.
+	 */
+
+	(void) snprintf(name, sizeof (name), "%s/%s/LC_CTYPE/LCL_DATA",
+	    _PathLocale, encoding);
+
+	if ((fp = fopen(name, "r")) == NULL)
+		return (errno == 0 ? ENOENT : errno);
+
+	if ((rl = _Read_RuneMagi(fp)) == NULL) {
+		saverr = (errno == 0 ? EINVAL : errno);
+		(void) fclose(fp);
+		return (saverr);
+	}
+	(void) fclose(fp);
+
+	old__mbrtowc = __mbrtowc;
+	old__mbsinit = __mbsinit;
+	old__mbsnrtowcs = __mbsnrtowcs;
+	old__wcrtomb = __wcrtomb;
+	old__wcsnrtombs = __wcsnrtombs;
+
+	__mbrtowc = NULL;
+	__mbsinit = NULL;
+	__mbsnrtowcs = __mbsnrtowcs_std;
+	__wcrtomb = NULL;
+	__wcsnrtombs = __wcsnrtombs_std;
+
+	if (strcmp(rl->__encoding, "NONE") == 0)
+		ret = _none_init(rl);
+	else if (strcmp(rl->__encoding, "ASCII") == 0)
+		ret = _ascii_init(rl);
+	else if (strcmp(rl->__encoding, "UTF-8") == 0)
+		ret = _UTF8_init(rl);
+	else if (strcmp(rl->__encoding, "EUC") == 0)
+		ret = _EUC_init(rl);
+	else if (strcmp(rl->__encoding, "GB18030") == 0)
+		ret = _GB18030_init(rl);
+	else if (strcmp(rl->__encoding, "GB2312") == 0)
+		ret = _GB2312_init(rl);
+	else if (strcmp(rl->__encoding, "GBK") == 0)
+		ret = _GBK_init(rl);
+	else if (strcmp(rl->__encoding, "BIG5") == 0)
+		ret = _BIG5_init(rl);
+	else if (strcmp(rl->__encoding, "MSKanji") == 0)
+		ret = _MSKanji_init(rl);
+	else
+		ret = EINVAL;
+
+	if (ret == 0) {
+		if (CachedRuneLocale != NULL) {
+			/* See euc.c */
+			if (strcmp(CachedRuneLocale->__encoding, "EUC") == 0)
+				free(CachedRuneLocale->__variable);
+			free(CachedRuneLocale);
+		}
+		CachedRuneLocale = _CurrentRuneLocale;
+		Cached__mbrtowc = __mbrtowc;
+		Cached__mbsinit = __mbsinit;
+		Cached__mbsnrtowcs = __mbsnrtowcs;
+		Cached__wcrtomb = __wcrtomb;
+		Cached__wcsnrtombs = __wcsnrtombs;
+		(void) strcpy(ctype_encoding, encoding);
+
+		/*
+		 * We need to overwrite the _ctype array.  This requires
+		 * some finagling.  This is because references to it may
+		 * have been baked into applications.
+		 *
+		 * Note that it is interesting that toupper/tolower only
+		 * produce defined results when the input is representable
+		 * as a byte.
+		 */
+
+		/*
+		 * The top half is the type mask array.  Because we
+		 * want to support both legacy Solaris code (which have
+		 * mask valeus baked in to them), and we want to be able
+		 * to import locale files from other sources (FreeBSD)
+		 * which probably uses different masks, we have to perform
+		 * a conversion here.  Ugh.  Note that the _CTYPE definitions
+		 * we use from FreeBSD are richer than the Solaris legacy.
+		 *
+		 * We have to cope with these limitations though, because the
+		 * inadequate Solaris definitions were baked into binaries.
+		 */
+		for (int i = 0; i < _CACHED_RUNES; i++) {
+			/* ctype can only encode the lower 8 bits. */
+			__ctype[i+1] = rl->__runetype[i] & 0xff;
+			__ctype_mask[i] = rl->__runetype[i];
+		}
+
+		/* The bottom half is the toupper/lower array */
+		for (int i = 0; i < _CACHED_RUNES; i++) {
+			__ctype[258 + i] = i;
+			if (rl->__mapupper[i] && rl->__mapupper[i] != i)
+				__ctype[258+i] = rl->__mapupper[i];
+			if (rl->__maplower[i] && rl->__maplower[i] != i)
+				__ctype[258+i] = rl->__maplower[i];
+
+			/* Don't forget these annoyances either! */
+			__trans_upper[i] = rl->__mapupper[i];
+			__trans_lower[i] = rl->__maplower[i];
+		}
+
+		/*
+		 * Note that we expect the init code will have populated
+		 * the CSWIDTH array (__ctype[514-520]) properly.
+		 */
+	} else {
+		__mbrtowc = old__mbrtowc;
+		__mbsinit = old__mbsinit;
+		__mbsnrtowcs = old__mbsnrtowcs;
+		__wcrtomb = old__wcrtomb;
+		__wcsnrtombs = old__wcsnrtombs;
+		free(rl);
+	}
+
+	return (ret);
+}
+
+int
+__wrap_setrunelocale(const char *locale)
+{
+	int ret = __setrunelocale(locale);
+
+	if (ret != 0) {
+		errno = ret;
+		return (_LDP_ERROR);
+	}
+	return (_LDP_LOADED);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/strcoll.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
+ *		at Electronni Visti IA, Kiev, Ukraine.
+ *			All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include "collate.h"
+
+int
+strcoll(const char *s, const char *s2)
+{
+	int len, len2, prim, prim2, sec, sec2, ret, ret2;
+	const char *t, *t2;
+	char *tt, *tt2;
+
+	if (__collate_load_error)
+		return (strcmp(s, s2));
+
+	len = len2 = 1;
+	ret = ret2 = 0;
+	if (__collate_substitute_nontrivial) {
+		t = tt = __collate_substitute(s);
+		t2 = tt2 = __collate_substitute(s2);
+		if ((tt == NULL) || (tt2 == NULL)) {
+			errno = ENOMEM;
+			if (tt)
+				free(tt);
+			if (tt2)
+				free(tt2);
+			/*
+			 * All we can do here is set errno, the application
+			 * is obliged to check it.
+			 */
+			return (strcmp(s, s2));
+		}
+	} else {
+		tt = tt2 = NULL;
+		t = s;
+		t2 = s2;
+	}
+	while (*t && *t2) {
+		prim = prim2 = 0;
+		while (*t && !prim) {
+			__collate_lookup(t, &len, &prim, &sec);
+			t += len;
+		}
+		while (*t2 && !prim2) {
+			__collate_lookup(t2, &len2, &prim2, &sec2);
+			t2 += len2;
+		}
+		if (!prim || !prim2)
+			break;
+		if (prim != prim2) {
+			ret = prim - prim2;
+			goto end;
+		}
+		if (!ret2)
+			ret2 = sec - sec2;
+	}
+	if (!*t && *t2)
+		ret = -(int)((uchar_t)*t2);
+	else if (*t && !*t2)
+		ret = (uchar_t)*t;
+	else if (!*t && !*t2)
+		ret = ret2;
+end:
+	free(tt);
+	free(tt2);
+
+	return (ret);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/strfmon.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,626 @@
+/*
+ * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_LCONV_C99
+#define	_LCONV_C99
+#endif
+
+#include "lint.h"
+#include <sys/types.h>
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <locale.h>
+#include <monetary.h>
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* internal flags */
+#define	NEED_GROUPING		0x01	/* print digits grouped (default) */
+#define	SIGN_POSN_USED		0x02	/* '+' or '(' usage flag */
+#define	LOCALE_POSN		0x04	/* use locale defined +/- (default) */
+#define	PARENTH_POSN		0x08	/* enclose negative amount in () */
+#define	SUPRESS_CURR_SYMBOL	0x10	/* supress the currency from output */
+#define	LEFT_JUSTIFY		0x20	/* left justify */
+#define	USE_INTL_CURRENCY	0x40	/* use international currency symbol */
+#define	IS_NEGATIVE		0x80	/* is argument value negative ? */
+
+/* internal macros */
+#define	PRINT(CH) {						\
+	if (dst >= s + maxsize) 				\
+		goto e2big_error;				\
+	*dst++ = CH;						\
+}
+
+#define	PRINTS(STR) {						\
+	char *tmps = STR;					\
+	while (*tmps != '\0')					\
+		PRINT(*tmps++);					\
+}
+
+#define	GET_NUMBER(VAR)	{					\
+	VAR = 0;						\
+	while (isdigit((unsigned char)*fmt)) {			\
+		if (VAR > INT_MAX / 10)				\
+			goto e2big_error;			\
+		VAR *= 10;					\
+		VAR += *fmt - '0';				\
+		if (VAR < 0)					\
+			goto e2big_error;			\
+		fmt++;						\
+	}							\
+}
+
+#define	GRPCPY(howmany) {					\
+	int i = howmany;					\
+	while (i-- > 0) {					\
+		avalue_size--;					\
+		*--bufend = *(avalue+avalue_size+padded);	\
+	}							\
+}
+
+#define	GRPSEP {						\
+	*--bufend = thousands_sep;				\
+	groups++;						\
+}
+
+static void __setup_vars(int, char *, char *, char *, char **);
+static int __calc_left_pad(int, char *);
+static char *__format_grouped_double(double, int *, int, int, int);
+
+ssize_t
+strfmon(char *_RESTRICT_KYWD s, size_t maxsize,
+    const char *_RESTRICT_KYWD format, ...)
+{
+	va_list		ap;
+	char 		*dst;		/* output destination pointer */
+	const char 	*fmt;		/* current format poistion pointer */
+	struct lconv 	*lc;		/* pointer to lconv structure */
+	char		*asciivalue;	/* formatted double pointer */
+
+	int		flags;		/* formatting options */
+	int		pad_char;	/* padding character */
+	int		pad_size;	/* pad size */
+	int		width;		/* field width */
+	int		left_prec;	/* left precision */
+	int		right_prec;	/* right precision */
+	double		value;		/* just value */
+	char		space_char = ' '; /* space after currency */
+
+	char		cs_precedes;	/* values gathered from struct lconv */
+	char		sep_by_space;
+	char		sign_posn;
+	char		*signstr;
+	char		*currency_symbol;
+
+	char		*tmpptr;	/* temporary vars */
+	int		sverrno;
+
+	va_start(ap, format);
+
+	lc = localeconv();
+	dst = s;
+	fmt = format;
+	asciivalue = NULL;
+	currency_symbol = NULL;
+	pad_size = 0;
+
+	while (*fmt) {
+		/* pass nonformating characters AS IS */
+		if (*fmt != '%')
+			goto literal;
+
+		/* '%' found ! */
+
+		/* "%%" mean just '%' */
+		if (*(fmt+1) == '%') {
+			fmt++;
+	literal:
+			PRINT(*fmt++);
+			continue;
+		}
+
+		/* set up initial values */
+		flags = (NEED_GROUPING|LOCALE_POSN);
+		pad_char = ' ';		/* padding character is "space" */
+		left_prec = -1;		/* no left precision specified */
+		right_prec = -1;	/* no right precision specified */
+		width = -1;		/* no width specified */
+		value = 0;		/* we have no value to print now */
+
+		/* Flags */
+		for (;;) {
+			switch (*++fmt) {
+				case '=':	/* fill character */
+					pad_char = *++fmt;
+					if (pad_char == '\0')
+						goto format_error;
+					continue;
+				case '^':	/* not group currency  */
+					flags &= ~(NEED_GROUPING);
+					continue;
+				case '+':	/* use locale defined signs */
+					if (flags & SIGN_POSN_USED)
+						goto format_error;
+					flags |= (SIGN_POSN_USED|LOCALE_POSN);
+					continue;
+				case '(':	/* enclose negatives with () */
+					if (flags & SIGN_POSN_USED)
+						goto format_error;
+					flags |= (SIGN_POSN_USED|PARENTH_POSN);
+					continue;
+				case '!':	/* suppress currency symbol */
+					flags |= SUPRESS_CURR_SYMBOL;
+					continue;
+				case '-':	/* alignment (left)  */
+					flags |= LEFT_JUSTIFY;
+					continue;
+				default:
+					break;
+			}
+			break;
+		}
+
+		/* field Width */
+		if (isdigit((unsigned char)*fmt)) {
+			GET_NUMBER(width);
+			/*
+			 * Do we have enough space to put number with
+			 * required width ?
+			 */
+			if ((unsigned int)width >= maxsize - (dst - s))
+				goto e2big_error;
+		}
+
+		/* Left precision */
+		if (*fmt == '#') {
+			if (!isdigit((unsigned char)*++fmt))
+				goto format_error;
+			GET_NUMBER(left_prec);
+			if ((unsigned int)left_prec >= maxsize - (dst - s))
+				goto e2big_error;
+		}
+
+		/* Right precision */
+		if (*fmt == '.') {
+			if (!isdigit((unsigned char)*++fmt))
+				goto format_error;
+			GET_NUMBER(right_prec);
+			if ((unsigned int)right_prec >= maxsize - (dst - s) -
+			    left_prec)
+				goto e2big_error;
+		}
+
+		/* Conversion Characters */
+		switch (*fmt++) {
+			case 'i':	/* use internaltion currency format */
+				flags |= USE_INTL_CURRENCY;
+				break;
+			case 'n':	/* use national currency format */
+				flags &= ~(USE_INTL_CURRENCY);
+				break;
+			default:
+				/* required char missing or premature EOS */
+				goto format_error;
+		}
+
+		if (currency_symbol != NULL)
+			free(currency_symbol);
+		if (flags & USE_INTL_CURRENCY) {
+			currency_symbol = strdup(lc->int_curr_symbol);
+			if (currency_symbol != NULL)
+				space_char = *(currency_symbol+3);
+		} else
+			currency_symbol = strdup(lc->currency_symbol);
+
+		if (currency_symbol == NULL)
+			goto end_error;			/* ENOMEM. */
+
+		/* value itself */
+		value = va_arg(ap, double);
+
+		/* detect sign */
+		if (value < 0) {
+			flags |= IS_NEGATIVE;
+			value = -value;
+		}
+
+		/* fill left_prec with amount of padding chars */
+		if (left_prec >= 0) {
+			pad_size = __calc_left_pad((flags ^ IS_NEGATIVE),
+			    currency_symbol) -
+			    __calc_left_pad(flags, currency_symbol);
+			if (pad_size < 0)
+				pad_size = 0;
+		}
+
+		if (asciivalue != NULL)
+			free(asciivalue);
+		asciivalue = __format_grouped_double(value, &flags,
+		    left_prec, right_prec, pad_char);
+		if (asciivalue == NULL)
+			goto end_error;		/* errno already set */
+						/* to ENOMEM by malloc() */
+
+		/* set some variables for later use */
+		__setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn,
+		    &signstr);
+
+		/*
+		 * Description of some LC_MONETARY's values:
+		 *
+		 * p_cs_precedes & n_cs_precedes
+		 *
+		 * = 1 - $currency_symbol precedes the value
+		 *	 for a monetary quantity with a non-negative value
+		 * = 0 - symbol succeeds the value
+		 *
+		 * p_sep_by_space & n_sep_by_space
+		 *
+		 * = 0 - no space separates $currency_symbol
+		 *	 from the value for a monetary quantity with a
+		 *	 non-negative value
+		 * = 1 - space separates the symbol from the value
+		 * = 2 - space separates the symbol and the sign string,
+		 *	 if adjacent.
+		 *
+		 * p_sign_posn & n_sign_posn
+		 *
+		 * = 0 - parentheses enclose the quantity and the
+		 *	 $currency_symbol
+		 * = 1 - the sign string precedes the quantity and the
+		 *	 $currency_symbol
+		 * = 2 - the sign string succeeds the quantity and the
+		 *	 $currency_symbol
+		 * = 3 - the sign string precedes the $currency_symbol
+		 * = 4 - the sign string succeeds the $currency_symbol
+		 *
+		 */
+
+		tmpptr = dst;
+
+		while (pad_size-- > 0)
+			PRINT(' ');
+
+		if (sign_posn == 0 && (flags & IS_NEGATIVE))
+			PRINT('(');
+
+		if (cs_precedes == 1) {
+			if (sign_posn == 1 || sign_posn == 3) {
+				PRINTS(signstr);
+				if (sep_by_space == 2)		/* XXX: ? */
+					PRINT(' ');
+			}
+
+			if (!(flags & SUPRESS_CURR_SYMBOL)) {
+				PRINTS(currency_symbol);
+
+				if (sign_posn == 4) {
+					if (sep_by_space == 2)
+						PRINT(space_char);
+					PRINTS(signstr);
+					if (sep_by_space == 1)
+						PRINT(' ');
+				} else if (sep_by_space == 1)
+					PRINT(space_char);
+			}
+		} else if (sign_posn == 1)
+			PRINTS(signstr);
+
+		PRINTS(asciivalue);
+
+		if (cs_precedes == 0) {
+			if (sign_posn == 3) {
+				if (sep_by_space == 1)
+					PRINT(' ');
+				PRINTS(signstr);
+			}
+
+			if (!(flags & SUPRESS_CURR_SYMBOL)) {
+				if ((sign_posn == 3 && sep_by_space == 2) ||
+				    (sep_by_space == 1 && (sign_posn == 0 ||
+				    sign_posn == 1 || sign_posn == 2 ||
+				    sign_posn == 4)))
+					PRINT(space_char);
+				PRINTS(currency_symbol); /* XXX: len */
+				if (sign_posn == 4) {
+					if (sep_by_space == 2)
+						PRINT(' ');
+					PRINTS(signstr);
+				}
+			}
+		}
+
+		if (sign_posn == 2) {
+			if (sep_by_space == 2)
+				PRINT(' ');
+			PRINTS(signstr);
+		}
+
+		if (sign_posn == 0 && (flags & IS_NEGATIVE))
+			PRINT(')');
+
+		if (dst - tmpptr < width) {
+			if (flags & LEFT_JUSTIFY) {
+				while (dst - tmpptr < width)
+					PRINT(' ');
+			} else {
+				pad_size = dst-tmpptr;
+				(void) memmove(tmpptr + width-pad_size, tmpptr,
+				    pad_size);
+				(void) memset(tmpptr, ' ', width-pad_size);
+				dst += width-pad_size;
+			}
+		}
+	}
+
+	PRINT('\0');
+	va_end(ap);
+	free(asciivalue);
+	free(currency_symbol);
+	return (dst - s - 1);	/* size of put data except trailing '\0' */
+
+e2big_error:
+	errno = E2BIG;
+	goto end_error;
+
+format_error:
+	errno = EINVAL;
+
+end_error:
+	sverrno = errno;
+	if (asciivalue != NULL)
+		free(asciivalue);
+	if (currency_symbol != NULL)
+		free(currency_symbol);
+	errno = sverrno;
+	va_end(ap);
+	return (-1);
+}
+
+static void
+__setup_vars(int flags, char *cs_precedes, char *sep_by_space,
+    char *sign_posn, char **signstr)
+{
+
+	struct lconv *lc = localeconv();
+
+	if ((flags & IS_NEGATIVE) && (flags & USE_INTL_CURRENCY)) {
+		*cs_precedes = lc->int_n_cs_precedes;
+		*sep_by_space = lc->int_n_sep_by_space;
+		*sign_posn = (flags & PARENTH_POSN) ? 0 : lc->int_n_sign_posn;
+		*signstr = (lc->negative_sign[0] == '\0') ? "-"
+		    : lc->negative_sign;
+	} else if (flags & USE_INTL_CURRENCY) {
+		*cs_precedes = lc->int_p_cs_precedes;
+		*sep_by_space = lc->int_p_sep_by_space;
+		*sign_posn = (flags & PARENTH_POSN) ? 0 : lc->int_p_sign_posn;
+		*signstr = lc->positive_sign;
+	} else if (flags & IS_NEGATIVE) {
+		*cs_precedes = lc->n_cs_precedes;
+		*sep_by_space = lc->n_sep_by_space;
+		*sign_posn = (flags & PARENTH_POSN) ? 0 : lc->n_sign_posn;
+		*signstr = (lc->negative_sign[0] == '\0') ? "-"
+		    : lc->negative_sign;
+	} else {
+		*cs_precedes = lc->p_cs_precedes;
+		*sep_by_space = lc->p_sep_by_space;
+		*sign_posn = (flags & PARENTH_POSN) ? 0 : lc->p_sign_posn;
+		*signstr = lc->positive_sign;
+	}
+
+	/* Set defult values for unspecified information. */
+	if (*cs_precedes != 0)
+		*cs_precedes = 1;
+	if (*sep_by_space == CHAR_MAX)
+		*sep_by_space = 0;
+	if (*sign_posn == CHAR_MAX)
+		*sign_posn = 0;
+}
+
+static int
+__calc_left_pad(int flags, char *cur_symb)
+{
+
+	char cs_precedes, sep_by_space, sign_posn, *signstr;
+	int left_chars = 0;
+
+	__setup_vars(flags, &cs_precedes, &sep_by_space, &sign_posn, &signstr);
+
+	if (cs_precedes != 0) {
+		left_chars += strlen(cur_symb);
+		if (sep_by_space != 0)
+			left_chars++;
+	}
+
+	switch (sign_posn) {
+		case 1:
+			left_chars += strlen(signstr);
+			break;
+		case 3:
+		case 4:
+			if (cs_precedes != 0)
+				left_chars += strlen(signstr);
+	}
+	return (left_chars);
+}
+
+static int
+get_groups(int size, char *grouping)
+{
+
+	int	chars = 0;
+
+	if (*grouping == CHAR_MAX || *grouping <= 0)	/* no grouping ? */
+		return (0);
+
+	while (size > (int)*grouping) {
+		chars++;
+		size -= (int)*grouping++;
+		/* no more grouping ? */
+		if (*grouping == CHAR_MAX)
+			break;
+		/* rest grouping with same value ? */
+		if (*grouping == 0) {
+			chars += (size - 1) / *(grouping - 1);
+			break;
+		}
+	}
+	return (chars);
+}
+
+/* convert double to ASCII */
+static char *
+__format_grouped_double(double value, int *flags,
+    int left_prec, int right_prec, int pad_char)
+{
+
+	char		*rslt;
+	char		*avalue;
+	int		avalue_size;
+	char		fmt[32];
+
+	size_t		bufsize;
+	char		*bufend;
+
+	int		padded;
+
+	struct lconv	*lc = localeconv();
+	char		*grouping;
+	char		decimal_point;
+	char		thousands_sep;
+
+	int groups = 0;
+
+	grouping = lc->mon_grouping;
+	decimal_point = *lc->mon_decimal_point;
+	if (decimal_point == '\0')
+		decimal_point = *lc->decimal_point;
+	thousands_sep = *lc->mon_thousands_sep;
+	if (thousands_sep == '\0')
+		thousands_sep = *lc->thousands_sep;
+
+	/* fill left_prec with default value */
+	if (left_prec == -1)
+		left_prec = 0;
+
+	/* fill right_prec with default value */
+	if (right_prec == -1) {
+		if (*flags & USE_INTL_CURRENCY)
+			right_prec = lc->int_frac_digits;
+		else
+			right_prec = lc->frac_digits;
+
+		if (right_prec == CHAR_MAX)	/* POSIX locale ? */
+			right_prec = 2;
+	}
+
+	if (*flags & NEED_GROUPING)
+		left_prec += get_groups(left_prec, grouping);
+
+	/* convert to string */
+	(void) snprintf(fmt, sizeof (fmt), "%%%d.%df",
+	    left_prec + right_prec + 1, right_prec);
+	avalue_size = asprintf(&avalue, fmt, value);
+	if (avalue_size < 0)
+		return (NULL);
+
+	/* make sure that we've enough space for result string */
+	bufsize = strlen(avalue)*2+1;
+	rslt = calloc(1, bufsize);
+	if (rslt == NULL) {
+		free(avalue);
+		return (NULL);
+	}
+	bufend = rslt + bufsize - 1;	/* reserve space for trailing '\0' */
+
+	/* skip spaces at beggining */
+	padded = 0;
+	while (avalue[padded] == ' ') {
+		padded++;
+		avalue_size--;
+	}
+
+	if (right_prec > 0) {
+		bufend -= right_prec;
+		(void) memcpy(bufend, avalue + avalue_size+padded-right_prec,
+		    right_prec);
+		*--bufend = decimal_point;
+		avalue_size -= (right_prec + 1);
+	}
+
+	if ((*flags & NEED_GROUPING) &&
+	    thousands_sep != '\0' &&	/* XXX: need investigation */
+	    *grouping != CHAR_MAX &&
+	    *grouping > 0) {
+		while (avalue_size > (int)*grouping) {
+			GRPCPY(*grouping);
+			GRPSEP;
+			grouping++;
+
+			/* no more grouping ? */
+			if (*grouping == CHAR_MAX)
+				break;
+
+			/* rest grouping with same value ? */
+			if (*grouping == 0) {
+				grouping--;
+				while (avalue_size > *grouping) {
+					GRPCPY(*grouping);
+					GRPSEP;
+				}
+			}
+		}
+		if (avalue_size != 0)
+			GRPCPY(avalue_size);
+		padded -= groups;
+
+	} else {
+		bufend -= avalue_size;
+		(void) memcpy(bufend, avalue+padded, avalue_size);
+		if (right_prec == 0)
+			padded--;	/* decrease assumed $decimal_point */
+	}
+
+	/* do padding with pad_char */
+	if (padded > 0) {
+		bufend -= padded;
+		(void) memset(bufend, pad_char, padded);
+	}
+
+	bufsize = bufsize - (bufend - rslt) + 1;
+	(void) memmove(rslt, bufend, bufsize);
+	free(avalue);
+	return (rslt);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/strftime.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,527 @@
+/*
+ * Copyright (c) 1989 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include "tzfile.h"
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <string.h>
+#include <stdio.h>
+#include "timelocal.h"
+
+static char *_add(const char *, char *, const char *);
+static char *_conv(int, const char *, char *, const char *);
+static char *_fmt(const char *, const struct tm *, char *, const char * const);
+static char *_yconv(int, int, int, int, char *, const char *);
+
+extern char *tzname[];
+
+#define	IN_NONE	0
+#define	IN_SOME	1
+#define	IN_THIS	2
+#define	IN_ALL	3
+
+#define	PAD_DEFAULT	0
+#define	PAD_LESS	1
+#define	PAD_SPACE	2
+#define	PAD_ZERO	3
+
+static const char *fmt_padding[][4] = {
+	/* DEFAULT,	LESS,	SPACE,	ZERO */
+#define	PAD_FMT_MONTHDAY	0
+#define	PAD_FMT_HMS		0
+#define	PAD_FMT_CENTURY		0
+#define	PAD_FMT_SHORTYEAR	0
+#define	PAD_FMT_MONTH		0
+#define	PAD_FMT_WEEKOFYEAR	0
+#define	PAD_FMT_DAYOFMONTH	0
+	{ "%02d",	"%d",	"%2d",	"%02d" },
+#define	PAD_FMT_SDAYOFMONTH	1
+#define	PAD_FMT_SHMS		1
+	{ "%2d",	"%d",	"%2d",	"%02d" },
+#define	PAD_FMT_DAYOFYEAR	2
+	{ "%03d",	"%d",	"%3d",	"%03d" },
+#define	PAD_FMT_YEAR		3
+	{ "%04d",	"%d",	"%4d",	"%04d" }
+};
+
+
+size_t
+strftime(char *_RESTRICT_KYWD s, size_t maxsize,
+    const char *_RESTRICT_KYWD format, const struct tm *_RESTRICT_KYWD t)
+{
+	char *p;
+
+	tzset();
+	p = _fmt(((format == NULL) ? "%c" : format), t, s, s + maxsize);
+	if (p == s + maxsize)
+		return (0);
+	*p = '\0';
+	return (p - s);
+}
+
+static char *
+_fmt(const char *format, const struct tm *t, char *pt, const char * const ptlim)
+{
+	int Ealternative, Oalternative, PadIndex;
+	struct lc_time_T *tptr = __get_current_time_locale();
+
+#define	PADDING(x)	fmt_padding[x][PadIndex]
+
+	for (; *format; ++format) {
+		if (*format == '%') {
+			Ealternative = 0;
+			Oalternative = 0;
+			PadIndex	 = PAD_DEFAULT;
+label:
+			switch (*++format) {
+			case '\0':
+				--format;
+				break;
+			case 'A':
+				pt = _add((t->tm_wday < 0 ||
+				    t->tm_wday >= DAYSPERWEEK) ?
+				    "?" : tptr->weekday[t->tm_wday],
+				    pt, ptlim);
+				continue;
+			case 'a':
+				pt = _add((t->tm_wday < 0 ||
+				    t->tm_wday >= DAYSPERWEEK) ?
+				    "?" : tptr->wday[t->tm_wday],
+				    pt, ptlim);
+				continue;
+			case 'B':
+				pt = _add((t->tm_mon < 0 ||
+				    t->tm_mon >= MONSPERYEAR) ?
+				    "?" : (tptr->month)[t->tm_mon],
+				    pt, ptlim);
+				continue;
+			case 'b':
+			case 'h':
+				pt = _add((t->tm_mon < 0 ||
+				    t->tm_mon >= MONSPERYEAR) ?
+				    "?" : tptr->mon[t->tm_mon],
+				    pt, ptlim);
+				continue;
+			case 'C':
+				/*
+				 * %C used to do a...
+				 *	_fmt("%a %b %e %X %Y", t);
+				 * ...whereas now POSIX 1003.2 calls for
+				 * something completely different.
+				 * (ado, 1993-05-24)
+				 */
+				pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 0,
+				    pt, ptlim);
+				continue;
+			case 'c':
+				pt = _fmt(tptr->c_fmt, t, pt, ptlim);
+				continue;
+			case 'D':
+				pt = _fmt("%m/%d/%y", t, pt, ptlim);
+				continue;
+			case 'd':
+				pt = _conv(t->tm_mday,
+				    PADDING(PAD_FMT_DAYOFMONTH), pt, ptlim);
+				continue;
+			case 'E':
+				if (Ealternative || Oalternative)
+					break;
+				Ealternative++;
+				goto label;
+			case 'O':
+				/*
+				 * C99 locale modifiers.
+				 * The sequences
+				 *	%Ec %EC %Ex %EX %Ey %EY
+				 *	%Od %oe %OH %OI %Om %OM
+				 *	%OS %Ou %OU %OV %Ow %OW %Oy
+				 * are supposed to provide alternate
+				 * representations.
+				 */
+				if (Ealternative || Oalternative)
+					break;
+				Oalternative++;
+				goto label;
+			case 'e':
+				pt = _conv(t->tm_mday,
+				    PADDING(PAD_FMT_SDAYOFMONTH), pt, ptlim);
+				continue;
+			case 'F':
+				pt = _fmt("%Y-%m-%d", t, pt, ptlim);
+				continue;
+			case 'H':
+				pt = _conv(t->tm_hour, PADDING(PAD_FMT_HMS),
+				    pt, ptlim);
+				continue;
+			case 'I':
+				pt = _conv((t->tm_hour % 12) ?
+				    (t->tm_hour % 12) : 12,
+				    PADDING(PAD_FMT_HMS), pt, ptlim);
+				continue;
+			case 'j':
+				pt = _conv(t->tm_yday + 1,
+				    PADDING(PAD_FMT_DAYOFYEAR), pt, ptlim);
+				continue;
+			case 'k':
+				/*
+				 * This used to be...
+				 *	_conv(t->tm_hour % 12 ?
+				 *		t->tm_hour % 12 : 12, 2, ' ');
+				 * ...and has been changed to the below to
+				 * match SunOS 4.1.1 and Arnold Robbins'
+				 * strftime version 3.0. That is, "%k" and
+				 * "%l" have been swapped.
+				 * (ado, 1993-05-24)
+				 */
+				pt = _conv(t->tm_hour,
+				    PADDING(PAD_FMT_SHMS), pt, ptlim);
+				continue;
+			case 'l':
+				/*
+				 * This used to be...
+				 *	_conv(t->tm_hour, 2, ' ');
+				 * ...and has been changed to the below to
+				 * match SunOS 4.1.1 and Arnold Robbin's
+				 * strftime version 3.0. That is, "%k" and
+				 * "%l" have been swapped.
+				 * (ado, 1993-05-24)
+				 */
+				pt = _conv((t->tm_hour % 12) ?
+				    (t->tm_hour % 12) : 12,
+				    PADDING(PAD_FMT_SHMS), pt, ptlim);
+				continue;
+			case 'M':
+				pt = _conv(t->tm_min, PADDING(PAD_FMT_HMS),
+				    pt, ptlim);
+				continue;
+			case 'm':
+				pt = _conv(t->tm_mon + 1,
+				    PADDING(PAD_FMT_MONTH),
+				    pt, ptlim);
+				continue;
+			case 'n':
+				pt = _add("\n", pt, ptlim);
+				continue;
+			case 'p':
+				pt = _add((t->tm_hour >= (HOURSPERDAY / 2)) ?
+				    tptr->pm : tptr->am, pt, ptlim);
+				continue;
+			case 'R':
+				pt = _fmt("%H:%M", t, pt, ptlim);
+				continue;
+			case 'r':
+				pt = _fmt(tptr->ampm_fmt, t, pt, ptlim);
+				continue;
+			case 'S':
+				pt = _conv(t->tm_sec, PADDING(PAD_FMT_HMS),
+				    pt, ptlim);
+				continue;
+
+			/*
+			 * Note: 's' for seconds since epoch was removed.
+			 * While FreeBSD and Linux appear to support this,
+			 * Sun Solaris does not.  Furthermore, the FreeBSD
+			 * implementation was not correct for _LP64.
+			 */
+
+			case 'T':
+				pt = _fmt("%H:%M:%S", t, pt, ptlim);
+				continue;
+			case 't':
+				pt = _add("\t", pt, ptlim);
+				continue;
+			case 'U':
+				pt = _conv((t->tm_yday + DAYSPERWEEK -
+				    t->tm_wday) / DAYSPERWEEK,
+				    PADDING(PAD_FMT_WEEKOFYEAR),
+				    pt, ptlim);
+				continue;
+			case 'u':
+				/*
+				 * From Arnold Robbins' strftime version 3.0:
+				 * "ISO 8601: Weekday as a decimal number
+				 * [1 (Monday) - 7]"
+				 * (ado, 1993-05-24)
+				 */
+				pt = _conv((t->tm_wday == 0) ?
+				    DAYSPERWEEK : t->tm_wday,
+				    "%d", pt, ptlim);
+				continue;
+			case 'V':	/* ISO 8601 week number */
+			case 'G':	/* ISO 8601 year (four digits) */
+			case 'g':	/* ISO 8601 year (two digits) */
+/*
+ * From Arnold Robbins' strftime version 3.0: "the week number of the
+ * year (the first Monday as the first day of week 1) as a decimal number
+ * (01-53)."
+ * (ado, 1993-05-24)
+ *
+ * From "http://www.ft.uni-erlangen.de/~mskuhn/iso-time.html" by Markus Kuhn:
+ * "Week 01 of a year is per definition the first week which has the
+ * Thursday in this year, which is equivalent to the week which contains
+ * the fourth day of January. In other words, the first week of a new year
+ * is the week which has the majority of its days in the new year. Week 01
+ * might also contain days from the previous year and the week before week
+ * 01 of a year is the last week (52 or 53) of the previous year even if
+ * it contains days from the new year. A week starts with Monday (day 1)
+ * and ends with Sunday (day 7). For example, the first week of the year
+ * 1997 lasts from 1996-12-30 to 1997-01-05..."
+ * (ado, 1996-01-02)
+ */
+			{
+				int	year;
+				int	base;
+				int	yday;
+				int	wday;
+				int	w;
+
+				year = t->tm_year;
+				base = TM_YEAR_BASE;
+				yday = t->tm_yday;
+				wday = t->tm_wday;
+				for (;;) {
+					int	len;
+					int	bot;
+					int	top;
+
+					len = isleap_sum(year, base) ?
+					    DAYSPERLYEAR : DAYSPERNYEAR;
+					/*
+					 * What yday (-3 ... 3) does
+					 * the ISO year begin on?
+					 */
+					bot = ((yday + 11 - wday) %
+					    DAYSPERWEEK) - 3;
+					/*
+					 * What yday does the NEXT
+					 * ISO year begin on?
+					 */
+					top = bot - (len % DAYSPERWEEK);
+					if (top < -3)
+						top += DAYSPERWEEK;
+					top += len;
+					if (yday >= top) {
+						++base;
+						w = 1;
+						break;
+					}
+					if (yday >= bot) {
+						w = 1 + ((yday - bot) /
+						    DAYSPERWEEK);
+						break;
+					}
+					--base;
+					yday += isleap_sum(year, base) ?
+					    DAYSPERLYEAR : DAYSPERNYEAR;
+				}
+#ifdef XPG4_1994_04_09
+				if ((w == 52 && t->tm_mon == TM_JANUARY) ||
+				    (w == 1 && t->tm_mon == TM_DECEMBER))
+					w = 53;
+#endif /* defined XPG4_1994_04_09 */
+				if (*format == 'V')
+					pt = _conv(w,
+					    PADDING(PAD_FMT_WEEKOFYEAR),
+					    pt, ptlim);
+				else if (*format == 'g') {
+					pt = _yconv(year, base, 0, 1,
+					    pt, ptlim);
+				} else
+					pt = _yconv(year, base, 1, 1,
+					    pt, ptlim);
+			}
+				continue;
+			case 'v':
+				/*
+				 * From Arnold Robbins' strftime version 3.0:
+				 * "date as dd-bbb-YYYY"
+				 * (ado, 1993-05-24)
+				 */
+				pt = _fmt("%e-%b-%Y", t, pt, ptlim);
+				continue;
+			case 'W':
+				pt = _conv((t->tm_yday + DAYSPERWEEK -
+				    (t->tm_wday ?
+				    (t->tm_wday - 1) :
+				    (DAYSPERWEEK - 1))) / DAYSPERWEEK,
+				    PADDING(PAD_FMT_WEEKOFYEAR),
+				    pt, ptlim);
+				continue;
+			case 'w':
+				pt = _conv(t->tm_wday, "%d", pt, ptlim);
+				continue;
+			case 'X':
+				pt = _fmt(tptr->X_fmt, t, pt, ptlim);
+				continue;
+			case 'x':
+				pt = _fmt(tptr->x_fmt, t, pt, ptlim);
+				continue;
+			case 'y':
+				pt = _yconv(t->tm_year, TM_YEAR_BASE, 0, 1,
+				    pt, ptlim);
+				continue;
+			case 'Y':
+				pt = _yconv(t->tm_year, TM_YEAR_BASE, 1, 1,
+				    pt, ptlim);
+				continue;
+			case 'Z':
+				if (t->tm_isdst >= 0)
+					pt = _add(tzname[t->tm_isdst != 0],
+					    pt, ptlim);
+				/*
+				 * C99 says that %Z must be replaced by the
+				 * empty string if the time zone is not
+				 * determinable.
+				 */
+				continue;
+			case 'z':
+				{
+				int		diff;
+				char const *	sign;
+
+				if (t->tm_isdst < 0)
+					continue;
+				/*
+				 * C99 says that the UTC offset must
+				 * be computed by looking only at
+				 * tm_isdst. This requirement is
+				 * incorrect, since it means the code
+				 * must rely on magic (in this case
+				 * altzone and timezone), and the
+				 * magic might not have the correct
+				 * offset. Doing things correctly is
+				 * tricky and requires disobeying C99;
+				 * see GNU C strftime for details.
+				 * For now, punt and conform to the
+				 * standard, even though it's incorrect.
+				 *
+				 * C99 says that %z must be replaced by the
+				 * empty string if the time zone is not
+				 * determinable, so output nothing if the
+				 * appropriate variables are not available.
+				 */
+				if (t->tm_isdst == 0)
+					diff = -timezone;
+				else
+					diff = -altzone;
+				if (diff < 0) {
+					sign = "-";
+					diff = -diff;
+				} else
+					sign = "+";
+				pt = _add(sign, pt, ptlim);
+				diff /= SECSPERMIN;
+				diff = (diff / MINSPERHOUR) * 100 +
+				    (diff % MINSPERHOUR);
+				pt = _conv(diff, PADDING(PAD_FMT_YEAR),
+				    pt, ptlim);
+				}
+				continue;
+			case '+':
+				pt = _fmt(tptr->date_fmt, t, pt, ptlim);
+				continue;
+			case '-':
+				if (PadIndex != PAD_DEFAULT)
+					break;
+				PadIndex = PAD_LESS;
+				goto label;
+			case '_':
+				if (PadIndex != PAD_DEFAULT)
+					break;
+				PadIndex = PAD_SPACE;
+				goto label;
+			case '0':
+				if (PadIndex != PAD_DEFAULT)
+					break;
+				PadIndex = PAD_ZERO;
+				goto label;
+			case '%':
+			/*
+			 * X311J/88-090 (4.12.3.5): if conversion char is
+			 * undefined, behavior is undefined. Print out the
+			 * character itself as printf(3) also does.
+			 */
+			default:
+				break;
+			}
+		}
+		if (pt == ptlim)
+			break;
+		*pt++ = *format;
+	}
+	return (pt);
+}
+
+static char *
+_conv(const int n, const char *format, char *const pt,
+    const char *const ptlim)
+{
+	char	buf[12];
+
+	(void) sprintf(buf, format, n);
+	return (_add(buf, pt, ptlim));
+}
+
+static char *
+_add(const char *str, char *pt, const char *const ptlim)
+{
+	while (pt < ptlim && (*pt = *str++) != '\0')
+		++pt;
+	return (pt);
+}
+
+/*
+ * POSIX and the C Standard are unclear or inconsistent about
+ * what %C and %y do if the year is negative or exceeds 9999.
+ * Use the convention that %C concatenated with %y yields the
+ * same output as %Y, and that %Y contains at least 4 bytes,
+ * with more only if necessary.
+ */
+
+static char *
+_yconv(const int a, const int b, const int convert_top, const int convert_yy,
+    char *pt, const char * const ptlim)
+{
+	register int	lead;
+	register int	trail;
+
+#define	DIVISOR	100
+	trail = a % DIVISOR + b % DIVISOR;
+	lead = a / DIVISOR + b / DIVISOR + trail / DIVISOR;
+	trail %= DIVISOR;
+	if (trail < 0 && lead > 0) {
+		trail += DIVISOR;
+		--lead;
+	} else if (lead < 0 && trail > 0) {
+		trail -= DIVISOR;
+		++lead;
+	}
+	if (convert_top) {
+		if (lead == 0 && trail < 0)
+			pt = _add("-0", pt, ptlim);
+		else	pt = _conv(lead, "%02d", pt, ptlim);
+	}
+	if (convert_yy)
+		pt = _conv(((trail < 0) ? -trail : trail), "%02d", pt, ptlim);
+	return (pt);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/strptime.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,539 @@
+/*
+ * Powerdog Industries kindly requests feedback from anyone modifying
+ * this function:
+ *
+ * Date: Thu, 05 Jun 1997 23:17:17 -0400
+ * From: Kevin Ruddy <kevin.ruddy@powerdog.com>
+ * To: James FitzGibbon <james@nexis.net>
+ * Subject: Re: Use of your strptime(3) code (fwd)
+ *
+ * The reason for the "no mod" clause was so that modifications would
+ * come back and we could integrate them and reissue so that a wider
+ * audience could use it (thereby spreading the wealth).  This has
+ * made it possible to get strptime to work on many operating systems.
+ * I'm not sure why that's "plain unacceptable" to the FreeBSD team.
+ *
+ * Anyway, you can change it to "with or without modification" as
+ * you see fit.  Enjoy.
+ *
+ * Kevin Ruddy
+ * Powerdog Industries, Inc.
+ */
+/*
+ * Copyright (c) 1994 Powerdog Industries.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer
+ *    in the documentation and/or other materials provided with the
+ *    distribution.
+ * 3. All advertising materials mentioning features or use of this
+ *    software must display the following acknowledgement:
+ *      This product includes software developed by Powerdog Industries.
+ * 4. The name of Powerdog Industries may not be used to endorse or
+ *    promote products derived from this software without specific prior
+ *    written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY POWERDOG INDUSTRIES ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE POWERDOG INDUSTRIES BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010, Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+#include "lint.h"
+#include <time.h>
+#include <ctype.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <pthread.h>
+#include <alloca.h>
+#include "timelocal.h"
+
+#define	asizeof(a)	(sizeof (a) / sizeof ((a)[0]))
+
+static char *
+__strptime(const char *buf, const char *fmt, struct tm *tm)
+{
+	char	c;
+	const char *ptr;
+	int	i, len;
+	int Ealternative, Oalternative;
+	struct lc_time_T *tptr = __get_current_time_locale();
+
+	ptr = fmt;
+	while (*ptr != 0) {
+		if (*buf == 0)
+			break;
+
+		c = *ptr++;
+
+		if (c != '%') {
+			if (isspace((unsigned char)c))
+				while (*buf != 0 &&
+				    isspace((unsigned char)*buf))
+					buf++;
+			else if (c != *buf++)
+				return (0);
+			continue;
+		}
+
+		Ealternative = 0;
+		Oalternative = 0;
+label:
+		c = *ptr++;
+		switch (c) {
+		case 0:
+		case '%':
+			if (*buf++ != '%')
+				return (0);
+			break;
+
+		case '+':
+			buf = __strptime(buf, tptr->date_fmt, tm);
+			if (buf == 0)
+				return (0);
+			break;
+
+		case 'C':
+			if (!isdigit((unsigned char)*buf))
+				return (0);
+
+			/* XXX This will break for 3-digit centuries. */
+			len = 2;
+			for (i = 0;
+			    len && isdigit((unsigned char)*buf);
+			    buf++) {
+				i *= 10;
+				i += *buf - '0';
+				len--;
+			}
+			if (i < 19)
+				return (0);
+
+			tm->tm_year = i * 100 - 1900;
+			break;
+
+		case 'c':
+			buf = __strptime(buf, tptr->c_fmt, tm);
+			if (buf == 0)
+				return (0);
+			break;
+
+		case 'D':
+			buf = __strptime(buf, "%m/%d/%y", tm);
+			if (buf == 0)
+				return (0);
+			break;
+
+		case 'E':
+			if (Ealternative || Oalternative)
+				break;
+			Ealternative++;
+			goto label;
+
+		case 'O':
+			if (Ealternative || Oalternative)
+				break;
+			Oalternative++;
+			goto label;
+
+		case 'F':
+			buf = __strptime(buf, "%Y-%m-%d", tm);
+			if (buf == 0)
+				return (0);
+			break;
+
+		case 'R':
+			buf = __strptime(buf, "%H:%M", tm);
+			if (buf == 0)
+				return (0);
+			break;
+
+		case 'r':
+			buf = __strptime(buf, tptr->ampm_fmt, tm);
+			if (buf == 0)
+				return (0);
+			break;
+
+		case 'T':
+			buf = __strptime(buf, "%H:%M:%S", tm);
+			if (buf == 0)
+				return (0);
+			break;
+
+		case 'X':
+			buf = __strptime(buf, tptr->X_fmt, tm);
+			if (buf == 0)
+				return (0);
+			break;
+
+		case 'x':
+			buf = __strptime(buf, tptr->x_fmt, tm);
+			if (buf == 0)
+				return (0);
+			break;
+
+		case 'j':
+			if (!isdigit((unsigned char)*buf))
+				return (0);
+
+			len = 3;
+			for (i = 0;
+			    len && isdigit((unsigned char)*buf);
+			    buf++) {
+				i *= 10;
+				i += *buf - '0';
+				len--;
+			}
+			if (i < 1 || i > 366)
+				return (0);
+
+			tm->tm_yday = i - 1;
+			break;
+
+		case 'M':
+		case 'S':
+			if (*buf == 0 || isspace((unsigned char)*buf))
+				break;
+
+			if (!isdigit((unsigned char)*buf))
+				return (0);
+
+			len = 2;
+			for (i = 0;
+			    len && isdigit((unsigned char)*buf);
+			    buf++) {
+				i *= 10;
+				i += *buf - '0';
+				len--;
+			}
+
+			if (c == 'M') {
+				if (i > 59)
+					return (0);
+				tm->tm_min = i;
+			} else {
+				if (i > 60)
+					return (0);
+				tm->tm_sec = i;
+			}
+
+			if (*buf != 0 && isspace((unsigned char)*buf))
+				while (*ptr != 0 &&
+				    !isspace((unsigned char)*ptr))
+					ptr++;
+			break;
+
+		case 'H':
+		case 'I':
+		case 'k':
+		case 'l':
+			/*
+			 * Of these, %l is the only specifier explicitly
+			 * documented as not being zero-padded.  However,
+			 * there is no harm in allowing zero-padding.
+			 *
+			 * XXX The %l specifier may gobble one too many
+			 * digits if used incorrectly.
+			 */
+			if (!isdigit((unsigned char)*buf))
+				return (0);
+
+			len = 2;
+			for (i = 0;
+			    len && isdigit((unsigned char)*buf);
+			    buf++) {
+				i *= 10;
+				i += *buf - '0';
+				len--;
+			}
+			if (c == 'H' || c == 'k') {
+				if (i > 23)
+					return (0);
+			} else if (i > 12)
+				return (0);
+
+			tm->tm_hour = i;
+
+			if (*buf != 0 && isspace((unsigned char)*buf))
+				while (*ptr != 0 &&
+				    !isspace((unsigned char)*ptr))
+					ptr++;
+			break;
+
+		case 'p':
+			/*
+			 * XXX This is bogus if parsed before hour-related
+			 * specifiers.
+			 */
+			len = strlen(tptr->am);
+			if (strncasecmp(buf, tptr->am, len) == 0) {
+				if (tm->tm_hour > 12)
+					return (0);
+				if (tm->tm_hour == 12)
+					tm->tm_hour = 0;
+				buf += len;
+				break;
+			}
+
+			len = strlen(tptr->pm);
+			if (strncasecmp(buf, tptr->pm, len) == 0) {
+				if (tm->tm_hour > 12)
+					return (0);
+				if (tm->tm_hour != 12)
+					tm->tm_hour += 12;
+				buf += len;
+				break;
+			}
+
+			return (0);
+
+		case 'A':
+		case 'a':
+			for (i = 0; i < asizeof(tptr->weekday); i++) {
+				len = strlen(tptr->weekday[i]);
+				if (strncasecmp(buf, tptr->weekday[i], len) ==
+				    0)
+					break;
+				len = strlen(tptr->wday[i]);
+				if (strncasecmp(buf, tptr->wday[i], len) == 0)
+					break;
+			}
+			if (i == asizeof(tptr->weekday))
+				return (0);
+
+			tm->tm_wday = i;
+			buf += len;
+			break;
+
+		case 'U':
+		case 'W':
+			/*
+			 * XXX This is bogus, as we can not assume any valid
+			 * information present in the tm structure at this
+			 * point to calculate a real value, so just check the
+			 * range for now.
+			 */
+			if (!isdigit((unsigned char)*buf))
+				return (0);
+
+			len = 2;
+			for (i = 0;
+			    len && isdigit((unsigned char)*buf);
+			    buf++) {
+				i *= 10;
+				i += *buf - '0';
+				len--;
+			}
+			if (i > 53)
+				return (0);
+
+			if (*buf != 0 && isspace((unsigned char)*buf))
+				while (*ptr != 0 &&
+				    !isspace((unsigned char)*ptr))
+					ptr++;
+			break;
+
+		case 'w':
+			if (!isdigit((unsigned char)*buf))
+				return (0);
+
+			i = *buf - '0';
+			if (i > 6)
+				return (0);
+
+			tm->tm_wday = i;
+
+			if (*buf != 0 && isspace((unsigned char)*buf))
+				while (*ptr != 0 &&
+				    !isspace((unsigned char)*ptr))
+					ptr++;
+			break;
+
+		case 'd':
+		case 'e':
+			/*
+			 * The %e specifier is explicitly documented as not
+			 * being zero-padded but there is no harm in allowing
+			 * such padding.
+			 *
+			 * XXX The %e specifier may gobble one too many
+			 * digits if used incorrectly.
+			 */
+			if (!isdigit((unsigned char)*buf))
+				return (0);
+
+			len = 2;
+			for (i = 0;
+			    len && isdigit((unsigned char)*buf);
+			    buf++) {
+				i *= 10;
+				i += *buf - '0';
+				len--;
+			}
+			if (i > 31)
+				return (0);
+
+			tm->tm_mday = i;
+
+			if (*buf != 0 && isspace((unsigned char)*buf))
+				while (*ptr != 0 &&
+				    !isspace((unsigned char)*ptr))
+					ptr++;
+			break;
+
+		case 'B':
+		case 'b':
+		case 'h':
+			for (i = 0; i < asizeof(tptr->month); i++) {
+				len = strlen(tptr->month[i]);
+				if (strncasecmp(buf, tptr->month[i], len) == 0)
+					break;
+			}
+			/*
+			 * Try the abbreviated month name if the full name
+			 * wasn't found.
+			 */
+			if (i == asizeof(tptr->month)) {
+				for (i = 0; i < asizeof(tptr->month); i++) {
+					len = strlen(tptr->mon[i]);
+					if (strncasecmp(buf, tptr->mon[i],
+					    len) == 0)
+						break;
+				}
+			}
+			if (i == asizeof(tptr->month))
+				return (0);
+
+			tm->tm_mon = i;
+			buf += len;
+			break;
+
+		case 'm':
+			if (!isdigit((unsigned char)*buf))
+				return (0);
+
+			len = 2;
+			for (i = 0;
+			    len && isdigit((unsigned char)*buf);
+			    buf++) {
+				i *= 10;
+				i += *buf - '0';
+				len--;
+			}
+			if (i < 1 || i > 12)
+				return (0);
+
+			tm->tm_mon = i - 1;
+
+			if (*buf != 0 && isspace((unsigned char)*buf))
+				while (*ptr != 0 &&
+				    !isspace((unsigned char)*ptr))
+					ptr++;
+			break;
+
+		case 'Y':
+		case 'y':
+			if (*buf == 0 || isspace((unsigned char)*buf))
+				break;
+
+			if (!isdigit((unsigned char)*buf))
+				return (0);
+
+			len = (c == 'Y') ? 4 : 2;
+			for (i = 0;
+			    len && isdigit((unsigned char)*buf);
+			    buf++) {
+				i *= 10;
+				i += *buf - '0';
+				len--;
+			}
+			if (c == 'Y')
+				i -= 1900;
+			if (c == 'y' && i < 69)
+				i += 100;
+			if (i < 0)
+				return (0);
+
+			tm->tm_year = i;
+
+			if (*buf != 0 && isspace((unsigned char)*buf))
+				while (*ptr != 0 &&
+				    !isspace((unsigned char)*ptr))
+					ptr++;
+			break;
+
+		case 'Z':
+			{
+			const char *cp = buf;
+			char *zonestr;
+
+			while (isupper((unsigned char)*cp))
+				++cp;
+			if (cp - buf) {
+				zonestr = alloca(cp - buf + 1);
+				(void) strncpy(zonestr, buf, cp - buf);
+				zonestr[cp - buf] = '\0';
+				tzset();
+				/*
+				 * Once upon a time this supported "GMT",
+				 * for GMT, but we removed this as Solaris
+				 * doesn't have it, and we lack the needed
+				 * timegm function.
+				 */
+				if (0 == strcmp(zonestr, tzname[0])) {
+					tm->tm_isdst = 0;
+				} else if (0 == strcmp(zonestr, tzname[1])) {
+					tm->tm_isdst = 1;
+				} else {
+					return (0);
+				}
+				buf += cp - buf;
+			}
+			}
+			break;
+
+		/*
+		 * Note that there used to be support %z and %s, but these
+		 * are not supported by Solaris, so we have removed them.
+		 * They would have required timegm() which is missing.
+		 */
+		}
+	}
+	return ((char *)buf);
+}
+
+char *
+strptime(const char *buf, const char *fmt, struct tm *tm)
+{
+	/* Legacy Solaris strptime clears the incoming tm structure. */
+	(void) memset(tm, 0, sizeof (*tm));
+
+	return (__strptime(buf, fmt, tm));
+}
+
+/*
+ * This is used by Solaris, and is a variant that does not clear the
+ * incoming tm.  It is triggered by -D_STRPTIME_DONTZERO.
+ */
+char *
+__strptime_dontzero(const char *buf, const char *fmt, struct tm *tm)
+{
+	return (__strptime(buf, fmt, tm));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/strxfrm.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
+ *		at Electronni Visti IA, Kiev, Ukraine.
+ *			All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include "collate.h"
+
+size_t
+strxfrm(char *_RESTRICT_KYWD dest, const char *_RESTRICT_KYWD src, size_t len)
+{
+	int prim, sec, l;
+	size_t slen;
+	char *s, *ss;
+
+	if (!*src) {
+		if (len > 0)
+			*dest = '\0';
+		return (0);
+	}
+
+	if (__collate_load_error)
+		return (strlcpy(dest, src, len));
+
+	slen = 0;
+	prim = sec = 0;
+	ss = s = __collate_substitute(src);
+	if (s == NULL) {
+		/* Best effort, caller must check errno per spec. */
+		errno = ENOMEM;
+		return (strlcpy(dest, src, len));
+	}
+	while (*s) {
+		while (*s && !prim) {
+			__collate_lookup(s, &l, &prim, &sec);
+			s += l;
+		}
+		if (prim) {
+			if (len > 1) {
+				*dest++ = (char)prim;
+				len--;
+			}
+			slen++;
+			prim = 0;
+		}
+	}
+	free(ss);
+	if (len > 0)
+		*dest = '\0';
+
+	return (slen);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/table.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,279 @@
+/*
+ * Copyright (c) 1993
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <ctype.h>
+#include <wchar.h>
+#include "runetype.h"
+#include "mblocal.h"
+#include "_ctype.h"
+
+_RuneLocale _DefaultRuneLocale = {
+	_RUNE_MAGIC_1,
+	"NONE",
+	{
+		/* 00 */
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		/* 08 */
+		_CTYPE_C,
+		_CTYPE_C|_CTYPE_S|_CTYPE_B,
+		_CTYPE_C|_CTYPE_S,
+		_CTYPE_C|_CTYPE_S,
+		_CTYPE_C|_CTYPE_S,
+		_CTYPE_C|_CTYPE_S,
+		_CTYPE_C,
+		_CTYPE_C,
+		/* 10 */
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		/* 18 */
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		_CTYPE_C,
+		/* 20 */
+		_CTYPE_S|_CTYPE_B|_CTYPE_R,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		/* 28 */
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		/* 30 */
+		_CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X,
+		_CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X,
+		_CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X,
+		_CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X,
+		_CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X,
+		_CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X,
+		_CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X,
+		_CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X,
+		/* 38 */
+		_CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X,
+		_CTYPE_D|_CTYPE_R|_CTYPE_G|_CTYPE_X,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		/* 40 */
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		/* 48 */
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		/* 50 */
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		/* 58 */
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_U|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		/* 60 */
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_X|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		/* 68 */
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		/* 70 */
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		/* 78 */
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_L|_CTYPE_R|_CTYPE_G|_CTYPE_A,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_P|_CTYPE_R|_CTYPE_G,
+		_CTYPE_C,
+	},
+
+	/* BEGIN CSTYLED */
+	{
+	0x00,	0x01,	0x02,	0x03,	0x04,	0x05,	0x06,	0x07,
+     	0x08,	0x09,	0x0a,	0x0b,	0x0c,	0x0d,	0x0e,	0x0f,
+	0x10,	0x11,	0x12,	0x13,	0x14,	0x15,	0x16,	0x17,
+     	0x18,	0x19,	0x1a,	0x1b,	0x1c,	0x1d,	0x1e,	0x1f,
+	0x20,	0x21,	0x22,	0x23,	0x24,	0x25,	0x26,	0x27,
+     	0x28,	0x29,	0x2a,	0x2b,	0x2c,	0x2d,	0x2e,	0x2f,
+	0x30,	0x31,	0x32,	0x33,	0x34,	0x35,	0x36,	0x37,
+     	0x38,	0x39,	0x3a,	0x3b,	0x3c,	0x3d,	0x3e,	0x3f,
+	0x40,	'a',	'b',	'c',	'd',	'e',	'f',	'g',
+     	'h',	'i',	'j',	'k',	'l',	'm',	'n',	'o',
+	'p',	'q',	'r',	's',	't',	'u',	'v',	'w',
+     	'x',	'y',	'z',	0x5b,	0x5c,	0x5d,	0x5e,	0x5f,
+	0x60,	'a',	'b',	'c',	'd',	'e',	'f',	'g',
+     	'h',	'i',	'j',	'k',	'l',	'm',	'n',	'o',
+	'p',	'q',	'r',	's',	't',	'u',	'v',	'w',
+     	'x',	'y',	'z',	0x7b,	0x7c,	0x7d,	0x7e,	0x7f,
+	0x80,	0x81,	0x82,	0x83,	0x84,	0x85,	0x86,	0x87,
+     	0x88,	0x89,	0x8a,	0x8b,	0x8c,	0x8d,	0x8e,	0x8f,
+	0x90,	0x91,	0x92,	0x93,	0x94,	0x95,	0x96,	0x97,
+     	0x98,	0x99,	0x9a,	0x9b,	0x9c,	0x9d,	0x9e,	0x9f,
+	0xa0,	0xa1,	0xa2,	0xa3,	0xa4,	0xa5,	0xa6,	0xa7,
+     	0xa8,	0xa9,	0xaa,	0xab,	0xac,	0xad,	0xae,	0xaf,
+	0xb0,	0xb1,	0xb2,	0xb3,	0xb4,	0xb5,	0xb6,	0xb7,
+     	0xb8,	0xb9,	0xba,	0xbb,	0xbc,	0xbd,	0xbe,	0xbf,
+	0xc0,	0xc1,	0xc2,	0xc3,	0xc4,	0xc5,	0xc6,	0xc7,
+     	0xc8,	0xc9,	0xca,	0xcb,	0xcc,	0xcd,	0xce,	0xcf,
+	0xd0,	0xd1,	0xd2,	0xd3,	0xd4,	0xd5,	0xd6,	0xd7,
+     	0xd8,	0xd9,	0xda,	0xdb,	0xdc,	0xdd,	0xde,	0xdf,
+	0xe0,	0xe1,	0xe2,	0xe3,	0xe4,	0xe5,	0xe6,	0xe7,
+     	0xe8,	0xe9,	0xea,	0xeb,	0xec,	0xed,	0xee,	0xef,
+	0xf0,	0xf1,	0xf2,	0xf3,	0xf4,	0xf5,	0xf6,	0xf7,
+     	0xf8,	0xf9,	0xfa,	0xfb,	0xfc,	0xfd,	0xfe,	0xff,
+	},
+	{
+	0x00,	0x01,	0x02,	0x03,	0x04,	0x05,	0x06,	0x07,
+     	0x08,	0x09,	0x0a,	0x0b,	0x0c,	0x0d,	0x0e,	0x0f,
+	0x10,	0x11,	0x12,	0x13,	0x14,	0x15,	0x16,	0x17,
+     	0x18,	0x19,	0x1a,	0x1b,	0x1c,	0x1d,	0x1e,	0x1f,
+	0x20,	0x21,	0x22,	0x23,	0x24,	0x25,	0x26,	0x27,
+     	0x28,	0x29,	0x2a,	0x2b,	0x2c,	0x2d,	0x2e,	0x2f,
+	0x30,	0x31,	0x32,	0x33,	0x34,	0x35,	0x36,	0x37,
+     	0x38,	0x39,	0x3a,	0x3b,	0x3c,	0x3d,	0x3e,	0x3f,
+	0x40,	'A',	'B',	'C',	'D',	'E',	'F',	'G',
+     	'H',	'I',	'J',	'K',	'L',	'M',	'N',	'O',
+	'P',	'Q',	'R',	'S',	'T',	'U',	'V',	'W',
+     	'X',	'Y',	'Z',	0x5b,	0x5c,	0x5d,	0x5e,	0x5f,
+	0x60,	'A',	'B',	'C',	'D',	'E',	'F',	'G',
+     	'H',	'I',	'J',	'K',	'L',	'M',	'N',	'O',
+	'P',	'Q',	'R',	'S',	'T',	'U',	'V',	'W',
+     	'X',	'Y',	'Z',	0x7b,	0x7c,	0x7d,	0x7e,	0x7f,
+	0x80,	0x81,	0x82,	0x83,	0x84,	0x85,	0x86,	0x87,
+     	0x88,	0x89,	0x8a,	0x8b,	0x8c,	0x8d,	0x8e,	0x8f,
+	0x90,	0x91,	0x92,	0x93,	0x94,	0x95,	0x96,	0x97,
+     	0x98,	0x99,	0x9a,	0x9b,	0x9c,	0x9d,	0x9e,	0x9f,
+	0xa0,	0xa1,	0xa2,	0xa3,	0xa4,	0xa5,	0xa6,	0xa7,
+     	0xa8,	0xa9,	0xaa,	0xab,	0xac,	0xad,	0xae,	0xaf,
+	0xb0,	0xb1,	0xb2,	0xb3,	0xb4,	0xb5,	0xb6,	0xb7,
+     	0xb8,	0xb9,	0xba,	0xbb,	0xbc,	0xbd,	0xbe,	0xbf,
+	0xc0,	0xc1,	0xc2,	0xc3,	0xc4,	0xc5,	0xc6,	0xc7,
+     	0xc8,	0xc9,	0xca,	0xcb,	0xcc,	0xcd,	0xce,	0xcf,
+	0xd0,	0xd1,	0xd2,	0xd3,	0xd4,	0xd5,	0xd6,	0xd7,
+     	0xd8,	0xd9,	0xda,	0xdb,	0xdc,	0xdd,	0xde,	0xdf,
+	0xe0,	0xe1,	0xe2,	0xe3,	0xe4,	0xe5,	0xe6,	0xe7,
+     	0xe8,	0xe9,	0xea,	0xeb,	0xec,	0xed,	0xee,	0xef,
+	0xf0,	0xf1,	0xf2,	0xf3,	0xf4,	0xf5,	0xf6,	0xf7,
+     	0xf8,	0xf9,	0xfa,	0xfb,	0xfc,	0xfd,	0xfe,	0xff,
+	},
+	/* END CSTYLED */
+};
+
+_RuneLocale *_CurrentRuneLocale = &_DefaultRuneLocale;
+
+/* Taken from former _ctype.c */
+unsigned int *__ctype_mask = _DefaultRuneLocale.__runetype;
+
+int *__trans_lower = _DefaultRuneLocale.__maplower;
+int *__trans_upper = _DefaultRuneLocale.__mapupper;
+
+/*
+ * Used in various string routines to conditionalize versions optimized for
+ * the ASCII case
+ */
+int charset_is_ascii = 1;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/timelocal.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,104 @@
+/*
+ * Copyright (c) 2001 Alexey Zelkin <phantom@FreeBSD.org>
+ * Copyright (c) 1997 FreeBSD Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <stddef.h>
+#include "ldpart.h"
+#include "timelocal.h"
+
+static struct lc_time_T _time_locale;
+static int _time_using_locale;
+static char *time_locale_buf;
+
+#define	LCTIME_SIZE (sizeof (struct lc_time_T) / sizeof (char *))
+
+static const struct lc_time_T	_C_time_locale = {
+	{
+		"Jan", "Feb", "Mar", "Apr", "May", "Jun",
+		"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
+	}, {
+		"January", "February", "March", "April", "May", "June",
+		"July", "August", "September", "October", "November", "December"
+	}, {
+		"Sun", "Mon", "Tue", "Wed",
+		"Thu", "Fri", "Sat"
+	}, {
+		"Sunday", "Monday", "Tuesday", "Wednesday",
+		"Thursday", "Friday", "Saturday"
+	},
+
+	/* X_fmt */
+	"%H:%M:%S",
+
+	/*
+	 * x_fmt
+	 * Since the C language standard calls for
+	 * "date, using locale's date format," anything goes.
+	 * Using just numbers (as here) makes Quakers happier;
+	 * it's also compatible with SVR4.
+	 */
+	"%m/%d/%y",
+
+	/*
+	 * c_fmt
+	 */
+	"%a %b %e %H:%M:%S %Y",
+
+	/* am */
+	"AM",
+
+	/* pm */
+	"PM",
+
+	/* date_fmt */
+	"%a %b %e %H:%M:%S %Z %Y",
+
+	/*
+	 * ampm_fmt - To determine 12-hour clock format time (empty, if N/A)
+	 */
+	"%I:%M:%S %p"
+};
+
+struct lc_time_T *
+__get_current_time_locale(void)
+{
+	return (_time_using_locale ? &_time_locale :
+	    (struct lc_time_T *)&_C_time_locale);
+}
+
+int
+__time_load_locale(const char *name)
+{
+	return (__part_load_locale(name, &_time_using_locale,
+	    &time_locale_buf, "LC_TIME", LCTIME_SIZE, LCTIME_SIZE,
+	    (const char **)&_time_locale));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/timelocal.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,56 @@
+/*
+ * Copyright (c) 1997-2002 FreeBSD Project.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _TIMELOCAL_H_
+#define	_TIMELOCAL_H_
+
+/*
+ * Private header file for the strftime and strptime localization
+ * stuff.
+ */
+struct lc_time_T {
+	const char	*mon[12];
+	const char	*month[12];
+	const char	*wday[7];
+	const char	*weekday[7];
+	const char	*X_fmt;
+	const char	*x_fmt;
+	const char	*c_fmt;
+	const char	*am;
+	const char	*pm;
+	const char	*date_fmt;
+	const char	*ampm_fmt;
+};
+
+struct lc_time_T *__get_current_time_locale(void);
+int	__time_load_locale(const char *);
+
+#endif /* !_TIMELOCAL_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/tolower.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,42 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+#include "lint.h"
+#include <ctype.h>
+
+#pragma weak _tolower = tolower
+#pragma weak _toupper = toupper
+
+int
+tolower(int c)
+{
+	return (((unsigned)c > 255) ? c : __trans_lower[c]);
+}
+
+int
+toupper(int c)
+{
+	return (((unsigned)c > 255) ? c : __trans_upper[c]);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/towlower.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <wctype.h>
+#include <stdio.h>
+#include "runetype.h"
+
+static wint_t
+__change_case_ext(wint_t c, int lower)
+{
+	size_t lim;
+	_RuneRange *rr;
+	_RuneEntry *base, *re;
+
+	if (c < 0 || c == EOF)
+		return (c);
+
+	rr = lower ?
+	    &_CurrentRuneLocale->__maplower_ext :
+	    &_CurrentRuneLocale->__mapupper_ext;
+	/* Binary search -- see bsearch.c for explanation. */
+	base = rr->__ranges;
+	for (lim = rr->__nranges; lim != 0; lim >>= 1) {
+		re = base + (lim >> 1);
+		if (re->__min <= c && c <= re->__max) {
+			return (re->__map + c - re->__min);
+		} else if (c > re->__max) {
+			base = re + 1;
+			lim--;
+		}
+	}
+
+	return (c);
+}
+
+#undef towlower
+wint_t
+towlower(wint_t wc)
+{
+	return ((wc < 0 || wc >= _CACHED_RUNES) ?
+	    __change_case_ext(wc, 1) :
+	    _CurrentRuneLocale->__maplower[wc]);
+}
+
+#undef towupper
+wint_t
+towupper(wint_t wc)
+{
+	return ((wc < 0 || wc >= _CACHED_RUNES) ?
+	    __change_case_ext(wc, 0) :
+	    _CurrentRuneLocale->__mapupper[wc]);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/ungetwc.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,113 @@
+/*
+ * CDDL HEADER START
+ *
+ * The contents of this file are subject to the terms of the
+ * Common Development and Distribution License, Version 1.0 only
+ * (the "License").  You may not use this file except in compliance
+ * with the License.
+ *
+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+ * or http://www.opensolaris.org/os/licensing.
+ * See the License for the specific language governing permissions
+ * and limitations under the License.
+ *
+ * When distributing Covered Code, include this CDDL HEADER in each
+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+ * If applicable, add the following below this CDDL HEADER, with the
+ * fields enclosed by brackets "[]" replaced with your own identifying
+ * information: Portions Copyright [yyyy] [name of copyright owner]
+ *
+ * CDDL HEADER END
+ */
+/*
+ * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*	Copyright (c) 1986 AT&T	*/
+/*	  All Rights Reserved  	*/
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/*	This module is created for NLS on Sep.03.86		*/
+
+/*
+ * Ungetwc saves the process code c into the one character buffer
+ * associated with an input stream "iop". That character, c,
+ * will be returned by the next getwc call on that stream.
+ */
+
+#include "lint.h"
+#include "file64.h"
+#include "mse_int.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <widec.h>
+#include <limits.h>
+#include <errno.h>
+#include "libc.h"
+#include "stdiom.h"
+#include "mse.h"
+
+static wint_t
+__ungetwc_impl(wint_t wc, FILE *iop, int orient)
+{
+	char		mbs[MB_LEN_MAX];
+	unsigned char	*p;
+	int		n;
+	rmutex_t	*lk;
+
+	FLOCKFILE(lk, iop);
+
+	if (orient && GET_NO_MODE(iop)) {
+		_setorientation(iop, _WC_MODE);
+	}
+	if ((wc == WEOF) || ((iop->_flag & _IOREAD) == 0)) {
+		FUNLOCKFILE(lk);
+		return (WEOF);
+	}
+
+	n = wctomb(mbs, (wchar_t)wc);
+	if (n <= 0) {
+		FUNLOCKFILE(lk);
+		return (WEOF);
+	}
+
+	if (iop->_ptr <= iop->_base) {
+		if (iop->_base == NULL) {
+			FUNLOCKFILE(lk);
+			return (WEOF);
+		}
+		if (iop->_ptr == iop->_base && iop->_cnt == 0) {
+			++iop->_ptr;
+		} else if ((iop->_ptr - n) < (iop->_base - PUSHBACK)) {
+			FUNLOCKFILE(lk);
+			return (WEOF);
+		}
+	}
+
+	p = (unsigned char *)(mbs + n - 1);
+	while (n--) {
+		*--(iop)->_ptr = (*p--);
+		++(iop)->_cnt;
+	}
+	iop->_flag &= ~_IOEOF;
+	FUNLOCKFILE(lk);
+	return (wc);
+}
+
+
+wint_t
+__ungetwc_xpg5(wint_t wc, FILE *iop)
+{
+	return (__ungetwc_impl(wc, iop, 1));
+}
+
+wint_t
+ungetwc(wint_t wc, FILE *iop)
+{
+	return (__ungetwc_impl(wc, iop, 0));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/utf8.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,443 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <errno.h>
+#include <limits.h>
+#include "runetype.h"
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+static size_t	_UTF8_mbrtowc(wchar_t *_RESTRICT_KYWD,
+		    const char *_RESTRICT_KYWD,
+		    size_t, mbstate_t *_RESTRICT_KYWD);
+static int	_UTF8_mbsinit(const mbstate_t *);
+static size_t	_UTF8_mbsnrtowcs(wchar_t *_RESTRICT_KYWD,
+		    const char **_RESTRICT_KYWD, size_t, size_t,
+		    mbstate_t *_RESTRICT_KYWD);
+static size_t	_UTF8_wcrtomb(char *_RESTRICT_KYWD, wchar_t,
+		    mbstate_t *_RESTRICT_KYWD);
+static size_t	_UTF8_wcsnrtombs(char *_RESTRICT_KYWD,
+		    const wchar_t **_RESTRICT_KYWD,
+		    size_t, size_t, mbstate_t *_RESTRICT_KYWD);
+
+typedef struct {
+	wchar_t	ch;
+	int	want;
+	wchar_t	lbound;
+} _UTF8State;
+
+int
+_UTF8_init(_RuneLocale *rl)
+{
+	__mbrtowc = _UTF8_mbrtowc;
+	__wcrtomb = _UTF8_wcrtomb;
+	__mbsinit = _UTF8_mbsinit;
+	__mbsnrtowcs = _UTF8_mbsnrtowcs;
+	__wcsnrtombs = _UTF8_wcsnrtombs;
+	_CurrentRuneLocale = rl;
+
+	charset_is_ascii = 0;
+
+	/*
+	 * In theory up to 6 bytes can be used for the encoding,
+	 * but only encodings with more than 4 bytes are illegal.
+	 */
+	__ctype[520] = 4;
+	/*
+	 * Note that the other CSWIDTH members are nonsensical for this
+	 * this coding.  They only are valid with EUC codings.
+	 */
+
+	return (0);
+}
+
+static int
+_UTF8_mbsinit(const mbstate_t *ps)
+{
+
+	return (ps == NULL || ((const _UTF8State *)ps)->want == 0);
+}
+
+static size_t
+_UTF8_mbrtowc(wchar_t *_RESTRICT_KYWD pwc, const char *_RESTRICT_KYWD s,
+    size_t n, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_UTF8State *us;
+	int ch, i, mask, want;
+	wchar_t lbound, wch;
+
+	us = (_UTF8State *)ps;
+
+	if (us->want < 0 || us->want > 6) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL) {
+		s = "";
+		n = 1;
+		pwc = NULL;
+	}
+
+	if (n == 0)
+		/* Incomplete multibyte sequence */
+		return ((size_t)-2);
+
+	if (us->want == 0 && ((ch = (unsigned char)*s) & ~0x7f) == 0) {
+		/* Fast path for plain ASCII characters. */
+		if (pwc != NULL)
+			*pwc = ch;
+		return (ch != '\0' ? 1 : 0);
+	}
+
+	if (us->want == 0) {
+		/*
+		 * Determine the number of octets that make up this character
+		 * from the first octet, and a mask that extracts the
+		 * interesting bits of the first octet. We already know
+		 * the character is at least two bytes long.
+		 *
+		 * We also specify a lower bound for the character code to
+		 * detect redundant, non-"shortest form" encodings. For
+		 * example, the sequence C0 80 is _not_ a legal representation
+		 * of the null character. This enforces a 1-to-1 mapping
+		 * between character codes and their multibyte representations.
+		 */
+		ch = (unsigned char)*s;
+		if ((ch & 0x80) == 0) {
+			mask = 0x7f;
+			want = 1;
+			lbound = 0;
+		} else if ((ch & 0xe0) == 0xc0) {
+			mask = 0x1f;
+			want = 2;
+			lbound = 0x80;
+		} else if ((ch & 0xf0) == 0xe0) {
+			mask = 0x0f;
+			want = 3;
+			lbound = 0x800;
+		} else if ((ch & 0xf8) == 0xf0) {
+			mask = 0x07;
+			want = 4;
+			lbound = 0x10000;
+#if 0
+		/* These would be illegal in the UTF-8 space */
+
+		} else if ((ch & 0xfc) == 0xf8) {
+			mask = 0x03;
+			want = 5;
+			lbound = 0x200000;
+		} else if ((ch & 0xfe) == 0xfc) {
+			mask = 0x01;
+			want = 6;
+			lbound = 0x4000000;
+#endif
+		} else {
+			/*
+			 * Malformed input; input is not UTF-8.
+			 */
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+	} else {
+		want = us->want;
+		lbound = us->lbound;
+	}
+
+	/*
+	 * Decode the octet sequence representing the character in chunks
+	 * of 6 bits, most significant first.
+	 */
+	if (us->want == 0)
+		wch = (unsigned char)*s++ & mask;
+	else
+		wch = us->ch;
+
+	for (i = (us->want == 0) ? 1 : 0; i < MIN(want, n); i++) {
+		if ((*s & 0xc0) != 0x80) {
+			/*
+			 * Malformed input; bad characters in the middle
+			 * of a character.
+			 */
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		wch <<= 6;
+		wch |= *s++ & 0x3f;
+	}
+	if (i < want) {
+		/* Incomplete multibyte sequence. */
+		us->want = want - i;
+		us->lbound = lbound;
+		us->ch = wch;
+		return ((size_t)-2);
+	}
+	if (wch < lbound) {
+		/*
+		 * Malformed input; redundant encoding.
+		 */
+		errno = EILSEQ;
+		return ((size_t)-1);
+	}
+	if (pwc != NULL)
+		*pwc = wch;
+	us->want = 0;
+	return (wch == L'\0' ? 0 : want);
+}
+
+static size_t
+_UTF8_mbsnrtowcs(wchar_t *_RESTRICT_KYWD dst, const char **_RESTRICT_KYWD src,
+    size_t nms, size_t len, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_UTF8State *us;
+	const char *s;
+	size_t nchr;
+	wchar_t wc;
+	size_t nb;
+
+	us = (_UTF8State *)ps;
+
+	s = *src;
+	nchr = 0;
+
+	if (dst == NULL) {
+		/*
+		 * The fast path in the loop below is not safe if an ASCII
+		 * character appears as anything but the first byte of a
+		 * multibyte sequence. Check now to avoid doing it in the loop.
+		 */
+		if (nms > 0 && us->want > 0 && (signed char)*s > 0) {
+			errno = EILSEQ;
+			return ((size_t)-1);
+		}
+		for (;;) {
+			if (nms > 0 && (signed char)*s > 0)
+				/*
+				 * Fast path for plain ASCII characters
+				 * excluding NUL.
+				 */
+				nb = 1;
+			else if ((nb = _UTF8_mbrtowc(&wc, s, nms, ps)) ==
+			    (size_t)-1)
+				/* Invalid sequence - mbrtowc() sets errno. */
+				return ((size_t)-1);
+			else if (nb == 0 || nb == (size_t)-2)
+				return (nchr);
+			s += nb;
+			nms -= nb;
+			nchr++;
+		}
+		/*NOTREACHED*/
+	}
+
+	/*
+	 * The fast path in the loop below is not safe if an ASCII
+	 * character appears as anything but the first byte of a
+	 * multibyte sequence. Check now to avoid doing it in the loop.
+	 */
+	if (nms > 0 && len > 0 && us->want > 0 && (signed char)*s > 0) {
+		errno = EILSEQ;
+		return ((size_t)-1);
+	}
+	while (len-- > 0) {
+		if (nms > 0 && (signed char)*s > 0) {
+			/*
+			 * Fast path for plain ASCII characters
+			 * excluding NUL.
+			 */
+			*dst = (wchar_t)*s;
+			nb = 1;
+		} else if ((nb = _UTF8_mbrtowc(dst, s, nms, ps)) ==
+		    (size_t)-1) {
+			*src = s;
+			return ((size_t)-1);
+		} else if (nb == (size_t)-2) {
+			*src = s + nms;
+			return (nchr);
+		} else if (nb == 0) {
+			*src = NULL;
+			return (nchr);
+		}
+		s += nb;
+		nms -= nb;
+		nchr++;
+		dst++;
+	}
+	*src = s;
+	return (nchr);
+}
+
+static size_t
+_UTF8_wcrtomb(char *_RESTRICT_KYWD s, wchar_t wc, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_UTF8State *us;
+	unsigned char lead;
+	int i, len;
+
+	us = (_UTF8State *)ps;
+
+	if (us->want != 0) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	if (s == NULL)
+		/* Reset to initial shift state (no-op) */
+		return (1);
+
+	if ((wc & ~0x7f) == 0) {
+		/* Fast path for plain ASCII characters. */
+		*s = (char)wc;
+		return (1);
+	}
+
+	/*
+	 * Determine the number of octets needed to represent this character.
+	 * We always output the shortest sequence possible. Also specify the
+	 * first few bits of the first octet, which contains the information
+	 * about the sequence length.
+	 */
+	if ((wc & ~0x7f) == 0) {
+		lead = 0;
+		len = 1;
+	} else if ((wc & ~0x7ff) == 0) {
+		lead = 0xc0;
+		len = 2;
+	} else if ((wc & ~0xffff) == 0) {
+		lead = 0xe0;
+		len = 3;
+	} else if ((wc & ~0x1fffff) == 0) {
+		lead = 0xf0;
+		len = 4;
+#if 0
+	/* Again, 5 and 6 byte encodings are simply not permitted */
+	} else if ((wc & ~0x3ffffff) == 0) {
+		lead = 0xf8;
+		len = 5;
+	} else if ((wc & ~0x7fffffff) == 0) {
+		lead = 0xfc;
+		len = 6;
+#endif
+	} else {
+		errno = EILSEQ;
+		return ((size_t)-1);
+	}
+
+	/*
+	 * Output the octets representing the character in chunks
+	 * of 6 bits, least significant last. The first octet is
+	 * a special case because it contains the sequence length
+	 * information.
+	 */
+	for (i = len - 1; i > 0; i--) {
+		s[i] = (wc & 0x3f) | 0x80;
+		wc >>= 6;
+	}
+	*s = (wc & 0xff) | lead;
+
+	return (len);
+}
+
+static size_t
+_UTF8_wcsnrtombs(char *_RESTRICT_KYWD dst, const wchar_t **_RESTRICT_KYWD src,
+    size_t nwc, size_t len, mbstate_t *_RESTRICT_KYWD ps)
+{
+	_UTF8State *us;
+	char buf[MB_LEN_MAX];
+	const wchar_t *s;
+	size_t nbytes;
+	size_t nb;
+
+	us = (_UTF8State *)ps;
+
+	if (us->want != 0) {
+		errno = EINVAL;
+		return ((size_t)-1);
+	}
+
+	s = *src;
+	nbytes = 0;
+
+	if (dst == NULL) {
+		while (nwc-- > 0) {
+			if (0 <= *s && *s < 0x80)
+				/* Fast path for plain ASCII characters. */
+				nb = 1;
+			else if ((nb = _UTF8_wcrtomb(buf, *s, ps)) ==
+			    (size_t)-1)
+				/* Invalid character - wcrtomb() sets errno. */
+				return ((size_t)-1);
+			if (*s == L'\0')
+				return (nbytes + nb - 1);
+			s++;
+			nbytes += nb;
+		}
+		return (nbytes);
+	}
+
+	while (len > 0 && nwc-- > 0) {
+		if (0 <= *s && *s < 0x80) {
+			/* Fast path for plain ASCII characters. */
+			nb = 1;
+			*dst = *s;
+		} else if (len > (size_t)MB_CUR_MAX) {
+			/* Enough space to translate in-place. */
+			if ((nb = _UTF8_wcrtomb(dst, *s, ps)) == (size_t)-1) {
+				*src = s;
+				return ((size_t)-1);
+			}
+		} else {
+			/*
+			 * May not be enough space; use temp. buffer.
+			 */
+			if ((nb = _UTF8_wcrtomb(buf, *s, ps)) == (size_t)-1) {
+				*src = s;
+				return ((size_t)-1);
+			}
+			if (nb > (int)len)
+				/* MB sequence for character won't fit. */
+				break;
+			(void) memcpy(dst, buf, nb);
+		}
+		if (*s == L'\0') {
+			*src = NULL;
+			return (nbytes + nb - 1);
+		}
+		s++;
+		dst += nb;
+		len -= nb;
+		nbytes += nb;
+	}
+	*src = s;
+	return (nbytes);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/utils.h	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 1992, 1993, 1994 Henry Spencer.
+ * Copyright (c) 1992, 1993, 1994
+ *	The Regents of the University of California.  All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Henry Spencer.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+/* utility definitions */
+#define	DUPMAX		_POSIX2_RE_DUP_MAX	/* xxx is this right? */
+#define	INFINITY	(DUPMAX + 1)
+#define	NC		(CHAR_MAX - CHAR_MIN + 1)
+typedef unsigned char uch;
+
+/* switch off assertions (if not already off) if no REDEBUG */
+#ifndef REDEBUG
+#ifndef NDEBUG
+#define	NDEBUG	/* no assertions please */
+#endif
+#endif
+#include <assert.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wcrtomb.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,44 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <wchar.h>
+#include "mblocal.h"
+
+size_t
+wcrtomb(char *_RESTRICT_KYWD s, wchar_t wc, mbstate_t *_RESTRICT_KYWD ps)
+{
+	static mbstate_t mbs;
+
+	if (ps == NULL)
+		ps = &mbs;
+	return (__wcrtomb(s, wc, ps));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wcscoll.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2002 Tim J. Robbins
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include "collate.h"
+
+static char *__mbsdup(const wchar_t *);
+
+/*
+ * Placeholder implementation of wcscoll(). Attempts to use the single-byte
+ * collation ordering where possible, and falls back on wcscmp() in locales
+ * with extended character sets.
+ */
+int
+wcscoll(const wchar_t *ws1, const wchar_t *ws2)
+{
+	char *mbs1, *mbs2;
+	int diff, sverrno;
+
+	if (__collate_load_error || MB_CUR_MAX > 1)
+		/*
+		 * Locale has no special collating order, could not be
+		 * loaded, or has an extended character set; do a fast binary
+		 * comparison.
+		 */
+		return (wcscmp(ws1, ws2));
+
+	if ((mbs1 = __mbsdup(ws1)) == NULL || (mbs2 = __mbsdup(ws2)) == NULL) {
+		/*
+		 * Out of memory or illegal wide chars; fall back to wcscmp()
+		 * but leave errno indicating the error. Callers that don't
+		 * check for error will get a reasonable but often slightly
+		 * incorrect result.
+		 */
+		sverrno = errno;
+		free(mbs1);
+		errno = sverrno;
+		return (wcscmp(ws1, ws2));
+	}
+
+	diff = strcoll(mbs1, mbs2);
+	sverrno = errno;
+	free(mbs1);
+	free(mbs2);
+	errno = sverrno;
+
+	return (diff);
+}
+
+static char *
+__mbsdup(const wchar_t *ws)
+{
+	static const mbstate_t initial = { 0 };
+	mbstate_t st;
+	const wchar_t *wcp;
+	size_t len;
+	char *mbs;
+
+	wcp = ws;
+	st = initial;
+	if ((len = wcsrtombs(NULL, &wcp, 0, &st)) == (size_t)-1)
+		return (NULL);
+	if ((mbs = malloc(len + 1)) == NULL)
+		return (NULL);
+	st = initial;
+	(void) wcsrtombs(mbs, &ws, len + 1, &st);
+
+	return (mbs);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wcsftime.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,138 @@
+/*
+ * Copyright (c) 2002 Tim J. Robbins
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include "mse_int.h"
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <wchar.h>
+#include <alloca.h>
+
+/*
+ * Convert date and time to a wide-character string.
+ *
+ * This is the wide-character counterpart of strftime(). So that we do not
+ * have to duplicate the code of strftime(), we convert the format string to
+ * multibyte, call strftime(), then convert the result back into wide
+ * characters.
+ *
+ * This technique loses in the presence of stateful multibyte encoding if any
+ * of the conversions in the format string change conversion state. When
+ * stateful encoding is implemented, we will need to reset the state between
+ * format specifications in the format string.
+ *
+ * Note carefully that prior to xpg5, the format was char *, not wchar_t.
+ */
+
+/*
+ * Hmmm this is probably a bit backwards.  As we are converting to single
+ * byte formats, perhaps we should not be doing a redundant conversion.
+ * Something to look at for the future.
+ */
+
+size_t
+__wcsftime_xpg5(wchar_t *wcs, size_t maxsize, const wchar_t *format,
+    const struct tm *timeptr)
+{
+	static const mbstate_t initial = { 0 };
+	mbstate_t mbs;
+	char *dst, *sformat;
+	const char *dstp;
+	const wchar_t *formatp;
+	size_t n, sflen;
+	int sverrno;
+
+	sformat = dst = NULL;
+
+	/*
+	 * Convert the supplied format string to a multibyte representation
+	 * for strftime(), which only handles single-byte characters.
+	 */
+	mbs = initial;
+	formatp = format;
+	sflen = wcsrtombs(NULL, &formatp, 0, &mbs);
+	if (sflen == (size_t)-1)
+		goto error;
+	if ((sformat = malloc(sflen + 1)) == NULL)
+		goto error;
+	mbs = initial;
+	(void) wcsrtombs(sformat, &formatp, sflen + 1, &mbs);
+
+	/*
+	 * Allocate memory for longest multibyte sequence that will fit
+	 * into the caller's buffer and call strftime() to fill it.
+	 * Then, copy and convert the result back into wide characters in
+	 * the caller's buffer.
+	 */
+	if (LONG_MAX / MB_CUR_MAX <= maxsize) {
+		/* maxsize is prepostorously large - avoid int. overflow. */
+		errno = EINVAL;
+		goto error;
+	}
+	if ((dst = malloc(maxsize * MB_CUR_MAX)) == NULL)
+		goto error;
+	if (strftime(dst, maxsize, sformat, timeptr) == 0)
+		goto error;
+	dstp = dst;
+	mbs = initial;
+	n = mbsrtowcs(wcs, &dstp, maxsize, &mbs);
+	if (n == (size_t)-2 || n == (size_t)-1 || dstp != NULL)
+		goto error;
+
+	free(sformat);
+	free(dst);
+	return (n);
+
+error:
+	sverrno = errno;
+	free(sformat);
+	free(dst);
+	errno = sverrno;
+	return (0);
+}
+
+size_t
+wcsftime(wchar_t *wcs, size_t maxsize, const char *format,
+    const struct tm *timeptr)
+{
+	int	len;
+	wchar_t	*wfmt;
+
+	/* Convert the format (mb string) to wide char array */
+	len = strlen(format) + 1;
+	wfmt = alloca(sizeof (wchar_t) * len);
+	if (mbstowcs(wfmt, format, len) == (size_t)-1) {
+		return (0);
+	}
+	return (__wcsftime_xpg5(wcs, maxsize, wfmt, timeptr));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wcsnrtombs.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,114 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+size_t
+wcsnrtombs(char *_RESTRICT_KYWD dst, const wchar_t **_RESTRICT_KYWD src,
+    size_t nwc, size_t len, mbstate_t *_RESTRICT_KYWD ps)
+{
+	static mbstate_t mbs;
+
+	if (ps == NULL)
+		ps = &mbs;
+	return (__wcsnrtombs(dst, src, nwc, len, ps));
+}
+
+size_t
+__wcsnrtombs_std(char *_RESTRICT_KYWD dst, const wchar_t **_RESTRICT_KYWD src,
+    size_t nwc, size_t len, mbstate_t *_RESTRICT_KYWD ps)
+{
+	mbstate_t mbsbak;
+	char buf[MB_LEN_MAX];
+	const wchar_t *s;
+	size_t nbytes;
+	size_t nb;
+
+	s = *src;
+	nbytes = 0;
+
+	if (dst == NULL) {
+		while (nwc-- > 0) {
+			if ((nb = __wcrtomb(buf, *s, ps)) == (size_t)-1)
+				/* Invalid character - wcrtomb() sets errno. */
+				return ((size_t)-1);
+			else if (*s == L'\0')
+				return (nbytes + nb - 1);
+			s++;
+			nbytes += nb;
+		}
+		return (nbytes);
+	}
+
+	while (len > 0 && nwc-- > 0) {
+		if (len > (size_t)MB_CUR_MAX) {
+			/* Enough space to translate in-place. */
+			if ((nb = __wcrtomb(dst, *s, ps)) == (size_t)-1) {
+				*src = s;
+				return ((size_t)-1);
+			}
+		} else {
+			/*
+			 * May not be enough space; use temp. buffer.
+			 *
+			 * We need to save a copy of the conversion state
+			 * here so we can restore it if the multibyte
+			 * character is too long for the buffer.
+			 */
+			mbsbak = *ps;
+			if ((nb = __wcrtomb(buf, *s, ps)) == (size_t)-1) {
+				*src = s;
+				return ((size_t)-1);
+			}
+			if (nb > (int)len) {
+				/* MB sequence for character won't fit. */
+				*ps = mbsbak;
+				break;
+			}
+			(void) memcpy(dst, buf, nb);
+		}
+		if (*s == L'\0') {
+			*src = NULL;
+			return (nbytes + nb - 1);
+		}
+		s++;
+		dst += nb;
+		len -= nb;
+		nbytes += nb;
+	}
+	*src = s;
+	return (nbytes);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wcsrtombs.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+size_t
+wcsrtombs(char *_RESTRICT_KYWD dst, const wchar_t **_RESTRICT_KYWD src,
+    size_t len, mbstate_t *_RESTRICT_KYWD ps)
+{
+	static mbstate_t mbs;
+
+	if (ps == NULL)
+		ps = &mbs;
+	return (__wcsnrtombs(dst, src, ULONG_MAX, len, ps));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wcstombs.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "lint.h"
+#include <limits.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+size_t
+wcstombs(char *_RESTRICT_KYWD s, const wchar_t *_RESTRICT_KYWD pwcs, size_t n)
+{
+	static const mbstate_t initial = { 0 };
+	mbstate_t mbs;
+	const wchar_t *pwcsp;
+
+	mbs = initial;
+	pwcsp = pwcs;
+	return (__wcsnrtombs(s, &pwcsp, ULONG_MAX, n, &mbs));
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wcswidth.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <wchar.h>
+
+int
+wcswidth(const wchar_t *pwcs, size_t n)
+{
+	wchar_t wc;
+	int len, l;
+
+	len = 0;
+	while (n-- > 0 && (wc = *pwcs++) != L'\0') {
+		if ((l = wcwidth(wc)) < 0)
+			return (-1);
+		len += l;
+	}
+	return (len);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wcsxfrm.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,117 @@
+/*
+ * Copyright (c) 1995 Alex Tatmanjants <alex@elvisti.kiev.ua>
+ *		at Electronni Visti IA, Kiev, Ukraine.
+ *			All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include "collate.h"
+
+static char *__mbsdup(const wchar_t *);
+
+/*
+ * Placeholder wcsxfrm() implementation. See wcscoll.c for a description of
+ * the logic used.
+ */
+size_t
+wcsxfrm(wchar_t *_RESTRICT_KYWD dest,
+    const wchar_t *_RESTRICT_KYWD src, size_t len)
+{
+	int prim, sec, l;
+	size_t slen;
+	char *mbsrc, *s, *ss;
+
+	if (*src == L'\0') {
+		if (len != 0)
+			*dest = L'\0';
+		return (0);
+	}
+
+	if (__collate_load_error || MB_CUR_MAX > 1) {
+		slen = wcslen(src);
+		if (len > 0) {
+			if (slen < len)
+				(void) wcscpy(dest, src);
+			else {
+				(void) wcsncpy(dest, src, len - 1);
+				dest[len - 1] = L'\0';
+			}
+		}
+		return (slen);
+	}
+
+	mbsrc = __mbsdup(src);
+	slen = 0;
+	prim = sec = 0;
+	ss = s = __collate_substitute(mbsrc);
+	while (*s != '\0') {
+		while (*s != '\0' && prim == 0) {
+			__collate_lookup(s, &l, &prim, &sec);
+			s += l;
+		}
+		if (prim != 0) {
+			if (len > 1) {
+				*dest++ = (wchar_t)prim;
+				len--;
+			}
+			slen++;
+			prim = 0;
+		}
+	}
+	free(ss);
+	free(mbsrc);
+	if (len != 0)
+		*dest = L'\0';
+
+	return (slen);
+}
+
+static char *
+__mbsdup(const wchar_t *ws)
+{
+	static const mbstate_t initial = { 0 };
+	mbstate_t st;
+	const wchar_t *wcp;
+	size_t len;
+	char *mbs;
+
+	wcp = ws;
+	st = initial;
+	if ((len = wcsrtombs(NULL, &wcp, 0, &st)) == (size_t)-1)
+		return (NULL);
+	if ((mbs = malloc(len + 1)) == NULL)
+		return (NULL);
+	st = initial;
+	(void) wcsrtombs(mbs, &ws, len + 1, &st);
+
+	return (mbs);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wctob.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <limits.h>
+#include <stdio.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+int
+wctob(wint_t c)
+{
+	static const mbstate_t initial = { 0 };
+	mbstate_t mbs = initial;
+	char buf[MB_LEN_MAX];
+
+	if (c == WEOF || __wcrtomb(buf, c, &mbs) != 1)
+		return (EOF);
+	return ((unsigned char)*buf);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wctomb.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2002-2004 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <stdlib.h>
+#include <wchar.h>
+#include "mblocal.h"
+
+int
+wctomb(char *s, wchar_t wchar)
+{
+	static const mbstate_t initial = { 0 };
+	static mbstate_t mbs;
+	size_t rval;
+
+	if (s == NULL) {
+		/* No support for state dependent encodings. */
+		mbs = initial;
+		return (0);
+	}
+	if ((rval = __wcrtomb(s, wchar, &mbs)) == (size_t)-1)
+		return (-1);
+	return ((int)rval);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wctrans.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2002 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <errno.h>
+#include <string.h>
+#include <wctype.h>
+
+enum {
+	_WCT_ERROR	= 0,
+	_WCT_TOLOWER	= 1,
+	_WCT_TOUPPER	= 2
+};
+
+wint_t
+towctrans(wint_t wc, wctrans_t desc)
+{
+
+	switch (desc) {
+	case _WCT_TOLOWER:
+		wc = towlower(wc);
+		break;
+	case _WCT_TOUPPER:
+		wc = towupper(wc);
+		break;
+	case _WCT_ERROR:
+	default:
+		errno = EINVAL;
+		break;
+	}
+
+	return (wc);
+}
+
+wctrans_t
+wctrans(const char *charclass)
+{
+	struct {
+		const char	*name;
+		wctrans_t	 trans;
+	} ccls[] = {
+		{ "tolower",	_WCT_TOLOWER },
+		{ "toupper",	_WCT_TOUPPER },
+		{ NULL,		_WCT_ERROR },		/* Default */
+	};
+	int i;
+
+	i = 0;
+	while (ccls[i].name != NULL && strcmp(ccls[i].name, charclass) != 0)
+		i++;
+
+	if (ccls[i].trans == _WCT_ERROR)
+		errno = EINVAL;
+	return (ccls[i].trans);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wctype.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2002 Tim J. Robbins.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <ctype.h>
+#include <string.h>
+#include <wctype.h>
+#include "_ctype.h"
+
+wctype_t
+wctype(const char *property)
+{
+	static const struct {
+		const char	*name;
+		wctype_t	 mask;
+	} props[] = {
+		{ "alnum",	_CTYPE_A|_CTYPE_D },
+		{ "alpha",	_CTYPE_A },
+		{ "blank",	_CTYPE_B },
+		{ "cntrl",	_CTYPE_C },
+		{ "digit",	_CTYPE_D },
+		{ "graph",	_CTYPE_G },
+		{ "lower",	_CTYPE_L },
+		{ "print",	_CTYPE_R },
+		{ "punct",	_CTYPE_P },
+		{ "space",	_CTYPE_S },
+		{ "upper",	_CTYPE_U },
+		{ "xdigit",	_CTYPE_X },
+		{ "ideogram",	_CTYPE_I },	/* BSD extension */
+		{ "special",	_CTYPE_T },	/* BSD extension */
+		{ "phonogram",	_CTYPE_Q },	/* BSD extension */
+		{ NULL,		0UL },		/* Default */
+	};
+	int i;
+
+	i = 0;
+	while (props[i].name != NULL && strcmp(props[i].name, property) != 0)
+		i++;
+
+	return (props[i].mask);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wcwidth.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 1989, 1993
+ *	The Regents of the University of California.  All rights reserved.
+ * (c) UNIX System Laboratories, Inc.
+ * All or some portions of this file are derived from material licensed
+ * to the University of California by American Telephone and Telegraph
+ * Co. or Unix System Laboratories, Inc. and are reproduced herein with
+ * the permission of UNIX System Laboratories, Inc.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Paul Borman at Krystal Technologies.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 4. Neither the name of the University nor the names of its contributors
+ *    may be used to endorse or promote products derived from this software
+ *    without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#include "lint.h"
+#include <wchar.h>
+#include "_ctype.h"
+#include "runetype.h"
+
+#undef wcwidth
+
+int
+wcwidth(wchar_t wc)
+{
+	unsigned int x;
+
+	if (wc == 0)
+		return (0);
+
+	x = ((wc < 0 || wc >= _CACHED_RUNES) ? ___runetype(wc) :
+	    _CurrentRuneLocale->__runetype[wc]) & (_CTYPE_SWM|_CTYPE_R);
+
+	if ((x & _CTYPE_SWM) != 0)
+		return ((x & _CTYPE_SWM) >> _CTYPE_SWS);
+	return ((x & _CTYPE_R) != 0 ? 1 : -1);
+}
+
+#pragma weak _scrwidth = scrwidth
+
+/*
+ * This is a Solaris extension.  It never returns a negative width, even for
+ * non-printable characters.  It is used internally by the printf
+ * implementation for %ws.
+ */
+int
+scrwidth(wchar_t wc)
+{
+	int	v = wcwidth(wc);
+	return (v > 0 ? v : 0);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/lib/libc/port/locale/wscol.c	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "lint.h"
+#include <wchar.h>
+
+int
+wscol(const wchar_t *s)
+{
+	int	l = 0;
+	while (*s) {
+		l += wcwidth(*s);
+		s++;
+	}
+	return (l);
+}
--- a/usr/src/lib/libc/port/mapfile-vers	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/port/mapfile-vers	Thu Sep 09 11:46:43 2010 -0400
@@ -21,6 +21,9 @@
 #
 # Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
 #
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
 
 #
 # MAPFILE HEADER START
@@ -2529,14 +2532,7 @@
 	__inf_written;
 	__i_size;
 	_isnanf			{ TYPE = FUNCTION; FILTER = libm.so.2 };
-	__lc_charmap;
-	__lc_collate;
-	__lc_ctype;
-	__lc_locale;
-	__lc_messages;
-	__lc_monetary;
-	__lc_numeric;
-	__lc_time;
+	__iswrune;
 	__libc_threaded;
 	_lib_version		{ FLAGS = NODIRECT };
 	_logb			{ TYPE = FUNCTION; FILTER = libm.so.2 };
@@ -2551,6 +2547,7 @@
 	_modff			{ TYPE = FUNCTION; FILTER = libm.so.2 };
 	__nan_read;
 	__nan_written;
+	__nextwctype;
 	__nis_debug_bind;
 	__nis_debug_calls;
 	__nis_debug_file;
@@ -2636,14 +2633,9 @@
 	attr_to_option;
 	attr_to_xattr_view;	
 	_autofssys;
-	__btowc_dense;
-	__btowc_euc;
-	__btowc_sb;
 	_bufsync;
-	__charmap_init;
 	_cladm;
 	__class_quadruple;
-	__collate_init;
 	core_get_default_content;
 	core_get_default_path;
 	core_get_global_content;
@@ -2658,7 +2650,6 @@
 	core_set_options;
 	core_set_process_content;
 	core_set_process_path;
-	__ctype_init;
 	dbm_close_status;
 	dbm_do_nextkey;
 	dbm_setdefwrite;
@@ -2679,24 +2670,17 @@
 	_doscan;
 	_errfp;
 	_errxfp;
-	__eucpctowc_gen;
 	exportfs;
 	_F_cplx_div;
 	_F_cplx_div_ix;
 	_F_cplx_div_rx;
 	_F_cplx_mul;
-	__fgetwc_dense;
-	__fgetwc_euc;
-	__fgetwc_sb;
 	__fgetwc_xpg5;
 	__fgetws_xpg5;
 	_findbuf;
 	_findiop;
 	__fini_daemon_priv;
 	_finite;
-	__fnmatch_C;
-	__fnmatch_sb;
-	__fnmatch_std;
 	_fork1			{ FLAGS = NODYNSORT };
 	_forkall		{ FLAGS = NODYNSORT };
 	_fpclass;
@@ -2709,12 +2693,10 @@
 	_fpsetsticky;
 	__fputwc_xpg5;
 	__fputws_xpg5;
-	__fseterror_u;
 	_ftw;
 	_gcvt;
 	_getarg;
 	__getcontext;
-	__getdate_std;
 	_getdents;
 	_get_exit_frame_monitor;
 	_getfp;
@@ -2733,12 +2715,7 @@
 	__init_suid_priv;
 	_insert;
 	inst_sync;
-	_is_euc_fc;
-	_is_euc_pc;
 	_iswctype;
-	__iswctype_bc;
-	__iswctype_sb;
-	__iswctype_std;
 	klpd_create;
 	klpd_getpath;
 	klpd_getport;
@@ -2750,8 +2727,6 @@
 	_lgrp_home_fast		{ FLAGS = NODYNSORT };
 	_lgrpsys;
 	_lltostr;
-	__localeconv_std;
-	__locale_init;
 	_lock_clear;
 	_lock_try;
 	_ltzset;
@@ -2759,38 +2734,10 @@
 	makeut;
 	makeutx;
 	_mbftowc;
-	__mbftowc_dense;
-	__mbftowc_euc;
-	__mbftowc_sb;
-	__mblen_gen;
-	__mblen_sb;
-	__mbrlen_gen;
-	__mbrlen_sb;
-	__mbrtowc_dense;
-	__mbrtowc_euc;
-	__mbrtowc_sb;
-	__mbsinit_gen;
-	__mbsrtowcs_dense;
-	__mbsrtowcs_euc;
-	__mbsrtowcs_sb;
-	__mbst_get_consumed_array;
-	__mbst_get_locale;
-	__mbst_get_nconsumed;
-	__mbstowcs_dense;
-	__mbstowcs_euc;
-	__mbstowcs_sb;
-	__mbst_set_consumed_array;
-	__mbst_set_locale;
-	__mbst_set_nconsumed;
-	__mbtowc_dense;
-	__mbtowc_euc;
-	__mbtowc_sb;
 	mcfiller;
-	__messages_init;
 	mntopt;
 	modctl;
 	modutx;
-	__monetary_init;
 	msgctl64;
 	__multi_innetgr;
 	_mutex_destroy		{ FLAGS = NODYNSORT };
@@ -2802,7 +2749,6 @@
 	nfssvc;
 	_nfssys;
 	__nis_get_environment;
-	__nl_langinfo_std;
 	_nss_db_state_destr;
 	nss_default_key2str;
 	nss_delete;
@@ -2823,7 +2769,6 @@
 	__nsw_freeconfig_v1;
 	__nsw_getconfig_v1;
 	__nthreads;
-	__numeric_init;
 	__openattrdirat;
 	option_to_attr;
 	__priv_bracket;
@@ -2837,12 +2782,6 @@
 	rctlctl;
 	rctllist;
 	_realbufend;
-	__regcomp_C;
-	__regcomp_std;
-	__regerror_std;
-	__regexec_C;
-	__regexec_std;
-	__regfree_std;
 	_resume;
 	_resume_ret;
 	_rpcsys;
@@ -2851,7 +2790,6 @@
 	semctl64;
 	_semctl64;
 	set_setcontext_enforcement;
-	set_l10n_alternate_root;
 	_setbufend;
 	__set_errno;
 	setprojrctl;
@@ -2885,16 +2823,7 @@
 	str2group;
 	str2passwd;
 	str2spwd;
-	__strcoll_C;
-	__strcoll_sb;
-	__strcoll_std;
-	__strfmon_std;
-	__strftime_std;
 	__strptime_dontzero;
-	__strptime_std;
-	__strxfrm_C;
-	__strxfrm_sb;
-	__strxfrm_std;
 	stty;
 	syscall;
 	_sysconfig;
@@ -2922,14 +2851,7 @@
 	_thr_suspend_mutator;
 	thr_wait_mutator;
 	_thr_wait_mutator;
-	__time_init;
 	__tls_get_addr;
-	__towctrans_bc;
-	__towctrans_std;
-	__towlower_bc;
-	__towlower_std;
-	__towupper_bc;
-	__towupper_std;
 	tpool_create;
 	tpool_dispatch;
 	tpool_destroy;
@@ -2938,8 +2860,6 @@
 	tpool_suspended;
 	tpool_resume;
 	tpool_member;
-	_trwctype;
-	__trwctype_std;
 	_ttyname_dev;
 	_ucred_alloc;
 	ucred_getamask;
@@ -2964,43 +2884,8 @@
 	_vwarnxfp;
 	_warnfp;
 	_warnxfp;
-	__wcrtomb_dense;
-	__wcrtomb_euc;
-	__wcrtomb_sb;
-	__wcscoll_bc;
-	__wcscoll_C;
-	__wcscoll_std;
-	__wcsftime_std;
 	__wcsftime_xpg5;
-	__wcsrtombs_dense;
-	__wcsrtombs_euc;
-	__wcsrtombs_sb;
 	__wcstok_xpg5;
-	__wcstombs_dense;
-	__wcstombs_euc;
-	__wcstombs_sb;
-	__wcswidth_bc;
-	__wcswidth_dense;
-	__wcswidth_euc;
-	__wcswidth_sb;
-	__wcswidth_std;
-	__wcsxfrm_bc;
-	__wcsxfrm_C;
-	__wcsxfrm_std;
-	__wctob_dense;
-	__wctob_euc;
-	__wctob_sb;
-	__wctoeucpc_gen;
-	__wctomb_dense;
-	__wctomb_euc;
-	__wctomb_sb;
-	__wctrans_std;
-	__wctype_std;
-	__wcwidth_bc;
-	__wcwidth_dense;
-	__wcwidth_euc;
-	__wcwidth_sb;
-	__wcwidth_std;
 	wdbindf;
 	wdchkind;
 	wddelim;
--- a/usr/src/lib/libc/port/print/doprnt.c	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/port/print/doprnt.c	Thu Sep 09 11:46:43 2010 -0400
@@ -89,7 +89,7 @@
 #define	PUT(p, n) \
 	{ \
 		int	retp; \
-		retp = put_wide(iop, &bufptr, bufferend, p, n, sflag, lc, fp); \
+		retp = put_wide(iop, &bufptr, bufferend, p, n, sflag); \
 		if (retp == EOF) { \
 			return ((ssize_t)EOF); \
 		} \
@@ -299,7 +299,7 @@
 static int
 put_wide(FILE *iop, unsigned char **bufptr,
 	unsigned char *bufferend, wchar_t *p, size_t n,
-	int sflag, void *lc, int (*fp_wctomb)(void *, char *, wchar_t))
+	int sflag)
 {
 	unsigned char	*newbufptr;
 	wchar_t	*q;
@@ -330,7 +330,7 @@
 		q = p;
 		tmpq = tmpp;
 		for (len = 0, i = 0; i < n; i++) {
-			r = fp_wctomb(lc, tmpq, *q++);
+			r = wctomb(tmpq, *q++);
 			if (r == -1) {
 				lfree(tmpp, tsize);
 				errno = EILSEQ;
@@ -423,9 +423,6 @@
 #ifdef	_WIDE
 	int	sflag = 0;
 	size_t	maxcount;
-	mbstate_t	*mbst;
-	void	*lc;
-	int	(*fp)(void *, char *, wchar_t);
 #else
 	int	snflag = 0;
 #endif /* _WIDE */
@@ -592,13 +589,6 @@
 		sflag = 1;
 
 	if (!sflag) {
-		mbst = _getmbstate(iop);
-		if (mbst == NULL) {
-			errno = EBADF;
-			return (EOF);
-		}
-		lc = __mbst_get_lc_and_fp((const mbstate_t *)mbst,
-		    (void (*(*))(void))&fp, FP_WCTOMB);
 #endif /* _WIDE */
 	/* if first I/O to the stream get a buffer */
 	/* Note that iop->_base should not equal 0 for sprintf and vsprintf */
--- a/usr/src/lib/libc/port/print/vwprintf.c	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/port/print/vwprintf.c	Thu Sep 09 11:46:43 2010 -0400
@@ -23,8 +23,10 @@
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
 
 #include "lint.h"
 #include "file64.h"
@@ -65,11 +67,8 @@
 
 	FLOCKFILE(lk, stdout);
 
-	if (_set_orientation_wide(stdout, NULL, NULL, 0) == -1) {
-		errno = EBADF;
-		FUNLOCKFILE(lk);
-		return (EOF);
-	}
+	if (GET_NO_MODE(stdout))
+		_setorientation(stdout, _WC_MODE);
 	if (!(stdout->_flag & _IOWRT)) {
 		/* if no write flag */
 		if (stdout->_flag & _IORW) {
@@ -114,11 +113,8 @@
 
 	FLOCKFILE(lk, iop);
 
-	if (_set_orientation_wide(iop, NULL, NULL, 0) == -1) {
-		errno = EBADF;
-		FUNLOCKFILE(lk);
-		return (EOF);
-	}
+	if (GET_NO_MODE(iop))
+		_setorientation(iop, _WC_MODE);
 
 	if (!(iop->_flag & _IOWRT)) {
 		/* if no write flag */
--- a/usr/src/lib/libc/port/print/wprintf.c	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/port/print/wprintf.c	Thu Sep 09 11:46:43 2010 -0400
@@ -23,8 +23,11 @@
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
 
 #include "lint.h"
 #include "file64.h"
@@ -63,11 +66,8 @@
 	va_start(ap, format);
 	FLOCKFILE(lk, stdout);
 
-	if (_set_orientation_wide(stdout, NULL, NULL, 0) == -1) {
-		errno = EBADF;
-		FUNLOCKFILE(lk);
-		return (EOF);
-	}
+	if (GET_NO_MODE(stdout))
+		_setorientation(stdout, _WC_MODE);
 
 	if (!(stdout->_flag & _IOWRT)) {
 		/* if no write flag */
@@ -109,11 +109,8 @@
 
 	FLOCKFILE(lk, iop);
 
-	if (_set_orientation_wide(iop, NULL, NULL, 0) == -1) {
-		errno = EBADF;
-		FUNLOCKFILE(lk);
-		return (EOF);
-	}
+	if (GET_NO_MODE(iop))
+		_setorientation(iop, _WC_MODE);
 
 	if (!(iop->_flag & _IOWRT)) {
 		/* if no write flag */
--- a/usr/src/lib/libc/port/stdio/data.c	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/port/stdio/data.c	Thu Sep 09 11:46:43 2010 -0400
@@ -27,7 +27,10 @@
 /*	Copyright (c) 1988 AT&T	*/
 /*	  All Rights Reserved  	*/
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
 
 #pragma weak __iob = _iob
 
@@ -53,7 +56,7 @@
 
 
 #define	DEFAULTMBSTATE \
-	{ NULL, NULL, {0, 0, 0, 0, 0, 0, 0, 0}, 0, {0, 0}}
+	{ 0 }
 
 #ifdef	_LP64
 
--- a/usr/src/lib/libc/port/stdio/mse.c	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/port/stdio/mse.c	Thu Sep 09 11:46:43 2010 -0400
@@ -24,7 +24,10 @@
  * Use is subject to license terms.
  */
 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
+/*
+ * Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
 
 #include "lint.h"
 #include "mtlib.h"
@@ -43,21 +46,6 @@
 
 /*
  * DESCRIPTION:
- * This function sets the error indicator for the specified stream.
- * This is a private API for the L10N method functions, especially
- * for fgetwc().
- *
- * The stream needs to have been properly locked.  Usually, the wrapper
- * function of fgetwc() locks the stream.
- */
-void
-__fseterror_u(FILE *iop)
-{
-	iop->_flag |= _IOERR;
-}
-
-/*
- * DESCRIPTION:
  * This function/macro gets the orientation bound to the specified iop.
  *
  * RETURNS:
@@ -104,132 +92,3 @@
 		break;
 	}
 }
-
-static mbstate_t	**__top_mbstates = NULL;
-static mutex_t	__top_mbstates_lock = DEFAULTMUTEX;
-
-void
-_clear_internal_mbstate(void)
-{
-	int	i;
-
-	lmutex_lock(&__top_mbstates_lock);
-	if (__top_mbstates) {
-		for (i = 0; i <= _MAX_MB_FUNC; i++) {
-			if (*(__top_mbstates + i)) {
-				lfree(*(__top_mbstates + i),
-				    sizeof (mbstate_t));
-			}
-		}
-		lfree(__top_mbstates,
-		    (_MAX_MB_FUNC + 1) * sizeof (mbstate_t *));
-		__top_mbstates = NULL;
-	}
-	lmutex_unlock(&__top_mbstates_lock);
-}
-
-mbstate_t *
-_get_internal_mbstate(int item)
-{
-	if (item < 0 || item > _MAX_MB_FUNC)
-		return (NULL);
-
-	lmutex_lock(&__top_mbstates_lock);
-	if (__top_mbstates == NULL) {
-		__top_mbstates =
-		    lmalloc((_MAX_MB_FUNC + 1) * sizeof (mbstate_t *));
-		if (__top_mbstates == NULL) {
-			lmutex_unlock(&__top_mbstates_lock);
-			return (NULL);
-		}
-		*(__top_mbstates + item) = lmalloc(sizeof (mbstate_t));
-		if (*(__top_mbstates + item) == NULL) {
-			lmutex_unlock(&__top_mbstates_lock);
-			return (NULL);
-		}
-		lmutex_unlock(&__top_mbstates_lock);
-		return (*(__top_mbstates + item));
-	}
-	if (*(__top_mbstates + item) == NULL) {
-		*(__top_mbstates + item) = lmalloc(sizeof (mbstate_t));
-		if (*(__top_mbstates + item) == NULL) {
-			lmutex_unlock(&__top_mbstates_lock);
-			return (NULL);
-		}
-	}
-	lmutex_unlock(&__top_mbstates_lock);
-	return (*(__top_mbstates + item));
-}
-
-/*
- * From page 32 of XSH5
- * Once a wide-character I/O function has been applied
- * to a stream without orientation, the stream becomes
- * wide-orientated.  Similarly, once a byte I/O function
- * has been applied to a stream without orientation,
- * the stream becomes byte-orientated.  Only a call to
- * the freopen() function or the fwide() function can
- * otherwise alter the orientation of a stream.
- */
-
-/*
- * void
- * _set_orientation_byte(FILE *iop)
- *
- * Note: this is now implemented as macro __SET_ORIENTATION_BYTE()
- *       (in libc/inc/mse.h) for performance improvement.
- */
-
-/* Returns the value of 'ps->__nconsumed' */
-char
-__mbst_get_nconsumed(const mbstate_t *ps)
-{
-	return (ps->__nconsumed);
-}
-
-/* Sets 'n' to 'ps->__nconsumed' */
-void
-__mbst_set_nconsumed(mbstate_t *ps, char n)
-{
-	ps->__nconsumed = n;
-}
-
-/* Copies 'len' bytes from '&ps->__consumed[index]' to 'str' */
-int
-__mbst_get_consumed_array(const mbstate_t *ps, char *str,
-	size_t index, size_t len)
-{
-	if ((index + len) > 8) {
-		/* The max size of __consumed[] is 8 */
-		return (-1);
-	}
-	(void) memcpy((void *)str, (const void *)&ps->__consumed[index], len);
-	return (0);
-}
-
-/* Copies 'len' bytes from 'str' to '&ps->__consumed[index]' */
-int
-__mbst_set_consumed_array(mbstate_t *ps, const char *str,
-	size_t index, size_t len)
-{
-	if ((index + len) > 8) {
-		/* The max size of __consumed[] is 8 */
-		return (-1);
-	}
-	(void) memcpy((void *)&ps->__consumed[index], (const void *)str, len);
-	return (0);
-}
-
-/* Returns 'ps->__lc_locale' */
-void *
-__mbst_get_locale(const mbstate_t *ps)
-{
-	return (ps->__lc_locale);
-}
-
-/* Sets 'loc' to 'ps->__lc_locale' */
-void
-__mbst_set_locale(mbstate_t *ps, const void *loc)
-{
-	ps->__lc_locale = (void *)loc;
-}
--- a/usr/src/lib/libc/port/stdio/vwscanf.c	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/port/stdio/vwscanf.c	Thu Sep 09 11:46:43 2010 -0400
@@ -54,11 +54,8 @@
 
 	FLOCKFILE(lk, stdin);
 
-	if (_set_orientation_wide(stdin, NULL, NULL, 0) == -1) {
-		errno = EBADF;
-		FUNLOCKFILE(lk);
-		return (EOF);
-	}
+	if (GET_NO_MODE(stdin))
+		_setorientation(stdin, _WC_MODE);
 
 #ifdef _C89_INTMAX32
 	ret = __wdoscan_u(stdin, fmt, ap, _F_INTMAX32);
@@ -81,11 +78,8 @@
 
 	FLOCKFILE(lk, iop);
 
-	if (_set_orientation_wide(iop, NULL, NULL, 0) == -1) {
-		errno = EBADF;
-		FUNLOCKFILE(lk);
-		return (EOF);
-	}
+	if (GET_NO_MODE(iop))
+		_setorientation(iop, _WC_MODE);
 
 
 #ifdef _C89_INTMAX32
--- a/usr/src/lib/libc/sparc/Makefile.com	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/sparc/Makefile.com	Thu Sep 09 11:46:43 2010 -0400
@@ -21,6 +21,9 @@
 #
 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
 #
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
 
 LIBCDIR=	$(SRC)/lib/libc
 LIB_PIC=	libc_pic.a
@@ -721,11 +724,6 @@
 	wscanf.o
 
 PORTI18N=			\
-	__fgetwc_xpg5.o		\
-	__fgetws_xpg5.o		\
-	__fputwc_xpg5.o		\
-	__fputws_xpg5.o		\
-	__ungetwc_xpg5.o	\
 	getwchar.o		\
 	putwchar.o		\
 	putws.o			\
@@ -774,12 +772,84 @@
 	wdresolve.o		\
 	_ctype.o		\
 	isascii.o		\
+	isdigit.o		\
 	toascii.o
 
 PORTI18N_COND=			\
 	wcstol_longlong.o	\
 	wcstoul_longlong.o
 
+PORTLOCALE=			\
+	ascii.o			\
+	big5.o			\
+	btowc.o			\
+	collate.o		\
+	collcmp.o		\
+	euc.o			\
+	fnmatch.o		\
+	fgetwc.o		\
+	fgetws.o		\
+	fix_grouping.o		\
+	fputwc.o		\
+	fputws.o		\
+	fwide.o			\
+	gb18030.o		\
+	gb2312.o		\
+	gbk.o			\
+	getdate.o		\
+	iswctype.o		\
+	ldpart.o		\
+	lmessages.o		\
+	lnumeric.o		\
+	lmonetary.o		\
+	localeconv.o		\
+	mbftowc.o		\
+	mblen.o			\
+	mbrlen.o		\
+	mbrtowc.o		\
+	mbsinit.o		\
+	mbsnrtowcs.o		\
+	mbsrtowcs.o		\
+	mbstowcs.o		\
+	mbtowc.o		\
+	mskanji.o		\
+	nextwctype.o		\
+	nl_langinfo.o		\
+	none.o			\
+	regcomp.o		\
+	regfree.o		\
+	regerror.o		\
+	regexec.o		\
+	rune.o			\
+	runetype.o		\
+	setlocale.o		\
+	setrunelocale.o		\
+	strcoll.o		\
+	strfmon.o		\
+	strftime.o		\
+	strptime.o		\
+	strxfrm.o		\
+	table.o			\
+	timelocal.o		\
+	tolower.o		\
+	towlower.o		\
+	ungetwc.o		\
+	utf8.o			\
+	wcrtomb.o		\
+	wcscoll.o		\
+	wcsftime.o		\
+	wcsnrtombs.o		\
+	wcsrtombs.o		\
+	wcstombs.o		\
+	wcswidth.o		\
+	wcsxfrm.o		\
+	wctob.o			\
+	wctomb.o		\
+	wctrans.o		\
+	wctype.o		\
+	wcwidth.o		\
+	wscol.o
+
 AIOOBJS=			\
 	aio.o			\
 	aio_alloc.o		\
@@ -924,6 +994,7 @@
 	$(PORTGEN64)		\
 	$(PORTI18N)		\
 	$(PORTI18N_COND)	\
+	$(PORTLOCALE)		\
 	$(PORTPRINT)		\
 	$(PORTPRINT_C89)	\
 	$(PORTPRINT_W)		\
@@ -967,12 +1038,6 @@
 # include common library definitions
 include $(SRC)/lib/Makefile.lib
 
-# NOTE: libc_i18n.a will be part of libc.so.1.  Therefore, the compilation
-# conditions such as the settings of CFLAGS and CPPFLAGS for the libc_i18n stuff
-# need to be compatible with the ones for the libc stuff.  Whenever the changes
-# that affect the compilation conditions of libc happened, those for libc_i18n
-# also need to be updated.
-
 # we need to override the default SONAME here because we might
 # be building a variant object (still libc.so.1, but different filename)
 SONAME = libc.so.1
@@ -994,7 +1059,6 @@
 
 ALTPICS= $(TRACEOBJS:%=pics/%)
 
-$(DYNLIB) := PICS += $(ROOTFS_LIBDIR)/libc_i18n.a
 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS)
 
 MAPFILES =	$(LIBCDIR)/port/mapfile-vers
@@ -1066,6 +1130,7 @@
 	$(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c)			\
 	$(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c)			\
 	$(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c)		\
+	$(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c)		\
 	$(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c)		\
 	$(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c)		\
 	$(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c)		\
--- a/usr/src/lib/libc/sparcv9/Makefile.com	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/lib/libc/sparcv9/Makefile.com	Thu Sep 09 11:46:43 2010 -0400
@@ -21,6 +21,9 @@
 #
 # Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
 #
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+# Use is subject to license terms.
+#
 
 LIBCDIR=	$(SRC)/lib/libc
 LIB_PIC=	libc_pic.a
@@ -670,11 +673,6 @@
 	wscanf.o
 
 PORTI18N=			\
-	__fgetwc_xpg5.o		\
-	__fgetws_xpg5.o		\
-	__fputwc_xpg5.o		\
-	__fputws_xpg5.o		\
-	__ungetwc_xpg5.o	\
 	getwchar.o		\
 	putwchar.o		\
 	putws.o			\
@@ -723,12 +721,84 @@
 	wdresolve.o		\
 	_ctype.o		\
 	isascii.o		\
+	isdigit.o		\
 	toascii.o
 
 PORTI18N_COND=			\
 	wcstol_longlong.o	\
 	wcstoul_longlong.o
 
+PORTLOCALE=			\
+	ascii.o			\
+	big5.o			\
+	btowc.o			\
+	collate.o		\
+	collcmp.o		\
+	euc.o			\
+	fnmatch.o		\
+	fgetwc.o		\
+	fgetws.o		\
+	fix_grouping.o		\
+	fputwc.o		\
+	fputws.o		\
+	fwide.o			\
+	gb18030.o		\
+	gb2312.o		\
+	gbk.o			\
+	getdate.o		\
+	iswctype.o		\
+	ldpart.o		\
+	lmessages.o		\
+	lnumeric.o		\
+	lmonetary.o		\
+	localeconv.o		\
+	mbftowc.o		\
+	mblen.o			\
+	mbrlen.o		\
+	mbrtowc.o		\
+	mbsinit.o		\
+	mbsnrtowcs.o		\
+	mbsrtowcs.o		\
+	mbstowcs.o		\
+	mbtowc.o		\
+	mskanji.o		\
+	nextwctype.o		\
+	nl_langinfo.o		\
+	none.o			\
+	regcomp.o		\
+	regfree.o		\
+	regerror.o		\
+	regexec.o		\
+	rune.o			\
+	runetype.o		\
+	setlocale.o		\
+	setrunelocale.o		\
+	strcoll.o		\
+	strfmon.o		\
+	strftime.o		\
+	strptime.o		\
+	strxfrm.o		\
+	table.o			\
+	timelocal.o		\
+	tolower.o		\
+	towlower.o		\
+	ungetwc.o		\
+	utf8.o			\
+	wcrtomb.o		\
+	wcscoll.o		\
+	wcsftime.o		\
+	wcsnrtombs.o		\
+	wcsrtombs.o		\
+	wcstombs.o		\
+	wcswidth.o		\
+	wcsxfrm.o		\
+	wctob.o			\
+	wctomb.o		\
+	wctrans.o		\
+	wctype.o		\
+	wcwidth.o		\
+	wscol.o
+
 AIOOBJS=			\
 	aio.o			\
 	aio_alloc.o		\
@@ -872,6 +942,7 @@
 	$(PORTGEN64)		\
 	$(PORTI18N)		\
 	$(PORTI18N_COND)	\
+	$(PORTLOCALE)		\
 	$(PORTPRINT)		\
 	$(PORTPRINT_W)		\
 	$(PORTREGEX)		\
@@ -914,12 +985,6 @@
 include $(SRC)/lib/Makefile.lib
 include $(SRC)/lib/Makefile.lib.64
 
-# NOTE: libc_i18n.a will be part of libc.so.1.  Therefore, the compilation
-# conditions such as the settings of CFLAGS and CPPFLAGS for the libc_i18n stuff
-# need to be compatible with the ones for the libc stuff.  Whenever the changes
-# that affect the compilation conditions of libc happened, those for libc_i18n
-# also need to be updated.
-
 # we need to override the default SONAME here because we might
 # be building a variant object (still libc.so.1, but different filename)
 SONAME = libc.so.1
@@ -941,7 +1006,6 @@
 
 ALTPICS= $(TRACEOBJS:%=pics/%)
 
-$(DYNLIB) := PICS += $(ROOTFS_LIBDIR64)/libc_i18n.a
 $(DYNLIB) := BUILD.SO = $(LD) -o $@ -G $(DYNFLAGS) $(PICS) $(ALTPICS) $(EXTPICS)
 
 MAPFILES =	$(LIBCDIR)/port/mapfile-vers
@@ -1002,6 +1066,7 @@
 	$(PORTFP:%.o=$(LIBCDIR)/port/fp/%.c)			\
 	$(PORTGEN:%.o=$(LIBCDIR)/port/gen/%.c)			\
 	$(PORTI18N:%.o=$(LIBCDIR)/port/i18n/%.c)		\
+	$(PORTLOCALE:%.o=$(LIBCDIR)/port/locale/%.c)		\
 	$(PORTPRINT:%.o=$(LIBCDIR)/port/print/%.c)		\
 	$(PORTREGEX:%.o=$(LIBCDIR)/port/regex/%.c)		\
 	$(PORTSTDIO:%.o=$(LIBCDIR)/port/stdio/%.c)		\
--- a/usr/src/pkg/manifests/SUNWcs.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/SUNWcs.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -199,9 +199,6 @@
 dir path=usr/lib/locale/C/LC_MONETARY
 dir path=usr/lib/locale/C/LC_NUMERIC
 dir path=usr/lib/locale/C/LC_TIME
-dir path=usr/lib/localedef
-dir path=usr/lib/localedef/extensions
-dir path=usr/lib/localedef/src
 dir path=usr/lib/netsvc group=sys
 dir path=usr/lib/pci
 dir path=usr/lib/rcm
@@ -816,7 +813,6 @@
 file path=usr/bin/listdgrp mode=0555
 file path=usr/bin/listusers mode=0555
 file path=usr/bin/loadkeys mode=0555
-file path=usr/bin/localedef mode=0555
 file path=usr/bin/logger mode=0555
 file path=usr/bin/login mode=4555
 file path=usr/bin/logins mode=0750
@@ -2581,6 +2577,8 @@
     license=usr/src/cmd/stat/vmstat/THIRDPARTYLICENSE
 license usr/src/cmd/tip/THIRDPARTYLICENSE \
     license=usr/src/cmd/tip/THIRDPARTYLICENSE
+license usr/src/cmd/tr/THIRDPARTYLICENSE \
+    license=usr/src/cmd/tr/THIRDPARTYLICENSE
 license usr/src/cmd/vi/THIRDPARTYLICENSE \
     license=usr/src/cmd/vi/THIRDPARTYLICENSE
 license usr/src/cmd/which/THIRDPARTYLICENSE \
--- a/usr/src/pkg/manifests/SUNWllc.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/SUNWllc.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -23,7 +23,8 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
-set name=pkg.fmri value=pkg:/SUNWllc@0.5.11,5.11-0.133
-set name=pkg.renamed value=true
+# Was renamed to driver/network/llc2, both now obsolete
+
+set name=pkg.fmri value=pkg:/SUNWllc@$(PKGVERS)
+set name=pkg.obsolete value=true
 set name=variant.arch value=$(ARCH)
-depend fmri=pkg:/driver/network/llc2@0.5.11,5.11-0.133 type=require
--- a/usr/src/pkg/manifests/SUNWrmwb.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/SUNWrmwb.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -23,8 +23,8 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
-set name=pkg.fmri value=pkg:/SUNWrmwb@0.5.11,5.11-0.133
-set name=pkg.renamed value=true
+# Was renamed to pkg:/system/management/wbem/resource-management, both are now
+# obsolete.  This is made obsolete at $(PKGVERS) to match it.
+set name=pkg.fmri value=pkg:/SUNWrmwb@$(PKGVERS)
+set name=pkg.obsolete value=true
 set name=variant.arch value=$(ARCH)
-depend fmri=pkg:/system/management/wbem/resource-management@0.5.11,5.11-0.133 \
-    type=require
--- a/usr/src/pkg/manifests/consolidation-osnet-osnet-message-files.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/consolidation-osnet-osnet-message-files.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -69,7 +69,6 @@
 dir path=usr/share/lib/locale/com/sun/dhcpmgr/client/help/art
 dir path=usr/share/lib/locale/com/sun/dhcpmgr/common
 dir path=usr/share/lib/locale/com/sun/dhcpmgr/data
-dir path=usr/share/lib/locale/com/sun/dhcpmgr/server
 dir path=usr/share/lib/locale/com/sun/dhcpmgr/ui
 dir path=usr/share/lib/locale/com/sun/slp
 file path=usr/lib/help/auths/locale/AllSolAuthsHeader.html
@@ -444,8 +443,6 @@
 file \
     path=usr/share/lib/locale/com/sun/dhcpmgr/common/ResourceBundle.properties
 file path=usr/share/lib/locale/com/sun/dhcpmgr/data/ResourceBundle.properties
-file \
-    path=usr/share/lib/locale/com/sun/dhcpmgr/server/ResourceBundle.properties
 file path=usr/share/lib/locale/com/sun/dhcpmgr/ui/ResourceBundle.properties
 file path=usr/share/lib/locale/com/sun/slp/ClientLib_en.properties group=sys
 file path=usr/share/lib/locale/com/sun/slp/Server_en.properties group=sys
--- a/usr/src/pkg/manifests/developer-build-onbld.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/developer-build-onbld.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -23,6 +23,8 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
+# Copyright 2010, Richard Lowe
+
 set name=pkg.fmri value=pkg:/developer/build/onbld@$(PKGVERS)
 set name=pkg.description value="tools used to build the OS-Net consolidation"
 set name=pkg.summary value="OS-Net Build Tools"
@@ -110,7 +112,6 @@
 file path=opt/onbld/bin/interface_check mode=0555
 file path=opt/onbld/bin/interface_cmp mode=0555
 file path=opt/onbld/bin/jstyle mode=0555
-file path=opt/onbld/bin/keywords mode=0555
 file path=opt/onbld/bin/make_pkg_db mode=0555
 file path=opt/onbld/bin/mapfilechk mode=0555
 file path=opt/onbld/bin/mkclosed mode=0555
@@ -119,12 +120,7 @@
 file path=opt/onbld/bin/nightly mode=0555
 file path=opt/onbld/bin/onu mode=0555
 file path=opt/onbld/bin/protocmp.terse mode=0555
-file path=opt/onbld/bin/rtichk mode=0555
 file path=opt/onbld/bin/sccscheck mode=0555
-file path=opt/onbld/bin/sccscp mode=0555
-file path=opt/onbld/bin/sccshist mode=0555
-file path=opt/onbld/bin/sccsmv mode=0555
-file path=opt/onbld/bin/sccsrm mode=0555
 file path=opt/onbld/bin/signit mode=0555
 file path=opt/onbld/bin/signproto mode=0555
 file path=opt/onbld/bin/validate_flg mode=0555
@@ -135,13 +131,11 @@
 file path=opt/onbld/bin/which_scm mode=0555
 file path=opt/onbld/bin/ws mode=0555
 file path=opt/onbld/bin/wsdiff mode=0555
-file path=opt/onbld/bin/wx mode=0555
-file path=opt/onbld/bin/wx2hg mode=0555
 file path=opt/onbld/bin/xref mode=0555
 file path=opt/onbld/bin/xref.mk
 file path=opt/onbld/env/developer
 file path=opt/onbld/env/gatekeeper
-file path=opt/onbld/env/opensolaris
+file path=opt/onbld/env/illumos
 file path=opt/onbld/etc/SampleLinks
 file path=opt/onbld/etc/SamplePkgLinks
 file path=opt/onbld/etc/exception_lists/check_rtime
@@ -178,8 +172,6 @@
 file path=opt/onbld/lib/python2.4/onbld/Checks/Mapfile.pyc mode=0444
 file path=opt/onbld/lib/python2.4/onbld/Checks/ProcessCheck.py mode=0444
 file path=opt/onbld/lib/python2.4/onbld/Checks/ProcessCheck.pyc mode=0444
-file path=opt/onbld/lib/python2.4/onbld/Checks/Rti.py mode=0444
-file path=opt/onbld/lib/python2.4/onbld/Checks/Rti.pyc mode=0444
 file path=opt/onbld/lib/python2.4/onbld/Checks/__init__.py mode=0444
 file path=opt/onbld/lib/python2.4/onbld/Checks/__init__.pyc mode=0444
 file path=opt/onbld/lib/python2.4/onbld/Scm/Backup.py mode=0444
@@ -217,8 +209,6 @@
 file path=opt/onbld/lib/python2.6/onbld/Checks/Mapfile.pyc mode=0444
 file path=opt/onbld/lib/python2.6/onbld/Checks/ProcessCheck.py mode=0444
 file path=opt/onbld/lib/python2.6/onbld/Checks/ProcessCheck.pyc mode=0444
-file path=opt/onbld/lib/python2.6/onbld/Checks/Rti.py mode=0444
-file path=opt/onbld/lib/python2.6/onbld/Checks/Rti.pyc mode=0444
 file path=opt/onbld/lib/python2.6/onbld/Checks/__init__.py mode=0444
 file path=opt/onbld/lib/python2.6/onbld/Checks/__init__.pyc mode=0444
 file path=opt/onbld/lib/python2.6/onbld/Scm/Backup.py mode=0444
@@ -257,17 +247,12 @@
 file path=opt/onbld/man/man1/nightly.1
 file path=opt/onbld/man/man1/onu.1
 file path=opt/onbld/man/man1/sccscheck.1
-file path=opt/onbld/man/man1/sccscp.1
-file path=opt/onbld/man/man1/sccsmv.1
-file path=opt/onbld/man/man1/sccsrm.1
 file path=opt/onbld/man/man1/signit.1
 file path=opt/onbld/man/man1/signproto.1
 file path=opt/onbld/man/man1/webrev.1
 file path=opt/onbld/man/man1/which_scm.1
 file path=opt/onbld/man/man1/ws.1
 file path=opt/onbld/man/man1/wsdiff.1
-file path=opt/onbld/man/man1/wx.1
-file path=opt/onbld/man/man1/wx2hg.1
 file path=opt/onbld/man/man1/xref.1
 file path=opt/onbld/man/sman1/get_depend_info.1
 file path=opt/onbld/man/sman1/make_pkg_db.1
@@ -281,3 +266,9 @@
 license usr/src/tools/onbld/THIRDPARTYLICENSE \
     license=usr/src/tools/onbld/THIRDPARTYLICENSE
 link path=opt/onbld/lib/python target=python2.4
+# DbLookups.py requires elementtree
+depend fmri=library/python-2/python-extra-24 type=require
+# webrev(1) requires ps2pdf
+depend fmri=print/filter/ghostscript type=require
+# nightly uses wget
+depend fmri=web/wget type=require
--- a/usr/src/pkg/manifests/developer-opensolaris-osnet.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/developer-opensolaris-osnet.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -30,12 +30,6 @@
     value="org.opensolaris.category.2008:Development/Distribution Tools"
 set name=org.opensolaris.noincorp value=true
 set name=variant.arch value=$(ARCH)
-depend fmri=SUNWadmj type=require
-depend fmri=SUNWjsnmp type=require
-depend fmri=SUNWwbapi type=require
-depend fmri=SUNWwbcou type=require
-depend fmri=SUNWwbdev type=require
-depend fmri=cde/cde-runtime@0.5.11-0.133 type=require
 depend fmri=data/docbook@0.5.11-0.133 type=require
 depend fmri=developer/astdev@0.5.11-0.133 type=require
 depend fmri=developer/build/make@0.5.11-0.133 type=require
@@ -48,11 +42,9 @@
 depend fmri=developer/versioning/mercurial@1.3.1-0.133 type=require
 depend fmri=library/gnome/base-libs@0.5.11-0.133 type=require
 depend fmri=library/gnome/gnome-vfs@0.5.11-0.133 type=require
-depend fmri=library/motif@0.5.11-0.133 type=require
 depend fmri=library/nspr/header-nspr@0.5.11-0.133 type=require
 depend fmri=library/perl-5/xml-parser@0.5.11-0.133 type=require
 depend fmri=library/security/trousers@0.3.2-0.133 type=require
-depend fmri=library/tooltalk@0.5.11-0.133 type=require
 depend fmri=package/svr4@0.5.11-0.133 type=require
 depend fmri=print/cups@1.4.2-0.133 type=require
 depend fmri=runtime/perl-510/extra@5.10.0-0.133 type=require
--- a/usr/src/pkg/manifests/driver-network-llc2.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/driver-network-llc2.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -23,59 +23,6 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
-#
-# The default for payload-bearing actions in this package is to appear in the
-# global zone only.  See the include file for greater detail, as well as
-# information about overriding the defaults.
-#
-<include global_zone_only_component>
 set name=pkg.fmri value=pkg:/driver/network/llc2@$(PKGVERS)
-set name=pkg.description \
-    value="LLC2 driver implementing IEEE 802.2 Logical Link Control 2 service"
-set name=pkg.summary value="LLC2 driver and its initialization programs"
-set name=info.classification \
-    value=org.opensolaris.category.2008:Drivers/Networking
+set name=pkg.obsolete value=true
 set name=variant.arch value=$(ARCH)
-dir path=etc group=sys
-dir path=etc/init.d group=sys
-dir path=etc/llc2 group=sys
-dir path=etc/llc2/default group=sys
-dir path=etc/rc0.d group=sys
-dir path=etc/rc1.d group=sys
-dir path=etc/rc2.d group=sys
-dir path=etc/rcS.d group=sys
-dir path=usr group=sys
-dir path=usr/include
-dir path=usr/include/sys
-dir path=usr/kernel group=sys
-dir path=usr/kernel/drv group=sys
-dir path=usr/kernel/drv/$(ARCH64) group=sys
-dir path=usr/lib
-dir path=usr/lib/llc2
-driver name=llc2 perms="* 0666 root sys"
-file path=etc/init.d/llc2 group=sys mode=0744 \
-    original_name=SUNWllc:etc/init.d/llc2 preserve=true
-file path=etc/llc2/llc2_start.default group=sys mode=0744
-file path=usr/kernel/drv/$(ARCH64)/llc2 group=sys
-$(i386_ONLY)file path=usr/kernel/drv/llc2 group=sys
-file path=usr/kernel/drv/llc2.conf group=sys
-file path=usr/lib/llc2/llc2_autoconfig mode=0555
-file path=usr/lib/llc2/llc2_config mode=0555
-file path=usr/lib/llc2/llc2_loop2 mode=0555
-file path=usr/lib/llc2/llc2_loop3 mode=0555
-file path=usr/lib/llc2/llc2_loop4 mode=0555
-file path=usr/lib/llc2/llc2_stats mode=0555
-file path=usr/lib/llc2/llc2_tcap mode=0555
-file path=usr/lib/llc2/llc2_tparser mode=0555
-hardlink path=etc/rc0.d/K52llc2 target=../../etc/init.d/llc2
-hardlink path=etc/rc1.d/K52llc2 target=../../etc/init.d/llc2
-hardlink path=etc/rc2.d/S40llc2 target=../../etc/init.d/llc2
-hardlink path=etc/rcS.d/K52llc2 target=../../etc/init.d/llc2
-legacy pkg=SUNWllc \
-    desc="LLC2 driver implementing IEEE 802.2 Logical Link Control 2 service" \
-    name="LLC2 driver and its initialization programs"
-legacy pkg=SUNWllcr desc="The configuration and startup files for llc2 driver" \
-    name="LLC2 driver configuration and startup files"
-license cr_Sun license=cr_Sun
-license lic_OSBL license=lic_OSBL
-license lic_OSBL_preamble license=lic_OSBL_preamble
--- a/usr/src/pkg/manifests/driver-network-zyd.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/driver-network-zyd.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -21,6 +21,7 @@
 
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
 #
 
 #
@@ -40,7 +41,8 @@
 dir path=kernel/drv/$(ARCH64) group=sys
 driver name=zyd clone_perms="zyd 0666 root sys" perms="* 0666 root sys" \
     alias=usb13b1,24 \
-    alias=usbace,1211
+    alias=usbace,1211 \
+    alias=usbace,1215
 file path=kernel/drv/$(ARCH64)/zyd group=sys
 file path=kernel/drv/zyd group=sys
 legacy pkg=SUNWzyd desc="ZyDAS ZD1211 USB 802.11b/g Wireless Driver" \
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/pkg/manifests/locale-en.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,297 @@
+#
+# This file and its contents are supplied under the terms of the
+# Common Development and Distribution License ("CDDL)".  You may
+# only use this file in accordance with the terms of the CDDL.
+#
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
+#
+
+#
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
+#
+
+set name=pkg.fmri value=pkg:/locale/en@$(PKGVERS)
+set name=pkg.description value="localization definitions for English locales"
+set name=pkg.summary value="English Locales"
+set name=info.classification \
+    value=org.opensolaris.category.2008:System/Localizations
+set name=variant.arch value=$(ARCH)
+dir path=usr group=sys
+dir path=usr/lib
+dir path=usr/lib/locale
+dir path=usr/lib/locale/en_AU.ISO8859-1
+dir path=usr/lib/locale/en_AU.ISO8859-1/LC_COLLATE
+dir path=usr/lib/locale/en_AU.ISO8859-1/LC_CTYPE
+dir path=usr/lib/locale/en_AU.ISO8859-1/LC_MESSAGES
+dir path=usr/lib/locale/en_AU.ISO8859-1/LC_MONETARY
+dir path=usr/lib/locale/en_AU.ISO8859-1/LC_NUMERIC
+dir path=usr/lib/locale/en_AU.ISO8859-1/LC_TIME
+dir path=usr/lib/locale/en_AU.ISO8859-15
+dir path=usr/lib/locale/en_AU.ISO8859-15/LC_COLLATE
+dir path=usr/lib/locale/en_AU.ISO8859-15/LC_CTYPE
+dir path=usr/lib/locale/en_AU.ISO8859-15/LC_MESSAGES
+dir path=usr/lib/locale/en_AU.ISO8859-15/LC_MONETARY
+dir path=usr/lib/locale/en_AU.ISO8859-15/LC_NUMERIC
+dir path=usr/lib/locale/en_AU.ISO8859-15/LC_TIME
+dir path=usr/lib/locale/en_AU.US-ASCII
+dir path=usr/lib/locale/en_AU.US-ASCII/LC_COLLATE
+dir path=usr/lib/locale/en_AU.US-ASCII/LC_CTYPE
+dir path=usr/lib/locale/en_AU.US-ASCII/LC_MESSAGES
+dir path=usr/lib/locale/en_AU.US-ASCII/LC_MONETARY
+dir path=usr/lib/locale/en_AU.US-ASCII/LC_NUMERIC
+dir path=usr/lib/locale/en_AU.US-ASCII/LC_TIME
+dir path=usr/lib/locale/en_AU.UTF-8
+dir path=usr/lib/locale/en_AU.UTF-8/LC_COLLATE
+dir path=usr/lib/locale/en_AU.UTF-8/LC_CTYPE
+dir path=usr/lib/locale/en_AU.UTF-8/LC_MESSAGES
+dir path=usr/lib/locale/en_AU.UTF-8/LC_MONETARY
+dir path=usr/lib/locale/en_AU.UTF-8/LC_NUMERIC
+dir path=usr/lib/locale/en_AU.UTF-8/LC_TIME
+dir path=usr/lib/locale/en_CA.ISO8859-1
+dir path=usr/lib/locale/en_CA.ISO8859-1/LC_COLLATE
+dir path=usr/lib/locale/en_CA.ISO8859-1/LC_CTYPE
+dir path=usr/lib/locale/en_CA.ISO8859-1/LC_MESSAGES
+dir path=usr/lib/locale/en_CA.ISO8859-1/LC_MONETARY
+dir path=usr/lib/locale/en_CA.ISO8859-1/LC_NUMERIC
+dir path=usr/lib/locale/en_CA.ISO8859-1/LC_TIME
+dir path=usr/lib/locale/en_CA.ISO8859-15
+dir path=usr/lib/locale/en_CA.ISO8859-15/LC_COLLATE
+dir path=usr/lib/locale/en_CA.ISO8859-15/LC_CTYPE
+dir path=usr/lib/locale/en_CA.ISO8859-15/LC_MESSAGES
+dir path=usr/lib/locale/en_CA.ISO8859-15/LC_MONETARY
+dir path=usr/lib/locale/en_CA.ISO8859-15/LC_NUMERIC
+dir path=usr/lib/locale/en_CA.ISO8859-15/LC_TIME
+dir path=usr/lib/locale/en_CA.US-ASCII
+dir path=usr/lib/locale/en_CA.US-ASCII/LC_COLLATE
+dir path=usr/lib/locale/en_CA.US-ASCII/LC_CTYPE
+dir path=usr/lib/locale/en_CA.US-ASCII/LC_MESSAGES
+dir path=usr/lib/locale/en_CA.US-ASCII/LC_MONETARY
+dir path=usr/lib/locale/en_CA.US-ASCII/LC_NUMERIC
+dir path=usr/lib/locale/en_CA.US-ASCII/LC_TIME
+dir path=usr/lib/locale/en_CA.UTF-8
+dir path=usr/lib/locale/en_CA.UTF-8/LC_COLLATE
+dir path=usr/lib/locale/en_CA.UTF-8/LC_CTYPE
+dir path=usr/lib/locale/en_CA.UTF-8/LC_MESSAGES
+dir path=usr/lib/locale/en_CA.UTF-8/LC_MONETARY
+dir path=usr/lib/locale/en_CA.UTF-8/LC_NUMERIC
+dir path=usr/lib/locale/en_CA.UTF-8/LC_TIME
+dir path=usr/lib/locale/en_GB.ISO8859-1
+dir path=usr/lib/locale/en_GB.ISO8859-1/LC_COLLATE
+dir path=usr/lib/locale/en_GB.ISO8859-1/LC_CTYPE
+dir path=usr/lib/locale/en_GB.ISO8859-1/LC_MESSAGES
+dir path=usr/lib/locale/en_GB.ISO8859-1/LC_MONETARY
+dir path=usr/lib/locale/en_GB.ISO8859-1/LC_NUMERIC
+dir path=usr/lib/locale/en_GB.ISO8859-1/LC_TIME
+dir path=usr/lib/locale/en_GB.ISO8859-15
+dir path=usr/lib/locale/en_GB.ISO8859-15/LC_COLLATE
+dir path=usr/lib/locale/en_GB.ISO8859-15/LC_CTYPE
+dir path=usr/lib/locale/en_GB.ISO8859-15/LC_MESSAGES
+dir path=usr/lib/locale/en_GB.ISO8859-15/LC_MONETARY
+dir path=usr/lib/locale/en_GB.ISO8859-15/LC_NUMERIC
+dir path=usr/lib/locale/en_GB.ISO8859-15/LC_TIME
+dir path=usr/lib/locale/en_GB.US-ASCII
+dir path=usr/lib/locale/en_GB.US-ASCII/LC_COLLATE
+dir path=usr/lib/locale/en_GB.US-ASCII/LC_CTYPE
+dir path=usr/lib/locale/en_GB.US-ASCII/LC_MESSAGES
+dir path=usr/lib/locale/en_GB.US-ASCII/LC_MONETARY
+dir path=usr/lib/locale/en_GB.US-ASCII/LC_NUMERIC
+dir path=usr/lib/locale/en_GB.US-ASCII/LC_TIME
+dir path=usr/lib/locale/en_GB.UTF-8
+dir path=usr/lib/locale/en_GB.UTF-8/LC_COLLATE
+dir path=usr/lib/locale/en_GB.UTF-8/LC_CTYPE
+dir path=usr/lib/locale/en_GB.UTF-8/LC_MESSAGES
+dir path=usr/lib/locale/en_GB.UTF-8/LC_MONETARY
+dir path=usr/lib/locale/en_GB.UTF-8/LC_NUMERIC
+dir path=usr/lib/locale/en_GB.UTF-8/LC_TIME
+dir path=usr/lib/locale/en_IE.UTF-8
+dir path=usr/lib/locale/en_IE.UTF-8/LC_COLLATE
+dir path=usr/lib/locale/en_IE.UTF-8/LC_CTYPE
+dir path=usr/lib/locale/en_IE.UTF-8/LC_MESSAGES
+dir path=usr/lib/locale/en_IE.UTF-8/LC_MONETARY
+dir path=usr/lib/locale/en_IE.UTF-8/LC_NUMERIC
+dir path=usr/lib/locale/en_IE.UTF-8/LC_TIME
+dir path=usr/lib/locale/en_NZ.ISO8859-1
+dir path=usr/lib/locale/en_NZ.ISO8859-1/LC_COLLATE
+dir path=usr/lib/locale/en_NZ.ISO8859-1/LC_CTYPE
+dir path=usr/lib/locale/en_NZ.ISO8859-1/LC_MESSAGES
+dir path=usr/lib/locale/en_NZ.ISO8859-1/LC_MONETARY
+dir path=usr/lib/locale/en_NZ.ISO8859-1/LC_NUMERIC
+dir path=usr/lib/locale/en_NZ.ISO8859-1/LC_TIME
+dir path=usr/lib/locale/en_NZ.ISO8859-15
+dir path=usr/lib/locale/en_NZ.ISO8859-15/LC_COLLATE
+dir path=usr/lib/locale/en_NZ.ISO8859-15/LC_CTYPE
+dir path=usr/lib/locale/en_NZ.ISO8859-15/LC_MESSAGES
+dir path=usr/lib/locale/en_NZ.ISO8859-15/LC_MONETARY
+dir path=usr/lib/locale/en_NZ.ISO8859-15/LC_NUMERIC
+dir path=usr/lib/locale/en_NZ.ISO8859-15/LC_TIME
+dir path=usr/lib/locale/en_NZ.US-ASCII
+dir path=usr/lib/locale/en_NZ.US-ASCII/LC_COLLATE
+dir path=usr/lib/locale/en_NZ.US-ASCII/LC_CTYPE
+dir path=usr/lib/locale/en_NZ.US-ASCII/LC_MESSAGES
+dir path=usr/lib/locale/en_NZ.US-ASCII/LC_MONETARY
+dir path=usr/lib/locale/en_NZ.US-ASCII/LC_NUMERIC
+dir path=usr/lib/locale/en_NZ.US-ASCII/LC_TIME
+dir path=usr/lib/locale/en_NZ.UTF-8
+dir path=usr/lib/locale/en_NZ.UTF-8/LC_COLLATE
+dir path=usr/lib/locale/en_NZ.UTF-8/LC_CTYPE
+dir path=usr/lib/locale/en_NZ.UTF-8/LC_MESSAGES
+dir path=usr/lib/locale/en_NZ.UTF-8/LC_MONETARY
+dir path=usr/lib/locale/en_NZ.UTF-8/LC_NUMERIC
+dir path=usr/lib/locale/en_NZ.UTF-8/LC_TIME
+dir path=usr/lib/locale/en_US.ISO8859-1
+dir path=usr/lib/locale/en_US.ISO8859-1/LC_COLLATE
+dir path=usr/lib/locale/en_US.ISO8859-1/LC_CTYPE
+dir path=usr/lib/locale/en_US.ISO8859-1/LC_MESSAGES
+dir path=usr/lib/locale/en_US.ISO8859-1/LC_MONETARY
+dir path=usr/lib/locale/en_US.ISO8859-1/LC_NUMERIC
+dir path=usr/lib/locale/en_US.ISO8859-1/LC_TIME
+dir path=usr/lib/locale/en_US.ISO8859-15
+dir path=usr/lib/locale/en_US.ISO8859-15/LC_COLLATE
+dir path=usr/lib/locale/en_US.ISO8859-15/LC_CTYPE
+dir path=usr/lib/locale/en_US.ISO8859-15/LC_MESSAGES
+dir path=usr/lib/locale/en_US.ISO8859-15/LC_MONETARY
+dir path=usr/lib/locale/en_US.ISO8859-15/LC_NUMERIC
+dir path=usr/lib/locale/en_US.ISO8859-15/LC_TIME
+dir path=usr/lib/locale/en_US.US-ASCII
+dir path=usr/lib/locale/en_US.US-ASCII/LC_COLLATE
+dir path=usr/lib/locale/en_US.US-ASCII/LC_CTYPE
+dir path=usr/lib/locale/en_US.US-ASCII/LC_MESSAGES
+dir path=usr/lib/locale/en_US.US-ASCII/LC_MONETARY
+dir path=usr/lib/locale/en_US.US-ASCII/LC_NUMERIC
+dir path=usr/lib/locale/en_US.US-ASCII/LC_TIME
+dir path=usr/lib/locale/en_US.UTF-8
+dir path=usr/lib/locale/en_US.UTF-8/LC_COLLATE
+dir path=usr/lib/locale/en_US.UTF-8/LC_CTYPE
+dir path=usr/lib/locale/en_US.UTF-8/LC_MESSAGES
+dir path=usr/lib/locale/en_US.UTF-8/LC_MONETARY
+dir path=usr/lib/locale/en_US.UTF-8/LC_NUMERIC
+dir path=usr/lib/locale/en_US.UTF-8/LC_TIME
+file path=usr/lib/locale/en_AU.ISO8859-1/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.ISO8859-1/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.ISO8859-1/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.ISO8859-1/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.ISO8859-1/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.ISO8859-1/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.ISO8859-15/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.ISO8859-15/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.ISO8859-15/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.ISO8859-15/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.ISO8859-15/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.ISO8859-15/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.US-ASCII/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.US-ASCII/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.US-ASCII/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.US-ASCII/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.US-ASCII/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.US-ASCII/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.UTF-8/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.UTF-8/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.UTF-8/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.UTF-8/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.UTF-8/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_AU.UTF-8/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-1/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-1/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-1/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-1/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-1/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-1/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-15/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-15/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-15/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-15/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-15/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.ISO8859-15/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.US-ASCII/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.US-ASCII/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.US-ASCII/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.US-ASCII/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.US-ASCII/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.US-ASCII/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.UTF-8/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.UTF-8/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.UTF-8/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.UTF-8/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.UTF-8/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_CA.UTF-8/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-1/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-1/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-1/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-1/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-1/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-1/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-15/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-15/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-15/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-15/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-15/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.ISO8859-15/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.US-ASCII/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.US-ASCII/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.US-ASCII/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.US-ASCII/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.US-ASCII/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.US-ASCII/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.UTF-8/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.UTF-8/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.UTF-8/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.UTF-8/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.UTF-8/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_GB.UTF-8/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_IE.UTF-8/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_IE.UTF-8/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_IE.UTF-8/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_IE.UTF-8/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_IE.UTF-8/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_IE.UTF-8/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-1/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-1/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-1/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-1/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-1/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-1/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-15/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-15/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-15/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-15/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-15/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.ISO8859-15/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.US-ASCII/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.US-ASCII/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.US-ASCII/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.US-ASCII/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.US-ASCII/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.US-ASCII/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.UTF-8/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.UTF-8/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.UTF-8/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.UTF-8/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.UTF-8/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_NZ.UTF-8/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-1/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-1/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-1/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-1/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-1/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-1/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-15/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-15/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-15/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-15/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-15/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.ISO8859-15/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.US-ASCII/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.US-ASCII/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.US-ASCII/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.US-ASCII/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.US-ASCII/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.US-ASCII/LC_TIME/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.UTF-8/LC_COLLATE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.UTF-8/LC_CTYPE/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.UTF-8/LC_MESSAGES/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.UTF-8/LC_MONETARY/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.UTF-8/LC_NUMERIC/LCL_DATA mode=0444
+file path=usr/lib/locale/en_US.UTF-8/LC_TIME/LCL_DATA mode=0444
+license lic_CDDL license=lic_CDDL
--- a/usr/src/pkg/manifests/system-boot-real-mode.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/system-boot-real-mode.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -21,6 +21,7 @@
 
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
 #
 
 set name=pkg.fmri value=pkg:/system/boot/real-mode@$(PKGVERS)
@@ -39,11 +40,11 @@
 $(i386_ONLY)dir path=usr/lib
 $(i386_ONLY)dir path=usr/lib/fs group=sys
 $(i386_ONLY)dir path=usr/lib/fs/ufs group=sys
-$(i386_ONLY)file path=boot/solaris.xpm group=sys
 $(i386_ONLY)file path=boot/solaris/bootenv.rc group=sys \
     original_name=SUNWrmodr:boot/solaris/bootenv.rc preserve=true
 $(i386_ONLY)file path=boot/solaris/devicedb/master group=sys \
     original_name=SUNWrmod:boot/solaris/devicedb/master preserve=true
+$(i386_ONLY)file path=boot/splashimage.xpm group=sys
 $(i386_ONLY)file path=usr/lib/fs/ufs/mboot mode=0444
 $(i386_ONLY)legacy pkg=SUNWrmodr desc="Realmode Modules, (Root)" \
     name="Realmode Modules, (Root)"
--- a/usr/src/pkg/manifests/system-management-wbem-data-management.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/system-management-wbem-data-management.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -28,34 +28,12 @@
 set name=pkg.summary value="Solaris Data Management WBEM/CIM API"
 set name=info.classification \
     value="org.opensolaris.category.2008:System/Administration and Configuration"
-
-#
-# We skip automated dependencies for this package because it strictly
-# should depend on SUNWwbcou, but SUNWwbcou isn't available in the
-# main opensolaris.org repository and we don't want packages we
-# incorporate to depend on external packages.
-#
-set name=org.opensolaris.nodepend value=true
 set name=variant.arch value=$(ARCH)
 dir path=usr group=sys
 dir path=usr/lib
-dir path=usr/sadm
-dir path=usr/sadm/lib
-dir path=usr/sadm/lib/wbem group=sys
-dir path=usr/sadm/mof group=sys
-dir path=var group=sys
-dir path=var/sadm group=sys
-dir path=var/sadm/wbem group=sys
-dir path=var/sadm/wbem/logr group=sys
-dir path=var/sadm/wbem/logr/preReg group=sys
 file path=usr/lib/libfsmgt.so.1
 file path=usr/lib/llib-lfsmgt
 file path=usr/lib/llib-lfsmgt.ln
-file path=usr/sadm/lib/wbem/libWBEMdisk.so group=sys
-file path=usr/sadm/lib/wbem/libWBEMnfs.so group=sys
-file path=usr/sadm/mof/CIM2.7.mof group=sys
-file path=usr/sadm/mof/Solaris_DMGT1.0.mof group=sys
-file path=usr/sadm/mof/Solaris_NFS1.0.mof group=sys
 legacy pkg=SUNWdmgtr desc="software for WBEM/CIM data device management" \
     name="Solaris Data Management WBEM/CIM API (root)"
 legacy pkg=SUNWdmgtu desc="software for WBEM/CIM data device management" \
--- a/usr/src/pkg/manifests/system-management-wbem-resource-management.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/system-management-wbem-resource-management.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -23,44 +23,11 @@
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
+#
+# This remains $(PKGVERS) to ease upgrade from a stock onnv system, at
+# whatever build it may be.
+#
 set name=pkg.fmri \
     value=pkg:/system/management/wbem/resource-management@$(PKGVERS)
-set name=pkg.description value="Resource Management for Solaris"
-set name=pkg.summary value="Resource Management WBEM Instrumentation"
-set name=info.classification \
-    value="org.opensolaris.category.2008:System/Administration and Configuration"
+set name=pkg.obsolete value=true
 set name=variant.arch value=$(ARCH)
-dir path=usr group=sys
-dir path=usr/sadm
-dir path=usr/sadm/lib
-dir path=usr/sadm/lib/wbem group=sys
-dir path=usr/sadm/lib/wbem/$(ARCH32) group=sys
-dir path=usr/sadm/lib/wbem/$(ARCH64) group=sys
-dir path=usr/sadm/lib/wbem/com group=sys
-dir path=usr/sadm/lib/wbem/com/sun group=sys
-dir path=usr/sadm/lib/wbem/com/sun/wbem group=sys
-dir path=usr/sadm/lib/wbem/com/sun/wbem/solarisprovider group=sys
-dir path=usr/sadm/lib/wbem/com/sun/wbem/solarisprovider/srm group=sys
-dir path=usr/sadm/lib/wbem/com/sun/wbem/solarisprovider/srm/resources \
-    group=sys
-dir path=usr/sadm/mof group=sys
-file path=usr/sadm/lib/wbem/$(ARCH32)/rds mode=0555
-file path=usr/sadm/lib/wbem/$(ARCH64)/rds mode=0555
-file \
-    path=usr/sadm/lib/wbem/com/sun/wbem/solarisprovider/srm/perfprovider.properties \
-    group=sys
-file \
-    path=usr/sadm/lib/wbem/com/sun/wbem/solarisprovider/srm/resources/Exceptions.properties \
-    group=sys
-file \
-    path=usr/sadm/lib/wbem/com/sun/wbem/solarisprovider/srm/resources/LogMessages.properties \
-    group=sys
-file path=usr/sadm/lib/wbem/perfprovider.jar group=sys
-file path=usr/sadm/mof/Solaris_Performance1.0.mof group=sys
-hardlink path=usr/sadm/lib/wbem/rds target=../../../lib/isaexec
-legacy pkg=SUNWrmwbr desc="Resource Management for Solaris" \
-    name="Resource Management WBEM Instrumentation (root)"
-legacy pkg=SUNWrmwbu desc="Resource Management for Solaris" \
-    name="Resource Management WBEM Instrumentation (usr)"
-license cr_Sun license=cr_Sun
-license lic_CDDL license=lic_CDDL
--- a/usr/src/pkg/manifests/system-xopen-xcu4.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/system-xopen-xcu4.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -71,7 +71,6 @@
 file path=usr/xpg4/bin/sort mode=0555
 file path=usr/xpg4/bin/stty mode=0555
 file path=usr/xpg4/bin/tail mode=0555
-file path=usr/xpg4/bin/tr mode=0555
 file path=usr/xpg4/bin/who mode=0555
 hardlink path=usr/xpg4/bin/bg target=../../../usr/xpg4/bin/alias
 hardlink path=usr/xpg4/bin/cd target=../../../usr/xpg4/bin/alias
@@ -106,3 +105,4 @@
 license lic_OSBL license=lic_OSBL
 license lic_OSBL_preamble license=lic_OSBL_preamble
 link path=usr/xpg4/bin/ipcs target=../../bin/ipcs
+link path=usr/xpg4/bin/tr target=../../bin/tr
--- a/usr/src/pkg/manifests/system-xopen-xcu6.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/system-xopen-xcu6.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -41,7 +41,6 @@
 file path=usr/xpg6/bin/expr mode=0555
 file path=usr/xpg6/bin/getconf mode=0555
 file path=usr/xpg6/bin/ls mode=0555
-file path=usr/xpg6/bin/tr mode=0555
 hardlink path=usr/xpg6/bin/ex target=../../../usr/xpg6/bin/edit
 hardlink path=usr/xpg6/bin/vedit target=../../../usr/xpg6/bin/edit
 hardlink path=usr/xpg6/bin/vi target=../../../usr/xpg6/bin/edit
@@ -52,4 +51,5 @@
 license cr_Sun license=cr_Sun
 license lic_CDDL license=lic_CDDL
 link path=usr/xpg6/bin/stty target=../../bin/stty
+link path=usr/xpg6/bin/tr target=../../bin/tr
 link path=usr/xpg6/bin/xargs target=../../bin/xargs
--- a/usr/src/pkg/manifests/text-locale.mf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/pkg/manifests/text-locale.mf	Thu Sep 09 11:46:43 2010 -0400
@@ -38,13 +38,6 @@
 dir path=usr/lib/iconv/geniconvtbl
 dir path=usr/lib/iconv/geniconvtbl/binarytables
 dir path=usr/lib/iconv/geniconvtbl/srcs
-dir path=usr/lib/locale
-dir path=usr/lib/locale/iso_8859_1
-dir path=usr/lib/locale/iso_8859_1/$(ARCH64)
-dir path=usr/lib/locale/iso_8859_1/LC_CTYPE
-dir path=usr/lib/localedef
-dir path=usr/lib/localedef/src
-dir path=usr/lib/localedef/src/iso_8859_1
 file path=usr/bin/gencat mode=0555
 file path=usr/bin/genmsg mode=0555
 file path=usr/bin/gettxt mode=0555
@@ -66,11 +59,6 @@
 file path=usr/lib/iconv/geniconvtbl/srcs/ISO8859-1_to_UTF-8.src mode=0444
 file path=usr/lib/iconv/geniconvtbl/srcs/UTF-8_to_ISO8859-1.src mode=0444
 file path=usr/lib/iconv/geniconvtbl/srcs/eucJP_to_ISO-2022-JP.src mode=0444
-file path=usr/lib/locale/iso_8859_1/$(ARCH64)/iso_8859_1.so.3 mode=0555
-file path=usr/lib/locale/iso_8859_1/iso_8859_1.so.3 mode=0555
-file path=usr/lib/localedef/src/iso_8859_1/charmap.src mode=0444
-file path=usr/lib/localedef/src/iso_8859_1/extension.src mode=0444
-file path=usr/lib/localedef/src/iso_8859_1/localedef.src mode=0444
 legacy pkg=SUNWloc \
     desc="localization utilities and C locale (POSIX default) definitions" \
     name="System Localization"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/prototypes/README	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,21 @@
+To ensure that everyone can use the same boilerplate text without triggering
+copyright ownership because of the boilerplate itself, I hereby place the
+following text in the public domain, which should be used to reference the
+CDDL version 1.0 for each new file introduced in illumos.
+
+	- Garrett D'Amore
+
+/*
+ * 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 version
+ * 1.0 of the CDDL.
+ *
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy is of the CDDL is also available via the Internet
+ * at http://www.illumos.org/license/CDDL.
+ */
+
+/*
+ * Copyright 2010 <contributor>.  All rights reserved.
+ */
--- a/usr/src/prototypes/prototype.Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -1,25 +1,15 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
 #
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
+# 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 version
+# 1.0 of the CDDL.
 #
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
 #
 
 #
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2010 <contributor>.  All rights reserved.
 #
 
--- a/usr/src/prototypes/prototype.c	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.c	Thu Sep 09 11:46:43 2010 -0400
@@ -1,47 +1,19 @@
 /*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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 version
+ * 1.0 of the CDDL.
  *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy is of the CDDL is also available via the Internet
+ * at http://www.illumos.org/license/CDDL.
  */
 
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2010 <contributor>.  All rights reserved.
  */
 
 /*
- * Block comment that describes the contents of this file.
+ * Describe the purpose of this file.
  */
 
-#include <includes.h>
-
-#define	MACROS values
-
-struct tag {
-	type_t member;
-};
-
-typedef predefined_types new_types;
-
-type_t global_variables;
-
-void function_declarations(void);
-
-void
-function_definitions(void)
-{
-}
--- a/usr/src/prototypes/prototype.csh	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.csh	Thu Sep 09 11:46:43 2010 -0400
@@ -1,26 +1,17 @@
 #! /usr/bin/csh
 #
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
 #
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
+# 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.
 #
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
 #
 
 #
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2010 <contributor>.  All rights reserved.
 #
 
--- a/usr/src/prototypes/prototype.h	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.h	Thu Sep 09 11:46:43 2010 -0400
@@ -1,55 +1,33 @@
 /*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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 version
+ * 1.0 of the CDDL.
  *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy is of the CDDL is also available via the Internet
+ * at http://www.illumos.org/license/CDDL.
  */
 
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2010 <contributor>.  All rights reserved.
  */
 
-#ifndef _HEADER_H
-#define	_HEADER_H
+#ifndef _PROTOTYPE_H
+#define	_PROTOTYPE_H
 
 /*
- * Block comment that describes the contents of this file.
+ * Describe the purpose of the file here.
  */
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include <includes.h>
-
-#define	MACROS values
-
-struct tag {
-	type_t member;
-};
-
-typedef predefined_types new_types;
-
-type_t global_variables;
-
-void functions(void);
+/* Put your definitions in here */
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* _HEADER_H */
+#endif /* _PROTOTYPE_H */
--- a/usr/src/prototypes/prototype.java	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.java	Thu Sep 09 11:46:43 2010 -0400
@@ -1,28 +1,18 @@
 /*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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 version
+ * 1.0 of the CDDL.
  *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy is of the CDDL is also available via the Internet
+ * at http://www.illumos.org/license/CDDL.
  */
 
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2010 <contributor>.  All rights reserved.
  */
 
 /*
- * Comment that describes the contents of this file.
+ * Document the purpose of the file here.
  */
--- a/usr/src/prototypes/prototype.ksh	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.ksh	Thu Sep 09 11:46:43 2010 -0400
@@ -1,26 +1,17 @@
 #! /usr/bin/ksh
 #
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
 #
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
+# 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 version
+# 1.0 of the CDDL.
 #
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
 #
 
 #
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2010 <contributor>.  All rights reserved.
 #
 
--- a/usr/src/prototypes/prototype.man	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.man	Thu Sep 09 11:46:43 2010 -0400
@@ -1,22 +1,13 @@
-.\" CDDL HEADER START
 .\"
-.\" The contents of this file are subject to the terms of the
-.\" Common Development and Distribution License (the "License").
-.\" You may not use this file except in compliance with the License.
-.\"
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-.\" or http://www.opensolaris.org/os/licensing.
-.\" See the License for the specific language governing permissions
-.\" and limitations under the License.
+.\" 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 version
+.\" 1.0 of the CDDL.
 .\"
-.\" When distributing Covered Code, include this CDDL HEADER in each
-.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-.\" If applicable, add the following below this CDDL HEADER, with the
-.\" fields enclosed by brackets "[]" replaced with your own identifying
-.\" information: Portions Copyright [yyyy] [name of copyright owner]
+.\" A full copy of the text of the CDDL should have accompanied this
+.\" source.  A copy is of the CDDL is also available via the Internet
+.\" at http://www.illumos.org/license/CDDL.
 .\"
-.\" CDDL HEADER END
 .\"
-.\" Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+.\" Copyright 2010 <contributor>.  All rights reserved.
 .\"
-
--- a/usr/src/prototypes/prototype.mapfile-vers	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.mapfile-vers	Thu Sep 09 11:46:43 2010 -0400
@@ -1,26 +1,16 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
 #
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
+# 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 version
+# 1.0 of the CDDL.
 #
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
 #
 
 #
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2010 <contributor>.  All rights reserved.
 #
 
 #
--- a/usr/src/prototypes/prototype.pl	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.pl	Thu Sep 09 11:46:43 2010 -0400
@@ -1,31 +1,22 @@
 #! /usr/perl5/bin/perl
 #
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
+# 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 version
+# 1.0 of the CDDL.
 #
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
 #
 
 #
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2010 <contributor>.  All rights reserved.
 #
 
 #
-# Block comment that describes the contents of this file.
+# Describe this file here.  Note that the strict and warnings below should
+# always be left on.
 #
 
 use strict;
--- a/usr/src/prototypes/prototype.py	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.py	Thu Sep 09 11:46:43 2010 -0400
@@ -1,30 +1,20 @@
 #! /usr/bin/python
 #
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
+# 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 version
+# 1.0 of the CDDL.
 #
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
 #
 
 #
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2010 <contributor>.  All rights reserved.
 #
 
 #
-# Block comment that describes the contents of this file.
+# Describe the purpose of this file here.
 #
 
--- a/usr/src/prototypes/prototype.s	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.s	Thu Sep 09 11:46:43 2010 -0400
@@ -1,36 +1,26 @@
 /*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
+ * 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 version
+ * 1.0 of the CDDL.
  *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
+ * A full copy of the text of the CDDL should have accompanied this
+ * source.  A copy is of the CDDL is also available via the Internet
+ * at http://www.illumos.org/license/CDDL.
  */
 
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2010 <contributor>.  All rights reserved.
  */
 
 	.file	"prototype.s"
 
 /*
- * Block comment that describes the contents of this file.
+ * Describe the purpose of this file here.
  */
 
 #include <sys/asm_linkage.h>
 
-	ENTRY(function)
+	ENTRY(symbol_name)
 
-	SET_SIZE(function)
+	SET_SIZE(symbol_name)
--- a/usr/src/prototypes/prototype.sh	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/prototypes/prototype.sh	Thu Sep 09 11:46:43 2010 -0400
@@ -1,25 +1,17 @@
 #! /usr/bin/sh
 #
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
 #
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
+# 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.
 #
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
+# A full copy of the text of the CDDL should have accompanied this
+# source.  A copy is of the CDDL is also available via the Internet
+# at http://www.illumos.org/license/CDDL.
 #
 
 #
-# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2010 <contributor>.  All rights reserved.
 #
+
--- a/usr/src/tools/README.tools	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/README.tools	Thu Sep 09 11:46:43 2010 -0400
@@ -225,9 +225,6 @@
 lintdump
 	dumps the contents of one or more lint libraries; see lintdump(1)
 
-keywords
-	checks files for proper SCCS keywords.
-
 ndrgen
 	Network Data Language (NDL) RPC protocol compiler to support DCE
 	RPC/MSRPC and SMB/CIFS.  ndrgen takes an input protocol definition
@@ -256,27 +253,6 @@
 protolist
 	create a list of what's in the proto area, to feed to protocmp.
 
-rtichk
-	checks that a set of CRs have approved RTIs.  Primarily used
-	by wx
-
-sccscp
-	copy a file under SCCS control to another location in a workspace.
-	also updates teamware's nametable.
-
-sccshist
-	Display the history, comments and diffs, of a file under SCCS
-	control.
-
-sccsmv
-	rename a file under SCCS control to another location in a workspace.
-	also updates teamware's nametable.
-
-sccsrm
-	delete a file under SCCS control workspace. also updates teamware's
-	nametable. Actually renames it to .del-<file>-`date` so that others
-	will see it move when it is brought over (in case they were working
-	on it).
 
 ws
 	creates a shell with the environment set up to build in the given
@@ -284,14 +260,6 @@
 	to pull headers and libraries from the proto area of the parent if
 	they aren't in the childs proto area.
 
-wx
-	A great workspace tool by bonwick. See wx.README for information
-	and warnings.
-
-wx2hg
-	Converts a TeamWare workspace under the control of wx to a
-	Mercurial workspace, discarding intermediate deltas.
-
 tokenize
 	Used to build the sun4u boot block.
 
@@ -344,6 +312,6 @@
 
 1.  Add the tool in its appropriate place.
 2.  Update the Makefile as required.
-3.  Update usr/src/tools/SUNWonbld/prototype_*.
+3.  Update usr/src/pkg/manifests/developer-build-onbld.mf
 4.  Update usr/src/tools/README.tools (this file).
 5.  Repeat 1-4 for any man pages.
--- a/usr/src/tools/env/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/env/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -24,7 +24,7 @@
 ENVFILES= \
 	developer \
 	gatekeeper \
-	opensolaris
+	illumos
 
 include ../Makefile.tools
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/tools/env/illumos.sh	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,173 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+#
+
+#	Configuration variables for the runtime environment of the nightly
+# build script and other tools for construction and packaging of releases.
+# This script is sourced by 'nightly' and 'bldenv' to set up the environment
+# for the build. This example is suitable for building an OpenSolaris
+# workspace, which will contain the resulting archives. It is based
+# off the onnv release. It sets NIGHTLY_OPTIONS to make nightly do:
+#	DEBUG build only (-D, -F)
+#	do not bringover from the parent (-n)
+#	runs 'make check' (-C)
+#	runs lint in usr/src (-l plus the LINTDIRS variable)
+#	sends mail on completion (-m and the MAILTO variable)
+#	creates packages for PIT/RE (-p)
+#	checks for changes in ELF runpaths (-r)
+#	build and use this workspace's tools in $SRC/tools (-t)
+#
+NIGHTLY_OPTIONS="-FnCDlmprt";		export NIGHTLY_OPTIONS
+
+# This is a variable for the rest of the script - GATE doesn't matter to
+# nightly itself
+GATE=testws;			export GATE
+
+# CODEMGR_WS - where is your workspace at (or what should nightly name it)
+CODEMGR_WS="/export/$GATE";			export CODEMGR_WS
+
+# Maximum number of dmake jobs.  The recommended number is 2 + NCPUS,
+# where NCPUS is the number of logical CPUs on your build system.
+maxjobs() {
+	ncpu=`kstat -p cpu_info:::state | grep -c on-line`
+	expr $ncpu + 2
+}
+DMAKE_MAX_JOBS=`maxjobs`;			export DMAKE_MAX_JOBS
+
+# path to onbld tool binaries
+ONBLD_BIN="/opt/onbld/bin"
+
+# PARENT_WS is used to determine the parent of this workspace. This is
+# for the options that deal with the parent workspace (such as where the
+# proto area will go).
+PARENT_WS="";			export PARENT_WS
+
+# CLONE_WS is the workspace nightly should do a bringover from.
+CLONE_WS="http://hg.illumos.org/illumos-gate"
+export CLONE_WS
+
+# The bringover, if any, is done as STAFFER.
+# Set STAFFER to your own login as gatekeeper or developer
+# The point is to use group "staff" and avoid referencing the parent
+# workspace as root.
+# Some scripts optionally send mail messages to MAILTO.
+#
+STAFFER=nobody;				export STAFFER
+MAILTO=$STAFFER;			export MAILTO
+
+# The project (see project(4)) under which to run this build.  If not
+# specified, the build is simply run in a new task in the current project.
+BUILD_PROJECT=;				export BUILD_PROJECT
+
+# You should not need to change the next four lines
+LOCKNAME="`basename $CODEMGR_WS`_nightly.lock"; export LOCKNAME
+ATLOG="$CODEMGR_WS/log";			export ATLOG
+LOGFILE="$ATLOG/nightly.log";			export LOGFILE
+MACH=`uname -p`;				export MACH
+
+#
+#  The following two macros are the closed/crypto binaries.  Once
+#  Illumos has totally freed itself, we can remove these references.
+#
+# Location of encumbered binaries.
+ON_CLOSED_BINS="$CODEMGR_WS/closed";		export ON_CLOSED_BINS
+# Location of signed cryptographic binaries.
+ON_CRYPTO_BINS="$CODEMGR_WS/on-crypto.$MACH.tar.bz2"; export ON_CRYPTO_BINS
+
+# REF_PROTO_LIST - for comparing the list of stuff in your proto area
+# with. Generally this should be left alone, since you want to see differences
+# from your parent (the gate).
+#
+REF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST
+
+#
+#	build environment variables, including version info for mcs, motd,
+# motd, uname and boot messages. Mostly you shouldn't change this except
+# when the release slips (nah) or you move an environment file to a new
+# release
+#
+ROOT="$CODEMGR_WS/proto/root_${MACH}";	export ROOT
+SRC="$CODEMGR_WS/usr/src";         	export SRC
+VERSION="$GATE";			export VERSION
+
+#
+# the RELEASE and RELEASE_DATE variables are set in Makefile.master;
+# there might be special reasons to override them here, but that
+# should not be the case in general
+#
+# RELEASE="5.11";			export RELEASE
+# RELEASE_DATE="October 2007";		export RELEASE_DATE
+
+# proto area in parent for optionally depositing a copy of headers and
+# libraries corresponding to the protolibs target
+# not applicable given the NIGHTLY_OPTIONS
+#
+PARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT
+PARENT_TOOLS_ROOT=$PARENT_WS/usr/src/tools/proto/root_$MACH-nd; export PARENT_TOOLS_ROOT
+
+# Package creation variables.  You probably shouldn't change these,
+# either.
+#
+# PKGARCHIVE determines where the repository will be created.
+#
+# PKGPUBLISHER_REDIST controls the publisher setting for the repository.
+#
+PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly";	export PKGARCHIVE
+# PKGPUBLISHER_REDIST="on-redist";			export PKGPUBLISHER_REDIST
+
+# we want make to do as much as it can, just in case there's more than
+# one problem.
+MAKEFLAGS=k;	export MAKEFLAGS
+
+# Magic variable to prevent the devpro compilers/teamware from sending
+# mail back to devpro on every use.
+UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
+
+# Build tools - don't change these unless you know what you're doing.  These
+# variables allows you to get the compilers and onbld files locally or
+# through cachefs.  Set BUILD_TOOLS to pull everything from one location.
+# Alternately, you can set ONBLD_TOOLS to where you keep the contents of
+# SUNWonbld and SPRO_ROOT to where you keep the compilers.  SPRO_VROOT
+# exists to make it easier to test new versions of the compiler.
+BUILD_TOOLS=/opt;				export BUILD_TOOLS
+#ONBLD_TOOLS=/opt/onbld;			export ONBLD_TOOLS
+SPRO_ROOT=/opt/SUNWspro;			export SPRO_ROOT
+SPRO_VROOT=$SPRO_ROOT;				export SPRO_VROOT
+
+# This goes along with lint - it is a series of the form "A [y|n]" which
+# means "go to directory A and run 'make lint'" Then mail me (y) the
+# difference in the lint output. 'y' should only be used if the area you're
+# linting is actually lint clean or you'll get lots of mail.
+# You shouldn't need to change this though.
+#LINTDIRS="$SRC y";	export LINTDIRS
+
+# Set this flag to 'n' to disable the automatic validation of the dmake
+# version in use.  The default is to check it.
+#CHECK_DMAKE=y
+
+# Set this flag to 'n' to disable the use of 'checkpaths'.  The default,
+# if the 'N' option is not specified, is to run this test.
+#CHECK_PATHS=y
+
+# POST_NIGHTLY can be any command to be run at the end of nightly.  See
+# nightly(1) for interactions between environment variables and this command.
+#POST_NIGHTLY=
--- a/usr/src/tools/env/opensolaris.sh	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,182 +0,0 @@
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-# Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-#	Configuration variables for the runtime environment of the nightly
-# build script and other tools for construction and packaging of releases.
-# This script is sourced by 'nightly' and 'bldenv' to set up the environment
-# for the build. This example is suitable for building an OpenSolaris
-# workspace, which will contain the resulting archives. It is based
-# off the onnv release. It sets NIGHTLY_OPTIONS to make nightly do:
-#	DEBUG build only (-D, -F)
-#	do not bringover from the parent (-n)
-#	runs 'make check' (-C)
-#	runs lint in usr/src (-l plus the LINTDIRS variable)
-#	sends mail on completion (-m and the MAILTO variable)
-#	creates packages for PIT/RE (-p)
-#	checks for changes in ELF runpaths (-r)
-#	build and use this workspace's tools in $SRC/tools (-t)
-#
-NIGHTLY_OPTIONS="-FnCDlmprt";		export NIGHTLY_OPTIONS
-
-# This is a variable for the rest of the script - GATE doesn't matter to
-# nightly itself
-GATE=testws;			export GATE
-
-# CODEMGR_WS - where is your workspace at (or what should nightly name it)
-CODEMGR_WS="/export/$GATE";			export CODEMGR_WS
-
-# Location of encumbered binaries.
-ON_CLOSED_BINS="$CODEMGR_WS/closed";		export ON_CLOSED_BINS
-
-# This flag controls whether to build the closed source.  If
-# undefined, nightly(1) and bldenv(1) will set it according to whether
-# the closed source tree is present.  CLOSED_IS_PRESENT="no" means not
-# building the closed sources.
-# CLOSED_IS_PRESENT="no";		export CLOSED_IS_PRESENT
-
-# Maximum number of dmake jobs.  The recommended number is 2 + (2 *
-# NCPUS), where NCPUS is the number of CPUs on your build system.
-maxjobs() {
-	ncpu=`/usr/sbin/psrinfo -p`
-	expr $ncpu \* 2 + 2
-}
-DMAKE_MAX_JOBS=`maxjobs`;			export DMAKE_MAX_JOBS
-
-# path to onbld tool binaries
-ONBLD_BIN="/opt/onbld/bin"
-
-# PARENT_WS is used to determine the parent of this workspace. This is
-# for the options that deal with the parent workspace (such as where the
-# proto area will go).
-PARENT_WS="";			export PARENT_WS
-
-# CLONE_WS is the workspace nightly should do a bringover from.
-CLONE_WS="ssh://anon@hg.opensolaris.org//hg/onnv/onnv-gate"
-export CLONE_WS
-
-# The bringover, if any, is done as STAFFER.
-# Set STAFFER to your own login as gatekeeper or developer
-# The point is to use group "staff" and avoid referencing the parent
-# workspace as root.
-# Some scripts optionally send mail messages to MAILTO.
-#
-STAFFER=nobody;				export STAFFER
-MAILTO=$STAFFER;			export MAILTO
-
-# The project (see project(4)) under which to run this build.  If not
-# specified, the build is simply run in a new task in the current project.
-BUILD_PROJECT=;				export BUILD_PROJECT
-
-# You should not need to change the next four lines
-LOCKNAME="`basename $CODEMGR_WS`_nightly.lock"; export LOCKNAME
-ATLOG="$CODEMGR_WS/log";			export ATLOG
-LOGFILE="$ATLOG/nightly.log";			export LOGFILE
-MACH=`uname -p`;				export MACH
-
-# Location of signed cryptographic binaries.
-ON_CRYPTO_BINS="$CODEMGR_WS/on-crypto.$MACH.tar.bz2"
-export ON_CRYPTO_BINS
-
-# REF_PROTO_LIST - for comparing the list of stuff in your proto area
-# with. Generally this should be left alone, since you want to see differences
-# from your parent (the gate).
-#
-REF_PROTO_LIST=$PARENT_WS/usr/src/proto_list_${MACH}; export REF_PROTO_LIST
-
-#
-#	build environment variables, including version info for mcs, motd,
-# motd, uname and boot messages. Mostly you shouldn't change this except
-# when the release slips (nah) or you move an environment file to a new
-# release
-#
-ROOT="$CODEMGR_WS/proto/root_${MACH}";	export ROOT
-SRC="$CODEMGR_WS/usr/src";         	export SRC
-VERSION="$GATE";			export VERSION
-
-#
-# the RELEASE and RELEASE_DATE variables are set in Makefile.master;
-# there might be special reasons to override them here, but that
-# should not be the case in general
-#
-# RELEASE="5.11";			export RELEASE
-# RELEASE_DATE="October 2007";		export RELEASE_DATE
-
-# proto area in parent for optionally depositing a copy of headers and
-# libraries corresponding to the protolibs target
-# not applicable given the NIGHTLY_OPTIONS
-#
-PARENT_ROOT=$PARENT_WS/proto/root_$MACH; export PARENT_ROOT
-PARENT_TOOLS_ROOT=$PARENT_WS/usr/src/tools/proto/root_$MACH-nd; export PARENT_TOOLS_ROOT
-
-# Package creation variables.  You probably shouldn't change these,
-# either.
-#
-# PKGARCHIVE determines where the repository will be created.
-#
-# PKGPUBLISHER_REDIST controls the publisher setting for the repository.
-#
-PKGARCHIVE="${CODEMGR_WS}/packages/${MACH}/nightly";	export PKGARCHIVE
-# PKGPUBLISHER_REDIST="on-redist";			export PKGPUBLISHER_REDIST
-
-# we want make to do as much as it can, just in case there's more than
-# one problem.
-MAKEFLAGS=k;	export MAKEFLAGS
-
-# Magic variable to prevent the devpro compilers/teamware from sending
-# mail back to devpro on every use.
-UT_NO_USAGE_TRACKING="1"; export UT_NO_USAGE_TRACKING
-
-# Build tools - don't change these unless you know what you're doing.  These
-# variables allows you to get the compilers and onbld files locally or
-# through cachefs.  Set BUILD_TOOLS to pull everything from one location.
-# Alternately, you can set ONBLD_TOOLS to where you keep the contents of
-# SUNWonbld and SPRO_ROOT to where you keep the compilers.  SPRO_VROOT
-# exists to make it easier to test new versions of the compiler.
-BUILD_TOOLS=/opt;				export BUILD_TOOLS
-#ONBLD_TOOLS=/opt/onbld;			export ONBLD_TOOLS
-SPRO_ROOT=/opt/SUNWspro;			export SPRO_ROOT
-SPRO_VROOT=$SPRO_ROOT;				export SPRO_VROOT
-
-# This goes along with lint - it is a series of the form "A [y|n]" which
-# means "go to directory A and run 'make lint'" Then mail me (y) the
-# difference in the lint output. 'y' should only be used if the area you're
-# linting is actually lint clean or you'll get lots of mail.
-# You shouldn't need to change this though.
-#LINTDIRS="$SRC y";	export LINTDIRS
-
-# Set this flag to 'n' to disable the automatic validation of the dmake
-# version in use.  The default is to check it.
-#CHECK_DMAKE=y
-
-# Set this flag to 'n' to disable the use of 'checkpaths'.  The default,
-# if the 'N' option is not specified, is to run this test.
-#CHECK_PATHS=y
-
-# BRINGOVER_FILES is the list of files nightly passes to bringover.
-# If not set the default is "usr", but it can be used for bringing
-# over deleted_files or other nifty directories.
-#BRINGOVER_FILES="usr deleted_files"
-
-# POST_NIGHTLY can be any command to be run at the end of nightly.  See
-# nightly(1) for interactions between environment variables and this command.
-#POST_NIGHTLY=
--- a/usr/src/tools/onbld/Checks/Comments.py	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/onbld/Checks/Comments.py	Thu Sep 09 11:46:43 2010 -0400
@@ -25,46 +25,46 @@
 # Use is subject to license terms.
 #
 
+# Copyright 2007, 2010 Richard Lowe
+
 #
 # Check delta comments:
 # 	- Have the correct form.
-# 	- Have a synopsis matching that of the CR or ARC case.
+# 	- Have a synopsis matching that of the bug
 # 	- Appear only once.
 #
 
 import re, sys
-from onbld.Checks.DbLookups import BugDB, ARC
+from onbld.Checks.DbLookups import BugDB
+
 
-arcre = re.compile(r'^([A-Z][A-Z]*ARC[/ \t][12]\d{3}/\d{3}) (.*)$')
-bugre = re.compile(r'^(\d{7}) (.*)$')
+bugre = re.compile(r'^(\d{2,7}) (.*)$')
 
-def isARC(comment):
-	return arcre.match(comment)
 
 def isBug(comment):
 	return bugre.match(comment)
 
-#
-# Translate any acceptable case number format into "<ARC> <YEAR>/<NUM>"
-# format.
-#
-def normalize_arc(caseid):
-	return re.sub(r'^([A-Z][A-Z]*ARC)[/ \t]', '\\1 ', caseid)
 
-def comchk(comments, check_db=True, output=sys.stderr, arcPath=None):
+def comchk(comments, check_db=True, output=sys.stderr):
 	'''Validate checkin comments against ON standards.
 
 	Comments must be a list of one-line comments, with no trailing
 	newline.
-	
-	If check_db is True (the default), validate CR and ARC
-	synopses against the databases.
+
+	If check_db is True (the default), validate bug synopses against the
+	databases.
 
 	Error messages intended for the user are written to output,
 	which defaults to stderr
 	'''
-	bugnospcre = re.compile(r'^(\d{7})([^ ].*)')
-	ignorere = re.compile(r'^(Portions contributed by |Contributed by |back[ -]?out )')
+	bugnospcre = re.compile(r'^(\d{2,7})([^ ].*)')
+	ignorere = re.compile(r'^(' +
+                              r'Portions contributed by|' +
+                              r'Contributed by|' +
+                              r'Reviewed[ -]by|' +
+                              r'Approved[ -]by|' +
+                              r'back[ -]?out)' +
+                              r'[: ]')
 
 	errors = { 'bugnospc': [],
 		   'mutant': [],
@@ -72,7 +72,6 @@
 		   'nomatch': [],
 		   'nonexistent': [] }
 	bugs = {}
-	arcs = {}
 	ret = 0
 	blanks = False
 
@@ -109,13 +108,6 @@
 			errors['bugnospc'].append(com)
 			continue
 
-		# ARC case
-		match = arcre.search(com)
-		if match:
-			arc, case = re.split('[/ \t]', match.group(1), 1)
-			arcs.setdefault((arc, case), []).append(match.group(2))
-			continue
-
 		# Anything else is bogus
 		errors['mutant'].append(com)
 
@@ -146,35 +138,6 @@
 				errors['nomatch'].append([crid, synopsis,
 							entered])
 
-	if check_db:
-		valid = ARC(arcs.keys(), arcPath)
-
-	for case, insts in arcs.iteritems():
-		if len(insts) > 1:
-			errors['dup'].append(' '.join(case))
-
- 		if not check_db:
-			continue
-                
-		if not case in valid:
-			errors['nonexistent'].append(' '.join(case))
-			continue
-
-		#
-		# We first try a direct match between the actual case name
-		# and the entered comment.  If that fails we remove a possible
-		# trailing (fix nit)-type comment, and re-try.
-		#
-		for entered in insts:
-			if entered == valid[case]:
-				break
-			else:
-				# Try again with trailing (fix ...) removed.
-				dbcom = re.sub(r' \([^)]+\)$', '', entered)
-				if dbcom != valid[case]:
-					errors['nomatch'].append(
-						[' '.join(case), valid[case],
-						 entered])
 
 	if blanks:
 		output.write("WARNING: Blank line(s) in comments\n")
@@ -196,23 +159,22 @@
 
 	if errors['mutant']:
 		ret = 1
-		output.write("These comments are neither bug nor ARC case:\n")
+		output.write("These comments are not valid bugs:\n")
 		for com in errors['mutant']:
 			output.write("  %s\n" % com)
 
 	if errors['nonexistent']:
 		ret = 1
-		output.write("These bugs/ARC cases were not found in the "
-			     "databases:\n")
+		output.write("These bugs were not found in the databases:\n")
 		for id in errors['nonexistent']:
 			output.write("  %s\n" % id)
 
 	if errors['nomatch']:
 		ret = 1
-		output.write("These bugs/ARC case synopsis/names don't match "
+		output.write("These bug synopses don't match "
 			     "the database entries:\n")
 		for err in errors['nomatch']:
-			output.write("Synopsis/name of %s is wrong:\n" % err[0])
+			output.write("Synopsis of %s is wrong:\n" % err[0])
 			output.write("  should be: '%s'\n" % err[1])
 			output.write("         is: '%s'\n" % err[2])
 
--- a/usr/src/tools/onbld/Checks/Copyright.py	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/onbld/Checks/Copyright.py	Thu Sep 09 11:46:43 2010 -0400
@@ -24,112 +24,40 @@
 # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
-#
-# Make sure there is a correctly formed copyright message containing
-# the current year.
-#
-# We treat extant but incorrect copyrights of known format as present
-# for the purposes of the "no copyright found" messages to avoid
-# treating every otherwise incorrect copyright as also not present
-# 
+# Copyright 2008, 2010, Richard Lowe
+
+# Make sure there is a copyright claim for the current year.
 
 import time, re, sys
 
-def err(stream, msg, fname, line=None):
-	if line:
-		stream.write("%s: %d: %s\n" % (fname, line, msg))
-	else:
-		stream.write("%s: %s\n" % (fname, msg))
-
-# pre-2002 copyright with '(c)'
-oldcopyright = re.compile(r'Copyright \(c\) .* Sun Microsystems, Inc\.')
-
-# pre-2002 copyright with 'by'
-oldcopyright1 = re.compile(r'Copyright .* by Sun Microsystems, Inc\.')
+def err(stream, msg, fname):
+	stream.write("%s: %s\n" % (fname, msg))
 
-# last valid Sun copyright
-suncopyright = re.compile(r'Copyright ([\d, -]+) Sun Microsystems, Inc\.' +
-			  r'(\s+)(All rights reserved\.)?')
+def is_copyright(line):
+	return re.search(r'Copyright (?!\[yyyy\])', line)
 
-# old, check to make sure no longer present
-licterms = 'Use is subject to license terms.'
-
-# initial Oracle copyright
-goodcopyright = re.compile(r'Copyright \(c\) (\d\d\d\d, )?(\d\d\d\d)(,)? ' +
-			   r'Oracle and/or its affiliates\.(\s+)' +
-			   r'All rights reserved\.')
+def is_current_copyright(line):
+	return re.search(r'Copyright.*\b%s\b' % time.strftime('%Y'), line)
 
 def copyright(fh, filename=None, output=sys.stderr):
-	ret = lineno = rights = 0
-	check_license = False
+	ret = rights = goodrights = 0
 
 	if not filename:
 		filename = fh.name
 
 	for line in fh:
-		lineno += 1
-
-		if check_license:
-			check_license = False
-			if licterms in line:
-				err(output, "old '%s' message found" % licterms,
-				    filename, lineno)
-				ret = 1
-				continue
-
-		if oldcopyright.search(line):
-			err(output, "ancient Sun copyright", filename,
-			    lineno)
-			rights += 1
-			ret = 1
-			check_license = True
-			continue
-		elif oldcopyright1.search(line):
-			err(output, "pre-2002 Sun copyright", filename, lineno)
-			rights += 1
-			ret = 1
-			check_license = True
-			continue
-		elif suncopyright.search(line):
-			err(output, "old Sun copyright", filename, lineno)
+		if is_copyright(line):
 			rights += 1
-			ret = 1
-			check_license = True
-			continue
-
-		#
-		# group 1 = optional initial year
-		# group 2 = current year
-		# group 3 = comma after current year
-		# group 4 = spacing between phrases
-		#
-		match = goodcopyright.search(line)
-		if match:
-			# only check for the old license message on the line
-			# following a copyright match
-			check_license = True
-			rights += 1
-
-			year = time.strftime('%Y')
-			if match.group(2) != year:
-				err(output, "wrong copyright year %s, should "
-				    "be %s" %
-				    (match.group(2), year), filename, lineno)
-				ret = 1
-
-			if match.group(3) != ',':
-				err(output, "need comma after current year",
-				    filename, lineno)
-				ret = 1
-
-			if match.group(4) != ' ':
-				err(output, "need one space between copyright "
-				    "and all rights reserved phrases",
-				    filename, lineno)
-				ret = 1
+			if is_current_copyright(line):
+				goodrights += 1
+				break
 
 	if rights == 0:
 		err(output, "no copyright message found", filename)
 		ret = 1
+	elif goodrights == 0:
+		err(output, "no copyright claim for current year found",
+		    filename)
+		ret = 1
 
 	return ret
--- a/usr/src/tools/onbld/Checks/DbLookups.py	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/onbld/Checks/DbLookups.py	Thu Sep 09 11:46:43 2010 -0400
@@ -24,23 +24,24 @@
 # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
+# Copyright 2010, Richard Lowe
+
 #
 # Various database lookup classes/methods, i.e.:
 #     * monaco
 #     * bugs.opensolaris.org (b.o.o.)
-#     * arc.opensolaris.org/cgi-bin/arc.cgi (for ARC off SWAN)
-#     * candi.sfbay.sun.com/cgi-bin/arc.cgi (for ARC on SWAN)
+#     * redmine (illumos.org)
 #
 
-import csv
+import htmllib
 import re
 import urllib
 import urllib2
-import htmllib
-import os
-from socket import socket, AF_INET, SOCK_STREAM
 
-from onbld.Checks import onSWAN
+try:				# Python >= 2.5
+	from xml.etree import ElementTree
+except ImportError:
+	from elementtree import ElementTree
 
 class NonExistentBug(Exception):
 	def __str__(self):
@@ -53,9 +54,6 @@
 class BugDB(object):
 	"""Lookup change requests.
 
-	Object can be used on or off of SWAN, using either monaco or
-	bugs.opensolaris.org as a database.
-
 	Usage:
 	bdb = BugDB()
 	r = bdb.lookup("6455550")
@@ -64,21 +62,40 @@
 	print r["6505625"]["synopsis"]
 	"""
 
-	def __init__(self, priority = ("bugster",), forceBoo=False):
+ 	VALID_DBS = ["bugster", "illumos"]
+
+	def __init__(self, priority = ("illumos", "bugster")):
 		"""Create a BugDB object.
 
 		Keyword argument:
-		forceBoo: use b.o.o even from SWAN (default=False)
 		priority: use bug databases in this order
 		"""
-		self.__validBugDB = ["bugster"]
-		self.__onSWAN = not forceBoo and onSWAN()
 		for database in priority:
-			if database not in self.__validBugDB:
+			if database not in self.VALID_DBS:
 				raise BugDBException, database
 		self.__priority = priority
 
 
+	def __illbug(self, cr):
+		url = "http://illumos.org/issues/%s.xml" % cr
+		req = urllib2.Request(url)
+
+		try:
+			data = urllib2.urlopen(req)
+		except urllib2.HTTPError, e:
+			if e.code == 404:
+				raise NonExistentBug(cr)
+			else:
+				raise
+
+		bug = ElementTree.parse(data)
+
+		return {'cr_number': bug.find('id').text,
+			'synopsis': bug.find('subject').text,
+			'status': bug.find('status').attrib['name']
+		}
+
+
 	def __boobug(self, cr):
 		cr = str(cr)
 		url = "http://bugs.opensolaris.org/view_bug.do"
@@ -93,7 +110,7 @@
 					" got error: " + str(e.code)
 				raise e
 			else:
-				raise NonExistentBug
+				raise NonExistentBug(cr)
 		except urllib2.URLError, e:
 			print "ERROR: could not connect to " + \
 				req.get_full_url() + \
@@ -113,93 +130,11 @@
 
 		if "synopsis" not in results:
 			raise NonExistentBug(cr)
-					
+
 		results["cr_number"] = cr
 		results["sub_category"] = results.pop("subcategory")
 		results["status"] = results.pop("state")
 		results["date_submitted"] = results.pop("submit_date")
-		
-		return results
-
-
-	def __monaco(self, crs):
-		"""Return all info for requested change reports.
-
-		Argument:
-		crs: list of change request ids
-
-		Returns:
-		Dictionary, mapping CR=>dictionary, where the nested dictionary
-		is a mapping of field=>value
-		"""
-
-		#
-		# See if 'maxcrs' for maximal batch query size is defined
-		# if not, default to 200. 
-		# This clears the 2499 chars query limit
-		#
-		try:
-			maxcrs
-		except NameError:
-			maxcrs = 200
-		
-		i = 0
-		results = {}
-		data = []
-
-		while i < len(crs):
-			if len(crs) < ( i + maxcrs ):
-				j = len(crs)
-			else:
-				j = i + maxcrs
-
-			crstmp=crs[i:j]
-
-			#
-			# We request synopsis last, and split on only
-			# the number of separators that we expect to
-			# see such that a | in the synopsis doesn't
-			# throw us out of whack.
-			#
-			monacoFields = [ "cr_number", "category", "sub_category",
-				"area", "release", "build", "responsible_manager",
-				"responsible_engineer", "priority", "status", "sub_status",
-				"submitted_by", "date_submitted", "synopsis" ]
-			cmd = []
-			cmd.append("set What = cr." + ', cr.'.join(monacoFields))
-			cmd.append("")
-			cmd.append("set Which = cr.cr_number in (" + ','.join(crstmp) +")")
-			cmd.append("")
-			cmd.append("set FinalClauses = order by cr.cr_number")
-			cmd.append("")
-			cmd.append("doMeta genQuery cr")
-			url = "http://hestia.sfbay.sun.com/cgi-bin/expert?format="
-			url += "Pipe-delimited+text;Go=2;no_header=on;cmds="
-			url += urllib.quote_plus("\n".join(cmd))
-			try:
-				data += urllib2.urlopen(url).readlines()
-			except urllib2.HTTPError, e:
-				print "ERROR: HTTP error at " + url + \
-					" got error: " + str(e.code)
-				raise e
-	
-			except urllib2.URLError, e:
-				print "ERROR: could not connect to " + url + \
-					' got error: "' + e.reason[1] + '"'
-				raise e
-
-			i += maxcrs
-
-		for line in data:
-			line = line.rstrip('\n')
-			values = line.split('|', len(monacoFields) - 1)
-			v = 0
-			cr = values[0]
-			results[cr] = {}
-			for field in monacoFields:
-				results[cr][field] = values[v]
-				v += 1
-
 
 		return results
 
@@ -208,7 +143,7 @@
 
 		Argument:
 		crs: one change request id (may be integer, string, or list),
-	             or multiple change request ids (must be a list)
+		     or multiple change request ids (must be a list)
 
 		Returns:
 		Dictionary, mapping CR=>dictionary, where the nested dictionary
@@ -218,270 +153,24 @@
 		if not isinstance(crs, list):
 			crs = [str(crs)]
 		for database in self.__priority:
-			if database == "bugster":				
-				if self.__onSWAN:
-					results.update(self.__monaco(crs))
-				# else we're off-swan and querying via boo, which we can
-				# only do one bug at a time
-				else:
-					for cr in crs:
-						cr = str(cr)
-						try:
-							results[cr] = self.__boobug(cr)
-						except NonExistentBug:
-							continue
+			if database == "bugster":
+				for cr in crs:
+					cr = str(cr)
+					try:
+						results[cr] = self.__boobug(cr)
+					except NonExistentBug:
+						continue
+			elif database == "illumos":
+				for cr in crs:
+					try:
+						results[str(cr)] = self.__illbug(cr)
+					except NonExistentBug:
+						continue
 
 			# the CR has already been found by one bug database
 			# so don't bother looking it up in the others
 			for cr in crs:
 				if cr in results:
 					crs.remove(cr)
-		
+
 		return results
-####################################################################
-class ARCException(Exception):
-	"""This covers arc.cgi script failure."""
-	def __str__(self):
-		return "Error retrieving ARC data: %s" % (Exception.__str__(self))
-
-def ARC(arclist, arcPath=None):
-	if not arcPath:
-		if onSWAN():
-			arcPath = "http://candi.sfbay.sun.com/cgi-bin/arc.cgi"
-		else:
-			arcPath = "http://arc.opensolaris.org/cgi-bin/arc.cgi"
-	fields = ["present", "arc", "year", "case", "status", "title"]
-	opts = [("case", "%s/%s" % (a, c)) for a, c in arclist]
-	req = urllib2.Request(arcPath, urllib.urlencode(opts))
-	try:
-		data = urllib2.urlopen(req).readlines()
-	except urllib2.HTTPError, e:
-		print "ERROR: HTTP error at " + req.get_full_url() + \
-			" got error: " + str(e.code)
-		raise e
-
-	except urllib2.URLError, e:
-		print "ERROR: could not connect to " + req.get_full_url() + \
-			' got error: "' + e.reason[1] + '"'
-		raise e
-	ret = {}
-	for line in csv.DictReader(data, fields):
-		if line["present"] == "exists":
-			yc = "%s/%s" % (line["year"], line["case"])
-			ret[(line["arc"], yc)] = line["title"]
-		elif line["present"] == "fatal":
-			raise ARCException(line["arc"])
-
-	return ret
-
-####################################################################
-
-# Pointers to the webrti server hostname & port to use
-# Using it directly is probably not *officially* supported, so we'll
-# have a pointer to the official `webrticli` command line interface
-# if using a direct socket connection fails for some reason, so we
-# have a fallback
-WEBRTI_HOST = 'webrti.sfbay.sun.com'
-WEBRTI_PORT = 9188
-WEBRTICLI = '/net/onnv.sfbay.sun.com/export/onnv-gate/public/bin/webrticli'
-
-
-class RtiException(Exception):
-	pass
-
-class RtiCallFailed(RtiException):
-	def __str__(self):
-		return "Unable to call webrti: %s" % (RtiException.__str__(self))
-
-class RtiSystemProblem(RtiException):
-	def __str__(self):
-		return "RTI status cannot be determined for CR: %s" % (RtiException.__str__(self))
-
-class RtiIncorrectCR(RtiException):
-	def __str__(self):
-		return "Incorrect CR number specified: %s" % (RtiException.__str__(self))
-
-class RtiNotFound(RtiException):
-	def __str__(self):
-		return "RTI not found for CR: %s" % (RtiException.__str__(self))
-
-class RtiNeedConsolidation(RtiException):
-	def __str__(self):
-		return "More than one consolidation has this CR: %s" % (RtiException.__str__(self))
-
-class RtiBadGate(RtiException):
-	def __str__(self):
-		return "Incorrect gate name specified: %s" % (RtiException.__str__(self))
-
-class RtiUnknownException(Exception):
-	def __str__(self):
-		return "Unknown webrti return code: %s" % (RtiException.__str__(self))
-
-class RtiOffSwan(RtiException):
-	def __str__(self):
-		return "RTI status checks need SWAN access: %s" % (RtiException.__str__(self))
-
-WEBRTI_ERRORS = {
-	'1': RtiSystemProblem,
-	'2': RtiIncorrectCR,
-	'3': RtiNotFound,
-	'4': RtiNeedConsolidation,
-	'5': RtiBadGate,
-}
-
-# Our Rti object which we'll use to represent an Rti query
-# It's really just a wrapper around the Rti connection, and attempts
-# to establish a direct socket connection and query the webrti server
-# directly (thus avoiding a system/fork/exec call).  If it fails, it
-# falls back to the webrticli command line client.
-
-returnCodeRe = re.compile(r'.*RETURN_CODE=(\d+)')
-class Rti:
-	"""Lookup an RTI.
-
-	Usage:
-	r = Rti("6640538")
-	print r.rtiNumber();
-	"""
-
-	def __init__(self, cr, gate=None, consolidation=None):
-		"""Create an Rti object for the specified change request.
-
-		Argument:
-		cr: change request id
-
-		Keyword arguments, to limit scope of RTI search:
-		gate: path to gate workspace (default=None)
-		consolidation: consolidation name (default=None)
-		"""
-
-		bufSz = 1024
-		addr = (WEBRTI_HOST, WEBRTI_PORT)
-		# If the passed 'cr' was given as an int, then wrap it
-		# into a string to make our life easier
-		if isinstance(cr, int):
-			cr = str(cr)
-		self.__queryCr = cr
-		self.__queryGate = gate
-		self.__queryConsolidation = consolidation
-
-		self.__webRtiOutput = []
-		self.__mainCR = []
-		self.__rtiNumber = []
-		self.__consolidation = []
-		self.__project = []
-		self.__status = []
-		self.__rtiType = []
-		try:
-			# try to use a direct connection to the
-			# webrti server first
-			sock = socket(AF_INET, SOCK_STREAM)
-			sock.connect(addr)
-			command = "WEBRTICLI/1.0\nRTIstatus\n%s\n" % cr
-			if consolidation:
-				command += "-c\n%s\n" % consolidation
-			if gate:
-				command += "-g\n%s\n" % gate
-			command += "\n"
-			sock.send(command)
-			dataList = []
-			# keep receiving data from the socket until the
-			# server closes the connection
-			stillReceiving = True
-			while stillReceiving:
-				dataPiece = sock.recv(bufSz)
-				if dataPiece:
-					dataList.append(dataPiece)
-				else:
-					stillReceiving = False
-			# create the lines, skipping the first
-			# ("WEBRTCLI/1.0\n")
-			data = '\n'.join(''.join(dataList).split('\n')[1:])
-		except:
-			if not onSWAN():
-				raise RtiOffSwan(cr)
-
-			if not os.path.exists(WEBRTICLI):
-				raise RtiCallFailed('not found')
-
-			# fallback to the "supported" webrticli interface
-			command = WEBRTICLI
-			if consolidation:
-				command += " -c " + consolidation
-			if gate:
-				command += " -g " + gate
-			command += " RTIstatus " + cr
-
-			try:
-				cliPipe = os.popen(command)
-			except:
-				# we couldn't call the webrticli for some
-				# reason, so return a failure
-				raise RtiCallFailed('unknown')
-
-			data = cliPipe.readline()
-
-		# parse the data to see if we got a return code
-		# if we did, then that's bad.  if we didn't,
-		# then our call was successful
-		m = returnCodeRe.search(data)
-		if m:
-			rc = m.group(1)
-			# we got a return code, set it in our
-			# object, set the webRtiOutput for debugging
-			# or logging, and return a failure
-			if rc in WEBRTI_ERRORS:
-				exc = WEBRTI_ERRORS[rc]
-				if exc == RtiBadGate:
-					edata = gate
-				else:
-					edata = cr
-			else:
-				exc = RtiUnknownException
-				edata = rc
-			raise exc(edata)
-
-		data = data.splitlines()
-		# At this point, we should have valid data
-		for line in data:	
-			line = line.rstrip('\r\n')
-			self.__webRtiOutput.append(line) 
-			fields = line.split(':')
-			self.__mainCR.append(fields[0])
-			self.__rtiNumber.append(fields[1])
-			self.__consolidation.append(fields[2])
-			self.__project.append(fields[3])
-			self.__status.append(fields[4])
-			self.__rtiType.append(fields[5])
-
-	# accessors in case callers need the raw data
-	def mainCR(self):
-		return self.__mainCR
-	def rtiNumber(self):
-		return self.__rtiNumber
-	def consolidation(self):
-		return self.__consolidation
-	def project(self):
-		return self.__project
-	def status(self):
-		return self.__status
-	def rtiType(self):
-		return self.__rtiType
-	def queryCr(self):
-		return self.__queryCr
-	def queryGate(self):
-		return self.__queryGate
-	def queryConsolidation(self):
-		return self.__queryConsolidation
-
-	# in practice, most callers only care about the following
-	def accepted(self):
-		for status in self.__status:
-			if status != "S_ACCEPTED":
-				return False
-		return True
-
-	# for logging/debugging in case the caller wants the raw webrti output
-	def webRtiOutput(self):
-		return self.__webRtiOutput
-
--- a/usr/src/tools/onbld/Checks/HdrChk.py	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/onbld/Checks/HdrChk.py	Thu Sep 09 11:46:43 2010 -0400
@@ -24,8 +24,8 @@
 # Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
-# ident	"%Z%%M%	%I%	%E% SMI"
-#
+
+# Copyright 2008, 2010, Richard Lowe
 
 #
 # Check that header files conform to our standards
@@ -68,6 +68,7 @@
 #
 
 import re, os, sys
+from onbld.Checks.Copyright import is_copyright
 
 class HeaderFile(object):
 	def __init__(self, fh, filename=None, lenient=False):
@@ -120,11 +121,11 @@
 				# a match for every possibly valid copyright
 				# notice
 				#
-				if re.search(r'Copyright (?!\[yyyy\])', line):
+				if is_copyright(line):
 					self.has_copyright = True
 				line = self.getline()
 
-			if re.search(r'Copyright (?!\[yyyy\])', line):
+			if is_copyright(line):
 				self.has_copyright = True
 			line = self.getline()
 
@@ -170,7 +171,7 @@
 	if not hdr.has_copyright:
 		err(output, "Missing copyright in opening comment", hdr)
 		ret = 1
-	
+
 	#
 	# Step 2:
 	#
--- a/usr/src/tools/onbld/Checks/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/onbld/Checks/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -23,6 +23,8 @@
 # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
+# Copyright 2010, Richard Lowe
+
 include $(SRC)/Makefile.master
 include ../../Makefile.tools
 
@@ -36,9 +38,8 @@
 	HdrChk.py	\
 	JStyle.py	\
 	Keywords.py	\
-	Mapfile.py		\
+	Mapfile.py	\
 	ProcessCheck.py \
-	Rti.py		\
 	__init__.py
 
 PYOBJS =	$(PYSRCS:%.py=%.pyc)
--- a/usr/src/tools/onbld/Checks/Rti.py	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +0,0 @@
-#! /usr/bin/python
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# Check on RTI status for bug IDs passed.
-#
-# How we obtain the bug IDs will vary per SCM.
-# 	- For Teamware, we want to check the active list comments.
-#	- For Mercurial, we can check the incoming changegroup (via the
-#	  pretxnchangegroup hook) and abort if necessary
-#
-# This module is implemented as a generic checking module given a list of
-# bug IDs.  It can then be wrapped or hooked into whatever SCM with an
-# SCM-specific hook to parse and pass the requisite bug IDs
-# 
-
-import re, os, sys
-from onbld.Checks.DbLookups import Rti, RtiException, RtiNotFound, RtiOffSwan
-
-opensolarisGateRe = re.compile(r'.*osol[0-9]+-sust$')
-patchGateRe = re.compile(r'.*-patch.*')
-testGateRe = re.compile(r'.*-(stc2|test)$')
-
-def rti(bugids, gatePath=None, consolidation=None,
-	output=sys.stderr):
-	"""Return True iff each of the specified bugids has an approved RTI.
-
-	Required argument:
-	bugids:	list of seven-digit bug ids
-
-	Keyword arguments, used to limit the scope of the RTI search:
-	gatePath: fully qualified path to gate
-	consolidation: name of the consolidation
-	"""
-
-	rtiType = "MarketingRelease"
-	gateType = "MarketingRelease"
-
-	# Check to see if we were given a gate to lookup with
-	if gatePath != None:
-
-		#
-		# The gate name should be the last component of the gate path,
-		# no matter how it's accessed.
-		#
-		# We make a special case for "closed," and check to see if it
-		# appears to be the "usr/closed" portion of a nested repository.
-		# In that case, we really want the parent repository name.
-		#
-		gatePath = gatePath.rstrip(os.path.sep).split(os.path.sep)
-		gateName = gatePath[-1]
-		try:
-			if gatePath[-2:] == ['usr', 'closed']:
-				gateName = gatePath[-3]
-		except IndexError:
-			pass
-
-		# Is this an OpenSolaris gate?
-		if opensolarisGateRe.search(gateName):
-			rtiType = "OpenSolaris"
-			gateType = "OpenSolaris"
-
-		# Is this a patch gate?
-		if patchGateRe.search(gateName):
-			rtiType = "Patch"
-			gateType = "Patch"
-
-		# Is this a test gate?
-		if testGateRe.search(gateName):
-			rtiType = "RTI"
-			gateType = "RTI"
-	else:
-		gateName = None
-
-	# Query RTI if there's a gate
-	# Check the RTIs, caching them in the 'rtis' dictionary
-	# We do our error checking/handling here
-	rtis = {}
-	badRtis = []
-	for cr in bugids:
-		# If we don't already have an Rti object for this cr cached,
-		# then go create/query it
-		if cr not in rtis.keys() + badRtis:
-			try:
-				rtis[cr] = Rti(cr, gateName, consolidation)
-			except RtiOffSwan, e:
-				output.write("%s\n" % e)
-				return False
-			except RtiException, e:
-				output.write("%s\n" % e)
-				badRtis.append(cr)
-				continue
-
-		crRti = rtis[cr]
-
-		# If we've reached this point, then the Rti query succeeded,
-		# and we didn't get an error back from webrti.  There is still
-		# some sanity checking to be done, however
-		rtiNumber = crRti.rtiNumber()
-		rtiType = crRti.rtiType()
-	
-		# check to make sure the RTI type matches the gate type
-		if not gateType in rtiType:
-			message = "Error: for bug " + cr 
-			for each in rtiNumber:
-				message += " the RTI " +  each + "  is of " 
-				message += rtiType[rtiNumber.index(each)] + " type "
-			message += "but the parent gate " + gateName + " is a " 
-			message += gateType + " gate.\n" + "A " + gateType
-			message += " RTI must be submitted to putback bug " + cr + " to " 
-			message += gateName  + ". \n"
-			
-			output.write( message )
-			badRtis.append(cr)
-			continue
-
-		if not crRti.accepted():
-			for each in rtiNumber:
-				message = "Error: RTI " + each + " for CR " + cr + " is not in "
-				message += "the accepted state.\n"
-				output.write(message)
-			badRtis.append(cr)
-			continue
-	
-	if len(badRtis) > 0:
-		return False
-
-	return True
-
--- a/usr/src/tools/onbld/Checks/__init__.py	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/onbld/Checks/__init__.py	Thu Sep 09 11:46:43 2010 -0400
@@ -25,6 +25,8 @@
 # Use is subject to license terms.
 #
 
+# Copyright 2010, Richard Lowe
+
 #
 # The 'checks' package contains various checks that may be run
 #
@@ -37,21 +39,4 @@
 	'HdrChk',
 	'JStyle',
 	'Keywords',
-	'Mapfile',
-	'Rti',
-	'onSWAN']
-
-
-import socket
-
-# 
-# Generic check to test if a host is on SWAN
-# 
-def onSWAN():
-	try:
-		if socket.gethostbyname("sunweb.central.sun.com."):
-			return True
-		else:
-			return False
-	except:
-		return False
+	'Mapfile']
--- a/usr/src/tools/onbld/hgext/cdm.py	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/onbld/hgext/cdm.py	Thu Sep 09 11:46:43 2010 -0400
@@ -17,6 +17,8 @@
 # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
+# Copyright 2008, 2010, Richard Lowe
+
 '''OpenSolaris workspace extensions for mercurial
 
 This extension contains a number of commands to help you work within
@@ -67,7 +69,7 @@
 from onbld.Scm.WorkSpace import ActiveEntry, WorkSpace
 from onbld.Scm.Backup import CdmBackup
 from onbld.Checks import Cddl, Comments, Copyright, CStyle, HdrChk
-from onbld.Checks import JStyle, Keywords, Mapfile, Rti, onSWAN
+from onbld.Checks import JStyle, Keywords, Mapfile
 
 
 def yes_no(ui, msg, default):
@@ -249,15 +251,6 @@
                 ui.write('\t%s\n' % elt.name)
 
 
-def cdm_arcs(ui, repo, parent=None):
-    'show all ARC cases in checkin comments'
-    act = wslist[repo].active(parent)
-
-    # We take a set of the appropriate comments to eliminate duplicates.
-    for elt in set(filter(Comments.isARC, act.comments())):
-        ui.write(elt + '\n')
-
-
 def cdm_bugs(ui, repo, parent=None):
     'show all bug IDs in checkin comments'
     act = wslist[repo].active(parent)
@@ -299,8 +292,7 @@
     ui.write('Comments check:\n')
 
     check_db = not opts.get('nocheck')
-    return Comments.comchk(active.comments(), check_db=check_db, output=ui,
-                           arcPath=ui.config('cdm', 'arcpath', None))
+    return Comments.comchk(active.comments(), check_db=check_db, output=ui)
 
 
 def cdm_cddlchk(ui, repo, *args, **opts):
@@ -585,35 +577,6 @@
     return 0
 
 
-def cdm_rtichk(ui, repo, **opts):
-    '''check active bug/RFEs for approved RTIs
-
-    Only works on SWAN.'''
-
-    if opts.get('nocheck') or os.path.exists(repo.join('cdm/rtichk.NOT')):
-        ui.status('Skipping RTI checks...\n')
-        return 0
-
-    if not onSWAN():
-        ui.write('RTI checks only work on SWAN, skipping...\n')
-        return 0
-
-    parent = wslist[repo].parent(opts.get('parent'))
-    active = wslist[repo].active(parent)
-
-    ui.write('RTI check:\n')
-
-    bugs = []
-
-    for com in active.comments():
-        match = Comments.isBug(com)
-        if match and match.group(1) not in bugs:
-            bugs.append(match.group(1))
-
-    # RTI normalizes the gate path for us
-    return int(not Rti.rti(bugs, gatePath=parent, output=ui))
-
-
 def cdm_keywords(ui, repo, *args, **opts):
     '''check source files do not contain SCCS keywords'''
 
@@ -700,11 +663,10 @@
 def cdm_nits(ui, repo, *args, **opts):
     '''check for stylistic nits in active files
 
-    Run cddlchk, copyright, cstyle, hdrchk, jstyle, mapfilechk,
+    Run copyright, cstyle, hdrchk, jstyle, mapfilechk,
     permchk, and keywords checks.'''
 
-    cmds = [cdm_cddlchk,
-        cdm_copyright,
+    cmds = [cdm_copyright,
         cdm_cstyle,
         cdm_hdrchk,
         cdm_jstyle,
@@ -718,8 +680,8 @@
 def cdm_pbchk(ui, repo, **opts):
     '''pre-putback check all active files
 
-    Run cddlchk, comchk, copyright, cstyle, hdrchk, jstyle, mapfilechk,
-    permchk, tagchk, branchchk, keywords and rtichk checks.  Additionally,
+    Run comchk, copyright, cstyle, hdrchk, jstyle, mapfilechk,
+    permchk, tagchk, branchchk and keywords checks.  Additionally,
     warn about uncommitted changes.'''
 
     #
@@ -727,8 +689,7 @@
     # run first in the same order as they would in cdm_nits.  Then the
     # pbchk specifics run
     #
-    cmds = [cdm_cddlchk,
-        cdm_copyright,
+    cmds = [cdm_copyright,
         cdm_cstyle,
         cdm_hdrchk,
         cdm_jstyle,
@@ -738,7 +699,6 @@
         cdm_comchk,
         cdm_tagchk,
         cdm_branchchk,
-        cdm_rtichk,
         cdm_outchk,
         cdm_mergechk]
 
@@ -1132,8 +1092,6 @@
     'apply': (cdm_apply, [('p', 'parent', '', 'parent workspace'),
                           ('r', 'remain', None, 'do not change directories')],
               'hg apply [-p PARENT] [-r] command...'),
-    'arcs': (cdm_arcs, [('p', 'parent', '', 'parent workspace')],
-             'hg arcs [-p PARENT]'),
     '^backup|bu': (cdm_backup, [('t', 'if-newer', None,
                              'only backup if workspace files are newer')],
                'hg backup [-t]'),
@@ -1172,7 +1130,7 @@
     '^nits': (cdm_nits, [('p', 'parent', '', 'parent workspace')],
              'hg nits [-p PARENT]'),
     '^pbchk': (cdm_pbchk, [('p', 'parent', '', 'parent workspace'),
-                           ('N', 'nocheck', None, 'skip RTI check')],
+                           ('N', 'nocheck', None, 'skip database checks')],
               'hg pbchk [-N] [-p PARENT]'),
     'permchk': (cdm_permchk, [('p', 'parent', '', 'parent workspace')],
                 'hg permchk [-p PARENT]'),
@@ -1206,9 +1164,6 @@
     'reparent': (cdm_reparent, [], 'hg reparent PARENT'),
     '^restore': (cdm_restore, [('g', 'generation', '', 'generation number')],
                  'hg restore [-g GENERATION] BACKUP'),
-    'rtichk': (cdm_rtichk, [('p', 'parent', '', 'parent workspace'),
-                            ('N', 'nocheck', None, 'skip RTI check')],
-               'hg rtichk [-N] [-p PARENT]'),
     'tagchk': (cdm_tagchk, [('p', 'parent', '', 'parent workspace')],
                'hg tagchk [-p PARENT]'),
     'webrev': (cdm_webrev, [('C', 'C', '', 'ITS priority file'),
--- a/usr/src/tools/scripts/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/scripts/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -21,6 +21,7 @@
 #
 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
 #
+# Copyright 2010, Richard Lowe
 
 SHELL=/usr/bin/ksh93
 
@@ -38,21 +39,14 @@
 	flg.flp \
 	genoffsets \
 	hgsetup \
-	keywords \
 	mkclosed \
 	nightly \
 	onu \
 	protocmp.terse \
 	sccscheck \
-	sccscp \
-	sccshist \
-	sccsmv \
-	sccsrm \
 	webrev \
 	which_scm \
 	ws \
-	wx \
-	wx2hg \
 	xref
 
 PERLFILES= \
@@ -78,7 +72,6 @@
 	hdrchk \
 	hg-active \
 	mapfilechk \
-	rtichk \
 	validate_pkg \
 	wsdiff
 
@@ -101,15 +94,10 @@
 	nightly.1 \
 	onu.1 \
 	sccscheck.1 \
-	sccscp.1 \
-	sccsmv.1 \
-	sccsrm.1 \
 	webrev.1 \
 	which_scm.1 \
 	ws.1 \
 	wsdiff.1 \
-	wx.1 \
-	wx2hg.1 \
 	xref.1
 
 MAKEFILES= \
@@ -152,7 +140,7 @@
 bldenv: bldenv.sh stdenv.sh
 	$(RM) "$@"
 	sed -e '/# STDENV_START/ r stdenv.sh' bldenv.sh > "$@"
-	# Check for shell lint and fail if we hit warings
+	# Check for shell lint and fail if we hit warnings
 	shlintout="$$( /usr/bin/ksh93 -n "$@" 2>&1 )" ; \
 		[[ "$${shlintout}" != "" ]] && \
 		{ print -r -- "$${shlintout}" ;	false ; } || true
--- a/usr/src/tools/scripts/hgsetup.sh	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/scripts/hgsetup.sh	Thu Sep 09 11:46:43 2010 -0400
@@ -25,6 +25,8 @@
 # Use is subject to license terms.
 #
 
+# Copyright 2010, Richard Lowe
+
 #
 # Easy setup script for populating a user's ~/.hgrc
 # This currently does the following:
@@ -50,12 +52,9 @@
 	-p proxy      : enable use of web proxy with specified proxy
 	-s style_path : override path to style file
 
-	if -e isn't provided, and you are on SWAN, an LDAP query is done
 	if -n isn't provided, the entry from /etc/passwd is used
 	
 	proxy should be in the form of hostname:port
-	if on-SWAN, $prog will lookup your email address.  this can be
-	overridden by using the -e flag.
 	"
 	exit 1
 }
@@ -121,19 +120,6 @@
 "
 fi
 
-if getent hosts sunweb.central.sun.com >/dev/null; then
-	# on SWAN
-	echo "Detected SWAN connection"
-	ON_SWAN=1
-	ldapemail='preferredrfc822recipient'
-	ldapquery="uid=$login $ldapemail"
-	ldapcmd="$LDAPCLIENT -1 -h sun-ds -b dc=sun,dc=com $ldapquery"
-	if [[ -z "$email" ]]; then 
-		echo "Looking up e-mail address in LDAP"
-		email=${email:=$($ldapcmd | $AWK /^$ldapemail:/'{print $2}')}
-	fi
-fi
-
 if [[ -z $email ]]; then
 	my_id=$(id -un)
 	my_checkhostname=$(check-hostname)
@@ -173,24 +159,9 @@
 from=$email
 
 [paths]
-EOF
-
-if [[ -n $ON_SWAN ]]; then
-	cat <<EOF >> $HGRC
-onnv-gate=ssh://onnv.sfbay.sun.com//export/onnv-gate
-onnv-clone=ssh://onnv.sfbay.sun.com//export/onnv-clone
-onnv-closed=ssh://onnv.sfbay.sun.com//export/onnv-gate/usr/closed
-onnv-closed-clone=ssh://onnv.sfbay.sun.com//export/onnv-clone/usr/closed
+onnv-gate=ssh://anon@hg.opensolaris.org//hg/onnv/onnv-gate
+illumos-gate=http://hg.illumos.org/illumos-gate
 
-EOF
-else
-	cat <<EOF >> $HGRC
-onnv-gate=ssh://anon@hg.opensolaris.org//hg/onnv/onnv-gate
-
-EOF
-fi
-
-cat <<EOF >> $HGRC
 [merge-tools]
 filemerge.gui=True
 filemerge.args=-a \$base \$local \$other \$output
--- a/usr/src/tools/scripts/its.conf	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/scripts/its.conf	Thu Sep 09 11:46:43 2010 -0400
@@ -24,6 +24,8 @@
 # Use is subject to license terms.
 #
 
+# Copyright 2010, Richard Lowe
+
 #
 # configuration file for information tracking systems
 #
@@ -31,7 +33,7 @@
 #
 # This setting determines the domain used to resolve internal URLs
 #
-its_domain="sun.com"
+its_domain="illumos.org"
 
 #
 # This setting determines the priority with which an application will
@@ -40,4 +42,4 @@
 # It should be a list (white space separated) of prefixes
 # from the corresponding its.reg file.
 #
-its_priority="sun arc doo"
+its_priority="illumos sun arc doo"
--- a/usr/src/tools/scripts/its.reg	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/scripts/its.reg	Thu Sep 09 11:46:43 2010 -0400
@@ -23,7 +23,7 @@
 # Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
-
+# Copyright 2010, Richard Lowe
 
 #
 # This file constitutes an informal registry for information tracking
@@ -153,3 +153,12 @@
 INTERNAL_URL_sun.com=http://monaco.sfbay.sun.com/detail.jsf?cr=\\1
 REGEX=\\([0-9]\\{7\\}\\)
 CONTACT=opendev-discuss@opensolaris.org
+
+#
+# The redmine instance on illumos.org
+#
+PREFIX=illumos
+INFO=http://illumos.org
+EXTERNAL_URL=https://illumos.org/issues/\\1
+REGEX=\\([0-9]\\{1\,6\\}\\)
+CONTACT=developer@lists.illumos.org
--- a/usr/src/tools/scripts/keywords.sh	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,175 +0,0 @@
-#!/bin/sh
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-# 
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-# Checks the list of files to make sure that each given file has a SMI
-# standard ident string.
-#
-# It checks that keywords exist, and verifies the string.  By default,
-# all allowable forms of keywords (according to the ON documentation)
-# are acceptable.  The '-p' option (pedantic) allows only the canonical
-# form of keywords. See below for allowable forms.
-#
-# Use as "keywords filelist" where filelist is the list of plain files.
-#
-# However, in general, this utility should not need to be directly
-# invoked, but instead used through wx(1) -- e.g., `wx keywords'.
-#
-# Output consists of filenames with expanded, incorrect or missing
-# sccs keywords and/or filenames that were not SCCS files.
-#
-# Exits with status 0 if all files are sccs files and all files have
-# unexpanded, correct keywords. Otherwise, exits with a non-zero status.
-
-#
-# The CDPATH variable causes ksh's `cd' builtin to emit messages to stdout
-# under certain circumstances, which can really screw things up; unset it.
-#
-unset CDPATH
-
-PATH=/usr/bin:/usr/ccs/bin
-
-USAGE="usage: `basename $0` [-p] <filename> ..."
-
-# Canonical form for .c and .h files
-CANON_C_H="^#pragma ident	\"\%\Z\%\%\M\%	\%\I\%	\%\E\% SMI\""
-# Canonical form for other files
-CANON_OTHER="ident	\"\%\Z\%\%\M\%	\%\I\%	\%\E\% SMI\""
-STANDARD="ident	\"(\%\Z\%\%\M\%	+\%\I\%|\%W\%)	+\%\E\% SMI\""
-EXPANDED="@\(#\).*[ 	]+[1-9]+(\.[0-9]+)+[ 	]+(-[ 	]+)?[0-9][0-9]/[01][0-9]/[0-3][0-9][ 	]+.*(SMI|Sun)"
-LIBERAL="(\%\Z\%\%\M\%[ 	]+\%\I\%|\%W\%)[ 	]+\%\E\%[ 	]+.*(SMI|Sun)"
-
-check_file() {
-    fname=$1
-    bname=$2
-    canon_str=$3
-    if [ $pedantic -eq 1 ]; then
-	egrep -s "$canon_str" $bname
-	if [ $? -ne 0 ]; then
-	    echo "Incorrect ident string in $fname"
-	    exitcode=1
-	fi
-    elif [ $liberal -eq 1 ]; then
-	egrep -s "$LIBERAL" $bname
-	if [ $? -ne 0 ]; then
-	    egrep -s "$EXPANDED" $bname
-	    if [ $? -eq 0 ]; then
-		echo "Expanded keywords in $fname"
-	    else
-		echo "Incorrect ident string in $fname"
-	    fi
-	    exitcode=1
-	fi
-    else
-	egrep -s "$STANDARD" $bname
-	if [ $? -ne 0 ]; then
-	    egrep -s "$EXPANDED" $bname
-	    if [ $? -eq 0 ]; then
-		echo "Expanded keywords in $fname"
-	    else
-		echo "Incorrect ident string in $fname"
-	    fi
-	    exitcode=1
-	fi
-    fi
-}
-
-pedantic=0
-liberal=0
-cwd=`pwd`
-exitcode=0
-rm -f /tmp/xxx$$ /tmp/kywrds.$$
-trap "rm -f /tmp/xxx$$ /tmp/kywrds.$$" 0
-
-while getopts lp c
-do
-    case $c in
-    l)	liberal=1;;
-    p)	pedantic=1;;
-    \?)	echo $USAGE
-	exit 2;;
-    esac
-done
-shift `expr $OPTIND - 1`
-
-for i
-do
-    dir=`dirname $i`
-    file=`basename $i`
-
-    # Try to build the full path to the file argument
-    echo $dir | egrep -s '^/'
-    if [ ! $? -eq 0 ]; then
-        dir=`pwd`/$dir
-    fi
-
-    cd $dir
-
-    if [ -f SCCS/s.$file ]; then
-	if [ -f SCCS/p.$file ]; then
-	    case "$file" in
-		*.cxx|*.cc|*.c|*.hh|*.h)
-	    	    canon_str="$CANON_C_H";;
-		*)
-		    canon_str="$CANON_OTHER";;
-	    esac
-	    check_file $i $file "$canon_str"
-	else
-	    sccs get -p $file > /dev/null 2>/tmp/xxx$$
-	    if [ $? -ne 0 ]; then	   
-		echo "Cannot access SCCS information: $i"
-		exitcode=1
-		continue
-	    fi
-	    egrep -s "cm7" /tmp/xxx$$
-	    if [ $? -eq 0 ]; then
-		egrep -s "$EXPANDED" $file
-		if [ $? -eq 0 ]; then
-		    echo "Expanded keywords in $i"
-		else
-		    echo "Missing keywords in $i"
-		fi
-		exitcode=1
-	    else
-	    	sccs get -p -k $file > /tmp/kywrds.$$ 2>/tmp/xxx$$
-		case "$file" in
-		    *.cxx|*.cc|*.c|*.hh|*.h)
-			canon_str="$CANON_C_H";;
-		    *)
-			canon_str="$CANON_OTHER";;
-		esac
-		check_file $i /tmp/kywrds.$$ "$canon_str"
-    	    fi
-    	fi
-    else
-    	echo "Not an SCCS file: $i"
-    	exitcode=1
-    fi
-    cd $cwd
-done
-
-exit $exitcode
--- a/usr/src/tools/scripts/nightly.sh	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/scripts/nightly.sh	Thu Sep 09 11:46:43 2010 -0400
@@ -22,6 +22,7 @@
 
 #
 # Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
+# Copyright 2008, 2010, Richard Lowe
 #
 # Based on the nightly script from the integration folks,
 # Mostly modified and owned by mike_s.
@@ -2261,57 +2262,67 @@
 	mv $ROOT-nd $ROOT-nd.prev
 fi
 
-# Echo the SCM types of $CODEMGR_WS and $BRINGOVER_WS
-function wstypes {
-	typeset parent_type child_type junk
+#
+# Echo the SCM type of the parent workspace, this can't just be which_scm
+# as that does not know how to identify various network repositories.
+#
+function parent_wstype {
+	typeset scm_type junk
 
 	CODEMGR_WS="$BRINGOVER_WS" "$WHICH_SCM" 2>/dev/null \
-	    | read parent_type junk
-	if [[ -z "$parent_type" || "$parent_type" == unknown ]]; then
+	    | read scm_type junk
+	if [[ -z "$scm_type" || "$scm_type" == unknown ]]; then
 		# Probe BRINGOVER_WS to determine its type
 		if [[ $BRINGOVER_WS == svn*://* ]]; then
-			parent_type="subversion"
+			scm_type="subversion"
 		elif [[ $BRINGOVER_WS == file://* ]] &&
 		    egrep -s "This is a Subversion repository" \
 		    ${BRINGOVER_WS#file://}/README.txt 2> /dev/null; then
-			parent_type="subversion"
+			scm_type="subversion"
 		elif [[ $BRINGOVER_WS == ssh://* ]]; then
-			parent_type="mercurial"
-		elif svn info $BRINGOVER_WS > /dev/null 2>&1; then
-			parent_type="subversion"
+			scm_type="mercurial"
 		elif [[ $BRINGOVER_WS == http://* ]] && \
-		    http_get "$BRINGOVER_WS/?cmd=heads" | \
+		    wget -q -O- --save-headers "$BRINGOVER_WS/?cmd=heads" | \
 		    egrep -s "application/mercurial" 2> /dev/null; then
-			parent_type="mercurial"
+			scm_type="mercurial"
+		elif svn info $BRINGOVER_WS > /dev/null 2>&1; then
+			scm_type="subversion"
 		else
-			parent_type="none"
+			scm_type="none"
 		fi
-	fi
+	fi    
+
+	# fold both unsupported and unrecognized results into "none"
+	case "$scm_type" in
+	none|subversion|teamware|mercurial)
+		;;
+	*)	scm_type=none
+		;;
+	esac
+
+	echo $scm_type
+}
+
+# Echo the SCM types of $CODEMGR_WS and $BRINGOVER_WS
+function child_wstype {
+	typeset scm_type junk
 
 	# Probe CODEMGR_WS to determine its type
 	if [[ -d $CODEMGR_WS ]]; then
-		$WHICH_SCM | read child_type junk || exit 1
+		$WHICH_SCM | read scm_type junk || exit 1
 	fi
 
-	# fold both unsupported and unrecognized results into "none"
-	case "$parent_type" in
+	case "$scm_type" in
 	none|subversion|teamware|mercurial)
 		;;
-	*)	parent_type=none
+	*)	scm_type=none
 		;;
 	esac
-	case "$child_type" in
-	none|subversion|teamware|mercurial)
-		;;
-	*)	child_type=none
-		;;
-	esac
-
-	echo $child_type $parent_type
+
+	echo $scm_type
 }
 
-wstypes | read SCM_TYPE PARENT_SCM_TYPE
-export SCM_TYPE PARENT_SCM_TYPE
+export SCM_TYPE=$(child_wstype)
 
 #
 #	Decide whether to clobber
@@ -2642,51 +2653,11 @@
 	touch $TMPDIR/bringover_failed
 }
 
-# Parse the URL.
-# The other way to deal with empty components is to echo a string that can
-# be eval'ed by the caller to associate values (possibly empty) with
-# variables.  In that case, passing in a printf string would let the caller
-# choose the variable names.
-function parse_url {
-	typeset url method host port path
-
-	url=$1
-	method=${url%%://*}
-	host=${url#$method://}
-	path=${host#*/}
-	host=${host%%/*}
-	if [[ $host == *:* ]]; then
-		port=${host#*:}
-		host=${host%:*}
-	fi
-
-	# method can never be empty.  host can only be empty if method is
-	# file, and that implies it's localhost.  path can default to / if
-	# it's otherwise empty, leaving port as the only component without
-	# a default, so it has to go last.
-	echo $method ${host:-localhost} ${path:-/} $port
-}
-
-function http_get {
-	typeset url method host port path
-
-	url=$1
-
-	if [[ -n $http_proxy ]]; then
-		parse_url $http_proxy | read method host path port
-		echo "GET $url HTTP/1.0\r\n" |
-			mconnect -p ${port:-8080} $host
-	else
-		parse_url $url | read method host path port
-		echo "GET $path HTTP/1.0\r\n" |
-			mconnect -p ${port:-80} $host
-	fi
-}
-
 #
 #	Decide whether to bringover to the codemgr workspace
 #
 if [ "$n_FLAG" = "n" ]; then
+	PARENT_SCM_TYPE=$(parent_wstype)
 
 	if [[ $SCM_TYPE != none && $SCM_TYPE != $PARENT_SCM_TYPE ]]; then
 		echo "cannot bringover from $PARENT_SCM_TYPE to $SCM_TYPE, " \
--- a/usr/src/tools/scripts/onu.1	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/scripts/onu.1	Thu Sep 09 11:46:43 2010 -0400
@@ -18,11 +18,12 @@
 .\" " CDDL HEADER END
 .\" "
 .\" "Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-.\"
-.TH onu 1 "20 July 2010"
+.\" "Copyright 2010, Richard Lowe
+.\" "
+.TH onu 1 "28 August 2010"
 .SH NAME
 .I onu
-\- Os/Net Update
+\- OS/Net Update
 .SH SYNOPSIS
 \fBonu [opts] [-s <beName>] -t <beName>\fP
 .br
@@ -37,34 +38,22 @@
 used to update a system with the latest set of IPS packages for the ON
 (OS/Net) consolidation of Solaris, using beadm(1M) to create a new Boot
 Environment (BE) and pkg(1) to update the image.
-.LP
-After updating an image, 
-.I onu
-can then be used to start repository depot servers, in preparation for
-using
-.I pkg
-to install additional packages and/or zones.
 .SH OPTIONS
 .LP
 The following global options are supported:
 .TP 4
-.B \-d <dir>
-Specifies that <dir> contains repo.redist and repo.extra sub-directories;
-.I onu
-will stand up a depot for each and use them for the publisher and extra
-packaging repositories.  Note that -d ignores -u, -U, -e, and -E, as well
-as the environment variables used by those options.
+.B \-c <consolidation>
+Specifies the consolidation being installed via 
+.IR onu ,
+used to locate the publisher from which that consolidation is currently
+installed.  This is almost always "osnet".
 .TP 4
-.B \-e <URI>
-Specifies that <URI> should be used as the origin URI for the extra repository.
-See \fBONEXTRAURI\fP below for default values.
-.TP 4
-.B \-E <publisher>
-Specifies that <publisher> should be used as the publisher name for
-the extra repository.  See \fBONEXTRAPUB\fP below for default values.
-.TP 4
-.B \-O
-Open mode, where the extra repository will not be used.
+.B \-d <dir>
+Specifies that <dir> contains the repo.redist sub-directory;
+.I onu
+will run a depot using this packaging repository.
+Note that -d ignores -u and -U as well
+as the environment variables used by those options.
 .TP 4
 .B \-u <URI>
 Specifies that <URI> should be used as the origin URI for the publisher
@@ -94,10 +83,8 @@
 The second form of onu takes the following option:
 .TP 4
 .B \-r
-In the current BE, create the repository depot servers and configure
-the requested publishers appropriately, without updating. After
-\fBonu\fP exits, one or two pkg.depotd servers will be left running,
-allowing \fBpkg\fP operations using the related publishers to succeed.
+In the current BE configure the requested publisher appropriately, without
+updating.
 .SH EXIT STATUS
 .LP
 The following exit values are returned:
@@ -197,21 +184,7 @@
 used as the publisher name for the packaging repository.  If -U is not
 provided and this variable is not set, on-nightly will be used.
 .LP
-ONEXTRAURI
-.IP
-If the -e option is not provided, and this variable is set, it will be used
-as the origin URI for the extra repository.  If -e is not provided and this
-variable is not set, http://ipkg.sfbay/on-extra will be used.  Note: for
-external users where an extra repository does not apply, use the -O option.
-.LP
-ONEXTRAPUB
-.IP
-If the -E option is not provided, and this variable is set, it will be
-used as the publisher name for the extra repository.  If -E is not
-provided and this variable is not set, on-extra will be used.
-.LP
 .SH SEE ALSO
 .BR beadm "(1M), "
 .BR pkg "(1), "
-.BR pkg.depotd "(1M), "
 .BR pkg "(5) "
--- a/usr/src/tools/scripts/onu.sh	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/scripts/onu.sh	Thu Sep 09 11:46:43 2010 -0400
@@ -22,26 +22,23 @@
 
 #
 # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
-#
+# Copyright 2010, Richard Lowe
+# 
 
 PATH=/usr/bin:/usr/sbin
 export PATH
 
 DEFAULTONURI="http://ipkg.sfbay/on-nightly"
 DEFAULTONPUB="on-nightly"
-DEFAULTONEXTRAURI="http://ipkg.sfbay/on-extra"
-DEFAULTONEXTRAPUB="on-extra"
 
 usage()
 {
 	echo "usage: $0 [opts] [-s beName] -t beName"
 	echo "usage: $0 [opts] -r"
 	echo
+	echo "\t-c consolidation : consolidation being upgraded"
 	echo "\t-d repodir : directory for repositories"
-	echo "\t-e uri : origin URI for extra repository"
-	echo "\t-E prefix : prefix for extra repository"
-	echo "\t-O : open mode, no extra repository will be used"
-	echo "\t-r : start repository servers only"
+	echo "\t-r : configure publisher only"
 	echo "\t-s : source BE to clone"
 	echo "\t-t : new BE name"
 	echo "\t-u uri : origin URI for redist repository"
@@ -55,8 +52,7 @@
 	echo "Update to the nightly build:"
 	echo "\tonu -t newbe"
 	echo
-	echo "Re-enable the publishers, and start any pkg.depotd servers"
-	echo "necessary in the current BE:"
+	echo "Re-enable the publishers in the current BE:"
 	echo "\tonu -r -d /path/to/my/ws/packages/\`uname -p\`/nightly"
 	exit 1
 }
@@ -64,18 +60,9 @@
 exit_error()
 {
 	echo $*
-	cleanup
 	exit 2
 }
 
-cleanup()
-{
-	[ $redistpid -gt 0 ] && kill $redistpid
-	[ $extrapid -gt 0 ] && kill $extrapid
-	[ -d /tmp/redist.$$ ] && /bin/rm -rf /tmp/redist.$$
-	[ -d /tmp/extra.$$ ] && /bin/rm -rf /tmp/extra.$$
-}
-
 do_cmd()
 {
 	[ $verbose -gt 0 ] && echo $*
@@ -91,31 +78,20 @@
 {
 	root=$1
 
-	do_cmd pkg -R $root set-publisher --no-refresh --non-sticky opensolaris.org
-	do_cmd pkg -R $root set-publisher -e --no-refresh -P -O $uri $redistpub
-	[ $open -eq 0 ] && {
-		do_cmd pkg -R $root set-publisher -e \
-		    --no-refresh -O $extrauri $extrapub
-	}
-	do_cmd pkg -R $root refresh --full
-}
+	#
+	# Get the publisher name from the 'list -v' output.  It may seem we
+	# could do this more tidily using 'info', but that is
+	# internationalized.
+	#
+	typeset on_publisher=$(pkg -R $root list -Hv \
+	    "${consolidation}-incorporation" | cut -d/ -f3)
 
-#
-# If we're working from a repodir, disable the new publishers in the new
-# BE; they won't work without further configuration, in which case the
-# -r option should be used.
-#
-unconfigure_publishers()
-{
-	root=$1
-
-	if [ -n "$repodir" ]; then
-		do_cmd pkg -R $root set-publisher -P opensolaris.org
-		do_cmd pkg -R $root set-publisher -d $redistpub
-		[ $open -eq 0 ] && {
-			do_cmd pkg -R $root set-publisher -d $extrapub
-		}
-	fi
+        if [[ "$on_publisher" != "$redistpub" ]]; then
+	        do_cmd pkg -R $root set-publisher --no-refresh \
+                    --non-sticky $on_publisher
+        fi
+	do_cmd pkg -R $root set-publisher -e --no-refresh -P -O $uri $redistpub
+	do_cmd pkg -R $root refresh --full
 }
 
 update()
@@ -128,8 +104,6 @@
 	configure_publishers $root
 
 	do_cmd pkg -R $root image-update
-
-	unconfigure_publishers $root
 }
 
 update_zone()
@@ -169,33 +143,22 @@
 sourcebe=""
 targetbe=""
 uri=""
-extrauri=""
 repodir=""
+consolidation="osnet"
 verbose=0
-open=0
-redistpid=0
-extrapid=0
-redistport=13000
-extraport=13001
 no_zones=0
 zone_warned=0
 reposonly=0
 
-trap cleanup 1 2 3 15
-
-while getopts :d:E:e:Ors:t:U:u:vZ i ; do
+while getopts :c:d:Ors:t:U:u:vZ i ; do
 	case $i in
+	c)
+		consolidation=$OPTARG
+		;;
 	d)
 		repodir=$OPTARG
 		;;
-	E)
-		extrapub=$OPTARG
-		;;
-	e)
-		extrauri=$OPTARG
-		;;
-	O)
-		open=1
+	O)			# no-op, compatibility with recommended use
 		;;
 	r)
 		reposonly=1
@@ -237,53 +200,27 @@
 [ -z "$uri" ] && uri=$DEFAULTONURI
 [ -z "$redistpub" ] && redistpub=$ONPUB
 [ -z "$redistpub" ] && redistpub=$DEFAULTONPUB
-[ -z "$extrauri" ] && extrauri=$ONEXTRAURI
-[ -z "$extrauri" ] && extrauri=$DEFAULTONEXTRAURI
-[ -z "$extrapub" ] && extrapub=$ONEXTRAPUB
-[ -z "$extrapub" ] && extrapub=$DEFAULTONEXTRAPUB
 
 if [ -n "$repodir" ]; then
 	redistdir=$repodir/repo.redist
 	[ -d $redistdir ] || exit_error "$redistdir not found"
+	typeset cfgfile=$redistdir/cfg_cache
+	[[ ! -e $cfgfile ]] && cfgfile=$redistdir/pkg5.repository
+	# need an absolute path
+	[[ $redistdir == /* ]] || redistdir=$PWD/$redistdir
 	redistpub=$(python2.6 <<# EOF
 		import ConfigParser
 		p = ConfigParser.SafeConfigParser()
-		p.read("$redistdir/cfg_cache")
+		p.read("$cfgfile")
 		pp = p.get("publisher", "prefix")
 		print "%s" % pp
-		EOF)
-	[ $verbose -gt 0 ] && echo "starting pkg.depotd -d $redistdir -p $redistport"
-	ARGS="--readonly --writable-root"
-	mkdir /tmp/redist.$$
-	/usr/lib/pkg.depotd -d $redistdir -p $redistport $ARGS /tmp/redist.$$ >/dev/null &
-	redistpid=$!
-	uri="http://localhost:$redistport/"
-	if [ $open -eq 0 ]; then
-		extradir=$repodir/repo.extra
-		[ -d $extradir ] || exit_error "$extradir not found"
-		extrapub=$(python2.6 <<# EOF
-			import ConfigParser
-			p = ConfigParser.SafeConfigParser()
-			p.read("$extradir/cfg_cache")
-			pp = p.get("publisher", "prefix")
-			print "%s" % pp
-			EOF)
-		[ $verbose -gt 0 ] && echo "starting pkg.depotd -d $extradir -p $extraport"
-		mkdir /tmp/extra.$$
-		/usr/lib/pkg.depotd -d $extradir -p $extraport $ARGS /tmp/extra.$$ >/dev/null &
-		extrapid=$!
-		extrauri="http://localhost:$extraport/"
-	fi
+		EOF) || exit_error "Cannot determine publisher prefix"
+	[[ -n "$redistpub" ]] || exit_error "Repository has no publisher prefix"
+	uri="file://$redistdir"
 fi
 
 if [ "$reposonly" -eq 1 ]; then
 	configure_publishers /
-	if [ "$redistpid" -ne 0 ]; then
-		echo "$redistpub pkg.depotd running with pid $redistpid"
-	fi
-	if [ "$extrapid" -ne 0 ]; then
-		echo "$extrapub pkg.depotd running with pid $extrapid"
-	fi
 	exit 0
 fi
 
@@ -305,5 +242,4 @@
 	done
 fi
 
-cleanup
 exit 0
--- a/usr/src/tools/scripts/rtichk.py	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-#!/usr/bin/python2.4
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
-#
-
-#
-# Check each bug referenced in a comments list (from stdin) has a valid RTI
-#
-
-import sys, os, getopt
-
-sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "lib",
-                                "python%d.%d" % sys.version_info[:2]))
-
-# Allow running from the source tree, using the modules in the source tree
-sys.path.insert(2, os.path.join(os.path.dirname(__file__), '..'))
-
-from onbld.Checks.Rti import rti
-
-
-def usage():
-    print 'usage: rtichk [-g gate] [-c consolidation] bugids...'
-    sys.exit(2)
-
-try:
-	opts, bugs = getopt.getopt(sys.argv[1:], "c:g:r:t:")
-except getopt.GetoptError:
-	usage()
-	sys.exit(2)
-
-gate = None
-consolidation = None
-
-for opt, arg in opts:
-	if opt == '-c': consolidation = arg
-	elif opt == '-g': gate = arg
-
-ret = not rti(bugs, consolidation=consolidation, gatePath=gate,
-	      output=sys.stdout)
-sys.exit(ret)
--- a/usr/src/tools/scripts/sccscp.1	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-.\" ident	"%Z%%M%	%I%	%E% SMI"
-.\"
-.\" CDDL HEADER START
-.\"
-.\" The contents of this file are subject to the terms of the
-.\" Common Development and Distribution License, Version 1.0 only
-.\" (the "License").  You may not use this file except in compliance
-.\" with the License.
-.\"
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-.\" or http://www.opensolaris.org/os/licensing.
-.\" See the License for the specific language governing permissions
-.\" and limitations under the License.
-.\"
-.\" When distributing Covered Code, include this CDDL HEADER in each
-.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-.\" If applicable, add the following below this CDDL HEADER, with the
-.\" fields enclosed by brackets "[]" replaced with your own identifying
-.\" information: Portions Copyright [yyyy] [name of copyright owner]
-.\"
-.\" CDDL HEADER END
-.\"
-.\" "Copyright 2000 Sun Microsystems, Inc."
-.\" "All rights reserved"
-.\" "Use is subject to license terms."
-.TH sccscp 1 "20 May 1992"
-.SH NAME
-.I sccscp
-\- copy SCCS files under CodeManger control
-.SH SYNOPSIS
-.B sccscp
-[-r] [-g] [-d] filename1 [filename2...] target
-.SH DESCRIPTION
-.I sccscp
-is to be used to duplicate sccs files which are under CodeManager
-control.  sccscp will copy the files or directories given
-on the command line, it will then "uniqueify"
-the SMID for the s-dot file.
-.LP
-.I sccscp
-should be used any time your are duplicating part of a workspace
-under CodeManager control.  
-.SH OPTIONS
-.TP 10
-.B \-r
-If file n is a directory, 
-.B sccscp
-will copy the directory and all its files, including any
-subdirectories and their files; 
-.I target must be a directory.
-.TP
-.B \-g
-Don't do SCCS gets after copying the s-dot files.  Normally 
-g-files are extracted after they are copied.  
-.TP
-.B \-e
-Copy most recent delta if file is currently checked out.
-.TP
-.B \-d
-set debug mode.
--- a/usr/src/tools/scripts/sccscp.sh	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,222 +0,0 @@
-#!/bin/sh 
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 1993-1998, 2003 Sun Microsystems, Inc.
-# All rights reserved.
-# Use is subject to license terms.
-# 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-#
-#	This script is to be used to copy SCCS files and SCCS 
-#	directory structures within a CodeManager workspace
-#	You specify the 'clear file' or directory to sccscp, it
-#	will duplicate the coresponding s-dot file(s), 
-#	and do an SCCS GET operation on the newly
-#	created s-dot file.
-#
-#
-
-#
-# The CDPATH variable causes ksh's `cd' builtin to emit messages to stdout
-# under certain circumstances, which can really screw things up; unset it.
-#
-unset CDPATH
-
-R_FLAG=0
-G_FLAG=0
-E_FLAG=0
-
-usage()
-{
-	echo "usage:	sccscp [-r] filename1 [ filename2...] target"
-	echo "	-r copy a directory and all of its files"
-	echo "	-g copy the sdot file, but do not sccs-get it"
-	echo "	-e copy most recent delta if file is currently checked out."
-	echo "	-d debug mode"
-} #usage()
-
-
-#
-# function to return that last arguement passed to it. 
-# I use this in place of array indexing - which shell
-# does not do well.
-#
-getlast()
-{
-	for arg in $*
-	do
-	:
-	done
-	echo "$arg"
-} # getlast()
-
-
-
-#
-# copy_file(source, destination)
-#
-copy_file()
-{
-	f1=`basename $1`
-	d1=`dirname $1`
-	s1="$d1/SCCS/s.$f1"
-	p1="$d1/SCCS/p.$f1"
-	f2=`basename $2`
-	d2=`dirname $2`
-	s2="$d2/SCCS/s.$f2"
-	#
-	# is the file currently checked out?
-	#
-	if [ "(" -f $p1 ")" -a "(" $E_FLAG -eq "0" ")" ]; then
-		echo "sccscp: $f1 currently checked out - not copied"
-		return
-	fi
-	#
-	# Does the destination directory have an SCCS directory,
-	# if not we will create it!
-	#
-	if [ ! -d $d2/SCCS ]; then
-		mkdir $d2/SCCS
-	fi
-	cp $s1 $s2
-	if [ $G_FLAG -eq "0" ]; then
-		PWD=`pwd`
-		cd $d2 
-	   	echo "sccs get $d2/$f2"
- 	   	sccs get $f2 
-		cd $PWD
-	fi
-} # copy_file()
-
-
-#
-# copy_dir(source, destination)
-#
-copy_dir()
-{
-	PWD=`pwd`
-
-	if [ -d $2 ]; then
-		destdir=$2/`basename $1`
-	else
-		destdir=$2
-	fi
-
-	cd $1
-
-	find . -name "s.*" -print | grep '/SCCS/s\.' \
-	| while read sdot
-	do
-		sdot=`echo $sdot | sed -e "s/^\.\///"`
-		d2=$PWD/$destdir/`dirname $sdot`
-		f2=`basename $sdot | sed -e "s/^s\.//" `
-		if [ "(" -f $PWD/$1/`dirname $sdot`/p.$f2 ")" -a \
-		     "(" $E_FLAG -eq "0" ")" ]; then
-			d1=`basename $sdot`
-			d1=`basename $d1`
-			echo "sccscp: $d1/$f2 currently checked out - not copied"
-			continue
-		fi
-		if [ ! -d $d2 ]; then
-			mkdir -p $d2
-		fi
-		cp $PWD/$1/$sdot $PWD/$destdir/$sdot
-		if [ $G_FLAG -eq "0" ]; then
-			dir=`dirname $destdir/$sdot`
-			dir=`dirname $dir`
-			cd $PWD/$dir
-			echo "sccs get $dir/$f2"
-			sccs get $f2 
-		fi
-	done
-
-	cd $PWD
-} # copy_dir()
-
-if [ -f /usr/sccs/admin ]; then
-	ADMIN=/usr/sccs/admin
-	PRS=/usr/sccs/prs
-else
-	ADMIN=/usr/ccs/bin/admin
-	PRS=/usr/ccs/bin/prs
-fi
-
-
-#
-# Parse options...
-#
-set -- `getopt edgr $*`
-if [ $? != 0 ]; then
-	usage
-	exit 2
-fi
-
-for i in $*
-do
-	case $i in
-	-r) R_FLAG=1; shift;;
-	-d) set -x; shift;;
-	-g) G_FLAG=1; shift;;
-	-e) E_FLAG=1; shift;;
-	--) shift; break;;
-	esac
-done
-
-if [ $# -lt 2 ]; then
-	echo "sccscp: Insufficient arguments (${#})"
-	usage
-	exit 1
-fi
-
-lastarg=`getlast $*`
-
-if [ "(" $# -gt 2 ")" -a "(" ! -d $lastarg ")" ]; then
-	echo "sccscp: Target must be a directory"
-	usage
-	exit 1
-fi
-
-while [ $# -gt 1 ]
-do
-	if [ ! -r $1 ]; then
-		echo "sccscp: cannot access $1"
-		shift
-		continue
-	fi
-	if [ -d $lastarg ]; then
-		dest=$lastarg/`basename $1`
-	else
-		dest=$lastarg
-	fi
-	if [ -d $1 ]; then
-		if [ $R_FLAG -eq 0 ]; then
-			echo "sccscp: <$1> directory"
-		else
-			copy_dir $1 $dest
-		fi
-	else
-		copy_file $1 $dest
-	fi
-	shift
-done
-
--- a/usr/src/tools/scripts/sccshist.sh	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,152 +0,0 @@
-#!/bin/ksh -p
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright 2003 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-# 
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-#  Print sccs history of a file with
-#  comment and differences for each delta.
-#
-# With the -r invocation style, only the deltas between the given sids are
-# printed.  sccshist -r1.2 -r1.3, for example, prints the SID description for
-# 1.3, followed by the diffs between 1.2 and 1.3.  The SID description for 1.2
-# is not printed.
-#
-# With the -n invocation style, deltas to a given number of SIDs are printed.
-# Given a file with 1.5, 1.4, ... 1.1, sccshist -n 2 will print the 1.5 SID
-# header, 1.4 -> 1.5 diffs, the 1.4 SID header, and 1.3 -> 1.4 diffs.
-#
-
-PROGNAME=$(basename "$0")
-
-SCCS=/usr/ccs/bin/sccs
-
-die()
-{
-	echo "$PROGNAME: $@" >&2
-	exit 1
-}
-
-usage()
-{
-	echo "Usage: $PROGNAME [-c|-u] [-r lowsid [-r highsid]] file" >&2
-	echo "       $PROGNAME [-c|-u] [-n nsids] file" >&2
-	exit 2
-}
-
-lowsid=
-highsid=
-typeset -i nsids=0
-diffflags=
-
-while getopts "cn:r:u" c ; do
-	case $c in
-	    c|u)
-		[[ -n "$diffflags" ]] && usage
-	    	diffflags="-$c"
-		;;
-	    n)
-		expr "X$OPTARG" : 'X[0-9]*$' >/dev/null || usage
-		nsids="$OPTARG"
-		;;
-	    r)
-		if [[ -n "$highsid" ]] ; then
-			usage
-		elif [[ -n "$lowsid" ]] ; then
-			highsid="$OPTARG"
-		else
-			lowsid="$OPTARG"
-		fi
-		;;
-	    *)
-		usage
-		;;
-	esac
-done
-shift $(($OPTIND - 1))
-
-[[ -n "$lowsid" && $nsids -ne 0 ]] && usage
-[[ $# -ne 1 ]] && usage
-
-FILE=$1
-
-[[ -r "$FILE" ]] || die "failed to open $FILE"
-
-tmpf1=/tmp/sid1.$$
-tmpf2=/tmp/sid2.$$
-trap "rm -f $tmpf1 $tmpf2 ; exit" 0 1 2 3 15
-
-#
-# The main processing loop.  A new SID triggers a printing of the diffs between
-# the new SID and the last one.  If there is no previous SID (if we're looking
-# at the first one), no diff is printed.
-#
-if [[ -z "$highsid" ]] ; then
-	printing=1
-else
-	printing=0
-fi
-
-typeset -i last=0
-typeset -i count=0
-
-$SCCS prt $FILE | while read LINE ; do
-	set - $LINE
-
-	if [[ $printing -eq 0 ]] ; then
-		if [[ "$2" = "$highsid" ]] ; then
-			printing=1
-		else
-			continue
-		fi
-	fi
-
-	if [[ $1 != "D" ]] ; then
-		echo "$LINE"
-		continue
-	fi
-
-	# We calculate `last' before printing the diff, and defer breaking out
-	# of the loop until after the diff, because we want to act upon the
-	# value during the diff.
-	[[ -n "$lowsid" && $printing -eq 1 && "$2" = "$lowsid" ]] && last=1
-	if [[ "$nsids" -ne 0 ]] ; then
-		count=$(($count + 1))
-		[[ $count -gt $nsids ]] && last=1
-	fi
-
-	$SCCS get -s -p -k -r$2 $FILE > $tmpf1
-	if [[ -r $tmpf2 ]] ; then
-		diff -wt $diffflags $tmpf1 $tmpf2
-		if [[ $last -eq 0 ]] ; then
-			echo "________________________________________________________"
-		fi
-	fi
-	mv $tmpf1 $tmpf2
-
-	[[ $last -eq 1 ]] && break
-
-	echo "$LINE"	# The new SID delta line
-done
--- a/usr/src/tools/scripts/sccsmv.1	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,39 +0,0 @@
-.\" ident	"%Z%%M%	%I%	%E% SMI"
-.\"
-.\" CDDL HEADER START
-.\"
-.\" The contents of this file are subject to the terms of the
-.\" Common Development and Distribution License, Version 1.0 only
-.\" (the "License").  You may not use this file except in compliance
-.\" with the License.
-.\"
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-.\" or http://www.opensolaris.org/os/licensing.
-.\" See the License for the specific language governing permissions
-.\" and limitations under the License.
-.\"
-.\" When distributing Covered Code, include this CDDL HEADER in each
-.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-.\" If applicable, add the following below this CDDL HEADER, with the
-.\" fields enclosed by brackets "[]" replaced with your own identifying
-.\" information: Portions Copyright [yyyy] [name of copyright owner]
-.\"
-.\" CDDL HEADER END
-.\"
-.\" "Copyright 2000 Sun Microsystems, Inc."
-.\" "All rights reserved"
-.\" "Use is subject to license terms."
-.TH sccsmv 1 "20 May 1992"
-.SH NAME
-.I sccsmv
-\- move SCCS files under CodeManager control
-.SH SYNOPSIS
-.B sccsmv
-filename1 [ filename2 ...] target
-.SH DESCRIPTION
-.I sccsmv
-is to be used to move SCCS files which are under CodeManager
-control.  sccsmv will move the the files or directories given
-on the command line.  You specify the 'clear file' or the
-directory to sccsmv, it will move both the 'clear file, the
-s-dot file, and if present, the p-dot files to the new location.
--- a/usr/src/tools/scripts/sccsmv.sh	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-#!/bin/sh
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright (c) 1993-1998 by Sun Microsystems, Inc.
-# All rights reserved.
-# 
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-#
-#	This script is to be used to move SCCS files and SCCS
-#	directories within a CodeManager workspace.  You 
-#	specifiy the 'clear file' or the directory to sccsmv,
-#	it will move both the 'clear file' and the coresponding
-#	s-dot, and if present, p-dot files.
-#
-
-USAGE="usage:	sccsmv filename1 [filename2 ...] target"
-
-
-#
-# function to return that last arguement passed to it. 
-# I use this in place of array indexing - which shell
-# does not do well.
-#
-getlast()
-{
-        for arg in $*
-        do
-        :
-        done
-        echo "$arg"
-} # getlast()
-
-move_file()
-{
-        f1=`basename $1`
-        d1=`dirname $1`
-        s1="$d1/SCCS/s.$f1"
-	p1="$d1/SCCS/p.$f1"
-        f2=`basename $2`
-        d2=`dirname $2`
-        s2="$d2/SCCS/s.$f2"
-	p2="$d2/SCCS/p.$f2"
-
-	if [ ! -d $d2/SCCS ]; then
-		mkdir $d2/SCCS
-	fi
-	mv $s1 $s2
-	mv $1 $2
-	if [ -f $p1 ]; then
-		mv $p1 $p2
-	fi
-} #move_file
-
-if [ $# -lt 2 ]; then
-	echo "Insufficient arguments ($#)"
-	echo $USAGE
-	exit 1
-fi
-
-lastarg=`getlast $*`
-
-if [ "(" $# -gt 2 ")" -a "(" ! -d $lastarg ")" ]; then
-	echo "sccsmv: Target must be a directory"
-	echo $USAGE
-	exit 1
-fi
-
-while [ $# -gt 1 ]
-do
-	if [ ! -r $1 ]; then
-		echo "sccsmv: cannot access $1"
-		shift
-		continue
-	fi
-	if [ -d $lastarg ]; then
-		dest=$lastarg/`basename $1`
-	else
-		dest=$lastarg
-	fi
-	if [ -d $1 ]; then
-		mv $1 $dest
-	else
-		move_file $1 $dest
-	fi
-	shift
-done
--- a/usr/src/tools/scripts/sccsrm.1	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-.\" ident	"%Z%%M%	%I%	%E% SMI"
-.\"
-.\" CDDL HEADER START
-.\"
-.\" The contents of this file are subject to the terms of the
-.\" Common Development and Distribution License, Version 1.0 only
-.\" (the "License").  You may not use this file except in compliance
-.\" with the License.
-.\"
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-.\" or http://www.opensolaris.org/os/licensing.
-.\" See the License for the specific language governing permissions
-.\" and limitations under the License.
-.\"
-.\" When distributing Covered Code, include this CDDL HEADER in each
-.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-.\" If applicable, add the following below this CDDL HEADER, with the
-.\" fields enclosed by brackets "[]" replaced with your own identifying
-.\" information: Portions Copyright [yyyy] [name of copyright owner]
-.\"
-.\" CDDL HEADER END
-.\"
-.\" "Copyright 2000 Sun Microsystems, Inc."
-.\" "All rights reserved"
-.\" "Use is subject to license terms."
-.TH sccsrm 1 "20 May 1992"
-.SH NAME
-.I sccsrm
-\- remove SCCS files under Avocet control
-.SH SYNOPSIS
-.B sccsrm
-[-f] <filename> ...
-.SH DESCRIPTION
-.I sccsrm
-is to be used to remove sccs files which are under Avocet
-control.  sccsrm will rename the files or directories given
-on the command line to the following format:
-.LP
-.RS 5
-.nf
-<filename>	->	.del-<filename>-<month>-<day>.{pid}
-.fi
-.RE
-.LP
-The trailing pid is optional and will only be appended to the filename
-if it is required to make a unique .del filename.
--- a/usr/src/tools/scripts/sccsrm.sh	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +0,0 @@
-#!/usr/bin/sh 
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License, Version 1.0 only
-# (the "License").  You may not use this file except in compliance
-# with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-# Copyright (c) 1993-1998 by Sun Microsystems, Inc.
-# All rights reserved.
-# 
-#ident	"%Z%%M%	%I%	%E% SMI"
-#
-#	This script is to be used to remove files from any CodeManager
-#	workspace.  It will do this by moving the specified file,
-#	and its corresponding s-dot file, to a .del-<file>-`date`
-# 	format.
-#
-#	The only way to remove files under the CodeManager is
-#	through the rename mechanism - it is not enough to
-#	simply 'rm' the file.
-#
-
-USAGE="usage: sccsrm [-f] <filename> ..."
-
-message() {
-   if [ ${F_FLAG} -eq 0 ]; then
-      echo "$*"
-   fi
-} 
-
-#
-# LC_ALL=C is set so that the this script will work no matter
-# which localization you have installed on your machine.  Some
-# localizations can cause the output of 'date' and other commands
-# to vary.
-#
-LC_ALL="C"; export LC_ALL
-
-date=`/usr/bin/date +%h-%d-%y`
-F_FLAG=0
-
-
-#
-# Parse options...
-#
-set -- `getopt f $*`
-if [ $? != 0 ]; then
-   echo $USAGE
-   exit 2
-fi
-
-
-for i in $*
-do
-   case $i in
-   -f) F_FLAG=1; shift;;
-   --) shift; break;;
-   esac
-done
-
-if [ $# -eq 0 ]; then
-   message $USAGE   
-   exit 1
-fi
-
-#
-# Process s-dot files.
-#
-for file in $*
-do
-   new_file="${file}-${date}"
-   #
-   # if there is a deleted file of the same name we then append the pid
-   # to the name.
-   if [ -f SCCS/s..del-${new_file} -o -d .del-${new_file} ]; then
-      new_file="${new_file}.$$"
-   fi
-   if [ -f SCCS/s.$file ]; then
-      if [ -f SCCS/p.${file} ]; then
-         if [ ${F_FLAG} -eq 0 ]; then
-	    echo "warning: ${file} is checked out for editing, all edits will be lost - continue (y/n)"
-	    read ans
-	    while [ `expr $ans : "^[YyNn]"` -eq 0 ]
-	    do
-	       echo "warning: ${file} is checked out for editing, all edits will be lost - continue (y/n)"
-	       read ans
-	    done
-	 else
-	    ans="y"
-	 fi
-	 if [ `expr $ans : "^[Yy]"` -eq 1 ]; then
-            rm -f SCCS/p.${file}
-	    rm -f ${file}
-	 else
-	    continue
-	 fi
-      fi
-      if [ -f ${file} ]; then
-         mv ${file} .del-${new_file}
-      fi
-      mv SCCS/s.${file} SCCS/s..del-${new_file}
-   elif [ -d ${file} -a ${file} != "SCCS" ]; then
-      mv ${file} .del-${new_file}
-   else
-      message "${file}: not an SCCS file"
-   fi
-done
-
-
-
--- a/usr/src/tools/scripts/webrev.sh	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/tools/scripts/webrev.sh	Thu Sep 09 11:46:43 2010 -0400
@@ -24,6 +24,8 @@
 # Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
 #
 
+# Copyright 2008, 2010, Richard Lowe
+
 #
 # This script takes a file list and a workspace and builds a set of html files
 # suitable for doing a code review of source changes via a web page.
@@ -2773,7 +2775,8 @@
 		#
 		itsinfo["${p}_URL"]="<a href=\\\"${itsinfo[${p}_URL]}\\\">&</a>"
 
-		print "/^${p}[ 	]/ {
+		# The character class below contains a literal tab
+		print "/^${p}[: 	]/ {
 				s;${itsinfo[${p}_REGEX]};${itsinfo[${p}_URL]};g
 				s;^${p};${itsinfo[${p}_INFO]};
 			}" >> ${its_sed_script}
@@ -2785,7 +2788,7 @@
 	#
 	for p in ${its_priority}; do
 		print "/^${itsinfo[${p}_REGEX]}[ 	]/ {
-				s;${itsinfo[${p}_REGEX]};${itsinfo[${p}_URL]};g
+				s;^${itsinfo[${p}_REGEX]};${itsinfo[${p}_URL]};g
 			}" >> ${its_sed_script}
 	done
 fi
--- a/usr/src/tools/scripts/wx.1	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,731 +0,0 @@
-.\" CDDL HEADER START
-.\"
-.\" The contents of this file are subject to the terms of the
-.\" Common Development and Distribution License (the "License").
-.\" You may not use this file except in compliance with the License.
-.\"
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-.\" or http://www.opensolaris.org/os/licensing.
-.\" See the License for the specific language governing permissions
-.\" and limitations under the License.
-.\"
-.\" When distributing Covered Code, include this CDDL HEADER in each
-.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-.\" If applicable, add the following below this CDDL HEADER, with the
-.\" fields enclosed by brackets "[]" replaced with your own identifying
-.\" information: Portions Copyright [yyyy] [name of copyright owner]
-.\"
-.\" CDDL HEADER END
-.\"
-.\" Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
-.\" Use is subject to license terms.
-.\"
-.\" ident	"%Z%%M%	%I%	%E% SMI"
-.\"
-.TH wx 1 "16 April 2008"
-.SH NAME
-.I wx
-\- tool to track changes to a workspace, follow ON gate rules and much more
-.SH SYNOPSIS
-\fBwx [<sub-command> [-D] [sub-command options]]\fP
-.LP
-.SH DESCRIPTION
-.IX "OS-Net build tools" "wx" "" "\fBwx\fP"
-.LP
-.I wx
-is a shell script to help the developer keep track of file changes in a
-workspace, follow the ON gate rules and much more. 
-.LP
-Note, it is recommended that you use 
-.I wx 
-for all file manipulation instead of using sccs as this allows wx to
-automatically track changes in the workspace instead of having to use
-the update command.  See http://www.opensolaris.org/os/community/on/wx/
-for more information about using wx.
-
-.\" COMMANDS section
-.LP
-.SH COMMANDS
-
-.TP 10
-.B -D
-The -D flag turns on debugging for any command.  Debugging information
-is output to stderr.
-
-.TP
-.B access
-shorthand for "wx ws access_control"
-
-.TP
-.B active 
-alias for list 
-
-.TP
-.B apply <cmd>
-apply cmd to all active files; for example,
-"wx apply cat" cats every file
-
-.TP
-.B arcs [-u]
-display all ARC cases in check-in comments
-
-.TP
-.B args
-shorthand for "wx ws args"
-
-.TP
-.B backup [-i|-n|-z|-b|-t]
-make backup copies of all active and renamed files and certain
-wx state files (active, renamed, *.NOT).
-
--i: info about backups (backup dir and contents)
-
--n: no compression 
-
--z: use gzip, faster than bzip2 but less compression.
-
--b: use bzip2, slower but better compression.
-Defaults to the compression of the previous backup.
-
--t: backup if wx files are newer than last backup.
-
-.TP
-.B bu 
-alias for backup command
-
-.TP
-.B bugs [-u] [-N]
-Display all bugids in check-in comments.  See \fBpbcom\fR below for a
-description of the flags.
-
-.TP
-.B cddlchk [cddlchk options]
-Warn about obsolete or corrupt CDDL blocks in active files.  Note that only
-files that already contain a CDDL block will be checked unless the '-a' flag
-is specified, and that files listed in wx/cddlchk.NOT will be skipped.
-
-.TP
-.B checkin
-Alias for delget command.
-
-.TP
-.B checkout
-Alias for edit command.
-
-.TP
-.B ci
-Alias for checkin command.
-
-.TP
-.B co
-Alias for checkout command.
-
-.TP
-.B codereview [-N] [codereview options]
-generate environmentally friendly codereview diffs
-for all active files.  -N indicates that delta
-comments shouldn't be included in the output.
-
-.TP
-.B comchk
-Warns if the comments' formats break ON rules.  In addition, this will
-warn if the bug id doesn't match the given synopsis.  Note that this
-performs a network connection to a server on the SWAN, so this may hang
-depending on the availability of the server.  Completely detached operation
-should fail smoothly (with a warning).
-
-.TP
-.B comments
-display check-in comments for active files
-
-.TP
-.B copyright
-Warns if there is a problem with the copyright message in active files.
-Files listed in wx/copyright.NOT will be skipped.
-
-.TP
-.B create [-(c|C) comment_file] [-f] [-o] file [file ...]
-Creates one or more files in the workspace.
-(Updates active list)
-
--c comment_file: see delget.
-
--C comment_file: see delget.
-
--f: force create regardless of warnings,
-(non-interactive).
-
--o: also check out file for further editing.
-
-.TP
-.B cstyle
-run cstyle over all active .c and .h files.  Files listed in wx/cstyle.NOT
-will be skipped. 
-
-.TP
-.B delete [-f] [file ...]
-Delete one or more files from the workspace.
-Will delete all files in active list if no file
-args.  Note, for files brought over from parent,
-this command actually moves the file under the
-deleted_files/ subdir so it can be recovered.
-For new files this command can remove the file
-and file history completely.
-(Updates active list if file is in there.)
-
--f : force delete regardless of warnings 
-(non-interactive)
-Warning, this will completely remove new
-files from the workspace.  The backup
-command will be automatically run before
-doing delete -f.
-
-.TP
-.B delget [-(c|C) comment_file][-s][-f] [file ...] 
-Check in all active files or files on command line (will do 'sccs
-create' for files without file histories). Check in comments will be
-those in active file.  See 'wx comments' for more info.
-
--c comment_file: use comment(s) in specified comment file when creating
-file(s). Note, each comment should be on new line, blank lines not
-allowed.  The comments in the active list will be replaced by the
-comments in the comment_file for the files specified or all the entries
-in the active list if no files specified. 
-
--C comment_file: Similar to -c but comments are appended to current
-active list comments.
-
--f: force checkin, no checks, non-interactive.
-Use this if your sure the files okay to checkin
-otherwise this command will check for keyword
-problems.
-
-.TP
-.B deltachk
-Warns if there is more than one sccs delta in active files (more than 1
-breaks ON rules unless putting back more than 1 bug and then there
-should be at most 1 delta per bug if necessary).  Files listed in
-wx/deltachk.NOT will be skipped.
-
-.TP
-.B diffs [file ...]
-show sccs diffs for files (current vs previous version). 
-
-Will show diffs for all active files if no files given on command line.
-New files are not shown, use sub-command 'tdiffs' to include new
-files. 
-
-Will use WXDIFFCMD environment variable if set.  Hint, try: export
-WXDIFFCMD="diff -bw -U 5"
-
-.TP
-.B dir
-echo the wx directory path ($workspace/wx)
-
-.TP
-.B e <file>
-edit the named wx control file, e.g. "wx e active".
-The editor is $EDITOR if set, else vi.
-
-.TP
-.B ea
-shorthand for "wx e active" (edit active list).  
-Note, the format for each entry in the active
-list is:
-
-filepath
-<empty line> # no spaces allowed
-one or more comment lines # no blank lines between.
-<empty line> # no spaces allowed, ends the entry.
-
-In general, it is best to only edit the active list to update comments.
-Use the other wx commands like edit or create to update the active list
-when possible.
-
-.TP
-.B edit [-s] [file ...]	
-check out either file(s) on command line or all active files if no file
-args.  (Updates the active list.)
-
--s: silent, less sccs diagnostic output.  This is true for the other
-commands that accept the -s flag.
-
-.TP
-.B egrep
-see wx grep
-
-.TP
-.B eval <cmd>
-like apply, but more general.  In fact,
-"wx apply cmd" is implemented internally as
-"wx eval 'cmd $file'".  When using eval,
-you can refer to $dir, $file, $filepath,
-$parent, and $workspace.  For example:
-wx eval 'echo $dir; sccs prt $file | more'
-will show the sccs history for each active file,
-preceded by its directory.
-
-.TP
-.B extract
-Alias for get command.
-
-.TP
-.B fullreview [-N] [codereview options]
-generate full codereview diffs for all active files.
--N indicates that delta comments shouldn't be included in the output.
-
-.TP
-.B get [-k][-r #][-p] [file ...]
-Get a copy of all active files or files on command
-line.  By default this is a read only version of
-the file.  Accepts 'sccs get' flags.  Here are some
-of the more common:
-
--k: don't expand the sccs ID string
-
--r #: get specified version #
-
--p: output to stdout
-
-.TP
-.B grep <regular expression>
-search all active files for regular expression; equivalent to "wx eval
-\'echo $filepath; grep pattern $file'"
-
-.TP
-.B hdrchk
-run 'hdrchk -a' over all active .h files.  Warns if header files (.h) do not
-conform to ON style rules.  Note that this is not the same as running 'make
-check' or 'nightly -C', which apply a stricter set of rules to a subset of ON
-headers.  Skips files in wx/hdrchk.NOT.
-
-.TP
-.B help
-print usage message
-
-.TP
-.B info	[file ...]
-show all info about active files
-
-.TP 
-.B init [options] [src-root-dir]	
-initialize workspace for wx usage
-
--f(t|q|n): non-interactive mode of update.  Use this to keep init from
-asking questions.
-
--ft: thorough update (update both active, 
-renamed and new lists with all diffs between parent
-and current workspace).  Can be slow.
-
--fq: quick update (update active list with files
-currently checked out in current workspace).
-
--fn: no update (just create empty active, 
-renamed and new lists if they don't exist).
-
--s: keep active list sorted by default.  This will keep the active list
-sorted whenever the active list is updated.  Must follow one of the
--f(t|q|n) args.
-
-src-root-dir: optional path relative to top of workspace where wx will
-search for files. Use "." to set src-root to top of workspace.  Default
-is usr.
-
-.TP
-.B jstyle
-run jstyle over all active .java files.  Files listed in wx/jstyle.NOT
-will be skipped. 
-
-.TP
-.B keywords
-run keywords check over all active files.  Warns if it find problems
-with SCCS keywords. Skips files in wx/keywords.NOT.
-
-.TP
-.B list [-r|-p|-w] 
-list active files (the ones you are working on)
-
--r: list only renamed active files.
-
--p: output list of both active and renamed files 
-suitable for input to putback. 
-
--w: output list of both active and renamed files
-suitable for input to webrev (see wx webrev 
-subcommand below).
-
-.TP
-.B makestyle
-run makestyle over all active Makefiles.
-
-.TP
-.B mv file newfile 	
-Rename file to newfile
-(Updates active list with new file name)
-
-.TP
-.B mv <file|dir> newdir 	
-Renames dir or file to newdir.  If newdir exists
-then dir will be subdir under newdir.  Note,
-this renames all files in dir and can take a
-while if there are a lot of files affected by
-the rename.  (Updates active list)
-
-.TP
-.B nawk
-see wx grep
-
-.TP
-.B new [-t]
-List new active files (files that exist in child only)
-Note, should be run before reedit (see reedit below).
-
--t: thorough, does not use new cache (slower but more
-accurate if new cache isn't current).
-
-.TP
-.B nits [file ...]
-nits checking.  Run cstyle, jstyle, hdrchk, copyright, cddlchk, and
-keywords over files to which they are applicable (makestyle is not currently
-run because it seems to be quite broken -- more noise than data).  This is a
-subset of pbchk checks suitable for checking files during development.  Use
-pbchk before doing the final putback.  Will run checks on all active files if
-no file args.  Will skip checks for files listed in wx/nits.NOT.
-
-.TP
-.B out
-find all checked-out files in workspace
-
-.TP
-.B outchk
-Warns if there are files in the workspace that are checked out that are
-not in the active list.  These files should either be in the active list
-(see the "update -q" command) or they should not be checked out.
-
-.TP
-.B pb
-alias for putback.
-
-.TP
-.B pbchk [file ...]
-putback check.  Run cstyle, jstyle, hdrchk, copyright, cddlchk, keywords,
-rmdelchk, deltachk, comchk, rtichk and outchk over all files to which they
-are applicable (makestyle is not currently run because it seems to be quite
-broken -- more noise than data).  Should be run before doing a putback.
-Will run checks on all active files if no file args.
-Will skip checks for files listed in wx/pbchk.NOT.
-
-.TP
-.B pbcom [-v] [-u] [-N]
-display summarized comments suitable for putback
-Default is to display only bugs and arc cases.  Will
-display warnings about non-bug comments to stderr.
-
--v: display all comments verbatim including non-bug/arc 
-
--u: prevent sorting, order determined by active list.
-Hint, putback will accept comments on stdin.
-
--N: prevent a network lookup to cross-check bugids with their synopses
-
-.TP
-.B pblist 
-alias for list -p (see above).
-                        
-.TP
-.B pdiffs [file ...]
-show diffs against parent files
-
-Will show diffs for all active files if no files given on command line.
-New files are not shown, use sub-command 'tpdiffs' to include new
-files.
-
-Will use WXDIFFCMD environment variable if set. 
-
-.TP
-.B prt [-y]
-show SCCS delta history for all active files
-
--y: only show latest delta entry
-
-.TP
-.B putback [-v] [-N] [other putback flags, see below]
-putback active and renamed files.  Will use pbcom
-output as the putback comments.
-
--v: pass comments verbatim to putback (see pbcom)
-
--N: don't cross-check bugids with their synopses (see pbcom)
-
-Accepts -n, -p, -q putback flags ('man putback' for
-more info).
-
-.TP
-.B recheckin
-Alias for redelget command.
-
-.TP
-.B recheckout
-Alias for reedit command.
-
-.TP
-.B reci
-Alias for redelget command.
-
-.TP
-.B reco
-Alias for reedit command.
-
-.TP
-.B redelget [-m] [-s] [file ...]
-Similar to reedit but the file is checked in when the command is done.
-This is the command to use to collapse new files to their initial delta.
-
-.TP
-.B reedit [-m] [-s] [file ...]
-Collapse the sccs delta (file history) such that
-all changes made to the file in the current
-workspace are now in one delta.  If no files are
-given on command line then all the active files
-are processed.  The files are left in a checked
-out state so you can make further changes if
-required.  If not, run "wx delget" to check the
-files in prior to putback.  Note, newly created
-files will only have one delta entry after doing
-'wx delget'.  Run this right after a resolve to
-make all your changes look like a single delta.
-This eliminates the uninteresting leaf deltas
-that arise from resolving conflicts, so your
-putbacks do not contain a bunch of noise about
-every bringover/resolve you did in the interim.
-Accepts the same compression flags as wx backup.  
-[file ...] reedits files on command line.  This
-adds files to active list if not already there.
-                        
-NOTE: reedit is appropriate for leaf workspaces
-ONLY -- applying reedit to an interior-node
-workspace would delete all childrens comments
-and confuse Teamware tools in general.  
-                        
-Before using reedit it's a good idea to check
-the output of the new command to make sure the
-list of new files looks okay.  If files show up
-as new that are not then DO NOT use the reedit
-as it will destroy the file history.
-
-NOTE: if a file is new, reedit will leave the file checked out.  In
-order to keep the delta version at 1.1 redelget must be used for
-checkin.
-
--m: only reedit files that have more that one delta as compared to
-parent file.  New files will be recreated with comment found in active
-list.
-
-.TP
-.B renamed [-a|-d|-p] 
-list locally renamed files. The output format is:
-"new_name previous_name". Note, deleted files are
-a special case of rename. 
-
--a: list only renamed active files (same as list -r)
-
--d: list only deleted files
-
--p: show "new_name parent_name" (Note, parent_name
-may not be the same as previous_name)
-
-.TP
-.B reset [-f] [file ...]
-Resets file contents and history to that of parent file.  If the file
-was renamed locally it will be reset to that of the parent.  It does not
-work on new file (see uncreate).
-
-NOTE: use with care.  If something goes wrong, do a wx restore from the
-last backup and copy wx/tmp/nametable.orig to Codemgr_wsdata/nametable.
-
-.TP
-.B resolve [Teamware resolve args]
-resolve bringover conflicts and reedit just merged files.  See 'man
-resolve' for args.
-
-.TP
-.B restore [-f] [backup_dir]
-restore a backup in a workspace (restores both active files and performs
-file renames associated with that backup).  Also restores certain wx
-state files (active, renamed, *.NOT, etc...).  A path to the directory
-containing the backup to restore from can be optionally specified.
-
--f: non-interactive.  Will restore from last backup.
-
-.TP
-.B rm
-Alias for delete command.
-
-.TP
-.B rmdelchk
-Warns if sccs rmdel was run on active files (This causes Teamware
-problems.) Files listed in wx/rmdelchk.NOT will be skipped.
-
-.TP
-.B rtichk
-make sure RTI is approved for bugs/rfe's listed in active list comments.
-(RTI is Request To Integrate and is filed using rtitool).  Will skip rtichk
-if wx/rtichk.NOT exists.
-
-.TP
-.B sed
-see wx grep
-
-.TP
-.B tdiffs [file ...]
-total diffs, similar to the diffs sub-command, except new files are also
-included in the output. New files are those listed by 'new' sub-command.
-
-Will use WXDIFFCMD environment variable if set. 
-
-.TP
-.B tpdiffs [file ...]
-total parent diffs, similar to the pdiffs sub-command, except new files are
-also included in the output.  tpdiffs considers a file to be new if it does
-not exist in the parent.
-
-Will use WXDIFFCMD environment variable if set. 
-
-.TP
-.B uncheckout
-Alias for unedit command.
-
-.TP
-.B unco
-Alias for uncheckout command.
-
-.TP
-.B uncreate [-f] [file ...]
-Undoes the create of a new file.  The file's active list entry, it's
-SCCS history and the entry in the workspace nametable will be removed
-but the file will stay in the workspace.  Will uncreate all new files in
-active list if no file argument is specified.
-
-.TP
-.B unedit [-s][-f] [file ...] 
-Returns file(s) to state prior to edit/checkout Note, files will be
-unlocked and any changes made when file was last checked out will be
-lost.  Unedit all active files if no files listed on command line.
-(Updates active list)
-
--f: force unedit (non-interactive).  Will backup if wx files newer
-than last backup.
-
-.TP
-.B update [-q|-r] [-s]
-Update the active and renamed file lists by appending names of all files
-that have been checked out, changed or renamed as compared to the parent
-workspace.  This is the most accurate way of updating but it is slow.
-All files in the workspace must be under SCCS control in order for
-update to find them.  
-
-This command will also rename active list file entries if it discovers
-that the active file was renamed in the workspace (perhaps as a result
-of a bringover).
-
-Note, this command can be sped up in some cases by setting the PUTBACK
-env. variable to use "cm_env -g -o putback". (See
-http://webhome.holland.sun.com/casper/ for more info abou the turbo
-def.dir.flp tool).
-
--q: quick update (only updates active list with files currently checked
-out in workspace).  This is faster but will not update the renamed list
-or find files that have been checked-in/delget'ed.  It will rename
-active entries if it finds they have been renamed in the workspace.
-
--r: only update the renamed list.  Does not update the active list.
-
--s: sort active list.
-
-.TP
-.B version
-print current version of this program
-
-.TP
-.B webrev [webrev-options]
-Generates a webrev for active and renamed/deleted files.
-Note, uses comments in the active list.  This is the
-preferred way of reviewing code.
-Files listed in wx/webrev.NOT will be skipped.
-
-.TP
-.B ws <file>
-cat the named workspace control file, i.e.
-$workspace/Codemgr_wsdata/file
-
-.LP
-.SH ENVIRONMENT VARIABLES
-.LP
-Here is a list environment variables that 
-.I wx
-references and the meaning of each variable.
-.LP
-.RE
-.B BRINGOVER
-.RS 5
-Specifies the command wx uses to do a bringover (default is
-"bringover").  This is useful if you want to use something like Casper
-Dik's turbo-dir.flp scripts as in this example: 
-
-export BRINGOVER='cm_env -g -o bringover'
-.LP
-.RE
-.B PUTBACK
-.RS 5
-
-Specifies the command wx uses to do the putback (default is "putback").
-This is useful if you want to use something like Casper Dik's
-turbo-dir.flp scripts as in this example: 
-
-export PUTBACK='cm_env -g -o putback'
-.LP
-.RE
-.B WXDIFFCMD
-.RS 5
-Specifies the diff command and args for the 
-.I wx 
-diffs commands like diffs and pdiffs.  This is similar to the
-CDIFFCMD and UDIFFCMD environment variables that webrev uses.
-A good setting is:
-
-export WXDIFFCMD='diff -bw -U5'
-.LP
-.RE
-.B WXDIR
-.RS 5
-Specifies a non-default directory where 
-.I wx 
-will store its state files.  This is useful when running 
-.I wx 
-in a workspace where write permission isn't available or there is an
-existing wx directory which should not be modified.  For example:
-
-$ WXDIR=/tmp/my_wxdir wx init
-.LP
-.RE
-.B WXWEBREV
-.RS 5
-Specifies the webrev that 
-.I wx 
-will use when running the wx webrev subcommand.  For example:
-$ WXWEBREV=~/bin/webrev wx webrev
-
-.SH EXAMPLES
-.LP
-See http://www.opensolaris.org/os/community/on/wx/ for
-examples of how to use wx.
-
-.SH BUGS
-.LP
-The new wx is slower that the old wx.  There are probably ways to make
-it faster and hopefully this will be done one day.
-
-.SH See Also
-.LP
-teamware, workspace, putback, sccs, webrev
--- a/usr/src/tools/scripts/wx.sh	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5079 +0,0 @@
-#!/bin/ksh -p
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-#
-
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-# 
-
-# wx -- workspace extensions.  Jeff Bonwick, December 1992.
-
-# The bugster cat/subcat = consolidation/os-net-tools
-
-version() {
-	if [[ $(whence $0) = "/opt/onbld/bin/wx" ]] && \
-	    pkginfo SUNWonbld > /dev/null 2>&1; then
-		pkginfo -l SUNWonbld | egrep "PKGINST:|VERSION:|PSTAMP:"
-	else
-		ls -l $(whence $0)
-	fi    
-}
-
-ring_bell() {
-	# Sound bell to stderr, no newline 
-	print -u2 "\007\c"
-}
-
-fail() {
-	ring_bell
-	# output error message to stderr
-	print -u2 "$@ Aborting $command."
-	exit 1
-}
-
-ask() {
-	typeset question=$1 default_answer=$2
-	if [ -z "$default_answer" ]; then
-		echo "$question \c"
-	else
-		echo "$question [$default_answer]: \c"
-	fi
-	read answer
-	[ -z "$answer" ] && answer="$default_answer"
-}
-
-yesno() {
-	typeset question="$1"
-	answer=
-	while [ -z "$answer" ]; do
-		ask "$question" y/n
-		case $answer in
-			y|yes)	answer=yes;;
-			n|no)	answer=no;;
-			*)	answer=;;
-		esac
-	done
-}
-
-ok_to_proceed() {
-	yesno "$*"
-	if [[ "$answer" == no ]]; then
-		echo "Exiting, no action performed"
-		exit 1
-	fi
-}
-
-escape_re() {
-	# Escape the . so they are treated as literals in greps.
-	echo "$1"|sed 's{\.{\\.{g'
-}
-
-remove_local_nt_entry() {
-	# remove entries in local nt cache
-	grep -v "^$(escape_re $1) " $wxdir/local_nametable > \
-		$wxtmp/local_nametable
-	[[ ! -f $wxtmp/local_nametable ]] && \
-		fail "Error: cannot create $wxtmp/local_nametable"
-	mv -f $wxtmp/local_nametable $wxdir/local_nametable ||
-		fail "Error: cannot create $wxdir/local_nametable."
-}
-
-remove_renamed_entry() {
-	# remove entries in renamed list
-	# assuming arg is the new filename to remove
-	grep -v "^$(escape_re $1) " $wxdir/renamed > \
-		$wxtmp/renamed
-	[[ ! -f $wxtmp/renamed ]] && fail "Error: cannot create $wxtmp/renamed"
-	mv -f $wxtmp/renamed $wxdir/renamed ||
-		fail "Error: mv -f $wxtmp/renamed $wxdir/renamed failed"
-}
-
-add_local_nt_entry() {
-	# Add workspace nametable entry to local nt cache for better perf.
-	[[ -r $wsdata/nametable ]] || return 0
-	if ! grep -q "^$(escape_re $1) " $wxdir/local_nametable; then
-		# add entries from workspace nt to local nt cache
-		grep "^$(escape_re $1) " $wsdata/nametable >> \
-			$wxdir/local_nametable
-		[[ ! -f $wxdir/local_nametable ]] && \
-			fail "Error: cannot create $wxdir/local_nametable"
-	fi
-	return 0
-}
-
-remove_active_entry() {
-	# Remove entry from active list 
-	# $1 is the filepath to remove
-
-	nawk '
-	$1 == target {
-		# Get past filepath line
-		while(NF > 0)
-			getline;
-		# Get past blank lines
-		while(NF == 0)
-			getline;
-		# Get past comments
-		while(NF > 0)
-			getline;
-		# Get past ending blank lines
-		while(NF == 0) {
-			if (getline) {
-				continue;
-			} else {
-				next;
-			}
-		}
-	}
-	# print the other active list entries
-	{ print $0; } ' target=$1 $wxdir/active >$wxtmp/tmp_active ||
-		fail "Error: cannot create $wxtmp/tmp_active."
-	if mv -f $wxtmp/tmp_active $wxdir/active; then
-		echo "$1 removed from active list."
-		remove_local_nt_entry $1
-	else
-		cat >&2 <<-EOF
-An error occured trying to remove $1 from the active list.
-The active list may be corrupt.  You should check it out and 
-possibly run '$ME update' to fix.
-		EOF
-		fail 
-	fi
-}
-
-rename_active_entry() {
-	# renamed $1 to $2 filepath in active list
-	sed "s|^$(escape_re $1)$|$2|" $wxdir/active >\
-		$wxtmp/active || fail "Error: cannot create $wxtmp/active."
-	mv -f $wxtmp/active $wxdir/active || \
-		fail "Error: mv $wxtmp/active $wxdir/active failed."
-}
-
-is_active() {
-	# Return 0 if filepath arg is found in active list.
-	wx_active|grep -q "^$(escape_re $1)$"
-}
-
-#
-# ask user if s/he wants to remove an entry from the active list.
-# Will not remove entries that differ from parent or are new.
-#
-ask_remove_active_entry() {
-	# if an arg is passed in then this is assumed to be the filepath
-	# otherwise we assume the variables were set properly by the caller
-	if [[ $# -eq 1 ]]; then
-		dir=$(dirname $1)
-		file=$(basename $1)
-		filepath=$1
-
-		if [[ ! -f $file ]]; then
-			echo "Cannot find $file"
-			return 1
-		fi
-	fi
-
-	if is_active $filepath; then
-		if wx_pnt_filepath $filepath; then
-			if ! cmp -s $file $parentfilepath; then
-				cat <<-EOF
-
-The file $filepath
-differs from parent file:
-$parentfilepath
-and will remain in the active list.
-				EOF
-				return
-			fi
-		else
-			# New file, leave in active list.
-			cat <<-EOF
-$filepath
-is new and will remain in active list.  Use:
-'$ME uncreate $filepath'
-to remove from active list.
-			EOF
-			return
-		fi
-		# Remove entry from active list because it is the same as 
-		# the parent.
-		echo "There is no difference between $filepath and the parent"
-		echo "$parentfilepath"
-		yesno "Okay to remove $filepath from active list?"
-		if [[ "$answer" == 'yes' ]]; then
-			remove_active_entry $filepath
-		fi
-	fi
-}
-
-refresh_pnt_nt_cache() {
-	# Refresh the parent nametable cache if necessary.
-	# Note, this is a cache for the parent nametable entries that
-	# have the same hash as the local active and renamed files.
-
-	# no parent so nothing to update.
-	[[ -z $parent ]] && return 0
-
-	if [[ ! -r $parent/Codemgr_wsdata/nametable ]]; then
-		fail "Error: cannot read $parent/Codemgr_wsdata/nametable"
-	fi
-
-	if [[ ! -f $wxtmp/parent_nametable ||
-	    $parent/Codemgr_wsdata/nametable -nt $wxtmp/parent_nametable ||
-	    $wsdata/parent -nt $wxtmp/parent_nametable ||
-	    $wxdir/local_nametable -nt $wxtmp/parent_nametable ]]; then
-		cut -f2- -d' ' $wxdir/local_nametable > $wxtmp/hash_list
-
-		if [[ ! -f $wxtmp/hash_list ]]; then
-			fail "Error: cannot create $wxtmp/hash_list."
-		fi
-
-		if [[ -s $wxtmp/hash_list ]]; then
-			# Use hash list to get only the parent files
-			# we're interested in.
-			fgrep -f $wxtmp/hash_list \
-			    $parent/Codemgr_wsdata/nametable \
-				 > $wxtmp/parent_nametable 
-			[[ ! -f $wxtmp/parent_nametable ]] && \
-				fail "Error: cannot create $wxtmp/parent_nametable"
-		else
-
-			# There aren't any files to search for so just
-			# update the timestamp.
-
-			touch $wxtmp/parent_nametable
-		fi
-	fi
-}
-
-# add an active file to the new list
-add_new() {
-	typeset efp=$(escape_re $1)
-	# update new file list
-	if [[ ! -f $wxdir/new ]]; then
-		touch $wxdir/new || fail "Error: cannot create $wxdir/new."
-	fi
-	if is_active $1 && ! grep -q "^$efp$" $wxdir/new; then
-		echo "$1" >> $wxdir/new || fail "Error: cannot update $wxdir/new."
-	fi
-}
-
-# remove a file from the new list
-remove_new() {
-	# remove entries in new list
-	typeset efp=$(escape_re $1)
-	if [[ -f $wxdir/new ]] && grep -q "^$efp$" $wxdir/new; then
-		grep -v "^$efp$" $wxdir/new > $wxtmp/new
-		[[ ! -f $wxtmp/new ]] && fail "Error: cannot create $wxtmp/new"
-		mv -f $wxtmp/new $wxdir/new || fail "Error: cannot create $wxdir/new." 
-	fi
-}
-
-update_active() {
-	# Try to add an entry to the active list
-	typeset efp=$(escape_re $1)
-
-	if ! is_active $1; then
-		if [[ -n "$comment_file" ]]; then
-			# Use sed to remove any empty lines from comment file.
-			(echo $1; echo; sed '/^[ 	]*$/d' $comment_file;\
-				echo) >>$wxdir/active ||
-				fail "Could not update active list."
-		else
-			(echo $1; echo; wx_show_comment; echo) \
-			    >> $wxdir/active ||
-				fail "Could not update active list."
-			echo "Remember to edit the comment in the active list "\
-				 "(use '$ME ea')."
-		fi
-		add_local_nt_entry $1
-	fi  # End if not in active list
-}
-
-sort_active() {
-	typeset origfp=$filepath
-
-	# Note must use filepath for wx_show_comment
-	wx_active | sort | while read filepath; do
-		(print "$filepath"; print; wx_show_comment; print)
-	done > $wxtmp/active_sort || \
-		fail "Error: cannot create $wxtmp/active_sort"
-	mv -f $wxtmp/active_sort $wxdir/active || \
-		fail "Error: cannot create $wxdir/active"
-
-	filepath=$origfp
-}
-
-sort_renamed() {
-	sort $wxdir/renamed > $wxtmp/renamed_sort || \
-		fail "Error: cannot create $wxtmp/renamed_sort"
-	mv -f $wxtmp/renamed_sort $wxdir/renamed || \
-		fail "Error: cannot create $wxdir/active"
-}
-
-update_active_comment() {
-	# replace comment in active list entry with contents of $comment_file
-	nawk '
-	# find active list entry to modify
-	$1 == filepath {
-		# print filepath line
-		while(NF > 0){
-			print $1;
-			getline;
-		}
-		#print 1 blank (delimit)
-		print "";
-		# Get past blank lines
-		while(NF == 0){
-			getline;
-		}
-		# Get past active entry comments
-		# append to or replace comment
-		if (comment_mode == "append"){
-			while(NF > 0) {
-				# output existing comments
-				print $0;
-				getline;
-			}
-		} else {
-			# get past existing comments
-			while(NF > 0) getline;
-		}
-
-		# output new comments
-		while (getline < comments){
-			# do not print blank lines
-			if (NF > 0)
-				print $0
-		}
-		close comments
-		# print delimiting blank line
-		printf "\n"
-
-		# Get past ending blank lines in active entry
-		NF=0
-		while(NF == 0) {
-			if (getline) {
-				continue;
-			} else {
-				next;
-			}
-		}
-	}
-	# print the other active list entries
-	{ print $0; } ' filepath=$1 comment_mode=$comment_mode \
-		comments=$comment_file $wxdir/active >$wxtmp/tmp_active && \
-		mv $wxtmp/tmp_active $wxdir/active 
-	if [[ $? -eq 0 ]]; then
-		echo "$1 comment(s) updated in active list."
-	else
-		cat <<-EOF
-
-An error occured trying to update comments for $1 in the active list.
-The active list ($wxdir/active) may be corrupt.  You should check it out
-and possilbly run '$ME ea' to fix.
-
-		EOF
-		fail
-	fi
-}
-
-lookup_parent() {
-	# Find a local file's parent filepath.
-	# Returns 1 if not found (local file is new)
-	# Sets env var. parentfilepath and parenthash if found
-	# Requires a file arg.
-	# Updates local and parent nt caches.
-
-	typeset efp parententry localfile hash1 hash2 hash3 hash4 \
-		local_nt pnt_nt
-
-	parentfile=
-	parenthash=
-
-	if [[ -z $parent ]]; then
-		cat >&2 <<-EOF
-
-Warning: there is no parent for the current workspace so local file:
-$1
-is assumed to be new.
-		EOF
-		return 1
-	fi
-	if [[ ! -f $wsdata/nametable ]]; then
-		# Nothing has been brought over so assuming new file.
-		cat >&2 <<-EOF
-
-Warning: the $wsdata/nametable
-doesn't exist so
-$1
-is assumed to be new.
-		EOF
-		return 1
-	fi
-
-	if [[ ! -r $parent/Codemgr_wsdata/nametable ]]; then
-		fail "Error: cannot read $parent/Codemgr_wsdata/nametable."
-	fi
-	if [[ ! -f $wxtmp/parent_nametable ]] || $need_pnt_refresh; then
-		refresh_pnt_nt_cache
-		need_pnt_refresh=false
-	fi
-	if [[ ! -f $wxdir/local_nametable ]]; then
-		touch $wxdir/local_nametable ||
-			fail "Error: cannot create $wxdir/local_nametable."
-	fi
-
-	efp=$(escape_re $1)
-
-	for local_nt in $wxdir/local_nametable $wsdata/nametable; do
-
-		# May be multiple entries in nametable, see if one
-		# matches parent.
-
-		grep "^$efp " $local_nt |\
-		while read localfile hash1 hash2 hash3 hash4; do
-			for pnt_nt in $wxtmp/parent_nametable \
-			    $parent/Codemgr_wsdata/nametable; do
-				# get current parent nt entry
-				parententry=$(grep \
-				    " $hash1 $hash2 $hash3 $hash4$" $pnt_nt)
-				if [[ -n "$parententry" ]]; then
-					# found parent entry
-					parentfile=$(echo "$parententry" |\
-						cut -f1 -d' ')
-					parenthash="$(echo "$parententry" |\
-						cut -f2- -d' ')"
-					if [[ "$local_nt" == \
-						"$wsdata/nametable" ]]; then
-
-						# Update the local nt
-						# hash cache if parent
-						# found and local
-						# workspace nt used.
-
-						add_local_nt_entry $localfile
-					fi
-					if [[ $pnt_nt == \
-					    $parent/Codemgr_wsdata/nametable ]]
-					then
-
-						# Update the parent nt
-						# hash cache if actual
-						# parent nt used.
-
-						echo $parententry >>\
-						    $wxtmp/parent_nametable
-					fi
-
-					# break out of all the loops if
-					# parent found
-
-					break 3
-				fi
-			done # for pnt_nt
-		done # while read active file
-	done # for local_nt
-
-	if [[ -z "$parentfile" ]]; then
-		# parent filepath not found.
-		return 1
-	else
-		# parent filepath found.
-		return 0
-	fi
-}
-
-#
-# Detect if a file was locally renamed
-#
-renamed() {
-	# Return 0 if renamed, 1 if not locally renamed
-	# parentfile and parenthash set as side effect
-	# Must be used by commands that set filepath (like wx_eval)
-
-	if [[ ! -f $wxdir/renamed ]]; then
-		update_renamed_dir
-	fi
-
-	# new is the new filename in the current ws, old is the previous
-	# filename that should exist in parent ws.
-
-	if grep -q "^$(escape_re $filepath) " $wxdir/renamed; then
-		if lookup_parent $filepath; then
-			return 0
-		else
-
-			# New files aren't in $wxdir/renamed so no
-			# parent is a problem
-
-			fail "Error: renamed $filepath but no matching parent"\
-				"file in $parent"
-		fi
-	else
-		# not locally renamed
-		return 1
-	fi
-}
-
-wx_pnt_filepath() {
-	# return 0 if parent file found. Side effect: sets parentfilepath
-	# and parentsdot.  parentfile and parenthash are set via lookup_parent.
-
-	# if an arg is passed in then this is assumed to be the filepath
-	# otherwise we assume the variables were set properly by the caller
-	if [[ $# -eq 1 ]]; then
-		dir=$(dirname $1)
-		file=$(basename $1)
-		filepath=$1
-	fi
-
-	# Find the parent filename
-	if lookup_parent $filepath; then
-		parentfilepath=$parent/$parentfile
-		parentsdot=$parent/$(dirname $parentfile)/SCCS/s.$(basename \
-		    $parentfile)
-		if [[ -f $parentfilepath && -s $parentsdot ]]; then
-			# found
-			return 0
-		else
-			fail "Error: located parent filepath $parentfilepath"\
-				"but file does not exist or SCCS file is empty."
-		fi
-	fi
-
-	# wasn't found
-	return 1
-}
-
-get_pb_output() {
-	# Get output of putback -n (useful for parsing to find diffs between
-	# workspaces).  Creates $wxtmp/putback.err and $wxtmp/putback.out
-	typeset -i rc=0
-	typeset origdir=$(pwd)
-	# clean up if interrupted.
-	trap "rm $wxtmp/putback.out;exit 1" HUP INT QUIT TERM
-
-	cat <<-EOF
-Doing a '$PUTBACK -n $*' to find diffs between workspaces.
-Please be patient as this can take several minutes.
-	EOF
-
-        cd $workspace
-
-	$PUTBACK -n $* 2>$wxtmp/putback.err >$wxtmp/putback.out
-	rc=$?
-	# Note a blocked putback returns a 2 but is not a problem.
-	if [[ $rc -ne 0 && $rc -ne 2 ]]; then
-		rm $wxtmp/putback.out
-		fail "Error, $PUTBACK -n $* failed. See $wxtmp/putback.err"\
-			"for details."
-	fi
-	trap - HUP INT QUIT TERM
-        cd $origdir
-	return 0
-}
-
-wx_usage() {
-	version
-
-	cat << EOF
-
-See <http://www.opensolaris.org/os/community/on/wx/> for usage tips.
-
-Usage:  $ME command [-D] [args]
-
-        -D turn on debugging for any command (output to stderr)
-
-===================== Initialization and Update Commands ====================
-        $ME init [-f(t|q|n) [-s]] [src-root-dir]     
-                        initialize workspace for $ME usage
-                        -f(t|q|n): non-interactive mode of update.  Use this
-                                   to keep init from asking questions.
-                            -ft: thorough update (update both active and 
-                                 renamed lists with all diffs between parent
-                                 and current workspace).
-                            -fq: quick update (update active list with files
-                                 currently checked out in current workspace).
-                            -fn: no update (just create empty active and 
-                                 renamed lists if they don't exist already).
-                            -s:  keep active list sorted by default.  Must
-                                 follow a -f(t|q|n) flag.
-                        src-root-dir: optional path relative to top of 
-                                      workspace where wx will search for files.
-                                      Use "." to set src-root to top of
-                                      workspace.  Default is usr.
-        $ME update [-q|-r] [-s]
-                        Update the active and renamed file lists by
-                        appending names of all files that have been
-                        checked out, changed, created or renamed as
-                        compared to the parent workspace.  This is the
-                        most accurate way of updating but it is slow.
-                        All files in the workspace must be under SCCS
-                        control in order for update to find them.  Note,
-                        this operation can be sped up in some cases by
-                        setting the PUTBACK env. variable to use 
-                        "cm_env -g -o putback". (See
-                        http://webhome.holland.sun.com/casper/ for more
-                        info about the turbo def.dir.flp tool).
-
-                        -q: quick update (only updates active list with
-                            files currently checked out in workspace).  This
-                            is faster but will not find renames or files that
-                            have been checked-in/delget'ed.
-                        -r: only update the renamed list.  Does not update
-                            the active list.
-                        -s: sort the active list.
-
-======================== Information Commands ===========================
-        $ME list [-r|-p|-w] list active files (the ones you are working on)
-                        -r: list only renamed active files.
-                        -p: output list of both active and renamed files 
-                            suitable for input to putback. 
-                        -w: output list of both active and renamed files
-                            suitable for input to webrev (see $ME webrev 
-                            subcommand below).
-        $ME active          alias for list 
-        $ME pblist          alias for list -p (see above).
-
-        $ME renamed [-a|-d|-p]
-                         list locally renamed files. The output format is:
-                         "new_name previous_name". Note, deleted files are
-                         a special case of rename. 
-                        -a: list only renamed active files (same as list -r)
-                        -d: list only deleted files
-                        -p: show "new_name parent_name" (Note, parent_name 
-                            may not be the same as previous_name)
-        $ME new [-t]    List new active files (files that exist in child only)
-                        Note, should be run before reedit (see reedit below).
-                        -t: thorough, does not use new cache (slower but more
-                            accurate if new cache isn't current).
-        $ME out         find all checked-out files in workspace
-        $ME info        [file ...] show all info about active files
-
-        $ME diffs [file ...]
-                        show sccs diffs for files (current vs previous
-                        local version).  Will show diffs for all active
-                        files if no files given on command line.  Will
-                        use WXDIFFCMD environment variable if set.  Hint,
-                        try: export WXDIFFCMD="diff -bwU5"
-
-        $ME tdiffs [file ...]
-                        Similar to diffs but new files are also displayed.
-                        New files are those listed by '$ME new'.
-
-        $ME pdiffs [file ...]   show diffs against parent files
-                        Will show diffs between local file and it's
-                        parent for all active files if no files given on
-                        command line.  Will use WXDIFFCMD environment
-                        variable if set. 
-
-        $ME tpdiffs [file ...]   show diffs against parent files
-                        Similar to pdiffs but new files are also displayed.
-                        A file is considered new if it does not exist in
-                        the parent.
-
-        $ME prt [-y]    show sccs history for all active files
-
-        $ME comments    display check-in comments for active files
-        $ME bugs [-u]   display all bugids in check-in comments
-        $ME arcs [-u]   display all ARC cases in check-in comments
-        $ME pbcom [-v] [-u] [-N]  display summarized comments suitable for putback
-                        Default is to display only bugs and arc cases. Will
-                        display warnings about non-bug comments to stderr.
-                        -v: display all comments verbatim including non-bug/arc 
-                        -u: prevent sorting, order determined by active list
-                        -N: don't check bug synopsis against bug database
-
-======================== File Manipulation Commands ======================
-        $ME edit [-s] [file ...]        
-                        check out either file(s) on command line or
-                        all active files if no file args.
-                        (Updates the active list.)
-                        -s: silent, less sccs diagnostic output.  This is 
-                            true for the other commands that accept the 
-                            -s flag.
-        $ME checkout    Alias for edit command.
-        $ME co          Alias for edit command.
-
-        $ME unedit [-s][-f] [file ...] 
-                        Returns file(s) to state prior to edit/checkout
-                        Note, files will be unlocked and any changes made
-                        when file was last checked out will be lost.
-                        Unedit all active files if no files listed on
-                        command line.  Removes active list entry if there
-                        are no diffs between local and parent file.
-                        (Updates active list)
-                        -f: force unedit, non-interactive. Will backup
-                            if wx files newer than last backup.
-        $ME uncheckout  Alias for unedit command.
-        $ME unco        Alias for unedit command.
-
-        $ME delget [-(c|C) comment_file][-s][-f] [file ...] 
-                        Check in all active files or files on command
-                        line. Check in comments will be those in active
-                        file.  See '$ME comments' for more info.
-                        -c comment_file: use comment(s) in specified comment
-                                         file when checking in file(s). Note,
-                                         each comment should be on new line,
-                                         blank lines not allowed.  Existing
-                                         comments in active list will be 
-                                         replaced by contents of comment_file.
-                        -C comment_file: Similar to -c but comments are 
-                                         appended to current active list 
-                                         comments.
-                        -f: force checkin, no checks, non-interactive.
-                            Use this if your sure the files okay to checkin
-                            otherwise this command will check for
-                            keyword problems. Will backup if wx files
-                            newer than last backup.
-
-                        NOTE: use redelget to reset new file's version to 1.1.
-
-        $ME checkin     Alias for delget command.
-        $ME ci          Alias for delget command.
-
-        $ME create [-(c|C) comment_file] [-f] [-o] file [file ...]
-                        Creates one or more files in the workspace.
-                        (Updates active list)
-                        -(c|C) comment_file: see delget
-                        -f: force create regardless of warnings,
-                            (non-interactive).
-                        -o: also check out file for further editing.
-
-        $ME uncreate [-f] [file ...]
-                        Undoes the create of a new file.  The file's
-                        active list entry, its SCCS history and the
-                        entry in the workspace nametable will be removed
-                        but the file will stay in the workspace.
-                        Will uncreate all new files in active list if
-                        no file argument is specified.
-                        -f: force uncreate, non-interactive. Will backup
-                            if wx files newer than last backup.
-
-        $ME get [-k][-r #][-p] [file ...]
-                        Get a copy of all active files or files on command
-                        line.  By default this is a read only version of
-                        the file.
-                        -r #: get specified version #
-                        -p: output to stdout
-                        -k: don't expand the sccs ID string
-        $ME extract     Alias for get command.
-
-        $ME reedit [-m] [-s] [file ...]
-                        Collapse the sccs delta (file history) such that
-                        all changes made to the file in the current
-                        workspace are now in one delta.  If no files are
-                        given on command line then all the active files
-                        are processed.  The files are left in a checked
-                        out state so you can make further changes if a
-                        resolve to make all your changes look like a
-                        single delta.  This eliminates the uninteresting
-                        leaf deltas that arise from resolving conflicts,
-                        so your putbacks do not contain a bunch of noise
-                        about every bringover/resolve you did in the
-                        interim.  Accepts the same compression flags as
-                        $ME backup.  If [file ...] given, wx only
-                        reedits files passed on command line.  This adds
-                        files to active list if not already there.
-                        
-                        NOTE: reedit is appropriate for leaf workspaces
-                        ONLY -- applying reedit to an interior-node
-                        workspace would delete all childrens comments
-                        and confuse Teamware tools in general.
-                        
-                        NOTE: if files are listed as new that are not
-                        then DO NOT use the reedit as it will destroy
-                        the file history.
-
-                        NOTE: if a file is new reedit will leave the
-                        file checked out so in order to keep the delta
-                        version at 1.1 redelget must be used for
-                        checkin.
-
-                        -m: only reedit files that have more that one
-                            delta as compared to parent file.  New files
-                            will be recreated with comment found in
-                            active list.
-                        -s: silent checkin
-
-        $ME recheckout  Alias for reedit command.
-        $ME reco        Alias for reedit command.
-
-        $ME redelget [-m][-s] [file ...]
-                        Similar to reedit but the file is checked in
-                        when the command is done. This is the command to
-                        use to collapse new files to their initial
-                        1.1 delta (will assign comment in active list).
-        $ME recheckin   Alias for redelget command.
-        $ME reci        Alias for redelget command.
-
-        $ME delete [-f] [file ...]
-                        Delete one or more files from the workspace.
-                        Will delete all files in active list if no file
-                        args.  Note, for files brought over from parent,
-                        this command actually moves the file under the
-                        deleted_files/ subdir so it can be recovered.
-                        For new files this command can remove the file
-                        and file history completely.
-                        (Updates active list if file is in there.)
-                        -f : force delete regardless of warnings 
-                             (non-interactive)
-
-                             Warning, this will completely remove new
-                             files from the workspace.  Will backup
-                             if wx files newer than last backup.
-        $ME rm          Alias for delete command.
-
-        $ME mv file newfile     
-                        Rename file to newfile
-                        (Updates active list with new file name)
-        $ME mv file newdir      
-        $ME mv dir newdir       
-                        Renames dir or file to newdir.  If newdir exists
-                        then dir will be subdir under newdir.  Note,
-                        this renames all files in dir and can take a
-                        while if there are a lot of files affected by
-                        the rename.  (Updates active list)
-
-        $ME reset [-f] [file ...]
-                        Resets file contents and history to that of
-                        parent file.  If the file was renamed locally it
-                        will be renamed to that of the parent.  It does not
-                        work on new files (see uncreate or delete).
-
-                        NOTE: use with care.  If something goes wrong,
-                        do a wx restore from the last backup and copy
-                        wx/tmp/nametable.orig to Codemgr_wsdata/nametable.
-
-======================== Teamware Commands ======================
-        $ME putback [-v][-f][-N][Teamware putback flags, see below][file ...]
-                        Use Teamware putback command to putback either
-                        file(s) specified or *all* active and renamed
-                        files if no file(s) specified.  Will use pbcom
-                        output as the putback comments. 
-                        -f: force non-interactive mode (will not prompt)
-                        -v: pass comments verbatim to putback(see pbcom)
-                        -N: don't check bug synopsis against bug database
-                        Accepts -n, -p pws, -q putback flags ('man putback' 
-                        for more info).
-        $ME pb          alias for putback.
-
-        $ME resolve [Teamware resolve args]
-                        resolve bringover conflicts and reedit merged 
-                        files.  See 'man resolve' for args.
-
-======================== ON Rules checking Commands ======================
-        $ME cstyle      run cstyle over all active .c and .h files
-                        skips files in wx/cstyle.NOT
-        $ME jstyle      run jstyle over all active .java files
-                        skips files in wx/jstyle.NOT
-        $ME hdrchk      run 'hdrchk -a' over all active .h files
-                        skips files in wx/hdrchk.NOT
-        $ME makestyle   run makestyle over all active Makefiles
-        $ME keywords    run keywords over all active files
-                        skips files in wx/keywords.NOT
-        $ME copyright   make sure there is a correct copyright message
-                        that contains the current year
-                        skips files in wx/copyright.NOT
-        $ME cddlchk     make sure there is a current CDDL block in
-                        active files
-                        skips files in wx/cddlchk.NOT
-        $ME rmdelchk    make sure sccs rmdel was not run on active files
-                        (This causes Teamware problems.)
-        $ME deltachk    make sure only 1 sccs delta in active files
-                        (more than 1 breaks gate putback rules unless > 1
-                        bug in putback.)
-        $ME comchk      make sure comments are okay
-        $ME rtichk      make sure RTI is approved for bugs/rfe's listed
-                        in active list comments.  Will skip rtichk if
-                        wx/rtichk.NOT exists.
-        $ME outchk      warn if there are files checked out that aren't in
-                        active list.
-        $ME nits [file ...]
-                        nits checking.  Run cstyle, jstyle, hdrchk, copyright,
-                        cddlchk, and keywords over files to which they are
-                        applicable (makestyle is not currently run
-                        because it seems to be quite broken -- more
-                        noise than data).  This is a subset of pbchk checks
-                        suitable for checking files during development.
-                        Use pbchk before doing the final putback.
-                        Will run checks on all active files if no file args.
-                        Will skip checks for files listed in wx/nits.NOT.
-        $ME pbchk [file ...]
-                        putback check.  Run cstyle, jstyle, hdrchk, copyright,
-                        cddlchk, keywords, rmdelchk, deltachk, comchk, rtichk
-                        and outchk over files to which they are
-                        applicable (makestyle is not currently run
-                        because it seems to be quite broken -- more
-                        noise than data).  Good command to run before
-                        doing a putback.  
-                        Will run checks on all active files if no file args.
-                        Will skip checks for files listed in wx/pbchk.NOT.
-
-======================== Code Review Commands ======================
-        $ME webrev [webrev-args]
-                        generate webrev for active and renamed/deleted files.
-                        Note, uses comments in the active list.  This is the
-                        preferred way of reviewing code.  Arguments to webrev
-                        may also be specified.
-                        Will skip files listed in wx/webrev.NOT
-
-        $ME codereview [-N] [codereview options]
-                        generate environmentally friendly codereview diffs
-                        for all active files.  -N indicates that delta
-                        comments should not be included.
-
-        $ME fullreview [-N] [codereview options]
-                        generate full codereview diffs for all active files.
-                        -N indicates that delta comments should not be
-                        included.
-
-======================== Backup and Restore Commands ======================
-        $ME backup [-i|-n|-z|-b|-t]
-                        make backup copies of all active and renamed files.
-                        -i: info about backups (backup dir and contents)
-                        -n: no compression 
-                        -z: use gzip, faster than bzip2 but less compression.
-                        -b: use bzip2, slower but better compression.
-                        -t: backup if wx files are newer than last backup.
-                        Defaults to the compression of the previous backup.
-        $ME bu          Alias for backup command.
-
-        $ME restore [-f] [backup_dir]   
-                        restore a backup in a workspace (restores both
-                        active files and performs file renames).  A path
-                        to the directory containing the backup to
-                        restore from can be optionally specified.
-                        -f: non-interactive.  Will restore from last backup.
-
-======================== Misc Commands ============================
-        $ME apply <cmd> apply cmd to all active files; for example,
-                        "$ME apply cat" cats every file
-        $ME eval <cmd>  like apply, but more general.  In fact,
-                        "$ME apply cmd" is implemented internally as
-                        "$ME eval 'cmd \$file'".  When using eval,
-                        you can refer to \$dir, \$file, \$filepath,
-                        \$parent, and \$workspace.  For example:
-                        $ME eval 'echo \$dir; sccs prt \$file | more'
-                        will show the sccs history for each active file,
-                        preceded by its directory.
-        $ME grep        search all active files for pattern; equivalent to
-                        "$ME eval 'echo \$filepath; grep pattern \$file'"
-        $ME egrep       see $ME grep
-        $ME sed         see $ME grep
-        $ME nawk        see $ME grep
-
-        $ME dir         echo the $ME directory path (\$workspace/$ME)
-        $ME e <file>    edit the named $ME control file, e.g. "$ME e active".
-                        The editor is \$EDITOR if set, else vi.
-
-        $ME ea          shorthand for "$ME e active" (edit active list).  
-                        Note, the format for each entry in the active
-                        list is:
-
-                        filepath
-                        <empty line> # no spaces allowed
-                        one or more comment lines # no blank lines between.
-                        <empty line> # no spaces allowed, ends the entry.
-
-                        In general, it is best to only edit the active
-                        list to update comments.  Use the other $ME
-                        commands like edit or create to update the
-                        active list when possible.
-
-        $ME ws <file>   cat the named workspace control file, i.e.
-                        \$workspace/Codemgr_wsdata/file
-        $ME args        shorthand for "$ME ws args"
-        $ME access      shorthand for "$ME ws access_control"
-
-        $ME help        print this usage message
-        $ME version     print current version of this program
-EOF
-	exit 1
-}
-
-list_putback() {
-	(wx_active; list_renamed -n)|nawk '!seen[$0]++'
-}
-
-list_new() {
-	# list new files (not found in parent ws)
-	typeset new
-
-	if [[ $1 == '-t' ]]; then
-		wx_active|
-		while read new; do
-			# thorough, skip new cache
-			if ! lookup_parent $new; then
-				# no parent, new file
-				echo "$new"
-			fi
-		done
-	else
-		while read new; do
-			# use new cache
-			if ! lookup_parent $new; then
-				# no parent, new file
-				echo "$new"
-			fi
-		done < $wxdir/new
-	fi
-}
-
-list_renamed() {
-	typeset active current old
-
-	if [[ $# -eq 0 ]]; then
-		cat $wxdir/renamed
-	elif [[ $1 == '-d' ]]; then
-		# Only list only deleted file renames
-		grep '^deleted_files/' $wxdir/renamed
-	elif [[ $1 == '-n' ]]; then
-		# Only list only current filenames
-		cut -f1 -d' ' $wxdir/renamed
-	elif [[ $1 == '-p' ]]; then
-		# list parent for current instead of local previous name
-		while read current old; do
-			if lookup_parent $current; then
-				print "$current $parentfile"
-			else
-				ring_bell
-				print -u2 "Warning: cannot find parent file"\
-					"for $current"
-			fi
-		done < $wxdir/renamed
-	elif [[ $1 == '-a' ]]; then
-		# Just list active renamed files
-		for active in $(wx_active); do
-			grep "^$(escape_re $active) " $wxdir/renamed
-		done
-	elif [[ $1 == '-r' ]]; then
-		wx_active > $wxtmp/alist || fail "Error: cannot create $wxtmp/alist"
-		# Just list non-active renamed files (just current name)
-		while read current old; do
-			grep -q "^$(escape_re $current)$" $wxtmp/alist || 
-				echo $current
-		done < $wxdir/renamed
-		rm -f $wxtmp/alist
-	else
-		fail "Invalid flag $i. Run 'wx help' for info."
-	fi
-}
-
-list_webrev() {
-	# Output a list of active and renamed files suitable for webrev
-	for filepath in $( (wx_active; list_renamed -n)|nawk '!seen[$0]++'); do
-		if renamed; then
-			echo "$filepath $parentfile"
-		else
-			echo "$filepath"
-		fi
-	done
-}
-
-wx_webrev() {
-	typeset origdir=$PWD
-
-	cd $workspace
-	# skip files listed in .NOT files
-	cat -s $wxdir/$command.NOT >$wxtmp/NOT
-	
-	( # do the loops in a subshell so there is only one file open
-	for filepath in $(wx_active); do
-		if grep -q "^$(escape_re $filepath)$" $wxtmp/NOT; then
-			print -u2 "$filepath (skipping)"
-			continue
-		fi
-		if renamed; then
-			echo "$filepath $parentfile"
-		else
-			echo "$filepath"
-		fi
-		echo "\n$(wx_show_comment)\n"
-	done 
-
-	# Do non-active renamed files
-	for filepath in $(list_renamed -r); do
-		if grep -q "^$(escape_re $filepath)$" $wxtmp/NOT; then
-			print -u2 "renamed $filepath (skipping)"
-			continue
-		fi
-		lookup_parent $filepath ||
-			fail "Error: cannot find parent for $filepath."
-		if [[ $filepath != $parentfile ]]; then
-			echo "$filepath $parentfile"
-			# output empty line, comment, empty line
-			echo "\nRenamed only (webrev comment generated by "\
-			    "$ME, not an sccs comment)\n"
-		else
-			echo "$filepath"
-			echo "\nWarning, file in renamed list but has same "\
-			    "name as parent (not an sccs comment)\n"
-		fi
-	done
-	# End of subshell
-	) > $wxtmp/webrev.list
-	
-	# Note that the file list must come last.
-	${WXWEBREV:-webrev} -w "$@" $wxtmp/webrev.list
-
-	cd $origdir
-}
-
-#
-# list all active files
-#
-wx_active() {
-	# do not print hash by default
-	typeset rc hash=0
-	
-	case $1 in
-		# list only renamed active files
-		-r) list_renamed -a; return 0;;
-		# list suitable for putback (both active and renamed)
-		-p) list_putback; return 0;;
-		# list suitable for webrev (both active and renamed)
-		-w) list_webrev; return 0;;
-		-*) fail "Invalid flag $1. See 'wx help' for more info.";;
-	esac
-
-        if [[ ! -r $wxdir/active ]]; then
-                fail "Error: cannot read $wxdir/active"
-        fi
-
-	nawk '
-	{
-	    # skip blank lines
-	    while (NF == 0) { 
-		    if (getline == 0)
-			    next;
-	    }
-	    if (NF > 0){
-		    # print the active filepath
-		    print $1;
-		    getline;
-	    }
-	    # skip blank lines
-	    while (NF == 0) { 
-		    if (getline == 0){
-			    # Error, corrupt active list (missing comment)
-			    exit 1
-		    }
-	    }
-	    # skip comment
-	    while (NF > 0) {
-		    if (getline == 0){
-			    # Error, blank line after comment missing
-			    exit 2
-		    }
-	    }
-	}' $wxdir/active
-
-	rc=$?
-	if [[ $rc -eq 1 ]];then
-		fail "Corrupt active list (missing comment)."
-	elif [[ $rc -eq 2 ]];then
-		fail "Corrupt active list (blank line needed after comment)."
-	fi
-}
-
-#
-# show the comment for $filepath
-#
-wx_show_comment() {
-	if [[ -f $wxdir/active ]]; then
-		nawk '
-		{
-			filename=$1
-			getline
-			while (getline) {
-				if (length == 0)
-					next
-				if (filename == target) {
-					if ($0 == "NO_COMMENT") {
-							found = 0
-							exit 1
-					}
-					found = 1
-					print
-				}
-			}
-		}
-		END {
-			if (found == 0)
-				print "NO_COMMENT"
-			exit 1 - found
-		}' target=$filepath $wxdir/active
-		return $?
-	else
-		echo "NO_COMMENT"
-	fi
-}
-
-bugdb_lookup_monaco() {
-	typeset buglist=$1
-	typeset monaco=/net/monaco.sfbay/export/bin/monaco 
-
-	if [[ ! -x $monaco ]]; then
-		return 1
-	fi
-
-	$monaco -text <<-EOF
-	set What =
-	substr(cr.cr_number, 1, 7), synopsis
-
-	set Which =
-	cr.cr_number in ($buglist)
-
-	set FinalClauses =
-	order by cr.cr_number
-
-	do query/CR
-	EOF
-}
-
-bugdb_compare() {
-	nawk -v bugdb=$1 -v active=$2 -f - <<-"EOF"
-	BEGIN {
-		file = bugdb
-		while (getline < file) {
-			synbugdb[$1] = substr($0, length($1) + 1)
-		}
-		
-		file = active
-		while (getline < file) {
-			synactive = substr($0, length($1) + 1)
-			# If the synopsis doesn't match the bug database
-			# and the synopsis isn't what's in the database
-			# with " (something)" appended, spew a warning.
-			if (!($1 in synbugdb)) {
-				print "Bug " $1 " is not in the database"
-			} else if (synbugdb[$1] != synactive &&
-				!(index(synactive, synbugdb[$1]) == 1 &&
-				  substr(synactive, length(synbugdb[$1])) ~ \
-					/ \([^)]*\)$/)) {
-				print "Synopsis of " $1 " is wrong:"
-				print "  should be:" synbugdb[$1]
-				print "         is:" synactive
-			}
-		}
-	}
-	EOF
-}
-
-#
-# Summarize all comments listing, in order:
-#	 - free-form comments
-#	 - ARC case comments
-#	 - Bug comments
-#
-# -a will suppress ARC case comments
-# -b will suppress bug comments
-# -n will do pbchk processing (give all warnings, no error exit)
-# -o will suppress free-form (other) comments
-# -p will do pbcom checking and exit if it finds problems unless -v is given
-# -u will prevent sorting of the ARC case comments and bug comments
-# -v will output all comments verbatim (no sorting)
-# -N will prevent bug lookup, which may take a while.
-#
-# Note, be careful when modifying this function as sometimes the output
-# should go to stdout, as in the case of being called via pbchk and
-# sometimes the output should go to stderr.  Think about this when
-# making changes in here.
-#
-
-function wx_summary {
-	typeset i comment arc arcerr bug bugnospc bugid buglist synopsis \
-		show_arcs=true \
-		show_bugs=true \
-		show_others=true \
-		verbatim=false \
-		pbchk=false \
-		pbcom=false \
-		cmd=sort \
-		nolookup=false
-
-	while getopts :abnopuvN i; do
-		  case $i in
-		  a)	show_arcs=false;;
-		  b)	show_bugs=false;;
-		  n)	pbchk=true;;
-		  o)	show_others=false;;
-		  p)	pbcom=true;;
-		  v)	verbatim=true;;
-		  u)	cmd=cat;;
-		  N)	nolookup=true;;
-		  *)	fail "Invalid flag -$OPTARG. See 'wx help' for more"\
-		  		"info.";;
-		  esac
-	done
-
-	# Store all the comments in a tmp file
-	for filepath in $file_list; do
-		wx_show_comment
-	done | nawk '!seen[$0]++' > $wxtmp/comments
-
-	if grep -q "^NO_COMMENT$" $wxtmp/comments; then
-		print -u2 "Warning, found NO_COMMENT. Run '$ME ea' to edit the "\
-			  "comments."
-		if $pbcom; then
-			# Don't want to output anything to stdout for a pbcom
-			# if there is an error.
-			return 1
-		fi
-	fi
-	if $pbcom && $verbatim; then
-		# All comments output verbatim.  Note, is hacky because
-		# of the wx_summary interface.  pbcom calls wx_summary
-		# with -po assuming other comments shouldn't be output.
-		show_others=true
-	fi
-
-	# Note, hard tab in the arc regex.  This only recognizes FWARC,
-	# LSARC and PSARC.  Also, regex must be compat with both egrep
-	# and nawk.
-	arc='(FW|LS|PS)ARC[\/ 	][12][0-9][0-9][0-9]\/[0-9][0-9][0-9][^0-9]'
-	# bug ID must followed by single space
-	bug='[0-9][0-9][0-9][0-9][0-9][0-9][0-9] '
-	bugnospc='[0-9][0-9][0-9][0-9][0-9][0-9][0-9][^ ]'
-
-	if $show_arcs; then
-		# Note must use /usr/bin/sort.
-		if ! egrep "^$arc" $wxtmp/comments |
-			 sed 's#\([A-Z][A-Z]*ARC\)[/ 	]#\1 #' | sort |
-			 /usr/bin/sort -cu -k 1,2 2>$wxtmp/error >/dev/null
-		then
-			arcerr=$(nawk '{match($0, '"/$arc/"'); \
-				print substr($0, RSTART, RLENGTH);}' \
-				$wxtmp/error)
-
-			if $pbchk; then
-				# if pbchk print to stdout
-				print "Inconsistent ARC summaries for: $arcerr"
-			else
-				# else print to stderr
-				print -u2 \
-				"Inconsistent ARC summaries for: $arcerr"
-			fi
-			if $pbcom && ! $verbatim; then
-
-				# Don't want to output anything to
-				# stdout for a pbcom if there is an
-				# error.
-
-				return 1
-			fi
-		fi
-	fi
-
-	if $show_bugs; then
-		# Treating bug comments with "(nit comment)" at the end as the
-		# same as the original bug hence the sed and nawk below
-		# Note hard tabs in sed arg.
-		# Must use /usr/bin/sort.
-		if ! grep "^$bug" $wxtmp/comments |sort|
-			 sed 's/[ 	][ 	]*([^)]*) *$//' |
-			 nawk '!seen[$0]++'|
-			 /usr/bin/sort -cnu 2>$wxtmp/error >/dev/null; then
-			if $pbchk; then
-				print -n "Inconsistent bug summaries for: "
-				sed 's#^[^0-9]*\('"${bug}"'\).*#\1#' \
-				    $wxtmp/error
-			else
-				print -nu2 "Inconsistent bug summaries for: "
-				sed 's#^[^0-9]*\('"${bug}"'\).*#\1#' \
-				    $wxtmp/error >&2
-			fi
-			if $pbcom && ! $verbatim; then
-				# Don't want to output anything to
-				# stdout for a pbcom if there is an
-				# error.
-				return 1
-			fi
-		fi
-
-		# Compare bug synopsis in active comments with the bug database.
-		# If we've been passed -N, then we just never set buglist, thus
-		# skipping the lookup.
-		if ! $nolookup; then
-			grep "^$bug" $wxtmp/comments | sort > $wxtmp/buglist.active
-			cat $wxtmp/buglist.active | while read bugid synopsis; do
-				buglist=$buglist,$bugid
-			done
-			buglist=${buglist#,}
-		else
-			if $pbchk; then
-				print "Not performing bug synopsis check (be careful)"
-			else
-				print -u2 "Not performing bug synopsis check (be careful)"
-			fi
-		fi
-		if [[ -n $buglist ]]; then
-			bugdb_lookup_monaco $buglist > $wxtmp/buglist.bugdb
-			if [[ -s $wxtmp/buglist.bugdb && $? -eq 0 ]]; then
-				bugdb_compare $wxtmp/buglist.bugdb \
-					$wxtmp/buglist.active > $wxtmp/error
-				if [[ -s $wxtmp/error ]]; then
-					if $pbchk; then
-						cat $wxtmp/error
-					else
-						cat $wxtmp/error >&2
-					fi
-					if $pbcom && ! $verbatim; then
-						# Don't want to output anything
-						# to stdout for a pbcom if there
-						# is an error.
-						return 1
-					fi
-				fi
-			else
-				if $pbchk; then
-					print "Could not perform bug synopsis check"
-				else
-					print -u2 "Could not perform bug synopsis check"
-					if $pbcom; then
-						print -u2 "Use -N to skip bug synopsis check (be careful)"
-					fi
-				fi
-				if $pbcom && ! $verbatim; then
-					# Don't want to output anything
-					# to stdout for a pbcom if there
-					# is an error.
-					return 1
-				fi
-			fi
-		fi
-
-		if egrep "^$bugnospc" $wxtmp/comments >$wxtmp/error; then
-			# must have single space following bug ID
-			if $pbchk; then
-				print "\nThese bugs are missing single space following the bug ID"
-				print "(output prefaced by active file line number ':'):"
-				while read comment
-				do
-					grep -n "^$comment" $wxdir/active
-				done < $wxtmp/error
-			else
-				print -u2 "\nThese bugs are missing single space following the bug ID"
-				print -u2 "(output prefaced by active file line number ':'):"
-				while read comment
-				do
-					grep -n "^$comment" $wxdir/active >&2
-				done < $wxtmp/error
-			fi
-			if $pbcom && ! $verbatim; then
-				# Don't want to output anything to
-				# stdout for a pbcom if there is an
-				# error.
-				return 1
-			fi
-		fi
-	fi
-
-	# Create warning for pbchk or pbcom.
-	if $pbchk || ($pbcom && ! $verbatim) &&
-		egrep -v "^($bug|$bugnospc|$arc|NO_COMMENT$)" $wxtmp/comments\
-				> $wxtmp/other_comments; then
-		cat <<-EOF
-Warning, the following comments are found in your active list
-that are neither bug or arc cases: 
-
-		EOF
-		cat $wxtmp/other_comments
-		print -- "\n---- End of active list comment warnings ----"
-	fi > $wxtmp/comment_warning
-
-	if [[ -s $wxtmp/comment_warning ]]; then
-		if $pbchk; then
-			# output to stdout, don't exist in case there are more
-			# warnings.
-			cat $wxtmp/comment_warning
-		elif $pbcom && ! $verbatim ; then
-			# Don't want to output anything to stdout for a pbcom
-			# if there is an error.
-			cat $wxtmp/comment_warning >&2
-			return 1
-		fi
-	fi
-
-	if $pbchk; then
-		cd $workspace
-		# See if sccs delta comment is the same as active list comment
-		for filepath in $file_list; do
-			# extract most recent delta comment
-			sccs prs -d ':C:' $filepath | sort > $wxtmp/com1 ||
-				fail "sccs prs -d ':C:' $filepath failed."
-
-			# Add blank line to active comments so following cmp will
-			# work properly.
-			(wx_show_comment; print) | sort > $wxtmp/com2
-
-			if ! cmp -s $wxtmp/com1 $wxtmp/com2; then
-				print "\n$filepath"
-				print "Warning: current sccs comment does not"\
-					"match active list comment"
-				print "(< sccs comment, > active list comment):"
-				diff $wxtmp/com1 $wxtmp/com2 
-			fi
-		done 
-		# Just output warnings for pbchk
-		return 0
-	fi
-
-	if $show_others; then
-		  if ! $verbatim; then
-			  # The non-verbatim check should have produced the
-			  # other_comments file.
-			  cat $wxtmp/other_comments| $cmd
-		  else
-			  # just output comments verbatim then return
-			  cat $wxtmp/comments
-			  return 0
-		  fi
-	fi
-
-	if $show_arcs; then
-		  egrep "^$arc" $wxtmp/comments | $cmd
-	fi
-
-	if $show_bugs; then
-		  egrep "^$bug" $wxtmp/comments | $cmd
-	fi
-	return 0
-}
-
-update_renamed_file() {
-	# Try to add a entry to the renamed list.  Note, this stores the new
-	# name and previous name, not the  parent name as this is more useful in
-	# detecting cyclic renames.
-
-	# ofp: old filepath, nfp: new filepath
-	typeset ofp=$1 nfp=$2
-
-	# remove old and new entries from renamed
-	egrep -v "^($(escape_re $ofp)|$(escape_re $nfp)) " $wxdir/renamed \
-		>$wxtmp/renamed
-	[[ ! -f $wxtmp/renamed ]] && fail "Error: cannot create $wxtmp/renamed"
-	mv -f $wxtmp/renamed $wxdir/renamed || \
-		fail "Error: cannot create $wxdir/renamed."
-
-	# remove old entries from local nt cache
-	remove_local_nt_entry $ofp
-
-	# Do not update renamed list if the filepath is the same as
-	# the parent or the file is new.
-	if lookup_parent $nfp; then
-		if [[ $parentfile != $nfp ]]; then
-			print "$nfp $ofp" >> $wxdir/renamed || \
-				fail "Error: cannot append $wxdir/renamed."
-			
-			[[ $ACTSORT == sort ]] && do_renamed_sort=true
-		fi
-	fi
-	return 0
-}
-
-update_renamed_dir() {
-	typeset append pb_files new orig
-	typeset -i rc
-
-	if [[ $# -eq 0 ]]; then
-		# No args so we need to create the renamed list from
-		# the source root.
-		append=false
-		if [ -r $wxdir/srcroot_dir ]; then
-			pb_files=$(cat $wxdir/srcroot_dir)
-		else
-			pb_files=$DEFAULT_SRCDIR
-		fi
-	else
-		# Assuming one or more filepaths as args
-		append=true
-		pb_files="$*"
-	fi
-	echo "Updating $ME renamed list... this may take several minutes."
-
-	# Get output of putback -n to detect renames elsewhere in
-	# this script. 
-
-	get_pb_output $pb_files
-
-	nawk '
-		/^rename from:/{orig_file=$3}
-		$1 == "to:" {print $2 " " orig_file}' \
-		$wxtmp/putback.out  >$wxtmp/pb_renames || \
-			fail "Error, creation of $wxtmp/pb_renames failed."
-
-	cp $wxdir/renamed $wxdir/renamed.old || 
-		fail "Error: cannot create $wxdir/renamed.old."
-
-	if $append; then
-		nawk '!seen[$0]++' $wxtmp/pb_renames $wxdir/renamed \
-			> $wxtmp/renamed || \
-			fail "Error: cannot create $wxtmp/renamed."
-		mv -f $wxtmp/renamed $wxdir/renamed || \
-			fail "Error: cannot create $wxdir/renamed."
-	else
-		mv -f $wxtmp/pb_renames $wxdir/renamed ||
-			fail "Error: cannot create $wxdir/renamed."
-	fi
-
-	[[ $ACTSORT == sort ]] && do_renamed_sort=true
-}
-
-# returns 0 if a pattern in patternfile matches input path arg
-pathcheck() {
-	typeset pattern path=$1 patternfile=$2
-
-	while read pattern; do
-		if [[ $path == $pattern ]]; then
-			return 0 # pattern matched path
-		fi
-	done < $patternfile
-	return 1 # file path not matched by pattern
-}
-
-#
-# Evaluate a command for all listed files.  This is the basic building
-# block for most wx functionality.
-#
-
-wx_eval() {
-	typeset -i changedir=1
-
-	if [[ $# -gt 1 && "$1" == "-r" ]]; then
-		changedir=0
-		shift
-	fi
-
-	pre_eval=$*
-	# skip files listed in .NOT files
-	cat -s $wxdir/$command.NOT >$wxtmp/NOT
-	for filepath in $file_list; do
-		if pathcheck $filepath $wxtmp/NOT; then
-			print "$filepath (skipping)"
-		else
-			cd $workspace
-			dir=`dirname $filepath`
-			file=`basename $filepath`
-			[[ $changedir -eq 1 ]] && cd $dir
-			eval $pre_eval
-		fi
-	done
-}
-
-#
-# Initialize a workspace for wx.
-#
-
-wx_init() {
-	typeset srcroot_dir force=false
-
-	# check that srcroot is relative to top of workspace
-	if cd $workspace/$1; then
-		# normalize the srcroot dir for test below
-		srcroot_dir=$(/bin/pwd)
-		srcroot_dir="${srcroot_dir#$workspace/}"
-		if [[ $srcroot_dir == $workspace ]]; then
-			# Special case need to set srcroot_dir to
-			# a relative path but we're at the top of the
-			# workspace.
-			srcroot_dir="."
-		fi
-	else
-		fail "Source root '$1' does not exist in workspace"\
-			"($workspace)."
-	fi
-
-	if [ -d $wxtmp ]; then
-                if [[ $2 != -f[nqt] ]]; then
-                        echo "This workspace has already been initialized."
-                        ok_to_proceed 'Do you really want to re-initialize?'
-                fi
-	else
-		mkdir -p $wxtmp
-	fi
-
-	#
-	# Make sure to save $srcroot_dir as a path relative to the workspace
-	# root; an absolute path would break if the workspace name changed.
-	#
-	rm -f $wxdir/srcroot_dir
-	echo $srcroot_dir >$wxdir/srcroot_dir
-
-	backup_dir=$HOME/$ME.backup/$workspace_basename
-	[[ -d $backup_dir ]] || mkdir -p $backup_dir ||
-		fail "mkdir -p $backup_dir failed."
-	cd $backup_dir
-	rm -f $wxdir/backup_dir
-	pwd >$wxdir/backup_dir || fail "Creation of  $wxdir/backup_dir failed." 
-
-	touch $wxdir/renamed
-	touch $wxdir/active
-	touch $wxdir/new
-	touch $wxdir/local_nametable 
-
-	if [[ -z "$2" ]]; then
-		# Interactive mode
-		cat << EOF
-    Pick one of the following update methods:
-
-    1) Thorough: Detect any differences between the current workspace
-       and its parent and update the active, new and renamed lists.  Use
-       this in workspaces where files have been renamed or deleted or
-       there are files that are different from the parent that are not
-       checked out.  Note, files must be under SCCS control in order for
-       this method to compare them to the parent workspace.
-
-    2) Quick: Only update the active list with files that are currently
-       checked out.  Will not update the renamed list.
-
-    3) None: Use this on workspaces where there are no changes between
-       the workspace and its parent.  This is very quick but will not
-       update the active, new or renamed lists.
-
-EOF
-		read answer?"Which update method? [1|2|3]: "
-		case $answer in
-			1) wx_update;;
-			2) wx_update -q;;
-			3) ;;
-			*) fail "Bad answer: ${answer}. Rerun init command"\
-				"again";;
-		esac
-		yesno "Keep active list sorted by default?"
-		if [[ "$answer" == 'yes' ]]; then
-			print "true" > $wxdir/sort_active
-		else
-			print "false" > $wxdir/sort_active
-		fi
-	else
-		# non-interactive mode
-		case $2 in
-			# forced thorough update
-			-ft) wx_update; force=true;;
-			# forced quick update
-			-fq) wx_update -q; force=true;;
-			# forced no update
-			-fn) force=true;;
-			# invalid arg
-			-*) fail "$ME $command: unrecognized argument";;
-		esac
-		if [[ $3 == -s ]]; then
-			print "true" > $wxdir/sort_active
-		else
-			print "false" > $wxdir/sort_active
-		fi
-	fi
-	print
-
-	if [ -s $wxdir/active ]; then
-		basedir=$workspace
-		file_list=`wx_active`
-		if $force; then
-			# only backup if necessary
-			print "Will backup wx and active files if necessary"
-			wx_backup -t
-		else
-			print "Making backup copies of all wx and active files"
-			wx_backup
-		fi
-	else
-		echo "Active list empty, not doing backup."
-		echo
-	fi
-
-	echo "$ME initialization complete"
-}
-
-#
-# Find all checked out files
-#
-
-wx_checked_out() {
-	typeset origdir=$(pwd)
-	cd $workspace
-	x=$(ls -t $wsdata/nametable $wxdir/sccs_dirs 2>/dev/null)
-	if [[ -z $x || "`basename $x`" == nametable ]]; then
-		if [ -f $wxdir/srcroot_dir ]; then
-			srcroot_dir=`cat $wxdir/srcroot_dir`
-		else
-			srcroot_dir=$DEFAULT_SRCDIR
-		fi
-		print -u2 "Workspace nametable changed: sccs_dirs out of date"
-		print -u2 "Updating $wxdir/sccs_dirs...this may take a few minutes.\n"
-		rm -f $wxdir/sccs_dirs
-		find $srcroot_dir -name SCCS -print | sort >$wxdir/sccs_dirs
-	fi
-	cd $workspace
-	rm -f $wxtmp/checked_out
-	# Note if srcroot_dir = . this must be removed from the front of the
-	# filepaths.
-	echo $(sed -e 's,$,/p.*,' $wxdir/sccs_dirs) | \
-		tr \\040 \\012 | \
-		grep -v '*' | \
-		sed -e 's,SCCS/p.,,' |sed -e 's,^\./,,' >$wxtmp/checked_out
-	cd $origdir
-}
-
-deal_ws_renames() {
-	# See if any active/renamed files were renamed externally
-	# (perhaps by bringover?) and try to rename the active entry
-	# filepath.
-	typeset fp newfp renamed localfile hash1 hash2 hash3 hash4 \
-		notrenamed_list origdir=$(pwd)
-	cd $workspace
-	list_putback |\
-	while read fp; do
-		if [[ ! -f $fp ]]; then
-			# file not found, suspect rename.
-			# using renamed for error checking.
-			renamed=false
-			# search cached local nt to find old hash info
-			grep "^$(escape_re $fp) " $wxdir/local_nametable |\
-			while read localfile hash1 hash2 hash3 hash4; do
-				# find new filepath
-				newfp=$(fgrep " $hash1 $hash2 $hash3 $hash4"\
-					$wsdata/nametable|cut -f1 -d' ')
-
-				[[ -z $newfp ]] && continue
-
-				if [[ $newfp != $fp ]]; then
-					update_renamed_file $fp $newfp 
-					rename_active_entry $fp $newfp
-					echo "\nRenamed active file"\
-						"$fp to $newfp"
-					renamed=true
-					break
-				fi
-			done
-			if ! $renamed; then
-				if [[ -z $notrenamed_list ]]; then
-					notrenamed_list="$fp"
-				else
-					notrenamed_list="$notrenamed_list\n$fp"
-				fi
-			fi
-		fi
-	done
-	if [[ -n $notrenamed_list ]]; then
-		ring_bell
-		cat <<-EOF
-Warning, active file(s):
-   $(echo $notrenamed_list)
-not found and cannot be renamed.  Use "$ME ea" to edit the active list to
-remove these entries if they do not exist in this workspace.
-		EOF
-	fi
-	cd $origdir
-}
-
-#
-# Old style update the active file list (by appending all checked out files).
-# This is what the original wx update did.
-#
-wx_update_quick() {
-
-	# Sort active if requested.
-	[[ "$1" == "-s" ]] && ACTSORT=sort
-
-	wx_checked_out
-	cd $wxdir
-	rm -f tmp/files.old tmp/files.new active.new
-	wx_active >tmp/files.old || fail "Error: cannot create $wxtmp/files.old"
-	# sed has a hard tab, used to delete lines containing only whitespace
-	sed '/^[	 ]*$/d' tmp/files.old tmp/checked_out|
-		nawk '!seen[$0]++' | $ACTSORT > tmp/files.new ||
-			fail "Error: cannot create $wxtmp/files.new"
-	cp -f new new.old || fail "Error: cannot create new.old."
-	while read filepath ; do
-		add_local_nt_entry $filepath
-		(echo "$filepath"; echo; wx_show_comment; echo) 
-	done < tmp/files.new > active.new || 
-		fail "Error: cannot create $wxdir/active.new"
-
-	mv -f active active.old
-	mv -f active.new active
-
-	echo
-	echo "New active file list:"
-	echo
-	cat tmp/files.new
-	echo
-	echo "Diffs from previous active file list:"
-	echo
-	${WXDIFFCMD:-diff} tmp/files.old tmp/files.new
-	echo "End active diffs =========================="
-
-	# Do new file processing after active list is updated.
-
-	# Note, the parent nt read check below is hackish because we are
-	# assuming that lookup_parent needs to read the parent nt and if it
-	# can't then we want to just issue the warning.
-	if [[ -n $parent && ! -r $parent/Codemgr_wsdata/nametable ]]; then
-		echo "\nWarning: cannot read parent nametable, new file list"\
-			"not output." >&2
-	else
-		while read filepath; do
-			# lookup_parent populates local nt cache
-			if lookup_parent $filepath; then
-				remove_new $filepath
-			else
-				add_new $filepath
-			fi
-		done < tmp/files.new
-
-		echo
-		echo "New new-file list:"
-		echo
-		cat new
-		echo
-		echo "Diffs from previous new-file list:" 
-		echo
-		${WXDIFFCMD:-diff} new.old new
-		echo "End new diffs =========================="
-	fi
-}
-
-#
-# Update various lists (active, renamed, new)
-#
-
-wx_update() {
-	typeset i efp sortarg do_quick=false
-	typeset -i rc found
-	# default, update all lists
-	typeset update_active=true update_renamed=true update_new=true
-
-	while getopts :qrs i; do
-		  case $i in
-		  q)	do_quick=true;;
-		  r)	update_active=false
-			update_new=false;;
-		  s)	ACTSORT=sort; sortarg="-s";;
-		  *)	fail "Invalid flag -$OPTARG. See 'wx help' for more"\
-		  		"info.";;
-		  esac
-	done
-
-	deal_ws_renames
-
-	if $do_quick; then
-		# Do old school wx update (only for checked out files)
-		# This is faster but not as thorough.
-		wx_update_quick $sortarg
-		return
-	fi
-
-	if [[ -z $parent ]]; then
-		fail "Error: cannot do thorough update, no parent.  Use 'update -q'"\
-			"instead."
-	fi
-	if [[ ! -r $parent/Codemgr_wsdata/nametable ]]; then
-		fail "Error: cannot read $parent/Codemgr_wsdata/nametable"
-	fi
-
-	# create tmp/checked_out file which putback -n may not list.
-	# Do this before putback so it doesn't unnecessarily update the
-	# sccs dirs cache.
-	wx_checked_out 
-
-	# Get output of putback -n to detect renames and active files.
-	if [ -f $wxdir/srcroot_dir ]; then
-		get_pb_output $(cat $wxdir/srcroot_dir)
-	else
-		get_pb_output $DEFAULT_SRCDIR
-	fi
-
-	cd $wxdir
-
-	if $update_renamed; then
-		if [[ -f renamed ]]; then
-			mv renamed renamed.old ||
-			    fail "Error: cannot create $wxdir/renamed.old."
-		else
-			touch renamed.old ||
-			    fail "Error: cannot create $wxdir/renamed.old."
-		fi
-
-		nawk '  /^rename from:/{orig_file=$3}
-			$1 == "to:" {print $2 " " orig_file}' \
-			tmp/putback.out |$ACTSORT > tmp/renamed ||\
-				fail "Error, creation of $wxdir/tmp/renamed failed."
-			mv -f tmp/renamed renamed || \
-				fail "Error: cannot create $wxdir/renamed"
-
-		for filepath in $(cut -f1 -d' ' renamed); do
-			add_local_nt_entry $filepath
-		done
-
-		echo "New renamed file list:"
-		echo
-		cat renamed
-		echo
-		echo "Diffs from previous renamed file list:"
-		echo
-		${WXDIFFCMD:-diff} renamed.old renamed
-		echo "End renamed diffs =========================="
-	fi
-
-	if $update_active; then
-		# Create active list from putback output.
-		nawk '/^(update|create): / {print $2};
-		     /^The following files are currently checked out/ \
-			{p=1; continue};
-		     /^"/ {continue};
-		     NF == 0 {p=0; continue};
-		     {if (p==1)
-		     	print $1}' tmp/putback.out |
-		     sort -u > tmp/active_nawk_out ||
-		     fail "Error: cannot create $wxtmp/active_nawk_out"
-
-		# list files in conflict also
-		nawk '/^(conflict): / {print $2}' tmp/putback.out |
-		    sort -u > tmp/conflict_nawk_out ||
-		    fail "Error: cannot create $wxtmp/conflict_nawk_out"
-
-		# Need to read $wsdata/nametable if there are conflicts
-		if [[ -s tmp/conflict_nawk_out && ! -r $wsdata/nametable ]]
-		then
-			fail "Error: cannot read $wsdata/nametable."
-		fi
-
-		# clear the tmp active file
-		print -n > tmp/active.new || fail "Error: cannot create tmp/active.new."
-
-		# store current active list
-		wx_active > tmp/files.old ||
-			fail "Error: cannot create $wxtmp/files.old"
-
-		# go through all the possible active files (keeping the existing
-		# ones as well). Note hard tab in sed arg.
-		for filepath in $(sed '/^[	 ]*$/d' tmp/files.old \
-			tmp/checked_out tmp/conflict_nawk_out \
-			tmp/active_nawk_out | nawk '!seen[$0]++' | $ACTSORT); do
-
-			efp=$(escape_re $filepath)
-
-			if grep -q "^$efp$" tmp/conflict_nawk_out; then
-
-				# conflict files have a parent but the
-				# putback output only shows the parent's
-				# filename, need to find local name in
-				# case of rename
-
-				grep "^$efp " $parent/Codemgr_wsdata/nametable|\
-					read localfile hash1 hash2 hash3 hash4
-				local_file="$(\
-				    fgrep " $hash1 $hash2 $hash3 $hash4" \
-					$wsdata/nametable | cut -f1 -d' ')"
-
-				# continue if empty string
-				[[ -z "$local_file" ]] && continue
-
-				if ! grep -q "^$local_file" tmp/active.new; then
-					filepath=$local_file
-				else
-					continue
-				fi
-			fi
-			add_local_nt_entry $filepath
-			(echo $filepath; echo; wx_show_comment; echo)\
-			    >> tmp/active.new
-		done
-
-		rm -f tmp/active_nawk_out
-
-		mv -f active active.old
-		mv -f tmp/active.new active
-		wx_active > tmp/files.new
-
-		echo
-		echo "New active file list:"
-		echo
-		cat tmp/files.new
-		echo
-		echo "Diffs from previous active file list:" 
-		echo
-		${WXDIFFCMD:-diff} tmp/files.old tmp/files.new
-		echo "End active diffs =========================="
-		rm -f tmp/files.old tmp/files.new
-
-	fi
-
-	# The new list is for caching names of new files to speed up commands
-	# that list the new files.
-	if $update_new; then
-		if [ -f new ]; then
-			cp -f new new.old || fail "Error: cannot create file new.old."
-		elif [ ! -f new.old ]; then
-			touch new.old || fail "Error: cannot create file new.old."
-		fi
-		# Create new list from putback output.
-		nawk '/^create: / {print $2};' tmp/putback.out |
-			sort -u > tmp/new || fail "Error: cannot create $wxtmp/new."
-		mv -f tmp/new new
-		echo
-		echo "New new-file list:"
-		echo
-		cat new
-		echo
-		echo "Diffs from previous new-file list:" 
-		echo
-		${WXDIFFCMD:-diff} new.old new
-		echo "End new diffs =========================="
-	fi
-}
-
-wx_edit() {
-	# Must be called via wx_eval
-	if [ -f SCCS/p.$file ]; then
-		echo "$filepath already checked out"
-		update_active $filepath
-	elif [ -f $file ]; then
-		echo $filepath
-		if sccs edit $silent $file; then
-			update_active $filepath
-		else
-			fail "sccs edit $filepath failed."
-		fi
-	else
-		ring_bell
-		echo "Warning. file $filepath not found."
-	fi
-
-	[[ $ACTSORT == sort ]] && do_active_sort=true
-}
-
-wx_unedit() {
-	# Must be called via wx_eval
-	typeset -i force=0
-	typeset arg msg
-
-	# set positional args to contents of global $args
-	set -- $args
-
-	while getopts :f arg; do
-		case $arg in
-			 f) force=1;;
-			 *) fail "Invalid flag -$OPTARG. See 'wx help' for"\
-			 	"more info.";;
-		esac
-	done
-
-	msg="differs from parent file, will remain in active list."
-
-	if [[ ! -f SCCS/p.$file ]]; then
-		echo "$filepath not checked out"
-	else
-		if [[ $backup_done -eq 0 ]]; then
-			if [[ $force -eq 0 ]]; then
-				yesno "Do you want to backup files first?"
-				if [[ "$answer" == "yes" ]]; then
-					wx_backup || fail "Backup failed."
-				fi
-			else
-				# only backup if necessary
-				print "Will backup wx and active files if necessary"
-				wx_backup -t || fail "Backup failed."
-			fi
-			backup_done=1;
-
-			# cd to the dir where the file is in case
-			# wx_backup took us somewhere else.
-
-			cd ${workspace}/$dir
-		fi
-
-		echo $filepath
-		if sccs unedit $silent $file; then
-			if [[ $force -eq 1 ]]; then
-				if is_active $filepath; then
-					if wx_pnt_filepath $filepath; then
-						if cmp -s $file $parentfilepath; then
-							remove_active_entry $filepath
-						else
-							print "$filepath $msg"
-						fi
-					fi
-				fi
-			else
-				ask_remove_active_entry
-			fi
-		fi
-	fi
-}
-
-wx_create() {
-	# Must be called via wx_eval
-	typeset -i checkout=0 force=0
-	typeset arg
-
-	while getopts :fo arg; do
-		case $arg in
-			 o) checkout=1;;
-			 f) force=1;;
-			 *) fail "Invalid flag -$OPTARG. See 'wx help' for"\
-			 	"more info.";;
-		esac
-	done
-
-	if [ ! -f $file ]; then
-		ring_bell
-		echo "Error! $filepath is not a file."
-		return 1
-	elif [ -f $workspace/deleted_files/$filepath ]; then
-		ring_bell
-		cat >&2 <<-EOF
-Error: a deleted version of $filepath exists.
-You must undelete the file and edit that version.
-Run:
-'cd $workspace'
-'$ME mv deleted_files/$filepath $filepath'
-'$ME edit $filepath'
-		EOF
-		return 1
-	elif [[ -n $parent && -f $parent/$filepath ]]; then
-		ring_bell
-		cat >&2 <<-EOF
-Error! $filepath exists in the parent workspace $parent.
-Choose a different name.
-		EOF
-		return 1
-	elif [[ -n $parent && -f $parent/deleted_files/$filepath ]]; then
-		ring_bell
-		cat >&2 <<-EOF
-Error! a deleted version of $filepath exists in the parent workspace
-You must undelete the file and edit that version.
-Run:
-'cd $workspace'
-'bringover deleted_files/$filepath'
-'$ME mv deleted_files/$filepath $filepath'
-'$ME edit $filepath'
-		EOF
-		return 1
-	elif [ -f SCCS/s.$file ]; then
-			echo "$filepath already created, active list not"\
-				"updated." >&2
-	else
-		# XXX it would be nice if keyword would work on new files
-		if ! egrep "$SCCSKEYWORD" $file >/dev/null; then
-			ring_bell
-			cat >&2 <<-EOF
-
-Warning!!!
-$filepath 
-is missing SCCS keywords.  See
-/net/wizard.eng/export/misc/general_docs/keyword_info.txt
-for more info.  Note, pay attention to the tabs.
-			EOF
-			if [[ $force -ne 1 ]]; then
-				yesno "Continue with create?" 
-				if [[ "$answer" != 'yes' ]]; then
-					echo "Aborting create $filepath"
-					return 1
-				fi
-			fi
-		fi
-
-		if ! copyrightchk $file; then
-			# Sound bell
-			ring_bell
-			cat >&2 <<-EOF
-
-Warning!!!
-$filepath 
-has copyright problems.  See
-/net/wizard.eng/export/misc/general_docs/golden_rules.txt
-for more info.
-			EOF
-			if [[ $force -ne 1 ]]; then
-				yesno "Continue with create?" 
-				if [[ "$answer" != 'yes' ]]; then
-					echo "Aborting create $filepath"
-					return 1
-				fi
-			fi
-		fi
-
-		if ! cddlchk -a $file; then
-			# Sound bell
-			ring_bell
-			cat >&2 <<-EOF
-
-Warning!!!
-$filepath 
-has CDDL block problems.  See
-http://www.opensolaris.org/os/community/onnv/devref_toc/devref_7/#7_2_3_nonformatting_considerations
-for more info.
-			EOF
-			if [[ $force -ne 1 ]]; then
-				yesno "Continue with create?" 
-				if [[ "$answer" != 'yes' ]]; then
-					echo "Aborting create $filepath"
-					return 1
-				fi
-			fi
-		fi
-
-		if [[ ! -d SCCS ]]; then
-			mkdir SCCS || fail "Error: cannot create SCCS dir."
-		fi
-
-		if [[ -n "$comment_file" ]]; then
-			sccs create $silent -y"$(\
-			    sed '/^[ 	]*$/d' $comment_file)" $file ||
-				    fail "sccs create $filepath failed."
-		else
-			sccs create $silent $file ||
-				fail "sccs create $filepath failed."
-		fi
-		rm -f ,$file
-		update_active $filepath
-		add_new $filepath
-		if [[ $checkout -eq 1 ]]; then
-			sccs edit $silent $file ||
-				fail "sccs edit $filepath failed."
-		fi
-		[[ $ACTSORT == sort ]] && do_active_sort=true
-	fi
-}
-
-wx_uncreate() {
-	# Must be called via wx_eval
-	# undoes a 'wx create'
-
-	typeset efp
-	typeset -i force=0
-
-	case $1 in
-		-f) force=1;;
-		-*) fail "$ME $command: unrecognized argument";;
-	esac
-
-	if [[ $backup_done -eq 0 ]]; then
-		if [[ $force -eq 0 ]]; then
-			yesno "Do you want to backup files first?"
-			if [[ "$answer" == 'yes' ]]; then
-				wx_backup || fail "Backup failed."
-			fi
-		else
-			# only backup if necessary
-			print "Will backup wx and active files if necessary"
-			wx_backup -t || fail "Backup failed."
-		fi
-		backup_done=1;
-		cd $workspace/$dir
-	fi
-
-	if [[ ! -f $file ]]; then
-		echo "$filepath not found, skipping"
-		return 1
-	fi
-
-	efp=$(escape_re $filepath)
-
-	if ! wx_pnt_filepath; then
-		# This is a new file so let's uncreate it.
-		answer='no'
-		if [[ $force -ne 1 ]]; then
-			cat <<-EOF
-
-$filepath appears to be a new file.  
-Note, $command will remove its SCCS info from your
-workspace and entry in the active list but will leave
-the file in your workspace.  
-
-			EOF
-			# yesno sets answer
-			yesno "Continue $command $filepath?"
-		else
-			# forced to yes
-			answer='yes'
-		fi
-
-		if [[ "$answer" == 'yes' ]]; then
-			if [[ ! -f SCCS/p.$file ]]; then
-				sccs edit $file ||
-				    fail "sccs edit $filepath failed."
-			fi
-			rm -f SCCS/s.$file SCCS/p.$file
-			# For later cleanup on exit
-			if grep -q "^$efp " $wsdata/nametable 2>/dev/null; then
-				NEED_WS_CLEAN='y'
-			fi
-		
-			if is_active $filepath; then
-				remove_active_entry $filepath
-			fi
-			remove_new $filepath
-		else
-			echo "skipping $filepath"
-		fi
-	else
-		echo "Not new, skipping $filepath"
-	fi # if ! wx_pnt_filepath
-}
-
-wx_reset() {
-	# Must be called via wx_eval
-	# resets a local file to the parent version
-
-	typeset efp
-	typeset -i force=0
-
-	case $1 in
-		-f) force=1;;
-		-*) fail "$ME $command: unrecognized argument";;
-	esac
-
-	if [[ $backup_done -eq 0 ]]; then
-		if [[ $force -eq 0 ]]; then
-			yesno "Do you want to backup files first?"
-			if [[ "$answer" == 'yes' ]]; then
-				wx_backup || fail "Backup failed."
-			fi
-		else
-			# only backup if necessary
-			print "Will backup wx and active files if necessary"
-			wx_backup -t || fail "Backup failed."
-		fi
-		backup_done=1;
-	fi
-
-	if [[ ! -f $file ]]; then
-		print "$filepath not found, skipping"
-		return 1
-	fi
-
-	efp=$(escape_re $filepath)
-
-	if wx_pnt_filepath; then
-		if [[ $force -ne 1 ]]; then
-			answer='no' # safe default
-			cat <<-EOF
-
-Regarding: $filepath
-$command will reset the file contents and sccs history to that of the parent:
-$parentfilepath
-and remove the entry from the active and renamed lists.
-
-			EOF
-			if [[ $filepath != $parentfile ]]; then
-				print "Note: local file will be reset to parent filepath."
-			fi
-			# yesno sets answer
-			yesno "Continue $command $filepath?"
-		else
-			# forced to yes
-			answer='yes'
-		fi
-
-		if [[ "$answer" == 'yes' ]]; then
-			if is_active $filepath; then
-				remove_active_entry $filepath
-			fi
-			if renamed; then
-				remove_renamed_entry $filepath
-			fi
-			rm -f $file SCCS/[ps].$file
-			grep -v "^$efp " $wsdata/nametable > $wxtmp/nametable.new || \
-				fail "Error: cannot create $wxtmp/nametable.new ."
-			mv -f $wxtmp/nametable.new $wsdata/nametable || \
-				fail "Error: mv -f $wxtmp/nametable.new $wsdata/nametable failed."
-
-			# add to bringover list for more efficient bringover
-			bofilelist="$bofilelist $parentfile"
-		else
-			print -u2 "Skipping $filepath"
-		fi
-	else
-		cat >&2 <<-EOF
-
-Warning: skipping $filepath 
-as it appears to be new. Use 'uncreate' to remove this new file from the
-workspace.
-		EOF
-	fi # if ! wx_pnt_filepath
-}
-
-
-cyclic_rename() {
-	# Detect the cyclic rename that causes Teamware problems.
-	# See 'man workspace' for more info
-	typeset new_filepath=$1 old_filepath=$2\
-		found_new=false found_old=false
-	typeset prev_new prev_old
-
-	while read prev_new prev_old; do
-		if [[ "deleted_files/$new_filepath" == $prev_new &&
-			  $old_filepath != $prev_new ]]; then
-
-			# Cyclic rename
-			return 0
-		fi
-
-		if [[ $new_filepath == $prev_old && $prev_new != $old_filepath ]]
-		then
-			# The new file was the old file of a previous rename
-			found_new=true
-			if $found_old; then
-				# Cyclic rename
-				return 0
-			fi
-		elif [[ $old_filepath == $prev_new && 
-		    $new_filepath != $prev_old ]]; then
-
-			# The old filepath was the new filepath of a
-			# previous rename and this rename is not an undo
-			# (new filepath is diff from previous old
-			# filepath)
-
-			found_old=true
-			if $found_new; then
-				# Cyclic rename
-				return 0
-			fi
-		fi
-	done < $wxdir/renamed
-
-	# Not a cyclic rename
-	return 1
-}
-
-wx_delete() {
-	# Must be called via wx_eval
-	typeset efp
-	typeset -i force=0
-
-	case $1 in
-		-f) force=1;;
-		-*) fail "$ME $command: unrecognized argument";;
-	esac
-
-	if [[ $backup_done -eq 0 ]]; then
-		if [[ $force -eq 0 ]]; then
-			yesno "Do you want to backup files first?"
-			if [[ "$answer" == 'yes' ]]; then
-				wx_backup || fail "Backup failed."
-			fi
-		else
-			# only backup if necessary
-			print "Will backup wx and active files if necessary"
-			wx_backup -t || fail "Backup failed."
-		fi
-		backup_done=1;
-		cd $workspace/$dir
-	fi
-
-	if [[ ! -f $file ]]; then
-		fail "$filepath isn't a file."
-	fi
-
-	# this is used a couple times so save escape_re value
-	efp=$(escape_re $filepath)
-
-	if wx_pnt_filepath; then
-		# Not a new file (has a parent)
-		if is_active $filepath; then
-			ring_bell
-			cat >&2 <<-EOF
-
-Warning! $filepath 
-is in active list. You should run
-"$ME reedit $filepath" 
-"$ME unedit $filepath" 
-which should remove it from the active list then run 
-"$ME $command $filepath".
-Note, if you have made changes to this file that you want to keep, back
-it up first.
-
-$filepath not deleted.
-
-			EOF
-			return 1
-		fi
-		# See if this is already in the renamed list
-		if grep -q "^deleted_files/$efp " $wxdir/renamed; then
-			ring_bell
-			if [[ -f $workspace/deleted_files/$filepath ]]; then
-				cat >&2  <<-EOF
-Warning: $filepath
-has already been deleted.
-Check for deleted_files/$filepath
-in $wxdir/renamed .
-				EOF
-			else
-				cat >&2 <<-EOF
-Warning! the $ME renamed list appears to be corrupt.
-				EOF
-				fail "Please run '$ME update -r' and try this"\
-					"command again."
-			fi
-		fi
-		if workspace filerm $file; then
-			# we know filerm renames files under deleted_files/
-			update_renamed_file $filepath deleted_files/$filepath
-
-			print "$filepath deleted"
-			print
-			print "To recover $filepath do:"
-			print "'cd $workspace'"
-			print "'$ME mv deleted_files/$filepath $filepath'"
-		else
-			print "There was an error while trying to delete $filepath"
-		fi
-	else
-		# This is a new file so let's remove it.
-		if is_active $filepath; then
-			ring_bell
-			cat >&2 <<-EOF
-
-Warning: $filepath 
-is in active list. You should run
-"$ME uncreate $filepath" 
-which should remove it from the active list
-then run "$ME $command $filepath". 
-
-$filepath not deleted.
-
-			EOF
-			return 1
-		fi
-
-		answer='no'
-		if [[ $force -ne 1 ]]; then
-			cat <<-EOF
-
-Warning: $filepath 
-appears to be a new file.
-
-Do you want to completely remove the file and SCCS info from 
-your workspace?  (If you answer no, the file will just be 
-removed from the active list if it's in there.  If you answer 
-yes, the file and associated SCCS history files will removed 
-from the active list and also removed entirely from the 
-workspace.)
-
-			EOF
-			# yesno sets answer
-			yesno "Completely remove $filepath?"
-		else
-			# forced to yes
-			answer='yes'
-		fi
-
-		if [[ "$answer" == 'yes' ]]; then
-			rm -f $file SCCS/s.$file 
-			[[ -f SCCS/p.$file ]] && rm -f SCCS/p.$file
-			echo "$filepath removed from workspace."
-			# For later cleanup, optional
-			if grep -q "^$efp " $wsdata/nametable 2>/dev/null; then
-				NEED_WS_CLEAN='y'
-			fi
-		fi
-		remove_new $filepath
-	fi
-}
-
-wx_mv() {
-	# create some local variables to avoid side effects
-	typeset efp old_filepath new_filepath
-
-	cd $workspace
-
-	old_filepath=$1
-	new_filepath=$2
-
-	if [[ -d $old_filepath && ( -d $new_filepath || ! -f $new_filepath ) ]]
-	then
-
-		if [[ $(basename $old_filepath) == "SCCS" ]]; then
-			return
-		fi
-
-		echo "Doing a $command between two directories can take a "\
-		    "while, please be patient."
-		# deal with directory to directory move
-		if [[ -d $new_filepath ]]; then
-			base="$(basename $old_filepath)/"
-		else
-			base=
-		fi
-
-		sccsmv $old_filepath $new_filepath ||
-		    fail "sccsmv $old_filepath $new_filepath failed."
-
-		# remove previous renamed entry
-		remove_renamed_entry $old_filepath
-		
-		update_renamed_dir $new_filepath/$base
-
-		if grep -q "^$efp/" $wsdata/nametable 2>/dev/null; then
-			# Old entries in workspace nametable so set this
-			# to clean up on exit
-			NEED_WS_CLEAN='y'
-		fi
-
-		# rename path of active entry
-		sed "s|^$efp/|$new_filepath/$base|" $wxdir/active \
-			   > $wxtmp/active || fail "Error: cannot create $wxtmp/active."
-		mv $wxtmp/active $wxdir/active ||
-			fail "Error: cannot create $wxdir/active."
-		sed "s|^$efp/|$new_filepath/$base|" $wxdir/new \
-			   > $wxtmp/new || fail "Error: cannot create $wxtmp/new."
-		mv $wxtmp/new $wxdir/new || fail "Error: cannot create $wxdir/new."
-		
-	elif [[ -f $old_filepath && -d $new_filepath ]]; then
-		wx_mv_file $old_filepath $new_filepath/$(basename $old_filepath)
-	elif [[ -f $old_filepath && ! -f $new_filepath ]]; then
-		wx_mv_file $old_filepath $new_filepath
-	elif [[ ! -f $old_filepath ]]; then
-		fail "Error! $old_filepath not found."
-	elif [[ -f $new_filepath ]]; then
-		fail "Error! $new_filepath exists."
-	fi
-}
-
-wx_mv_file() {
-	# store literal filepath in local var. to avoid side effects
-	typeset efp old_filepath new_filepath
-
-	cd $workspace
-
-	old_filepath=$1
-	new_filepath=$2
-
-	if [[ ! -f $old_filepath ]]; then
-		fail "Error! $old_filepath does not exist."
-
-	elif [[ -f $new_filepath ]]; then
-		fail "Error! $new_filepath already exists."
-
-	else
-		if cyclic_rename $new_filepath $old_filepath; then
-			fail "Cyclic renamed detected. See 'man workspace'"\
-				"for more info."
-		fi
-
-		if workspace filemv $old_filepath $new_filepath; then
-			update_renamed_file $old_filepath $new_filepath 
-			efp=$(escape_re $old_filepath)
-			if is_active $old_filepath; then
-				# In active list so update list with new
-				# file name
-				rename_active_entry $old_filepath $new_filepath
-			fi
-			if grep -q "^$efp$" $wxdir/new; then
-				remove_new $old_filepath
-				add_new $new_filepath
-			fi
-			if grep -q "^$efp " $wsdata/nametable 2>/dev/null; then
-				NEED_WS_CLEAN=y
-			fi
-		else
-			echo "There was an error renaming $old_filepath to "\
-			    "$new_filepath"
-		fi
-	fi
-}
-
-sccs_rmdel_done() {
-	# Note there are literal tabs in the []'s below so be careful when
-	# editing.
-
-	# file not in SCCS so return false (1)
-	[[ ! -f SCCS/s.$file ]] && return 1
-
-	if wx_pnt_filepath; then
-		sccs prt -a $parentfilepath > $wxtmp/parenthist
-		sccs prt -a $file > $wxtmp/filehist
-		diff $wxtmp/parenthist $wxtmp/filehist |
-			grep '^> R [0-9]\.[0-9]'|
-			egrep -v ' (Codemgr|Fake)[ 	]' |
-			sed 's/^> //' > $wxtmp/newrmdels
-		[[ ! -f $wxtmp/newrmdels ]] && fail "Error: cannot create $wxtmp/newrmdels"
-		rm -f $wxtmp/parenthist $wxtmp/filehist
-	else
-		# New file, no parent
-		sccs prt -a $file |
-		    egrep -v \
-			'^R [0-9]+(\.[0-9]+)+[ 	].* (Codemgr|Fake)[ 	]' |
-		    egrep '^R [0-9]+(\.[0-9]+)+[ 	]' > $wxtmp/newrmdels
-		[[ ! -f $wxtmp/newrmdels ]] && fail "Error: cannot create $wxtmp/newrmdels"
-	fi
-
-	if [[ -s $wxtmp/newrmdels ]]; then
-		cat $wxtmp/newrmdels
-		rm -f $wxtmp/newrmdels
-		# an rmdel was done so return true
-		return 0
-	else
-		rm -f $wxtmp/newrmdels
-		# no rmdel was done so return false
-		return 1
-	fi
-}
-
-rmdelchk() {
-	# returns 0 (success) if an rmdel was done.
-	# Should be called via wx_eval().
-	if sccs_rmdel_done ; then
-		ring_bell
-		cat <<-EOF
-
-Warning, it looks like 'sccs rmdel' was run on $filepath
-This will cause a problem for Teamware.  Please fix this.
-Note, this can be fixed by doing '$ME reedit $filepath'
-		EOF
-		return 0
-	else
-		return 1
-	fi
-}
-
-wx_delget() {
-	typeset -i force=0
-	typeset arg comment_found=false
-
-	while getopts :f arg; do
-		case $arg in
-			 f) force=1;;
-			 *) fail "Invalid flag -$OPTARG. See 'wx help' for"\
-			 	"more info.";;
-		esac
-	done
-
-	if [[ (! -f SCCS/s.$file && ! -f SCCS/p.$file) || 
-		(-f SCCS/s.$file &&  -f SCCS/p.$file) ]]; then
-
-		# Check for keywords unless force is set or file is in
-		# keywords.NOT
-		if [[ $force -ne 1 ]] && [ -f SCCS/p.$file ] && 
-			! grep -q "^$(escape_re $filepath)$" \
-				$wxdir/keywords.NOT 2>/dev/null &&
-			! keywords -p $file; then
-
-			ring_bell
-			cat <<-EOF
-
-The keywords check has detected a problem with $filepath
-If this check should be skipped for this file, put the filepath in
-${wxdir}/keywords.NOT.
-See /net/wizard.eng/export/misc/general_docs/keyword_info.txt
-for more info about keywords.  Note, pay attention to the tabs.
-
-			EOF
-			yesno "Continue with $command for $filepath?" 
-			if [[ "$answer" != 'yes' ]]; then
-				echo "Aborting $command $filepath\n"
-				return
-			fi
-		fi
-
-		[[ -f $wxtmp/comment ]] && rm $wxtmp/comment
-		if [[ -n "$comment_file" ]]; then
-			# note hard tab in sed r.e.
-			sed '/^[ 	]*$/d' $comment_file > $wxtmp/comment &&
-			    comment_found=true
-		else
-			wx_show_comment >$wxtmp/comment && comment_found=true
-		fi
-		if $comment_found; then
-			echo $filepath
-			cat $wxtmp/comment
-			if [[ -f SCCS/s.$file ]]; then
-				# file history so check in file
-				sccs delget $silent -y"`cat $wxtmp/comment`" \
-					$file ||
-					fail "sccs delget failed $filepath."
-			else
-				# no file history so create file
-				sccs create $silent -y"`cat $wxtmp/comment`" \
-					$file ||
-					fail "sccs create $filepath failed."
-				rm -f ,$file
-			fi
-			[[ -n "$comment_file" ]] && 
-			    update_active_comment $filepath
-		else
-			ring_bell
-			print "\nError: no comments (NO_COMMENT) registered for $filepath"
-			if [[ $force -ne 1 ]] ; then
-				yesno "Invoke ${EDITOR:-vi} to edit"\
-					"$wxdir/active"'?'
-				if [ "$answer" == 'yes' ]; then
-					${EDITOR:-vi} $wxdir/active
-					wx_delget
-				else
-					fail "Edit $wxdir/active and try again."
-				fi
-			else
-				fail "Edit $wxdir/active and try again."
-			fi
-		fi
-	elif [[ -f SCCS/s.$file && ! -f SCCS/p.$file ]]; then
-		echo "$filepath already checked in"
-	elif [[ ! -f SCCS/s.$file && -f SCCS/p.$file ]]; then
-		fail "Error, $filepath is missing SCCS/s.$file ."
-	fi
-}
-
-wx_get() {
-	if [[ -f SCCS/s.$file ]]; then
-		sccs get $args -s $file || fail "sccs get $file failed."
-	else
-		ring_bell
-		echo "$filepath not in SCCS"
-	fi
-}
-
-wx_info() {
-	if [ -f SCCS/p.$file ]; then
-		if [[ -w $file ]]; then
-			echo "$filepath (checked out)"
-		else
-			ring_bell
-			echo "$filepath (Warning, inconsistent state."
-			echo "   SCCS/p.$file exists but $file is readonly.)"
-		fi
-	elif [[ ! -f $file ]]; then
-		ring_bell
-		echo "$filepath (Warning, not found in $workspace)"
-	elif [[ ! -f SCCS/s.$file ]]; then
-		ring_bell
-		echo "$filepath (Warning, not in SCCS)"
-	else
-		echo "$filepath (checked in)"
-	fi
-	echo "Check-in comment:"
-	wx_show_comment
-	if [ -f SCCS/s.$file ]; then
-		echo "Most recent delta: \c"
-		sccs prt -y $file
-	fi
-	echo "File name status:"
-	if renamed; then
-		# old is set by renamed
-		echo "Locally renamed, parent file = $parentfile"
-	elif lookup_parent $filepath; then
-		# parentfile is set by lookup_parent
-		if [[ "$filepath" != "$parentfile" ]]; then
-			echo "In parent ws, file renamed to: $parentfile"
-		else
-			echo "Same as parent."
-		fi
-	else
-		echo "New file (does not exist in parent ws)."
-	fi
-	echo
-}
-
-get_multi_deltas() {
-	# Get list of files with more that one delta when putback.
-	# set global multi_delta_list.
-	if ! deltachk >/dev/null 2>&1; then
-		multi_delta_list="$multi_delta_list $filepath"
-	fi
-}
-
-wx_reedit() {
-	typeset -i numkids=`workspace children | wc -l`
-	typeset i newfiles only_multideltas=false
-
-	case $1 in
-		-m)	only_multideltas=true;;
-		-*)	fail "Invalid flag $1. See 'wx help' for more"\
-		  		"info.";;
-	esac
-
-	if [[ ! -f $wsdata/nametable ]]; then
-		echo "$wsdata/nametable not found, all files assumed new."
-		ok_to_proceed "Okay to continue with $command?"
-	elif [[ ! -r $wsdata/nametable ]]; then
-		fail "Error: cannot read $wsdata/nametable."
-	fi
-
-	if $only_multideltas; then
-		# get_multi_deltas sets multi_delta_list
-		wx_eval get_multi_deltas
-		# set file_list for wx_eval wx_reedit_file below
-		file_list=$multi_delta_list
-	fi
-
-	cd $workspace
-
-	for i in $file_list; do
-		if [[ ! -f $i ]]; then
-			fail "$i does not exist."
-		fi
-		if ! lookup_parent $i; then
-			if [[ -z $newfiles ]]; then
-				newfiles="$i"
-			else
-				newfiles="$newfiles\n$i"
-			fi
-		fi
-	done
-	
-	if [[ -n $newfiles ]]; then
-		# If there are some new files, give user a warning
-		cat <<-EOF | ${PAGER:-more}
-
-$ME thinks following files are new (not in parent workspace) and will
-reset their file histories to version 1.1 (exit if this list isn't correct):
-$(echo $newfiles)
-
-		EOF
-		ok_to_proceed "Okay to continue with $command?"
-		if ! $CHECKIN; then
-			cat <<-EOF
-
-Hint, use '$ME redelget' to collapse/reset new file histories to version
-1.1 since '$ME $command' will check out the file and '$ME delget' always
-increments the file version doing the check in.
-
-			EOF
-		fi
-	fi
-
-	if [ $numkids -gt 0 ]; then
-		echo "WARNING: This workspace has the following children:"
-		echo
-		workspace children
-		echo
-		echo "The reedit command will coalesce all children's deltas"
-		echo "into one, losing all delta comments in the process."
-		ok_to_proceed 'Are you sure you want to proceed?'
-	fi
-	echo
-	yesno "Do you want to backup files first?"
-	if [[ "$answer" == 'yes' ]]; then
-		wx_backup || fail "Backup failed."
-	fi
-
-	echo "$command beginning..."
-	echo
-	wx_eval wx_reedit_file
-	echo
-	echo "$command complete"
-	echo
-	[[ $ACTSORT == sort ]] && do_active_sort=true
-}
-
-wx_reedit_file() {
-	# Must be called via wx_eval
-	typeset comment_found=false
-
-	if [[ ! -f $file ]]; then
-		echo "$file does not exist.  Can not reedit $file"
-		return
-	fi
-
-	echo $filepath
-	# Is there a parent file?
-	if wx_pnt_filepath; then
-		rm -f $wxtmp/s.$file
-		cp -p $parentsdot $wxtmp/s.$file ||
-			fail "Error: cannot cp $parentsdot $wxtmp/s.$file ."
-
-		# get the latest parent delta and comment and filter out
-		# certain fields removing trailing spaces
-
-		p_delta="$(sccs prt -y $parentsdot|expand -1|grep 'SCCS'|\
-				   cut -f'4,5,6,9-' -d' '|sed 's/  *$//')" 
-
-		if [[ -z "$p_delta" ]]; then
-			ring_bell
-			echo "Warning ${command}: skipping $filepath,"
-			echo "cannot get parent delta info"
-			echo
-			return 1
-		fi
-
-		# create a list of local deltas in the same format
-		# also removing trailing spaces
-		sccs prt $file|expand -1|
-			nawk '
-			/^D [0-9]+(\.[0-9]+)+ +[0-9][0-9]\/[0-9][0-9]/ {
-				if (delta != "") {
-					# print previous delta info
-					print delta comment;
-				}
-				delta=sprintf("%s %s %s %s ",$3, $4, $5, $8);
-				comment = "";
-			}
-			! /^D [0-9]+(\.[0-9]+)+ +[0-9][0-9]\/[0-9][0-9]/ {
-				# Add comment lines to comment variable
-				if (comment == "") {
-					if (NF > 0) {
-						comment = $0;
-					} else {
-						# empty lines require a space
-						# in comment.
-						comment = " ";
-					}
-				} else {
-					if (NF > 0) {
-						comment = comment " " $0;
-					} else {
-						comment = comment " ";
-					}
-				}
-			}
-			END {
-				if (delta != "") {
-					# print last delta info
-					print delta comment;
-				}
-			}' | sed 's/  *$//' > $wxtmp/l_deltas ||
-			    	fail "Error: cannot create $wxtmp/l_deltas."
-
-		# If the latest parent delta doesn't appear in the local file
-		# then a bringover is required.  Use fgrep because comment may
-		# have RE chars in it.
-		if ! fgrep "$p_delta" $wxtmp/l_deltas >/dev/null; then
-			ring_bell
-			echo "\nWarning ${command}: skipping $filepath because:"
-			echo "parent's version of $filepath"
-			echo "is newer than child's -- bringover required."
-			echo
-			return 1
-		fi
-
-		if [ ! -f SCCS/p.$file ]; then
-			if sccs edit $silent $file; then
-				update_active $filepath
-			else
-				fail "sccs edit $file failed."
-			fi
-		fi
-
-		# make copy of local file and copy parent's SCCS s. file over
-		# local.
-		mv -f $file ${file}.wx_reedit ||
-			fail "mv -f $file ${file}.wx_reedit failed."
-		rm -f SCCS/s.$file SCCS/p.$file
-		cp $wxtmp/s.$file SCCS/s.$file ||
-			fail "cp $wxtmp/s.$file SCCS/s.$file failed."
-
-		if sccs edit $silent $file; then
-			update_active $filepath
-		else
-			fail "sccs edit $file failed."
-		fi
-
-		mv -f ${file}.wx_reedit $file ||
-			fail "mv -f ${file}.wx_reedit $file failed."
-
-		if $CHECKIN; then
-			wx_delget
-		fi
-		touch $file
-	else
-		# reediting a new file.
-		if [[ -f SCCS/s.$file ]]; then
-			if [[ ! -f SCCS/p.$file ]]; then
-				# File needs to be checked out
-				sccs edit $silent $file ||
-				    fail "sccs edit $file failed."
-			fi
-			# clean up SCCS since we are going to create again.
-			rm -f SCCS/s.$file
-		fi
-		# clean up SCCS since we are going to create again.
-		[[ -f SCCS/p.$file ]] && rm -f SCCS/p.$file
-
-		[[ -f $wxtmp/comment ]] && rm $wxtmp/comment
-		wx_show_comment >$wxtmp/comment && comment_found=true
-		if $comment_found; then
-			echo $filepath
-			cat $wxtmp/comment
-			rm -f SCCS/s.$file SCCS/p.$file
-			sccs create $silent -y"`cat $wxtmp/comment`" $file ||
-			    fail "sccs create $filepath failed."
-			rm -f ,$file
-			[[ -n "$comment_file" ]] && 
-			    update_active_comment $filepath
-		else
-			ring_bell
-			echo "\nError, no comments registered for $filepath"
-			if [[ $force -ne 1 ]] ; then
-				yesno "Invoke ${EDITOR:-vi} to edit"\
-					"$wxdir/active"'?'
-				if [[ "$answer" == 'yes' ]]; then
-					${EDITOR:-vi} $wxdir/active
-					wx_reedit_file
-				else
-					fail "Edit $wxdir/active and try again."
-				fi
-			else
-				fail "Edit $wxdir/active and try again."
-			fi
-		fi
-
-		if $CHECKIN; then
-			# No need to check out file.
-			return
-		fi
-
-		if sccs edit $silent $file; then
-			update_active $filepath
-			add_new $filepath
-		else
-			fail "sccs edit $file failed."
-		fi
-	fi
-}
-
-#
-# Warn if there are sccs delta issues
-#
-deltachk() {
-	# must be run via wx_eval
-	typeset -i numdeltas
-	typeset newfile checkedout=false
-
-	if wx_pnt_filepath; then
-		# find number of deltas by subtracting the number in the parent
-		# from the local file (note the literal Control-A in the grep
-		# R.E.s below).
-		(( numdeltas = $(grep '^d D' SCCS/s.$file|wc -l) - \
-				    $(grep '^d D' $parentsdot|wc -l) ))
-		newfile=false
-	else
-		# checking a new file (note the literal Control-A in the grep
-		# R.E.)
-		numdeltas=$(grep '^d D' SCCS/s.$file|wc -l)
-		newfile=true
-	fi
-
-	if [[ -z $numdeltas ]]; then
-		cat <<-EOF
-
-Warning: the local file:
-$filepath
-does not appear to have a sccs delta history file or the sccs delta
-history file is corrupt.  If the local file is new try using:
-"cd $dir"
-"$ME create $file"
-
-If the file is not new (exists in parent):
-"cd $dir"
-Save a copy of the local file
-Remove the SCCS/[ps].$file history files
-"bringover $filepath"
-"$ME edit $file"
-Then carefuly merge the saved copy of local file with the
-file brought over from parent.  Hint: twmerge is a good merge 
-tool.
-		EOF
-		return 1
-	fi
-
-	[[ -f SCCS/p.$file ]] && checkedout=true
-
-	# Note the use of hard tabs in the messages
-	case $numdeltas in
-		0)	if $checkedout; then
-                                # file is checked out so assume there
-                                # will be 1 delta when checked in.
-				return 0 
-			else
-				if [[ -n $parentfilepath ]];  then
-					if cmp -s $file $parentfilepath; then
-						cat <<-EOF
-
-Warning: the local file:
-$filepath
-and the parent file:
-$parentfilepath
-content are identical.  There are no new deltas in the local file.
-If this file is no longer required in the active list use:
-"cd $dir"
-"$ME reset $file"
-to remove file from the wx state files (active list, etc...)
-						EOF
-					else
-						cat <<-EOF
-
-Warning: the local file:
-$filepath
-and the parent file:
-$parentfilepath
-have the same number of deltas but contents differ.  A bringover may be
-required before putback.
-						EOF
-					fi
-				else
-					cat <<-EOF
-
-Warning: the local file:
-$filepath
-is new but doesn't appear to contain any deltas.  The SCCS delta history file
-may need to be recreated.  If so: 
-"cd $dir"
-"rm SCCS/s.$file"
-"$ME create $file"
-					EOF
-				fi
-				return 1 
-			fi ;;
-
-		1)	if $checkedout; then
-				cat <<-EOF
-
-Regarding $filepath
-Warning! There may be more than 1 delta when you check this file in
-(currently checked out).  Run '$ME redelget' on this file to collapse
-the deltas and check in with 1 delta unless putting back > 1 bug.
-				EOF
-				return 1 
-			else
-				return 0 
-			fi ;;
-
-		-*) # a negative number means the parent has more deltas
-			
-			cat <<-EOF
-
-Regarding $filepath
-Warning! The parent file has more deltas than the local file.
-You should bringover the local file to fix this.
-			EOF
-			;;
-
-		*)	if $newfile && $checkedout; then
-				cat <<-EOF
-
-Regarding $filepath
-Warning! There may be more than 1 delta when you check this file in
-(currently checked out).  Run '$ME redelget' on this file to collapse
-the deltas and check in with 1 delta unless putting back > 1 bug.
-				EOF
-			else
-				cat <<-EOF
-
-Regarding $filepath
-Warning! There is more than 1 delta.  Run:
-'cd $dir; $ME redelget $file' 
-to collapse the deltas on this file and check in with 1 delta unless
-putting back > 1 bug.
-				EOF
-			fi
-			return 1;;
-	esac
-}
-
-wx_cstyle() {
-	case $file in
-		*.[ch])	;;
-		*)	return;;
-	esac
-	((CSTYLE_INDEX = CSTYLE_INDEX + 1))
-	(cd $workspace;
-	 cstyle ${CSTYLE_FLAGS} $args $filepath >\
-	    $wxtmp/wx.cstyle.$CSTYLE_INDEX) &
-}
-
-wx_jstyle() {
-	case $file in
-		*.java)	;;
-		*)	return;;
-	esac
-	((JSTYLE_INDEX = JSTYLE_INDEX + 1))
-	(cd $workspace;
-	 jstyle ${JSTYLE_FLAGS} $args $filepath >\
-	    $wxtmp/wx.jstyle.$JSTYLE_INDEX) &
-}
-
-wx_find_compression_progs() {
-	gzip=/usr/bin/gzip
-	if [[ ! -x $gzip && -n "$GZIPBIN" ]]; then
-		gzip=$GZIPBIN
-	fi
-
-	bzip2=/usr/bin/bzip2
-	if [[ ! -x $bzip2 && -n "$BZIP2BIN" ]]; then
-		bzip2=$BZIP2BIN
-	fi
-}
-
-wx_get_backup_dir() {
-	typeset backup_dir_file
-	# if backup_dir hasn't been set already...
-	if [[ -z "$backup_dir" ]]; then
-		# use the backup dir specifier in the wx/
-		backup_dir_file=$wxdir/backup_dir
-		if [[ ! ( -f $backup_dir_file && -r $backup_dir_file && 
-			-s $backup_dir_file ) ]]; then
-			fail "$backup_dir_file: missing, empty, or not readable"
-		fi
-		backup_dir=`cat $backup_dir_file`
-	fi
-	if [[ ! ( -d $backup_dir && -x $backup_dir && -r $backup_dir ) ]]; then
-		fail "$backup_dir: missing, not a directory, or bad permissions"
-	fi
-}
-
-#
-# This code requires that the files (n.sdot, n.pdot and n.clear) for a given
-# backup have the same extension (.tar, .tar.gz, or .tar.bz2).  It also
-# disallows the existance of two incarnations of the same file (i.e.
-# n.clear.tar and n.clear.tar.gz)
-#
-# It's up to the user to straighten things out if the above conditions are
-# violated.  The only time that is a problem is if they are trying to
-# restore a version which violates the above rules.
-#
-#  Takes one argument, the version number.
-#
-#  Returns:
-#	(return code)	0 if exists and consistent,
-#			1 if not found,
-#			2 if inconsistent
-#	b_clear, b_sdot, b_pdot	On success, the full path to the clear, sdot
-#	and pdot files comp, ext	The compression program for and
-#	extension of said files
-#
-wx_check_backup() {
-	typeset _new _b_new _renamed _b_renamed _active _b_active \
-		_local_nt _b_local_nt found bad
-
-	_version=$1
-	clear=$_version.clear.tar
-	sdot=$_version.sdot.tar
-	pdot=$_version.pdot.tar
-	not=$_version.not.tar
-	_renamed=$_version.renamed
-	_b_renamed=$backup_dir/$_renamed
-	_new=$_version.new
-	_b_new=$backup_dir/$_new
-	_active=$_version.active
-	_b_active=$backup_dir/$_active
-	_local_nt=$_version.local_nametable
-	_b_local_nt=$backup_dir/$_local_nt
-	_sort=$_version.sort_active
-	_b_sort=$backup_dir/$_sort
-	found=false
-	bad=false
-	#
-	# these arrays must be in sync with:
-	# 1. the immediately following _count variable
-	# 2. wx_find_last_backup's egrep expression
-	# 3. wx_backup's "$args" handling.
-	# 4. wx_find_compression_progs's programs
-	#
-	set -A _comps	""  "$gzip" "$bzip2"
-	set -A _extns	""  ".gz"   ".bz2"
-	_count=3
-
-	idx=0
-	while [[ $idx -lt $_count ]] ; do
-		_ext=${_extns[$idx]}
-		_comp=${_comps[$idx]}
-		_clear=$clear$_ext
-		_sdot=$sdot$_ext
-		_pdot=$pdot$_ext
-		_b_clear=$backup_dir/$_clear
-		_b_sdot=$backup_dir/$_sdot
-		_b_pdot=$backup_dir/$_pdot
-
-		if [[ -f $_b_clear || -f $_b_sdot ]]; then
-			if $found; then
-				echo "$backup_dir: both $_version.*.tar$ext "\
-					 "and $_version.*.tar$_ext exist"
-				bad=true
-			else
-				ext=$_ext
-				comp=$_comp
-				found=true
-			fi
-		fi
-
-		if [[ -f $_b_clear && ! -f $_b_sdot ]]; then
-			echo "$backup_dir: $_clear exists; $_sdot does not"
-			bad=true
-		elif [[ ! -f $_b_clear && -f $_b_sdot ]]; then
-			echo "$backup_dir: $_sdot exists; $_clear does not"
-			bad=true
-		elif [[ ! -f $_b_sdot && -f $_b_pdot ]]; then
-			echo "$backup_dir: $_pdot exists; $_sdot does not"
-			bad=true
-		fi
-		idx=`expr $idx + 1`
-	done
-
-	if [[ ! -f $_b_renamed && -f $_b_active ]]; then
-		# Can determine compression only
-		return 1
-	fi
-	
-	if [[ -f $_b_renamed && -f $_b_active && -f $_b_new &&
-		-f $_b_local_nt ]]; then
-		found=true
-	else
-		bad=true
-	fi
-
-	$bad && return 2
-	$found || return 1
-
-	b_renamed=$_b_renamed
-	b_new=$_b_new
-	b_active=$_b_active
-	b_local_nt=$_b_local_nt
-
-	if [[ -f $backup_dir/$clear$ext && -f $backup_dir/$sdot$ext ]]; then
-		b_clear=$backup_dir/$clear$ext
-		b_sdot=$backup_dir/$sdot$ext
-	else
-		b_clear=
-		b_sdot=
-	fi
-
-	# It's not an error if this doesn't exist.
-	if [[ -f $backup_dir/$pdot$ext ]]; then
-		b_pdot=$backup_dir/$pdot$ext
-	else
-		b_pdot=
-	fi
-	# It's not an error if this doesn't exist.
-	if [[ -f $backup_dir/$not ]]; then
-		b_not_files=$backup_dir/$not
-	else
-		b_not_files=
-	fi
-	# It's not an error if this doesn't exist.
-	if [[ -f $_b_sort ]]; then
-		b_sort=$_b_sort
-	else
-		b_sort=
-	fi
-
-	return 0
-}
-
-#
-# finds the number of the last backup.
-#
-# Returned in $result, which is -1 if no backups are found
-#
-wx_find_last_backup() {
-	#
-	# The list of extensions in the egrep expression must be in sync
-	# with wx_check_backup's arrays
-	#
-	result=`ls -1 $backup_dir | egrep \
-	    '^[0-9][0-9]*\.((pdot|sdot|clear)\.tar($|\.gz$|\.bz2$)|active|renamed|new|local_nametable$)'| \
-	    sed 's/^\([0-9][0-9]*\)\..*$/\1/'| sort -rn | head -1`
-
-	[[ -n "$result" ]] # fail if result is empty
-}
-
-#
-# wx_do_backup
-# Returns 0 on successful backup, 1 if nothing to backup, 2 any other
-# error.
-#
-
-wx_do_backup() {
-	_type=$1	# type of files (for user)
-	_out=$2		# file to write to
-	_comp="$3"	# compression program, or empty for no compression
-	_evalarg=$4	# arg to wx_eval to get the correct file list
-	typeset backupfiles=$(wx_eval "$_evalarg")
-
-	echo
-	echo "Saving $_type files to $_out"
-	echo
-
-	if [[ -z $backupfiles ]]; then
-		echo "Note, nothing to backup."
-		return 1
-	fi
-
-	if [[ -n "$_comp" ]]; then
-		( tar cvf - $backupfiles 2>$BACKUP_ERRORS || \
-		    rm -f $_out ) | $_comp -9 -c > $_out || rm -f $_out
-	else
-		tar cvf $_out $backupfiles 2>$BACKUP_ERRORS || 
-		    rm -f $_out
-	fi
-
-	[[ -f "$_out" ]] || return 2	# $_out is removed on any error
-
-	return 0
-}
-
-wx_do_restore() {
-	_type=$1		# type of files (for user)
-	_in=$2		  # file to read from
-	_comp="$3"	  # uncompressing program
-	echo
-	echo "Restoring $_type files from $_in"
-	echo
-
-	if [[ -n "$_comp" ]]; then
-		#
-		# if decompression fails, echo a bad value to make tar fail
-		#
-		($_comp -dc < $_in || echo "fail") | tar xvpf - || return 1
-	else
-		tar xvpf $_in || return 1
-	fi
-	return 0
-}
-
-#
-# do renames in a workspace from a backup set
-#
-
-wx_do_renames() {
-	typeset _in=$1 # file to read from
-
-	if [[ ! -f $wsdata/nametable ]]; then
-		echo "$wsdata/nametable not found, not doing renames."
-		return 0
-	fi
-
-	echo
-	echo "Restoring renamed files from $_in"
-	echo
-
-	# Note this assumes we're staring in $workspace
-
-	while read new hash1 hash2 hash3 hash4; do
-		# get current local file name
-		current=$(grep " $hash1 $hash2 $hash3 $hash4$" \
-				$wsdata/nametable | cut -f1 -d' ')
-
-		if [[ -z $current ]]; then
-			# nothing to rename
-			continue
-		fi
-
-		if [[ "$new" == "$current" ]]; then
-			# rename not needed
-			continue
-		fi
-
-		if [[ ! -f $new ]]; then
-			if [[ ! -d $(dirname $new) ]]; then
-				mkdir -p $(dirname $new) ||
-					fail "Error: cannot create dir $(dirname $new)"
-			fi
-			echo "Renaming current workspace file $current to $new"
-			workspace filemv $current $new
-		else
-			if [[ -f $current ]]; then
-				ring_bell
-				cat >&2 <<-EOF
-
-Warning: $current 
-and $new 
-files both exist in current workspace with the
-same hash.  The restored renamed list should be recreated by running:
-'$ME update -r'
-Skipping rename of $current 
-to $new
-				EOF
-				
-			fi
-		fi 
-	done < $_in
-
-	return 0 
-}
-
-wx_backup() {
-	typeset orig_file_list ws_file back_file
-	typeset newer=false
-	typeset origdir=$PWD
-
-	case $1 in
-		-i)	wx_get_backup_dir
-			echo "Backup dir is $backup_dir"
-			ls -ltr $backup_dir
-			echo "Backup dir is $backup_dir"
-			cd $origdir
-			return ;;
-		-t) 	newer=true
-                        # backup if wx files are newer than last backup.
-                        # Implies use of default compression and no
-                        # interaction.  Doing shift so case further down
-                        # won't see -t.
-			shift;; 
-	esac
-	# save state in case wx_backup called from another command.
-	orig_file_list=$file_list
-
-	# we always backup the active files.
-	file_list=$(wx_active)
-
-	if [[ ! -s $wxdir/renamed && -z $file_list ]]; then
-		echo "There isn't anything to backup."
-                file_list=$orig_file_list
-		return 0
-	fi
-
-	# must be in workspace to do backup
-	cd $workspace || fail "Error: cannot cd $workspace"
-
-	if $newer; then
-		# get latest wx state files and active files but skip
-		# wx/tmp and wx/*.old files.
-		ws_file=$(ls -1t $wxdir/!(tmp|*.old) $file_list|head -1)
-		# get latest backup.
-		wx_get_backup_dir
-		back_file=$(ls -1t $backup_dir/*|head -1)
-		if [[ ( -z "$back_file" && -n "$ws_file" ) || \
-			(( -n "$back_file" && -n "$ws_file" ) && \
-			$ws_file -nt $back_file ) ]]
-		then
-			: # continue with backup
-		else
-			print "Skipping backup, last backup newer than wx"\
-				"files."
-                        file_list=$orig_file_list
-			cd $origdir
-			return 0
-		fi
-	fi
-
-	wx_find_compression_progs
-	wx_get_backup_dir
-
-	if [[ ! -w $backup_dir ]]; then
-		fail "$backup_dir: not writable"
-	fi
-
-	if wx_find_last_backup; then
-		prev_backup=$result
-		version=`expr $result + 1`
-	else
-		prev_backup=
-		version=0
-	fi
-
-	#
-	# This must be in sync with wx_check_backup's arrays
-	#
-	case $1 in
-		-n) ext=;	comp=;;
-		-z) ext=.gz;	comp=$gzip;;
-		-b) ext=.bz2; comp=$bzip2;;
-		"-") shift;; # treat this as use default compression
-		"") ;; # treat this as use default compression
-		-??*) fail "$ME $command: only accepts a single argument";;
-		*)  fail "$ME $command: unrecognized argument";;
-	esac
-
-	if [[ -z "$1" ]]; then
-		#
-		# default to the compression of the previous backup
-		#
-		if [[ -z "$prev_backup" ]]; then
-			ext=
-			comp=
-		else 
-			wx_check_backup $prev_backup
-			# A return of 1 is okay
-			if [ $? -gt 1 ]; then
-				echo "$backup_dir/$prev_backup.*: "\
-					"cannot determine previous "\
-					"compression."
-				if $newer; then
-                                        # Assume we want backup.
-					answer="yes"
-				else
-					yesno "Proceed with no "\
-						"compression?"
-				fi
-				if [[ $answer == "no" ]]; then
-					echo "No backup done."
-                                        file_list=$orig_file_list
-					cd $origdir
-					return
-				fi
-				ext=
-				comp=
-			fi
-		fi
-	fi
-
-	if [[ -n "$comp" && ! -x "$comp" ]]; then
-		echo "${comp}: missing.  defaulting to no compression"
-		ext=
-		comp=
-	fi
-
-	b_clear=$backup_dir/$version.clear.tar$ext
-	b_sdot=$backup_dir/$version.sdot.tar$ext
-	b_pdot=$backup_dir/$version.pdot.tar$ext
-	b_local_nt=$backup_dir/$version.local_nametable
-	b_active=$backup_dir/$version.active
-	b_renamed=$backup_dir/$version.renamed
-	b_new=$backup_dir/$version.new
-	b_not_files=$backup_dir/$version.not.tar
-	b_sort=$backup_dir/$version.sort_active
-
-	#
-	# If anything goes wrong, clean up after ourselves
-	#
-	trap "/usr/bin/rm -f $b_clear $b_sdot $b_pdot $b_active $b_renamed $b_new $b_local_nt $b_not_files $b_sort; exit 1" 0 1 2 3 15
-
-	fail_msg='failed.  Cleaning up. '
-
-	#
-	# It is not a hard error for the SCCS/s.file to be missing.  We just
-	# let the user know what's going on.
-	#
-	sdot_cmd='
-_sdot="SCCS/s.$file";
-_file="$dir/$_sdot";
-if [[ -f $_sdot ]]; then
-	echo "$_file";
-else
-	echo "$_file: not found" >&2;
-fi
-'
-	pdot_cmd='
-_pdot="SCCS/p.$file";
-_sdot="SCCS/s.$file";
-_file="$dir/$_pdot";
-if [[ -f $_pdot ]]; then
-	echo "$_file";
-elif [[ ! -f $_sdot ]]; then
-	echo "$_file: not checked in" >&2;
-elif [[ -w $file ]]; then
-	echo "$_file: not found but $file is writable!" >&2;
-fi
-'
-	# Do this first in case there are no active files
-	echo
-	echo "Saving renamed file list to $b_renamed"
-	echo
-	cp $wxdir/renamed $b_renamed || fail "$b_renamed: $fail_msg"
-
-	if [[ -f $wxdir/local_nametable ]]; then
-		echo
-		echo "Saving local_nametable to $b_local_nt"
-		echo
-		cp $wxdir/local_nametable $b_local_nt || \
-			fail "$b_local_nt: $fail_msg"
-	fi
-
-	if [[ -f $wxdir/sort_active ]]; then
-		print
-		print "Saving sort_active to $b_active"
-		print
-		cp $wxdir/sort_active $b_sort || fail "$b_sort: $fail_msg"
-	fi
-
-	if ls wx/*.NOT >/dev/null 2>&1; then
-		echo
-		echo "Saving .NOT files to $b_not_files"
-		echo
-		tar -cf $b_not_files wx/*.NOT || fail "$b_not_files: $fail_msg"
-	fi
-
-	# Are there any active files to backup?
-	if [[ -n $file_list ]]; then
-		wx_do_backup 'clear' $b_clear "$comp" 'echo $filepath' ||
-			fail "$b_clear: $fail_msg"
-
-		wx_do_backup 'sdot' $b_sdot "$comp" "$sdot_cmd" ||
-			fail "$b_sdot: $fail_msg"
-
-		echo
-		echo "Saving new list to $b_new"
-		echo
-		cp $wxdir/new $b_new || fail "$b_new: $fail_msg"
-
-		# It's not fatal if the backup error for pdot files is
-		# 'no files to backup'.  This is because it's possible
-		# that the active files aren't checked out so there
-		# won't be any pdot files.
-		wx_do_backup 'pdot (if any)' $b_pdot "$comp" "$pdot_cmd" 
-		if [[ $? -gt 1 ]]; then
-			fail "$b_pdot: $fail_msg $(cat $BACKUP_ERRORS)"
-		fi
-	fi
-	
-	echo
-	echo "Saving active file list to $b_active"
-	echo
-	cp $wxdir/active $b_active || fail "$b_active: $fail_msg"
-
-	trap - 0 1 2 3 15
-
-	rm -f $BACKUP_ERRORS
-
-	# restore file_list state.
-	file_list=$orig_file_list
-
-	cd $origdir
-	return 0
-}
-
-wx_restore() {
-	typeset force=0
-
-	case $1 in
-		-f) force=1;;
-		-*) fail "Invalid flag $1. See 'wx help' for more  info.";;
-	esac
-
-	if [[ $force -eq 0 ]]; then
-		cat <<-EOF
-
-Warning, the restore command will overwrite several files including the
-active and renamed lists.  This could be a problem if you have made
-changes to your workspace and $ME related files following the last
-backup.  It may be a good idea to run:
-
-$ME update
-
-after the restore so that the active and renamed lists are updated with
-the new changes in the workspace.
-
-Also, restore may perform workspace renames in this workspace if it
-finds that the existing file has a pathname that differs from that in
-the backup being restored.
-
-		EOF
-		ok_to_proceed "Do you really want to do the restore?"
-	fi
-
-	wx_find_compression_progs
-	wx_get_backup_dir
-
-	if wx_find_last_backup; then
-		version=$result
-	else
-		fail "$backup_dir: no backups found"
-	fi
-
-	if [[ $force -eq 0 ]]; then
-		ask 'Version to restore from' $version
-		version=$answer
-	fi
-
-	#
-	# wx_check_backup sets $comp, $b_clear, and $b_sdot when successful
-	#
-	if wx_check_backup $version; then
-		:
-	else
-		if [[ $? -eq 2 ]]; then
-			fail "$backup_dir/$version.*: unable to restore"\
-				"inconsistent version"
-		else
-			fail "$backup_dir: Unable to find version $version"
-		fi
-	fi
-
-	b_active=$backup_dir/$version.active
-
-	if [[ -n "$comp" && ! -x "$comp" ]]; then
-		fail "${comp}: missing -- cannot decompress $b_clear"
-	fi
-
-	# must be in workspace to do restore
-	cd $workspace || fail "Error: cannot cd $workspace" 
-
-	[[ -f $b_renamed ]] || fail "$b_renamed: missing"
-	[[ -f $b_new     ]] || fail "$b_new: missing"
-	[[ -f $b_active  ]] || fail "$b_active: missing"
-
-	[[ -r $b_renamed ]] || fail "$b_renamed: not readable"
-	[[ -r $b_new     ]] || fail "$b_new: not readable"
-	[[ -r $b_active  ]] || fail "$b_active: not readable"
-
-	if [[ -f $b_clear ]]; then
-		[[ -r $b_clear ]] || fail "$b_clear: not readable"
-	fi
-	if [[ -f $b_sdot ]]; then
-		[[ -r $b_sdot ]] || fail "$b_sdot: not readable"
-	fi
-	if [[ -f $b_pdot ]]; then
-		[[ -r $b_pdot ]] || fail "$b_pdot: not readable"
-	fi
-	if [[ -f $b_local_nt ]]; then
-		[[ -r $b_local_nt ]] || fail "$b_local_nt: not readable"
-	fi
-	if [[ -f $b_not_files ]]; then
-		[[ -r $b_not_files ]] || fail "$b_not_files: not readable"
-	fi
-	if [[ -f $b_sort ]]; then
-		[[ -r $b_sort ]] || fail "$b_sort: not readable"
-	fi
-
-	#
-	# If something goes wrong, we need to make sure they notice, so
-	# we make the message quite visible, and echo a BELL.
-	#
-	fail_msg='Extraction failed.
-
-	*DANGER* *DANGER* workspace could be corrupted *DANGER* *DANGER*'
-
-	cp $b_renamed $wxdir/renamed || fail "$wxdir/renamed: $fail_msg"
-	cp $b_new $wxdir/new || fail "$wxdir/new: $fail_msg"
-	cp $b_active $wxdir/active || fail "$wxdir/active: $fail_msg"
-	cp $b_local_nt $wxdir/local_nametable ||
-		fail "$wxdir/local_nametable: $fail_msg"
-	if [[ -n $b_sort ]]; then
-		cp $b_sort $wxdir/sort_active || \
-			fail "$wxdir/sort_active: $fail_msg"
-	fi
-
-	# Need to move active files that are renamed in current ws back to
-	# their name in the active list to avoid two copies of the file
-	# occuring when the clear files are restored below.
-	wx_do_renames $wxdir/local_nametable ||
-		fail "$wxdir/local_nametable: $fail_msg"
-
-	if [[ -n $b_not_files ]]; then
-		tar -xf $b_not_files || fail "$wx/*.NOT: $fail_msg"
-	fi
-	# It's not an error if there is no clear backup.
-	if [[ -f $b_clear ]]; then
-		wx_do_restore "clear" $b_clear "$comp" ||
-		    fail "$b_clear: $fail_msg"
-	fi
-	# It's not an error if there is no sdot backup.
-	if [[ -f $b_sdot ]]; then
-		wx_do_restore "sdot" $b_sdot "$comp" ||
-			fail "$b_sdot: $fail_msg"
-	fi
-	# It's not an error if there is no pdot backup.
-	if [[ -f $b_pdot ]]; then
-		wx_do_restore "pdot" $b_pdot "$comp" ||
-			fail "$b_pdot: $fail_msg"
-	fi
-
-	# Do some integrity checking
-	for filepath in $(wx_active); do
-		if cd ${workspace}/$(dirname $filepath); then
-			file=$(basename $filepath)
-
-			# If file is not writable then assume the
-			# SCCS/p.file is bogus.  This can happen if a
-			# file is checked out and a wx restore is done
-			# and the restored file was not checked out when
-			# it was backed up.
-
-			if [[ ! -w $file && -f SCCS/p.$file ]]; then
-				ring_bell
-				cat <<-EOF
-
-Warning! $filepath is in inconsistent state.
-$filepath is not writable and SCCS/p.$file exists.
-Removing SCCS/p.$file 
-To edit the file run '$ME edit $filepath'
-				EOF
-				rm -f SCCS/p.$file
-			elif [[ -w $file && ! -f SCCS/p.$file ]]; then
-				ring_bell
-				cat <<-EOF
-
-Warning! $filepath is in inconsistent state.
-$filepath is writable 
-but there is no SCCS/p.$file
-
-				EOF
-				yesno "Should this file be checked out?"
-				if [[ "$answer" == 'yes' ]]; then
-					if mv $file $wxtmp; then
-						if sccs edit $file; then
-							update_active $filepath
-						fi
-						mv -f $wxtmp/$file $file
-					fi
-				else
-					ask_remove_active_entry 
-					echo "Setting $filepath read only"
-					chmod ugo-w $file
-				fi
-			fi
-		else
-			ring_bell
-			echo "\nWarning! Could not check sccs state of "\
-			    "$filepath"
-		fi
-	done
-}
-
-wx_fullreview() {
-	if wx_pnt_filepath; then
-		:
-	else
-		parentfilepath=/dev/null
-	fi
-	if $show_comments && wx_show_comment > $wxdir/comment; then
-		comm=-y"`cat $wxdir/comment`"
-		codereview "$comm" $args $parentfilepath $workspace/$filepath
-	else
-		codereview $args $parentfilepath $workspace/$filepath
-	fi
-}
-
-#
-# Check on RTI status for bug ID's found in active list comments.
-#
-
-wx_rtichk() {
-	# gate contains the gate dir, not full path
-	typeset gate=${parent##*/}
-	typeset -i rc=0
-	typeset nolookup opt
-
-	if [[ -f $wxdir/rtichk.NOT ]]; then
-		print "\nSkipping RTI check:"
-		return
-	else
-		print "\nDoing RTI check:"
-	fi
-
-	while getopts :N opt; do
-		case $opt in
-			N) nolookup='-N' ;;
-			*) fail "Invalid flag -$OPTARG." ;;
-		esac
-	done
-
-	# Note, rtichk needs a gate arg to correctly determine status.
-	if [[ -z $gate ]]; then
-		cat >&2 <<-EOF
-Warning: cannot find a parent gate, skipping RTI checking.
-		EOF
-	fi
-
-	# Use wx_summary to output bug ID's in active list comments,
-	# redirecting warnings about non-bug ID's to file for later use.
-	set -A bugs $(wx_summary -ao $nolookup 2>$wxtmp/bugwarnings|cut -f1 -d' ')
-	rtichk -g $gate ${bugs[@]}
-	rc=$?
-
-	if [[ -s $wxtmp/bugwarnings ]]; then
-		cat <<-EOF
-
-There are issues with the bug ID format in the 
-$wxdir/active file.
-Please fix the following and run rtichk again:
-
-		EOF
-		cat $wxtmp/bugwarnings
-		((rc = 1))
-	fi
-	if [[ ${#bugs} -eq 0 ]]; then
-		print "\nWarning: no bug ID's in active list."
-	fi
-	return $rc
-}
-
-#
-# Do a Teamware putback of active and renamed files.
-#
-wx_putback() {
-	# Use pbargs array to store Teamware putback args.
-	# verbatim is for -v verbatim flag which doesn't get passed to
-	# putback.
-	set -A pbargs
-	typeset i verbatim pbfiles narg=false force=false
-	typeset nolookup=false
-
-	if $FILES_PASSED; then
-		# use the user specified files
-		pbfiles=$file_list
-	else
-		# use the pblist (active and renamed)
-		pbfiles=$(wx_active -p)
-	fi
-
-	while getopts :fnp:qvN i; do
-		case $i in
-			# Force the putback (no user interaction)
-			f)	force=true;;
-
-			n)	narg=true
-				pbargs[${#pbargs[@]}]="-$i" ;;
-
-			q)	pbargs[${#pbargs[@]}]="-$i" ;;
-
-			p)	pbargs[${#pbargs[@]}]="-$i" 
-				pbargs[${#pbargs[@]}]="$OPTARG" 
-				# setting parent for user prompt below
-				parent="$OPTARG" ;; 
-
-				# -v doesn't get passed to putback.
-			v)	verbatim='-v';;
-
-			N)	nolookup='-N';;
-
-		  	*)	fail "Invalid flag -$OPTARG. See 'wx help'"\
-					"for more info.";;
-		esac
-	done
-
-	if ! $narg; then
-		# real putback
-
-		# get pb comments, will be used later.
-		if ! wx_summary -p $verbatim $nolookup >$wxtmp/pb_comments; then
-			# Fail if comments have problems.
-			fail "\nError, improper comments found. Use -v"\
-				"to bypass this check."
-		fi
-
-		if ! $force; then
-			# not force so give more warning.
-			( # using subshell to capture stdout to file.
-			cat <<-EOF
-Remember to run '$ME pbchk' before doing a final putback (esp. if
-doing a putback to an official ON gate).  Make sure your workspace 
-parent ($parent) is correct.  
-It's a good idea to check your code diffs before putback ('$ME pdiffs').
-
-Also, run '$ME $command -n' and check for conflicts before doing the
-final putback.
-			EOF
-
-			if [[ -z "$(wx_summary -bo 2>/dev/null)" ]]; then
-				cat <<-EOF
-
-Don't forget the ARC ID info in your active list comments if there is an
-ARC case associated with your putback.
-				EOF
-			fi
-
-			echo "\nThe putback comment will be:"
-			cat $wxtmp/pb_comments
-			print "========== End of putback comments ======="
-
-			# Output warning if RTI isn't approved.
-			wx_rtichk $nolookup
-			print "========== End of RTI check output ======="
-
-			cat <<-EOF
-
-The following files will be used for putback:
-$pbfiles
-
-			EOF
-			) | ${PAGER:-more}
-
-			ok_to_proceed "Do you really want to"\
-				"'$PUTBACK ${pbargs[@]}' to $parent?"
-		fi
-	fi
-
-	# Do the putback, passing in active list comments if required.
-	# putback both active and renamed/deleted files.
-	cd $workspace
-	if $narg; then
-		# Don't use putback comment if -n is given (trial putback)
-		$PUTBACK "${pbargs[@]}" $pbfiles
-	else
-		# feed active list comments into real putback
-		wx_summary $verbatim $nolookup |$PUTBACK "${pbargs[@]}" $pbfiles
-	fi
-	return
-}
-
-outchk() {
-
-	# List files that are checked out but not in active list.
-	typeset outfile do_header=true
-
-	wx_checked_out >/dev/null
-	# if $wxtmp/checked_out is 0 bytes then return
-	[[ -s $wxtmp/checked_out ]] || return
-
-	sort $wxtmp/checked_out > $wxtmp/co_sort
-	wx_active | sort > $wxtmp/active_sort
-	for outfile in $(comm -12 $wxtmp/active_sort $wxtmp/co_sort); do
-		if $do_header; then
-			echo "\nWarning, the following active list files are"\
-			    "checked out:"
-			do_header=false
-		fi
-		echo "$outfile"
-	done
-	do_header=true
-	for outfile in $(comm -13 $wxtmp/active_sort $wxtmp/co_sort); do
-		if $do_header; then
-			cat <<-EOF
-
-Warning, the following files are checked out but not in active list
-(Run "$ME update -q" to add them to the active list): 
-			EOF
-			do_header=false
-		fi
-		echo "$outfile"
-	done
-	rm -f $wxtmp/co_sort $wxtmp/active_sort
-}
-
-#
-# run Teamware resolve and do reedit only on merged files.
-#
-wx_resolve() {
-	typeset merged_file
-
-	# clear the file_list, will be set below
-	file_list=
-
-	grep -v '^VERSION ' $wsdata/conflicts > $wxtmp/conflicts
-	[[ ! -f $wxtmp/conflicts ]] && fail "Error: cannot create $wxtmp/conflicts"
-
-	# run Teamware resolve
-	resolve $* || fail "Teamware resolve failed."
-
-	# resolve will remove files from $wsdata/conflicts when
-	# successfully merged.
-
-	# set file_list to files that were merged.
-	for merged_file in $(cat $wxtmp/conflicts); do
-		if ! grep -q '^'"$(escape_re $merged_file)"'$' \
-		    $wsdata/conflicts; then
-			# set file_list for wx_eval later.
-			file_list="$file_list $merged_file"
-		fi
-	done
-
-	if [[ -n $file_list ]]; then
-		ok_to_proceed "Re-edit merged files to collapse merge deltas?"
-		echo "Re-editing merged files"
-		echo
-		wx_eval wx_reedit_file
-		echo
-		echo "Re-edit complete"
-		echo
-	else
-		echo "No merged files to re-edit."
-	fi
-}
-
-#########################################################################
-#
-# Main
-#
-
-#
-# Do some initial sanity checking and set up.
-#
-
-# Set the lang to standard English so wx doesn't get confused. 
-export LC_ALL=C
-
-# Turn on debugging output early
-if [[ "$*" == *' -D'*( *) ]]; then
-	typeset -ft $(typeset +f)
-	set -x
-fi
-
-ME=$(basename $0)
-export ME
-
-if [[ -d /usr/xpg4/bin ]]; then
-	# Want to use xpg4 versions of fgrep and grep
-	PATH=/usr/xpg4/bin:/usr/bin:/usr/sbin:/usr/ccs/bin:$PATH
-else
-	fail "Error: directory /usr/xpg4/bin not found."
-fi
-
-unset CDPATH	# if set "cd" will print the new directory on stdout
-		# which screws up wx_eval.
-
-DEFAULT_SRCDIR=usr
-
-if [[ $# -eq 0 || "$1" == help ]]; then
-	# output usage now to avoid unnecessary checking below.
-	wx_usage
-fi
-
-if [[ "$1" == version ]]; then
-	# output version now to avoid unnecessary checking below.
-	version
-	exit 0
-fi
-
-#
-# Check to make sure we're not being run from within a Mercurial repo
-#
-if hg root >/dev/null 2>&1; then
-	fail "Error: wx does not support Mercurial repositories.\n"\
-"Please see http://opensolaris.org/os/community/tools/hg"
-fi
-
-whence workspace >/dev/null || fail "Error: cannot find workspace command in \$PATH."
-
-# Note, PUTBACK can be set to "cm_env -g -o putback" to use Casper Dik's
-# turbo-dir.flp scripts to speed up thorough updates.
-PUTBACK=${PUTBACK:='putback'}
-BRINGOVER=${BRINGOVER:='bringover'}
-
-dot=$PWD
-
-if [[ -n "$CODEMGR_WS" ]]; then
-	# ws was used.
-	# normalize the workspace name.
-	workspace=$(cd $CODEMGR_WS && workspace name)
-
-	# If the current dir is in a workspace check that it is the same
-	# as CODEMGR_WS.
-	if [[ -n "$(workspace name)" ]]; then
-		if [[ "$(/bin/pwd)/" != "$workspace/"* ]]; then
-			cat <<-EOF
-
-Warning, $ME will use $ME files in workspace $workspace (the current
-directory is not in this workspace).
-			EOF
-			ok_to_proceed "Okay to proceed?"
-		fi
-	fi
-else
-	# If current dir is in a workspace then use output of workspace
-	# name as current ws.
-	workspace=$(workspace name)
-	if [[ -n "$workspace" ]]; then
-		CODEMGR_WS=$workspace
-		export CODEMGR_WS
-	fi
-fi
-
-if [[ -z "$workspace" ]]; then
-	fail "No active workspace, run \"ws <workspace>\" or"\
-		"\"cd <workspace>\"."
-fi
-
-workspace_basename=`basename $workspace`
-wxdir=${WXDIR:-$workspace/wx}
-wxtmp=$wxdir/tmp
-wsdata=$workspace/Codemgr_wsdata
-node=`uname -n`
-
-if [ -f $wsdata/parent ]; then
-	parent=`tail -1 $wsdata/parent`
-else
-	parent=
-fi
-if [[ $parent == *:* ]]; then
-	parentdir=${parent#*:}
-	parentnode=${parent%%:*}
-	if [[ $parentnode == $node ]]; then
-		parent=$parentdir
-	else
-		parent=/net/$parentnode$parentdir
-	fi
-fi
-
-# Store backup state
-backup_done=0
-
-# store state if new files are deleted
-NEED_WS_CLEAN='n'
-
-# XXX doing this because keywords doesn't work on new files
-# Note doing the echo so the tabs are apparent,
-# % is escaped to prevent keyword expansion by sccs commands on this file.
-SCCSKEYWORD=$(echo "ident\t+\"(\%Z\%\%M\%\t+\%I\%|\%W\%)\t+\%E\% SMI\"")
-
-# file that contains comments for use in create and checkin
-comment_file=
-# mode for updating comments in active list
-comment_mode="replace"
-
-CSTYLE_FLAGS=${CSTYLE_FLAGS:='-P -p -c'}
-JSTYLE_FLAGS=${JSTYLE_FLAGS:='-p'}
-
-BACKUP_ERRORS=/tmp/${ME}_berrors_$(/usr/xpg4/bin/id -un)_$$
-
-# global for reedit command, don't checkin by default
-CHECKIN=false
-
-# Indicates that the parent nametable cache needs refreshing
-need_pnt_refresh=true
-
-# Indicate whether file args were specified
-FILES_PASSED=false
-
-# Used to store files that have more than one delta compared to parent
-multi_delta_list=
-
-# Used to bringover any files just before exit of wx
-bofilelist=
-
-# should codereviews include delta comments?
-show_comments=true
-
-# Determines if active list should be sorted by default
-# If sort_active contains true then we sort the active list on updates.
-if [[ -r $wxdir/sort_active && "$(cat $wxdir/sort_active)" == "true" ]]; then
-	ACTSORT=sort
-else
-	ACTSORT=cat
-fi
-
-# These are set depending on what needs sorting
-do_renamed_sort=false
-do_active_sort=false
-
-# Places to search for approved RTIs
-RTIDIRS="/net/wizard.eng/export/consolidation/rtiroute/newrtis
-	/net/wizard.eng/export/consolidation/rtiroute/oldrtis
-	/net/onstc.eng/export/stc/Rtitool/consolidation/rtiroute/newrtis
-	/net/onstc.eng/export/stc/Rtitool/consolidation/rtiroute/oldrtis"
-
-# Places to search for approved Patch RTIs
-PRTIDIRS="/net/wizard.eng/export/consolidation/rtiroute/newprtis
-	/net/wizard.eng/export/consolidation/rtiroute/oldprtis"
-
-export workspace parent wxdir file dir filepath backup_done DEFAULT_SRCDIR
-
-#
-# main section
-#
-
-# Get wx command
-command=$1
-comlist=$command
-shift
-# throw away -D flag after command assigned as this flag was processed earlier
-[[ "$1" == '-D' ]] && shift
-
-case $command in
-	apply|eval)	subcommand=$1; shift;;
-	grep|egrep|sed|nawk)	pattern=$1; shift;;
-	nits)	comlist="cstyle jstyle hdrchk copyright cddlchk keywords"; 
-		echo "Note, nits is a subset of pbchk checks.";;
-	pbchk)	comlist="cstyle jstyle hdrchk copyright cddlchk keywords"
-		comlist="$comlist rmdelchk deltachk comchk rtichk outchk";;
-esac
-
-orig_args="$@"
-silent=
-args=
-file_list=
-typeset tmp_file_list tmp_args
-
-#
-# Some subcommands pass through all arguments.
-#
-case $command in
-	webrev)	args="$orig_args"; shift $#;;
-esac
-
-# Parse args
-while [ $# -gt 0 ]; do
-	case $1 in
-		-c|-C) 
-			if [[ $command == @(delget|checkin|ci|create) ]]; then
-				# set global comment_file
-				[[ "$1" == "-C" ]] && comment_mode="append"
-				comment_file=$2; 
-				if [[ $comment_file != '/'* ]]; then
-					comment_file="$(pwd)/$comment_file"
-				fi
-				if [[ -z "$comment_file" ]]; then
-					fail "Missing comment file."\
-						"Run 'wx help' for info."
-				fi
-				[[ ! -r "$comment_file" ]] &&
-				    fail "Can not read comment file"\
-				    	"$comment_file."
-				echo "Using comment file $comment_file"\
-					"for comments."
-				# shift past the comment_file arg
-				shift
-			elif [[ $1 == '-C' && $command == 'diffs' || 
-				$command == 'tdiffs' &&
-				-z $WXDIFFCMD ]]; then
-				if [[ $2 != +([0-9]) ]]; then
-					# provide default context value for
-					# compat with old wx
-					args="$args -C5"
-				else
-					args="$args -C$2"
-					# shift past context lines arg
-					shift 
-				fi
-			else
-				args="$args $1"
-			fi;;
-		-p) 	if [[ $command == @(putback|pb) ]]; then
-				if workspace access $2 >/dev/null; then
-					# 2nd arg is a workspace
-					args="$args $1 $2"
-				else
-					fail "$2 not a workspace."\
-						"Run 'wx help' for info."
-				fi
-				# shift past the parent ws arg
-				shift
-			else
-				# for other commands -p doesn't have a arg
-				args="$args $1"
-			fi;;
-		-r) 	if [[ $command == @(get|extract) ]]; then
-				# 2nd arg is the version #
-				args="$args $1 $2"
-				# shift past 2nd arg
-				shift
-			else
-				# for other commands -r doesn't have a arg
-				args="$args $1"
-			fi;;
-		-s) 	if [[ "$command" == @(update|init) ]]; then
-                                args="$args $1"
-                        else
-                                silent=-s
-                        fi;;
-		-N)	if [[ "$command" == @(codereview|fullreview) ]]; then
-				show_comments=false
-			else
-				args="$args $1"
-			fi ;;
-		-*) 	args="$args $1";;
-		*)  	if [[ -z "$file_list" ]]; then
-				file_list="$1"
-			else
-				file_list="$file_list $1"
-			fi;;
-	esac
-	shift
-done
-
-if [[ "$command" == "init" ]]; then
-	if [ -z "$file_list" ]; then
-		file_list=$DEFAULT_SRCDIR
-	fi
-	wx_init $file_list $args
-	exit
-fi
-
-if [ ! -d $wxdir/tmp ]; then
-	echo "Workspace does not appear to be initialized for $ME."
-	echo "The initialization process will create a few files under"
-	echo "$wxdir but will not otherwise affect your workspace."
-	ok_to_proceed 'OK to proceed?'
-
-	ask "Where is the root of the source code in this workspace?" \
-		$DEFAULT_SRCDIR
-	# wx_init modifies file_list so save current value
-	tmp_file_list=$file_list
-	file_list=
-	# save off args and set to null to avoid side effects
-	tmp_args=$args
-	args=
-	wx_init $answer
-	# restore original file list and cd to original dir in case there's
-	# a command to execute.
-	file_list=$tmp_file_list
-	args=$tmp_args
-	cd $dot
-fi
-
-if [[ ! -f $wxdir/local_nametable ]]; then
-	touch $wxdir/local_nametable 
-fi
-
-# Doing this for backward compat since old wx doesn't have a renamed list
-if [[ ! -f $wxdir/renamed ]]; then
-	# if 'wx update' or 'wx update -r' is the command then skip
-	# renamed list creation since it will happen anyway.
-	if [[ "$command" != "update" ]] || [[ "$args" == *'-q'* ]]; then
-		ring_bell
-		cat <<-EOF
-
-$ME needs to create a renamed file list.  If you are sure that no files
-were renamed or deleted in the current workspace then answer no to the
-following question.
-
-		EOF
-		yesno "Okay to search for renamed files (can be slow)?"
-		if [[ "$answer" == "yes" ]]
-		then
-			wx_update -r
-		else
-			touch $wxdir/renamed
-		fi
-	fi
-fi
-
-# Doing this for backward compat since old wx doesn't have a new list
-if [[ ! -f $wxdir/new ]]; then
-	ring_bell
-	cat <<-EOF
-
-$ME needs to create a new-file list (cache names of newly created
-files).  Please be patient.
-	EOF
-	# Avoid a putback -n which is slow, just use lookup_parent()
-	touch $wxdir/new || fail "Error: cannot create $wxdir/new list"
-	wx_active |
-		while read filepath; do
-			if ! lookup_parent $filepath; then
-				add_new $filepath
-			fi
-		done
-	echo "\nNew files:"
-	cat $wxdir/new
-	echo
-fi
-
-if [[ "$command" == @(restore|backup|bu) ]]; then
-	# If the backup dir was specified as a file arg...
-	if [ -n "$file_list" ]; then
-		backup_dir=$(echo "$file_list"|cut -f1 -d' ')
-	fi
-	# unset file_list since this file arg has been processed here.
-	unset file_list
-elif [[ "$command" == "ea" ]]; then
-	# Do this command before wx_active is run because the active list
-	# may be corrupt.
-	cd $wxdir
-	exec ${EDITOR-vi} active
-elif [[ "$command" == @(unedit|uncheckout|unco) ]]; then
-	if [[ -z "$file_list" && $args != *-f ]]; then
-		echo "$ME will $command all active files which may remove"\
-		    "them from the active list." 
-		ok_to_proceed 'Do you REALLY want to do this?'
-	fi
-	cp $wxdir/active $wxdir/active.old
-elif [[ "$command" == @(bugs|arcs) ]]; then
-	# -v verbatim is not valid for these commands
-	if [[ "$args" == *'-v'* ]]; then
-		fail "Invalid flag -v. Run 'wx help' for info."
-	fi
-elif [[ "$command" == "create" ]]; then
-	if [ -z "$file_list" ]; then
-		fail "$command missing file arg(s). Run 'wx help' for info."
-	fi
-
-	cp $wxdir/active $wxdir/active.old ||
-		fail "Error could not backup $wxdir/active"
-elif [[ "$command" == @(delget|checkin|ci) && -n "$comment_file" ]]; then
-	cp $wxdir/active $wxdir/active.old ||
-		fail "Error could not backup $wxdir/active"
-elif [[ "$command" == @(mv) ]]; then
-	if [[ $(echo "$file_list"|wc -w) -ne 2 ]]; then
-		fail "$command requires two args. Run 'wx help' for info."
-	fi
-
-	cp $wxdir/active $wxdir/active.old ||
-		fail "Error could not backup $wxdir/active"
-	cp $wxdir/renamed $wxdir/renamed.old ||
-		fail "Error could not backup $wxdir/renamed"
-elif [[ "$command" == @(delete|rm) ]]; then
-
-	if [ -z "$file_list" ]; then
-		echo "$ME will try to delete all active files which may "\
-		    "remove them from the active list."
-		ok_to_proceed 'Do you REALLY want to do this?'
-	fi
-
-	cp $wxdir/active $wxdir/active.old ||
-		fail "Error: could not backup $wxdir/active"
-	cp $wxdir/renamed $wxdir/renamed.old ||
-		fail "Error: could not backup $wxdir/renamed"
-elif [[ "$command" == reset ]]; then
-	cp $wsdata/nametable $wxtmp/nametable.orig || \
-		fail "Error: cp $wsdata/nametable $wxtmp/nametable.orig failed."
-fi
-
-if [ -z "$file_list" ]; then
-	basedir=$workspace
-	file_list=$(wx_active) || fail
-else
-	base_file_list=$file_list
-	file_list=
-	for basefile in $base_file_list; do
-		# normalize the filepaths
-		if [[ -d $basefile ]]; then
-			basedir=$(cd $basefile && /bin/pwd)
-			abspath=$basedir
-		else
-			basedir=$(cd $(dirname $basefile) && /bin/pwd)
-			abspath=$basedir/$(basename $basefile)
-		fi
-		if [[ ! -d $basedir ]]; then
-			fail "Error: Path to $basefile does not exist."
-                elif [[ $(cd $basedir; workspace name) != $workspace ]]; then
-			fail "Error: $basefile isn't in current workspace: $workspace."
-
-		fi
-		filepath=${abspath##$workspace/}
-		if [[ -z "$file_list" ]]; then
-			file_list="$filepath"
-		else
-			file_list="$file_list $filepath"
-		fi
-	done
-	FILES_PASSED=true
-fi
-
-if [[ "$command" == @(nits|pbchk) ]]; then
-	tmp_list=
-	# skip nits/pbchk checks for files listed in $command.NOT
-	if [[ -f $wxdir/${command}.NOT ]]; then
-		for _a_file in $file_list; do
-			if grep -q "^$(escape_re $_a_file)$" \
-				$wxdir/${command}.NOT
-			then
-				echo "skipping $command checks for "\
-				    "$_a_file (skipping)"
-			else
-				tmp_list="$tmp_list $_a_file"
-			fi
-		done
-		file_list=${tmp_list# }
-	fi
-	[[ -z $file_list ]] && exit 0
-fi
-
-# This is where the commands are executed.
-for command in $comlist; do
-cd $dot
-case $command in
-	list|active) wx_active $args ;;
-	pblist)	wx_active -p;;
-	renamed)	list_renamed $args ;;
-	new)	list_new $args;;
-	update)	wx_update $args;;
-	out)	wx_checked_out; cat $wxtmp/checked_out;;
-	diffs)	wx_eval -r 'print -- "\n------- $filepath -------\n";
-			sccs get -s -p -k $filepath |
-			${WXDIFFCMD:-diff} $args - $filepath';;
-	tdiffs)	## As diffs but also shows new files.
-		if [[ -r $wxdir/new ]]; then	
-		    ## Read names of new files into space separated list.
-		    while read new_file
-		    do
-			new_files="${new_files}${new_file} "
-		    done < $wxdir/new
-		else
-		    new_files=""
-		fi
-		## For new files a comparison is made with /dev/null thus
-		## all lines will appear to have been added.
-		wx_eval -r 'print -- "\n------- $filepath -------\n";
-		    if [[ ${new_files} == *"${filepath} "* ]]; then
-			${WXDIFFCMD:-diff} $args /dev/null $filepath;
-		    else
-			sccs get -s -p -k $filepath |
-			${WXDIFFCMD:-diff} $args - $filepath;
-		    fi';;
-	pdiffs|tpdiffs) 
-		## Parent Diffs - Compare with parent file.  For
-		## 'tpdiffs' when the parent file does not exist the
-		## child file is assumed new and compared to
-		## /dev/null; thus all lines will appear to have been
-		## added.
-		wx_eval '
-		print -- "\n------- $filepath -------\n";
-		if wx_pnt_filepath; then
-			echo "Index: $filepath";
-			${WXDIFFCMD:-diff} $args $parentfilepath
-			    $workspace/$filepath;
-		    elif [[ $command == 'tpdiffs' ]]; then
-			${WXDIFFCMD:-diff} $args /dev/null
-			    $workspace/$filepath;
-		    else
-			print "New file (does not exist in parent).";
-		    fi';;
-	pvi)	wx_eval '
-		echo $filepath;
-		if wx_pnt_filepath; then
-			${EDITOR-vi} $args $parentfilepath;
-		else
-			echo "New file (does not exist in parent)";
-		fi';;
-	edit|checkout|co)	wx_eval wx_edit;;
-	unedit|uncheckout|unco)	wx_eval wx_unedit;;
-	create)		wx_eval wx_create $args;;
-	uncreate)	wx_eval wx_uncreate $args;;
-	delete|rm)	wx_eval wx_delete $args;;
-	mv)		wx_mv $file_list;;
-	delget|checkin|ci)	wx_eval wx_delget $args;;
-	get|extract)	wx_eval wx_get;;
-	reset)		wx_eval wx_reset $args;;
-	putback|pb)	wx_putback $args;;
-	resolve)	wx_resolve $args;;
-	prt)		wx_eval 'sccs prt $args $file';;
-	comments)	wx_eval 'echo $filepath; echo; wx_show_comment; echo';;
-	bugs)   wx_summary -ao $args;;
-	arcs)   wx_summary -bo $args;;
-	pbcom)  wx_summary -po $args;;
-	info)	wx_eval wx_info;;
-	reedit|recheckout|reco)  wx_reedit $args;;
-	redelget|recheckin|reci) CHECKIN=true; wx_reedit $args;;
-	cstyle) echo "\nDoing cstyle check:"
-		rm -f $wxtmp/wx.cstyle.*;
-		export CSTYLE_INDEX=0;
-		wx_eval wx_cstyle;
-		wait;
-		sort -k 1,1 -k 2,2n $wxtmp/wx.cstyle.* 2> /dev/null
-		;;
-	jstyle) echo "\nDoing jstyle check:"
-		rm -f $wxtmp/wx.jstyle.*;
-		export JSTYLE_INDEX=0;
-		wx_eval wx_jstyle;
-		wait;
-		sort -k 1,1 -k 2,2n $wxtmp/wx.jstyle.* 2> /dev/null
-		;;
-	hdrchk)	echo "\nDoing header format check:";
-		cd $workspace; 
-		hdrchk_files=;
-		for filepath in $file_list ; do
-			if [[ "$filepath" == *.h ]]; then
-				if [[ -s $wxdir/${command}.NOT ]] &&
-					grep -q "^$(escape_re $filepath)$" \
-						$wxdir/${command}.NOT
-				then
-					echo "$filepath (skipping)"
-				else
-					hdrchk_files="$hdrchk_files $filepath"
-				fi
-			fi
-		done
-		hdrchk -a $args $hdrchk_files ;;
-	makestyle) echo "\nDoing makestyle check:";
-		cd $workspace; mlist=$(wx_active | grep '[Mm]akefile');
-		[[ -n "$mlist" ]] && makestyle $args $mlist;;
-
-	keywords) 
-		echo "\nDoing keywords check:";
-		cd $workspace;
-		keyword_files=;
-		for filepath in $file_list ; do
-			if [[ -s $wxdir/${command}.NOT ]] &&
-				grep -q "^$(escape_re $filepath)$" \
-					$wxdir/${command}.NOT
-			then
-				echo "$filepath (skipping)"
-			else
-				keyword_files="$keyword_files $filepath"
-			fi
-		done
-		keywords -p $args $keyword_files;;
-
-	rmdelchk) echo "\nDoing sccs rmdel check:"; wx_eval rmdelchk;;
-
-	rtichk) wx_rtichk;;
-
-	deltachk)  echo "\nDoing multi delta check:"; wx_eval deltachk;;
-	copyright) echo "\nDoing copyright check:"; 
-		cd $workspace;
-		copyright_files=;
-		for filepath in $file_list; do
-			if [[ -s $wxdir/${command}.NOT ]] &&
-				grep -q "^$(escape_re $filepath)$" \
-					$wxdir/${command}.NOT
-			then
-				echo "$filepath (skipping)"
-			else
-				copyright_files="$copyright_files $filepath"
-			fi
-		done
-		copyrightchk $copyright_files;;
-
-	cddlchk)
-		echo "\nDoing CDDL block check:";
-		cd $workspace;
-		cddlnot="";
-		if [[ -s $wxdir/${command}.NOT ]]; then
-			cddlnot="-x $wxdir/${command}.NOT"
-		fi
-
-		#
-		# Split the file list into new files and existing files.
-		# New files must have a CDDL block whereas existing files don't
-		# necessarily have to have a block, but if they do it must be
-		# valid.  Both sets of files are subject to cddlchk.NOT
-		# exception processing.
-		# 
-		old=""
-		new=""
-		for filepath in $file_list; do
-			if wx_pnt_filepath $filepath; then
-				old="$old $filepath"
-			else
-				new="$new $filepath"
-			fi
-		done
-		[[ ! -z $new ]] && cddlchk $cddlnot $args -a $new
-		[[ ! -z $old ]] && cddlchk $cddlnot $args $old
-		;;
-	comchk)	 echo "\nDoing comments check:"; wx_summary -n 2>&1;;
-	outchk)	 echo "\nDoing out check:"; outchk;;
-	backup|bu) wx_backup $args;;
-	restore) wx_restore $args;;
-	apply)	wx_eval "$subcommand \$file";;
-	eval)	wx_eval "$subcommand";;
-	grep|egrep)
-		   wx_eval '
-		   if egrep -s '\'$pattern\'' $file;
-		   then
-			   echo $filepath;
-			   $command $args '\'$pattern\'' $file;
-		   fi';;
-	nawk|sed)
-		wx_eval 'echo $filepath; $command $args '\'$pattern\'' $file';;
-	codereview) args="-e $args"; wx_eval wx_fullreview;;
-	fullreview) wx_eval wx_fullreview;;
-	webrev) wx_webrev $args;;
-	dir)	echo $wxdir;;
-	e)	cd $wxdir; exec ${EDITOR-vi} $orig_args;;
-	ws)	cd $wsdata; cat $orig_args;;
-	args)	cat $wsdata/args;;
-	access)	cat $wsdata/access_control;;
-	*)	ring_bell;
-		echo "Command not found. Run 'wx help' for command list.";
-		exit 1;;
-esac
-
-done
-
-if [[ $NEED_WS_CLEAN == 'y' ]]; then
-	# clean up the nametable
-	print -u2 "Running workspace updatenames to clean up nametable, may"\
-	    "take a while."
-	workspace updatenames >&2
-fi
-
-if [[ -n $bofilelist ]]; then
-	$BRINGOVER $bofilelist
-fi
-
-# save sorting for last for some speed up.
-if [[ $ACTSORT == sort ]]; then
-	if $do_renamed_sort; then
-		sort_renamed
-	fi
-	if $do_active_sort; then
-		sort_active
-	fi
-fi
--- a/usr/src/tools/scripts/wx2hg.sh	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,412 +0,0 @@
-#! /usr/bin/ksh
-#
-# CDDL HEADER START
-#
-# The contents of this file are subject to the terms of the
-# Common Development and Distribution License (the "License").
-# You may not use this file except in compliance with the License.
-#
-# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-# or http://www.opensolaris.org/os/licensing.
-# See the License for the specific language governing permissions
-# and limitations under the License.
-#
-# When distributing Covered Code, include this CDDL HEADER in each
-# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-# If applicable, add the following below this CDDL HEADER, with the
-# fields enclosed by brackets "[]" replaced with your own identifying
-# information: Portions Copyright [yyyy] [name of copyright owner]
-#
-# CDDL HEADER END
-#
-
-#
-# Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
-#
-
-#
-# Convert a wx-based workspace to Mercurial.
-#
-
-usage="wx2hg [-u] [-r hg_rev] [-t hg_ws] codemgr_ws"
-
-#
-# If "yes", then give some hints about cleanup and rerunning after a
-# failure.
-#
-can_retry=no
-tail=/usr/xpg4/bin/tail
-
-function has_hg_twin {
-	[[ -n "$primary_twin" ]]
-}
-
-function warn {
-	print -u2 wx2hg: warning: "$@"
-}
-
-function note {
-	print -u2 wx2hg: note: "$@"
-}
-
-function fail {
-	print -u2 wx2hg: "$@"
-	if [[ "$can_retry" = yes ]]; then
-		print -u2 "Please run"
-		print -u2 "  hg --cwd $hg_ws update -C"
-		print -u2 "before retrying."
-	fi
-	exit 1
-}
-
-function clone_twins {
-	ws="$1"
-	rev="$2"
-
-	echo "Cloning $primary_twin"
-	echo "to $ws"
-	set -x
-	hg clone -r $rev "$primary_twin" "$ws"
-	set +x
-
-	rev_warning=n
-	for dir in $nested_twins; do
-		echo "Cloning from $primary_twin/$dir"
-		echo "to $ws/$dir"
-		mkdir -p $ws/$dir
-		set -x
-		hg init $ws/$dir
-		echo "[paths]" > $ws/$dir/.hg/hgrc
-		echo "default=$primary_twin/$dir" >> $ws/$dir/.hg/hgrc
-	    	( cd $ws/$dir; hg pull -u -r $rev "$primary_twin"/$dir )
-		if (( $? != 0 )); then
-			warn "Unable to clone $primary_twin/$dir"
-			rev_warning=y
-		fi
-		set +x
-	done
-
-	[[ $rev_warning = "n" ]] || fail \
-"revision $rev was not present in all workspaces.\n" \
-"When using -r with nested repositories, you should specify a tag\n" \
-"name that is valid in each workspace."
-}
-
-#
-# Command-line processing, sanity checks, and setup.
-#
-
-[[ -n $(whence workspace) ]] || 
-    fail "workspace command not found; please check PATH."
-
-# do a wx update?
-do_update=yes
-
-#
-# Mercurial workspace to populate.  Default is to create, in the same
-# directory as the Teamware workspace, a new Mercurial workspace cloned
-# from the hg_twin of the Teamware parent.
-#
-hg_ws=""
-
-#
-# Revision in the Mercurial workspace to apply the changes to.
-# Default is to get the most recent revision (tip), thus avoiding
-# the need for a merge unless overridden by the caller using -r.
-#
-hg_rev="tip"
-
-while getopts r:t:u opt; do
-	case $opt in
-	r)	hg_rev="$OPTARG";;
-	t)	hg_ws="$OPTARG";;
-	u)	do_update=no;;
-	?)	print -u2 "usage: $usage"; exit 1;;
-	esac
-done
-shift $(($OPTIND - 1))
-
-if [[ $# -ne 1 ]]; then
-	print -u2 "usage: $usage"
-	exit 1
-fi
-
-CODEMGR_WS="$1"
-[[ "$CODEMGR_WS" = /* ]] || CODEMGR_WS="$(pwd)/$CODEMGR_WS"
-export CODEMGR_WS
-
-if [[ -n "$hg_ws" ]]; then
-	if [[ ! -d "$hg_ws" || ! -d "$hg_ws/.hg" ]]; then
-		fail "$hg_ws is not a Mercurial workspace."
-	fi
-	[[ "$hg_ws" = /* ]] || hg_ws="$(pwd)/$hg_ws"
-fi
-
-[[ -d "$CODEMGR_WS" ]] || fail "$CODEMGR_WS does not exist."
-cd "$CODEMGR_WS"
-
-codemgr_parent=$(workspace parent)
-[[ -n "$codemgr_parent" ]] || \
-    fail "$CODEMGR_WS is not a Teamware workspace or does not have a parent."
-[[ -d "$codemgr_parent" ]] || fail "parent ($codemgr_parent) doesn't exist."
-
-primary_twin=""
-nested_twins=""
-twinfile="$codemgr_parent"/Codemgr_wsdata/hg_twin
-if [[ -f $twinfile ]]; then
-	primary_twin=$(head -1 $twinfile)
-	nested_twins=$($tail -n +2 $twinfile | sort -r)
-fi
-
-if has_hg_twin; then
-	echo "Teamware parent $codemgr_parent has twin $primary_twin"
-	[[ -n "$nested_twins" ]] &&
-	    echo "and nested twins $nested_twins"
-fi
-
-#
-# Do this check before time-consuming operations like creating
-# the target repo.
-#
-his=$(find Codemgr_wsdata -name history -mtime -1)
-if [[ -z "$his" ]]; then
-	warn "history file is more than one day old; do you need to" \
-	    "bringover from $codemgr_parent?"
-fi
-
-# Less time-consuming than cloning
-
-if [[ ! -d wx ]]; then
-	print "Initializing wx..."
-	wx init -ft
-else
-	if [[ "$do_update" = yes ]]; then
-		print "Updating wx state..."
-		wx update
-	fi
-fi
-
-wx outchk
-
-out_files=$(wx out)
-active_files=$(wx list)
-
-if [[ ! -z "$out_files" ]]; then
-    	fail "wx2hg will only migrate checked-in files;" \
-	    "please check in these files with wx ci and try again"
-fi
-
-# more time-consuming than wx update and wx outchk
-
-if [[ -z "$hg_ws" ]]; then
-	ws=$(basename $(pwd))
-	hg_ws=$(dirname $(pwd))/"$ws-hg"
-fi
-
-if [[ -d "$hg_ws" ]]; then
-    	echo "Updating preexisting Mercurial workspace $hg_ws to $hg_rev\n"
-    	(cd "$hg_ws"; hg update -C $hg_rev) ||
-	    fail "hg update $hg_rev failed for $hg_ws"
-	if [[ -n "$nested_twins" ]]; then
-		update_warning=n
-		for dir in $nested_twins; do
-			if [[ ! -d "$hg_ws/$dir" ]]; then
-				warn "$hw_ws/$dir does not exist"
-				update_warning=y
-			fi
-			echo "Updating preexisting nested workspace " \
-			    "$hg_ws/$dir to $hg_rev\n"
-			(cd "$hg_ws"/$dir ; hg update -C $hg_rev)
-			if (( $? != 0 )); then
-				warn "hg update $hg_rev failed for $hg_ws/$dir"
-				update_warning=y
-				continue
-			fi
-		done
-
-		[[ $update_warning = "n" ]] ||
-		    fail "When using an existing Mercurial workspace with\n" \
-			"nested repositories, all nested repositories must\n" \
-			"already exist in the existing workspace.  If also\n" \
-			"specifying -r, then the specified hg_rev must be\n" \
-			"valid in all nested repositories."
-	fi
-else
-    	if has_hg_twin; then
-    	    	clone_twins "$hg_ws" $hg_rev
-	else
-		fail "$codemgr_parent is not recognized as a gate;" \
-		    "please provide a Mercurial workspace (-t hg_ws)" \
-		    "that matches it."
-	fi
-fi
-
-can_retry=yes
-
-# Make sure hg_ws is an absolute path
-[[ "$hg_ws" = /* ]] || hg_ws="$(pwd)/$hg_ws"
-
-
-# usage: which_repo filename
-function which_repo {
-	typeset f=$1
-
-	for r in $nested_twins; do
-		if [ ${f##$r/} != $f ]; then
-			echo ${f##$r/} $r
-			return
-		fi
-	done
-
-	echo $f "."
-}
-
-#
-# Do renames first, because they'll be listed with the new name by "wx
-# list".  There's a conflict if the new name already exists or if the
-# old name does not exist.  We can theoretically recover from the
-# former (move the existing file out of the way, or pick a different
-# new name), but not the latter.  For now, just error out and let the
-# user fix up the workspace so that there isn't a conflict.
-#
-
-renamelist=/tmp/wxrename$$
-wx renamed > "$renamelist"
-
-# usage: do_rename oldname newname
-function do_rename {
-	typeset old_file old_repo new_file new_repo
-
-	which_repo $1 | read old_file old_repo
-	which_repo $2 | read new_file new_repo
-
-	typeset old=$old_repo/$old_file
-	typeset new=$new_repo/$new_file
-
-	[[ -f "$old" ]] || fail "can't rename: $old doesn't exist."
-	[[ ! -f "$new" ]] || fail "can't rename: $new already exists."
-
-	dir=$(dirname "$new")
-	base=$(basename "$new")
-	[[ -d "$dir" ]] || mkdir -p "$dir" || fail "mkdir failed"
-
-	if [ $old_repo = $new_repo ]; then
-		print "rename $old -> $new"
-		set -x
-		( cd $old_repo; hg mv $old_file $new_file ) || \
-		    fail "rename failed."
-		set +x
-	else
-		print "moving $old_file from repository $old_repo"
-		print "to $new_file in repository $new_repo"
-		cp $old $new
-		set -x
-		( cd $old_repo; hg rm $old_file ) || fail "hg rm failed"
-		( cd $new_repo; hg add $new_file ) || fail "hg add failed"
-		set +x
-	fi
-}
-
-if [[ -s "$renamelist" ]]; then
-	cat "$renamelist" | (
-		cd "$hg_ws"
-		while :; do
-			read newname oldname
-			[[ -n "$newname" ]] || break
-			do_rename "$oldname" "$newname"
-		done
-	) || exit 1
-fi
-
-#
-# usage: name_in_parent fname
-# If fname had been renamed, echo the old name.  Otherwise echo the
-# given name.
-#
-function name_in_parent {
-	typeset new old
-
-	if [[ -s "$renamelist" ]]; then
-		cat "$renamelist" | while :; do
-			read new old
-			[[ -n "$new" ]] || break
-			if [[ "$1" = "$new" ]]; then
-				print "$old"
-				return
-			fi
-		done
-	fi
-	print "$1"
-}
-
-#
-# Now do content changes.  There's a likely conflict if the file in
-# Mercurial is different from the file in the Teamware parent.
-#
-
-parentfile=/tmp/parent$$
-patchfile=/tmp/patch$$
-childfile=/tmp/child$$
-
-[[ -n "$active_files" ]] || warn "no files in active list."
-
-for f in $active_files; do
-	#
-	# Get the name that the file appears in the parent as.
-	#
-	oldname=$(name_in_parent "$f")
-
-	# We need unexpanded SCCS keywords for both parent and child
-	sccs get -skp "$f" > "$childfile"
-
-	if [[ -f "$codemgr_parent/$oldname" ]]; then
-	    	(cd $codemgr_parent; sccs get -skp "$oldname" > "$parentfile")
-	else
-	    	rm -f $parentfile
-	fi
-
-	if [[ ! -r "$parentfile" ]]; then
-		print "new file: $f"
-		[[ ! -f "$hg_ws/$f" ]] || fail "$f already exists in $hg_ws."
-		dir=$(dirname "$hg_ws/$f")
-		base=$(basename "$hg_ws/$f")
-		[[ -d "$dir" ]] || mkdir -p "$dir" || fail "mkdir failed"
-		cp "$childfile" "$hg_ws/$f" || fail "copy failed"
-		set -x
-		(cd "$dir" && hg add "$base") || fail "hg add failed."
-		set +x
-	elif diff "$parentfile" "$hg_ws/$f" > /dev/null 2>&1; then
-		if diff -u "$parentfile" "$childfile" > "$patchfile"; then
-			print "skipping $f (unchanged)."
-			continue
-		fi
-		(cd "$hg_ws"; gpatch -F0 $f < "$patchfile")
-		[[ $? -eq 0 ]] || fail "$f: patch failed."
-	else
-	    	diff -u "$parentfile" "$hg_ws/$f"
-		echo ""
-
-		fail "For file:\n\n\t$f\n\nthe teamware parent:" \
-		    "\n\n\t$codemgr_parent" \
-		    "\n\ndoesn't match its mercurial twin;" \
-			"specify the matching revision in mercurial\nwith" \
-		    	"-r hg_rev, or resynchronize them.\n"
-	fi
-done
-
-note "remember to commit your changes:"
-echo "in primary repository ${hg_ws}:"
-( cd $hg_ws ; hg status -mard )
-for n in $nested_twins; do
-	echo "in nested repository ${n}:"
-	( cd $hg_ws/$n ; hg status -mard )
-done
-
-if [[ "$hg_rev" != "tip" ]]; then
-    	note "before you integrate your changes, $hg_ws must be merged to tip"
-fi
-
-rm -f "$parentfile" "$patchfile" "$renamelist" "$childfile"
-
-exit 0
--- a/usr/src/uts/intel/Makefile.intel.shared	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/uts/intel/Makefile.intel.shared	Thu Sep 09 11:46:43 2010 -0400
@@ -370,7 +370,6 @@
 $(CLOSED_BUILD)CLOSED_DRV_KMODS		+= glm
 $(CLOSED_BUILD)CLOSED_DRV_KMODS		+= intel_nhmex
 $(CLOSED_BUILD)CLOSED_DRV_KMODS		+= iprb
-$(CLOSED_BUILD)CLOSED_DRV_KMODS		+= llc2
 $(CLOSED_BUILD)CLOSED_DRV_KMODS		+= cpqary3
 $(CLOSED_BUILD)CLOSED_DRV_KMODS		+= marvell88sx
 $(CLOSED_BUILD)CLOSED_DRV_KMODS		+= bcm_sata
--- a/usr/src/uts/intel/config/Makefile	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/uts/intel/config/Makefile	Thu Sep 09 11:46:43 2010 -0400
@@ -20,6 +20,7 @@
 #
 #
 # uts/intel/config/Makefile
+# Copyright 2010 Nexenta Systems, Inc.  All rights reserved.
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
@@ -46,7 +47,7 @@
 CONFIGFILES	= name_to_major minor_perm driver_aliases name_to_sysnum \
 		  driver_classes dacf.conf $(PATH2INST) mach
 SECCONFIG	= device_policy priv_names
-BOOTIMAGE	= solaris.xpm
+BOOTIMAGE	= splashimage.xpm
 BOOTENVRC	= bootenv.rc
 DEVMASTER	= master
 FILEMODE	= 644
--- a/usr/src/uts/intel/os/solaris.xpm	Wed Aug 18 15:52:48 2010 -0600
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,497 +0,0 @@
-/* XPM */
-static char * os_startup_640x40_xpm[] = {
-"640 480 14 1",
-" 	c #01467A",
-".	c #035491",
-"+	c #095B98",
-"@	c #0F619E",
-"#	c #1466A3",
-"$	c #196BA8",
-"%	c #2072AF",
-"&	c #297BB8",
-"*	c #3284C1",
-"=	c #3D8FCC",
-"-	c #489AD7",
-";	c #55A7E3",
-">	c #63B3EF",
-",	c #F7FAFC",
-"++++++++++++++++@+@+@+++++++@+@+@+@+@+@+@+@##@@+@+@+@+@@@@@@@@@@@@@@@@@@#@@@@#@@@@@@@@#@@@#@@@#@####@@@@@@@@@@@@@##@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@########@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@#@@##@############$#$$$$$$$$$$$$$%$%%%%%%%%%$%%$%$%$$%$$$%$$%$$$$$$$##@@@@@@@@@@@@@@@@@@@@@@@@#$#$##$############@#@@@@@@@@@@@@@@@@@@+@@+@++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+",
-"+@++@++@++@++@++++++++@++@+++++++++++++++@+@#@@++++++++++@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@##@@+@+@+@+@+@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@#@#@@@@@@@@@@@@@@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@@#@@@@@@@#@###############$$$$$$$$$$$$$$$$$%%$%$%$$%$$%$$$%$$$$$$$$$$$$##@@@@@@@@@@@@@@@@@@@@@@+###$##########@#@@@#@#@@@@@@@@@@+@+@+@++++@++@++@++@++@++@++++++++++++.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+..+...............................................................................................................+.",
-"+++++++++++++++++++++++++++@+@+@+@+@+@+@+++@@#+++@+@+@++@+@@+@+@@+@@@@@@@@@@@@+@+@+@@@@@@@@@@@@#@##@@@+@+@+@+@+@@##@@@@@@@@@@+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@########@@@@@@@@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@@#@@@#@#@#@@#@@##@############$###$$$$$$$$$%$$%$%%$%%%$%$%$%$$$%$$$$$$$$$$#$##@@@@@@@@@@@@@@@@@@@@@@@@#$#############@#@#@@@@@@@@@@@@+@+@+@++@++++++++++++++++++++++.+.++++.+.+.+.+.+.+.+.+.+++.+.+.+.+.++..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+..+",
-"@++++++++++++++++++++++++++++++++++++++++@+##@+@++++++@+@@+++@+@+@@@@@@@@@@@@+@@@+@@@@@@@@@@@#@@##@#@+@+@+@+@+@+##@##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@#@#@@@@@@@@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@#@@#@@#@@@@#@#@@#@#@#@##########$#$##$#$$$$$$$$%$%$%$$%%$%$$%$%$$%$%$$$$$$$$$$$#@@@@@@@@@@@@@@@@@@@+@@@@#$##########@##@@@#@@@@@@@@@@@@@+@+@++@+++++++++++++++++++++++++.+.++++++++++++++++++.+++++++++++.++...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+....",
-"+++++++++++++++++++++++++@+@+@+@+@+@+@+@+++@#@@++@+@+++++++@+@@+@+@+@+@@@+++@+@++@@@@@+@@@@@@@##@###+@@+@@+@@@+@###@@#@@@@@@@+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@@#@@#@@#@@#@@#@@@@@#######@@#@#@#@@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@@#@@#@@@#@#@@@@#@@@#@#@@#@##########$$#$#$$$$$$$$$%$%$%$%$%$%$$$$$$$$%$$$$$$$$$$$$#@@@@@@@@@@@@@@@@@@@@+@@################@@#@@@@@@@@@@@@+@+@+++@+++++++++++++++++++++++++++..+..+..+..+..+..++.+..+..+.++..+.+..+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+.+",
-"++++++++++++++++++++++++++++@+++@+++@++++@+@##+@++++@+@+@+++@++@@@+@@@+@+@@@+@+@@+@@+@@@@@@@@#@####@@+@+@+@++@@@####@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@###@@@@#@#@@@#@@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@@#@@@#@@#@@@#@@@@@#@@@#@#@@@@#@#@#@############$$#$$$$$$$$$%$%$%$%$%%%$%$%$$%$%$%$$$$$$$$$##@@@@@@@@@@@@@@@@@@@@+@@#$#############@@#@@@@@@@@@@@@@+@@++@++++++++++@++++++++++++.++++.++.++.++.++.++.+++++.++.+.+++.+.+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.",
-"++@++@++@++@++@+++@+++@+++@+++@+++@++@+@+++@#@@+++@++@++++@+++@++++@+@+@@+@+@+@++@++@@@@@@@@@@#@####+@+@+@@@@++@#####@#@@@@@@+@+@+@+@+@+@+@+@+@+@+@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@##@###@#@#@@@@@#@@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@##@#@#@##@##@#@@@#@@#@@@#@@@@@@#@@##@#########$#$#$$$$$$$$$%$%$%$%$%$%$%$%$$%$$$$$$$$#$$$$##@@@@@@@@@@@@@@@@@@@@@@###########@###@#@@@@@@@@+@+@@@+@@++@++++++++++++++++++++++.+.+++.++.++.++.++.++.+.++.++.+.+.+....+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+.....+",
-"@++++++++++++++++++++++++@++@+++@++@+++++@+@#@@+@++@+++@+@+++@++@+@@+@+@+@+++@+@@+@@+@+@@@@@#@@####@@@+@@++@+@@#####@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@@@@@@@@@@@@@@@@@@@@@@@@@##@##@##@@@#@#@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@#@#@##@#@#@#@#@#@#@@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@##@#@@#@#@###@@#@@#@@@#@@#@@#@@@#@@###########$##$#$$$$$$$%$%%$%%$%$%$%$$$%$%$$$$$$$$$$$$#@@@@@@@@@@@@@@@@@+@+@@#############@#@#@@@@@@@@@+@+@@++@+@++@++@++++++++++++++++++++.++.++.+.+.+.++..++++++.++++.+.+.+.+.+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+...+..+.+..",
-"++++++++++++++++++++++++@+++++@++++++@+@+++@#@@+++@++@+++++@+++++@++@+++@+@+@+@+@@+@@@@@@@@@@######@+@@+@@@+@+@@#####@#@@@@@@@+@+@+@+@+@+@+@+@+@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@#@#@@#######@#@@@@@@@#@@#@@#@@#@@#@@#@@#@@#@#@#@#@#@#@@#@#@#@#@#@#@@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@@@@#@@@@@#@@@#@@@@#@@#@#@@#@@#@@#@@#@@@#@@@@##@########$#$#$$$$$$$$$%$%$%%$%$%$$$$$%$$$$$$#$$#$$##@@@@@@@@@@@@@@@@@+++@@###########@#@#@@#@@@@@@@@@+@@+@++@++++++++++++++++++++++.+++.+.++.++.++.+++++.+.++....+++.+...+..+..+.+..+..+.+..+..+.+..+..+.+..+..+.+..+..+.+..+..+.+..+..+.+..+..+.+..+..+.+..+..+.+..+..+.+..+....+",
-"++++++++++++++++++++++++++@+@+++@+@+++@++@+@##@+@+++++++@+++++@+@+@++@+@+++@+@@++@@@@+@@@@@#@######@@++@++@@+@+#######@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@#@#####@@@#@#@#@#@@#@@#@@#@@#@@#@@#@#@#@@#@#@#@#@#@#@@#@@@@@@@@#@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@#@@@#@#@@#@@@#@#@@#@@#@@#@@#@@#@@#@@#@@@#@@@@#@@#@########$$#$#$$$$$$$%$%$%$%%%$%$$$$%$$$$$$$$$$$$#@@@@@@@@@@@@@@@@@@+@+@##$########@#@#@@#@@@@+@@@@@@+@++@++++@+++++++++++++.+++.+++++.++.++.++.+..++++.+++++.+.+..+.....+.......+.......+.......+.......+..+.+..+..+.+..+..+.+..+..+.+..+..+.+..+..+.+..+..+.+..+..+....+.+..",
-"@++++++++++++++++++++++@+@++++@+++++@++@++@@#@@+++++@+@+++@+@++@++@+@+++@+@+@@+@@+@+@@@@@@@@#@#####@+@+@@@++@@@#######@#@#@@@@@+@+@+@+@+@+@+@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@@#@########@@@@#@@@#@@#@@#@@#@@#@@@#@@@@@#@@#@@@@@#@@@#@@#@#@#@#@@@@@#@#@#@#@#@#@#@#@#@#@#@#@#@#@#@@@@@@@#@@@@#@@#@#@@@#@@#@@#@@#@@#@@#@@#@@@#@@@##@@@#@@#@@#@####$#$#$#$$$$$$$$%$%$$%$%$%%%$$$$%$$$$$#$#$$##@@@@@@@@@@@@@+@@@@+@+@############@#@#@@@@@+@+@+@@@@+@+@++++++++++++++++.+++.+.+.++.++.++.+.++.+.++.+.+.+++.......+.....+.+.....+.+.....+.+.....+.+..+....+..+....+..+....+..+....+..+....+..+....+..+....+..+..+.+..+..+",
-"++++++++++++++++++++++++++@+@++++@+@+++++++@#@@@+@+@+++++@++++@++@+@++@++@++@+@@+@@@+@@@@@@#@######@+@@+@+@@@+@$#####@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@@@@@@@@@@@@@@#@#@@@#@@#@@#@#####@@#@#@@#@@#@@#@@#@@#@@@#@@#@##@@@#@@@#@#@@#@@@#@@@@@@@#@#@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@#@#@@@#@@#@@#@@@#@@#@#@@#@@#@@#@@#@@@#@@@#@@@@#@@@#@@#@@#@#######$#$#$$$$$$%$$%%$%$%$$$%%$$$$$$$$$$$$$$$##@@@@@@@@@@@@@+@@+@+@@@########@##@#@@#@@@@@+@@@++@@@++@++++++++++++++++.+++++++.++.++.+.++.+.+++++++.+.++.+..+.....+.......+.......+.......+.........................................+......+.+..+.+.+..+..+..+..+..+.",
-"++++++++++++++++++++++@+@+++++@+@++++@+@+@+@@#@+++++@+@+@++@+@++@+++@+@+@+@@+@++@++@@@@@@@@@#######@@+@+@+@++@########@@@@@@@@@@@+@+@+@+@+@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@@#@@@#@##@##@###@#@@@#@@#@@@#@@#@@#@@#@@@#@@@@#@@@@#@@@@@#@#@@@@#@#@#@@@#@#@############################@#@#@#@##@#@#@##@@#@@@#@@@@#@@#@@#@@#@@#@@@#@@@#@@@#@@@#@#@@@@#@#@#####$##$#$$$$$%$$%$%$%%%$%$%$%$$$$$$$$$$$#$##@@@@@@@@@@@@@+@@+@+@@@########@##@#@#@@@@@@+@@@+++@@++@+++++++++++++++++.+.+.+..+.++.++.+++.+.+.+.+++.++.....+.....+..+....+..+....+..+....+......+.......+.......+.......+...+.+.+...+....................+..+..+.+",
-"++++++++++++++++++++++++++@+@+++++@+++@+++@@#@@++@+++@++++++++@+@@+@+++@+++@@+@@+@@+@+@@@@#@######@+@+@+@+@@@@@#$#$##@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@#@@@@#@@@@#@#@@#@@@@@@##@##@#@@@#@@#@@#@@@#@@@#@@#@@#@@@##@@@#@#@#@#@@@@@#@#@#@#@#@#@#@##@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@#@#@#@#@#@@#@#@###@@#@@@#@@@#@@#@@#@@#@@@#@@@#@@#@#@@@#@#@@@@#@#@#@###$#$$$$$$$$$$$%$$%$%$%$%$%$$$$$$$$$$$$$$##@@@@@@@@@@@@+@+@+@+@@#$#########@##@#@@@@@+@@@@+@@+@+@+++++++++++++.++++++++++.+.+.++..++.+++++..++.+.+.....+.+.....+.+.....+.+.....+.+...+.+....+.+.+...+.+.+...+.+.+...+..........+.+.+.+....+..+...+..........",
-"@+++++++++++++++++++++@+@+++++++@+++@+++@++@#@@+@++@+++@+@+@+@+@+@++@+@++@+@+@+@+@+@@@@@@@@@#####$@@@@+@+@+@+@#$######@#@@#@@@@@+@+@+@+@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@#@@@@#@@#@#@@#@##@###@#@@#@@#@@@#@@@#@@#@@@#@@@#@@@@#@@@@@@@@####@#@#@#@#@#@#@#@@##########################@#@#@#@#@#@#@#@##@#@#@@#@#@###@#@#@#@@#@@@#@@@#@@@#@#@@#@@#@@@#@##@@#@@@#@#@######$#$$$$$$$%$%$%$%$%$%$%%$$$$$$$$$$$#$#@@@@@@@@@@@@@@@+@+@+@@##########@@#@#@@@@@@@+@+@+@++@+@++++++++++++.+.+.++..+.+++..+++.++.+.++++.+.++.+.+.......+.......+.......+...........+............................+.+....+........+.+..+...+.....+..+..+",
-"+++++++++++++++++++++@+++++@+@+@+++@+++@+++@@@@+++@+@+++++++++@+++@++@++@@@@+@++@+@+@@@@@#@######$@@++@+@@+@@@#######@#@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@@@@@@#@@#@@@@#@#@@#@@@@#@@####@#@@@#@@#@#@#@@#@@#@@@#@@@#@@@##@@@##@#####@@@#@#@#@#@#@#@#@#@#@@@@@@@@@@@@@@@@@@@@@@@@@#@#@#@#@#@#@##@#@#@#@#@#@#@@#@#@#@#@#@#@@#@@#@@#@#@@@#@@#@#@@#@@@@@#@@#@#@##@@#####$#$#$$$$$$$%$%$%$%$%$$%$%$$$$$$$$$$#$##@@@@@@@@@@@@+@@+@+@@@##########@#@@#@@@@@@@@+@+@@+@+@+++++++++++++++++.++++.+.++.+.++.++++.+.+.+.+.....+..+.+..+..+.+..+..+.+..+..+.+.+.+..+.+.+.+.+.+.+.+.+.+.+.+.+......+.+...+.+.+..............+........",
-"+++++++++++++++++++++++@+@++++++++@++@+++@+@##@+++++++@+@+@+@++@@++@++@@++++@+@++@@+@@@@@@@#@#####@+@@@@+@@+@@$#$#####@#@@@@@@@@+@+@+@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@#@@#@#@@#@#@###@#@@@#@@@@@#@@@#@@#@@@#@@#@@@@##@#@#@@@@@###@#@#@#@#@#@#@#@#@#########################@#@#@#@#@#@#@@#@#@#@#@#@#@##@#@#@#@#@#@##@##@#@@#@@#@@#@@@@#@@@#@#@#@#@@@@@@##@@#@###$#$$#$$$$$$$%$%$%$%$%$%$%$$$$$$$$$$##$#@@@@@@@@@@@+@+@@+@+@@#########@#@#@@@@@@@+@@+@++@++@+@+++++++++.+.++++.+.+++.+++.+.++.++++.++++.+.+....+.......+.......+.......+...................................+........+.......+.+..+.+.+.+...+.+..++",
-"++++++++++++++++++++@+++++@+@+@+@+++++@+++@@@@@+@+@+@+++++@+@@++@@++@+++@+@++@+@+@+@@@@@@#@#######@@+@+@+@@@+@$##$####@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@##@#@#@#@@@#@#@#@@#@@@@@@#######@@#@@@@#@#@@@#@@@#@@#@@@@@###@#@#@@#@###@@@@#@#@#@#@#@#@#@##@@@@@@@@@@@@@@@@@@@@@@@@@#@#@#@#@#@#@##@#@#@#@##@#@#@#@@##@#@@##@#@@@#@###@#@@#@@#@#@@@#@@#@#@@#@#@#@@@@#@##@@@####$$$#$$$$$%$%$%$%$%$%$%%$$$%$$$$$$##$#@@@@@@@@@@+@+@+@+@@+@########@#@##@@@@@@@@@+@@+@+@+++++++++++++++.+++++..++.+.+++.++.+.++.+.+.+...+....+.+.+...+.+.+...+.+.+...+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+..+.+.+.+..+.+.+..............+......+..",
-"@+++++++++++++++++++++@+@+++++++++@+@+++@++@##@+++++++@+@++@++@+++@+++@++@+@+@++@+@@@@@@@@@@####$#@+@+@+@@+@@#$#$###@#@#@@@@@@@+@+@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@@#@@#@#@#@@#######@@#@#@@@@@#@@@#@@@#@@####@@@#@#@##@#@@@####@#@#@#@#@#@#@#@@#########################@#@#@#@#@#@#@@#@#@#@#@#@##@#@##@@#@##@@#@##@#@#@@#@#@##@#@@@##@#@#@@##@#@#@#@#@@@@@@#@##@####$$#$$$$$$$$%$%$%$%$%$%%$$$$$$$$$##$$#@@@@@@@@@@@+@+@+@+@@@########@@##@@@@@@@@+@+@++@@+@+@+++++++.+++.+.++++.+++..++.+++++++.+++.++..+.+..........................................................................+.+.+.+.+.+.+...+.+....+",
-"+++++++++++++++++++@+@++++@+@+@+@+++++@++@+@#@@+@+@+@++++++++@++++++++++@+++@+@+@+@+@@@@#@######$@@+@@+@@+@@@#########@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@##@#@#@#@#@#@@#@@@#@@#@@@#@@#######@@#@@@@@#@#@@@#@@#@#@##@@@@##@#@@#@#@####@@@#@#@#@#@#@##@#@##@@@@@@@@@@@@@@@@@@@@@@@@###@#@##@#@#@##@#@#@#@#@#@#@@#@#@#@@#@#@#@@##@#@#@##@#@#@###@#@##@#@#@#@#@#@#@#@#@@#@@@@#@@####$##$$$$$$$%$$%$%%$%%$$%%$$$$$$$$$####@@@@@@@@+@+@+@+@@+@@@#####@##@@#@@@@@@@+@@+@@++@++++@++++++++.++++++.++..+++.++.+.+.+++..++.+.....+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+..+.+.+.+.+.+.+.+.+.+................+........",
-"+++++++++++++++++++++++@++++++++++@+@++@+++@#@@++++++++++@+@+++@+@+@+@@++@+@++@+@+@@@@@@@@######$@@@+@@@@@@+@##$#####@#@@@@@@@@+@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@#@@#@@@#@@#@@#@#@######@@@#@#@@@@@#@#@#@#@#@@####@@@#@#@#@#@@@@###@#@#@#@#@#@@#@#@@#########################@####@#######@#########@#@##@#@#@##@#@@#@#@@#@#@#@@#@##@@#@@#@#@@#@@@@@@@@@@#@@@@#@@#@#@@#@@#@####$#$#$$$$%$%$%$%$%%$$%$$$$$$$#$$$#$##@@@@@@@@@@+@++@@+@@@########@#@#@@@@@@+@@+@@++@+++++++++++++.+.+.++.+++.+.+.++++++.+++.+..+........................................................+....................+.+.+..+.+.+.+...+.+.+.+",
-"++++++++++++++++++@+@++++@+@+@+@+++++@+++@+@##@+++++++++@+++++++@+++@++@++@+@+@+@@+@@@@@@##@####$@+@@+@+@+@@@$##$####@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@##@#@#@#@@#@@#@@@#@@#@@@#######@#@#@@#@#@##@#@#@#@@#@#@@@###@#@##@#@###@@@#@#@@#@#@#@#@#@##@@@@@@@@@@@#@#@#@#@#@#@#@##@#@##@#@#@###@#@#@#@#####@##@###@#@@##@#@##@##@#@##@#@#@#@#@#@##@#@#@#@#@#@@#@@#@@#@@@#@@@@@#@######$#$$$$$$$$%$%$$%%$%%%$$$$%$$$$$#$##@@@@@@+@@+@@+@+@+@+@#####@#@#@#@@@#@@@+@+@+@+@@+@++++++++++++.++++.+.+.+++.+.+.+++.++.++.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+...+.+.+.+..+.+.+.+.+......+........+.........",
-"@++++++++++++++++++++@+@++++++++@++@+++@+++@#@@+@+++++@+++@+@+@++++@++@+@+@++@+@++@@@@@@@@#######@@++@+@+@+@@#$######@#@@@@@@@@@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@#@@@@@#@@#@@@#@@#@@@#@@#####@#@@@#@@#@#@@#@#@#@##@#@###@@@#@#@@#@#@@@###@#@##@#@#@#@#@#@@##########@#@#@##########@####@#######@#########@#@##@##@###@####@###@#@@#@#@#@#@@#@##@##@@#@@#@#@#@#@#@##@#@#@##@#@#@#@@@@##@####$#$$$$$$%$%$%$%$%$%%%$$$$$$$$#$#$#@@@@@+@@@+@+@+@+@@@@########@##@@@@@@@+@+@@++@++@++++++++++++.++++++++..+.++++++++.++.+.................................................................+.............+.......+.+..+.+..+..+",
-"+++++++++++++++++++@++++++@+@+@+++@++++++@+@#@@++++++++++@++++++@+@++@++@+@+@+@++@@@@@@@#@@######@+@@+@@@@@+#$######@#@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@#@@@@#@#@@#@@@#@@#@#@#@@########@@#@@##@#@##@#@#@#@@#@#@@@#@#@@#@#@#@###@@@#@#@#@#@#@##@#@##@@@@@#@@#@#@#@#@@@@@@@@@@#@@@##@@@@@@@#@@@@@@@@@#@#@@#@#@#@#@@@#@#@@##@#@#@@#@#@#@#@@#@#@#@##@#@#@#@#@@@@@@#@@@@@@@#@@@@#@@@@#@#######$$$$$$%$%$%$%$%$%$%$$$$$$$#$#$##@@@@+@+@@+@@+@+++@+###@#@@#@#@#@@@@@@+@++@++@+++++++++++++++.+.+...++++.++.+.+.++.+...+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+..+.+.+.+.+...+.+.+.+.+..+...+.+.+............+.",
-"+++++++++++++++++@+++@+@+@++++++@+++@+@++++@@#@+++@++++@+++@+@+++++@+@+@+@++@++@@+@+@@@@#@####$$#+@+@@++++@@#########@@@@@@@@@+@@+@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@@#@@@@@@@#@#####@@#@@#@@@@@@@#@@@@@@#@@@@#@@#@##@#@#@#@@@###@#@#@#@#@#@@#@#@@#####@#@#@#@#@#@#########@###@@#######@#########@#@##@##@@###@#@#@##@@#@#@#@#@#@#@@##@@#@#@@#@#@#@#@@###@#@@#@#@@#@@@#@@@@@@#@@#@####$##$#$$$$$%$%$%%%$%$%%$$$$$$#$#####@@@@@+@+@+@+@@@+@+@@####@#@@#@@#@@@@@+@+@+++@++++++++++++++++++++.+.+++.+++.+.+.+.+.....................................................+......................+..+.......+.+.+..+.....",
-"++++++++++++++++++@++++++++@+@++++@++++@+++@#@@+++++++++@+++@++@+@++@++@++@+@+@++@@@@@@@@#@#####@@+@+@@@@@+@#$#####@#@@@@@@@@+@+@@@@+@@@+@@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@#@@#@@@#@#@@@@@#@#@###@@#@@@#@#@#@@#@#@#@@#@#@##@#@@#@@#@####@@@#@#@@#@#@#@#@#@##@@@@#@@#@#@#@#@#@@@@@@@@@#@@@@#@@@@@@@#@@@@@@@@@#@#@@#@@#@#@@#@##@#@#@##@#@@#@#@#@##@@##@#@#@#@#@#@#@#@#@#@##@#@#@#@#@@#@#@@#@@#@@@@##@###$#$$$$$%$%$$%%$%$%%$%$$$$$$$$####@+@@@+@+@@+@+@@+@+@@@##@##@#@@#@@@@@@++@@++@+@++++++++++.+.++.++.+.++++.++++.+.+.+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+...+.+.+.+.+.+.+..+.+.+.....+.+.+.......+..+...+",
-"@+++++++++++++++@++@+@+@+@++++@+@++++@+++++@##+@++++++@+++@++@++@++@++@+@++@+@++@+@@@@@@#@######@+@@@++@++@@$#####@#@#@@@@@+@@+@@+@@@@+@@@+@@@@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@#@@#@@@#@@@@@@@@@######@#@@@#@@@@@@#@@@@@@#@@@@@@@#@##@##@#@@@@###@#@##@#@#@#@#@#@@####@##@#@#@#@#@#########@####@#######@#########@#@##@#@#@##@#@#@#@#@#@#@#@##@##@#@#@#@#@@#@#@#@#@#@##@#@@##@@#@@#@##@#@@@#@@@#@@@#@@@#@#####$#$$$$$$%$$%$%$$%$%$$$#$$#$$####@@+@+@+@+@+@+@+@++@@##@#@@##@#@@@@@@@++@++@++++++++++++++.+++.+++.+.++++.++.+...+..................................................................+.........+.......+.+.+......+..",
-"++++++++++++++++++++++++++++@++++++@+++++++@#@@++++++@++@++@++@+++@++@++@+@++@+@@+@@@@@@@#######@@@++@@+@@+@$#$#####@@@@@@@@@+@@+@@+@@@+@@@+@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@#@@#@@@#@@#@@#@#@#######@@#@#@@#@#@#@@#@#@#@@@#@###@#@@@#@@#@####@@@#@#@#@#@#@##@#@#@@@@#@@@#@#@#@#@#@@@@@@@@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@#@@@@#@#@@##@@#@@#@#@#@#@#@@#@#@@##@#@#@#@#@#@@#@##@@#@@@#@@@@@@#@#@@@#@@@@@@#@@@@@@#######$$$$$%$%$$%$$%$%$$$$#$##$$###@@+@@+@+@++@+@+@+++@#@#@#@@@@#@@@+@@@@+@++@+@++++++++.+++...+..+.+++.+++.++.++..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+..+.+.+.+.+.+.+.+.+.+...+.+.+..+...+.+..........+.+...",
-"++++++++++++++++@+@+@+@+@+@+++@+@+@++@+++++@#@+++@+++++@++++++++@++@+@+@+@++@+@+@@@+@@@@#@#@####@++@@+@@+@@########@@@@@@@@@+@@+@@+@@+@@@+@@@@+@@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@######@@@@@#@@@@@@@@@@@@@#@#@@@@@@@#@@@#@@@@@@@@#@@@@@@@@@@@@@@@@@#@@#@@#@@@@#@#@#@#########@###@##@#@#@###@#@#@#@#######@#@#@@#@##@@##@#@#@@#@#@#@##@#@#@#@#@#@###@#@#@#@@#@##@##@@##@#@@#@@#@@#@#@#@@@@#@@#@@@###$##$$$$$$%%$%$$%$%%$$%$$$##$##$##+@+@+@+@+@+@++@+@+##@#@##@@@#@@@+@+@++@+@+++++++++++.++++.+.+.+.++.+.++.+................................................+............................+..+.....+.+.+.+.+....+.",
-"+++++++++++++++++++++++++++@++++++++@++++++@##@++++++@+++@+@+@++++++@++@++@+@+@@+@@@@@@@@@####$@+@++@++@++@##$###@@#@@@@@@+@+@+@+@@+@+@+@+@@+@@@@+@@+@@+@@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@#@#@@@@@@@@@@@@@@@@@#@#@#@@#@@@@@@@@@@#@##@#@@@@#@@#@#@@@#@@#@#@#@#@@#@#@@#@#@#@#@#@#@@#@@@#@#@#@@@@@@@@@@@@@@@@@@@@@@@#@#@#@@@#@#@#@#@@@@@@#@#@#@#@#@@##@@#@#@#@#@@#@#@@#@@#@#@@#@#@####@#@#@#@#@#@#@#@#@@#@#@@#@#@@@#@@@@@@@@@@@@@@@#@####$$$$$$$$%$$%$$%$$$$$$$#$#####@@+@+@+@+++@+@+++++#@#@#@#@@#@@@@+@+@+@++@+++++++++++.++.+.+.++.++.++.+++++.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+...+.+.+.+.+.+.+.+.+.+..+.+.+.....+.+............+....",
-"@++++++++++++++@+@+@+@+@+@++@+@+@+@+++++++@@@@++++++++++++++++++++@+++++@++++@+++@+@@@@@#@######+@+@+@@+@@+$#######@@@@@@@@+@+@@@+@+@@+@+@+@+@@+@@+@@+@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@######@@#@#@#@#@#@@@@@#@#@#@@#@@@@@@@@@@@@@@@@@#@@@@#@@@@@@@@@@@@#@@@#@@@@@@@#@#@#@@#@@#@@#@#@@#@#@@@@@@@#@@@@#@@@######@#@#@##@#@#@#@#@##@#@#@#@#@#@#@#@#@######@#@##@####@##@#@@#@#@#@#@#@@@@@#@@#@@#@@@@@@@@@@#@@@#####$#$$$$$%$$%$$%%%%$$$$#$#######@@@+@+@@+@+@@+@++@@#@#@##@#@@@@@@@+@+@+@@+++++++.++.++.+.+..++.++.++.+.+..................................................................+.........+.....+.+.+.+.+...+..+",
-"+++++++++++++++++++++++++++++++++++++++++++@#@@+++++++++++++++++++++@+@++++@+++@+@@@@@#@##@##$#@++@+@@+@@+@$####@#@@@@@@@@+@@+@++@+@@+@@+@@+@+@@+@@+@@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@#@#@#@@@@@@@@@@@@@#@#@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@#@#@#@#@##@#@#@@#@@@#@#@#@@@@@@@#@@#@@#@@@@#@@@@@#@@#@@@@@#@@@#@@@@@@@@@@#@@#@#@#@#@@#@#@###@#@#@#@#@#@##@#@#@###@##@#@###@#@##@#@#@@#@@#@@#@@#@@@#@@@#@@@@@@@@@@@@@#@#####$$$$$%$$%$$$$%$%$$$$$#######@@+@+++@++++++++++@##@@@@#@@@@+@@+@+++++@+++++++++.++.++.++.++.++.+.+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+..+.+.+.+.+.+.+.+.+.+.+...+.+.+..+...+.+................",
-"++++++++++++++@+@+@+@+@+@+@+@+@+@+@+++++@++##@+++++++@++++++++@+++++++++@+@++@@+@@+@+@@@@#@####@+@++@+@++@@######@@@@@@@@+@++@+@+@+@+@++@+@@+@+@@+@@@+@@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@#@#####@@@@#@#@#@#@@@@#@#@#@@@@@@@#@@@@@@@@@@@#@#@@#@@@@@@@@@@@@@@@#@@#@@@@@@@#@#@#@@@@@@#@@@#@@@@#@#@@#@@#@#@@@#@@#@#@#@#@#@@##@@#@@##@#@####@######@##@@##@#######@##@###@#####@##@##@#@##@#@@#@@@#@@@#@@#@@@@@@@#@@@@@@@@######$$$$%$$%$%$%$%$$$$$#$#####@@+@+@+@+@@+@+@+@++@#@##@@#@@@@@@@@@+++++@+++++++++.++.+..++.++.+.+.+...........................................+..............................+..+.....+.+............",
-"+++++++++++++++++++++++++++++++++++@++++++@@@@+++++++++++++++++++@+@+@++++++@+++@+@@@@@@#@#@###+@+@++++@++#######@@@@@@@@+@@++@+@+@+++@@+@+@+@@++@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@#@@@@@@#@@@@@#@@@@@@@##@#@@@#@@@@@@@@@#@#@@@@@@@@@@@@@@@@@@@@@@#@@@@@#@@#@#@#@#@#@#@#@@@@#@@#@#@#@@@@@@@#@#@@@#@@@#@#@@@@@#@#@@#@@#@@#@@@@@@@@@@#@@@@#@##@@##@#@#@#@#@#@##@####@##@##@###@###@##@#@@###@#@#@##@@#@##@#@@@#@@#@@@@@#@@#@@@@@@@@@@@@#####$#$$$$$%$$$%$%%$$$$#$#######@@++@+++@++++++@++@@@#@@#@@@@@@+@@@+@++++++++++++.++++.+.+.+++++.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+...+.+.+.+.+.+.+.+.+.+.+..+.+.+.....+.+................+",
-"@++++++++++++++@+@+@+@+@+@+@+@+@+@+++@+++++@#@+++++++++++++@++++++++++@+@+@+++@++@@+@@@@@#@###@+@++@@@++@@####@@#@#@@@@+@+@++@++@++@@+@+@@+@+@+@+@@++@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@#@@@@@#@@@@@@@@@#@####@@@#@#@#@#@@@@#@#@@@@#@@@@@@@@@@#@#@@@#@#@@@@@@@@@@@@@@@@@#@#@@#@@@@@@#@#@#@#@@@@#@@@#@@@@@#@#@@@@#@@##@##@#@########@##@##@#@#@#@#@#@######@#@###@##@##@###@##@##@#@#####@#######@#@#@@#@@##@@#@@##@@@@@@@@@@@@@@@@@@@@#@###$#$$$$$$%$$%$$%%%$$$$$$####@#@@+@+@++@@+@+++++@@@##@#@@@@@@@+@+@++@+@++++++++.+.++.+++.+..+.+.+................................................................+.........+.....+.+..+.+........",
-"++++++++++++++@+++++++++++++++++++++++++++@@#@+++++++++++++++@++@+@+@++++++++@++@++@@@@##@####@@++@++@+@+@$##@###@@@@@+@@+@+@+@+@+@++@+@@+@+@+@@+@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@@@#@#@#@@#####@#@#@@@@@@@@#@#@#@@@@@@@@@@@@@#@#@@@@@#@@@@@#@#@#@#@#@#@#@#@@@#@@@#@#@#@@@@@@@@#@#@@@#@#@@#@@@@#@@#@@#@@@@@#@#@@@@@@@@#@@#@#@#@#########@##@##@##@##@###@###@##@##@####@#@##@#@#@#@###@##@#@#@#@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@#@###$$$$$$%$$%$$$$%$$$##$###@##@+@++@++@++++@+++@@@#@@#@@@@@@@@+@@++++++++++++.++.++.++.++.++.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+..+.+.+.+.+.+.+.+.+.+.+.+.+.+...+.+.+..+...+.+....+...........",
-"+++++++++++++@++@+@+@+@+@+@+@+@+@+@+++++++@@#@+++++++++++@+++++@+++++++@+@+@+++@@@+@+#@#@####$@+@+@+@++@+@#####@@@@@@@@++@+@+++@+@+@@+@+@+@@+@+@+@+@+@@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@#@#@@#@@#@@#@@@@@@@#######@@@@#@#@#@#@@@@@@@@@@@@@#@#@#@@@@#@#@@@#@#@@@@@#@@@@@@@@@@@#@@@#@@@@@@@@#@#@#@@#@#@#@@@@#@@#@#@@#@@#@@@###@#@##@##@##@#@#@@#@#@#@#@##@###@##@##@#@###@###@###@#####@#@####@##@#####@@##@##@#@##@@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@#@####$$$$%$$%$%$%$%$$$$#$###@##@+@+@++@+@++++++++@##@@#@@@@@@@@+@@+@++++++++++.++.++++.++..+.+..................................+....................................+..+.....+....+.+.......",
-"+++++++++++++++++++++++++++++++++++++++@+++#@@+++++++++++++++++++@+@++++++++@+@++@+@@@@@#@####+@++@++@+@+#####@#@#@@+@+@@+@++@++@+@+@@+@+@+@+@@+@+@+@+@@@@+@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@#####@#@#@#@@@@@@@#@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@#@#@@@#@#@@#@#@#@@@@@@@#@@@@@@#@#@@#@@@@@#@#@@@#@@@@@@#@@@@@#@@#@#@#@##@#@#@#@@##@@##@##@#@##@@#@@##@###@#@##@##@#@@#@#@#@@#@#@#@#@@#@#@@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@#@####$#$$$$$$$$$$%%$$$$########@++@++@++@+@+++++@@@#@@@@@@@@+@+@++++++++++++++.+.+.++.++++....+.+.+..............+.+.+.+..+.+...+.+.+.+.+.+.+.+.+.+.+.+.+.+..+.+.+.....+..................+",
-"@++++++++++++@+@+@+@+@+@++@+@+@+@+@+++++++@@#@++++++++++++++++++++++++++@+@++++@+@+@@@@@@@###@@++@+@@+@+@####@##@@@+@@@@+@+@+@+@+@+@+@@+@@+@+@+@@+@@+@@+@+@@@@+@@+@+@+@+@+@+@+@+@@@@@@@@@@@@@@@@@@@@@@#@@@@@#@#@@@@@@@@@@@#@#@@#@##@#@@@@#@#@#@@@@@@@@@@@@@#@@@@@@@@@@@@@@#@@@@@#@@@#@#@#@@@@@#@#@@#@@@@@@@#@#@#@@@#@#@#@@@@@@@#@#@@@@#@#@@#@@#@@@@##@@#@#@@#@#@@##@#@@##@@##@##@####@######@#@#@#####@#########@#@#@#@@#@#@#@##@##@@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@####$$$%$%$%$$$$%$$$$#####@##@@+@++@+++@+@++++@@@#@@@@@@@@@+@+@+++++++++.+++.+++++.+..+++.......+...................+..................................+.........+...+.................",
-"++++++++++++@++++++++++++@+++++++++++@++++@@@@++++++++++++++++++++++++++++++@++@+@+@@@@######@++@++@++++@#####@@@@@@@+@++@++++@+@+@+@+@+@+@+@+@+@+@+@@+@@@@+@@@+@@@@+@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@#@#@@@#######@@#@#@@@@@@#@#@@@@@@#@#@@@@@@@@@@@@@@@@@@@@#@@@#@@@@@@@#@#@@@#@@@#@@#@#@#@#@#@#@@@@@@@#@#@#@@@@@#@@@@@#@@#@@#@#@@@#@#@##@#@##@@#@##@@##@@#@####@####@##@#@##@#@#@###@@#@#@#@###@#@##@@#@##@@#@#@#@@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@####$$$$$$$$%$$%$$$$$#####@#@@++@++@++++++++++@@@#@@@@@@@@+@@+@+++++++++.+++.+.++.++.+..+..+.+............+.+.+.+...+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+...+.+.+..+...+..................",
-"++++++++++++++@+@+@+@++++++@+@+@+@++++++++@@#++++++++++++++++++++++++++@+@++++++@+@@@@@@#@@##@+@++@+@+@@@####@#@@@@@@@@@@+@+@++@+@@@+@+@+@@+@@+@+@+@@@@+@+@@@+@@@+@+@@+@@@+@@@+@@@@@@@@@@@@@@@@#@@@@@@@@#@#@@#@#@@@@@#@@@@@#@#######@#@@@@#@#@#@@@@@#@#@@@@@#@#@#@@@@@@@@@#@#@@@@#@@@#@#@#@@@@@#@@@#@@@#@@@@@@@@@@@@#@#@#@@@@@@@#@#@@@#@#@@@@@#@@@@#@#@#@#@@##@#@#@#@@#@#@#@#@##@#@##@#@##@####@####@#@#######@##@##@#@#@#@#@#@#@#@#@@#@@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@####$$$$%$$$$$%$%$$$$#$######@+@++@+@+@+++++++@@@#@@@@@@@++@+@++++++++++.+++++++.++.+...+....+.........+............+......................................+..+...+...............+",
-"++++++++++++@++++++++@++@+++++++++++++++++@@#@+++++++++++++++++++++++++++++@+@+@+@+@@@#@@####++++@++@+@+#####@@@@@@@@+@+@++@+@@@+@+@@+@@+@+@+@+@@+@@+@+@@@+@@@@+@@@@@+@@@+@@@+@@@@@@@@@@@@@@@@@@@@#@@@@@@@@#@@@@@@@#@@#@#@@@@######@@@#@#@@@@@@#@#@@@@@#@#@@@@@@@#@@@@@#@@@@@#@#@@#@#@@@@@#@#@@@@#@@@#@@#@#@@#@@#@@@@@@@@#@#@#@@@@@#@@@@@#@#@@@#@#@@#@#@#@##@@#@#@#@#@#@##@#@#@#####@###@###@#@#@#@####@#@@@@@#@#@@@##@#@##@#@##@#@@@#@@#@@@#@@@##@#@@#@@#@@#@@@@@@@@@@@@@@@@@@####$$$$$$%$$$$$%$$$$###@#@##+@++@++++++++++++@@@#@@@@@@@+@+@@++++++++++++++.++.+.+.+...+...+..........+.+.+.+.+....+.+.+.+.+.+.+.+.+.+.+.+.+.+.+..+.+.+.....+...+...............",
-"@++++++++++++++@+@+@+++++@+@+@+@+@++++++++@#@++++++++++++++++++++++@++@+@+++++@++@@@@@@#@####+@+@++@+@++###@###@@@@@+@@@+@@++@++@+@+@+@+@+@@+@+@+@@+@@@@+@@+@+@@@+@+@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@#@#@#@@@#@#@#@@#@@@@#@#@########@@@@#@#@#@@@@@#@#@@@@@#@#@#@@@#@#@@#@#@#@@@#@#@@#@#@@@@@#@#@@@#@@@@@@@#@@#@@#@#@#@#@@@@#@@#@#@@#@#@#@@@###@#@##@@#@##@@##@#@#@#@#@##@#@##@#@#@###@###@##@#####@#@##@#######@#@#@#@#@#@#@#@#@#@#@@@#@@@#@@@#@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@##$$$$$$$%$$$$%$$$$####@##@++@+@+@+@+++++++@@#@@@@@@@@+@++@++++++.+++++++++++.+......+...+.................+.+..............................+.........+...+...+.............",
-"++++++++++@++@+++++++++@+++++++++++++++@++@@@@++++++++++++++++++++++++++++@+@++@@+@@@@@#@###@++++@++@++@#####@@@@@@@@@++@+++@+@@@@+@@+@+@+@+@+@+@@@@+@+@@+@@+@@@+@@@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@#@@#@#@#@@#######@#@##@@@@@@@#@#@@@@@#@#@@@@@#@#@@@@@#@@@@@@#@@@#@@@@@#@##@@@@@#@#@#@#@#@@#@@@@#@@@@@@#@#@@#@#@#@@#@@#@###@@#@##@@#@#@#@#@#@#@@######@####@##@###@###@@##@##@#@#@##@@##@@#@@##@#@#@#@#@##@#@@#@#@@#@@#@#@@#@@@##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#####$$$%$$$%$%$$%$$$#####@##@++++++++++++++++@@#@@@@@@@+@+@+++++++++++++.+.+.++.+.+.+..............+.+.+.+.....+.+.+.+.+.+.+..+.+.+.+.+.+.+.....+.+......+...+.............+",
-"+++++++++++++++@+@+@++@++@+@+@+@+@++++++++@#@++++++++++++++++++++@+@+@+++++++@++@@@@@#@#@###@+@@++@+++@@####@@@@@@@@++@@+@+@+@+++@@+@@+@+@+@+@@@+@+@@+@@+@@+@@+@@@+@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@#@#@#@#@#@@#@#@@@@#@@@@@@#######@@@@#@###@#@#@@@@#@#@@@@@#@#@@@#@#@#@@#@#@#@@@#@@@##@#@@@@@#@#@@@#@#@@@@@@@@#@#@@#@#@#@@@@#@@@@@@#@@#@#@@@##@#@@##@@#@@#@#@#@#@##@##@#@#@###@##@###@####@#@###@##@###@@#####@##@#@#@#@@#@#@#@#@@#@@#@#@@#@#@@#@@@#@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@####$$$$$$$$$$$$%$%$##@##@#@@+@+@+@++++++++++@@#@@@@@@+@+@+@+++++++++++++++.+.+.....+..+......+.+..........................+.................+....+.+........+.+..........",
-"++++++++++@+@++++++++++++++++++++++@+++++@@##++++++++++++++++++++++++++++@+@++@+@+@@@@#@#@##++++++@@@+@#######@@@@@+@@+@++@@+@@@+@+@++@+@+@+@+@+@@+@@@+@@@+@@+@@+@@@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@#@#@#@@#########@##@@#@@@@#@#@@@@#@#@@@@@#@#@@@@@#@@#@@@#@@#@#@@@@@##@#@@#@#@@#@@#@#@#@#@@#@@@@@@@@#@#@@#@#@##@@#@#@#@#@#@##@@@#@##@##@##@@#@###@###@###@##@##@####@##@#@#@#@##@#####@#@##@###@##@##@@#@@#@##@#@@@##@@#@@#@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@##$$$%$%$%$$$$$$$$#######@@++++@++++++++++@@@@@@@@@@+@++@+++++++++++++++.+.++.+..+...+..............+..+..+..+.+....+.......+...+.+.+.+..........+..+.+.....+........+",
-"@+++++++++++++@++@++++++@+++@+++@++++@++++@#@+++++++++++++++++++@+++@++@++++++@+@@@@@@@#@##@@+@+@++++@+####@@@#@@@@@+@@+@+@+@++@+@@+@+@@++@+@@+@@+@@+@@@+@@+@@@+@@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@#@##@#@@@#@@@@#@######$#@#@#@@##@#@#@@@#@#@#@@@@#@#@@@@@#@#@@#@@@#@@##@#@##@@#@@#@@#@#@##@##@@@@@@@#@#@#@#@##@@#@#@@#@#@@#@@@#@#@#@@#@@####@#@##@#@#####@#@#########@##@##@#@##@####@####@#@#@@###@#@#@@##@##@#@###@##@@#@#@#@@#@@#@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@##$$$$$$$%$%$%$%$$$###@####@@++++@+++++++++@@#@@@@@@+@@++@+++++@++++++++.+.+.........+.........+....+.....+......+..+.+.+...................+.........+.....+........",
-"+++++++@+++@+@+++++++@++++@+++@++++++++++@@@@++++++++++++++++++++++++++++@+@+@+@+@@@@##@###@@+++@+++@+@#######@@@@@+@@+@+@++@+@++@+@+@+@+@@+@+@@+@@+@@+@@+@@@+@+@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@#@@@@@#@@@@#@#@@#@#@#@#######@#@#@#@@#@#@@@#@#@#@@#@#@@@@#@#@@@@@#@@###@##@@#@@@@#@@#@@@#@#@#@@@@@####@#@@@@#@@@#@@#@#@#@#@@@@@#@#@#@@#@##@##@@@#@#@##@##@#@##@##@####@############@##@#@###@###@@###@##@####@@##@##@#@#@#@#@#@##@@##@#@#@@#@@@#@@@#@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@###$$$$$$$$$$$$%$$$###@@#@@+@++++++++++++++@@@@@@@@@+@@+++++++++++++++++...++.+.+.......+...+..............+..+.........................+....+..+.....+............",
-"+++++++++@++++++@++@+++++++++++++++++++++@@#@++++++++++++++++++++++++@++++++@+@+@@@@@@#@###++@+@++@@++#####@@@@@@@@+@+@@+@+@+@+@@+++@+@++@+@+@+@@+@@@+@+@@+@+@@+@@+@@@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@###@@@#@#@#@#@#@####$@#@#@#@##@#@###@#@#@##@@@#@#@@@@#@#@#@@#@@@#@@@#@##@#@#@@#@#@#@@@@##@#@@@@#@#@#@@#@#@@#@@@#@#@#@##@@#@#@##@#@@#@@####@###@##@###@###@#@######@####@###@#######@###@####@@#@##@#@###@##@#@#@##@##@#@#@#@#@@#@@##@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@###$$$%$$%$%$$$$$$$#######@+@++++++++++++++@@@@@@@@+@+@+++@++++++++++.+.+..+............+.....+.....+.+.................+.+....+................+...............+",
-"++++++@+++++++@++++++++@+@+++@++++@++++++@@@@+++++++++++++++++++++++++++++@++@+@+@@@@#@####+++++@+++@+####@##@@@@@+@@@++@++@+@+++@@++@+@+@+@+@@+@+++@@@++@@+@@+@@+@@@+@@@@@@@+@@@@@@@@@@@@@@@@@@@@#@#@@@@@#@#@@@@#@#@#@#@#@####$####@#@##@@#@#@@#@#@#@@###@@@@#@#@@#@#@#@#@@@@##@#@@@@#@@#@#@@#@###@@@#@#@@#@@##@#@@#@#@@#@#@@@@#@@#@@#@#@@@#@#@##@@@@####@##@##@###@##@#####@################@##@###@#@#########@@#@##@#@#@#@#@#@##@#@@#@#@@#@@@@@#@@@#@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###$$$$$$$$$%$%$$$####@###@++@+++++++++++++@@@@@@@@+@+@+++@+@+++++++.+.+..+.+..+........+.....+.............+............+...........................+.........",
-"@+++++++@+++++++++@+@++++++++++@+++++++++@#@@+++++++++++++++++++@+++@++++++++@+@@@@@@@@###@@+@+@++@@+@#####@@#@@@@@+@+@++@++@++@@+@@+@+@+@+@+@+@+@@@@++@@++@@+@+@@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@#@@#@#@#@#@#@#@#######@#@#@@##@@#@#@#@#@##@@@#####@#@#@#@@#@@####@@#@##@#@#@@#@##@@#@@###@#@#@@@#@@@@#@@#@@#@@@#@#@@#@@@#@#@###@#@#@@####@#@##@##@##@@##@##@#@@#######@#####@##@##@###@####@#@##@##@#####@#####@@#@@#@@#@##@##@#@##@#@@#@#@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###$$$$$%$$$$$$$%$#####@##@++++++++++++++++@@@@@@@@+@+@++@+++++++++.+.+.+..+..+....................+........+...+..+......+.+......+.+..+.......+...+..+...+.",
-"+++++++++++++++++++++++@++@+@+@++++++@+++@@#@+++++++++++++++++++++++++++++@+@+@+@@@@######@+++@++@+++#####@#@@@@@@@@+@@+@++@++@++@++@+@+@+@+@+@@+@+++@@@+@@++@@@+@@@+@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@##@#@#@#@#@#@###$###@#@#@##@@##@#@#@#@#@@###@@@@#@#@#@##@##@#@@@##@#@@#@#@##@#@@@#@##@@@#@@@#@#@#@#@@#@@#@@@#@@@@#@@@##@#@#@@@@##@##@@@###@##@##@###@##@#####@###@@#@#@##@#####@###@##@#####@##@###@@####@#@####@#@##@@#@#@@#@#@@@#@@#@@#@#@@@@@@#@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@##$$$$$$$%$%$$$$$$###@#@@@+++++++++++++++@@@@@@@@+@++++@+@+++++++.+.+..+.+.....+..................................+.......................................",
-"++++++++@++@++++@+++++@++++++++++++++++++@#@@++++++++++++++++++++++++++++@++@+@@+@@@@@####+@+@++@+@+@#####@#@@@@@@@+@+@++@++@+@+@++@@+@@+@@+@@+@+@@@+@+@@+@@@+@@@@+@@@+@+@@@@@@@@@@@@@@@@@@@@@@@#@#@@@#@#@@@@##@@#@#@#@#@#@##$######@#@#@@##@@#@#@#@#@##@#@####@##@#@#@#@@#@###@@#@##@#@#@@#@###@#@@###@##@##@@@#@@#@#@@@#@#@#@#@#@#@@#@######@###@####@###@##@##@###@##@#@###@#####@##@##@#@###@##@##@#@####@##@####@#####@####@#@#@#@##@#@#@#@#@#@@@#@@@#@##@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@###$$$$$$$$$%$$$$$###@#@##++++++++++++++++@@@@@@@+@@@++@++@++++++.+.+..+..+.......................+.+.......................+.+.........+...........+....",
-"+++++++++++++@++++++@+++++++++++++++++@+@@#@+++++++++++++++++++++++@++@++++@+@+@@@@@@#####++++@+@++@+####@#@@@@@@+@@@++@++@++@+@++@++@+@+@+@+@+@+++@+@+@+@+@+@@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@##@##@#@#@#@#@#@####$###@##@##@@###@#@#@#@#@#@#@@@@#@@#@#@#@@##@#@@##@#@@#@@#@#@#@@@#@##@@@#@@@@@@#@@@#@@@@##@#@@#@#@#@#@#@##@#@#@##@#####@###@###@##@###@##@####@###@#@###@######@###@##@####@#@###@##@###@#@@###@#@###@###@@##@#@@##@#@##@@#@#@@@@#@@@@@@#@#@@#@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@##$$$$$$$$$$$%$$$###@#@#@@+++++++++++++++@@@@@@+++@++@++@++++++.+.++..+.+..........+..................+...+...................................+......+",
-"@+++++++++++++++++++++++++++++@++++++++++@#@@++++++++++++++++++++++++++++@++++@@@@@#@####@@+@++@++@+@#####@#@#@@+@@@+@+@+@+@++@++@++@@+@+@+@@+@+@@+@+@@+@+@@@+@@@+@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@@#@@#@#@#@#@#@####$#$#@#@#@#@##@@#@#@#@#@#@##@####@##@#@#@#@#@####@@#@#@###@#@#@###@#@@###@###@#@@###@####@@#@##@#@#@#@#@#@######@##@##@###@###@##@###@##@###@@###@#####@###@@#@###@##@##@#@#####@##@##@#@#####@##@##@####@###@#@##@@#@#@#@@#@@@#@@#@#@@#@@@@@@@@@@@@#@@@@@@@@@@+@@@@@@@@@@@@@@@##$$$$$$$$$$$$$$$###@##@@+++++++++++.+++@@@@@@@@@@@++@++++++.+++..+.....+...........................................................................",
-"+++++++++++++++@+++++++++++++++++++++@+++##@++++++++++++++++++++++++++++@++@@+@+@@@@@####@++@+@++@++#####@#@@@@@@+@+@+@+@++@+@++@+@@+@+@+@+@+@+@@+@@@+@+@@@+@@@@+@@@+@+@@@+@@@@@@@@@@@@@@@@@@@@@@#@#@@#@@##@##@##@#@#@#@###@#$##$##@@#@#@#@###@#@#@#@#@#@@#@@@@#@@#@#@#@####@###@#@#@#@#@##@#@@##@##@@#@@#@#@##@@@#@@@###@#@#@#@#@#@####@#@#@##@##@##@###@##@##@###@##@#####@##@##@##@####@###@##@#@#####@#@##@##@#####@#@##@##@#@#@@#@#@@@@#@@##@@#@@##@@#@@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@+@@@@@@###$$$$$$$$$$$$$$##@#@#@#@+++++++++++++++@@@@@+@@@@@++@@+++++..++..++.+..+.........................................................................",
-"+++++++++++++++++++@++++++++++++++++@+++@#@@++++++++++++++++++++++++++++++@++@+@@@@##@###++@+@++@+@+#####@#@#@@@@@@+@++++@++@++@++@+@+@+@+@+@@+@+@+@+@@@+@@@+@+@@@+@@@@+@+@@+@@@@@@@@@@@@@@@@@@@@@@@@#@##@@#@@#@@#@###@##@#####$#####@##@##@@@#@#####@##@#@##############@#@##@##@#@#@#@#@@#@##@@#@@###@#@#@#@@#@#@###@@@#@#@#@#@#@#@@#@######@##@##@##@#########@###@##@##@##@##@##@##@####@###@####@#@@###@###@##@#@#####@##@###@#@#@#@###@#@#@#@@@#@@@#@@#@@@#@@#@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@+@@@@@+@@@@@@@##$$$$$$%$$$$$$$$###@#@@@++++++++++.++++@@@@@@@@+@@++@+++++++.++..+.+...+...................+...+..............................................+",
-"++++++++++++++++++++++++++++++++++++++@+@@#@++++++++++++++++++++++++++++@++@+@@@@@@@#@##@@+@++@++@+@####@#@@@@@@@+@+@@+@++@++@+@@+@@+@@+@@+@+@+@+@@+@@+@@@+@@@@@+@@@@+@@@@@+@@+@@@@@@@@@@@@@@@@@#@#@#@#@##@##@##@##@##@@#####$$#$#####@##@###@##@@@@##@##@#@##@#@#@##@###@##@##@#@#@#@##@#@##@#######@##@@#@#@#@#@#@@###@#@#@#@#@#@#####@#@#@##@##@##@###@#########################@##@##@#@#@###@#@##@###@###@###@###@##@###@##@#@##@#@#@#@@#@#@@@#@@@#@@@#@@#@@#@@#@@@#@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#$$$$$$$$$$$$%$$###@#@#@+++++++++++.++++@@@@@@@+@@+@+++.+.++.++..+.+...+..........................+.......+...................................",
-"@+++++++++++++++++++++++++++++++++++@+++@#@@++++++++++++++++++++++++++++++@+@+@@@@#@@###@+@+@++@++@@##@##@#@@@@+@@+@++@+@+@+@+@++@+@+@+@+@+@@+@+@+@@@+@@@+@@@+@+@@@+@@@+@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@@#@@#@##@###@######$$####@##@#@###@####@###@####@#######@##@########@###@#@@##@#@#@#@@##@#@@##@#@#@##@#@#@@#@@#@#@######@#@######@##@##@###@#################################@#####@####@###@##@@###@###@###@###@###@###@##@###@#@#@#@#@##@@@#@@@#@@@#@#@@@#@#@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@@@@#$$$$$$$$$$$$$$$##@##@##++++++++++++++++@@@@@@+@@+@++++++++..++.+..+...+...........................................................+..+.+...",
-"+++++++++++++++++++++++++++++++++++@++++@##++++++++++++++++++++++++++++@+@+@+@+@@@@@####@++@++@++@+#####@#@@@@@@+@@+@++@+@+@+@+@@+@+@+@@+@+@+@@+@@+@@@+@+@+@+@@@+@+@@@+@@@+@@@@@@@@@@@@@@@@@@@#@#@#@#@#@###@##@####@##@######$$$#######@###@#@##@#@#@#@##########@#@#@#@##@#@##@##@###@#####@##@###@@#@##@@#@#@#@##@#@######@###@#@##@##@#@#@##@##@###@##########################################@#@##@##@####@##@#@##@##@#@##@###@##@###@@#@@#@@#@@#@@#@@##@@#@#@@@#@#@@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@+@@@@@+@@@@@@@@@$$$$$$$$$$$%$$$$@#@#@@@+++++++.+.+++++@@@@@@+@+@++++.+.++++.+..+...+.........................+.+...............................+.........",
-"++++++++++++++++++++++++++++++++@++++@++@#@++++++++++++++++++++++++++@+++++@+@@@@@##@###++@++++@++@####@#@#@@@@+@++@+@++@++@+@+@+@+@@@+@+@+@+@+@+@@+@@@+@@@+@++@@@@+@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@#@@#@###@#@##@##@#@#$$######@#@##@@##@#@#######@#@###################@@#@#@#@#@#@@#@####@@@##@#@@##@#@#@#@##@#@#@@#@##@@##@###@#@#####@##@##@##@########################################@####@#####@###@###@###@####@#@##@#@###@@####@##@##@@#@#@@@@#@@@@#@#@@@#@#@@#@@@#@@@@@@@@@@@@@@@@@@@@@+@@+@@@@+@@@@@@@@@#$$$$$$$$$$$$$$$##@##@@++++++++++.++++@@@@@@@@+@+++++++.+.++.++.++..+.+................................................................+",
-"+++++++++++++++++++++++@+++++++++++@++@+##@@+++++++++++++++++++++++++++@+@++@+@@@@@####@++++@+++@+@###@#@@@#@@+@@+@+++@++@++@+@+@@+@++@+@+@+@@@@@@@@++@@@+@@@@@@@+@@@@@+@@@@+@@@@@@@@@@@@@@@@@#@#@##@#@#@#@##@#####@###@#####$$$##@###@@###@####@#@@#@################@########@#@#@#@###@##@#@@###@#@##@@##@#@#@#@##@#@####@###@##@#@##@#@@###@##@##@########################################@##@#@##@#@###@#@###@##@###@#@###@#####@#@##@@###@##@@##@@@##@@@##@@@@#@#@@@#@@@#@@@#@@@@@@@@@@@@@@@@@@@@@+@@+@+@@+@+@@@@@@@#$$$$$$$$$$$$$$##@@#@#@++++++++++.+.++@@@@@@@@@+@+++++++.++.+...+....+.............+.....................+..+.................+.......",
-"@++++++++++++++++++@++++++++@+++++++@+++##@+@+++++++++++++++++++++++++++@+@+@@@@@@#@@##+@+@+++@++@###@#@##@@@@@@+@+@@+@+@+@@++@+@+@+@@+@@@+@@+@@+@+@@@+@+@+@+@@+@@@+@+@@@@@@@@+@@@@@@@@@@@@@@@@@@#@@@#@@#@#@###@#@###@#######$##$##@#@#@#@@##@#@#@#@##@######################@@####@#@#@#@#@##@##@@#@#@###@@#@####@#@@###@####@##@#@#@##@##@#@############################################@##@######@####@#@####@###@#@@@#@#@@@####@#@##@@##@#@##@##@#@##@#@@#@@#@##@@@#@#@@@#@@@#@@@#@@@@@@@@@@@@@@@@@@@@+@@@@+@@@@+@@@@@@@#$$$$$$$$$$$$$$##@@#@#@++++++.++++++++@@@@@@++++++++.++.++.+++..+....+.........+...+.+.....+...................+..+..........+..+..+",
-"+++++++++++++++++++++++++++++++++@+++++@@#@+++++++++++++++++++++++++++@+++@+@+@@@#@####@+++++@++@+#####@#@@@@@@@@+@++@+@+@++@@@+@+@@+@+@+@+@+@@+@+@@+@@+@@@@@@+@@@+@@@@+@+@@+@@@@@@@@@@@@@@@#@#@#@@##@@#@#@###@#####@#######$#$$#@###@#@#@##@###################################@@#@######@##@#@@##@#@##@@##@##@#@@#@###@###@###@####@##@##############################################################@##@##@####@#@######@###@#@@####@##@@@#@#@##@#@#@#@@#@@@#@@@@@#@@#@@#@@#@#@@#@@#@@@@@@@@@@@@@@@@@@@@+@+@@@@@+@@+@@@@@@##$$$$$$$$$$$$$$##@#@@@@++++++.+.+++++@@@@@@+@++++++++++.++..++..+.........+....................+...................+...+.+...+....",
-"++++++++++++++++++++@++++++++@+@+++@+@+@##@++++++++++++++++++++++++++@++@+@+@@@@@@#@##@++@+@+++@+@###@#@@@#@@@+@+@+@++@+@+@+@+@+@+@+@+@+@+@+@+@@+@++@+@+@+@+@@@+@+@@+@@@+@@+@@@@@@@@@@@@@@@@@@@@@#@#@@#@#@##@##@#@#########$#$#####@#######@#################################@#@##@##@#@@@#@@##@#@#@##@@##@@#@@#@##@##@####@#####@#@########################################################################@######@##@###@##@##@##@#@###@#@#@#@#@###@#@#@##@#@@@#@#@#@#@@#@#@@@@#@#@@@#@@#@@@@@@@@@@@@@@@@@@@+@+@@@@+@+@@@@@+@##$$$$$$%$$$$$$##@#@#@@+++++++++++++++@@@@@++@++++++++++.++..+...+.+.+.................+...+.+....+.+....+...........+........+.+",
-"@++++++++++++++++++++++++++@+++++@+++++@#@@+@++++++++++++++++++++++++++++++@+@@@@#@###@+++++@+@++#####@##@@@@@+@++@+@++@+++@+@+@+@+@@@+@@+@@@@+@+@@@@+@+@+@@@+@@@@@+@@+@@@+@@@@@@@@@@@@@@@@@@#@#@#@@#@#@##@##@##############$#$###@#####@#####################################@#@##@@#@##@##@#@##@@#@#@#@###@#@##@##@##########@#####################################################################################@##@###@#@#@#@#@#@@@#@#@##@##@@@#@#@#@#@#@#@#@@@#@@@#@@@#@#@@@@#@#@@#@@@@@@@@@@@@@@@@@@+@@@@+@@+@@@+@++@@@+@##$$$$$$$$$$$$$##@@@#@@+++++.+++++++++@@@@@+++++++++.+++.++.++......+...+....+..+.............+..........+.+..+........+..+....",
-"+++++++++++++++++++++++@+++++++@++++@++@#@@++++++++++++++++++++++++++++++@+@+@@@@@####++@+@+++++@####@#@@@@@@@@@+@+@+@++@@+@@+@@+@@++@+@+@+@+@+@+@+@+@+@+@@+@@+@@+@@@@@@+@@+@@@@@@@@@@@@@@@@@@@@#@@#@#@#@##################$#$#$##################################################@#####@#@#@#@#@########@@#####@############@##@##############################################################################################@####@####@@#@#@#@@##@#@#@@##@#@##@#@#@#@#@@#@@@@@#@#@@@#@@@##@#@#@@#@@@@@@@@@@@@@@+@@@+@@+@@@@@@@@@##$$$$$$$$$$$$$##@@#@@+++++++++++++++@@++@+@++++++++++++.++..+.+....+...............+.............+........................+.",
-"@+++++++@+++++++++++++++++++++++++++++@@##+++++++++++++++++++++++++++++@@+@+@@@@@#@##@+++++++@+@@####@#@@@@@@@@+@+++@+@+@+@@+@+@+@+@@+@+@@+@+@@+@+@@+@@+@@@@+@@@+@@@@+@@@+@@@@@@@@@@@@@@@@@@#@##@@##@#@##@##################$##################################################@####@#@@#@##@#@##@#@#@########################@#################################################################################################@#@###@@#@####@###@@#@#@##@##@#@#@##@@#@@#@#@#@@#@@@#@#@@@#@@@@@@@@@@@@@@@@@@@@@+@@+@@@@+@@++@+@+@@@@#$$$$$$$$$$%$$###@@#@@+++.+++++++++++@@+@+@++++++++.+.++..+.+...+.......+...+...+.....+........+....+..+...................",
-"+++++++++++++++++++++++++++++@+++++++++##@+@+++++++++++++++++++++++++++++@+@@@@@@####@+@+@+@++@+####@#@@#@@@@@+++@+@+++@+@++@@+@+@+@+@@+@+@+@+@+@@+@+@+@@+@@@@+@@@+@@@@+@@@@@@@@@@@@@@@@@@#@@@@@##@@#@##@##################$#$#$###################################################@##@#@##@###@########################################################################################################################################@##@#@##@##@#@@#@@@#@#@##@#@#@#@#@#@@@@#@@#@@#@@#@@#@#@@#@@@@@@@@@@@@@@@@@@@@+@@@@+@@+@@@+@@@@@#$$$$$$$$$$$$$##@@#@@@.++++++++++++++@@@+@+++++++++++.+++...+...+.+..+......+.........+...+.............+...+.+.+.......+",
-"+++++++++++++++++++++++++++++++++++@+@@##@++@+++++++++++++++++++++++++@@+@+@@@@@#@###+++++++@++@####@@#@@#@@@@+@++@++@+@@+@@+@+@+@+@+@+@+@@+@@+@+@@+@+@+@@@+@@@@+@@@@@+@@@@@@@@@@@@@@@@@@@@#@#@@@@##@#@####################$$#$#####################################################@####@##@#@#######################################################################################################################################@###@####@##@#@##@#@#@#@#@###@@#@##@#@#@#@@#@#@@@#@#@@@@@@@@#@@#@@#@@@@@@@@@+@@@+@+@@+@@++@+@+@@@@##$$$$$$$$$$$$$#@@@#@@+++++++++++++.++@@@@+@+++++++++.+.++..+.....+....+...............+....+....................+......",
-"@+@+++@+++++++++++++++++++++++@+++++++@@#@@++++++++++++++++++++++++@++++@+@+@@@@@###@+@+@+@+++@@##@##@@#@@@@@+@+@++@+@+@+@+@+@+@+@+@+@+@@+@+@+@@@++@@+@@@+@@+@+@@+@@@@@+@@@@@@@@@@@@@@@@@#@@@@####@#@##@#@###################$#########################################################@############@##@#@#################################################################################################################################@#@##@####@##@#@##@#@#@@###@#@#@#@#@#@@@@@#@@@@@#@@#@@@@@@@@@@@@@@@@@@@@@@+@@@+@@@+@@+@+@+@@+@@##$$$$$$$$$$$$$##@@#@+++++++++++++.++@+@@++@+++++++++++.++.+.+...........+......+..........+.....+...............+...+",
-"++++++++@+++++++++++++++++++@+++++++@+@##+++@++++++++++++++++++++++++@+@++@@@@@#####@+++++++@@+#####@@#@@@@@+@+@+@++@+@+@+@@+@+@+@+@+@+@+@+@+@@+@+@@+@@+@@+@@@@+@@@@@+@@@@@@@@@@@@@@@@@@#@@@#@#@@@#@@#####@################$$$#######################################################################@###############################################$#############################################################################@##########@###@###@####@@#@#@##@@##@##@##@@@#@@#@@#@@#@@#@@@#@@@@@@@@@@@@@@@@@@@@@@+@@@@+@+@@@+@@+@@+@@@##$$$$$$$$$$$$#@@@#@@@++++++++++.+.+@+@+@+++++++++.+.++.+.+.+.+.+.+..............+..........+.+..........+.+........",
-"+++++++++++++++++++++++@+++++++@++@++@@#@+++++++++++++++++++++++++++++@+@@+@@@@#@###+++@+@++++@####@##@@@@@@@+++@++@+@+@@+@+@+@+@+@+@+@+@@+@@+@@@@++@@+@@+@@+@+@@@@@@@@@@@@@@@@@@@@@@@#@@@#@#@#@##@##@#@####@#############$##$###############################################################@@#@@#@###@##############################################$#$$########$############$###$####$############$########################@@#@####@#############@###@######@##@#@#@##@#@#@#@#@#@#@@@#@@#@@#@@@#@@@@@@@@@@@@@@@@@@@@@@+@+@@@@+@+@+@+@@@+@@###$$$$$$$$$$$$#@@@@@@++++++++.+.+.++@@+@@+@++++++++..+...............................................+............",
-"++++++++++++++++++++++++++@++++++++@+@##@+@+++++++++++++++++++++++++@++++@@@@@#@###@+++++++@+@@##@#@@@#@@@@+@@@++@+++@+@+@+++@@+@@+@@+@@+@+@+@+++@@@+@@@+@@+@@@@@@@@+@@@@@@@@@@@@@@@@@@#@@@@#@#@@#@#@###@#@#####@#########$$##$#############################################################@#########@#############################$########$###$#$$######$##$#$###$############$####$#######$##$#$############################@######################@##@@#@##@@#@#@#@#@##@##@#@#@#@#@@@@@#@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@+@@+@@@+@++@@@@+@@#$$$$$$$$$$$$$#@@@@#@+++++++++.+.+.@@+@++++++++++++.+++.+.+.+.+.+...+..........................................+",
-"@+++++++++++++++++++++++++++++++++++++##@++++++++++++++++++++++++++++@+@@+@@@#@@###@+@+@+@++@+########@@@@@+@+++@+@+@++@+@@@@+@+@+@+@+@+@+@+@@@@+@@+@@+@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@#@@#@#@#@@##@#@#@#@####################$########################$##$##############################################################################$###$###$##$####$#$##############$#$##$#$##$#$#####$#$###################################################@############@#@####@##@##@###@##@##@#@#@#@#@@@#@@@@#@#@@@@#@@@@@@@@@@@@@@+@+@@+@@++@+@@@+++@@@@@####$$$$$$$$$$#@#@@@@@+++++.++.+.+.+@+@@@+@+++++++++..+.+.......+.....................................+........",
-"++++@++@++++++++++++@++++++++@+++++@+@#@@++@++++++++++++++++++++++++@++@+@@@@@#@###+++++++@++@####@@@@@@@@@@+@+@+@+@+@+@+@+@+@+@+@@+@+@+@@+@@+@+@@+@@+@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@#@#@#@###@##@#################$###################################################@########@########################################$#######$#######$##$#$###########$###$#########$###$###$##########################################################@########@####@@##@##@###@###@#@@##@#@#@@#@#@@@#@@@@@#@@@#@@@@@@@@@@@@@@@@+@@@+@@@@+@+@@@++@@@@@##$#$$$$$$$$#$#@@#@@@++++.+.+..+.+.@+@+++++++++++.+++...+.+.+................................................",
-"+++++++++++++++++++++++++++++++++@+++###++@++++++++++++++++++++++@+++@++@@@@#@@###@++@+@+@++@@######@@@@@@+@++@+++@+@+@+@+@+@@+@@+@+@+@+@+@+@+@@@+@@@@@@@+@@++@+@@@@@@@+@@@@@@@@@@#@@@#@@#@#@#@#@#@@#@##@############@#@##$#$####@###############$#########################@##@##@########@###########################################$######$##$##$#$##$$#$#$#$###########$#######$##$#############################################@###@############@###@####@####@##@###@###@######@#@##@#@@@#@#@@@@@@@#@@@@#@@@@@@@@@@@@@@@@+@@@+@+@+@+@+@@+@+@@@@#$$#$$$#$$$$$##@@@#@@+++++++++.+.+++@@+@+++++++++.+++..+.+..+.+...........................................+",
-"++@++++++++++++++++++++++++++++@++@+@@#@@++++++++++++++++++++++++++@++@+@@@@@@#@##++++@+++@++####@#@@#@@@@@+@+@+@++@++@@+@@+@+@+@+@+@+@+@+@@+@@+@@@+@+@+@@+@@+@@@+@@+@+@@@@@@@@@@@@@@@@#@@@@@@@@@###@#####@###@##@#@#######$#$##@#####################################@##@###@##@#################################################$#$############$##$##$#########$###$##$#$#######$######$#$##$##$##$##$##$#############################################@######@#@###@###@##@###@##@##@#@@##@##@@@#@#@@#@@@@@@#@@@@@@@@@@@@@@@@@@+@@@@+@@+@+@+@+@+@@@@@#$#$#$$#$$$$###@@#@@++.+.+.++.+.++++@+@+++++++++.+.+....+....+.+.........................................",
-"@++++++++++++++++++++++++++++++++++++@#@++++++++++++++++++++++++++++@+@@+@@@@#@###++@+++@++@@####@#@#@@@@@+@@++@+@++@@+@+@+@+@@+@+@+@+@+@+@+@+@@@+@@+@@@@+@+@@@+@@@+@@@@@@@@@@@@@@#@@#@@#@#@#@###@@@##@#@###@##@###@#@@###$###@###@#################################@##@###@###############################################################$#$#$##$###$###$#$##$###$###$###$###$####$#####################################################################@#@@#####@######@###@###@###@##@#@#@@##@@@@#@@#@#@#@@@@@@@@@@@@@@@@@@@@@+@@@@@+@+@+@@+@+@@@@@@#$#$#$$$#$$$$##@@#@@+++.+.+.+.+..++@@+@+@+++++++.+++++..+.+.....+......................................+",
-"+++++++++++++++++++++++++++++@++++@+@##@+++++++++++++++++++++++++++++++@@@@##@###@+@++++++++@####@#@@@@@@+@++@++@+@+@+@+@+@@+@+@+@+@+@+@+@+@@@+@@@+@@+@+@@+@+@@@@+@@@+@@@@@@@@@@@@@@@@@#@@@@@@#@@@###@#@##@##@##@#@##@######$##@#####################################@########################################$####$##$##$##$#$#####$####$####$##$##$##$$####$###$###$##$#$############$#########################################################################@####@#@###@###@###@##@###@###@@#@#@@#@@@#@@@@@@@@@@@@@@@@@@@@@@@@+@@@+@+@@+@+@+@+++@@+@@#$$$#$$#$$$$$###@@@@++.+.++.+.+..++@+@+++++++.++..+.+..+..+.+.........................................",
-"++++++++++++++++++@+++++++++++++@+++@##+++++++++++++++++++++++++++@+@@+@+@@@@####++++@+@+@+@####@#@#@@@@@@@+@++@+++@+@@+@@+@+@+@@+@@+@@+@@+@@+@@+@@@+@@@+@@@@+@@@@+@@@@@@@@@@@@@@@@#@@#@@#@#@#@#@@#@#####@##@##@#@#@#@#@#$###############################################@#####@@################################################$####$###$##$##$##$#$##$$#$###$###$###$###$#$############$##$##$##$##$##$####################################################################@###@@##@##@##@##@#@#@##@#@#@#@@#@@#@@@@@@@@@@@@@@@@@@@+@@@@+@+@+@@+@+@@+@@@@@###$#$$#$$$$###@@@@++++.+.++.+..++@+@+++++++++++.+..+..+....+.......................................",
-"++++++++++@++++++++++++++++++++++@+@@@#@+++++++++++++++++++++++++++@++@@@@#@#@##@+@++++++++@###@##@@@@@@+@+@++@++@@+@+@+@+@+@+@+@+@+@+@+@+@@+@@+@@@+@@+@@+@+@@@+@+@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@#@#@#@#@##@###@#@@#########$####@######################################@##@##@####################################$#########$##$###$#$##$##$##$$##$###$#####$###$#$##$##$$##$####$###############################################################################################@###@##@#@###@###@#@#@@##@#@@@#@@@##@@#@@@@@@@@@@@@@@@+@@@+@+@+@+@+++@@+@+@@#$#$#$$$$$$$$##@@@@@++++.+.+.++..++@+@@++++++.++.++.+..+.+..+..+..................................+",
-"++++++++++++++@++++++++++++++@+@++++@#@++++++++++++++++++++++++++@++@+@@@@@@@###@++@+@+@+@+######@#@@@@@@+@++@++@+@+@@+@+@+@@+@@+@+@@+@+@@+@@+@@@+@@+@@+@@@@+@@@@@+@@@@@@@@@@@@@@@@#@#@##@#@@#@#@##@##@#####@##@####@@####$$##@###################################@###@#@##@##@#########################################$#$##$###$#$#$#$#$##$####$##$$#$#$$##$#$#$#$##$$##$#$#$#$###$#$#$$####$####################################################################################@##@#####@##@#@###@###@####@@@#@@@#@@@@@@@@@@@@@@@@@@+@@@@+@@+@+@@@+++@@@+@@$#$#$$$$$$$$$#@@@@@++.+++.+...+..++@++++++++.+++.++.+.+..........................................",
-"++++++++++++++++++++++++++@++++++@+@##@@+++++++++++++++++++++++++++@+@+@@@##@###+@++++++++@###@#@#@@@@@@@@++@++@+@@+@+@+@@+@+@+@+@@+@+@@+@@+@@+@@@+@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@#@#@##@#@##@###@@#@#@#$################################################@##@#########################################$##$##$###$#$#$#$#$$#$#$$#$#$$###$$##$$#$#$#$#$$##$##$##$###$###$#####$##########################################################################################@##@###@####@@##@###@#@#@#@@@#@@@#@@@@@@@@@@@@@@@@@+@@+@+@+@@+@+@@+@+@+@@####$$$$$$$$$##@@@@@+++.++.++..+.++@+@++++++++.++.++....+......+................................",
-"+++++++++++++++++++++++++++++@+++++@##@+++++++++++++++++++++++++++++@@@@@@@@###@+++@+@+@+@@####@@@#@@@@@++@@+@@+@++@+@@+@+@+@@+@+@+@@@+@@+@@@+@@+@@+@@@@@+@@@@@@@+@@@@@@@@@@@@@@#@@#@#@##@#@#@@@@#@#@#@##@#@###@##@##@####$####@####################################@#@@###@##############################################$###$$$#$$##$#$#$####$##$#$#$##$$###$##$#$##$##$##$##$####$###$##$##$###############################################################$#################################@#@###@##@#@####@##@#@#@@@#@@@@@@@@@@@@+@@@@+@@+@@+@+@+@++@+@@++@@##$$$$$$$$$$##@@@@@+++.+.+.++..+.+@+@++++++.+.++..+.+..+..+.+................................+",
-"+++++++++++++++++++++++++++++++@+@+@#@++++++++++++++++++++++++++@+@+@+@@@@#@###@+@++++++++####@###@@@@@+@+++@++@@@+@+@+@+@@+@+@+@+@+@+@@+@+@+@@+@@@+@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@#@@#@@@#@#@###@##@@#@##@##$####@#@#######################################@##################@###########################$###$##$##$#$#$#$#$##$$##$#$#$###$#$##$#$#$##$$##$#$#$$###$###$###$###$##$#$##$##$##$##$##$##$##$##$##$##$##$##$##$##$##$##$$#$##$##$$####$######################################@#@##@@#@@#@#@@@#@@@@@@@@@@@@@@@@@@@@@+@+@+@++@+@++@++@++@@@$$$$$$$$$#$##@@@@@+++.+....+..+.++++++++++++.+++.+.+..+.....................................",
-"++++++++++++++++++++++++++++@++++++@##+@+++++++++++++++++++++++++++@+@@@@@@@###++++++@+@+@##@#@@#@@@@@@@@+@@+@@+++@+@++@@+@+@+@@+@@@+@@+@@@+@@+@+@+@@@+@@+@@@@@+@+@@@@@@@@@@@@@@@@@@@@#@@@@#@@@@#@@#@#@#@#@@@#@@####@@####$##@##################################@#@##@#@####@######@#####################################$##$##$$#$#$$#$$#$###$$#$####$##$##$#$#$#$#$#$#$#$#$#$#$#$#$##$##$#$#$#$#################################$#############################$#####################################@#####@##@##@#@##@#@@#@##@@#@@@@@@@@@+@@@@@+@+@@+@+@@++@+@@++@@#$$$$$$$$$$$##@@@@@++.++++.+....++@+@+++++.++.++.+.+...+..+.+..............................",
-"+++++++++++++++++++++++++@++++@+++@##@++++++++++++++++++++++++++@+@+@@@@@@@###@+@+@+@++++######@#@@@@@@++@++@+++@@++@+@+@+@+@+@+@+@+@@+@+@+@@++@@@@+@+@+@@@@@@+@@@@@@@@@@@@@@@@@#@@##@@@@@@@#@#@#@##@#@#@######@@#@#####$$#####@####################################@####@##########@####@#####@##########################$###$##$$#$##$##$#$#$#$##$#$$#$##$#$#$#$$#$#$$##$##$#$##$##$#$#$########$#####$###$#####$################$#$#######$######$#######$#$###$#$###$#################################@#######@#@#@#@#@#@@@@@@@@@@@@@@@@@@+@@@+@@+@+@+++@++@+@@+@@##$$$$$$$#$$##@@@@@@+++..+..+.+..++++++++++..+.+.+...+....................................",
-"++++++++++++++++++++++++++++++++++@##@+@+++++++++++++++++++++++@+++@+@@@#@@###++++++++@+@####@##@@@@@@+@++@+@+@@++@@+@+@+@+@+@+@@@+@@+@+@@@+@@@+@++@@+@@@+@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@#@#@##@#@@###@#@#@#######@###@##@#####################@####@###@##@###########@###@##############@#########$##$#$$#$$##$#$#$$##$#$#$#$####$##$$####$##$###$#$#$#$#$#$###$###$#$#$#$##$#$#$#$$###$#$###$##########$#$##$##$##$######$##$###$############$###$#$####$##$##################################@#@##@#@#@##@##@#@@@@@@@@@@@@@@@@@@@+@@@+@@+@+@+@+@+@++@++@@#$$$$$#$##$$##@@@@@++.+.+.......++@++++++++.+.+.++...+.................................+",
-"+++++++++++++++++++++++++++++++@+@@#@+++++++++++++++++++++++++++@+@@@@@@@@###@+@+@+@@++@@##@##@@@@@@+@@@@+@++@++@+@+@+@@+@@+@@+@+@@+@+@@+@+@+@+@+@@+@@@@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@##@@###@#@#@@###@@@#@@##@#######@##@#####################@##@###########@##@###########@########@#####################$#####$#$#$#$#$#$#$#$#$#$$###$##$#$###$##$###$$#$#$####$##$#$#######$####$#$###$#$##########$##$######$########$#$#$##$##$###$$#$##$#$#$##$#$###$##$#$##$###$################################@######@#@#@@#@#@#@#@@#@@@@@@@@+@@@+@+@+@++@++@++@++@@@@@##$$$#$#$#$$##@@@@@@++..+.+.+...+++@++++++++++..+++..+..+..............................",
-"++++++++++++++++++++++++++++@+++++###+@+@+++++++++++++++++++++@++@+@@@@#@#@##@+++++++@++#####@#@@@+@@+@+@@++@+@+@+@+@+@+@+@+@+@+@+@@+@+@@+@@@@@@+@+@+@@@@+@@+@@@@@@@@@@@@@@@@@@#@@@@@@@@@@#@#@@@#@@@@@@@##@@@###@#@#@##$#$####@###################@#@##@######@@###@##@############@####@##@#####################$###$#$$#$#$#$#$#$#$#$#$####$#$#$##$##$###$##$#####$#$#$$#$#$#$#$$$$$$#$$$$###$$#$$#$##$$############$############$####$#####$###$#$##$##$#$$#$##$##$###$##$#$##################################@###@###@#@#@##@@@@@@@@@@@@@@@@@+@@@@@+@@@++@++@++@+++@@@@##$##$$$##$###@@@@@++++.........+++@++.+.+..++...+..+..+.............................",
-"+++++++++++++++++++++++++++++++++@@#@++++++++++++++++++++++++++++@@+@@@@@####+++@+@++++@###@@##@@@@@+@@++@+@+@+@+@+@+@+@@+@+@+@@+@@+@+@+@@@+@+@+@@+@@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@@@@#@#@@#@#@##@@####@@#@#@####$###@##@#@#################@####@###@####@##@################@#@#@#########################$##$##$#$##$##$$#$#####$##$##$#$###$###$##$#$$#$$#$#$#$#$$#$#$######$####$$#$#$##$$#$##$#$##$##$########$##$######$#$##$##$#$#$#$#$###$#$##$#$$##$##$###$###$#$##$##$##########################@#@###@#@#@@#@#@#@@@@@@@@@@@@@@@@@+@+@+@+@@++@++@+@+@@+@@@###$###$$#$$##@@@@@+.+..+.+.+....+++++++++++.+++.+......+...........................",
-"+++++++++++++++++++++++++@+++++@+@##+@+@+++++++++++++++++++++@+@@+@@@@@@@#@#@+@+++++@+@@#####@@@@@@@@@+@@+++++@+@+@@+@@+@+@+@+@+@++@@+@@@+@@@@@@++@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@#@#@@@#@@##@@@@###@#@##########@##@###############@########@#####@##############################################$##$##$#$#$##$$#$#$###$#$$#$###$###$$#$#$$$#$#$##$#$#$#$#$#$##$$#$$#$$#$#$$#$#$#$#$$#$#$##$###$###$##$##$$###$#######$####$#$##$#$#$##$#$$##$#$#$##$$$#$#$#$##$$#$#$###$##$###########################@#@###@##@#@#@#@#@@@@@@@@@@@+@@@+@@@@+@+@@+@++++@+@+@@@@@##$###$#$#$###@@@@@++...........++++++.+.++..+..++.+..............................",
-"++++++++++++++++++++++++++++++++@@#@@+++@+++++++++++++++++++++++@+@@@@@@####+++@+@++++@###@#@#@@@@+@@+@++@+@@++@+@+@+@+@+@+@+@+@@@+@+@@+@@@@+@+@@@+@@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@#@@@@#@#@##@@#@#@#@#@#####$#$###@##@#############@#######@##@##@##@###@##################@##########################$##$##$#$#$#$##$#$#$#$####$#$#$$#$#$#$#$##$#$#$#$#$#$#$#$#$#$#$##$#$#$$##$$#$#$#$#$##$#$##$##$###$###$###$##$##$##$##$##$##$##$$#$#$#$#$#$#$#$#$$##$#$$##$#$#$##$#$#$##$##$$#$$#$$#$##$##$###########@##@###@#@#@##@@#@@@@@@@@@@@@+@@@@+@@+@+@++@+@++@@+@+@@@@@##$##$#$#$###@@@@@+++.+...+....++@+++++.++.++...+...+.+........................+",
-"++++++++++++++++++++++++++++++@++##@++++++++++++++++++++++++@+@++@@@@@@@#@#@@+++++@+@+@###@#@@@@@@@+@@++@+@++@+@+@@+@+@@+@@+@@+@++@+@@+@@@@+@@@@+@@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@##@@#@@#@#@#@#@@##@##@#@##@@##$####@##@#######@###@####@#@##@##@##@#####@##########################################$##$####$#$#$#$#$$#$#$##$###$#$##$#$#$#$##$$#$#$#$#$$#$$##$#$$##$#$##$#$$#$##$$##$#$#$#$#$#$#$#$#$##$#$###$###$#$##$###$#$#$#$####$#$#$##$#$$#$#$$#$$##$$#$##$$##$$#$#$##$##$#$###$#########################@###@###@#@#@##@@#@@@@@@@@@@@@+@+@@+@@@+@@+++++@+@@@+@@+@@@#$#$##$#$####@@@@++..+....+....+++++.++.++.+++..+....+........................",
-"++++++++++++++++++++++++++++++++@@#@+++@++++++++++++++++++++++@+@+@@@#@#@##@++@+@+++++#####@#@@@@+@@@+@@++++@@@+@+++@+@+@+@+@+@+@@+@@@@@+@+@@++@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@#@@#@#@@@##@##@@#@###@##@####$###@####@###########@####@##@####################################################$#####$#$#$#$#$#$##$#$###$#$#$##$##$##$##$$##$#$#$##$#$##$$#$##$$#$#$$#$##$$$$##$$##$##$#$#$#$#$#$#$$##$#$##$$##$##$###$##$#$#$$#$$##$#$#$#$##$#$#$#$#$#$#$#$$##$$##$$#$#$$#$$###$##$#$#$###$###################@###@###@#@#@#@@@@@@@@@@@@@@@@@+@@++@+@+@+@++@@+@@+@@++@@###$##$$#$##@@@@@@+++..+.......+++++++.+.+.+..+.+.+...+......................",
-"+++++++++++++++++++++++++++++++@@#@++++++++++++++++++++++++++@+@+@@@@#@@###+++++++@+@@###@#@@#@@@@@+@@++@@+@+++@@+@@+@+@@+@+@+@@+@@+@+@+@+@@+@@@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@#@@#@#@#@##@@#@@##@#@@@#@#####$######@############@###@#@##@###############################################$##$####$##$####$#$$#$#$####$$##$###$###$##$##$#$#$#$$#$#$#$$$#$#$$$$#$$#$#$#$$#$##$#$#$#$#$$#$#$#$###$#$#$#$#$#$$##$#$#$##$$#$$##$###$#$#$#$$#$$#$#$#$##$#$$$#$$#$#$#$#$#$#$#$##$##$$##$$#####$#$###$##############@###@##@#@##@#@@@#@@@@@@@@@@@@+@@@@+@@++@+@+++@+@@@+@++@+@+@@##$###$##$##@@@@@+.+...+.+.....++++++.+.++.+.+.+...........................",
-"++++++++++++++++++++++++++++@+++@#@+@++@+++++++++++++++++++++++@+@@@@@@##@@++@++@+++@###@#@#@@@@+@@@++@+++@@@+@+@++@+@+@+@+@+@+@@++@@@+@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@#@#@#@@#@@#@###@#@###@##@@##$####@#@####@#####@####@#####@##@############@####################################$#$##$##$##$#$#$##$##$$###$$#$$##$#$##$#$#$#$#$$#$$#$$$$##$#$##$#$$$#$$#$#$$$$$#$#$#$$#$##$#$#$#$##$#$#$$#$$#$#$#$###$###$##$$#$$##$#$#$#$#$#$#$#$#$$$#$##$#$$##$#$#$#$$##$#$$$#$#$$##$#$$####$###$#$#$#$############@##@##@#@#@@#@#@#@@@@@@@@@@+@+@@@@@++@@+@+@+@@@@@++++@@@@####$#$######@@@@@++...........++++++++.++++.+..+.+.+.....................",
-"+++++++++++++++++++++++++++++++@##@+++++@+++++++++++++++++++@+@+@@@@#@#@##@++++++++++##@##@#@@@@@@+@@@+@+@++++@+@+@+@+@+@+@@+@@@+@@+@+@@++@@+@@@@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@#@@@@@@@#@##@#@@@#@#@@@#@@######$##@##########@####@###@#@##@##########@#@############################################$#$#$$#$$#$$$#$#$#$$##$##$#$###$###$##$$#$#$##$$#$$$$$#$$#$$##$#$$$$$###$#$$$$#$#$#$#$$#$#$#$#$#$#####$#####$$##$$##$$##$##$#$##$$#$#$#$$#$$#$##$$$$$$#$#$#$$#$$$#$$#$###$#$##$$#$###$#$##$######$##############@###@######@@@#@@@@@@@@@@@@@@@+@+@+@+@+@++@@+@+@@+++++@@@@#####$$#####@@@@@+++...+......+++++.++....+..+.....+.+..................",
-"++++++++++++++++++++++++++++++++##++++@++++++++++++++++++++++@+@@@@@@#@##@++@+@+@+@+####@#@@@@@@@@@@+++@++@+@@+++@+@+@@+@@+@+@+@+@+@+@@+@@@@@@@+@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@#@###@#@@#@#@#@@@@###@#@###$#####@##########@##@###@###@###@#@###############################################$##$#$###$#$#$##$##$##$#$#$#$#$$#$#$$##$$#$$##$#$#$$#$$$#$#$#$#$$$$$$$$$$#$$$$$$#$$#$#$#$#$##$$#$#$##$$#$$$$##$$#$###$###$#$#$#$$$#$#$#$#$#$#$#$##$#$$#$$#$$$#$$##$#$#$$$#$$$$#$##$$##$$#$$##$#$$#$##$##$#$#############@###@#@@#@#@@#@#@@@@@@@@@@@@@+@@@+@++@+@@@@@@@++@+@++@+@@#######$####@@@+@++.+...+......+++++.+++++.+.+.++......................",
-"++++++++++++++++++++++++++++++@@#@++++++@+++++++++++++++++@+@++@+@@@#@@##++++++++++@####@@#@@@@+@+@+@+@+@++@++@+@+@+@+@+@+@+@+@@+@+@@+@@+@+@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@#@#@#@@@@#@@#@@@#@##@#@#@@#@#@@@#@###$###@######@##@#####@##@###@###@######@#########################################$###$#####$#$##$#$$#$$#$$#$#$#$#$##$$#$#$$##$#$#$#$#$#$$$$#$$#$$$#$#$#$$$##$$$#$$#$$$#$#$##$##$$##$#$#$#$#$####$$$#$#$$#$#$$###$#$##$#$#$##$#$$$#$$$$#$#$$#$$#$$$$#$$$#$#$#$$#$$#$#$$##$$##$#$#$#$##$#$###$###$##############@@####@#@#@@#@@#@@@@@@@@@@+@@+@@+@@+@+@+@@+@@+++++@++@+@@#$####$#####@@@@++............++++++..+.+.+.+...+.+.+................",
-"+++++++++++++++++++++++++++++++##@+@+@+++++++++++++++++++++@++@@@@@@@###@+@+@+@+@++@##@#@#@@@@@@+@@++@+@+@++@++@++@+@@+@+@@+@@@+@+@+@@++@@@@@@@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@#@@#@#@@#@@##@#@@@@@@@#@@#@@#@#@####$####@###@##@###@#@#####@##@#@###@###############################################$###$#$##$#$$#$#$###$#$##$#$$#$#$#$$#$##$$$#$#$$#$$#$$#$$$#$$#$$$$$$#$$$$#$$$#$$$$#$$$#$$#$#$#$##$##$#$##$$#$#$##$$##$#$#$#$$#$#$$#$#$$$$#$#$#$$#$$#$##$###$$#$$#$$#$#$#$$$$$#$$#$#$$##$$$$#$$#$$$##$#$###$##$###############@#@##@###@@#@@@#@@@@@@@@@@+@@@+@+@+@@@@+@@+++@++++@+@+@@######$#####@@@@@++.+.+........++++++.+.+.+.++......+...............",
-"++++++++++++++++++++++++++++++@@#@++++@+@++++++++++++++++@++@+@@@@@#@@##@+++++++++@####@#@@@@@+@@@+@++@++++@+@@+@+@+@+@@+@+@@+@@@+@@@+@@@@+@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@#@@#@@@@#@#@#@#@@@#@#@@#@####$#$##@##@##@###@####@##@###@#####@###################################################$###$$$$#$#$$#$#$$#$#$#$#$$#$$$##$#$$$#$$#$$$$#$$#$$$#$$$#$$$#$#$$$##$$$#$$#$$$$$$$$##$#$$##$$#$$#$#$$#$#$$#$#$#$#$$#$#$#$#$$$$#$$$##$$#$$$#$$$#$$$$$$$$#$$#$$#$$$$$$$$$$$$#$$#$$#$$$#$$$$#$$#$#$#$#$#$#$###$###########@##@#@###@@##@@@#@@@@@@@@@@@@@+@@+@+@+@@@@@+@@++@+@++++@+@@@#$###$#$###@@@@@++............+++++.++.+.+.+.+++....+.............",
-"++++++++++++++++++++++++++++++@#@+++@++++++++++++++++++++++@+@+@@#@#@#@#++@+@+@+@+@####@@@@@@@@@+@@+@++@+@@+@@+@+@+@+@+@+@+@+@@@+@+@+@@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@##@@@#@#@#@@#@@#@#@#@@#@@@#@#@#@#@#@#$$######@##@##@#####@###@###@###############################$##$##$##$##$##$##$##$#$#$#$#$$#$##$#$##$$#$#$#$#$#$#$$$#$$$$#$$#$#$$#$#$$$#$$#$$$#$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$#$$#$$#$$#$$$#$#$$#$#$$$#$$$##$$##$#$###$$$#$$$#$$$#$$$#$$$##$#$#$$#$$$$$$#$##$$$$$$$$$$$#$$$#$$$$#$$#$$#$$##$$#$#$##$#################@##@###@###@@#@@@@@@@@@@@@+@@@@+@@@@@@@+++++++++++@+++@@@####$#####@@@@+@+.+..........++++++.+.+.+..+....+...............",
-"+++++++++++++++++++++++++++++@@#@+++++@+@+++++++++++++++@+@++@@@@@@@###@+@++++++++####@#@@@@@@@+@@+@+@++@+++@+@@+@@+@@+@+@+@@+@+@@@@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@#@#@@@#@@#@@#@@@@@@#@@##@#@#@#@#@####$###@###@##@#####@##@###@########################################################$###$#$##$$$#$#$$##$$$$$$$$$$$$#$$$#$$$$$$$$$$$$$#$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$#$$#$$#$$#$$#$$#$$#$$$##$$$#$$$$$$$$#$#$#$#$$#$#$$$$#$$$$$$$$$#$$$$$$$$$$$$#$$$$$$$$$$$#$$$$$$$$#$$#$#$$$##$#$$#$##$#$###############@#@@#@@#@#@#@@#@@@@@@@@@@@+@@+@@@@@@@@++@+@+@+@++++++@@@#####$#$###@@@@+@..+..........+++++++.+.++.++.+..+.+...........",
-"+++++++++++++++++++++++++++++@@#@++@+++++++++++++++++++++++@+@@@@@#@@##++++@+@+@+@###@@#@#@@@+@@@++@++@+@+@+@+++@++@+@+@+@@+@@@@+@++@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@#@#@@@#@@@#@@#@@#@#@#@@#@@#@#@#@#@#@#####$####@###@#####@##@##@#########################################################$##$$#$#$#$##$#$##$$$###$#$###$$$$#$$$$$$$$$$$$$#$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$$$$#$$#$$#$$$#$$#$$$$#$#$##$##$#$$#$$#$$#$#$$##$$$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$#$#$$#$##$$#$####$############@#####@#@#@#@@#@@@@@@@@@+@@@@+@@@@@@@@+@++++++++++++@++@@@##########@@@@++@+............+++.++.++..+..+.+...............",
-"+++++++++++++++++++++++++++++@##+++++@+@++++++++++++++++++@++@@@@@@###@++@++++++@@###@#@@@@@@@@+@+@+@+@+@+@+@+@@++@+@+@+@+@@@+@+@@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@@#@@#@@@@@@#@@#@@#@#@@#@####$$###@@###@##@##@##@##@#########################################################$###$###$##$#$$#$#$$#$$$#$#$#$$$$##$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$#$#$#$$##$$$#$$$#$#$#$$#$$$#$$$$#$$#$$#$$$$$#$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$$$$#$$#$$$#$###$#$##################@###@#@@#@@#@#@#@@@@@@+@+@@@@@@@@@@+++@+@++@+@+++++++@@@###$######@@@@+++............++++++..+.+.+.+..+....+........",
-"+++++++++++++++++++++++++++++@#@+++@+++++++++++++++++++@+@++@@@@@#@@#@@+@+++@++++#####@@#@@@@+@@+@+@+@+++@+++@+++@+@+@@+@@+@+@@@@++@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@##@#@#@@@#@@#@@#@@#@#@#@@##@#@@@@#@#@###########@##@##@##@#######@##@#############################$##$##$##$#$##$######$###$##$#$#$#$##$$$$$$$#$$$#$$$$#$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$$$$#$$$$#$$#$#$$#$$#$$$#$$$#$$$#$$#$$$##$#$$$#$#$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$#$#$##$#$#$####$##$###############@#@#@##@#@@@@@@@@@@@@@@+@+@@@@@@@@+@++++++++++++++++@@@####$######@@@@+++............++++++++.+.+..+...+..........",
-"++++++++++++++++++++++++++++@##++++++@++++++++++++++++++@++@@@@@#@@##@++++@+++@+####@@@@@@@@@+@+@+@+@+@@++@@++@+@+@+@+@+@+@@@+@+@@@@@+@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@##@@#@@#@@#@#@#@##@@@@####@#@#@###$####@##@###@##@##@###@###@###@########################$#################$###$##$$#$$$#$#$#$$$#$##$#$$$#$#$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$##$#$$$$#$$$#$$$$$#$$$$#$$$$$$$$$$$$#$$$#$$$$$$#$$#$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$#$##$###$#$####################@#@#@@#@##@@#@@@@@@@@@@@@@@@@@@@@+++@+@++++@+++++@+++@@#########@#@@@+++.............++++.+.+.+.++.+.+...........",
-"++++++++++++++++++++++++++++@#@@+@++++@++++++++++++++++++@++@@@@@@###@+@+++@+++@@##@#@#@@@+@+@+@+@+@+@++@++@+@+@+@+@@+@+@@@@@@@@++@+@@@@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@#@@@@#@@#@@#@@#@#@@@@#@#@@@@#@#@###$##$@###@###@###@#####@#######################################################$##$##$##$#$$#$##$$$$$$$$$$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$$#$#$$#$$$$##$$#$#$$$$$$$$$$$$$$$$$$$$$$$#$$$#$$#$$$#$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$###$##$###$####$##########@######@##@@#@@#@@@@@@@@@+@@@@@@@@+@@+++++++++++++++++@++@@##########@@@@+@+............++++++++.+..+....+.+.......",
-"++++++++++++++++++++++++++++@#@+++++@+++++++++++++++++@+@+@+@@@@#@#@@++++@+++@+@#####@@@@@@+@@@++@++@++@+@++@+++@@+@+@+@@+@@@+@+@@@+@@+@@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@#@@#@@#@@#@@#@#@#@@#@####@#@#@###$####@##@@###@###@########@#############################################$##$###$##$#$$#$$#$$$$$$$$$$$$$$$##$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$$$$$$$$$$$#$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$##$#$###$##$##$###################@##@###@#@#@#@#@@@@@@@@@#@@@@@++@@+@+@+++++@+++++++++@@##########@@@@+++............+++++.+.+.+.+++.+.........",
-"+++++++++++++++++++++++++++@##@+++@+++@+@++++++++++++++++@+@@@@@@@##@+@+@+++@++#####@@@@@@+@@+++@++@++@@+@+@++@@+@+@+@@+@@@+@@+@@+@@+@@+@@@@@@@@@@@@@@@@@@@@@#@@#@@#@@@@@@@#@@@#@@@@#@@#@@#@##@#@@@@#@@#@@@#@#@####$###@#@####@##@####@##################################################$##$####$#$$##$#$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$%$$%$%$$$$$$$$$$$#$#$#$#$#$##$#$###$################@#@##@##@##@#@#@@@@@@@@@@@@@@@@@@++@++++@++++++++++++@++@@@#########@@+@++.............++++.+.+.++..+..+.......",
-"+++++++++++++++++++++++++++@##++++++++++++++++++++++@+@+@++@@@@####@++++++@+++@####@@#@@@+@++@@@+@++@@++@+@++@+@+@+@+@+@@+@@@+@@+@@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@#@#@@#@##@#@@#@@###@##@#@#@#@#@#$##$#####@##@##@##@##################################################$###$###$$#$##$$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$%$$$$$$$$$$$$$$%$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$%$$$$$$$$$$$$#$#$#$##$####$###$##################@##@##@@#@@#@#@@@@@@@@@@@@@+@+@++@++++++++++++++++++@@@#@######@#@@@+@++............++++++++..++.+.+..+....",
-"+++++++++++++++++++++++++++##@+++++@++@+@++++++++@+++++@++@@@@@@@##@+@+@+++@+@####@#@@@@+@+@@++@++@++@@+@++@+@+@+@+@+@@@+@@+@@@+@@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@@@@#@@#@##@##@#@@@#@@#@##@#@#@###$###@@@###@##@##@#################################################$###$##$##$#$#$##$#$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$%$%$%$%$$$%$$$$$$$$#$$$$#$#$#$#$#$##$###$#####################@##@#@@#@@#@@@@#@#@@#@+@+@+@++@+++++++++++++++++@@@@#########@@@+@++............+++++.+++..+.+.+.....+",
-"+++++++++++++++++++++++++++##@+++@+++++++++++++++++++@+++@@@@@#@#@#+++++++++++###@#@#@@@@+@@++@+@+@+@+@+@+@@++@+@+@@+@+@@+@@@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@@@#@#@#@#@@#@@#@###@##@#@@#@####$##$######@##@##@##################################################$###$#$##$#$##$#$$#$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$%$%$$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$$$%$$%$$$$$$$$$$$$#$$$##$#$$#$#$###$##$##############@#######@#@##@#@@@#@@@#@@@@@@+@+@++++@+@++++++++++++++++@@@@########@@@+++.............+++++++.++.+.+.+..+..",
-"++++++++++++++++++++++++++@#@++++++@+@++@++++++++++@+++@@+@@@@@@##@+++@+@++@+###@#@@@@@+@+@++@+@+@++@+@+@++@+@+@+@@+@+@+@@@+@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@##@@@#@#@#@@#@@#@#@#@#@@@#@#@#@#@#@##$####@##@##@##@##########################################$###########$##$$#$#$#$#$#$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%$%$$$%$$$%$$$$$$$$$$$$$$$$$%$$$$$%$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$$%$%$$%$%$%$$$$$$$$$$#$$#$$#$#$##$#$##$####$######################@@@#@#@@@##@##@@@@+@@+@@+@+++++++++++++++++++++@@@@######@@@@@+@+.............++++.++.+.+.+..+...",
-"++++++++++++++++++++++++++##@+++@+++++++++++++++++@++++++@@@@@#@#@++++++++@+@####@#@@@@@@+@+@+@+++@++@+@+@+@++@@+@+@@@@@@+@@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@@#@@@@@#@#@#@@#@#@#@###@#@#@#@############@####@###############################################$#$#$#$#$#$##$###$#$#$#$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$%$%$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%$%$$$$%$$%$%$$$$%$$$$$$$$$$$$$$$$#$$#$$#$#$#$##$#######################@###@#@#@#@@@#@@@#@@@+@+@+++@++++++++++++++++++++@++@@#@#####@@+@+++.............+++++.+++.+.++...+",
-"+++++++++++++++++++++++++@##++++++++@+++@+++++++++@+@+@+@@@@@@@#@#+++@++++++@###@#@@@@@+@++@+@++@++@@++@++@+@@+@+@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@@#@@@@@#@#@@#@#@@#@#@##@##@##@@@#@@#@##@@######$##@####@#############################################$##########$##$#$#$$#$##$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%$%$%$%$%$%$%$$$$$$$$$$$$$$%$$%$$$$$%$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$%$$%$%$%$$$$%$$$$$$$$$$$$$$$#$#$#$#$###$##$##$##$##$###############@#@#@#@#@##@#@@@@@@+@+@@++@+++@+++++++++++++++++@@@@########@@@@+++............++++++.+..+..+++.",
-"++++++.+.++++++++++++++++@#@@+++++++++++++++++++++++++@+@@@@#@@##++++++++++@###@#@@@@@+@+@@+@++@+@@++@++@@+@++@+@++@@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@@#@@@@#@@@#@@@#@@#@@###@##@#@###@##$$###@################################################$#########$#$##$##$$#$#$$$$$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$$$$$$$$$$$$$$$$$$$$$$%$%$%$%$%$%$$$%$$%$%$$$%$$%$%$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$$%$%$%$%$$%$%$$%$$%$$%$%$$$%$$$$$$$$$$$$$$$$#$#$##$###$##########################@##@##@##@#@##@@@+@@+@+@++@++++++++++++++.+++++++@@@@#@####@@@+@+++.... .......+++++++++..+...+",
-"++++.++++++++++++++++++++##@+++++++++++++++++++++@+@@++@+@@@@#@#@+++++@++++@###@@#@@@@@+@@+@++@+@++@++@+@+@+@@+@@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@@@@#@@@#@#@@#@#@###@##@#@#@@#@#@@#@@###$######@#@#################################################$##$##$##$##$##$$$$#$#$$$#$$$$$$$$$$$$$$$$$$$$$$$$$%$%$$$$$%$%$%$%$%$%$%$%$%$%$%$$$%$$$%$$$%$%$$%$%$%$%$$$$$$$$$$$$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$%$$%$$%%$%$$$$$$$$$$$$$$$$$$$$$$$$$#$#$$#$###$##$##$#######################@#@@####@#@@@@@@@+@@+@+@+++++++++++++++++.++++++++@#@#@####@@@@+++..... .......++++.+.++.+.+.",
-"++++++.+.+++++++++++++++@#@+++++++++++++++++++++@+@+++@@@@@@@@#@++++++++++@##@#@#@@@@+@+@+++@++++@++@+@+@+@+@+@@+@@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@#@@@@#@@#@#@@#@@#@#@#@#@@##@######$####@#@######################################################$#$#$#$$#$$$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$%$$$$%$%$%$%%%$%$%%%%%$%%%%$%$%%$%%%$%%%%%%$%%%$%%%%%%%%%%%%$%$$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$$$$%$%$%$$%$%$%$$%$$%$%$%$%$$$$$$$$$$$$$$$$$$$$#$#$#$##$#$###$#$##################@###@#@####@#@@@@@@@++@+@++@+@+++++++++++++++.++++@+@@@@##@##@@@@@+@+.............++++++.+.+.+.",
-"++++.+++++++++++++++++++@#@++++++++++++++@+++++++@++@+@@@@@@@#@@++++++++++@####@@@@@@@+@+@@++@@+@+@+@@+@+@+@+@+@@+@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@@@#@#@@#@#@##@###@#@#@#@#@@#@#@##$##$##@#################################################$##$##$$#$##$##$$$#$$#$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%%$%%%%%%%%%%%$%%%%%$%$%$%$%$%$%%$%%$%$%%$%$%$%%$%%$%$%$%$%$%$%%$%%$%$%%$%$%$%$$$$$$$$$$$$$$$$%$%$%$$$$$$$%$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$%$%$$%$%$%%$%$$%$$$$$$$$$$$$$$$$$$$$$#$#$$#$#$$#$###$#$###$##$##$##############@##@#######@@@@@@@@+@+@+@++++++++++++++.+++.++++++@@@@@####@@@@@++++............+++++++.+.++",
-"++.+++++.+++++++++++++++##@+++++++++++++++++++++@++@@+@+@@@@#@#@+++++++++@###@@#@@@@+@+@@+++@++@+++@+@+@+@@+@@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@##@#@@@##@#@#@@#@@@###@#@#@#@#######$##@#########################################$##############$##$#$#$$#$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%%$%%$%%%$%$%$%$%$%%$%$%$%%%%%$%$%%$%$%$%%$%%$%%%$%%$%%$%%%$%%%$%%%$$%%%%$%%$%%%$%$%%%%$%$%$%$%$$%$$$$$$$%$%$%$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$$%$%$%$$$$%$$%$%$%$%%$%$%$%$%$$$$$$$$$$$$$$$$$$$$$$##$#$$##$##$##$#################@###@######@@#@@@@@@@+@@+@+@+@+@+++++++++++.+++.++++++@@#@@###@@@@@@+++..... ......++++.++.+..",
-"+.++.+.++++++++++++++++@#@+++++++++@+++++++++++@+@+@+@+@@@@@@#@++++++++++@@###@@@@@@+@+@+@+@+@++@+@@+@+@+@+@++@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@#@@@@@@#@@@#@#@##@##@#@#@@@#@##@###$#$##########################################$#####$##$#$#$#$##$$##$$#$$$$#$$$$$$$$$$$$$$$$$$$$$$$%$%%%%%%$%%$%$%%$%$%%%%%%%%%$%%%%%%%$%$%%%%%$%%%$%%$%%$%$%$%%$%%$%$%$%%$%%%$%%%%$%$%%$%$%$%%$%$%$%$%$%$%$$%$$$%$%$%$$$%$$$%$%$$$%$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$%$%$$%$%$%$%$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$##$#$##$$#$###$###$#############@###@###@##@@@@@@@@@@+@+@+@+++++++++++++++.++++.+++++@@@@#@###@@@+@+++. ...........++++.++++",
-"+++++++++++++++++++++++##@++++++++++++++@+++++++++@+@@@@@@#@##++++++++++@###@@@#@@@@@+@+@+@+++@++@++@+@+@+@@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@##@#@#@#@@#@@#@###@##@##@###@###$##$#############################################$#########$##$##$$$$#$$#$$$$$$$$$$$$$$$$$$$%$%%%%%$%%$%$%$%%$%%$%$%%%$%$%$%$%$%%%$%$%%%$%%$%$%%$%$%%$%%$%%%$%%$%%$%%%%%%$%%%%%$%%=-*%%$%%%$%$$%$%$%%$%$%$%%%$%$%$%$$$%$%$$%$$%$$$$$$%$%$%$%$%$$$$$$$$$$$$$$%$$%$%$%$%$%$%$$$%%%%%%$%%$%$%$%$%$%$$$$$$$$$$$$$$$$$$$$#$$$#$#$#$#$#$#$###$###################@######@@@@@@@@@@+@@++@++@+@+++++++++++++.+.+.+++++@@@@###@#@@@@@++++............+++++..+",
-"++.+.+.++++++++++++++++##++++++++++++@++++++++@+@++@+@@@@@@#@@++++++++++@##@#@#@@@@+@+@@+++@++++@++@+@+@+@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@#@@@@#@@#@#@@#@@#@##@@@#@@##@##@###$###########################################$#$#######$##$##$#$#$#$$$#$$$$$$$$$$$$$$$$$%$%%$%$$%$%%$%%$%$%%$%%$%%%$%$%%%%%$%%%%$%%%%$%$%%$%%%$%%$%%$%%$%%$%%%%%%$%%%$%$%%%$%$%*>,,,,,>=$%$%$%%$%$%$%$%$%%$%$%%%%%$%%%$$$%$$%$$%$%$%$$$$$$$$$$$%$%$$$$$$$$$$$$$$$$$$%$$$$$%$%$$%$%$%$%$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$$###$#####$####$#########################@#@@@@@@+@@+@++@+@++++@+++++++.+++.++.+.++++@@@@@##@@@@@@@@++.............+++++++",
-"++++++++.+++++++++++++@#@++++++++++++++++++++++@+@@+@+@@@@@@#@+++++++++@##@#@@@@@@@+@+@+++@++@+@++@+@+@+@+@++@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@@@@@#@@#@#@@@#@@##@#@#@#@#@#@@#@#@###@#@######$########################################$########$####$##$###$#$$#$$$$$$$#$$$$$$$%%%%$%%$%$%%$%$%%$%%$%$%$%$%$%$%$%%$%$%%$%%%%%%$%%$%%$%%$$%$$%%$%$%$%$%%$%$%$%%$%%%%%$%%$%>,,,,,,,,,>$%%%$%%$%%%%$%%$%%$%%$%$%%$%$%%%%$%$$%$$$$$$$$%$%$%$%$$$$$%$%$%$%$$%$%$%$%$$%$%$%$%$%$%%$%%%$%%$%$%%$%$$%$%$$$$$$$$$$$$$$$$$$$$#$#$$$##$$##$#$$$###########################@@@@@@@@+@@@@@+@+++@+++++++++++.++.+.++.+++++@@@@@###@@@+@+++.............++++++",
-"++.++.+++++.++++++++++##++++++++++++++@++@++++@++@+@@@@@@###@++++++++++@###@##@@@@+@++@++@++@+++@+@+@+@+@+@@@+@+@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@@@@@@@#@@#@@#@#@@@#@@@@@#@@@#@#@#@#@#@#@#######$#####@##########################################$###$#$##$#$#$$$$#$#$$$$#$$$$$$%%%%%$$%$%$%%%$%$%%$%$%$%$%$%$%%%$%%$%$%$$%$%%$%$$$$$$$$$$$$$$$$%$$$$%$$$%$$%$$$%$$%$$%$%$%%%>,,,,,,,,,,,>%$%$%$%%$%$%%$%%$%%$%%%$%%$%%$%$%$%%%$%$%$%$%$$$%$$$$%$%$$$$$$$$$%$$$%$$$%$$%$$$%$%$%$%%$%$%%$$$%$$%$$$$$$$$$$$$$$$$$$$$$$$$$$#$$###$$#$#$######$#########################@@@@@@@@@@@+@++++@+++++++++++++++.++++.+.+.++++@@@@#@#@@@@+@++... .........+++++",
-"++++.++++.+++++++++++@#@++++++++++++++++++++@++@+@+@@@@@@@#@@+++++++++@##@@@@@@@@@@++@++@+++++@@+++@+++@+@@+@@@@+@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@#@@@#@#@@@####@###@#@#@#@#@#@##@#@##$#$$#####################################$###$###$##$####$##$#$###$$$$#$$$$$$%%%%$%$$%$%$%$%%$%$%$%$%$%$%$%$%$%$$$$$$$$$$$%$$$$%$$%$%$%$$$%$$%$%$$$$%$$$%$$%$$$%$;>,>>*$%$%$$=,,,,,,,,,,,,,-$%%%%%$%%%$%%%%%%$%%$%%%%%%$%%%%%%$%%$%$%$$$$%$$$%$$$$$$$$%$%$$$$$%$$$%$$%$%$%%$%$%%%$%%$%%$%%$$%$$%$%$%$%$$$$$$$$$$$$$$$$$$#$$#$$$#$##$$#$$#$##########################@@#@@@@@@@@+@@+@@+++@+@++++++++++.+...+..+.+.+++@+@@@###@#+@@++++.... ........+++",
-"++.+++.++++++++++++++@#@+++++++++++++@+@+@+++@++@+@@@@@@##@@++++++++++#@###@#@@@@++@+@+++++@++++@+@++@+@@+@++@+@@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@@@@#@@@@@#@@@#@#@##@#@###@######$##$##@#########################################$##$##$#$#$#$$#$$$$#$$$$%$%%%$%$%%$%$%$%%$%%$%$%$%$%$$$$$$$$$$$$$$$$$$%$%$$$%$$$%$$$$$$%$$$$$$$$%$%$$$$$$%$$$%$=,,,,,,,>%$%$%,,,,,,>->,,,,,,@%$%$%%$$%%%$%%%%%%%%%%%%%%%%$%$%%%$%%%%$%%%$$%$$$$%$%$%$$$$$%$%$$$%$$$%$$%$%$%$%%$%$%$%%$%%$%%$$%$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$#$#$$##$#$#$########################@@#@@@@@@@@@+@++@@+++++++++++++++++++.++.+.+.+++@+@@@@@#@#@@@+@++.............++",
-"++++.++.+.+.++++++++@##++++++++++++++++++++@+@+@+@@@@@@@@#@@++++++++++##@@@@@@@@+@++@@+@+@+++@+@+++@+@+@+@+@@@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@@@#@@@@#@##@###@#@##@##@#@##@#@##$#$$#@#########################################$###$######$#$##$##$$$%$%%$%$%$%%%$%$%$%$%$%%$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$$%$%$%$$%$%$%$%$$$$$$%$%$$%$$%=,,,;=;>,,>%$%%,,,,,&$$$%,,,,,*$%$%$$%%%$%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%$%$%%%$%$%$$$$$$%$%$$$$%$%$$%$$%$$%$%$%$%%$%%%%$%%$%%$%$$%$$%$%$$%$$$$$$$$$$$$$$$$$$$$$$$$#$$$$##$$#$$#$#$#$##$##$##$#####$#$##@##@#@@@@@@@@@@@@++@++@+@++++++++++++.++.+.+.+.++++@@@@#@#@@@@@++++.............+",
-"+.++++++++++++++++++@#@+++++++++++++@+@+@++@++@++@@@@@#@#@@++++++++++####@#@@@@@@+@+@+++++++@+@++@++@+@+@+@@+@+@@+@@@@+@@@@@@@@@#@@#@@#@@#@@#@@#@@#@@#@@#@@#@@##@@@#@@#@@#@@@#@#@@#@@#@@@####@#@@###@#####$#$###########################$#################$####$##$$#$#$$$$%$%%%$%$%%%$%$%$%$%$%%%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%$$%$$$$$$$$$$$%$$$$$$$%$%$$%$$%$$%%,,>+#%$%=,,-%$-,,,,;#%$%$;,,,,=%$%$$%%$$$%$$%$%%%%%%%%%%%%%%%$%%%%%%%%$%%%$%$%$%%$%$%$%$$$%$%$$%$$%$%$%$%$%$%$%%$%%$%$%%$%$%$%$%$%$$%$$$$$$%$$$$$$$$$$$$$$$#$$$$$$#$$#$$$#$#$#$#$###############$######@@@@@#@@@@@+@@+@+@++@++++++++++++++.++.+.+.+.+.+++++@@@@@#@@@@+@@++... ... .....",
-"+++.+.++.+.+++++++++##++++++++++++@+++++++@++@++@@@@@@@@##++++++++++@##@@#@@@@@@+@+@++@+@+@++@++@+@++@+@@+@+@@@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@@##@@@@#@#@@@@#@#@#@###@@@#@###@###@##$#$#########################$####$##$##$#$##$#$#$###$#$##$#$$$$$%%$%%$$%%%$%$%%%$%$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$$$$$%$$$$%$$%$%$%$%$%$$$%$%$%$$%$$$$$%$$%$>,,#%$$%%%>,,+%;,,,,%%$%$$&,,,,;$%$%%$$%%%$%%$%$%%%%%%%%%%%%%%%%%%%%%%%%$$%%$%%%$%$%$%$$$%$$%$$%$%%$%$%$%$%%%$%%$%%$%%%$%%%%$%%$%$%$%$$%$%$%$$$%$$$$$$$$$$$$$$$#$$$$$$$$#$$$#$$#$#$#$##############$######@#@@@@@@@@@+@@+@+@+@+++++++++++++++.+.+.+..+.+.++++@@@@#@#@@@++@+@............",
-"+.++++.++++++++++++@#@+++++++++++++++@+@+++@++@@+@@@@@#@#@++++++++++#@#@#@@@@@@+@+@++++++++@+++@+@+@++@+@+@@@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@@#@@##@#@#@#@#@#@#@@#@#@##@###@#@@###@######$#$##########################$$###################$###$#$$$$%$%$%$%$%%$%$%$%%$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$$%$$$$$$%$$$$$$$$%$$%$$$%$$$%$$$$$%$$,,*%$%$$$$$,,#%=,,,,=$%$%$=,,,,=%$%$%%%$%$%$$%$%$%$%$%%%%%%%%%%%%%%%%%%$%%%%%$%$%%%$%%%%$$$%$$%$$$%$%$%$%$%$$%$%%$%%$%$%$%$%%$$%$%$%$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$$$$$#$##$#$#$$#$#$##$###$##$###@#@#@#@@@@@@@@+@@+@++@+@+@+++++++++.+++++.+.+..++++++@@@@@#@@@@@+@+++..........",
-"++.+.++++.+++++++++##++++++++++++++@+++++@+@+@++@@@@@#@@#++++++++++@##@#@@@@@+@+@+@++@+@+@++@+@+++++@+@@+@@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@#@@#@@#@@@@@@#@@@#@#@@@@#@@@#@@@#@@@##@@##@@#@#@#@##@#@##$$$$######################$################$###$#$###$$$$$%$%$%$%$%$%$%%$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$$%$$%$$$$%$%$%$$$%$$$%$$$%$$$$%$$%$$%$%$%$%$>,%$$%$%%% ,,%$=,,,,,%$%%+,,,,,=%$%$%$$%$%%$%$%%%$%%%$%$%%%%%%%%%%%%%%%%%%%$%%$%%$%%$%$%%%$%$%$$%%$%$%$%$%$%%$%$%%$%%$%%%%%%$%%$%$%$$%$$%$%$$%$$%$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$#$#$###$#######$$$#$##@##@#@@#@@@@@@@@@+@+@++@+++++++++++++.+.+.+.+.+...++++++@@@@@#@@+@+@+++. .......",
-"+.+++++.++++++++++@#@+++++++++++++@++++@++@+++@@@@@@@@##@++++++++++@#@#@@#@@@@+@+@++@++++++++++++@@+@+@+@@+@@@+@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@@@#@##@@#@#@@@#@#@##@###@@#@#@#@##@####$$#$##################$#$#####$###$#$#$##$###$#$#$##$$$$$%%$%$%$%$%%$%%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$%$$$$$$$$$$$%$$$$$$$%$%$$$$%$$$$%$$$#,,%$%$$%$%#,,$%#,,,,,>&%&>,,,,,$$%$%$%%$$%$%%$%$$$%$$%%%$%$%$%%%%%%%%%%%$%%%%%%%$%%$%$%$%$%%%$%%$$%$%%$%$%%$%%$%%$%%$%%$%$%$%$$%$%$$%$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$##$#$##$#######$#$#####@#@#@@@@@@@@+@@@+@@+@+++@+++++++++++.+++.+.+.+.+..++++++@@#@#@@@@++++++. .. ..",
-"++.+.+.++.++++++++@#@+++++++++++++++@+@++@+@+@+@@@@@#@@#++++++++++@###@@@@@@@+@+@+++++@+@+@+@+@+@++@+@+@@@@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@#@@#@@##@##@@@@#@@#@@#@@#@#@#@#@@##@#@####@##@#$$#$########################$#$#############$#####$$$$$%$%$%$%$%$%%$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$%$%$%$%$%$$$%$%$%$%$$$$$%$$$$$$$$$%$$$$%$$$$%$$>,;%%%$%$%*,,#%%>,,,,,,,,,,,,,>$%$%$%$%$%$%$$%$%%%$%%$$%%$%%%$$%$%$%$%$%%%$%$%%%$%$%$%%%$%%$%%%%%%$%%$%$%%$%%$%%$%%$%%$%%%$%%%%$%$$%$$%$$%$%$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$#$##$####$#$$###@##@@@@#@@@@@@@@+@@++@+@+@++++++++++++++.++.+.+.+..+.++++@+@@@@@@@@@+@+++.......",
-"+++++++++++.+.+.+@#@+++++++++++++++++++@+@++@+@@@@@@@#@@++++++++++#@@#@@@@@@+@+@+@+@+++++++++@++@+@++@+@@+@@@+@@@@+@@@+@+@@@@@@@@@@@@@@@@#@@@@@@@@@@@#@@@#@@@#@@#@#@##@@@@#@@@#@#@#@#@@#@@##@#@####@####$#$#################$######$####$#$$#$###$###$$$$$$$%$$$%$%$%%$%$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$%$$$$$$$$$%$%$$$%$%$%$%$$$%$%$$%$%$%%%-,,$$%%%%$,,>%$%$,,,,,,,,,,,,,#$%$%$%$%%$%$%%$%$$%%$%%$%$%%$%%%$%$%$%$%%%%%%%$$%%$%%%$$%$%%%%%$%$%%%%$%%$%%$%%%%%%%%%%%$%$%%$%$%$%$$%$$%$$%$$%$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$#$#$$###$##$$##$###@#@##@@@#@@@@@@@+@@@+@+@++@++++++++++.++.+.+..+.+....+++++++@@#@@@@@++@+++.....",
-"+.+.++.+.++++++++@#@+++++++++++++++@+@++@++@+@@@@@@@@#@++++++++++@###@#@@@@+@+@+++++@+@+@+@+@++++@++@+@+@@@+@@+@+@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@@#@@##@#@#@@@##@#@#@#@#@#@##@##@@###@#@#####$#$$##########################$$#####$##$###$$$$%$$%$$%$%$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%$%$%$$$%$$$%$%$%$%$$$$$%$$$$$$$$$%$$%$$%$$$%$%% ,,,*$%$&>,,*%%%$#,,,,,,,,,,,%$%%%%$%$%$%%%$%%$%%$%$%$%%%$%%$%$%%%$%%%$%$%%$%%%$%%%$%%%$%%%$%%%%%%%%%%%%%$%%%$%$%%$%%$%%$%%$%$%$%$%%$%%$%$$%$$$%$$%$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$#$##$###$#$$$######@###@@@#@@@@@@@+@@+@+@+++@++++++++++++++.+.+.+.++...++++@+@@@#@@@@@+@+++....",
-"+.+++.++++.+.+.++##++++++++++++++++++++@++@+@@@@@@#@#@@++++++++++#@@@@@@@@+@@@++@+@+++++++++++@+@++@+@@@@+@@@@@@@@+@+@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@#@@@#@@#@@##@@#@#@@#@#@#@#@@#@#@#@##@#@@###@#@#####$$#$####################$#$#$########$###$#$$$$%$$%$$%$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$%$$%$$$$$$$%$%$$$%$%$%$%$%$$%$%$%%$%$%%+,,,,;,,,,*$%%$%%%>,,,,,,,>$#%%$$%$%%$%%$%%$%%$%%$%%%$%$%%$%%%$%$%%$%%$%%$%%$%%%%%%%%%%%$%%%%%%%%%%%%%%%%%%$%%%%%%%$%%%%%$%$%%%$%%$$%$$%$%$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$##$##$#$$$$######@#@@#@@#@@@@@@@@@@+@@+@+@+@++++++++++.+.+.++.+.+.+...+.++++@+@@@@@@@+@+@+++...",
-"+++.+++++.++++++@#@+++++++++++++++@+@+@+@++@+@@@@@@@@@++++++++++@##@@#@@@@@+++@+++++@++@+@+@@+@++@+@+@+@@@@+@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@#@#@@##@#@@@#@@#@#@###@#@#@##@#@####@####@#@#$#$#$#####################$###$##$##$##$$$$$%%$$$%$$%$%$$$$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%$%$%$%$$$$$%$$%$%$%$$$$$%$$%$%$%$%$%$%$%$%%%%%%%%#>,,,,,,##*>>>&%$%*>>,>>&%%%%%&>,,,,,*%%%%%$%%$%%%$%%$%%$%%$%%%%%$%%$%%$%%$%$%$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%$%%%%$%$%%%%$%$%%$%%%$%$%$%%$$%$%$%$$$$$$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$#$###$$$$$$########@##@@#@@@@@@@@@@+@+@+@++@+++++++++++++.+.+.+..+.+...+++++@+@@@@@@@+@++++..",
-"+.++++.++++.+.++#@+++++++++++++++++++@+@+@+@@@@@@@@##@++++++++++#@#@@@@@@+@@@++@+@+++@+++++++@+@++@+@+@@+@@@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@@@#@@#@@#@#@#@#@#@##@#@@#@#@#@#@#@#@###@#######$#$######################$##$########$$$$$%$$$%$%$$%$$$$$$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$$$$$$$$$$$$$%$$%$%$$$$$$$$$%$%%$$%%$%$%$%$%$%$%$%$$%$%$%%%%%***%%%;,,,,,*%%%%%%%%%%%%%=,,,,,,,,>%%%%%$%%%%%%$%%%%%$%%%%$%%%%%%%$%%$%$%$%$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%%%$%$%%%%$%%$%$%%$%$$%$%$$$%$$$$%$$$$$$%$%$$$$$$$$$$$$$$$$$$$$$$$$$$#$#$#$#$$$#######@##@@#@@#@@@@@@@@+@@@+@+@++++++++++++++++.+.+.+..+.+...+++++@@@@@@@@@+@++++.",
-"++.+.++++.+++++@#@+++++++++++++++@+@++++@+@+@@@@@@##@++++++++++@##@@#@@@@+@+++@+++@+++++@+@+@++++@+@+@@+@+@@@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@@#@@@@##@#@###@@##@@#@#@##@####@#@###@###@#@##$#$#$##########################$####$$$$%$%$$%$$%$$$#$$##$##$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$%$%$%$%$%$$$%$$$%$%$%$%$%$%$$%%$%$$%$%$%$%$%$%%%%%%%%%%%%%%%%%%%,,,,,,,%%%%%%%%%%%%$,,,,,,,,,,;%%$%%%%%%$%%$%%$%%$%$%%$%%$%$%%$%%%%%$%%%%$$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%$%%%%%%$%%$%%$%%$%$%$%$$%$%$$$%$$%$$$%$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$#$##$$$$#$########@##@#@@#@@@@@@@@+@@+@@+++@+@+++++++++.+++.++.++..+.+...++++++@@#@@@@@+@@++",
-"+.++++.+.+++.++##++++++++++++++++++++@+@+@+@@@@@@@@#+++++++++++##@#@@@@@@+@+@@++++++++@+@+@++@+@@++@+@+@@@@@@+@@@+@@@@@@@@@@@@@@@@@@@#@@#@@#@@#@#@@@@@#@@@##@#@@@#@@@##@@@###@##@@#@#@#@##@#@#@#@######$#$##############$###$#$##$###$#$$$$%%$$$$%$%$$$$#$#$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$%$%$$$$$$$$%$$$%$$%$$$$%$$%$%$%$%%$$%$%$%$%$%$%%%%$%%%%%%&--=%%%%%%=,,,,,,,$%%%---%%%%%>,,,,,,,,,,,%$%%%$%%$%%$%%$%%%%%%%$%%%%%%$%%%%$%$%%$$$%%%$%%%%%%%%%%%%%%%%%%%&%%&%%%%%%%%%%%$%$%%$%%%%%%$%%%$%$%$$%$$%$$$$$$%$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$#$##$$$$$########@#@@#@#@@#@@@@@@@@@+@@+@+@+++++++++++++++.++.+...+.+.+..+.++@++@@@@@+@@++@+",
-"++.+..+.++.++++#@++++++++++++++++++@++@+@+@@+@@@@#@@++++++++++@#@@@@@@@@+@+@++++@++++++@+++@++@++@+@@+@++@@@@@+@@@+@@@@@@@@@@@@#@@#@@@@@@@@@@@@@@@@#@#@@#@@#@#@##@#@@#@###@@@#@@#####@#@#@#####@##@#$$$#$##########################$#$$$%%$$%$%%$$$$##$##$$$$#$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$$$%$$%$$%%$%$%$$%$%$%$$%%$%$%%%$%%%$%$%%%%%%;,,,,,,>=%%%-,,,,,,,%%=,,,,,;%%%,,,,,,,,,,,,;%%$%%%$%%$%%$%%$%$%$%%$%$%$%%%%$%%%%$%%%%%%%%%$%%%%%%%%%%%&%%%%&%%%%%&%%%%%%%$%%%%%%%%$%$%$%%$%$%$%$%$%$$%$%$$$$$$$$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$#$$$$$$$############@@#@@#@@@@@@@@@@+@+@+@+@+++++++++++++..+.++.......+.+.++++@+@@@@@+@+++",
-"+.++++++.++.++##++++.+++++++++++++++@++@+@@+@@@@@@#+++++++++++##@#@@@@@@@+@++@+++++++@++@+@+@++@++@+@+@@@+@+@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@#@#@##@@#@@#@#@@@##@###@@#@#@#@##@#@###@####$$$###############$########$$#$$$%$$$%$$%$$$$###$#$#$##$$#$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$$%$$$$$%$%$$%$$$$$$%$%$$%$$%$$%$%$%%$%$%$%%$%%$%$%$%%%%%%%%%%%&,,,,,,,,,,>%%&,,,,,,,$*,,,,,,,=%%,,,,,,,,,,,,>%%%%%%%%%%%%%%%%%%%%$%%%%%%%%$%%$%$%%$%%%$%$%%%$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%$%%%%%$%%$%%%$%$%$%$%$$$$$$$$$$%$$%$$$$$$$$$$$$$$$$$$$$$$$$$#$$#$#$$$$$$#########@##@#@#@@@@@@@@@@@@@+@@++@++@++++++++.++++++.++.+.+.+...+.++++@+@@@@@@+@@",
-"+++.+..+.++++@#@++++++++++++++++++@++@@+@@@@@@@@##@++++++++++@#@@@#@@+@@+@++@+++@+++++@++@++++@+@+@+@+@@+@@@@@@+@@@@@@@@@@@@@@@@@@@@@@@#@@@@@@@@@@#@@@#@@@#@#@@##@#@##@#@#@#@#@@####@#@#@#####@#####$$#$#####################$##$$%$%$$%$%$$$$$##$##$###$#$$$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$$$$%$$$$%$%$$%$$%$$%$%$%$%$%$%$%%%$%%%%%%%%%%%%%%%%%%%@,,,,>;-;,,,,>&%;,,,,,-&>,,,,,,,,%%,,,,,,,,,,,,>%%%%%%%%$%%%%%$%$%$%%%%$%$%$%%$%%%%%%%%$%%%%%$%%%$%%%%%%%%%%&%%%%%&%%%&%&%%%%%%%%%%%%$%$%%%%%$%$%%%$%$%$%$%$%$%$$$$$$$%$%$$$%$$$%$$$$$$$$$$$$$$$#$$$$$$$$$$##########@##@#@#@#@#@#@@@@+@@@+@@+@++++++++++++.+.+.+..+.+....+...++++++@@@@@@@+@",
-"+..+.++.++.++@#++.+.++++++++++++++++@++@@+@@@@#@@@++++++++++@#@@#@@@@@@+@++@+++++++++++@++@+@@++@+@@+@+@@@+@+@@@+@+@@@@@@@@@@@@@@@@@@@#@@@@@@@@@#@@#@#@@##@#@@#@#@##@@##@#@@##@##@#@@#@##@#@#@##@##$##$#######################$$$$$%$$%$$$$$#$##$###$#$$#$###$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%$%$$$$$%$$$$%$$%$$%$$%$%%$%$%$%$%$%%%%$%%%%%%%%%%%%%%%%%%&%&>,,,&&&%%#=,,,=%%;>,,-%$,,,,,,,,,$$,,,,,,,,,,,,>%%%%%%%%%%%%%$%%%%%%%$%%%%%%%%%%%%%%$%$%%%%%$%%%$%%%%%%%%%%%%%&%%&%%&%%%%%%&%%%%%%%%$%%%%%%$%%%%%$%%$%$%$$$%$$$$$%$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$##########@##@@#@#@@@@@@@@@@@+@++@++@+@+++++++++++.++++.+..++...+...++++++@@@@+@@",
-"+++.++.++++++$@++++++++++++++++++@+@+@@+@@@@@@@##+++++++++++##@@@@@@@@+@+@+@++@+++++@@++@++@+++@+@+@+@@+@@@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@#@#@@#@@@@#@@@##@@@#@##@#@#@#@#@#@##@@##@##@#@##@###@######$$$#$###################$$$%%$%%$%%$$$$####$##$#$#$##$#$#$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$$$$$$%$%$%$$%$%$$%$%$$%%$%$$%$%%$%%%%%%%%%%%%%%%%%%%%%%&%&%&%&&,,,@%%%%&%%-,,,#&%&#.$&%,,,,,,,,,$%>,,,,,,,,,,,*&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%$%$%%%%%%%%%%%%%%%%%%&%%&%%&%%%%%%%%%%%$%%%%$%$%%$%$%$%%$$%$%$%$$%$$$%$%$%$%$%$$%$$$$$$$$$$$$$$$$$#$$$$$$##$##########@##@#@#@#@@@@@@@@@@@+@+@+@+++++++++++++.+.+.+.+...+...+..+.++@++@@@@+",
-"+.++.+++.+.+##++++.+.++++++++++++++@+@+@@@@@@@@@@++++++++++@#@@#@@@@+@@+@+++++++++++++@++@++@++@+@+@+@+@@+@@@+@@@+@@@@@@@@@@@@@@@@@@@#@@#@@@#@@#@@@#@#@@##@#@#@#@#@@#@#@@#@###@##@#@##@###@#######$#$#$################$#$$$%$$%$%$$$$$####$$##$$#$#$$$#$#$$#$$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%$$$$%$$$$$$%$%$%%$$%$%$%$%%%%%%%%%%%%%%%%%%%%%%%&%%%%%&%&%>,,-&%&&%%&&%,,,&%&%&%&%%;,,,,,,,,#&=,,,,,,,,,,,#%%%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%&%&%%%%%%%%%%%%%%%%%%%%$%$%%%%$%%$%%%$%%$$%$$$$$$$%$$$$$$$$$$$$$$$$$$$$$$$$$$$$$#$$%$%$$#$##$###########@##@#@@#@@@@@@@+@+@+@++@++++++++++.++++.+.+.+.+..+....++++++@@@@@@",
-"++.++.+.++++$+++.+++++++++++++++@+@+@+@@@@@@@@##+++++++++++#@#@@@@@@@+@++@+@+@++++++@+@+@++@++@++@+@+@@+@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@#@@@#@#@@@#@@#@#@#@#@#@#@#@#@#@#@#@#@#@######@@##@#########$#$$################$#$$%$$%%$%$$$###$##$##$###$#$##$#$$#$$$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$%$$$%$%$$$%$%$%$$$%$$%%%%%%%%%%%%%%%%%%%%%%%%%%%&%&%%&%&&%&%%&>,,&%&%%&&&%#*,,-&%&&,>=%*,,,,,,,&&%%>,,,,,,,,,$%%&%%%&&&&%%%%%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%&%&%%%%%%%%%%%%%%%$%%$%%$%$%%$%%$%$%$%$$$$$%$%$%$%$%$$%$%$$%$$$$$$$$$$$$$$$$$$$#$############@##@@#@#@@@@@@@@@@@+@@+@+@+@++++++++++.++++.+.+.+..+.+....++++++@@@",
-"+.++.+.++++##++.+++++++++++++++@+++@+@@@@@@@@#@@++++++++++@@#@@@@@@+@@++@++++++++++@++++++@++@++@++@+@+@@+@@+@@@+@@@@@@@@@@@@@@@@@@@@@#@@#@@@@#@@@@@@#@#@##@###@@##@#@#@#@##@###@#@@@############$##$$###############$$$%$%$%%$$$$$#$$####$$#$#$$#$$#$#$$#$$#$$$$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$%$$$%$%$%$$%$%%$%%%%%%%%%%%%%%%%%%%%&%&%%%&%&%%%%&%&&%&&&&$,,,%&%&&&%%&&&,,;&&;,,,,-%=,,,,,;&%&&%;,,,,,,>%%%&%&%&%%%%%%&%&%%&%&%&%&%&%%%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%&%%%&%%%%%%&%%&%%%%%%%$%%%%%%$%%%$%$%$$$%$$$%$%$%$$$%$$$%$$$$$$$$$$$$$$$$$$$$$%$%$$$###$#$###########@##@#@@#@@@@@@@+@@@+@++@+++@++++++.+++.+.++.+...+......+..+++@+@@",
-"++.+.+++.++$+++++.+++++++++++++++@++@+@@@@@@@#@++++++++++@##@#@@@@@@+@+@+@+@+@++++@++@+@+@+@+@+@@@@+@+@@@@+@@@+@@@@@@@@@@@@@@@@@@@@@@@@#@#@@##@@#@@#@#@#@@#@#@@##@@#@#@###@###@###@###@##########$#$###############$$$%%$%$%$$$$#$##$###$$##$#$##$##$#$#$$#$$$##$$$$$$$$#$$$$$$$$$$$$$$$$$$$$$%$%$$%$$%$$%$$%$$$%%$%%$%%%%%%%%%%%%%%%%%%&%%%%%%&&%&%&&&&&%&%&&&%&&,,,@&&&%&&&&&=,,=&&,,,,,,&&%-;-&%&&&%&%%->>>=*&%&%&%&%&%&%&&%&%%&%%%%%%%&%%&%%%&%&%&%&%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%%%%&%%%%%%%&%%%%%%%$%$%%%%$%%$%$%%$$%$%$$$$$$%$$%$%$$%$%$%$%$%$$$$$$$$$$%$$$$$$$$$#$####$#########@@#@#@@@@@@@@@@+@+@@+@+++++@+++++++++.++..+++...+..+...+.++++@@",
-"+.+.+.+.++#@++++++.+++++++++++@+++@+@@@@@@@@@#@++++++++++@#@@@@@@@@@++@+@+++++++++++++++++@+++@+++@+@@+@+@@@+@@@@+@@@@@@@@@@@@@@@@@@#@@@#@@#@@@#@@#@@#@#@##@###@@##@###@@###@##@#@##@##@########$#$#$#############$$%$$%$$%$$###$#$$###$#$#$$#$$$#$#$$#$#$$$#$$$$$$#$$$$$$#$#$$$$$$$$$$$$$$$$$$$$%$$%$%$%$%$$%%$$%%%%%%%%%%%%%%%%%%%%%&%%%&%&%&%%%%&%&%&&&&&&&&&&$>,,&&&&&&&&&&;,,-&&,,,,,,&&&&&&&&%&&&&&&&**&&&&&&&%&%&%&%&%%&%&%%&%&%&&%%&%%&%&%%%%%%%%%%%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%&%%%&%%&%%%%%%%%%%%%%%%%%%%$%%%$$%%$%$$%$%$%$$%$$%$$%$$$$$$$$$%$$%$$$$$$$$%$%$$$$##$#$##########@###@@@@#@#@@@@@@@+@+@+@+@@+++++++++.+++.+++...+...+......+.+++++",
-"+.++++.++@#@++.+.+++++++++++++++@+@+@@@@@@@@#@++++++++++@#@@#@@@@+@+@++@+++@+@++@+@+@+@+@++@+@++@+@+@+@+@+@+@@@+@@@@@@@@@@@@@@@@@@@#@@#@@#@@@#@@@#@##@#@##@#@#@##@@#@#@###@##@####@##@###########$#$############$%$%$%$%$$$##$#$#$#$#$#$$#$##$#$##$$#$$$$$#$$#$$$#$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$$%%$%$%$%$%%$%%%%%%$%%%%%%%%%%%%%&%%&%%&%%&%&%&&&&%&&&&&&&&&&&&&&-,,>&&&&&&&&$,,,&&%,,,,,,&&&&&&&&&&&&&&&&&%&&&%&%&&&&%&%&%&&%&%&&%&%&%%%&%%&%%%&%&&%&%&%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%%&%%%%%%&%&%%%%%%$%%$%$%%$%%%$$%$%%$%$%$$%$$%$$%$$%$%$%$%$$$$$$$$$$$$%$$$$$$#$$#$#$###########@###@@#@@#@@@@@@@@@+@@+@++@+@+++++++.+++..+++.+.....+.....+++++",
-"++.+..+++#@++.++++.+.+.++++++@+@+@+@+@@@#@#@#+++++++++++@#@@@@@@@@@+@+@+++@+++++++++++++++@+++@+@@+@+@@+@@@@@+@@+@@@@@@@@@@@@@@@@@@@@#@@#@@@#@@@#@@@#@####@##@#@@##@#@##@##@###@#@####@########$$#$$##########$%$%$%$%$$$###$$#$$##$#$##$#$$#$##$$##$#$$#$$#$$$#$#$$$$$$$#$$$$$$$$$$$$$$$$$$$$%$$%$$%$%$%$%%$%%%$%%%%%%%%%%%%%%%%&%%&%&%&%&%&%&%&&&&&&&&&&&&&&&&&&%,,,-%&%%%%&>,,>%%%;,,,,=%%%%&%%=>>>>-&&&&&&&&&&&&%&%&&&%&&%&%&%&%&%&&&&%&&%%&&%%&%%%&%%%%&%&%&%&%%&%%%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%&%&%%%%%%&%%%%%%%%%%$%$%$%%$%%$$%$%$%$$%$$%$$%$$$%$$$$$%$$%$$$$$$$$%$$#$$$#$##$#############@##@@@#@@@@@@@@@@@+@+@+@+++++++++.+++.++.+..+.+.+...+..+..+++",
-"+.++.+.++$+++++.++++++++++++++++++@@@@@@@@#@@++++++++++@#@@@@@@@@++@+@++@+++@++@++@+@+@+@@++@+@+@+@@+@@@+@+@@@+@@@+@@@@@@@@@@@@@@@@@@#@@@#@#@@##@##@#@#@###@##@##@@#######@##@#####@#@#########$#$$#########$$%$%$%$%$$####$##$##$$#$#$#$#$#$#$#$$$$#$$#$$#$$#$#$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$$%%$%$%%$%%%%%%%%%%%%%%%%%%%%&%&&%&%&%&%%&%&&&%&&&&&&&&&&&%&%%%%%%%%%=,,,>%%%%&,,,,%%%%%=>>*$%%%%%%>,,,,,,,*%%%&%&&&&&&&&&&%&&%&%&&&%&&&%&%&&%&%&&%&&%&&%%&%&&%%%%%%%%&%%&%%%%%&%%%%%%%%%%%%%%%%%%%&%&%%&%%%%%%%%%%%%%%%%%%$%%%%$%%$%$%$%$%$%$%%$%%$%%$%$%$$%$%$$$$$$%$$$%%$$%$$$#$$$$$#$#$###########@##@#@@#@#@@@@@@@@@+@@+@+@+@++++++++++++.++.............+.++",
-"++.+++++##++.+.++.+.+.++++++@+@+@+@+@@@@@#@#+++++++++++##@@@@@@@+@@+@++++@+++@++++++++@+++@+@+@+@+@+@@+@@+@@+@@@@+@@@@@@@@@@@@@@@@@@@@#@#@@@#@#@@@@#@###@#@###@#@###@##@#@##@#@#@#@###########$$$#$#######$$%%$%$%$$####$#$#$#$#$#$###$##$##$##$$##$$$#$$#$$#$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$%$%$$%$%%$%%%%%%%%%%%%%%%%%&%&%&%%%&%%&%&%&&&&%&&&&&&%%%%%%%%%%%%%%%%%%%%;,,,,>>,,,,,&%%%%%%&%%%%%%%%,,,,,,,,,,=%%%%%$%%%%%&%&&&&&&&&%&&&%&&&&&%&&&%&&%&%&%&&%&%%&%&&%&%%%%%%%%&%%%%%&%&%&%%%&%&%%%%&%%%%%%%%&%&%&%&%%&%%%%%%%%%$%$%%$%$%$%%%$%$%$$%$$%$$%$%$$$$%$$%$%$$$$%$$$%$$$$$$#$##$#$##$###########@##@#@#@@@@@@@@@@@@+@++@++++++++++.+.+.+.++.+.+.+.........+",
-"+.++..+@#++.+++.+++++++++++++++@+@+@@@@@@#@@++++++++++#@@@#@@@@@+@+++@++++@+++++@+@+@+++@++@++@++@+@@+@@+@@+@@@+@@@@@@@@@@@@@@@@@@@#@#@@@@#@#@#@###@#@#@###@##@#@@#@###@####@###@#############$#$$#######$$%$%$%$$##$##$###$#$#$#$#$$##$#$#$#$$$#$$$#$$#$$#$$$#$$$$$$$$$$$$$$$$$$$$%$$$%$%$%$$%%$%$%%%%%%%%%%%%%%%%%%&%%&%%%&&%&&%&&&&%&&&%%%%%%%%%%%%%%%%%%%%%%%%%%%-,,,,,,,,,*%%%&;>>=%%%%%%%>,,,,,,,,,,,&%%%%%%%%%%%%%%%%%%&&&&&&&&&&&&&&&&&&%&&&&&&%&&%&%&%%&%&&%&%&&%%%&%%%%%%%%%&%%%%&%&%%%%%%%%&%%%%%%%%%%%%&%%%%%%%%%%%$%%%$%%$$%%$%$%$%$%$%$$%$%%$$$%$$$%$%$$%$%$%%$$$$$$$$#$$$##$############@##@@@#@@@@@@@@@@@+@@+@+@+@++++++++.++++.+...............",
-"+.+.+++#@+.++.+++.+.+.++++@+@+@+@+@@@@@#@#@++++++++++@##@@@@@+@+@++@+++@++++++@++++++@+@+++++@+@++@+@+@+@@@@+@+@@@@@@@@@@@@@@@@@@@#@@@#@#@@@#@@#@@@#@#@##@##@#@#@##@#@###@#@##@##@#@#@########$$$#$####$$%%%$%$$$#$###$##$$#$$#$$##$##$##$#$#$#$#$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$%$%$%$%%%%%%%%%%%%%%%&%&&%&%%&%%&&&%&%&&%&%%%$%$%%%%%%%%%%%%%%%%%%%%%%%%%%%%%;,,,,,=##%&>,,,,,,=%%%%*,,,,,,>,,,,,>%%%%%%%%%%%%%=>,,,,,>&%&&&;,,>&;,,,,>&&&&%&&%=,,,,,>=%&%%*,,>%;>,,,,-%%%%%%;,,,,,>*%%%%%%;>,,,,,>&&%%%>>,,%%%%%%%>>,,,,,,-%%%$&,,>%%,,,=$>,,;$%$$-,,,,,>=$$%$%$$$$$$$$#$$##$$##$#########@##@#@@#@@#@@@@@@@@@@@++@++@+++++++.+++.+.++.+.+.+........+",
-"+..+.+@#+++.+.++.++++++++++++++@+@@@@@#@@#+++++++++++@@@@@@@@@+@++@++@++++++++++@+@++++++@+@@+@++@+@@+@+@++@@+@@@@@@@@@@@@@@@@@@@@@#@#@@#@#@@@#@@@#@#@##@#@##@#@#@###@##@####@#@#######@#####$$#$####$$%%%$$%$#$####$###$##$##$#$#$#$$#$$#$#$#$$$#$$#$$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%%%%%%%%%%%%%%%&%&%%%%&%&&%&&%&%&&&%%%%%%%%$%%$%$%$%%%%%%%%%%%%%%%%%%%%%%&%#@#+.$%&&,,,,,,,,,=&&&>,,,,;#%&,,,,,%%%%%%%%%%%%;,,,,,,,,,=%%%>,,>,,,,,,,,&&&&&&>,,,,,,,,;%&&-,,,>,,,,,,,-%&%&,,,,,,,,,$&%&%,,,,,,,,,,=%&%>,,,#%%%%=,,,,,,,,,,>%%%-,,,&,,,,=%,,,;$%$>,,,,,,,,#%$%$%$$$$$$$$$#$$#$$##$##########@###@#@#@@@#@@@@@@@+@@++@++@++++++++.+++..+..............",
-"++.+++#@+.+.++.+++.+.+.++++@+@++@@+@@@@@#@++++++.+++@##@@@@@@@+@@+++++++@+++@++++++@+@+@+++++@++@+@+@+@@+@@+@@+@@@@@@@@@@@@@@@@@##@@@@#@@@@#@@@#@#@####@###@##@###@####@##@######@######@###$$#$$##$$%%%$%$$#$###$###$#$#$$#$#$$#$#$##$#$##$#$$#$$#$$$#$$#$$$$#$$$$$$$$$$$$$$$$$$$%$%$%$$%$%%%%%%%%%%%%%&%&%%&%&&%&%&%&&%&&%&%%$%%%$%$%$%%%%%%%%%%%%%%%%%%%%%&%%&%&&&&&&&&&&&&&&>,,,,,,,,,,$&&>,,,,$&&%-,,,,&&&&&&%&%%%>,,,,,,,,,,,&%%>,,,,,,,,,,,>&&&&>,,,,>,,,,,&%%-,,,,,,,,,,,,%%%>,,,,>>,,;%%%%>,,,,,,,,,,,&%&>,,,%&%%%%,,,,,,,,,,,-$$=,,,,,,,,%#,,,>%$>,,,,,>,,>%$%$%$%$$$$$$$$$$$$##$$##$#$#$######@#@#@@#@@@#@@@@@@@+@+@++++@+++++++++.++.++.+..+.+......",
-"..+..##+.++.+.+.+++++++++@++++@@+@@@@@#@@+++++++++++#@@@@@@+@+@++++@++@++++++++@+@++++++++@@++@++@@+@+@+@@@@++@@@@@@@@@@@@@@@@@@@@#@#@@#@#@@@#@#@@#@#@###@#@#@##@##@#@##@##@#@#@#############$$$#$$$%$%$%$$#$###$##$####$$##$#$##$#$$#$$#$#$$$#$#$$$#$$#$$$$$$$$$$$$$$$$$$$$$$%$%$$$$$$%$%%$%%%%%%%%%%&%%&%%&%&%&%&&%&&%&%%%$%$%%$%%$%%%$%$%%%%%%%%%%%%&%&%&&&&&&&&&&&&&&&&&&&&%,,,,,,,,,,,-&*>,,,>&&&&=,,,,&&&&&&&&&&&,,,,*@@$,,,,>%&>,,,,;$#>,,,,*&&*,,,,&&#-,,,>&&-,,,,,*&-,,,,=&&,,,,**&#$%%%&-,,,,%@@%,,,,>%&>,,,%%%%&%;;$++%@>,,,,%%=,,,,,,>>%#,,,>$#,,,,&%@%%%$%%$%%$$$$$$$$$$$$$$$##$$##$#########@###@#@#@@@@@@@@@@@+@+@@++@+@+++++++.++..+.+..........",
-"++.++$++.+.++.++++.+.+++++++@@++@@@@#@#@@++++++++++#@@@@@@@@@+@++@++++++++++@+@+++++@+@+@+++@++@+@+@+@+@@+@+@@@+@+@@@@@@@@#@@#@#@#@@@#@@@#@@#@@@##@@###@####@##@#@####@##@######@##########$$$#$$$%%%%%$######$##$#$##$$###$#$#$$#$##$#$#$$$#$$#$$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%%%%%%%%%%%%%&%%&%%&%&%&&&&&&%%%%$%$%$%%$%$%%$%$%%%%%%%%%%%&%&&%&&&&&&&&&&&&&&&&&*&&&&&*,,,,,,,,,,,>&#,,,,,*&&*>,,,,&&&&&&&&&*>,,,=&&&&&,,,,&&>,,,*%%%@,,,,>&&>,,,&&&&&,,,,&&-,,,>@$&%>,,,>%-,,,>%&%%%&%&@,,,,&%%%%&,,,,%+>,,,%&%%%%%%%%%%%#,,,>#%-,,,,>%#%%#,,,>%$,,,,$%$$$%$%$%$%$$$$$$$$$$$$$#$$$$#$#$#$######@##@##@#@#@@#@@@@@@@@+@+++@++++++++.+++.+++..+.+.......",
-"+.+.#@++.+.+.++.+.++++++@+@+++@@@@@@@@@#++++++++++@#@@@@@@@@+@++@+++@+@+++@+++++@+@+++++++@++@++@+@+@@+@+@+@+@+@@@@@@@@@#@@@@@@@@@#@#@@#@@@#@@##@@##@###@##@##@#########@##@#@#@###########$$#$$%%%$%$#$##$#$$##$###$$##$$$#$##$#$$$$#$#$#$$$#$$#$$$#$$$$$$$$$$$$$$$$$$$$$$$%$%$$$$%$%$%%$%%%%%%%&%&&%%&%&&&&&&&&%%%%$%$$%%%$%%$%%%$%%%%%%%%%%%&&&&&&&&&&&&&&&&&*&*&&*&*&&&&*&&;,,,,,,,,,,,>*&=,,,,,**>,,,,,$&&&&&&&&&,,,,&&&&&&,,,,&&>,,,%&%&%*,,,>&%,,,,%&&&&>,,,$&-,,,-%&%&=,,,>&=,,,,&%%&%&%%%,,,,#%%&%&,,,,$%>,,,%%%&%%%%%%%%%%,,,,$%=,,,>&%%$%$,,,>%%,,,,&$%$%$$%%%%%$$$$$$$$$$$$$$$##$#$$#$#$#######@#@###@@#@@@#@@@@@+@@+@@++@+@+++++++++...+..+..+.....",
-"+.+@#++.++++.+.++++.+++++++@@+@+@@@@#@#+++++++++++@#@@@@@@++@++++++++++++++++@+++++@+@+@+@+@++@++@+@+@+@+@+@@+@@+@@@@@@@@@@@@@##@#@@@#@@@#@@##@@#@#@##@##@##@#############@#########$#####$#$%%%%%$%$$##$######$##$#$#$#$##$#$$##$#$$$#$$#$#$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$%$%$%%%%%%%&%&%%&%%&&&&%&%&&%%%%%$%%$%%$%$%$%%%$%%%%$%%%%&&&&&&&&&&&&&&&&&&*&&&&&&&&&&*&&&&&&=,,,,,,,,,,,,#&&,,,,,,,,,,,,=&&&&&&*&&&,,,,$&&&&%>,,,-%>,,,&&&&&%,,,,$$,,,,=--;-,,,,&&-,,,-&&&&&,,,>&%,,,,,>=%&%&&*,,,;%&%%%%>,,,*%>,,,%%%%%%&%&%&--=,,,,+%=,,,-%%%%%#,,,>%$,,,,,,&$%$%$%$%$%$%$%$$$$$$$$$$$$#$$##$##$#$#######@#@##@@@@@#@@@@@@+@+@+@++++++++++++++.++..+.......",
-"+.+#@++.+.+.+++++.+++++@+@+++@+@@@#@@#@++++++++++@#@@@@@+@@+@+@+@++@+++++@+++++++@++++++++@+@+@+@+@@+@+@+@+@+@+@@@@@@@@@@@@@@@@@@@@#@@@#@@@#@@#@#@###@#@##@###@#@#####@#@##@#@#######$####$$%%%%%$$########$##$#$#$$###$#$$#$#$#$$$$#$#$#$$#$##$#$$$$$$$$$$$$$$$$$$$$$$$$$%$%$$%$%$%%%%%%%%%%%&%%&%&%&%&&&&&%%%%%$%%%$%$%$%%$%%$%%$%%%%%&&&&&&&&&&&&&&&*&&*&&&*&&*&*&*&&&*&*&&&%,,,,,,,,,,,&&&&=,,,,,,,,,,,&*&&*&&&&&&,,,>&&&*&*>,,,;&>,,,&&&&&&,,,,%$,,,,,,,,,,,,,&&-,,,-&&&%&,,,>&&-,,,,,,,-&%%-,,,>&%%&%&>,,,-&>,,,&%&%%%%=>,,,,,,,,,%%=,,,-%$%%$#,,,>$#%,,,,,,,-$%%$%%%$$$%$$$$$$$$$$$$$$$#$$$#$#$#########@##@####@@@@@@@@@@@+@++@@+@+++++++.++..+...+.....",
-"..@#+.+.++.++...+++.+++++++@@@@@@@@@#@+++++++++++#@@@@@@@@+@+++++++++++++++@+++++++@+@+@+@++@++@++@+@+@+@+@+@@@+@@@@@@@@@@@@@@@#@@@@@#@@@#@@@##@@##@@@##@###@########@############$#####$$%%%%%$$$#$#$$##$##$#####$##$$##$#$##$$####$$$#$$#$$$$#$$$$$$$$$$$$$$$$$$%$%$$$%$$%$$%$%%%%$%%%%%%%%%%%&%%&&&&&&%%%$%$%$%%%$%$%$%$%%$%%%%%%%&&&&&&&&&&&&&&&&*&&&&&*&&&*&&&&&&&&&&&&&*&&;,,,,,,,,,,&&&&&;,,,,,,,,>#%&&&&&*&&&&,,,>&*&&&&>,,,-%>,,,&*&&*&,,,,%&,,,,,,,,,,,,,&&-,,,-&%&&&,,,>$%&-,,,,,,,>%&-,,,>&&%&%&>,,,-%>,,,%%%%&%;,,,,,,,,,,>#%-,,,=%%%%%#,,,>#$%&,,,,,,,,%%%%$$%$%$$$$$$$$$$$$$$$$$$#$#$##$$#########@#@@#@#@#@@@@@@+@@+@@+++++++++++++.++.+....+...",
-"++$@+.+.+.++.+++.+++++++@+@+@+@@@@#@#+++++++++++#@@@@@@+@++@++@++++++++++++++++@++++++@+@++@+@++@+@+@@+@@+@@@+@@@+@@@@@@@@@@#@@@@@@@@@#@@@#@@#@#@#@@##@@##@###@#@######@#@##@###########$%%%%%%$####$###$##$##$#$#$#$#$#$#$$#$#$$#$$#$#$#$$$#$#$$#$$$$$$$$$$$$$$$$$$$$$$$%$$%%%%$%$%%%%%%%&%&&&%&&&&&&%%%%%%%$%%%$%$%$%$%$%%%%%%%&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&*&*&*******,,,,,,,,,&&****&=,,,,,,-***&*&&&&&*&&,,,,$&&*&*>,,,-&>,,,&&&*&&,,,>&&,,,>&%%%%%%%%%%-,,,-&&&&&,,,>&&&%%;,,,,,,;&-,,,>&%&%%&,,,,=&>,,,%%%%%;,,,,;-&%,,,,$%-,,,=%%%%%%,,,>$%%$@=,,,,,,>$%%%$$%$$%$$$$$$$$$$$$$$$$$#$$#$###$##########@#@@#@@@@@@@@@+@+@+@@+++++++++.++.+.+.......",
-".#@.+.+.++.+.+.+++.+++++++@+@@@@@@@#@++++++++++@@@@@@+@@+@+++++@++++++++++++++++@+@+@++++@+@++@++@+@+@+@+@@+@@@+@@@@@@@+@@@@@@@@@@@@#@@#@#@@#@@#@#@#@##@###@@##########@###############$%%&%%$####$###$###$#$##$#$#$$#$#$$##$$##$#$#$##$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%%$%$%%%%$%%%%&%%&%%&&&%&&%%%$%$%$%%%$%%$%$%$%$%%%%%&&&&&&&&&&&&&&&&&*&&&&&&*&*&&&*&*&****************&$>,,,,,,*****************************,,,,$&*&&&,,,,*&>,,,&*&&&=,,,,#&,,,,$&&&%&%%&%%-,,,-&&&&&,,,>%&&&&$@*,,,,,$-,,,,#%&&%#;,,,%%>,,,%%%&%,,,,$%%%$,,,,@%-,,,-$%%%%#,,,>%$%%%@%%,,,,,%%%%$$$%$$%$%$%$%$$$$$$$$$$$$#$$#$$#$######@#@#@##@@@@@@@@@@@@@+@++@+@++++++++.+.+..+.....",
-"@$++.+.+.++.++++.++++++@+@+@+@@@@##@+++++++++++#@@@@@@@+@++@+@+++++++++++++++++++++++@+@++@++@+@@+@+@+@+@+@+@+@@@@@@@+@@@@@@@@@@@@@@@#@@#@@@#@@#@#@##@@##@###########@###############$%%&%%%$###$##$##$#$##$#$#$##$##$#$$#$$$#$#$#$##$$#$#$$$$$$$$$$$$$$$$$$$$$$$$%$%$$%$$%$%%%%%%%%%%&%%&&%&&%&&%%$%$%%$%%%%$%%%%%$%%%%%%%&&&%&&%&&&&&&&&&&&&&&&&&*&&&&&***********=***************-;;*******************************,,,,*****%>,,,&*>,,,&&&&&>,,,=&&,,,,&*&&&&&&&&%-,,,-%%&&&,,,>&&&&&&&%%,,,,&%,,,,%&%%&$,,,,%&>,,,%&%%#,,,>%%&%$>,,,%%=,,,-%%%%%$,,,>%%%$%%%@%,,,,%%$%%$%$$%$$$%$$$%$%$$$$$$$$$$#$$##$#$##########@#@##@#@@@@@@@@@+@@+@++++++++.+++.++......",
-"#@+.+.+.++.+.+.+++++++@+++@@@@@@@@#+++++++++++#@@@@@@@+@++@+++++++++++++++++++++@+@+@++@+@++@+@++@+@+@@+@@+@+@@@+@@@@@@@@@@@@#@@#@@#@@#@@@##@#@@#@#@####@#@########################$$%%&%%$$##$###$##$#$#$#$#$$#$#$#$#$#$$#$#$#$$#$#$#$#$$$#$$$$$$$$$$$$$$$$$$%$%$$$$%$$%%$%%%%%%%%%%&%&%&%&&&&%$%%%$%%$%%%$%%%$%$%%%%%%&&&&&&&&&&&%&&&&&&&&&*&&&&&&************=****************************************************=>,,,;****=,,,,&%>,,,&*&**,,,,&&*>,,,;&&&*&&&&&&-,,,-%&%%%,,,>&&&&&&&&&,,,,%%,,,,*&&&%-,,,>&%>,,,%%%&%,,,,&&%%%,,,,#%-,,,-%%%%%@,,,>@%%%%$%%%,,,,%%%%$%$$%$%$%$$%$$$$$$$$$$$$$$$$$#$#$##$###########@@@@@@@@@@@+@@@+++@+@++++++.+.++.+..+..",
-"#+.+.+.++.+++.++.++++@++@+@@+@@@#@@++++++++++@#@#@@@@+@+@+++@+++++++++++++++++@++++++@++@++@++++@@+@@+@+@+@@@@+@@@@@@@@@@@@@@@@@@@@@@#@@#@@@##@#@#@@###@##########################$$%%%%%$$$####$###$$#$#$#$#$#$#$#$#$#$$#$$$#$##$#$#$#$#$$$$##$##$$$$$$$$$$$$$$$$%$$$%%$%%%%%%%%%%&%%&%&&&&%%%%%$%$%%$%%$%%%%%%%%%%%&&&&%&%&&%&&&&&&&&&&&&&&&*****=****=***=*************************&**&*&*&*&*&&*&*&*&*************>,,,,;**-,,,,%&*>,,,*&&=,,,,>*&*;,,,,>**&=>,;&&-,,,-%%%&%,,,>&&-*&&&&>,,,,&&>,,,,&&%=,,,,&%&>,,,=&%%%,,,,#%%=,,,,>$%-,,,=%%%%%%,,,>%%=*%%%%-,,,,$%%%%$%%$$$%$$%$$%$%$$$$$$$$$$$$$$##$#$#$##########@##@@@@@@@@@@+@+@++@++++++++++..+..+...",
-"+.+.+.+.++..++++++++++++@+@@@@@@@#+++++++++++@#@@@@@+@+@++@+++++++++++++++++++++@+@+@+@++@++@+@@++@++@+@+@@++@@@@@@+@@@@@@@@@@@@@@@@@@#@@@##@@##@#@#@#@##@#######################$%%%&%$$$$#$#$###$###$#$#$#$##$#$$#$#$$#$$#$#$$$$#$$##$$$$#$$$$$$#$$$$$$$$$%$%$%$$%$%$%%%%%%%%%&%&%&&&&%&%%%%$%$%%%$%%%%%$%$%$%%%&&&&%&&&&&&&&&%&&&&&&&&&*&********************************&*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&,,,,,,,,,,,>***>,,,,,,,,,,,&&*&&,,,,,,,,,,,,&&;,,,-&&&%&,,,>&*,,,,,,,,,,&&&&,,,,,,,,,,,;&&%>,,,,,,>%,,,,,,,,,,,,,$%-,,,-%&%%%#,,,>%%,,,,,,,,,,>%%%%$%$%%%$$%$$%$$%$%$%$$$$$$$$$$$$#$#$##$##########@@##@#@@#@@@@@@+@++@+++++++++++.+....+",
-"+..+..+.+.+++.++++++@+@++@+@@@@#@@++++++++++@#@@@@@+@@+++++++++++++++++++++++++++++@+++@++++@+@+@+@@@+@+@@+@@@+@+@+@@@@@@@@@@@@@@@@@#@@@#@@#@#@#@####@##@#######################%%%%%$$$$$$#####$#$#$#$####$#$#$#$#$$$#$$$$##$#$$$#$#$$$##$$#$$#$$$$$$$$$$$$$$$$$$%$%$%$%%%%%%%%%%%&%&%&%%%$$%%$%%$%%$%%$%%%%%%%%&&%&&&&&&&&%&&&&&&&&&&********************************&&&&&&&&&&&&&&&%&&&%&&%&%&%&&&&&&&&&&&&&&&&&&&&&#,,,,,,,,,>****>,,,,,,,,,>***&&%%,,,,,,,,,,>&&-,,,;&&&&&,,,>%=,,,,,,,,,>&&&&*,,,,,,,,,;&%&##,,,,,,,$%,,,,,,,,>,,,&%=,,,-&%%&%$,,,>%$,,,,,,,,,>%%%%$%%%$$$%%$%$%$%$$$$$$$$$$$$$$$#$$#$#$$#$#########@#@#@@#@@@@@@+@@@@++++@++++.+.+.+.+...",
-"+.+..+++.+.+.+++++++++++@@@@@@@#@++++++++++@@@@@@@+@@++@+++@++++++++++++++++++++++@++@+++@+@+++@+@+++@+@++@@@+@@@+@@@@@@@@@@@@@@@@@@@@@#@@#@#@@#@#@#@#@#######################$%%%%%$$$$$$$$#$#$##$##$##$$$#$$#$#$$#$$$#$#$$$##$#$$#$#$#$$$$$#$$$$$$$$$$$$$%$%$%$%$%$%%%%%%%%&%&%&%&&%&%%$%$%%$%%$%$%%%$%%%%%%&&&&&&&&&&&&&&&&&&&&&&*************************&**&&&&&&&&&&&&&&&&&&&%&%&%&%&&%&%&&&&%&%&&&&&&&&&&&&&&&&&&&;>,,,,>*&*&&*>,,,,,,>,==*******%;>,,,,>;%**&&>>>=&*&&*>>>>#&*>>,,,,>*&&*&&&&;,,,,,>*%&&&%&;,,>,>=$&*>,,,,>&%,,>#&&,,,=%%&%%%,,,*#%&;>,,,,>*&&%%%%%$$%%%$$%$%$%$$%$%$%$%$$%$$$$$#$$#$###$##$#######@#@#@#@@@@@@@@++@+@+@++++++++++.+....",
-".+.++...+.+++.+++++++@+@+@@@@@#@+++++++++++#@@@@@@@@++@++++++++++++++++++++++@+++++@+++@+++++@@+@++@@@+@@+@+@@@+@@@@@@@@@@@#@@#@@#@@#@@@#@@##@#@#@###@#######################$%%%%$$$$$$$$####$#$###$##$###$##$$#$$$#$#$$#$$#$$$#$$$$#$$$$#$$$$$$$$$$$$$$%$$$$%$%%%$%%%%%%%%%%&%&&&%%%$%%%$%%$%%$%%%%%%%%%%&&&&&&%&&&&&&&&&&&&&&************************&*&&&&&&&&&&&&&&%&&&%&%&%&%&&&&&%&%&&&&%&%&&&&%&&%&&&&&%&&&&&&&&&&&&$&#&&&&&&&>,,,#%%*%************&$%$**&&*&&#%*&&&*&&***&&&%&*%#$#%&&*&&*&&&$$%&&&&&&%&&%%#@%$%%%%&&#$#+#%&#+#&%&#%@#&&%%&%%%%%%%%%&#%%%%%%%%%%%$$%$%$%%$%$%$%%$%$$$$$$$$$$$$$$$$$$#$$##$############@#@#@@@@@@@@@+@++++++++++.++..+..",
-"+...+++.+.+.++++++++++@+@@@@@@#+++++++++++@@#@@@@+@++++++++++++++++++++++++++++@++++++++++@+@++@++@++@+@+@+@@+@@@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@###@#@@######################$$%&%%##$$$$$$#$#$#$##$###$$#$$$#$$$#$$#$$#$$$$$#$$#$$$#$#$$#$$$$$$$$$$$$$$$%$$$%$%$%$$%%%%%%%%&&%&%&%%%%%%%$%$%%$%$%%$%$%%%%%&&&%&&&&&&&&&&&&&&&&**********************&*&&&&&&&&&&%&&&%&%&&&&%&&&&%&%&%%%%&%&%%&%%&%&%&%&&&&&&&&%&&&%&&%&%&%&&&&&&&&&&&&$>,,,&&&*&&***************&&*&&**&*&*&*&*&&*&&&&&&&%&%&%&&&&*&*&&&&&&&&&&&&&%&&%&&%&%&%%&%&%&%&%&%&%&%&&%&%%&%&%&*&%%%%%%%%%%%%%%%%%$%%%%$%$%%$%$%$$%$%$%$%$%$%$%$$$$$$#$$#$##$#$#$#######@#@#@@@@@@@+@+@+@+@+++++++..++..+",
-"..++..+.+.++.++++++++@+@@@@@@@@+++.++++++@@@@@@@@+@++@++++++++++++++++++++++++++@+@+@+@+@+++@+@++@+@+@+@+@@+@@@+@@@@@@@@@@@@@@@@@@@@@#@@@@@#@#@#@#@##@####################$%&%%$##$$$$$$$###$#$#$#$#$##$$##$#$#$$#$#$$$$$#$$#$$#$$#$$$#$$$$$$$$$$$$$$$$$$$$$%%%$%%%%%%%%%&%%&%&&&%%$%$$%$%%$%$%%$%%%%%&&&%&&&&%&&&&&&&&&&&***************&**&**&&&&&&&&&&&&&&&&&&%&&&&%%&%&%&%%&%&%&&&&%&%&&%&&&%&&%&%&&%&%&%&&&%&&%&&&&&%&&&&&&&&&&&&>,,,&&&&&&&&&&*****=**********&&*&*&*&&*&*&*&*&*&&&&&&&%%&%&&&*&**&*&&&&&&&&&&&&%&%&&&&&%&%&%&%&%%&%&%&%&%&%&%&&%%&%%%%%%%%%%%%%&%%%$%$%%$%%$%%$%$%$%$%$$%$$%$$$$%$$$$$$$$#$$#############@#@@#@@@@@@@@+@++++@+++++++..+..",
-"+.+..+.+.++.++++++++@+@+@@@#@#+++++++++++@#@@@@@@@++++++++++++++++++++++++++++@++++++++++++@+@++@++@+@+@+@+@@@+@@@@@@@@@@@@@@@@@@@@@@@#@#@#@@#@@##@######################$%%%%$###$$$$$$$$#$#$#$##$##$$##$$#$$$$#$$$#$$$$$#$$$$$#$$$#$$$$$$$$$$$$$$$%$%$%$%%$%$%%%%%%%&%&%%&%&%%$$%$%$%%%%$%$%%$%%%%%&&&&&&&&&&&&&&&&&&**********&**&**&***&*&&&&&&&&&&%&&%&%&%&%&%&%%&&%&%&%&&%&%&%%%%&%&%%&%%%%&%&%&&%&%&&&&%&%&%&&%%&%&&%&&&&&&&&&&>,,,&&&&&&&&&&&&&&*&******=******&*&*&*&*&*&*&*&*&*&&&&&&&%&%&&*&&&*&&&&&&&&&%&%&&&&%&%%&%&%&&%&%&&%%%&%&%&%&%&%%&%&%&%%%%%%%%&&%%%%%%%$%%%$%%$%$%$%$%$%%$$%$$%$%$$$$$$$$#$$$#$$#$#########@##@@@@@@@+@+@+@+@+++++++.+++.+",
-".+.++.+.++.+++++++@+@+@@@@@@@+++++++++++@#@@@@@++@+@++++++++++++++++++@++++++++++++@+@+@+@++++@+@+@@+@+@+@+@+@@@+@@@@@@@@@@@@@@@@@@@@@@#@@#@#@##@#@#@################$#$%&%%$####$$$$$$$##$$#$$#$$##$#$#$#$$$$#$$$#$$$$$$$$$#$$$$$#$$$#$$$$$$$$$$$$$$$$$$%$$%%%%%%%%%%%&%&&&&%$$%%$%$%%$%$%%%$%%%%%&&&&&&&&%&&&&&&&&********&*&*&*****&**&&&&&&%&&%&&%&&%&&%&%&%&%&%&&%%&%&%&%%%&%&%&&%%&%&%%&%&&%&%&%%&&%&%%%&%&%&%%&&%&&%&&%&%&&&&&&>,,,&&&&&&&&&&&&&&&&&*&*************&*&*&*&*&*&*&*&*&&&&&&&&&&%%&**&*&&&&&&&&&&&&&%&&%&&&&%&%&&%&%%&&&%&%&%&%&%&%&%&%%%&%%%%&%%%%%%%%%%%%%%%%$%%%$%$%$%$%$%$%%$%$$%$$$$$$$$#$#$#$##$#########@##@@@@@@@@+@+@++@+++++++..+.",
-"..+..+.+.++.+++++++@+@@@@@@@@++++++++++@@@#@@@@@@++++++++++++++++++++++@++++++++++++++++++@@+@++@@+@+@+@+@+@@@+@@@@@@@@@@@@@@@@@@@@@#@@@#@@##@#@@#####################$%%%%$#$##$$$$$$$#$$##$##$#$#$$#$#$$#$$#$$#$$$$$$$$#$$$$$$$#$$$$$$$$$$$$$$$$%$%$%%%%%%$%%%%%%&%&%&%&%%$$%$$%$$%$%%$%%$%%%%%&&&&&&&&&&&&&&&&*************&***&&*&*&&&&&%&%&%&%&%&%&%%&%&%&%&%&&%&&%&&%&%&%&%%%&%%&%%&%&%%&%%&%&%&&%%&%&&%&&%&%&&%&%%&&%&&&&&&&&&&*%&&&&&&&&&&&&&&&&&&&&&&*&*****=*******&*&*&*&*&*&*&**&*&&&&&&&&&%&&*&*&*&&&&&&&&&&&&&&%&%&&&%&&&&%&%&%&&%&&%&%%&%&%&&%%%&%%%&%&%&%%%%%%%%%%%%%%%%$%%$%%$%$%$$%$%$$%$%$$$$$$$$##$#$##$$######@@#@@@@@@@@@@++@++@++++++++.+",
-"+.+.+.+.+.++++++++@+@+@@@@#@+++++++++++@#@@@@+@@+++@++++++++++++++++++++++++++++++++@+@+@+++@++@+@@+@+@+@+@@@+@@@@@@@@@@@@@@@@@@@@@@#@#@@##@@#@######################$%&%%$###$##$$$$$#$##$#$$#$$#$##$#$#$$$#$$#$$$$$$$$$$$$$$#$$$$$$$$$$$$$$$$$$$$%$$$%$%$%%%%%%%&%%&%&&%%$%$$%%$%%$%$%%$%%%%%%&&&&&&&&&&&&&&&**********&**&**&*&*&&&&&&%%&&%&%&%&%&%&%&&%&%&%&%&%%&%%&%%%%%%&%&%&%%&%%&%%%%&%&&%&%&%%&&%&&%&%%&%&%&%&&&%&&%&%&%%&%&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&********=*******&*&*&*&*&**&*&*&&&&&&&&&&*&*&&*&&&&&&&&&&&&&&&&&&&%&%&&%&%&%%&&%&%&%&%&%%%%&%%&%%&%&%%%%%%%%%%%%%%$%$%%%$%%$%$%$%%$%$%$$%$$$$$$$$$$$#$$#$###$######@##@@@@@@+@@@++@+++++++.++.",
-"...+.+.+.++++++++@++@@@@@@@+++++++++++@#@@@@@@@++@++++++++++++++++++++@++++++++++++@+++++++@++@++@+@+@+@+@@+@@@+@+@@@@@@@@#@@@@#@@@@@@@#@@#@#@#@##@#################%%&%$#######$$$$$$$$#$#$###$#$#$#$#$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$$%%%$%%%%%%%%%%%&%&&%%$$%$%$%$$%$%%%$%%%%%&&&&&&&&&&&&&&&&*************&**&&*&&&&&&%%&%&%%&%&%&%&%%%&%%&%&%&%&%&&%%&%%&&%&&%%%&%%&%%&%&%&&%&%%&%%&%&%%&%%%%&%&%&%&%&%%&&%&%&%&&%&&%&&&%&%&&%&&&&&&&&&&&&&*&&&&&&&&&******=*******&**&**&*&*&*&*&*&&&&&%&%&&*&*&&*&*&&&&&&&&&&&&&&&&&&&&&&%&&&%&&&%&%&%&%&&&%%%%&%&%&%%%%%%%%%%%%%%%%%%$%%$%%%$%%$%$%%$%$%$%$$$$$$$$##$#$#$########@@#@#@@@@@@+@+@++@+++++++.+",
-"+.+.+.+.++++++++@+@@+@@@@@@++.+++++++@#@@@@@+@++@+++++++++++++++++++++++++++++++@++++@+@+@++@+@+@+@+@+@+@+@@+@@@+@@@@@@@@@@@@@@@@@#@@#@@#@#@#@@####@###############%%&$$######$#$$$$$$####$#$$$#$$##$#$$##$$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%%$%$%%$%%%%%&%&&%&&%$%%$%$$%$$%$%$%$%%%%&&&&&&&&&&&&&&&***********&*&**&*&&*&&&&%%%&&%%&%&%&%&%&%&%&%&%&%&%%&%%&%%&%&%%%&%%&%&%&&%&&%&%&%%&%&&%&&%&%&&%&&&&%&%&%&%&%&&%%&&&&&%&&&%&&%&&&&&%&&%&&&&%&&&&&&&&&&*&&&*&&&&*****=*******&*&**&*****&**&*&&&&&&&%&&&*&&&&&&&&&&&&&&&&&&&&%&%&&%&&%%&%%%&%&%%%&%%%&&%%&%&%%%%%%%%%%%%%%%%%%%%%%$%%$%%$%$%%$%$%$$%$$$$$$$$$$$#$#$$#$########@@@@#@@@@@+@+@++++++++++.",
-".+...+.+.+.++++++@+@@@@@@@+++++++++++@@@#@@@@+@+++++++++++++++++++++++++++++++@++++@++++@+@++@+@+@++@+@+@@+@@+@+@@@@@@@@@@@@@@@@@@@@#@@@@#@#@##@#@###############$%&%$$#####$##$$$$$$##$#$#$##$#$#$$##$#$$#$$$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$%$%%%%%%%%%%%&%&%&&%$$%$%$$%$$%$%%$%$%%%&&%&&%&&&&&&&&&***************&*&*&&&&%%%%&%%%%&%&%%&%%%&%%%&%&%%%&%&%%&%%&%&%%&&%%&%&%&%%&%%%&%&%&&%%%%&%%&%&%%&%%%&%&%&%&%&%%&&&%%%&%&&%&&&%&&%&%&&%&&%&%&&&&&&&&&&&&&&*&&&*&*&&*&****=*=*****&**&*&*&*&**&*&&&&&&&&&&&&**&*&*&*&&*&&&&&&&&&&&&&&&&&&%&&&&%&%&&%&&%%&&%&%&%&%%%%%%%%%%%%%%%%%%%%%%%%$%%$%$%%$%$%$$$%$%$$$$$$$$$$#$#$#$#$####@##@@@@@@@@+@+@+@++++++++",
-"+..++.+.++++++++@+@+@@@@@+++.+++++++@##@@@@+@@+@+++++++++++++++++++++++++++++++++++++++@++++@+++++@++@++@+@@+@@@+@@@@@@@@@@@@@@@#@@@@@@#@@@##@##################$%&%$#########$$$$$$##$#$$#$$##$$$##$$#$#$$$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%%%$%%%%%%%%%&%%&&%%%$%$$%$%$$%$$$%$%%%%&%&&&&&&&&&&&&***********&**&*&*&&&&&%%&%&%%&%&%%&%%&%&%&%&%&%&%%&%%&%%&%&%%&%%&%%%&%&%&%&&%&&%&%&%&%&%&&%&%&%&%&%%&&%&%&%&%&%&&%&%&&&%&&%&%%&&%&&&&&%&&%&%&&&&&&&&&&&&&&&&&*&&&&*&&*&&******==********&***&&****&*&&&&&%&&&&&&*&&&&*&&&*&&&&&&&&&&&%&%&&&%%%&&%&%&%%&&%%&&&%&%%&%&%%%%%%%%%%%%%%%%%%$%%%%%%%%$%$%%%$%$$$$$$$$$$$$$$$#$#$########@#@#@@@@@+@@+@+++++++++",
-"..+..+.++++++++@+@+@@@@@@+++++.++++@@@@@@@+@@+++++++++++++.+++++++++++++++++++@++@+@+@++@+@@++@@+@++@++@@+@+@@+@@+@+@@@@@@@@@@@@@@@@@@@@###@##############$##$#%%&%$$####$##$#$$$$$$$###$#$##$$##$$#$#$$$#$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%%$%%%%%%%%%%&%&&%%%$$$%$%$%$$%$$%$%%%%%&&&&&%&&&&&&&&***************&*&&&&&%%%&%%%%&%%&%&%%&%%%&%%%&%%%%&&%&%%&%%%%&%%&%%&&%%&%&%&%&%&&%&%&%&&&&%%&%&%&%&%&&%&%&%&%&%&%&%&%&%%&&%&&&&%&&&&%&%&&%&&&&&%&%&&&&&&&&&&&&&&&*&&&*&&*&*&******==***&***&****&*&*&*&*&&&&%&&&*&*&**&&**&&&*&&&&&&&&&&&&%%&&&&%&&&%&&%%&%&&%&&%%%%%%%&%%%%%%%%%%%%%%%%%%%$%$%$%$%$%$%$%$%$%$$$$$$$$$$$#$##$######@##@@@@@@@@+@++@+++++++",
-".+.++.+++.++++@+@+@@+@@@+.+.++++++@@@#@@@@@++@++++++++++++++++++++++++++++++++++@+++++@++@++@+@+++@++@+@+@+@@@@+@@@@@@@@@@@@@@@@@@#@#@#@@#@##@#@#@############%&%%#####$###$#$$$$$$$##$$#$#$$##$$$#$#$$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$%$%$%%%%%%%%%&%&%&&%%%$$%%$%$%$$%$$%$%%%%&&&%&&&&&&&&&**************&*&&&&&&%%%%&%%%&%&%%&%%%&%%&%&%%&%%&&%&%%%&%&%&%&&%%&%&&%&&&%&%&&%&&%&&&%&&%%%%&&%&%&%&%&%%&%%&%%&%&%&%&%&%&&%&%&%&%&&%&%&&%&%&&%&%&&&&&%&&%&&&&&&&&&*&&*&&&*&&&*&*******=*=******&*&*&***&*&*&&&&&&&%&*&*&*&&&&**&*&*&&&&&&&%&&&%%&%&%&%&&%&%%&&&&&%%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%%%$%$$$$$$$$$$$$$#$$#$#########@@#@@@@+@+@+@+++++++.",
-".+..+.+.++++++++@@@+@@@++++++.++++@@#@@@@@@@++@++++++++++.++++++++++++++++++++++++@+@++@++@++@+@+@+@+@+@+@@+@+@@@@+@@@@@@@@@@@@@@@@@@@##@###@###############$%&%$########$##$$$$$$$#$#$##$#$#$$$#$$#$$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%%$%%%%%%&%%&%&&%$$$%$$%$%$$%$%$%$%%%&&%&&&&&&&&&&***************&*&*&&&%%&%&%%&%%%%%%&%%&%%&%%&%&%%&%%%&%&%&%%&%%&%%&%&%%&%%&%&%&%&&%&&%&%&%&&&&&%&%&%&%&%&&%&&%&&%&&%&&%&%&&%&&%&&%&&%&&&&%&&&&%&%&&%&&%&&&&&&&&&&&&&&&*&&**&&*&*&*&&********=*=*********&**&*&*&*&&&&&&&&&*****&&*&&*&&&*&&&&&&&&&&%&%&&&&%&%&&&%&&&&%%%&%&%%%%%%%%%%%%%%%%%%%%%%$%$%$%%$$%$%$%$%$%$%$$$$$$$$$#$$#$#$######@#@@@@@@@+@+@+@+++++",
-"..++.+++++++++@+@+@@@@+.+.+.+++++@#@@@@@+@++@++++++++++.++++++++++++++++++++++@+@++++++++@+@++@+@+++@+@+@++@@@@@+@@@@@@@@@@@@@@@@@@@#@@@#@#@##@#@##########$%&%$#$####$#$###$$$$$$$##$#$$#$#$$$#$$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$%$%$%$%%%%%%%%%%%&%&&%$$$%%$%%$%$%%$$%$%%%%&%&&&&&&&&&&&**************&**&&&&&%%&%%%&%%&%&%&%%&%%&%%%&%%%&%%&%&%%%&%&&%%&&%&%&%&&%&&%&&&&&%&%&%&%&&&%&%&%&%&%&%&%&%&%&%&&%&%&%&%&%&%&%&%&&&&%&&%&%&&%&%&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&*&&*&&&&*&&**********=***&****&******&*&&&&&&&&&&&*&**&**&&**&&&&&&&&&&&&&&%&%&&&&&%&&&%&%&&&%&%%%&%&%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%$%$%$$$$$$$$$$$$$#$##$########@#@@@@@+@@@+++@++++",
-"++..+.+.++++@+@+@@@@@@+++++++.++@#@@@@@@@@+++++++++++++++++++++++++++++++++++++++++@++@+@+@+@+@+++@+@+@@+@@@++@+@@@@@@@@@@@@@#@@#@@#@@#@#@@###############$&&%$########$###$$$$$$$$#$#$##$$$#$#$$#$#$$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$$$$%%%%%%%%%&%&&&%&&%$%%%$$%$$%$%$$%%$%%%%&&&&&&&&&&&&*****************&&&&&%%%&%%&%%%&%%%%%%%%%%%%&%%&%&%%&%&%%&&%%&%%&&%%&%&&&%&&%&&%%&%&&%&&&%&%%&%&%&%&%&&&&&&&%&%&&%&&&%&&&%&&&%&&&%&%&&&&&&&%&&%&&&%&&&&&%&&%&&&&&&&&&&&&&&*&&&&&&&&*&*&&*&&*&***=*=**==***&*****&**&*&**&&&&&&&*&**&**&**&&*&&&&&&&&&%&%&&&%&&%&%&&&&&&%&%%%%%%&%%%%%&%%%%%%%%%%%%%%%%%%$%$%%%%%$%%$%$%$%$$$$$$$$$$$$#$#$#####@##@@@@@@+@+@@++++++",
-"...++++++.+++++@@+@@@+.+.+.+++++@@@@@@@@+++@++++++++++.+.++++++++++++++++++++@+@+++++++++++@+@++@@+@+@+@+@+@@@+@@+@@@@@@@@@@@@@@@@#@@##@#@#@#############$&&$$############$$$$$$$###$##$$#$#$#$$#$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$%$%%$%%%%%%%%&%%&&%%$%$$%$%$%$%%$%$%$%%%&&&&%&&&&&&&*****************&&&&&%%%&%%%%%%&%%%&%&%&%%&%&%%%&%%%%&%%%&&%%&%&%&%%&&%&&%%&%%&%&&&%&&%&%&%&%&&&%&&%&%&%&%%&%%&&&%%&%%&&%%&&&%&&&%&&&%&%&%&%&&&%&&%&&&%&%&&&%&&&&&&&&&&&&&&&&&&*&&*&&&*&&*&&*&*&*&****=**==****&*&*******&*&*&&&&&&*&**&*&*&*&*&*&&&&&&&&&&%&&&%&&&&&&&&&%&%&&&%&%%&%%%%%&%%%%%%%%%%%%%%%%%%%%$%$%%$%%$%$$$$$$$$$$$$$$#$#$#$######@#@@@@@@@@++@+@+++",
-"+.+.+.+++++++@@@+@@@+++.+++.+.+@@@@@@@++@++++++++++++++++++++++++++++++++++++++++++++++@+@+++@+@++@+@+@+@+@++@@+@@@@@@@@@@@@#@@@@@@@#@@#@##@#@##########$&&$##############$$$$$$$#$#$#$$#$#$#$##$$$$#$$#$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$%%$%%%%%%&&%%&&%%%$%$%%$%$%$%$%%$%%%%&&&&%&&&&&&&*****************&&&&%%%&%%%&%&%&%%%%%%%%%%&%%%%&&%%%&%%%&%&%%&&%&%%&&%&%&%%&&%&&&%&%&&%&%&%%&&%&%%&%&%&%&%&&&%&&%%&&&%&&%&&&%&%&%&%&&%&&&&%&&&%&&&&&&%&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&&&*&&&&*&*&********=**********&*****&*&*&&&&&*****&*&&&*&&&&&&&&&&&&&&%&%&%&&&&&&&%&%%&%%%%%%&%%%%%%%%%%%%%%%%%%%%%%%%%%%$%%%$%$%%$%$%$$$$$$$$$$#$##$#####@@#@@@@@@@@++++++@",
-"..++.++.+++++@+@@@@++.++.+.+++@@@@@@+@@@++@++++++++++.+.++++++++++++++++++++++@+++@++@++++@+@+++@++@+@+@@+@@@@@@@@@@@@@@@@@@@@@@@@@#@@##@#@##@#########%&&$######$#######$$$$$$#$#$#$#$#$$#$$#$$#$#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$%$$%$%%$%%%%%%%&%%&&&%%$%$%$%$%$%$%$%%$%%%%&&&%&&&&&&&&****************&*&&&%&&&%&&%%%%%%%%&%&%&%&%%&%&%%%%&%%&&%%&%%&%%&%&&%%&%&%&&&%&%%%&%&%&%%&%&&%%&%&&&%&%&&&%&%%&%&&&%&%&&%&%&%&%&&&%&&%&%&%&&&%&&%&%&%&&%&%&%&&%&&%&&&&&&&&&&&&&&&&&&&&&&&&&*&&&*&*&&&*&*&******=*=***********&****&*&*&&&&********&*&*&*&&&&&&&%&&&&%&&&&&&%&&&&&%&&&%&%%&%&%%&%%%%%%%%%%%%%%%$%%%$%%%%%%%%%$%$%$$$%$$$$$$$$#$$########@##@@@@+@@@+@+++",
-"++.+++++++@+@+@@@@++.++.+++.++@@@@@@@+@+++++++++++++.++++++++++++++++++++++++++++++++++@+@+++@+@++@++@+@+@+@@++@+@@@@@@@@@@@@@#@@@@@##@@#@##@###@#####%&&$##########$##$##$$$$$$$#$#$#$#$#$#$$$$$$$#$#$$$#$#$#$$$$$$$$$$$$$%$%$$%$$%$%%%%%%%%%%&%%&%&%%%%%$%$%$%%$%$%%$%%%&&%&&&&%&&&&**********&*****&*&&&&%&%%%%&%%&%&%&%&%%%%%&%%%%%%&%&%%%&%%%&%%&%&&%%&%&&&&%&&%%&%&%&%&%&%&%&%&%&%&%&%%&%&&&%&%&&%&&%&&%&&%&&&%&&&&&%&&%&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&&&*&&&&*&******=*==***************&*&*&&&&***&*&*&*&&&&&&&&&&&&&%&&&&&&&&&&%&%&&&%%&%%%%%%%%%%&%%%%%%%%%%%%%%%%%%%%$%$%$%$%$%$%$%$$$$$$$#$$###$#######@@@@@@@@@+@++@+",
-"..+.+.+.++++@@+@@@+++.++.+.++@@@@@@@+@++@+++++++++.+++.+.++++++++++++++++++++++++@++++++++@+@+++@++@@+@+@@+@+@@@@@+@@@@@@@@@@@@@@##@@@##@@#@@#@######%&&################$$$$$$$##$#$#$#$#$#$$#$#$#$$$#$$#$$$$$$$$$$$$$$$$$$$$$$%$$%$%%$%%%%%&%&%&&&&%%$%$$%$%$%%$%%%$%%%%&&&&&&&&&&&&**************&**&&&&%%&%%&%&%%&%%%%%%%%&%%%%%&%&%&%%%%&%%&%&%&&%&%&&&%&%&%&&%&%&%&%&%&%&%&%&%&%&%&%&%&&%&%&%&&&%&&%&&%&&&%&&%&&&%&%&&&%&&%&%&%&&&%&&&&%&&%&&%&&&%&%&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&*&*&*&*&**&*&*********=*=**************&*&*&&&&****&*&*&*&*&&&&&&&&&&%&&&&&&&&&&&&%%&&%&%&%&&%&%%%%%&%%%%%%%%%%%%%%%%%%%%%%%%%%$%$%$$%$$$$$$$#$$#######@###@#@@@@+@@+@++",
-"+.+++++++@+@+@@@@++.++.+.+.+@@#@@@@+@@++++++++++.+++++++++++++++++++++++++++++++++++@+@+@++@++@++@++@+@+@+@+@@@+@@@@@@@@@@@@@#@@@@@@##@#@#@##@#@####&&%$################$$$$$$#$#$##$#$$#$$$#$$$$$$$#$$#$$$$$$$$$$$$$$$$$%$%$%$$%$%%%%%%%%%%%&%&%&%%%$%%%%$%$%%$%%$%%%%&&&&%&&%&%&&***********&*****&&&&&%&&%&%&%%&%%%&&%&%&%%&%&%%%&%&%&%&%%&%%&%&%&&%&%%&&%&%&%&&%&%&%&%&%&%&%&%&%&%&%&%&%&%&&&%&%&&%&&%&&%&&&%&&&%&&&&%&%&&&&&&&&&%&&&%&&&&&&&&&&%&&&&&&&&&&&&&*&*&&&&&&&&&&&&&&&&&*&&&&*&&*&*&*&*&&****=**=*=****************&&*&&&&*****&**&&&*&*&&&&&&&&&&&&&&&&&&%&&&&%&%&%%%%%%&%%&%%%%%%%%%%%%%%%%%%%%%%%%%$%%%$%$%$$%$%$$$$$$#$#########@#@@@@@@@+@++@",
-".++..++++++@@+@@@.++.+.++.+@@@@@@@+@@++@++++++.+++++.+.+.+++++++++++++++++++++++@+@++++++@++@+@+@+@+@+@+@+@@@+@@@+@@@@@@@@@@@@@@@@#@@##@#@#@######$%&%#################$$$$$$$#$$#$#$#$#$$#$$$$#$$#$$#$$$$$$$$$$$$$$$$%$$$$$%$$%$%$%%%%%%%%&&%&&&&%%$%%$%$%%%$%%$%%%%%&%&&&&&&&&&*******&***&**&**&&&&%&%%&%%%&%%&%&%&%%%%%%&%%%%%&%%&%%%&%&%%&&%&%&%&&%&&&%&&&&%&%&%&%&%&%&%&%&%&%&%&%&%&&%&&%&%&&%&%&%&&%&&&%&&&%&&&&%&&&&&&%&%&&%&&&&&&&%&&&&%&&&&&&&&%&&&&&&*&&&&&*&&&*&&&&&&&&&&&&&&&*&&*&*&&&*&**********=*===****************&**&&&*&***&**&*&&*&&&&&&&&&&&&&&&&&&&&%&&&%&&%&%&%%&%%%%&%%%%%%%%%%%%%%%%%%%%%%%%$%%%%$%%$%$$$$$$$#$#$$$#####@#@#@@@@@@+@++",
-".+.+++++@+@@+@@++.+.+.++.++@@@@@@@+@++@++++++++++.+.++++++++++++++++++++++++++++++++@+@++@+@+++@++@@+@+@+@+@+@@@+@@@@@@@@@@@@@@@@@@#@#@#@#@#@##@##&&%#################$$$$$$$$#$#$#$#$#$$$$#$#$$#$$#$$#$$$$$$$$$$$$$$$$$$%$%$$%$%%%%%%%%%%&%%&%&%$%$%%$%$%%$%%$%%%%%%&&&&&&&&&&&**********&**&***&&&&&%&%&%%&&%%&%&%%%&%&%&%%%&%&%&%&%&%&%%&%&%%&%&%&&%&&%%&&&%%&&%&&%&%&%&%&&%&%&%&&%&%&&%&&%&%&&%&%&&&&%&&&%&&&%&&%&%&&&&&%&&&&&&&&&&&%&&&&&%&&&%&&&&%&&&&&&&&&&&&&&&&&&&&*&&&&*&&&&&&*&&&&*&&&***&*&&*&******=*=*==****************&*&&&&**&*&*&*&*&&*&&&&&&&*&&&&&&%&&&&%&%&&%&%&%%%%%%&%%%&%&%%%%%%%%%%%%%%%%%%%%%%%%%%%$%$$%$$$$$$$$#########@#@@@@@@@@@@@",
-"+.+++++++@++@@@++.+.++.+.+@@@@@@@+@+@+++++++++++.++++.+.++++++++++++++++++++++@+@+++++++@+++@+@++@+@+@@+@@+@@@+@@@@@@@@@@#@@#@@#@#@@#@##@#@@##@##&&%##################$$$$$$##$#$$#$#$##$$#$$#$$$$#$$$$$$$$$$$$$$$$$%$$%$$%$$%%%%$%%%%%%&%&%&&&%%%$%%$%%%%%%%%%%%%%&&&&&&&&&&&********&**&***&&&&&&&&%&%&%&%%%&&%%%&%%%&%%%&%&%%%&%%%&%%%&%%&%&%&&%&&%&%&&&&%%&&%&&%%&%&%&%&%%&%&%&%%&&&%&&%&&&&%&&&&&%&&&&%&&&&%&&&&&&&&%&&&&&&&&%&&%&%&&&&&&&&&&&&&&&&&&&&&&&&&*&&*&*&&&&&&&&&&&&*&&*&&&&*&&&**&&&*&**&**&*******=*===***************&*&&*&*****&*&&*&&&*&&*&*&&&&&&&&&&&&&&&&%&&&%&%&&%&%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%$%$%%$%$$$$$$$$$$#$$#######@@@@@@@+@+@",
-"++.+++++@+@@+@+.+++.+.+++@@@@@@+@+@++@+++++++++.+++++++++++++++++++++++++++++++++@+@++@+++@++@++@@+@+@+@+@+@@+@@+@@@@@@@@@@@@@@@@@@#@#@@#@###@##&&$#################$$#$#$$$#$#$#$#$#$$$#$$$#$$#$$$$$$$$$$$$$$$$$$%$$$$$%$$%$%$%%%%%%%&%%&%&&%%%$%%%$%%$%%$%%%%%%&%&%&&&&&&&&********&**&*&*&**&&&&%&%&%&%%&&%%%&%&%&%&%&%&%%%&&%%&&%%&%&%&%&%&%&%&%&%&&%%&&&&%&&%&&&&%&&&&%&&%&&&%&&%%&&%&&%%&&&%&%&&&%&%&&%&&&&&&%&%&&&&&%&&%&%&&%&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&&*&&&*&&&&&&&&*&&&&&&&&*&&*&*&&**&*&&**&**&**********===**************&*&&&&&&*&***&&**&&*&&*&*&&&&&&&&&&&&%&&&&&%&%&%%&%%&%&%&%%%&%%%%%%%%%%%%%%%%%%%%%%%%$%%$%$%$$$$$$$#$##########@@#@@@@+@",
-"+.++++++@+@+@++.+..+..+.+@@@@+@@+@+@+++++++++++++.+.+.+++++++++++++++++++++++++@+++++++++@+@++@++@++@++@@+@+@@+@@@@@@@@@@@@@@@@@@@@@@@##@##@###&&$###################$$$$$$#$##$$#$#$##$$$#$$$$$$#$$$$$$$$$$$$$$$$$$%$%$$%$%$%%%%%%%&%%&&%&&&%%$%%$%%%%%%%%%%%%%%&&&&&&&&&&&********&**&*&&*&&&&&&&%&%&&%&%&%&&%&%%&%&%%&%%&%&%%%&%%&&%&%&%&%&%&%&%&%&%%&&&%&%&&%&%&%%&&%%&&%%&%&%&%&&&%&%&%&&%%&&&&&%&&&&%&&&%&%&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&*&*&&*&&**&*&&*&&&&&&*&&&&&&&&&*&&*&***&**&****&****=*****===**=*=*=********&*&&&***&**&&**&&*&*&*&&&&&&&&&&&&&&%&&&&&%&%%&%&%%&%%&%%%%%%%%%%&%%&%%%%%%%%%%%$%%$%$%$$$$$$$#$$#$#$##@#@@#@@@@+@@@",
-".++++++@+@+@@.++..+..+++@@@@@@@+@+@+++++++++++++++++++++++++++++++++++++++++++@+++++@+@+@++@+@++@++@++@+@+@@+@@@+@@@@@@@@@@@@@@#@#@#@#@@#@#@##&&$##############$##$#$$#$#$$###$#$#$$$$$#$$$$$$$#$$$$$$$$$$$$$$$$$$$$$$$$%$%$%%%%%%%%%&%&%&&%$%$%%$%$%$%$%$%%%%%&&&&&&&&&&&*********&*&*&*&*&&&&&&&%&%&%%&%&%%&%&%%&%%&%&%&%&%%&%&%%&&%&%&%&%&%&%&%&%&&&&&&%&%&&%&%&%&&&%&&&%&&&%&%&&%&%&&&&&&&&&&&%&%&&&%&&&&%&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&*&*&&&&&&&&&&&&*&&&*&&*&*&&&&*&*&*&**&**&***&*****=*=*=**=*******=****&*&&*&&&&**&*&*&&&**&**&&&&&&&&&&&&&&&&&%&&&&&%&%&%%&%%&%%&%%&%%&%%%%%%%&%&%&%%%%%%%%%$%%$%$$$$$$$#$#########@@@@@@@+@",
-"++++++@+@+@@+...++.++.+@@@@@@++@++++++++++++++.+.+.+.+.+++++++++++++++++++++++++++@++++++@++@+@+@+@+@+@@+@+@@@+@@@@@@@@@@@@@@@@@#@@@@#@#@#@##&&$###################$$$$$$###$$#$#$#$$#$$$#$#$$$$$#$$$$$$$$$$$$$$$%$%$%%$$%$%%$%%%%%&%%&%&&%%%%%$%%%%%%%%%%%%%%&&&&&&&&&&&*******&*&*&*&*&&&&&&&&&&%&%&%&%&%&&%&%&%&%&&%%%%&%&%%&%&&%%&%&%&%&%&&%&&%&&%%&%%&&&%&&%&&%&%&&%&%&%%%&%&&%&&&&%%&%&%&&&%&&&&&%&&&%&&&%&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&*&*&*&*&*&*&&*&&&&&&&&*&&&&*&*&&**&*&&****************=*==*==**=***********&*&*&**********&**&&*&&&&&&&&&&&&&&&&&&&&%&%&%%&%&%%&%%&%%%%%%%%%%%%%%%%%%%%%%%%$%%$%$$$$$$$$##$#$#$####@##@@@@@@@",
-"+++++@+@+@@.+++..+..++@@@@++@@+++@+++++++++++++.+++++++++++++++++++++++++++++++++++@+@+@++@++@+++@+@+@+@@+@@@+@@@@@@@@@@@@@@@@@@@@#@@#@##@##&&$###############$####$$$$$#$#$##$#$#$$#$$$#$$$$$#$$$$#$$$$$$$$$$$%$$$$%$$%%$%%%%%%%%%%&&%&&%%$%$%%$%$%$%%%$%%%&%&&&&&&&&&********&***&*&*&*&&%&&&%&%&&%&&&%&%%&%&%&%%&%%&&&%&%%&%&%%%&&%&%&%&%&%&%&%&%&&&%&&%&&&%&&%&&&&%&&%&%&&&%&&&&%&%&&&&&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&*&&&&&&&&&&&&&&&&&&*&&&*&&&&*&*&&*&&&&*&&&*&&&*&&*&&&&&*&&&*&*&&*&***&*&*&***&*&********==*===*=**=******&**&&&&&*&*&*&******&&&*&&&&&&&&&&&&&&&&&&&&&%&%&%%&%%&%%&%&%%&%&%&%&%%&%%%%%%%%%%%%%$%%$$%$$$$$#$###$#####@#@@@@+@",
-"+++@++@+@@++....+.++.+@@@+@@+@+@+++++++++.+++.++.+.+.+++.++++++++++++++++++++++++@+++++++@+@++@+@+@++@@+@@@+@@@+@@@@@@@@@@@@@@@@#@@@#@@#@##&&$####################$#$$#$####$$#$$##$$$#$$$$$$$$#$#$$$$$$$$$$$$$$$$%$$%$%$%%%%%%%%%&%&%&&%%$%%%%%%%%%%%$%%%%&%&&&&&&&&&*******&**&*&*&*&&%&%%&&&&%&%&%&%%&%&&&%&&%&&%&&&%&&%&&%&%&&%&%&%&%&%&&&%&&&%&%&%&&&&&%&&%&&&&%&&%&&&&&%&&&&%&&&&%&%&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&&&&&&&&&&&&*&&*&&&&*&&&&*&&*&&*&&*&*&&*&&&*&&&*&&*&*&&*&*&&&**&*&*&*&****&**************===*=*=***=*********&&&&&*********&**&&&*&&&&&&&&&&&&&&&&&&&&%&%%&%%&%%&%&%%&%%%%%&%%&%%&&%&%%%%$%$%%%$%$$$$$$$$#$$########@@#@@@@",
-"+++++@+@@+....++.+..+@@@@@++@++++@+++++++++++++.+.++++++++.+++++++++++++++++++++++++@+@+@++@+@+++@++@@+@@+@@@+@@@@@@@@@@@@@@@@@@@@#@@##@##&&$###################$$$$#$$##$##$#$##$#$#$$$$#$$$$$$$$$$$$$$$$$$$$$$%$$$%$%$%%%%%%%%%&%&%&&%%%%%$%$%$%%%%%%%%%&%&&&&&&&&********&**&*&*&*&&&&%%&&&&&&&%&%&%&%&&%%&&%&%%&&%%&%%%&%%&%&%&%&&%&&%&&%%&%&%&%&%&&&%&%&%&&&%&%&&&&&&%&%&&%&%&&%&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&&&&&&&*&&*&&*&*&&*&*&*&&&*&&*&*&&*&*&&***&*&*&***&*&**************=****====**=************&*&&**********&&*&&&*&&&&&&*&&&&&&&&&&&&&%&&%&%%&%&%%&%%&%&&%%&%%&%%%%%&%%%%%%$%$%$%$$$$#$$##$######@##@@@@@",
-"+++@@+@+++.+.+..+.++@@@@+@+@++@++++++++.+.+++.+++++.+.+.+++++++++++++++++++++++@++@+++++@+@+@++@++@@++@+@@@+@@@+@@@@@@@@@@@@#@#@#@@@#@@##&&$####################$#$$$$#$##$$#$#$$#$#$$##$$$$$$$$$$$$$$$$$$%$$$$%$$%$%%$%%%%%%%&%&%&&&&%%%$%%%%%%%%%%%%%%%&%&&&&&&&&***********&**&&*&&%%%&%&%&&&%&%&%%&&%&%&&%&%&%&%&%&&%&&%&&&%&&&%&%&&%&%&&&%&&&&&&&&%&&&&&&&&&&&&&%&%&%&&&&&&&&&%&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&&*&&*&&&&&*&*&&*&*&*&*&*&*&*&*&&&&*&*&&*&&*&*&*&**&&&******&********************=**=**===**=*=******&*&&*&&&*******&**&*&*&&*&&&&&&&&&&&&&&&&&&%&%&%&&%&%&%%&%%&%%&&%&&%&%&%%%%%%%%%%$%$%$%$$$$$$$$##$######@@#@@@",
-"+++++@+@+...+.+.+.+@@@@+@+@+++++++++++++++++++...++++++++++++++++++++++++++++++++++@+@+@++@++@+@+@+@@@+@@+@@@+@@@@@@@@@@@@@@@@@@@#@@@##@&&$####################$#$$#$$#$#$###$#$#$#$$#$$$$$$$$$$$$$$$$$$$$$$%$$$%$$%$%%%%%%&%%%&%&%&&%%%%%$%%%$%%%%%%%%&&&&&&&&&&&*********&*&*&**&&&%&%&%&&&&&&&%&&&%%&&%&%&&%&%&&&%&&%&%&&%&%&%%&&%&%&%&&%%&&%%&%&%&&&%&%&&&%&%&&%&&&&&&%&%&%&%&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&*&*&*&&&*&*&&*&&&*&&&&*&&&&&&&*&*&&&&*&&*&&*&**&*&*&*&*&*&*&&*&*&*&*&*&*&&***&*&*&************************=**===*==****=***********&********&*&&*&&&&&*&&&*&&&&&&&&&&&&&%&%&%&&%%&&%%&%%&%%&%%&%&%&%&%%%%%%%$%%%$%$%$$$$$#$$#########@@#@@",
-"++@+@+@+..+..+.+.++@+@+@@++@++++++++++++.+++.++++..+.+.+.++++++++++++++++++++++@+@++++++@++@++@++@+@++@@+@@+@@+@@@@@@@@@@@@@@@@#@@@##@#%*$####################$#$#$$#$##$###$#$#$#$#$$$#$$$$$$$$$$$$$$$$$$$$$%$%$$%$%%%%%%%%&%&%&&&&%%$%$%%%%%%%%%%%%%%&&&&&&&&&&***********&*&*&&&%%&%%%&%&&&&%&%&%%&%&%&&&&%&&&%&%&%&%&&%&&%&%&&%&%&&%&&%&&%&&&&&&&&%&&&&%&&&&&&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&*&*&*&&&&&&&&&&&*&&&&&&&&*&&&&&&&*&&*&*&&&&&*&&&*&&**&&*&*&*&*&*&*&*&&*&&&*&*&**&***&&**&*&***************************=**===*=*=**=*******&*&*&**=********&**&*&&*&&&&*&&&&&&&&&&&&%&&%&%&&%%&%&&&%&&%&&&%&%&%%&&%%%%%%%%$%$%$%$$$$$$#$$#$#######@@@",
-"+++@+++..+..++.+.+@@@@+@+@++++++++++++++++.+++.++++.++++++.+++++++++++++++++++++++++@+@+++@++@++@+++@@@@+@+@+@@@@@@@@@@@@@#@@#@#@@#@@#%*$@##@#################$$$$#$$####$#$#$##$$$$#$$$$$$$$$$$$$$$$$$$$%$%$$%$$%$%%%%%%%%%%&%&&%&%%%%%%%%%%%%%%%%%%&&&&&&&&&&&**********&&**&*&&&%&%%&&%&&&&&&&%&%&%&%&&&%&&%&%&%&%&%&&%&&%&&&&%&%&&%&&%&&%&&%%&%&%&&&&&&&&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&*&*&&&*&&&*&*&*&&*&&&&&&&&&&&&&&*&*&&&&&&&&&*&&&&&*&&*&&****&*&*&*&&*&&&*&*&*&*&**&*&*&***&****&*****************************=*===*****=******************&*&*&*&*&*&&*&&&&&*&&&&&&&&&&%&%&&%&%&&&&%%&%&%&%%&%&&%&%%&%%%%%%$%%%$%$$$$$$#$##$########@#@",
-"++++@+.++..+..+.+@@@++@+@+++++++++++++..+.++.+.+.+.++.+.++++++++++.++++++++++++@+@+@++++@++@++@+@+@+@+@+@+@@@@+@+@@@@@@@#@@@@@@@#@@@#%*$@####################$$#$$$#########$#$#$$#$$$#$$$$$$$$$$$$$$$$$$$$$%$$%$$%%%%%%%%&&%&%&%&%%$%$%$%%%%%%%%%%%&%&&&&&&&&*********&*&*&*&&&&%%&%%%%%&%&&&&%%&&%&&&%&%%&%&&%&&%&&&%&%&%&%&%%&%&&%&&&%&%&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&*&*&&&&&&*&&&*&&*&*&*&&&&&&&&&*&&*&&*&&*&&*&&*&*&*&&****&*&**&**&*&&*&*&*&*&**&**&&**&*******************************=**=*===*=****=*********&**********&*&*&&*&&&&*&&&&&&&&&&&&&&%&&&%&%%%&%&&%&&&%&&%&%&%&%%%%%%%%%%$%$%$%$$$$$$#$##$####@##@@",
-"++@++....+..+..+@+@@@+@+++++++++++++++++++.+++++.++.+++++.++.++++++++++++++++++++++++@+++@++@++@++@+@+@+@+@+@@@+@@@@@+@@@@@@@@#@@@#@%*$###@###################$$#$$$#####$#$##$$$#$$$#$$#$$$$$$$$$$$$$$$$$%$$%$%$%$%%%%%%%%%&%&&&%%$%%%%%%%%%%%%%%&%&&&&&&&&&*********&*&*&*&*&&%&%&%&%&%&&&&&&&%&%&%%&&%&&&&%&&%&&%&%&%&&&%&%&&&%&%&&%&&&%%&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&*&&*&&*&*&*&*&&&*&&&*&&&&&&*&&&&&*&&*&&*&&*&&*&&*&&*&*&**&*&**&*&*&&*&&**&*&*&***&**&***************************************=*=*===*=*=************&&****&*&****&*&&*&*&&*&*&&&&&&&&&&&&%&%&&&&&%&&%&%&%&&%&%&%&%&%&%%%%%%%%$%$%$$$$$$$$#$#$######@#@",
-"++@++.+.+..+.+++@@++@+@+@+++++++++.+.++..++.++.++.++.++.++++++.++++++++++++++++@+@+@++@+@++@+@++@+@+@+@+@@+@@+@@@+@+@@@#@@@@@@@@#@@%*$@@#@###################$$$$#######$####$$#$$$#$$$$$#$$$$$$$$$$$$$$%$$%$$%$%$%%%%%%&%&&%&&&%$%%$%%%%%%%%%%%%%%&&&&&&&&&********&*****&*&&&%%%&%%%&%&%%&&&%%&%&%&&%&%&%&%&&&%&%&%&&&%&%&&&%&%&%&&&%&%&&&&&%&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&&&&&&*&&&&*&&&*&&*&&&*&*&&*&&*&*&*&*&&*&&&*&&**&**&*&****&**&**&*&*&*&*&**&*****&************************************=**=*===**=**=*=**=*****&&*******&*&***&&&*&&*&&*&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&%&%&%&%%%%%%%%%$%$%$$$$$#$$$#$########",
-"++++........+++@+@+@+@++++++++++++++++.++++++.++.++.++.++++.++++.+++++++++++++++++++++++++@++@+@+++@+@+@@+@@@@+@@@@@@@@@@@##@@#@@#$*%###@##@###############$$#$#$$##$#$##$#$#$#$$#$$$$#$$$$$$$$$$$$$$$$%$$%$$%$%%%%%%%%%%&%%&&&%$%%$%%%%%%%%%%%%&%&&&&&&&&&***********&&*&&&&&&%&%%%&%%&%&&&&%&&&&%&%&%&&%&&&%&%&&&&&&%&&%&&%&&&&&&%&&&%&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&*&**&&&&&*&*&*&&&&*&&&&*&&*&*&*&&&*&&&*&*&&*&*&*&&**&&**&**&****&*&**&**&*&*&*&*********&************=*=*=***********************=**=*===**=****=*****&**&**********&*&**&&&&&*&&&*&*&*&&&&&&&&&&&%&&&&&&&&&&&&&&%&&%&%%&%%%%%%$%$%$%$$$$$$#$##$######@",
-"+@+....+.+.+.++@@+@++++@+++++++++.+.+.++.+.++++.++.++++.+.+++.++++++++++++++++@+@+@+@+@+@@+@++@++@+@+@@+@@@+@+@@+@@@@@@@@@@@@#@@#$*%@#@####################$#$$$######$####$##$$#$#$#$$$$$$$$$$$$$$$%$%$$%$$%%%$%$%%%%%&%%&&&&%$%%$%%$%%%%%%%%%%%&&&&&&&*&***********&**&&*&&%%%%&%&%&%%&%&&&&%&%%&&%&%&&&&%&&&&%&&%&&&&&&&%&&%&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&*&*&&*&&&&*&*&&**&&*&&&&*&&*&&*&*&&&*&*&&*&&*&&*&*&**&**&*&****&**&***&***&*&*************************=***************=*******=*=*====**=*=*===****&*&**********&**&**&*&*&**&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&%&%&%%%%%%%%%$%$%$%$$$$$$#$##$####@#",
-"++..+.....+.+@+++@@+@++++++++++++++++++.+++.+.++.++.+.++++.++++.++++++++++++++++++++++++++++@++@+@+@+@+@@+@@@@@+@@+@@@@@@@@#@@@##*%#@#@@#@#################$$$#$##$####$##$#$####$$$#$$$$$$$$$$$$$$$$$$%$$%$%$%%%%%%%%&%&&&&%%%%$%%$%%%%%%%%%%%%&&&&&&*&&*************&&*&&%&&%%%%&%%&%&%&%&%&&%&&%&&%&%&%&&%&%&&%&&&&&%&%&&&%&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&*&&&&&*&&&&*&&*&*&&&*&&&&&*&&&*&&*&*&&*&&*&*&&**&&*&*&&*&&*&&*&*&*****&**&***&**&*&*********************=*=*=*=**=***=************************=*====**=*=**********&*******&**&**&*&&&&*&&&*&**&&&&&&&&&&&&&&&&&&&&&&&&&&&%&&%%&%%&%%%%%%$%$%$$$$$$$#$$########",
-"+.......+..++@@@+@+++@+++++++++.+.+.+.+.+.+++++.++.+++...++.+.++++++++++++++++++++@+@++@+@@+@+@+++@+@+@+@+@@++@@@@@@@@@@@@@@@#@#&&#@#@#@#@##@#############$$$#$#$####$###$##$#$$$$#$$$$$$$$$$$$$$$$$%$%$$%$%$%%$%%%%%%%&%&%&&$%$%$%%%%%%%%%%%%%&&&&&&&&************&*&*&&&&%%%&&%&%%&%%&&%&&&&%&%&&&%&&&&&&%&&&&&&%&%&%&&&%&%&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&*&*&&*&&&*&*&*&**&&&*&*&*&*&&*&&*&&*&*&&*&*&&**&**&**&*&*&*&&***&**&***&*****&*&*&*********************=*****************************=**=*====*=====******&*&*************&**&*&&**&*&&*&*&*&&&&&&&&&&&&&&&&&&&&&&&%&&&%&%%%%%%%%%%%$%$%$$$$$$$$$#$####",
-"...+..+.+..@+@++@++++++++.++++.++.+.+.+.+++..+.++.++..+++.++.+++.+++++++++++++++++++++@++++@+++@+@+@+@@+@@@+@@+@@@@@@@@@@@@#@@#&&@@@#@##@#@##@###########$$##$######$######$###$#$$#$$$$$$$$$$$$$$%$$%$$%$%$%%%%%%%%%%&%&&&%$%$%%%$%$%%%%%%%%%&&&&&&&&&**=***&***&**&**&&%%&%&%%%%%&%%&%%&&&%%&&&&&%&&%&%&%&%&%&%&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&&*&*&*&&&&&&&&&**&&*&&*&&**&*&***&*&*&*&&*&*&*&*&&**&**&***&***&***&**&*&**&***************=*****=****=*=*=**=*********************=*=*======*****=*******&**********&****&*&**&*&*&&*&&&&&&&&&&&&&&&&&*&&&&&&&&&&&%&%%&%%%%%%%$%%$%$%$$$$#$#$######",
-"..........+@+@+@++@++++++++.+.++.++.++.++.+++++.++.+++.+.++.++.++++++++++++++++++@++++++@+++@+@+++@+@+@+@++@@@@@@@@@@@@@@@@@@@&*##@@##@@####@###########$#$$$$$#######$$#$##$$#$#$$$$$$$$$$$$$$$%$$$%$$%$%$%%$%%%%%%&%&&&%%%%%%$%$%%%%%%%%%%&&&&&&&&*&**=*******&**&*&&&&%&%%%%&%&%%&%&%&%&%&&&&%&%&&%&&&%&&&%&&&&&%&%&&&%&&%&%&%&&&&&&&&&&&&&&&&&&&&&&&*&&&&&&&*&&&*&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&&&&*&**&&&&&&*&**&**&&&*&&**&**&&*&*&&&*&*&*&**&*&*&*&**&&*&***&***&***&***&*******&****************=****=**********************************=**========***=*******&***********&**&*&&*&*&*&&*&*&*&*&&&&&&&*&&&&&&&&&&&&&%&%&&%%&%%%%%%%$%$$$$$$$$$$#$#####",
-"..+..+..++++@+++++++++++.+++.+.++.++.++.++.+.+.+.++.+++.+.++.+++++++++++++++++++++++@+@+++@++@++@+@+@@+@+@@+@+@@@@@@@@@@@@@@@%*#@@@#@#@###@##############$$$#$##########$##$##$#$$#$$$$$$$$$$$$$$$$%$$%$%$%%%%$%%%&%%&%&&&%$%$%%$%%$%%%%%%%%%&&&&&*&&=*=*******&**&*&&&%%%%&%&%%%&%&%&%&&&%&&&%&&&&&&&&%&&&%&&&&%&%&&&%&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&*&&&&&&*&*&&&*&&&&&&&&&&&&&&&&&&&&&*&*&*&*&&&&*&*&*&*&&&*&*&*&&&&&*&&**&&*&&&*&&**&*&**&*&*&*&*&*&**&*&&***&*&&**&***&***&****&*&*****&****************=******=***=*************************=*==*=====**==**=**********************&*&*&**&**&*&*&&&*&*&*&&&&*&*&&&&&&&&&&&&%%&%%%%%%%%%%$%%$%$%$$$#$#$#$##",
-"...+....+++@+++++++++++++..+.+++.+.+.+.+.++.+++++.++..++++.+.++.+++++++++++++++++++++++++++@++@+@+@+@+@@+@+@@@+@@@@@@@@@@@@@%*$@#@@##@#@#@#############$$#$#$########$$###$##$$#$#$$$$$$$$$$$$$$$%$$$%$%$%%$%%%%%%%%&%&&%%$%%%$%%$%%%%%%%%%&&&&&&&&*************&**&&&&&&%&%&%%&%%&%%&%&%&&&&%&&%&&&%&%&&%&&&&&%&&&&%&&&%&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&&&&&&&&&&&&&&&&&&&&*&&&&&&&&&&*&&*&&&*&*&*&&&*&&***&&*&&&&*&*&*&**&*&*&*&***&*&*****&*****&*&****&***&**&*&*&*&**********************=***************=*****&**********************========**=***=******************&***&*&*&**&*&*&*&*&*&*&&*&*&&&*&*&&&&&&&&%&%&%&%&%%%%%%%%$%$$$$$$$$$#$###",
-".......+++@++@++++++++++.++.++..+++.++.+++.++.+..++.++.++++.+++++++++++++++++++++@+@++@+@+@+@++@+@++@+@+@+@@+@@@@@@@@@@@@@@$*%@#@@#@#@#@##@#@#########$#$$#$########$####$##$$#$#$$$$$$$$$$$$$$%$$%$%$%$%$%%%%%%%&%&%&&&%$%%%$%%$%%%%%%%%%&&&&&&&&&***=******&*&**&&&&%%%%%&%%&%%&%&&%&%&&%&%&&%&&&&&&&&%&&&&%&&&&&%&&%&&&&&%&&&&&&&&&&&&&&&&&&*&&*&*&&&*&&*&**&&*&&&&&&&*&&&&&&&&&&&&&&&&&*&&&*&&*&&*&*&*&*&*&*&&*&&&&*&*&**&&&*&*&&*&*&*&**&*&**&*&*&**&*&**&**&*****&**&********************=***=*************=*************&**************=*****=*=========**==************=*************&**&***&*&*&*&*&&*&&&*&*&&&&&*&&&&&&&&%%&%%%%%%%%%%$%$%$%$$$$$$##$#",
-".....+.++@++++++++++.+.+.+.+..++..+++.++.++.++.++.++.+.+..++.+.++++++++++++++++++++++++++++@++@++@+@+@+@@@+@@@@@@@@@@@@@@@#*%@#@@#@#@#@#@############$##$$$##########$#$##$$##$$$$$$$$$$$$$$$$%$$%$%$%$%$%%%%%%%&%&%&&&%%%$%$%%$%%$%%%%%%&%&&&&&&**=*=******&***&&&&&%&%&%&%&%%%&%%%&%&&&%&&&&&&&&&&&&&&&&%&&&&&%&&&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&*&&&&&*&&&&&&&*&&&&&&&&&&&&&&&&&&&&*&&&*&&*&&*&&*&*&*&*&*&**&*&*&&*&*&&**&*&&**&*&*&*&&*&*&**************&**&*&****&**&*&*&*********************=***=**********=**********************=****=*=**=*========*=**==*=*********=*********&***&***&***&**&&**&**&&*&**&*&&&&&&&&%&%&%&%%%%%%%%$%%$%$$$$$$$#$###",
-"......+++++++++++++++.++.++++.+.++.+++.++.++.++.+.+.+.++++.++.+.++++++++++++++++@++@++@+@+++@++@++@+@@+@+@@+@@@@@@@@@@@@@@&&#@@#@#@@@#@@###@##########$$$##########$##$#$#$#$$#$#$$$$$$$$$$$$$$$$$%$$%$%%%$%%%%%%&%&&&%$%$%%%$%%%%%%%%%%%&&&&&&&&*********&**&*&*&&&%%%&%&%%%&%&%&%&%&%%&&&&%&&%&&&&&&%&%&&&%&&%&&%&&%&&&&&&&&&&&&&&&&&&&&&*&&&&&*&&*&&&&*&*&***&*&&&&&&&&&&&*&&&&&&*&*&&&&&&&*&&*&&*&&*&***&*&*&&*&*&*&&*&*&*&*&*&&*&**&*&**&***&*&*&*&***&*&**&****&****************************************=**************************************=*=*==*=====*=*=************************&*******&******&&*&&*&*&&*&*&*&&&&&&&&&%&%&%&%%%%%%%$%$%$%$$$$$#$##",
-".....+++++++++++++.+.++.++..++.++++..+..++.++.+.+.++.+.+.+++++.++++++++++++++++++++++++++@+@++@++@++@+@+@+@@+@@@@@@@@@@@@&*#@@#@@@#@#@###@####@#####$#$##$#########$#$###$#$$#$##$$$$$$$$$$$$$%$%$%$%$%$$%%%%%%&%&&%&%%%$%%$%%$%$%$%%%%%&&&&&&&***=*********&*&*&&&%&%&%%%&%&%%%%%&%&%&&%&&&&&&&&&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&*&&&&*&&&*&&&*&**&&&&&&&&*&&&&*&&&&&&*&&&&&*&*&*&&&*&*&&**&*&*&*&*&*&**&&*&*&&&*&*&*&**&*&&*&***&*&*&**&*&**&****&****&**&*&*&*&********************=*****=***=**************=***************************=*=**=======*=*=====********=*=*********&**********&****&*&**&**&*&&&*&*&&&&&%&%&%&%%%%%%%%%%%$%$%$$$$$#$$",
-"....+++++++++++...+.++.+..++...++..+++++.++.++.+.+.+.++.++..+.+.+.+++++++++++++++++++@+@+++++@++@++@+@+@@@+@@@@@@@@@@@@@%*#@@@@@#@#@@#@#@##@#######$$#$#$###########$##$##$##$$#$$#$$$$$$$$$$%$$$%$$%$%%%%%%%%%%&%&&&$%$%%$%$%%%%$%%%%%&&&&&&&&*=***=****&*&*&*&&&%%%&%%&%&%%&%&%&%&%&&%&&&&&%&&&&&&&&&&%&%&&%&&&%&&%&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&&&&&&&&&&**&*&*&&*&&&&&&&&&&&*&&&&&*&&&&&&&**&&&*&*&&*&*&**&****&&*&&*&***&*&*&*&*&*****&&*&*&**&****&***&***&*&***********************************************************************=**********=*=*=*=**=====*=******=******&=*=*=*********************&*&**&**&*&***&&&&&&&&&%&%&%%&%&%%%%$%$%$%$$$$$$$$#",
-"...+.++++++.++.+++++.+..++..++.+.++..+..++.++.+.+.++.+.++.++.++++++.+++++++++++++++++++++@+@@+@+@+@@+@@+@+@@+@@@@@@@@@@$*$@@@#@@@@@#@#@###@##@#@###$#$#$####$##$##$##$$#$#$#$#$#$#$$$$$$$$%$%$$%$$%%$%%%%%%%%&%&%&&%$%%%%$%%%%$%$%%$%%%&&&&&&&************&*&*&&&%&%&%%&%&%%&%%%&&%&&%&&&&&&&&&&&&&&&&%&&&&&%&&&&&&&&&%&&&&&&&&&&&&&&&&&*&&&&&&&&&&*&*&*&***&&*&&&&*&&&&&*&&&&&&&&&&*&&&*&*&*&&&*&*&*&**&*&**&**&&&**&*&*&*&&*&*&*&*&*&*&*&******&*&*&*&*&*&**&*************************=**=********************=*=**************************=******=**=**=*==*========*===*=************=*****************&***&**&*&**&*&&**&*&&&&&&&%&%&%%%%%%%%%%$%$%$%$$$$$#",
-"...++.+.+.++.++.+.+.+.+.+.++.+.++.+++.+++.++.+.+.+.+.++.++.++..++.+++++++++++++++++++@+@+++++@+++@++@+@@+@@+@@@@@@@@@@#*%#@@@@@###@#@#@@#@##@#####$#$############$#$###$#$#$#$#$$$$$$$$$$$$$$$%$%$$%$%$%%%%%%%&%&%&%%$%$%%%%%%%$%%%%%&&&&&&&&****=*******&*&*&&&&%%&%&%%&%&%&%&&%&&%&%&%&&&&&&&&&*&&&&&&%&&&&&&&&&&&%&&&&&&&&&&&&&&&*&*&&&*&&*&&&&&&*&&&*&****&*&&&&&&*&&&&*&*&&&&*&&*&&&&&&*&*&&*&*&*&**&****&****&*&*&*&**&**&*******&***&*&&***&*************&***********************************=***=****=*************=*********************=*=*=*=*=****=*=====*==*=*=*=*=******=****=*********************&*&**&*&*&&&&&&&&&&&&&%&%&%&%%%%%%%%$%$%$$$$$$#",
-"..+.+.++.+..++.+++.+.+.+.+..+.+..++.++.+.++.++.+.++.+.++.++.+++.++++++++++++++++++++++++++@@++@+@++@@+@+@@+@@@@@@@@@@@&&@@@@@#@@@@#@#@#####@#####$$#$#$$##$#####$#####$##$##$$#$$$$$$$$$$$$%$%$$$%%%%$%%%%%%%&%&&&%$%%$%%%%$%$%%%$%%&%&&&&&&*=*=****=***&**&*&&%%&&%&%%&%%%&%%&%&%&%&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&*&*&*&&&*&&*&**&*&*&&&*&&&&*&&&&&&*&&*&&&*&**&&*&&*&*&*&&*&***&****&&*&*&*&*&**&**&&*&&*&*&*&*****&****&**&*&*&*&***&*******************=******************************=**=****=**********************=*=***=**=*=*========*=*==*********===****=**********************&*&*&****&*&&&&&%&&%&%&%&%%%%%%%%$%$%$%$$$$",
-".+..+.+.+.+.+.++..+...+....++.+.++.++.+.++.++.+.+.+.+.+.++.+++.+++.++++++++++++++++++@++@+++@++@++@+@+@@++@@@@@@@@@@@%*#@@@#@@@#@#@@@#@@#@@####$###$#$############$#$$####$$#$#$$$$$$$$$%$$$%$$%$%$%$%%%%%%%&%&&&%$%%$%%$%$%%%%$%%%%%&&&&&&&*************&&*&&&%&%%&%%&%%&&%&&%&%&%&&%&&%&%&&&&&&*&&&&%&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&&&&&&&*&*&&****&*&&&&&*&&&&*&&&*&&&&&&&&&*&&&&&*&&*&*&&*&*&*&*&****&****&***&**&**&**&**&***&**&*&&**&*************************************=****=*=*=************************=***************************=*=***=***=*==========*=*===*********=*=***=***=*=************&**&*&*&&&&&&&&&&&&%&&&%&%%&%%%%%%%$%$%$$$$$",
-"..+....+.+.+.+..++..+...+++..+.+.++.++.+.+.+.+.+.+.+.+.++.++.+++.+++++++++++++++++++++++++@++@++@+@@+@+@@+@+@@@@@@@@$*$@@@@@@@#@@####@#@#@##@###$#$#########$##$##$####$$$##$$$$$$$$%$$$$$$$$%$$%$%$%%%%%%&%&%&%%%%$%%$%%%%%$%%%$%%&&&&&&&&*************&**&&%%&%&&%&%%&&%&%%&%&&%&&%&%&&&&&&&&*&&&&&&&&&&&&&&&&%&&&%&&&&&&&&&&&&&&&&*&&&&&*&&&&&*&&&&**&**&**&&&*&&&*&&&&&&&&&*&*&*&*&&*&*&&*&*&*&*&*&***&***&&**&&***&**&*&*&*&**&**&***&*&****&**&**&**********************************=*=*******=*****=*=****************=**=********=*=******==*=*****=**=*=*========*=*==****=*****==*=**=*********=*********&**&**&*&**&*&*&&&&&&&%&&%&%%%%%%%%%%$%$$$$$$",
-"+..+++.+..+.+.++..+...+...++.++.+.++.+.+.+.+++.+.+.+.++.++.++.+++.+.+.+.+++++++++++++++++++@++@++@+@@@++@+@+@@@@@@@#*%@@@#@@@#@@#@@@#@@#@##@###$#$#$###############$##$##$#$$#$$$$$$$$$$$$$%$$%$%%$%%$%%%%%&%&&&%$%%$%%%$%$%%%$%%%%&&&&&&&*=***********&*&&&&&%&%%%&%&%%&%%&&%&%&&%&&%&&%&&&&&&&*&*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&&&*&&&*&*&&&&&**&***&**&&*&&&&&&*&*&*&*&&&&&&&&&&&&&*&*&&*&&*&*&*&*&**&***&***&&*&*&***&***&**&***&******&*********&***&************************=**********=*****=**********=******=*******************=******=****=****=**=**=======*==*===*********=*==**=*=*=*=**=*=**********&**&*&&*&*&&&&&&&&&%&%&%&%%%%%%$%%$%%$%$$",
-".+.....+.+...+..+...+.+.++..+..+.+.++.+.+.+.+.+.+.+.+..++.++.++.++.++++++++++++++++++++@+@++@+@+@++@++@+@+@@@@@@@@@&&@@@@@@@#@@@##@#@####@####$#$#$###########$##$###$#$$#$#$$$$$$$$$$$$$%$$$%$%$%%%%%%%%&%%&&&%%%$%%$%%%%%%%%%%%%&&&&&&&****************&&&%%%&&%&%&%&&%&&&%&%&&%&&%&&&&&&&&*&*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&*&&&&&*&*&&&*&&***&*&&*&*&*&&&&&&&&&*&*&*&*&*&**&&*&*&*&*&*&*&******&**&&*****&**&***&**&***&*****&*********&****************************=****=*=****=**=**=**=******=****=**=****=*=****=**=*=******=**==**=*****=**=**=*========*===*====*=*****=**==*=*=****=****=*****&***&*&***&*&&*&&&&&&&&&&%%&%&%%%%%%%%%$%$$$",
-"+..+.+..+...+..+.+.+.+..+..++.++.++.+.+.++.+.++.+.+.+.++.++.++.++++++.++++++++++++++++@+++@+@++@++@@+@@@+@+@@@@@@@%*#@@@@@#@@#@#@@#@#@#@#######$#$######$##$#$###$##$$##$#$$$$$$$$$$$$$%$$%$%$%$%$%%%%%%%%%&&&%%$%%$%%%$%$%%%$%%%&&&&&&&**************&*&&&%%&&%%&%&%&%%%&%%&&%&%&&%&%&%&&&&&&&*&*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&&&&&*&&&*&*&&&&**&****&**&&&&&&&&*&*&*&**&*&*&&&&*&*&&**&*&*&*&*&**&***&**&****&*&&**&******&********&***&********************************=******=*****=*=*****=*****=*=*********=****=*****=***=****=*=****=***=****=*****=*=*=*========*====**=**=****===*=*=*=*=*=**=***=********&*&*&*&&&&&&&&&%&&%&&&%&%%&%%%$%$%$%$%$",
-"..+...+...++.+....+...+.+.+..+..+.++.+.+.+.++..+.+.+.+.++.++.+++++.+.+++++++++++++++++++@++@++@+@@+@+@++@@@@+@@@@$*$@@@@@@@#@@@#@#@#@###@#@#$$$##$############$#$##$#$$#$#$$$$$$$$$$$$$$$%$$$%$%%%%%%%%&%&&&&%%$%%$%%%%%%%%%%%%%&%&&&&&*****=**********&&&&%&&%&&%&%&%&&&&%&%&&%&&%&&&&&&&&&&&*&*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&**&*&*&*&*&&&&*&**&******&&*&*&*&*&&&&&&*&&*&&&&**&*&*&*&&*&*&*&*&*&**&*&**&****&*&***&***&**&**&*&**&****************************************=******=********=*****=*********=*=****=*=***=*=******=********=**=*********=***=*=*======-=====*===*=**=****=*=*=*=*=*=*=*=*=*******&*****&*&***&*&&&&&&&&&%&&%&%%%%%%%%%%$%$$",
-"....+..+......+.+...+...+.+.+.++.+.++.+.++..++.+.+.+.++.++.++.+.++++++++++++++++++++++@+++@++@+++@+@+@+@+@@+@@@@#*%@@@@@@@@@#@@#@##@@#@#######$#$##########$#$##$#$#$#$$#$#$$$$$$$$$%$$$$$%$%$%$%%%%%%%%&%&%&%%%$%%%$%$%%%%%%%%%&&&&&&&***************&*&&%&%%&%%&%&%&%&&%&&&%&&&&&&%&%&&&&&*&&*&*&&&&&&&&&&&&&&&&&&&&&&*&*&&&&&&*&&&*&&&&&&&&*&&&*&****&*&***&&&*&&&*&*&*&&*&&**&*&&*&*&*&**&*&*&*&***&**&*&****&*****&******&***************************************************=*=*=**=**=**=***=*=***=*=*=*=****=****=**=****=*=*=**=*=*=*=**=*=**=*=******=**=*=**======-========*==*=*=**===*=*=***=*=****=*******&*&**&*&&&*&&*&&&&&&&&%&&%&%&%%%%%$%%$$%",
-".+..........+....+...+.+..+.+.+.+.+.+.+.+.++.+.+.+.+.+.+.++..+++.+.+.+++++++++++++++@++++++@++@@@+@+@+@@@+@@@@@@&&@@@@@@@@#@@#@@#@#@##@#@##$$$#$#########$#####$####$$#$#$$$$$$$$$%$$$$$%$$%$%$%%%%%%%%&%&&&%%$%%$%%%%%%%%%%%%%&%&&&&&***************&*&&%&%&&%%&%%&%&&%&&&%&&&%&&%&&&&&&&&&&*&*&*&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&*&*&&**&*&*&&*&*&&*&*******&*&*&&*&&*&&&&*&**&&*&&*&&*&*&*&*&******&*&*&********&**&***********************=****=**=****=***************=**=*=**********=***=**=******=*******=****=*=**=**=*=**=***=****=****=*=*=******=**********=*==========*=*==*=**=*=**=*===*===*=*=*==**=****&****&*&***&*&&&&&&&&&&&%&&%&%%%%%%%%$%%$",
-".........+....+.+...+.+..+.+.+.+.+.++.+.+.+.+.+.+.+.+.++.+.+++.++.++++++++++++++++++++@+@+@++@++@+@@@@@+@@+@@@@$*#@@@@#@@#@@#@@#@#@##@####$##$#$#####$##$##$#$$##$$$#$$$$#$$$$$$$$$$$%$%$$%$%$%%%%%%%%&%&&&&%%%$%%%$%$%%%%%%%%%&&&&&&*****************&&%&%&%%&&%&&%&&&&&%&&%&%&&&&&&%&&&&&&&&&*&*&&&&&&&&&&&&&&&&&&&&&&&*&&&&&&*&&*&*&*&&*&&*&&*&&*&****&**&*&&*&*&&*&*&**&*&&*&*&*&**&*&*&*&**&&&*&*********&*&*********************=**=*=**=*=***=*=*=**=*==*=*=*=**=**********=*=*=*=**=*=**=**=*=*=**=*=*=***=***=*******=*=***=***=*=**=*==*=*=****=****=*=*=*==*=*======-=========*=****=*==*===***=*=*=**=*=******&&***&&&*&*&*&*&&&&&&&%&%&%&%&%%%%%%$%",
-"...........+......+.....++.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.++.++.++++++++++++++++++++++@++@@+@+@+@+@+@@+@@@@#*%@@@@@@@@@@@@#@@#@##@#####$#$#$###########$#$##$$#$$$$#$$$$$$$$$$$%$%$$$%$%$%%%$%%%%&%&%&%&%$%%%%%%%%%%%%%%%%&&&&&&&***********&****&&&&&%&%&%%&%%&%&%&&%&&%&&&&&%&&%&&&&&&&*&*&*&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&*&**&&*&*&&*&***&*&***&&*&&*&&*&&*&*&*&**&*&*&*&&*&******&***&**&*&*&*&****************=*=**=*=***=******=*=*=***=**=****=*=*=*=**=*=*=**=*=*******=********=***=**=*****=*=**=***=*==*=***=*=*=*=****=**=*=****=*=***=****=*=**=*========-==============**====*====*=*=*=*****=*******&***&&*&*&&&&&&&&&&&&&%&%%%%%%%%$%$",
-".............+.+...+..+..+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.++.++.+++++++++++++++++@++@++@++@@+@@@+@@@+@@+@@&&@@@@@@@@@@#@#@#@#@@###@#$#$#$$############$##$$#$$#$#$$$#$$$$$$$$$$$$$%$$%$%$%%%%%%%%&%&&&%%%$%$%$%%$%%%%%%%%%&&&&&&**=**********&**&&&&%&%&%&%&&%%&&&&&&&&&&%&&&&&&&&&&&&&&&&*&*&&&&&&&&&&&&&&&&&&&&&&*&*&&*&&*&&&*&*&*&&*&&*&*&&*&***&*****&&*&&*&&*&&*&*&*&*&*&**&****&*&*&**&*&*&********&**********=*=*=***=***=*=***=*==***=**==**==*===**===*=*==*=*=*=*****=*==*=**=*=*=***=*=*=**=*=*=***=**=**=***=**=**=*****=*=**=**=*==*=*****=**=*=***=*=***=*=====-=========*=**=***====*=*=*=*=*=**=*****&****&&**&*&&*&*&&&&&&&&&&&%&&%&%%%%%%%",
-".................+..+..+...+.+.+.+.+.+.+.+.+.+..+.+.+.+.+.+.++.++.++.+++++++++++++@+++++++@++@+@+@+@@++@@+@@@%*#@@@@@@@@@@@#@@@@#@#@#@$##$#$###########$###$##$#$#$$$$#$$$$$$$$$%$%$%$$$%$%$%$%%%%%%&%%&&&%%%%$%%%%%%%%%%%%%%&&&&&***********&*&**&*&&&&&%&%&%&%%&&&%&&&&&&%&&&&&&&&&&&&&&&&&*&*&&&&&&&&&&&&&&&&&&&&&*&&&&*&&&&&*&*&*&*&**&**&&&*&***&*****&**&*&*&**&*&*&**&**&*&*&*&*&******&**&********&******=*=**=****=**=*=*=**=*=*=*=**==**==**==**=*=*===*=====**=*=*=*==*=*=*****=*=*=*==**=***=*=**=**=**=**=**=*=**=*=**=*==**=**=*==*=****=**=*******=*=*=*==*=========-============*==*======*=**=*=*=*=*******&***&**&*&&*&&*&&&&&&&&%&&%%%%&%%%$%",
-"................+.........+.+.+.+.+.+.+.+.+.+.++.+.++.+.+.+.+.++.++++++++++++++++++++++@+@++@@@+@+@+@@@+@@+@#*$@@@@@@@#@@#@@@###@#@#####$#$$#############$##$#$$#$$$#$$$$$$$$$%$$$$$$$$%$$%$%%%%%%%&%%&&&%$%$%%%$%%%%%%%%%%&&&&&&&**=*****&******&*&&&%&%&%&%&%&%&%&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&*&*&&&&&&&&&*&&&*&&&&&*&&&&&*&&&&*&*&**&***&**&*&***&**&***&*&*&*&&*&*&**&**&**&****&**&*&*&******&*********=*=****=**=*=**=**=*=*=*=*=*=*==*=*==*==*=*=*=*==*====*=*====*===*=*=*=*====*****=***=*=*=*=**=**=****=***=*=**==*=*=*=***=**=**=*==*==******=*=*=*****=*=*==*======-=-========*==*=**=====*====*=*=*=***=**&***&***&**&*&&*&&*&&&&&&&%&%&&%%%%%%%",
-"..............+....+.+.+.+...+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+++.++.+.+.++++++++++++++@+@++@+@++@+@+@@@+@@@+@@&&@@@@@@@@@@@@@#@@#@@#@###$$#$#############$#$##$#$$$$$$$$#$$$$$$$$$%$%$$%$$%%$%%$%%%%&%&&&&%%%%%%%%%%%%%%%%%%&%&&&&&**********&**&**&&&&&&&%&&%&%&%&&&%&&&&&&&&%&&&&&&&&&&&&&&&*&*&&*&&&&&&&&*&*&&&&&&&*&&&&*&*&*&*&**&*&*&**&*&*&&*&**********&*&*&*&**&***&***&**&**&***********&*&*********=*=*==*=*=**=*=*===*=*=*=**=*=*=*=*=*=*=*=*=*==*==*===*=*=====*===*==*==*==****====**=*=***=****=*=*=*=*=**=**=*==**=*=*=*===*=*=*==*=*=***=*=********=*==*=*=**==*=====-=-===========*==**=====*=*====*=**=******&***&**&*&*&&&&&&*&&&&&&&&%&%&%%%%%",
-"................+.........+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.++++++++++++++++++++++++++@+@@+@+@@+@@@+@@@%*#@@@@@@@#@@@@@@@#@#@#@####$$#$#############$##$#$#$#$$$$$$$$$$$$%$$$$$$%$%$$%$%%%%%%%%&%&&&%$%%%$%%$%%%%%%%&%&&&&&&&*******&***&**&*&&&&&&%&&%&&%&%&%&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&&&*&&*&&&&&&*&&&&&&*&*&&*&&*&&&&*&*&**&***&**********&****&*&*&&&*&*&***&**&**&**&*&***&**&**********=***=*=*=*=*=*=**=*=**=*****=***=**=*=*==*==*===*==*==**==========*=*=*==*===*====*=*===*=*==**==*=**=*=**=*=**=**=**=**=*=*=***=*=*==*==***=**=*=*=*=*=**=****=*==*==*=======--==========*==*=========*=*=*==**********&*****&**&*&*&&&&&&&&%&%&%%%%%%%",
-"..................+..+..+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.++++.+.++.+++++++++++@+++++@++@@+@+@+@@@@+@+@#*$@@@@@@@@@@@@#@#@@##@###$#$###############$##$###$$#$$$$$$$$$$$$$$$%$$$%$$$%%$%%%%%%%%&%&&&%%%%%%%%%%%%%%%%%%&&&&&&&*********&*&**&**&&&&%&&&%&&%%&%&%&&&*&&&&&&&&&&&&&&*&&&&&&&&&&&*&&&&&&&&&&&&*&&&&&&&&&*&&*&&*&*&**&*&**&**&**&*&***********&*&*&*&*&*&*&***&**&**&****&************=*=**=*=*=*=*=*****=****=**=*=*=*==*=*=*=*=**=*=*=**=*=========================*========*=*=*=*=*==*=*==*=*=*=****=*==*==*===*==*===*=*=*===*===**=****=****=**=*==*=*=***========-=--=========*==*====*=*=*==*=***=*=*********&*&**&*&*&&&*&&&&&&&&&&&%&%%%",
-".......................+..+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.+.++.+.++++.++++++++++++++@+@+@++++@+@+@@+@@+@@@&%@@@@@@@@@@@@@@@@@#@#@#####$#$################$#$$#$$#$$$$$$$$$$$%$$$$$%$$%$%$$%$%%%%%&%&&&%%%%%%%%%%%%%%%%%%&&&&&&&***********&**&*&&&&&%&&&%&&%&&&&%&&&&&&&*&&&&&&&*&*&&&&*&&&&**&*&&&*&&*&&&&&*&&&&&*&*&*&&*&&*&&*&*&*&&**&******&************&*&***&***&*******&**&***&***********=*=*=******=**=**=**=***=*=**=*=*=*=*=*=*==*====*===*====*=**================*==============*===*=*==***=*=*=*=*=*===*=***=**=*=*=**=**=*=*===*=***==**=*=*=*=**=***=*=*=*====*=====-=-=-=-=-=======*==*========*==*==****************&*&*&*&*&&*&&&&&%&%%&%%%%",
-"...............+.........+...+..+.+.+..+.+.+.+.+.+.+.+.+.+.++.+++.+.+++.+++++++++@++++++++@+@++@+@+@@+@+@%&#@@@@@@@@@@@@#@#@@@@#@###$##$#################$#$#$$$$$#$$$$$$$$$$$$$%$$$%$%$%%%%%%%%&%&&%&%%$%%$%%%%%%%%%%%&&&&&&&&********&*&****&*&&&&&%&%&%&&%&%&%&&&&&&*&&*&&*&*&&&&&&*&&&&*&&*&&&*&&&&&*&&&&&*&*&&&&&&*&&*&*&**&&*&***&**&**&***&***********&*&&*&*&**&*&*&*&**&**&***********=**=***=*==*=**=**=**=**==*=*==*==*==*=====*===*====*===*=*=====*===============================*===*=*====*=*=*==*=**=*=*==*==*=*=*==*==*=*==*==*==***==*=***=*=***=**=*==*=*=*========-=--===========*=*====*=*=*===*=*==*=********&*&***&*&&&*&&&&&&&&%&&%%&%%",
-".....................+.+..+.+.+..+.+.+..+.+.+.+.+.+.+.+.+.++.++.+++++.+++++++++++++++@+@+++@++@+@@@+@@@+#&%@@@@@@@@@@@@@@@@##@#@###$##$##############$#$##$#$##$$#$$$$$$$$$$$$$$$%$$$%$%$$%$%%&%%&%&&%%%%%%%%%%%%%%%%%%%&&&&&&***=******&**&*&*&&&%&&&&&&&%&&%&%&&&&&*&&*&&&&&&&&&&*&&&&&&&&*&*&*&&&&&&&&*&*&&&&&*&*&*&&*&&*&*&***&*&*&*&***&**************&*&***&***&********&*****&*&*****=*=*=**=*=*********=*****=***=*=*==*==*==*=*===*=====================================================*====*=*====*=**=*==*=*=*=*=*=*===*=*=*=*====*==**==*=*=*==**=*=*=*=*==*==*====*=*=====-=---=--========*=========*===*=****=***********&**&**&&*&*&&&&&&&%&%%&%",
-". ..........+............+.+...+.+.+.+.+.+.+.+.+.+.+....+.+.++.++.+.+++++++++++++++++++++@++@+@+@++@@+@@&&@@@@@@@@@@@@@@@#@@@#@######$###################$$#$$$#$$$$$$$$$$%$$$$%$$%$%$%$%%%%%%%%&%&&&%%$%$%%%%%%%%%%%%&&&&*&&********&*&*&**&*&&%&&&%&%&%&&&&%&&&&&&&&*&&*&&&&*&*&&&&*&&&&&&&*&*&&&&*&&&&&&&&*&*&&&&*&*&&**&&**&*&*&*****&****&*&***********&**&***&**&***&*&***&*&******=*=*=*=*=***********=**=*==*=*==*=*=*=============-==========-=================-=-=-===-==================*=*===*=*======*=*=*=*=*=*===**=*==*=====*===**=*=**=*=**=****=*=*=**=*==*=*========-=-=---==-=-======**========*=*=*===**=************&**&**&*&&&&&&&%&&&&%%",
-".......................+....+.+...+.+.+.+.+.+.+.+.+.+.++.+.++.++.+.+++++++++++++++++@+@+@++++@+@+@@@+@@$*#@+@@@@@@@@@@@@@@@#@@###$#$###################$###$$#$$#$$$$$$$$$$$$$%$$$$$%$%$%%%%%%%&%&&&%%$%$%%%%%%%%%%%%&&&&*&&&*********&***&**&&&&&&%&&&&&%&%&&%&&&&&**&&*&&&*&&*&&*&*&&*&*&&*&&&*&*&&&*&*&*&*&*&&&**&*&&*&&**&*&*&***&*&*********************&**&*&***********&*****&****=*=*=**=*********=*=**=**=**=*=*=*===================-=--=--==--=---=--==-==--==-====-===-=-=========================*=**=*=*=*===*==**==*=====*=*=====*==**==**=*===*==*=***=*=*=*=*==*=======-=-=---==-==-======*=====*==*===****=***************&*&&*&&*&&&&&&&&%&%%",
-"...............+.....+...+.+.+.+.+.+.+..+.+.+.+.+.+..+.+.+.+.++.++++.+.++++++++++++@++++++@+@++@@+@@@+@&%@@@@@@@@@@@@@@#@#@@############@##############$#$#$#$$#$$$$$$$$$$$$$$$$%$%$%$%%$%%%%&%&%&&%%$%%%%%%%%%%%%%%%%&&&&&&***=*****&*&*&*&*&&&%&%&&%&&&&&&%&&%&&&&&&***&**&*&&**&&&*&&&&&*&**&&&&&&&&&&*&*&&&*&**&&&**&**&**&*&**&*****&******&*&********&*****&**&*&****&****&******==*=*=**=******=*=*****=*=*=====*=============-========================-=--=--=---=---===--===-=-===-===========*=====*=====*==*==*=*=*=====**=*========*=**==*=*=*=***=**=*===*=*=====*===*======----=--===-========*=====*==*=*===***=*****************&*&&*&&&&&&%&%&%",
-"... ..................+...+.....+.+..+..+.+.+.+.+.++..+.+.+.+.++.+.+++++++++++++@++++@+@+++@++@+@+@@@@%&#+@@@+@@@@@@@@@@@@#@@#####$###@##################$##$$#$$$$$$$$$$$$$%$$$$%$%$%$%%%%%%%&%&%&%%%%%%%%%%%%%%%%%&&&&*&**********&*&***&*&&&%&%&&&&&&%&%&&%&&&&&*&*&&*&&&*&**&*&*&&*&*&&&&&*&*&*&*&&&&&*&**&&*&****&*&*&*&**&*&**&**&*********************&*&***&*****&**&****&**==*=*==*********=****=*==**=*=**=*===*========-==================================-===-=-=---==--=-==-=-===-==-=============*=*==*===*=*====*=*=====*=*======*=***=*==*===*==**=**=*==**=*==*============------==-=-====*=*==========*=*==*==***********&*&*&*&*&&*&&&&&&&&%%",
-"...........................+.+.+...++..+.+.+.+.+.+.+.+....++.+..+.++.++++++++++++++++++++@++@+@@+@+@+$*$@@+@@@@@@@@@@@@@@@@#########@#####@#############$#$$#$$$$$$$$$$$$$$$$$%$%$$$$%%$%%%&%&%%&&%%$%$%$%%%%%%%%%&%%%&&&&&*=*******&**&*&*&&&&%&&&%&&&&&&&%&&&&&&&&*&**&**&*&*&*&*&*&*&&&*&*&*&&*&*&&&*&*&&*&**&*&&&*&**&***&*****************&*&**&******&****&****&********&*****=*=*=****=*******=**=****==*=====================================-=-===============-=====-=---=-=---=-=-=-=========================*=====*====*==*=========*======*=*=*=*=**==*==*=**==*=*===*=======-=--=----=-==========*=====*=*==*==*=**=***************&**&*&&&&&&&&%&&",
-"..... ........................+.+.+...+...+..+..+.+.+.+.+.+.+.++.++.++.++++++++++++++@++@++@++@+@+@@@&%@+@@@@+@@@@@@@@@@@#@###########@###########$##$#$#$$#$#$$$$$$$$$$$$$$$$$$$%$%%$%%%%%%&%%&&&%%%$%%%%%%%%%%%%%%&&&&*********&*&*&*&*&*&&%&%&%%&&&&&&&&&&&&&&&&&&&*&&*&*&*&**&*&**&&*&&&&*&*&&*&&&*&&&**&**&&****&****&****&*&*&**&**&***&*********************&**************===*=****=******=*=**=**====*==*=*===========================-==-=======-===-===-=======-=-=====----=--=-=--=--=--=-=-======*=*=*==*===*=*====*===*=========*==*=**==*=====*==*=*=*=*===*===*=*============------==--======*=======*=====**=*=*=**=********&****&*&*&*&&&&&&&%",
-". .......................+.+.+...+.+.+.+.+.+..+..+.+...+.+.+.+.+.+.+++++++.++++++++@++++++@+@+@+@@++$&$@@@+@@@@@@@@@@@@@@#@############@#@############$###$#$$$$$$$$$$$$$$$%$$%$%$$%$%%%%%%%%&&%&%%$%%%$%%%%%%%%%%&%&&&*&&********&***&*&*&&&&&%&&&&&%&&&&&&%&&&&&&***&**&*&**&*&*&*&&**&&*&*&&&**&*&*&&*&*&*&&***&****&*****&**&***********&****&*&*&**&**&**&*&*&*******&*&***===******=***=*=*=*=*=*=*=*=**=============*==========-=-=-=-====-==-=======-===-=====-==-===-=--===-=--=----=-=--======-=-==================*==================*=====*==*=*===*=*=====*=*==*======*======-=-==------===-======**======*=**==*=****=************&***&&*&&&&&&&%&",
-"..............................+.+...+.+.+...+..+..+.+.+...+.+.+.+.++.+.+.++++++++++++@++@+@++@+@+@@#&%@@+@@@@+@@@@@@@@@@#@########@#@#@##########$#$###$$##$$$$#$$$$$$$$$$$$$$$$$%$%%$%%%%&%&%&&&$%%$%%%%%%%%%%%&%%&&&&&**=*=*******&**&*&&&&%&&%%&&&&&&&&&%&&&%&&&&&&*&&**&*&***&*&**&&*&*&***&&&*&*&&&&*&*&**&********************************************************&******=**==*******=****=***=*=*===*==*=======*============-==========-======-=-=-=========-======-=-====-=====--=-=----=----=-===-=-============*=*===*==*=*=*=======*===*=*===*===*=*===*=*=*===*==*===*==========---=-------==-======*===========*=*===****************&***&&*&&&&&&%",
-"..........................+.+..+.+.+.+...+.+..+..+.+.+..+.+.+.+.+.+.+++++++++++++++@++@++@+@+@+@@++%&#@+@@@+@@@@@@@@@@@#@########@##################$#$##$$#$$$$$$$$$$$$$$$$$%$%$%$%$%%%%%%&%&%&%%%%%$%%%%%%%%%%%%&&&*&*&**********&*&*&*&&%&%&%&&&%&&&&&&&&&&&&&&&&**&**&&*&***&***&*&*&*&*&*&**&**&&*&*&*&**********&**********************&**&**&**&********&**&**********==*==*******=**=*==**==*=*==*==========*=============================-=========-=-==-===-=--====-=-==--=--===---------=-=-=--=-===========*========*===========*===*==*==*===*=====*==*===*=*=====*==========-====------=-=-=========*=======*=====**=*=*=************&*&*&&*&&&&&&",
-".. ... .......................+...+...+.+.+..+..+.+.+..+.+.+.+.+.+.++.+.+++++++++++++++++++@+@+@+@#&$@@@@+@@+@@@@@@@@@@@#######@@#@#@@################$##$#$$$$$$$$$$$$$$$%$$$$$%$%$%%%%%&%%&%&&$%%$%%%%%%%%%%%&%%&&&&&&**=*****&*&**&*&*&&&%&%&&%&&&&&&&&&&&%&&&&&&&&&*&&***&*&*&*&*&*&*&*&*&*&&*&*&*&*&*&**&*&***************************************&********************====********=**=**=**==*=*==*=======***===============-===-=====-=-=-===-=-=-==-====-=-=-=====-=-==-=-==-==-=-====--------=--=-==-=-===============================*========*===*==*==*========*=*=============-=--=-------=-=-======*=====*=====*=*==*=*****=***********&*&*&&&&&&&",
-"..........................+.+..+.+.+.+.+...+..+..+.+..+.+.+.+.+.+.+.++++.+++++++++++@++++@@++@+@+@%&#+@+@+@@@@@@@@@@@@########@#@##@###@########$#$#$##$$#$$$$$$$$$$$$$%$$$$%$%$%$%%%%%%%%&%&&&%%$%%%%%%%%%%%%%%%&&&&&***=*******&*&*&*&&&&%&&%&%&&%&&&&&&&&&&&&&&&*&**&**&*&*****&**&*&*&*&*&*&*&*&*&&&**&*&*********************************&*&*&*&*******&****&********====*******=***=**==*==*=====*=====***===========-=-=-=====-==-=-==-===-=-===-==-===-===-===-=-=====-===-==-===-=---=-=----------=-====-=================*==========*==*==*=*===*===*=====*=*=*=*====*=========-====--=-------=-=-====*=*=*=======*===*==*=*=*************&**&*&*&&&&&",
-"......... ...................+......+...+.+.+..+..+.+.+.+.+.+.+.+.++..+.++++++++++++++@++++@+@+@+$&$@@+@@@+@@@@@@@@@@@@######@###@###@###############$###$#$$$$$$$$$$$$$$$%$$$$%$%%$%%%&%%%&%&%%%%$%$%%%%%%&%%%%&&&&*&&*********&*&*&*&*&&%&%&%&%&&%&&&&&&&&&&&&&&&&*&&*&&*&*&&*&**&**&*&*&*&*&**&**&**&&**&*&*****************=*********************&*******************====******=****=*=**=**==*=*=======*==*=========-========-===========-=-===--==-===-==-==---==-=-=--==-=-=-==--=-==-=-=-==------=----=-===-====================================*=======*=*=========*==============-=-=--=-------===-=======*==========*==*=*=****************&*&*&&&&&&",
-" . .. .....................+...+.+.+..+..+.+..+..+...+....+.+.+.+.+.++++.++++++++++@+++++@++@+@+@&%@+@@@+@@@@@@@@@@@@#######@@#@@#@@##@###########$#$##$$#$$$#$$$$$$$$$$$$$$$%$$%$%%%%%%%&%&&&%$%$%%%%%%%%%%%&%%%&&&&*&=*=****&*&**&*&*&&%&%&%&%&%&&%&&&&&&&&&&&&&*&&*&&**&****&*&*&*&**&*&**&*&&&*&*&&**&****&*******************=***************&********************=====****=*=***=**=*=*===*=========**=====-=-===========-===-====-==-=-=-==--==-===-======-==-=-===-==-==-=-=---=-=--=-=-=--=-=------=---=-===-=================-==========*=*=*====*=*=======*=*==*==*==*======-=========-=---------=-=====*=============*====*==*=*=***********&*&**&&&",
-"..........................+...+...+..+..+....+..+.+.+..+.++.+.+.+.++.+..++++++++++++++++++@++@+@$&#@@@+@@+@@@+@@@@@####@###@#@#@####@###@#####$#$##$##$##$$#$$$$$$$$$$%$$%$$%$$%%$%%%%%%&%&&%&%%%%$%%%%%%%%%%%%&&&&*&&************&*&*&&&&%&%&&%&&%&&&&&&&&&&&&&&&&&&&&*&&*&&*&*&*&*&*&&*&&*&**&**&*&&**&***&****************=*****=**=**************&****************=====**********=**=*=====*==*======*=============-===-=-===-===-=-==-=====-======-======-=-==-=-==-===-=-==-==-==-=--=--=-=-=-=-=-------=-=-=--==-==============================================================-===-=-=-=----------==-========**=============**=****************&*&*&&*&&",
-".... ...........................+..+.....+.+..+..+.+.+..+..+.+.+.+.++.++++++++++++++++++@++@+++@&%@+@+@@@@@+@@@+@@@#@#@####@#@@#@@#@@#@###@@#####$###$$$#$#$$$$$$$$$$$$$$$$%$$%$$%%%%%%%%&%&&%$%$%%%%%%%%%%&%%%&&&&&&*=*******&*&*&*&&&&%%&%&%&%&%&&%&&&&&&&&&&&&&&&&*&&*&&*&&*&*&*&*&**&****&&*&**&**&&*&*&**&*****************=****=**=***********&****************====*****=*=*=*=**===*=*=*=======***=======-=-==-====-=========-=======-=-=======-================-=======-===-=----==--=-=-=-=-=-=-=------=--==-==-===========-=-==========*============*=========*=====*=========-====-=-==-=--------=--=-======*=========*=*==*=*=**=*=**********&*&*&&&",
-".. .... .. ...............+.+.+..+..+.+...+..+.+......+..++.+.+.+.+.++++++++++++++++++@+++@+@+@%&#@+@+@@+@@@@@+@@@##@####@@#@@###@#@#@##@#########$####$#$$$$$$$$$$$$$$$%$$$%$%%%%%%%%%&%&&%&%%$%$%%%%%%%%%%%&%%&&*&****=******&*&*&*&&&&%&&%&%&%&%&&&&&&&&&&&&&&&&&&&*&&*&**&*&*&**&*&*&&&&**&**&**&*&*&***&****************=****=*********************************====****=****=*=*=*=*=======*====*=============-========-=-=-=-====-===========-=============================-==-===---=-=--=-=-=-=--=-=-----------==-==-========-====================*=*==============*=============-=-=-=--==-=-------==-======*================*=*=******=*******&**&&*&&",
-" ..............................+...+...+.+..+.+..+.+.+.+.+.+.+.+.++++.+.+++++++++++++++++@+++@#%%@+@+@+@@@+@@@@@@##@####@#@@##@@@#@###@#########$###$$$#$$#$$$$$$$$$$$%$$$%$$%$%$%%%%&%%&%&&%$%%%%%%%%%%&%%%%%&&&&&*&=********&***&*&&&&%&%%&&%&&&&&&&&&&&&&&&&&&&&&*&&&*&*&&*&*&*&&*&*&****&**&*&*&*&****&**&*****************=******=**=*=***********************=-=**=****=*=**=***=*==*========**=*==========---==-==-=========-=-=========-=-=---------=-=-=-=---=-===========-==-====-=--=---=-=--=-==-=------=----=--===-==-=-==-===========*====*=============================-===-=-====--=-=--------==-========*-============*=*=*=*=***********&**&*&",
-"..... ...... ................+....+..+.....+....+.+.....+.+.+.+.++.+.++++++++++++++++@+@+++@+@$&#+@@+@@@+@@@@@@@#@##@#@@#@@@#@@##@@#@##@##########$#$###$#$$$$$$$$$$$$$$$%$$%$%$%%%%%%%&%&&&%%%%$%%%%%%%%%&%&%%&*&*&***********&*&&*&&%%%&%&&%&&%&%%&&&&&&&&&&&&&&&&&&&*&&*&**&*&*&**&*&*&&&**&*&****&*&*&*&*********=**=**=*****=**=***=*****=*******************===*****=***=**=**==*===========*==*=======-==-===-===-===-==-=-==========--=-=--=------==-=-==-=-=----=-==========-==-=-=-===-==-=--=--=--=-=------=--=-==-===-=-====================================================-==-==-=-===--=---------==-===*=*===========*===*=*=****************&*&&",
-"... .......................+....+...+.+.+.+..+.+...+.+.+.+.+.+.+.++.+++++++++++++++++++++@+@+#&$@+@+@@+@@@@@@@@###@###@@@@#@@##@#@#@##@#########$###$#$$$$$$$$$$$$$$$$$%$$%$%$%$%%%%%&%%&&&%%%$%%%%%%%%%%%%%%&&&&&*&=*=******&**&**&&&&&%&%%%&%&&%&&&&&&&&&&&&&&&&&&&*&&*&&*&&*&&&*&&*&*&***&**&***&*&***&**&*&**************=*****=*******=********************==-=***=****=**=**=***==========***=*======-=====---==-==-=-==-=-======---=-==-=-=-------=--=-=--=-=--=-=--=--=-=======-=-===-=-=--=-==-=--==-=-=------------==-==-=-=-=====================================================--=-=---==---------=-=========*=-==-==========*=*=**=**=******&**&*&",
-". ....... .......................+.+.......+..........+...+.+.+.+.++.+.+++++++++++++++@+++@+@%%#+@+@@+@@+@@@@@#@#@@#@@@@@@@#@@#@@###@#########$####$#$$#$#$$$$$$$$$$$$$$$$$%$%$%%%%%&%&%&&&%$%%%%%%%%%%%%%%&%&&&*&&***********&**&&*&&%&%&&&&%&%&&&&&&&&&&&&&&&&&&&&&&*&&&*&*&&*&*&*&*&*&&&**&**&*&*&*&&**&**&******=*=***=**********=**=***=*=*=*********=****==-=*******=**=**=*====*======-==*=*=============-==-======-========--=-===-=--=-=-=-=-=---=--=-==-=-==-=-=-=-=-=-----======-=======-=--=-==-==-=--=--------=--==-==-=-==-================================================-======-===--=-=-------=-=-====================*==*=*=**=*********&***&",
-"...... ........................+......+..+..+.+.+.++.+.+.+...+.+.++.+++.++++++++++++@+++@+++#%%+@+@@+@+@@@+@@#@#@##@#@#@@#@#@#@#@#@@##@############$$#$#$$$$$$$$$$$$$%$$$%$$%%$%%%%%%%%&%&&%%%$%%%%%%%%&%%%%%&&&&***=*=****&**&*&&*&&%&%&%%%%&%&%&%&&&&&&&&&&&&&&&&&&&&&&&&*&*&*&&&&*&*&***&&**&****&****&****&************=***=*=****=**=*********************=-=*********=**=*=*=***=*======***========-====-==--=--=-=-===-=----==-==-=-===-=-=---=--=-=-====-===--=-=-=-==-=-=-=------=====-=-==-==-=-=---=--=--=-----------=--=-=====-========================================-===-===-=---=-=-==-=---------=-======*=*=-===-========*=*=****=*********&*&*",
-".. . ......... ...............+...+..+..................+.+.+.+.++.++.+++++++++++++++++@+++@%%#@++@+@@@@+@@@@#@#@@#@@@@@@@@@@@@#@#@############$$#$##$#$#$$$$$$$$$$$$$$$%$%$%$%%%%%&%&&&&&%$%%%%%%%%%%%%%%&%&&&&*&*=********&**&**&&&%&%&%&&&&%&&%&&&&&&&&&&&&&&&&&&&&&&&*&&*&&&*&**&*&*&&&***&**&***&*&&**&*&**********************=******=*=**=*******=****==-=****=**=*=**=*=*=*=========*=*============-====--=-==-=-===-==-=-=--==-====--=-=---=--=---=--=-==-=-==-=-=-=-===-------=----=====-===-==--==-=-==-=--=-----------=--==-======-=======================================-===-==========-==-==------=-=--=======*-=-==-=======*=*=*=***=**********&",
-". ...... .. ....................+...+..+.+.+...+.+.+.+.+...+.+.+..++.++++++++++++++++@+++@@#%%@+@@+@+@@@@@@#@##@#@@@@@@@@@##@#@#@##@#@#######$####$#$#$$$$$$$$$$$$$$$%$%$$$%$%%%%%%%&%&%&&%%%%%%%%%%%%&%%%%&%&&*&*************&*&*&&&%%&%&%%&%&%&&&&&&&&&&&&&&&&&&&&&&*&*&&*&&*&&*&&*&*&***&*&********&**&************=*=***=****=*=***=*=*****=***=*********=-=*********=*=*=*=*==*=========*==========-====-=-=----==-==-----=-=-==-=-=--===-=-===-=---=--=====-====-=-===-=---=-=--=---=-=--=====-===-==--=-=--=--=-------------==-=-=-========================-=============-=-==-==-===-=-=----==--=---=-----=-==-=====*=====-==========*==**=***=********&",
-".... ............ ...............+...........+....+...+.+.+...+.++.+++.+++++++++++++++@+++@%%#+@++@+@@+@+@#@#@@#@#@@#@@#@@@@#@#@#@##@###########$##$$#$#$$$$$$$$$$$$$$$$$%$%%$%%%%&%%&&&&%%%%%%%%%%%%%%%&%%%&&&&**=*=********&*&*&&&&&%&%&&%&&&&%&&%&&&&&&&&&&&&&&&&&&&&&*&&*&*&*&&*&*&*&&****&*&*********&*&**&****=*****=**=*=*****=****==*=***=*******=*==-=*=*=****=**=*=*=*=*========***=*====-=-==========-=-=--==---====-=-=-==-=-===-==-=--=-=-=--=-=-=-==-=-====--=====--=-------=-----=-====-==-===---=--=---=-------------=-==-=-=-==-=-===========-==-===-===-=-=-===========-===-==-===-===-=-=-------=-==-===========-=-======*=**==**=***********",
-".. .... ...........................+.+.+..+.....+..+.+...+..+.+.+.++.+++++++++++++++@+++@+#%%@@++@@@+@+@@#@@@##@@@@@@@@@@#@#@@@@#@@#########$#$##$#$#$#$$$$$$$$$$$$$$%$%$$%$$%%%&%%%&%&&&%%%%%%%%%%%%%%%%&%&&&*&&***********&**&**&&%&&%&%&&%&%&&&&&&&&&&&&&&&&&&&&&&*&*&&*&*&*&&*&&*&*&**&&*&*******&**&***************=***************=**=***=*******=***=-=*******=*=*=**=*=*=========*=*=============-====--=---==----=--=-======-=-==-==-==-=-=-=-=-=-=-===========-===-=-===-=-=--=--=-=-=-=--===-==-=-====-=-==---=-----;----=-=-==-===-=====-=-====-======-===-=======-===-==-=-===-==-===-=-=-=-==---------=-==-=======--==============*=*=************",
-" .... ... ... .................+..+..........+.+..+.....+..+.+.+.++.++.++++++++++++++++@++%%#+++@+@+@+@@@#@#@#@@@@@@@@@@@@@@@###@###@#########$##$$#$#$$#$$$$$$$$$$$$$$$$$%$%%%%%%&%&&&&&%%%%%%%%%%%%%&%%%%&&*&&**=***********&*&&&%&%%&&%&%%&&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&*&*&&*&*&&**&*********&**&*&*&****=***=***=*=***=*=*=**=**=*=*=**=*=*=**=*=--*=*=**=****=**=*=*==*======**=*==========-====-=-==--=----=-=-====-=-=-=====-==-==-=-===-==-==-=-===-==-==-==-======----=-------=-=-=-=---========-=-=---=----=-----;-----==-=-=-==-=-==========-==-==-=====-======-==-==-===-==-==--=-===-==-=-=--------=-=-====*====---=-=====*=*=*=*=*==*******&",
-".. ....................................+....+....+.+..+..+..+...+.++.++.+++++++++++++@++@#%%@@+@@@+@@@@@@#@#@#@@@@@@@@@@@@#@#@@@##@##########$##$##$#$$#$$$$$$$$$$$$$$%$%%$%$%%%%%%&%&&&%%%%%%%%%%%%%%%%%%&&&&&**=***=*****&*&**&&&&%&&%&%&%&&&%&&&&&&&&&&&&&&&&&&&&&&&&*&**&&*&&*&&*&*&**&****&**********&*********=*********=*******=**=*=**=*=*********--******=*=*==**=*====*======**=*=======-=-===-=====--=-------==-=-=-======-=-==-===-=-==-=-=-=-=================-=-=--==-=--=-===--=--=-=-==-=-=-==-=-=-==--=-=---------------====-=====-=-=-=-=====-=====-=-===-==-======-=-=-=-==-===-=-=-==-=-=-------==-=-==-======-===-========*==**=*****=*****",
-"... . . ... ..... .................+.+..+.+..+......+..+..+..++.++.++.+++++++++++++@+++++%%#++@++@+@+@@@@@#@#@@@@@@@@@@@#@@#@@#@#@#############$##$#$#$$$$$$$$$$$$$%$$$$$%$%%$%%%&%&&%&&%%%%%%%%%%%%%%%%&%&&&*&****=******&****&&&&%&%&&%&%&&&&&&&&&&&&&&&&&&&&&&&&&&&*&&&&&**&*&&*&&*&*&&*&**&*******&*&***&*********=*=**=****=**=****=***=****==*****=--***=*=****=**=*==*=*========*=*============-===-=-=-=------=--=============-=-===-=-=====-=====-=-=========-==========-=-=-=-=--===-=-=--=--=-=-======-=--=-------------;----=---==--=-====-===-==-===--=-===-=-=-==-=-=-====-==-==-=-==-=-=-==-=---=------=-=-==========-==-============*=*=********",
-". ...... ......................................+.+.+....+...+..+.++.++.+++++++++++++++@+#%%@+@++@+@+@@#@#@@@@@@@@@@@@@@@@@@@#@@#@##@#########$##$$#$$#$#$$$$$$$$$$$$$$$$%$%$%%%%%%&%&&&%%%%%%%%%%%%%%%&%%%&*&&&**=******&***&*&*&&%&%&%%&&&%&%&%&&&&&&&&&&&&&&&&&&&&&&&&&*&*&&&&*&&**&&&**&******&********&*****************=*=**=**=*=***=*=*===***=*=*=-=******=**=**=*=**=========**=*======-====-===-====-=--;---=-===-=-==-==-=-==========-========-===============-======-=-=--=--=-=--=-==-===-=-=----=====-==-=-=-=--------------=-=--==-=-=--==-===-===-==-==-======-======-=-=-=-=--=-=-==-====-=-==-----------==-=======-=--==--=====**=*=*=**=******",
-" ... ......... ...... ..............+.+....+..+...+..+...+.+..+.+.++.+++++++++++++++++++$%$+@++@+@@@@@@@@#@@@@@@@@@@@@@@@##@@@#@###############$##$#$#$$#$$$$$$$$$$$$%$%$$%$%%%%%%%&&&&%%%%%%%%%%%%%%%%%%&&&*&**=**********&*&*&&%&&%&&&%&%&&&&&&&&&&&&&&*&&*&&&&&&&&&&&&&&&*&**&&*&&&**&&*&*************&**********=*=*=*=**************=*=*=*****=***=;=**=*=****=**=***===*======*==*===========-===-==-=-=--------=-=-============-====-==-=======-===================-==-====-==-=-=-=-==-=--=---=-=-=-----=-==-==-=-------------------=-=-==--==---=--==--=-=-=-=----=-==-=-=-===-=-=-==-====-==-=-===-=-=-------==--==-======-==--===-=====*=*=**=***=***",
-".. ... .. ..............................+....+..+..+...+....+.+.++.++.++++++++++++++@+@#%%@@+@+@+@@@@@@#@@@@@@@@@@@@@#@@#@@@#@@#@#@##########$##$##$#$#$$$$$$$$$$$$$$$%$$%$%%%%%&%&%&&&%%%%%%%%%%%%%%&%%&&&&&&*=***********&**&&&&&%&&%&&&&%&&&&&&&&&&&&&&&&&&*&&&&&&&&&*&*&&*&&*&&*&*&&**&***&**************************=**=*=*=*=*=*=*==**=**=*==***=-=*******=*=**=*===*=*=======*=*=====-=-==-===-==-==-=-------==-===-=-=-======-=======-==========-============-======-==-===--=-==-==-======-==-=-=-=--=--==-=--=-=-------------;----------==--===-==-=-=-=-=--=-==-==--=-=-==-==-===-=-=--==-=-=-=-==-=--=--------=--=========-==-===========*==*=*=****",
-"....... ... ..... ..................+.+..............+...+.+.+.+.++.++.++++++++++++++++$%$@+++@+@@@@@@@@@@@@@@@@@@@@@@@@@#@@@#@@@#############$#$#$#$#$$$$$$$$$$$$$$%$$%$%%%%%%%%&%&&&%%%%%%%%%%%%%%%%%%&%&&*&****=*****&**&*&*&&%&&%&&%&%&&%&&&&&&&&&&&&&*&&&&&&&&&&*&&&&&*&*&*&*&&*&**&**&************************=*=***=**=*******=***==**=**=***=*--*=***=*****=**=**=*======-*==*=*==-====-==-===-==--=----------==-====-==========-==-==-=========================-=-=====-=-==-=-==-==-=--===-=-=--=-=------====----------------------=-=-=--=---=--=-==-=-=-=--=--=--=-=-==-=--=-=--=-=-==-=-=-==-=--=-=------;--=-=-=-======----=-=-=====*=*=**=*=**=**",
-". . . ....... ..... ... ...................+..+..+.+..+...+....+.+.+.+++++++++++++++++@$%#+++@++@@@@@@#@@@@@@@@@@@@@@@@@@@@#@@##@############$###$##$#$$$$$$$$$$$$$$$%$$%$$$%%%%%%&%&&%%%%%%%%%%%%%%%%&%&&*&&*=*=*********&*&*&&%&%%&%%&&&%&&&&&&&&&&&&&&&&&&&&&&&&&&&&*&*&*&&*&*&*&&*&*&*&*&***************************=**=**=*=*==***==**==**=*=*=*--=***=**=*==**==**===*===-=*=*=*==========-==-=-==-=-------=-=-=-====-==-=-===-=================================-=======-====-====-=======-=-===-==-=--=-=-----=-===----------------------------=--==-=--=-=-=-==-=-=-=-=-=--=-===-=-=-=-=-=-=-==-==-==-=-==----------=-=-=-====-=-=-===-=========*=*=****",
-" . ..... . .............................+.........+......+.+.++.+++.+++.+++++++++++++@$%$@++@+@@@@@@@@@@@@@@@@@@@@@@#@@#@@#@#@@#@#########$#$##$##$#$##$$$$$$$$$$$$%$$$$$%%%%%%%%&%&&&%%%%%%%%%%%%%%%%%%&&&&***********&*&**&*&&&%&&%&&%&%&&%&&&&&&&&&&&&&&&&&*&&&&&&&&&&&*&&*&&&*&&*&&*&**&**********************=****=*=***=***=***==***==*==*****=-=*=****=****=*=**==*========*=*=====-=-=-=====-==-=-----=-=--=---======-=====-=========-==========================-====-==-=-===-===-=-=-====-=-==-=--=----=-----==-----------------;------=-=-=--=----=-=-=------=--=-=-=-===-=--=-=-=-=-=-==-=-==-==-==-=---------=--=--=======---=---=====*=*=*=*=**==*",
-". .. . ..... .. .......................+........+...+.+.....+.+.+.++.+.++++++++++++++@$%#++@+@@@@@@@@@@@@+@@@@@@@@@@@@@@@@@@@##@#@###########$#$#$#$#$$$#$$$$$$$$$$$$%$%$%$%%%%%&%&&&%%%%%%%%%%%%%%%%%&%&&&*&*=***********&*&*&&%&%&&&%&&&%&&&%&&&&&&&&&&*&*&*&&&&&&&&&&*&&*&*&**&&*&**&**&*****&*******************=*=****=***=***==**==*=*=**==*==--=***=****==**=*==*========**=*===-=-==-==-=-=-==-=--;--=-=--=--=-=-======--=-====================-==================-=========-==-=======-==-==-=-=-==-=-==--=---=-==-----------------;----------=-==-=-=---=-=----=------=--=-=-=-=-=-=-=-=--==-=-=-==-=--=-=---;----=--=--=====-=--===-=======*=*=*==***",
-".. .. .. ........ ... ... ...........+..................+.+..+.+.+.++.++.+++++++++++@#%$@+++@@@@@@@@@@+@+@@@@@@@@@@@@@@@@#@#@#@@###########$##$###$$$#$$$$$$$$$$$$%$$$%$%$%%%%%%%&%&&%%%%%%%%%%%%%%%%%%&&*&&*=********&**&**&&&&%&&%%&%&%&&%&&&&&&&&&&&*&&&&&&&&&&&&&&&&&*&&*&*&&*&*&&**&**&******************=********=*=*=*=**==***=**=*=*==***=*=;**=*=*=*=***==*=*==*========*========-==-==-====-=-------===--=--=-=-===========-=====-=-=-=======================-===-==-======-===-==-===-=====--=--=--=---=--------=-==---------------;-----------=----=---=-=-=--=-===--==-=-=-=-=-=-=-=-==-==-===-==-==--------;----=-==-=====-=---==-========*=**=*=*",
-". . .. ... .. ..........................+.+....+..+.+.+..+.+.+.+.+++.+++++.++++++++++$%#@+@+@@@@@@@@+@+@@@+@+@@@@@@@@@@@@@@#@@##@@#######$##$###$$###$$#$$$$$$$$$$$$%$$$$%$%%%%%&%&&%%%%%%%%%%%%%%%%%&%&&&*****=********&**&*&&%&%%&&&&&&%&&%&&&&&&&&&&&&&&&&&&*&&&&*&*&*&**&*&**&*&**&*&*&********************=*=*=*=**=*=*=**=**=*=**=*=*=***==*=;===*****=*=*=**=*=*========**=*===-=-==-======---=----------===-=-=-=-=-==========-==-===============================-==-===-============-====-=--==-=--=---=----=------=--=-=--------------;----=-=---=--=--=--------------=--=-=-=-=--=--=-=--=-==--=-=-=-=-=---------------=-=-==---=---=-============*=*",
-". . . .. .. .....................................+......+...+.+.+.+.+++.++++++++++++#%%#+++@@@@@@@@@@+@+@+@@@@@@@@@@@@@@@#@@#@#@##########$##$#$$#$#$$#$#$$$$$$$$$$$$$$%%%%%%%%&%%&&%%%%%%%%%%%%%%%%%%&&&*&&*=*******&****&*&&%&%&&%&%&%&&&&&&&&&&&&&*&&&&&*&*&&&*&&&&&&&*&&*&*&&&*&*&*&*&*************=****=***=*****==**=**==**=*=*==*=*=*===***--=*=*=*=**=**=*==*=========*======-======-=----===-----==-=-=-=-==--=-=-=================-=-=---=-==================-==-===-====-===-==-====-=-=-===-=-==-=-=--=-=--------=-=---------;-----;--;-------------=----=-=--=--=-=-==---=--=-=--=--=-==-=-==-=-=-=-=-=------;----=-=-=-====---=-=-=-=======*=**==*",
-". .. .. ..... .. .......... .............+.........+.+....+..+.+.+.++.++++++++++++++$%$++@@@+@@@@@@@+@@+@@@+@+@@@@@@@@@@@@@#@#@##@##########$####$$#$$$$$#$$$$$$$$%$%$%$$%$%%%%%&&&&%%%%%%%%%%%%%%%%&%%&&&**=**=*********&*&*&&%&%&&%&&&&&%&&%&&&&&*&&&&&*&&&&&&&&&&&&&*&*&*&*&***&**&******&************=****=**==*==**==*=*=*=*=**=**=*=*=*=*===-=*=*=*=**=**=*==*==*=======*=**==-==-=-=-=-====-----;--=-=--=====-==-==-=-=-====-===-======-=======-==============-===-==-===-====-=======-=====-=--=-=--=-=-=-------------=-=-=----;----;----;--;--------=-----=-----=--=------==--==--=-=-=--=--=-==-==-=-==-=------;-;------=-==-==-----=-===========*=***",
-".. .. .. . ....... ... .. ......................+........+.+..+.+.+.++.+.+.++++++++@$%#@@@@@@@@@@+@+@+@+@+@@@@@@@@@@@@@@@#@@@@#@##############$$##$#$##$$$$$$$$$$$$$$$$%%$%%%%&%%&&%%%%%%%%%%%%%%%%%%%&&*&&**=*********&**&*&&&%&&%&&&%&&&&&&&&&&&&&&&*&&&&&*&*&&&*&&&&&*&***&*&*&*&**&*&**************=****=**=**=**===**=*=**=**==*=*=**==*=**=--*=*=*=**=*=*==*==*========*=*======-=====-=--=-=--;----=====---===-=--============-====-=-==--==-====-========================-=-=======-===-=-==-==-=-=-=--=-===-=----------=---------;--;----;------------------=-=------=-==--==---=-=-=-==--=-=-=-=-=-=-=-=-==-------;---=--=--=-==-----=--=-===========*",
-"  .  . ...... . ... ....................+.+........+..+...+..+.+.+.++.+++++++++++++#%$@+@+@+@@@@+@+@@@+@+@@@@@@@@@@@@@@@@@#@#@@#@@##########$###$$#$#$$$$$$$$$$$$$$%$%$$%%%%%%%&%&&%%%%%%%%%%%%%%%%%%%&&&*&=*************&**&&&%&%&&%&&%&%&&%&&&&&&&&&&&&&*&&&&*&&&&&*&*&*&&**&**&**&**&******************=**=***=*==***==*=*==**=**=*=*==**=*===-==*=*=**=***=**=*==========*==*===-===-=-==-==-=------=----=-====-=====-=-=-==-==-==========-==-==-=======-=-=-=-===-===-=-=-========-=-====-====-=--=-=-=-==-=--=--------------==-------;---;---;;-;--------------------------=-=---=-=--=-=---=-=-=-=-=-=-=-=-=--------;--------==-====--=---=-=========*===",
-".. .. .. . . ....................................+..........+.+.+.++.++.+.++++++++@$$$@@+@+@@+@++@+@++@@+@+@+@@@@@@@@@@@@#@@@#@@#########$###$#$##$$$#$#$$$$$$$$$$$$%$$%$%%%%%%%&&&%%%%%%%%%%%%%%%%&%&&*&&**=*=*=*****&***&&&&%&%&%&&%&&&&&&&&&&&&&&&&&*&*&&&*&&&*&&*&&&&*&**&**&****&***&************=**=****=*==*=**==*=*==*=*==*===*=**==*==*-==*=*=*===*==*==========-==**=*===-=-=-=-===-=-----;---=-=-=-===-==========================-=-=-==-==-=-=--====-========-=========-==-===-=--==---=-==-=-=-=-=-=-=--------=-------------;--;-;;-----;---------------------=-=-=-=--=-=-=--=----==-=---=-===-=-=-=-===----;--;----=---=-=-=-----=-==-=========**",
-". .. .. ...... ...... ..............................+......+..+.+.+.++.++++.++++++@%%#+@@+@@+@++@+@+@@+@@+@@@@+@@@@@@@@@#@@#@@##@############$#$#$#$#$$$$$$$$$$$$%$$%$%%%%%%%&%&%&%%%%%%%%&%%&%%%%&%%&&&***=************&**&&&&%&&&%&&&&&&&&&&&&&&*&*&&&&&&*&&*&&&&&&&*&****&**&**&****&****************=**==**=**=*==*==*=**=*=**=**==*==*=*=*--=*=*=*=***=**=*=*======-=========-===-=-=---=-==--;-----=-=-=-====-======-=======-=============-=-=--=---===-=-===========-=-==-=-==-=-=-====-====--=--=-==-=-=-=-=-=--=----=------=------;-;--;----;-;--------------------------=--=---=-=-=-=--=--==-=---==-=-=----------;-;------=-=-===--=-----============",
-".. . . ..  . ... .. ... .. .......................+.......+.+.+.+.+.+.+++.++++++++$%$@@+@@@+@+@+@+@++@@+@@@+@@@@@@@@@@@@@@#@#@@#@##############$#$$#$$$$$$$$$$$$$$$$%$%$%%%%%%&&&&&%%%%%%%%%%%%%&%%&%&&*&***=**=*********&*&&&&&%%&&&&&&&&&&&&&&&&&&&&*&*&&&*&&*&&*&&&&&*&****&**&***&*******************=***=**=**=**=*=*===*=*=**=**==*=*==*=--*=*=*=*==*==*============**=**====--=-==-===-=-------=-=-=-=-=--=====-=====-=======-========-=-=-=-=---==--==-====-===-======-=======-=-=-=--=----=-=-=-=-=-==-=-=------=-=-------------;----;--;-;--;-;-;-;------------------=-=-=--=-=----=--=--=--=--===-=-=-=-==-=------;-;-------==-=-=---=-==-=========*=",
-". . . .. .. .. .............. ...............................+.+.+.+.++.+++.+++++@$%$+@+@+@++++@+++@@+@+@+@@+@+@@@@@@@@@#@@@@#@#@###########$$#$#$#$#$$$$$$$$$$$$$%$$%$%%%%%%&%%&&%$%%%%%%%%&%&%%%%%&&&&**=**=***********&*&&&%&&&%&&&&&&&&&&&&&&&&&&&&&&*&*&&*&*&&*&*&*&*&*&******************=******=***=*=*==*==*==*=*==*=*==*==*==**=*=**=--==*=*=*=**=**=*=*====-=-====*====--====-==--==---;---=-=-=-=-=-===-===========-=-=-===-=========-----=-=--=-=-===-==========-====-==--=-===--=-=-=-=-=-====-==-==-=-=-=-=-=---------------;-;;-;;-;-----;-;---;-;-;----------=--------=--=-=--=--=-=-=-==---=-=-=-=-=------;--;------=--=-==--------=--=-=======",
-". . . . ..... ... ...... .......................+..+......+.+.+.+.+.++.++++++++++$%$#+@+@@++@+@++@++@+@+@@+@@+@@@@@@@@@@@@@#@@#@#@########$##$#$#$#$$$$$$$$$$$$$$$$$%%$%%%%%%%&&&&%%%%%%%%%&%&%%%%%&%&&***=*=********&**&**&&&&%&&&&&&&&&&&&&&&&*&*&&*&*&&*&&**&&*&&*&&&******&****************=********=**=*=***==*=*=**=*=*==**=**=**=*=**==-==*=***=*==*==*============**==*=-===---=-=-=-=-------==-==-==-==--========-=-=======-=====-=-=-----=---=-=-==-=======-=====-==-=-==-===-=---==--=-=-=-==-=-==-==-=---=------=-----------------;--;--;--;-;-;-;-----------------==-=-=--=----=--=----=-=--===-=-=---=--=-------;-;-------=-=-=----=---===========",
-" .. .. . . . .. .... ...... ...........................+...+...+.+.+.++.+.+.++++@$%$@@+@+++++++@+@+@+@+@+@@@+@@+@@@@@#@@#@#@@#@###############$#$#$##$#$$$$$$$$$%$%%$$%%$%%%&%&&&%%%%%%%&%&%%%&%&%&%&&&&&=*=**=***********&&&&&&&&&&&&&&*&&*&&*&&&&&*&&&*&&**&&**&&*&&*&&********&**********=*=**=********=**=*===*===*==*=*==*==*=*=*==*=*===-==**==*=**==*==*======-=-=*===*===--=-==-=-=-=---;---==-==-=-==-=-==-=-===-=====-==-=====-===---=-=---=--====-==-=========-===-===-=----=-===--=-=-=-=-=-====-=-=-=-=--=====--=------;------;---;-;;--;---;-;;---;--;-------------=-=-=---=-=-----=-=---=-=--=-=-===--=-------;-;-;-------=-===-----=-=--==-=====",
-".  . . .. ... .. ..... .................................+...+.+.+.+.+.++++++++++#$%#+@+@+++++@++@+++@@+@@@+@@@+@@@@@@@@@@@@#@@#@@@##########$#$$#$$$#$$$$$$$$$$$$$$$%%$%%%%%&%%&&%%%%%%%%%%%&%%%%&%%&&**********=******&*&*&&&&&&&&&&&&&&&&&&&&&&&*&&*&*&&*&&*&*&*&&*&*&*&*********************=*****=**=**=*=**=*=**=*=*===*==*==*=*=*=*=**=--===***=*==*=*========-=====*=*==-=-=-=--=------;--;--=======-=-=-==-===-=-==-=-==-=====-===---------=--==-=-=======-====-===-==-=-=-===-=----=--=-=--==-=-=-====-=--=-=-----=---=-----;-------;-;;--;----;-;--;;------;--------=-------=-=-=-=-=---=--=--=-==-=-=---=--=-----;-;-;---------=-=---------==-=======",
-" .. . . . . .. .. . ..... ..... ..................+......+.+...+.+..+++.+.+++++@$%$#+@+++++@++@++@+@+++@++@@+@@@@@@@@@@#@@#@@@#@#############$##$###$$$$$$$$$$$$$$%$%$%%%%&%%&&&&%%%%%&%&%&%%&%%&%%&&&&&*===*=************&&&&&&&&&&&&&&&&&&&&&&*&&&&*&&*&&*&*&*&*&*&&&*&******************=*=****=***=**=**=*==*=====*==*=*==*==*=*=*=*=*=*=-===*===*=**=*==*========-==*======-=--=-=-=-==---;---=--=-====-===-===-=-==-=-==-==-=--=====----=--==-==--=-=-=-=-=====-===-==-====-=---=-=-==-==--=-==-===-==--==-==----==-=--=---------;-;----;--;;-;;;----;;--;-;-;------------=-=-=--------=--=--=--==-=-----=-==-==-=--------;;;-----=--=-==-----=--=-=-=-===",
-".  . . . . . ... .... ....... .................+.......+......+.+..++..+++++++@@$$#@@++++++++++@++@++@+@+@@@@+@@@@@#@#@@@@@#@#@##@#@#######$##$#$#$$##$$$$$$$$$$$%$%$%$%%%%&%&%&&%%%%%%%%%%%&%%&%%%&&&*******************&&&&&&&&&&&&&*&&*&*&*&&&&*&&&*&*&*&*&**&*&&*&*&&*******************=**=*=******=**=*=*=*=**=*==*====*==*=*=*=*=*=*=-===**=**=**=*==*======-=-=*==*=*==-==-=--=-------;----=-=========-==-=-===-==-==-==-=====-=--------==-==-===========-==-======-==-=-=-===-=-==--=--=-==-===-==-===--=--===--=--=------------;------;--;---;-;;-;;;;--;----;------=--=-----=-=-=---=-=---=--=--====--=-----------;-;-;-;------=---=--------=-==-====",
-" . . . . .. .. ... ..... .. .............................+.+.+...+.+.++.+.+++@+#%$$+++++++++@+@+@++@+@+@+@++@@@+@@@@@@@@@@#@@@#@@##############$#$#$$$#$$$$$$$$$%$$%$%%%%%%%&%&&%%%%%%%%%&%%%%&%%&%&&*&&=*=*=***********&*&&&&&&&&&&&&&&*&&&&&&*&*&&*&&*&*&***&**&*&&*&*&**************=*=**********=**=**==**=*==*====*=*=*=======*=*=*=*=====*==*=**===*=*======-=-=========-=--=-=--=-=--;-;-----=--=========-==-=-==-==-=-=-==-=-==------====-==-=-=-=-==-=-===-===--====-=-=-=---=-=--==-==-=-=-=-===-=-=-==-=-=--=-=-=--=-----;-;-;--;-;-;-;;-;;--;---;-;-;---;-;------------=-=--=----=-----=--=-=-=----=-=-==-=-=------;-;-;--------==-=-------=-=-==-==",
-"  . . . . .. .. ... .. ................................+....+.+.+.+.+.++++++++@$$$@+++++++++++@++@++@+++@+@@@@+@@@@@@@@@#@@@##@##@#@#########$#$#$$#$#$$$$$$$$$$$%$$%$%%%&%&%&&&%%%%%%&%%%&%&%%&%%&%&&***=****=**********&&&&&&&&&&&&&&&&&*&&&&&&&*&&*&*&*&*&**&***&*&*&*&***********=****=*=*=*==*=*=**=**==*=*=*==*=*=====*==*=*==*=*=*===-==*===*==**============-===*=*===-=-=-=---=-----;-;--=--==-==========-===-==-==-=-=-====-=----====-==-===-==-==-===-====-===-=--==-=-=-==-=-==--=-=======-=-==-=-=---=-==--=----------------;-;--;-;--;-;;--;-;-;;-;;;------------=--=---=----=---=---=-=-=-=-=-=--=--------------;-;;-;------=-=----------=-=-====",
-"..  . . .  . . .. .. .......... . .......................+.+...+...+.+.+++@+@+#$$$@+++++++++@+++@+@++@+@+@@@+@@@@@@@@#@@@@#@@#@@@###########$##$#$##$$$$$$$$$$$$%$$%$%%%%%%%&%&&%%%%%%%%%%%%%&%%&%&&&*&*=**=************&*&&&&&&&&&&&&&*&&&*&*&&&*&&*&*&*&*&*&***&**&*&*&***************=****=*=*=****=**==**=*===*======**=======*==*=*=*=-==*==**=**==**=*======-=-========-=-=-=--=---=-;;----=--=--=--==========-==-==-==-=-=-=-==;--====-=====-=-=--=-=-=--=-=--==-==-===-=-=-=--==-=-=-==--=--=-=-=--==-=-=-=-=-==--=-==-=------------;;---;-;;--;;-;-;-;;-;-;-;-;-;------=---=----=---=---=----------=--=--=-==-=------;--;-;;-;--------==--------=-==--=",
-"  . . . . . .... . ... ... .. ..............................+.+.+.+.+.++++++++#$$@+++++++++++++@+@+@++@+@++@@+@@@@@@@@@@@@@@#@##@#@##########$##$#$$#$$$$$$$$$$$$$$%$%$%%%%&%&&&%%%%%%%%&%%%%%%&%%%&&&&=*****************&&&&&&&&&&&&&*&&&&&&&&*&&*&&*&*&*&****&***&*&&*&****=**=**=*******=****=*=*=***=**=*=*=*====*=*===*==*=======**======*=*==**==*==*======-=-==========-=-=--=--=--;---;-=--=--=-==-=======-==-==-==-==-===-==;--==-=-===--==-=-=-=--=-==-=-===-==-==--=-=-=-===-=-====-==-==-=-=====---=-=--=-=--=-------------;-;-;--;-;--;-;;;-;-;-;-;;-;-;-------------=---=-----=---=--=-=-=-=-=-=---=-=------------;-;-;-------=-==----------=--===",
-".  . . . . .  . ... .... ...............................+..+.+...+..++++++@+@@#$$@++++++++++@+@+++++@++@+@+@+@@@@@@@@@#@@@@#@@#@$-;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;-------------;;-;-;;-;;-;;-;;-;-;;;-;-;-;------------=---=-------------=-=-=-=--=--------=-----;-;-;;;;--------=--=-------=--=-==",
-" .  . . . . .. . ... ....... ....... .........................+.+.++.++++++++@$$#+++++++++++++++@+@++@+@+@+@@@@@@@@@@@@@@@@#@@#*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;---------;---;;;---;-;;-;-;;-;--;;-;-;-;-;----------=----=--=-=--=-=---------=-=--=-=-----------;--;;;-;-------=---;------=-=-=",
-". ..   .  . . ...  .. . .. ... .. .......................+.+.+.+.+.++++++++++@$$#++++++++++++@++@++@+@++@+@+@@@@@@@@@#@@@@@@@@=>>-&$##$#%%#$%%$%%%%%%%%$$$$%$%%%&%&%&&%%%&&&*&*%&&%%%&&&&&&&&&&&*&**=**===========***=*=**&**********************=*=****=*=*=*==*==*=*=*=*================================-====-=-===-=-=-=-=-=-==-=-=-=-----====-==-==-==-=-==------=-===--------------;;;;;;---;------------------==------------;>---------------------------------;--------------------------------------;----------------->>>;-----------;--;;-;-;-;;;;-;-;-;-;;-;------------=-------------=-----=-=-=-=----=-----=-------;--;;-;;--------=-----;----=--=-=",
-"     .. .. . ..  ... ...................................+........++++++++++++#$#++++++++++++++++++++@++@++@@+@@@@@@@#@@@#@#@#%>>=#@###########$####$#$$$$$$$$$%$$%$%$%%%%%%&%&&$%$%%%%%%%%%&%&%&%&&&&**=***************&*&&&&&&&&&&&&&*&*&*&*&*&*&&*&***&***************&***************=*===*===========*=*===*==========================-==*===*==*==*==========-=========-------------;-;-----=------------=--========-==-=-=--;-=--=-=--=---=-=--=---------------=--=--=-=-=-=-=-=-=--=--=--=-----------=------------------;>>-------;--;--;-;;-;-;;-;-;-;;-;-;-;;-;;-;-------------=--=--------=----=----=----=-=----------;-;-;;-;-;------=-=----------=-=",
-" . ..     . .  .. . .. . . . .............................+.+.+++++++++++++++$##@++++++++++++@+@+@+@+@++@@+@+@@@@@@@@@@@@@@@@=>-@@##############$#$$$$#$#$$$$$$$%$%$%$%%%%&%&&%%%%%$%%%%%%%%%%&%%%&&*&=**=**************&&&&&&&&&&*&&&&&&&&&&&&&&**&&*&***&****&**********&*=*=*==*=*=*=*=***=****=******=*=*=*==*===*=====*=*===========-====***==*==*==*======---========--===-==-----;--;-------=-=-==-=-=-===-=-=======-==-=-;--===-=-=-=-==---=--====-==-==-=-=---==-=-=-=-=-=-=-=-=====-==-=======-=----=-=-=-=-=-==-=-=-->>>-----;-----;-;;-;-;;-;;;;;-;;-;-;;-;--------------------------=----=----=----=------=----------;-;;;;---------------;----=-==",
-" .   ... . . .. .. ............ . .. ..................+.......+.+++++++++++@#$#++++++++++++++++@++@++@++@+@+@@@@@@@@@@@@@@##>>%##@###########$###$#$$$$$$$$$$$$$$$%$%%%%%%%&%&$$%%%%%%%%%&%%%%%&&&&&*******************&&&&&&&&&&&&&*&*&*&*&*&*&&&**&*&*************&*********=****=*****==**===*=====*=***===*===*===*=*====*=*========-==*===*=*=*==*==========-=*======-=---=--=-=--;-;-;----=--=-=--=-=-=--=-==-=======-==-;;==--=-=-=--=--==-=-=----=--=--=-=--==-====-===-=====-=-=--=-=-=------=--=-=--=--=--=-=--=------>>--------;-----;;;;-;;;-;-;;-;-;-;;;-;-;-;------------------=----=----=---=-=---=-=-----------;--;-;-;;-;----=-=-=-;---------=",
-"  . .  . . . . .  .. . .. .. ..............................+.+++++++++++++.+#$#@++++++++++++++@++@++@+@+@+@+@+@@@@@@@@@@@@@@@>>#@@#########$#####$#$$$#$$$$$$$%$%$%$%%%%%%&%&&%%%$%%%%%%%%%%&%&%%%&&**=*=*=************&*&&*&&&&*&&*&&&&*&&&&&*&*&*&&****&*&*****************=**=*=***=*==**==*=*=*=**=*=*===**==*=========*=*==========-=-===**=*======*======-=-====*====--=-=--=-=--;-;-----=---=----=-=-=-==-=-=-=--=-====----=-=-=-=--==--=----=--=-=-=-=-=-=--=--=-=--==--==----===-==-=-=-======-=--=--=--=--=---=---=---->>---------;-;-;--;;-;-;;;;-;;;;-;--;-;-;--;-;----------------------=---=-----------=------------;-;;;;;;-------------;-----=--",
-" .   .  . . . . ... . .. .............. ..............+.+.+..+.+.++++++.+.++#$#+++++++++++++@+++@+++@++@++@+@@@@@@@@@@@@@@@@#>>##@############$#$##$$#$$$$$$$$$$$%$$%%%%%%&%&&$%$%%%%%%%%%%%%%%%&&&*&*******************&&&&&&*&&&*&&&&*&&*&**&&*&*&**&*&*********************=****=*=*=***=**=*=*=*===*=*=**===*====*==========*=*=====--===*===*=**=*=========-=========--=----=-------;-;----=-=-=-==----=-=-=-===-==-===-=-;-=-=-==-=-=---=--=-=--=-=------=---=--=-==-==--==--====-=-=-=-=--=-------=--=-=-==-=--=---=-----;>>------------;--;;;;;-;;-;;-;--;;-;;;-;-;---------------------=-------------------------------;-;-;-;-;--;-----=-=----;------=",
-"   .  .  . . .. .  .... .. . . .. . .......................++.+++++++..+.++@#$@++++++++++++++++++@+@+@++@+@@+@@@@@@@@@@@@@@#@>>&@##@#########$##$$#$#$$$$$$$$%$$$%$%%%%%&%&%&&$%%%$%%%%%%%%&%%&%%&&&**=*=**************&&&&&&&&&&&&&*&*&&*&*&&&*&*&*&*&***********=**********=*=*==*=***===*==*=*===*=*=*==*=*=*==*=*==*====*=*========--=-=*==**==*==*========-===========---=-----=--;;-;---=------=--====-=-=-=--==--==-==-----=-=--=-=-===--=---------=-=-=--=--==-=--=-===-===-=--=-==-=-===-===-=----=--=---=--=----------->>;----;--;-;--;-;-;;-;-;;;-;;;;;-;--;;-;--;--------------------------=--=-----=------------------;-;;;;;-;-----------;--------",
-". . .  .  . .  . .. . ................................+.+++.++.+++++.++.+.+####++.+++++++++++@+@+++@++@++@+@+@@@@@@@@@@@@@@@@->-#@############$##$#$$#$#$$$$$$$%$%$%$%%%%%&&%&$%$%%%%%%%%%%%%%%&%&&&*******************&&*&*&&*&*&*&&&&*&*&&*&*&*&*&***&&**********************=*****==***==*=*==*=*=*===*====*===========*====*========-====*===*==*===*=======-=========-=---=-=----;--;------=-=-=-=----=-=-=-==--===-=-==-;-==-=-=-=--=---=----=-=-----=---=--=-=--===-=--=---=-==-=-=-=-=---=--=--=-=--=--==--=----=---=--->>>-----------;--;-;-;;;;;-;;;-;-;-;;-;;;-;--;-;-;------------------------------------------------;-;-;-;;--;-----------;-;----=",
-".    . . . . .. .. . .  . . .. ....... ....................++.++.+..+...+++#$#+.+++++++++++++++++@++@+@+@+@+@@@@@@@@@@@@@@@@@%>>*@@############$##$##$$$$$$$$$$$$$%$%%%%%%%%&%%%%$%%%%%%%%%%&%%%%&&*&=*=**=***********&*&&&&&&&&&*&&&*&&*&&*&*&*&*&*&*&*********=***=*********=*====*=*=*=*=*=*=*=*====*=*=**==*=*=*=*=*=========*=====-=-======*=*===*=======-=-=*=======---=---------;;-;----=-----=-====-=-=-=--==---=-=-----===-=-=--=---=---=-----=-=---=-----=--=--==-==-===-=--=-=-=-=-==-=-=-=-----=--=--=-------------;>>-------;-----;--;-;;;;-;;;-;;-;;;--;-;-;-;--;----;-----------------------------------------------;-;-;;;;--;----------;-------",
-" . .  .  .  .   .  .. .. ........ . ..... .. ...........++++.++.+.+.+.+++.@###++++++++++++++++++@++@+++@++@@+@@@@@@@@@@@@@@#@@=>>-%#########$#$##$$#$$#$$$$$$$%$%%$%%%%%&%&&&%%$$%$%%%%%%%%%%%%%&&&&*=***=*************&&&&&&*&*&&*&*&&*&&*&*&*&*&*&****&*****=****=**=********=***=*=*=*=**=*==*===*=*===*===*=============*=*=*======--====*=*=*=*=*=========-=========-=-=--------;-;--;--=--=-=-=--=----=-=-=-==-=-=-=-=---=-=-=-==-=-=-=--=----------------=-=-==-=-=-==-=-=-=-==-=-=-=-=-=-=-=---=--=-==--=------------->>>;----------;---;--;-;;;;-;;;-;;;;-;;;-;;-;;-;---;----------------------------------------------;---;-;;-;;;;-------------;-----",
-"    .   .  . ... .. .. ... . . ......................+.+..+.++.+.+.+..+..+@###++.+.++++++++++++++@+++@++@+@+@@@@@@@@@@@@@@@@@#@*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>----;--------;---;-;;;;;;;;;;-;;-;;--;-;;--;--;---;--;-------------------------------------------;--;;;;;;---;---------;-;-----",
-". .  . .  .     . .  ..  .. .... .... ..............+.+.++.+.+.......+.+++###@++++++++++++++++++++++++@++@+@@+@@@+@@@@@@@@@@@@#@%->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;---;---;----;----;--;-;;;;;-;;;-;;;;;;-;-;;;-;--;---;----------------------------------------------;--;-;-;;-;-----------;-;----",
-"   .     .  .. . . ..  .. .... .... ... ..............+.+.+.+.+.+..+..+..@###@.+.+.++++++++++++++@+@++@+@+@+@+@+@@@@@@@@@@#@@@@@@@##$$#$####$%%$%%%%%%%%%%%$%%%%&%&%&%&&&&&*&&%&%&&&&%%%&&&&&&&&****============****=*=*&***************=*=*=***=*****=**=*==================================-======-==-=======-==========-=-=-=-=-=-------=-==-=-=-=-=-==-------=-=-==----;-;------;;;;;;;---;----------------------------;;;-----------------;-;-;---------;-----------------------------------------------;------;-;;;;;;;------------------;---;-;;;;;;;;-;;;-;-;-;-;-;-;-;;-;;--------------------------------------------------;-;;;;;;--;---------;--;---",
-" .  . . .  .  .  . . ... . . .... ....... ... .....+.+..+.+.+.......+.+.+@###++.++++.+++++++++++@++++++++@+@+@+@@+@@@@@@@@@@@#@#@#@############$#######$#$$$$$$$$$$%%%%%%%&&%%$%%%%$%%%%%%%%%%&%&&***=****************&&&&&&*&&*&*******&*&*&***&*****&*************=**********=*==*==*==*=*=*======*==*========================*=====---============*=========-=========-----------;;;-;------------=-=-=-=-----------=-=---=-=-=--=-=----------------------------------=--=---=-----=----------------------=----------------------------;-------;--;-;;;;;;;;-;;;;;;;-;-;;;;--;---;-;------------------------------------------;--;;-;-;-;;-;-----------;;----",
-"   .      . .  . . . .  . .. . . .................+.+.+.+.....+.+.+..+.++@##@+++.+++++++++++++++++@+@+@@++@++@@+@@+@@@@@@@@@#@@@#@#@#############$#$$$$$$$$$$$%$%$%$%%%&%&&%&$%$$%$%%%%%%%%%%%%&%&&*=**=*=************&&&&&&&*&&*&&&*&*&**&**&***&*&************=*=***=*=*******=**=**=**=*=*=**=*=*=====*==*==*==========*=*=====*==============*===========-=====*====------------;-;;-;---=-=---=--=-=-=-=-=-==-===-=-=-----=-=-=-=--==----------------------=---=-=-=-==-===-====-=-====-=-=-----------------------------;--;--;--;--------;-;-;;;;;;;;;;-;;;;-;-;-;-;;--;-;-;;------------------------------------------------;--;;;;;;;-;-;----------;-;--",
-" .   . . .   . . . . .. .. ........ . ..... ...........+.+.+.......+.+..+###@+.++.+.++++++++++++++++++++@++@+@+@+@@@@@@@@@@@@@#@#@#@##########$###$###$#$$$$$$$$$%$%%%%%%%&&%%$%%$%%%%%%%%%%%%%%&&*&*=****************&&&&*&&&*&&**&*&**&**&**&&**&**&*******=******=**=*****=***=*==**=**=***=*==*==*=*==*==*==*=*=*===*=====*====*==---============*========--========-=----------;;-;;-;-----=-=-=-=--=--=-=--=---=-=------=-=-=-=--=--=-------------------=--==--=--=--=-=--=---=-=-----=-=--=---=-=-=-=-=-----;--;--;--------------;-------------;;;;;;;;;;;;;;;;;-;--;;;;-;--;;-;-;--;--;-----------------------------------------;;;;;;--;-;-------;-;---",
-"          . . . .  . . .  .. . .. ..... ........+.+.+.+......+.+.+...+.++###++.+.+++.+++++++++++++@+@+@+@+@+@+@+@@+@@@@@@@@@@@@@@@#############$#$#$$#$$#$$$$$$$%$%$%%%%%&%&%$%$%%%$%%%%%%%%%%%%&&&*=**=**=**********&*&&&&&*&&*&*&*&*&&*&*&*&**&*************=**=*=**=**=*=**=*=*=**=*=*=*==*=*=*==*=*=*==*==*=======*====*=====*===-=======*=*============-====*=======--=--------;-;------=-=---=-=-=-=-=--=-=--=--=-=-----=--=-=-=---=---------------------=---=---=-==-=-==-===-=-==-==-=--------=-------------;-------;--;-;--;-;---;-;-;-;-;-;;-;;;;>;;-;-;-;-;-;-;-;;;-;-;;--;-----------;--;-------------------------------;-;;-;-;;;;;---;--;----;-;--",
-"    . . .  .   .  . . . ... .... ..............+.+.+...............+....@###+.++.+.+++++++++++++++++++@++@++@+@@+@@+@@@@@@@@@@#@@##@@############$#$##$#$$$$$%$$$%$%%%%%&%&%%%%$%$$%%$%%%%%%%%&%&&&***=***************&&&&&*&&*&&&*&*&***&*&**&*&*&*&*************=**=**=********=**=*=*=*=**=*=*==*=*=======*===*=*=*===*============-=-==*==================-=========-----------;;;;;;;--=----==-=-=-=-=--=-=--==-=-=--------=-=-----=---------------------=---=--==-=--=-=--=---=-=--=--=--=----=--=-=-=----;-------;-;-------------------------;-;;;;;;;;;;;;;;;;;;;-;-;-;-;;-;;--;-;-------------;-------------------------;---;--;;;;;;;--;----------;---",
-" .        .  .  .. . . . . . . .. . .. ........................+.+...+.+@#@@++.+.++.++.++++++++++++++++++++@@+@+@@+@@+@@@@@@@#@@#@@############$###$#$#$$$$$$$$$%$%%$%%%%%&&$$$%$%%%%%%$%%%%%%%%&&&******=**********&&&&&&&&&&&&*&*&*&&*&*&*&**&***************=*=**=*=**=*=*=**=*==*=*=**=*=***=**====*=*=*===*=======*===*==========-======*=*=*==========-=-==*=*===-=----------;----------=-=----=--=--=-----=---=--------=-----=-=--=-------------------=--=--=-=-=-=-=-=-=-==--=-==-=---=---=--=------------;--;------;-;--;-;---;---------;;;-;-;;;;;;;;-;;;-;-;-;;-;;;;;--;--;-----;--;---------------------------------------;;-;;-;;-;;-;--;---;-;;-;-",
-"   .  .      . .  . . . . . ... .... ...........++................+.+.++@##@+.++..+.+++.++++++++++++@+@+@++++@+@+@@@+@@@@@@@@@@@@##@#@##########$##$#$$#$$$$$$$$$$$%%%%%&%&&$%%$%%%$%$%%%%%%%%%&&&**=*****************&&&&&&*&*&&&*&**&*&**&*&***&*&*******************=**=***=****=**=*=*=**=**==*=*=*===*==*==*=*=*===*====*====*====-=====================-==========---=-------;;;;;;--------==-=-=--=--=-=-=--=--=--------=--=----=-------------------------=--=--=-=-=-=-=--==-=---=-=-------=--=-=-------------;-;------------;---;----;----;-;-;;;;;>;;;;-;;;;;;-;;--;;;;;-;-;-;-;------;-;-;----;-------;--;--;-----------;---;-;;;;;;-;--;---;----;;--",
-".   .  . . .  .  .  . . . ..  .. . ...........+.................+......+#@#++.+.+++.+.++.+.+++++++++++++++@+@+@@@@+@@@@@@@@@@@#@@@@#@############$##$##$$$$$$$$$$%%$%%%%%&%%%$%$%$%%%%%%%%%%%%&%&&&=**=************&*&&&&&&&&&&*&&&*&&*&*&&*&*&*&***********=*=*=*=*=*=*=***=***=*=*==**=*=*=*=**=*=*===*===*==*=====*====*=========-=-=-==================-==-==*======-----------;;-;-;----=-=---=---=--=--=---=--=--=------------------------------------------=--=-=-=-=-=-=-=----=-=---=----=--=----------;-;--;----;-;-;-;-;-;--;-----;---;-;-;-;-;;;;;;;;;;;;;;;;;-;-;;-;-;;;;-;-----;-;-------;-----;------------------------;-;-;-;;;;;-;;-----------;-",
-"             .  .  .  . . . .. .. ................................+...+@#@#+..+.+..+.++++++++++++++++@+@+@+@++@++@@+@@@@@@@@@@@@#@##@##############$##$$$$$$$$$$$$$%%%%%%%&&%$%$%%$%%%%%%%%%%%%&&&*******************&&&&&&&*&*&&&*&&*&*&**&***&**&**************=***=***=*=*=*=*=*=*=*==*=*=*=*=*=*=*=*=*=*==*==*=*====*===*========-======*=*==============-====*====-=----------;-;;;-;-=----=-=---=-=------=-----=------------------------;---------------=-=---=-=-=-=-=-=-=--===--=-=----=---=---=--------------;---;-------------;-;---;--;-;-;-;;;;;;>;;-;;-;-;-;;-;;-;;;-;--;--;;-;----;-;-----;------;--------------;---;----;-;;;;;;;-;--;;--;-;-;;--",
-"  .   .   . .  . .. .. . . . .. ................................+....+.@@#@+++.+.+++++.+.+.+.+++++++@+++++@++@+@@+@@@+@@@@@@@#@#@@#@##@##########$##$#$##$$$$$$$%$%$%%%&%&%%$%$%$$%%$%$%%%%%%%%%&&&=*=*********&*&**&*&&&&&&&&&&*&&&*&*&*&*&*&**&******************=**=*=*=*******=*=*=**=*=*=***=*=*========*=======*====*====*=======-====================-=-==*======----------;;;;-;------=-----=----=-=-=--=-=----=--;-;--------------;----;-;-;--;-;--------=--=-=-=---=--=-=---=----------=----=------;---;-;----;---;-;-;-;--;----------;--;;-;;;;;;;;;;;;;;;;;;;;;--;;;;;;-;-;;-----;------;-------------;--;--;--;--------;---;-;;;;;;;-;;---;-----;;-",
-"    .   .     .    .  . . .. . . ... ..............................+..+@##@+..++..+..+.++.++++++++++++@+@++@+@@+@@@+@@@@@@@@@@@@@#@#@#############$##$#$##$$$$$$$%$%$%%%%&&%%$$$%%$%%%%%%%%%%%%&&&****************&**&&&&&&&&*&&&*&&*&*&*&*&*&&**&*&**********=*=***=**=**=*=*=*=**=*=*=*=*=**==**=*=**=*=*====*=*=*=================-==-==*==============-========*====----------;-;-;-;;-----=-=-=-=-=-----------=-------------------------;----------------=----=------==--=--=-=-=-=-=----=-=--=-----------;----;-;---;--------;--;-;-;-;-;--;--;;--;;;;;;>;;;;;;;;;;-;;;-;;;;-;;--;-;;-;--;-;----;--;--;---;---------------------;-;-;-;;;;;;--;----;-;-;-;",
-"  .         .    .  .  . .  . ........................................+@@@@.+.+.+..+.++++++.++++++++++++++++@++@+@+@@@@@@@@@@@@@@@@@#@@############$##$#$#$$$$$$$%$%%%%&%%&%$$%%$$%%$%%%%%%%%%&%&&**=*********&******&&&&&&&&&*&&&*&&*&*&*&*&**&******************=**=**=**=**=**=**=*=*=*=*=***=**=*==*====*=*=======*=*==*=*========-========*========-==-=--*=*=======---------;;;;;;-----=------=----=-=-=-=-=---=---------------------;---------;--;-------=----=-==---=---=---=------=-----------------;----;-----;----;-;-;--;-----------;-;;--;;-;;;;;;;;;-;;-;-;;;;-;-;-;;-;;;-;--;--;---;-;---------;----;-----------;--------;-;;;;;;;-;;--;-;-----;-",
-".     .   .     .  .  .  . .. ... ........... ......................+.@##@@..+..+.+.++...+.++++++++++++++@+@++@+@+@@+@@@@@@@@@@#@@@#@#####@#########$##$$#$$$$$$%$$%%%%%%&&%$%$$$%%$%%%%%%%%%%%&&&****************&*&&&&&&&&&&&&&&&&&&&&*&*&*&&**&*&*&**************=*****=**=**=**=**=*=*=*=*==**=*=**==*=*===*=*=============*=====-=======*=====================*====--=--------;-;--;;------=-==--=-=-----------=---------------------;--;-;-;----------------=--------=-=-=-=-=--=-=-----=-=----------;----;----;-;--;-;---;-----;-;-;-;-;;----;;-;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;-;-;-;--;--;-------;--;-----;---;-;--;------;---;-;-;-;;;;;;;-;-;---;--;-;-",
-"  .  .  .   . .   .  . . . . ............. .... . ................+...@@@@+.+.+...+.+.+++.++.+++++++++@+++++@++@@+@@@@@@@@@@@@@@@@#@#@#@#@##@#########$#$$#$$$$$$%%%%%%&%&%%$%$%%$%%$%%%%%%%%%%%&&*******************&&&&&&&&&&*&&&&**&*&*&*&**&**&*****&*****=**=****=*=**=***=**=*=*=*=*=*=***=**=*==*==*==*======*====*==========-==-==================--=--=*=*======-------;-;;-;;;------=------=---=-=-=---=-=--=---;---------;-------;------;---;-;------------=--=----=---=--=-----------------------;----;-;----;----;---;;-----;-;-;--;;;;--;-;;;;;;;;;;;;;;;;;;;;;--;;;-;;-;-;-;-;--;--;-;-;------;--;-----------;-------;---;-;;;;;;;;;;--;-;--;--;-",
-"                .  . .  . .... .... ... ... .........................+@@#@+.+..++..++.+.++.+++++++++++++++@++@+@+@+@+@@@@@@@@@@@@@@#@###@##@######$#$#$##$$$$$$%$$%%%%%%&%&%$$%$%$%%%%%%%%%%%%%&&&**=******&******&*&&&&&&&&&*&&*&*&&&*&&&&*&&**&***&*&************=*****=**=*=**=*=*=*=*=*=*==*=*=****=*=======*=*====*=============-==-======*=====-=-===-=-===========-=-------;;;--;;---=---=-=---=-------=-------------;-------------;--;-;-;---;--;-----------------=-=--=---=---------=-----------;-----;------;----;-;--;---;;-;----;-;----;;-;;-;;;;;;;;;;;;-;;;-;;;;;-;;;;;;-;;-;;-;--;----;--;-;---;---;----;-;------------;--;-;;;;;;;;-;;---;--;-;-",
-"   .  .   .   .        . . . ... .... ... ... ....... .............+.+@@@@+..++...+.+.++.+.++.++++++++++@+++@+@++@@+@@@@@@@@@@@@@#@@#@@##@#############$$#$$$$$$%$$%%%&%%%&$%$$$%$%$$%%%%%%%%%%&&********************&&&&&&&&&&&&&&&*&&&**&&**&***&****************************=**=***=*=*=*=**=*=**===*=*==*=========================-==================-==-========*===----------;-;;-;-----=--=--=--=-=--=---=--=-=-------------;-------;-;--;---;--;-;----------=---=----=---=--=-----------------------;---;-;-;---;-;----;--;---;-;-;;---;;-;--;-;;;;;;;>;;;;;;;;;;;;;;-;;-;;;-;;;-;;-;-;--;-;--;---------;--;-;-------;--;--;----;-;-;;;;;;-;;-;-;-;----;",
-" .      .   .    . . .. ...... ....... . .. ... .. ..... ............+@@@@..+...+.+.+.+..+.++++++++++++@+++@+@++@+@+@+@@@@@@@@@#@@@@#@####@#######$##$#$#$$$$$$$$$%%%%%%&&%%$$%%%$%%%%$%%%%%%%%%&&****************&**&&&&&&&&&&&*&&&&&&*&&&*&&&&*&**&*&*&*********=**=*=***=*=***=**=**=*=**=*=*=**=***=*==*==*==*===================-==-===============-==-=--==*=*=====--=------;-;;-;-;------=--=-=-----=------=-------;--;---;----------;--;--;--;-;-;-;----------=---=-=-=-=-=-----------------------;---;--------;----;-;--;-;-;---;---;-;--;-;-;;-;;;;;;;;>;;;;;;;;;-;;;-;;;;;-;-;;--;-;-;---;----;--;-;--------;---;---------;-;--;;;;;;>;;;-;-;-;--;-;-",
-"    .         .     . ... ...... .   ..... .. ....................+..@@@@+.+..+...+..++++.++.+.++++++++++@++++@+@@+@@+@@@@@@@@@@@@#@#@#@#@##@#######$###$$$$$$$$$%%%%%%%%%&$%%$$$%$$%%%%%%%%%%&&&&*********&********&&&&&&&&&&&&&&&&*&*&*&*&&***&**&*************=*******=*****=***=*=****==*=*=**=*===*=*======*===================-==-==============-===-=--==========-=--------;;;-;;-----=----=---=-=-----=-----=-------;-------;-----;--;-;---;---;;----------------=------------------=-----------;-------;-;-;-;--;;-;---;----;-;;-;;;-;-;;-;-;-;;;;;;;;;;;;;;-;;-;;;;-;--;;-;;;;-;;;-;-;-;;--;-;---;----;-;--;---;----;--;------;;-;;;;;;;;;;-;--;-;-;--",
-"          .     . . . . .. . .. .....   ........ ...................++@@@+..+.+.+..+....++.++.++++++++++++@+@++@+@@@+@@@@@@@@@@@@@@@@#@####@#########$###$$$$$$%$$$%%%%%&&%$$%%%$%%$%%$%$%%%%%%&&&=**********&**&*&**&&&&&&&&&&*&*&&&&&*&&&*&*&&*&**&*&**********************=***=****=*=***=*=*=*=*****=**=*=*======================-==-===============-==-=--==========-=------;;-;--;;-----=-=--=------=----=-=----=---;---;---;--------;--;-;;--;-;;-;-------------=---=-=-=-=-------------------------;-------;---;---;--;--;-;--;--;---;-;--;-;-;-;;;;;;;;;>;;;;;;;;;;;;;;-;;;;;-;;-;-;-;-;--;----;---;-;----;---;----;-----;-;-;--;-;;;;;;;;;-;;;-;----;-",
-"  .    .     .     . . .. ... ..   . .. . . . ... .. . ..............@@@@+.+.+...+.++.++.++.++.+++++++++@++++@++@+@+@@@@@@@@@@@@@@#@#@###@############$#$#$$$$$$$$%%%%%&%%&$%$$$$%$%$%%%%%%%%%%&&*********&********&*&&&&&&&&&&&*&&*&*&&&*&*&&*&**&****&*&**********=**=***=*******=*=**=*==***=*=*==*==*==*====*==*==================-===============-===-=-=-==========---------;-;;;-;----=---=--=-=-=------------=------;----------------;-----;---;;;-;------------=------------------------------------;-;-;--;-;--;--;-;-;-;-;;--;--;-;--;;-;;;-;;-;;;;;;;;;;;;;;;;;;;;-;;-;;;;;-;;-;;;----;--;;--;;----;-;---;----;--;--;-------;-;-;;;>;>;;;;--;-;;;;--",
-"    .          . .. . .. ..  .  ... . ... .. .. ......... ..........+@@@@+.....+..+...+.+.+.+.++++++++++++@+@+@+@+@+@+@@@@@@@@@@@@@@#@#@###@#@#########$#$$$$$$$$%$%%%%%%&%$$$%%%$%$%%$%%%%%%%%&&&**********&****&***&&&&&&&&&&&&&*&&&&&*&*&&*&&*&*&*&*******************=*****=*=**=**=*=***==***=**=**=**=*=*=====================--==-==============-=-=-=-==========--=-=------;;--;-;-=--=-=--=-=-------=-----=---=-----------;--------;-;-;-;--;;-;-;---------------=--=---------------------------;-;---------;--;-;--;---;-;---;--;;--;-;--;--;;-;;;;;;;;;>;;;;;;;;;;;;;--;;;;;;;;;-;--;;;--;---;--;-;;----;---;-;-----;---;-;-;--;;;;;;;;;;;-;;;-;-----",
-" .        .     .  . .  . . . .    . . . .. .. .....................+@@@@..++.+..+.+.+.+.+.+.+++.++++++++++@+++@+@+@+@@@@@@@@@@@@@#@@#@##@####@######$##$#$$$$$%$%%%%%%&%&%%$%$$%$%%$%$%%%%%%%&&&&=********&**&*&**&&&*&&&&&&&&&&&&&*&*&*&&*&*&***&**&*&*&*********=**=******=*****=**=***=*=**==**=*=*=*==*=*=*=*==*=================-=-===============-==-=--===========--------;;-;;-;-------=-=----=--------=-----=--------;-----------;---;-;--;--;;--;---------=----------=---------------------;-------;-;-;-;--;---;---;----;-;-;;--;;-;-;;-;;-;;;;;;;;;;;;>;;;;;;;;;-;-;;;;-;;-;-;;-;;---;--;-;--;-----;-;--;-----;-;---;---;--;-;-;;;;;>;;;;;--;-;-;;-",
-"       .    ... .. .. .. . . . ... ... .. .. ... . .. ..............+@@@++.....+....+.+.+.+++..+++++++++@+++@+@++@+@@++@+@@@@@@@@@@#@#@@###@#@########$##$$$$$$$$$$%%%%%&%%$%$$%$%$%%%%$%%%%%%%%&&*******************&&&&&&&&&&&*&&&&&&*&*&&*&*&&*&*&**********************=****=*=**=**=**=*=***=**=*=*=*=*==*===*==================-==============-=-==-=--=-=========---=------;-;--;-----=-=---=-=------------------=-----------;-------;-;---;--;;;-;;----------------=------------------------;-------;------;-;--;-;-;-;-;;-;-;-;--;--;-;--;-;-;-;;;;;;;;;;>;;;;;;;;;;;;;--;;;;;;;;;-;-;;;-;;--;-;--;-;;--;-;--;-;------;--;---;--;-;;;;;;;;;;;-;;;;-;---",
-"               .  . . . . .   .   .   .. .. .. .... ................+@@@+..+.+...+.+....+.+.+++.++++++++++@++@++@+@+@@@@@@@@@@@@@#@@@@#@##@#########$##$$#$$$$$$%$%%%%&%%&%%$$%$%$%$%$%%%%%%%%&&&**=******&*****&*&**&&&&&&&&&&&&&*&**&&&*&*&*&*&**&*&*&****************=***********=*=*=*=*=*==*=*=*=*=**=*=*==*=====*=============-==--========-=======-=-=--=======-===--------;;-;;-;--------=--=---=--=-=-------=----------------------;--;-;--;--;;;-;-;----------=-------------------------------;-;----;-;----;--;---;-;--;-;-;-;;-;;-;-;;-;;-;;-;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;-;;;;---;--;;---;--;---;---;----;-;-;--;---;---;-;;-;;>;;>;;;;;;-;;-;;-",
-".   .   . . . . . .  . .    ..  ..  ... .. .. .. ....... .. ........@@@@+...+...+...+.++.+.++..++++++++++@++@++@+@@+@+@+@@@@@@@@@@@#@#@##@##@#########$##$$$$$%$$%$%%%%&%&%$$%$%$%$%%$%%$%%%%%%&&*******************&&&&&&&&&&&*&&&*&&*&*&*&&*&*&*&***&*&**********=**=***=***=**=*=***=*=***=**=*=*=*=**=*=*==*===*=*================-============-=-=--=-=---=========----------;-;;--;---=-=-=--=--=----------------=-----------;----------;--;-;--;;;;;-----------=---------------------------;---------;-;--;-;-;--;--;;---;-;-;-;-;--;--;-;--;-;;-;;;;;;;;;;;>;;;;;;;;;;;-;;-;;;;;;;;-;-;;;;-;--;-;--;-;-;-;-;--;-;-;----;-;-;--;;-;-;;;;;;>;;;-;;-;;-;-;-",
-"         .    .  . .     . .   .  ..   .  . ... ... .. ............+@@@@+.+...+...+..+.+.++.+++.+.++++++@++@+@+++@+@+@@@+@@@@@@@@#@@@##@###@#@######$###$#$$$$$$%$%$%%%%%&%%%$$%$%%$%$%%%%%%%%%%&*********&**********&&&&&&&*&&&&*&&*&&&&&&***&&*&**&&***&***********=**********=***=*=***==**=**=**=**==*=*=*=*=*=====*=============-==-==============-=-=--=-======-====--------;;-;-;--;----=-=---=------------------------;-;----------;-;-;--;-;-;-;-;-;--------=---=----------------------------;--;------;--;--;;-;-;-;;-;-;-;-;-;-;-;;-;-;;;-;-;;;;;;;;;;;>;;;;;;;;;;;;;--;;;;;-;;;;;;-;--;-;--;-;-;--;---;--;-----;-;----;--;--;-;;-;;;;;>;>;;-;-;;-;--",
-"  .   .   . .  .     .  .   . . .   ... .... . .. .................+@@@@+......+...+....+.++.+.++++++++++++@++@@+@@@@+@+@@@@@@@@@@#@@@#@#@##@#########$#$#$$$$$$$%%%%%%%&%%$$%$%$$%%$%%$%$%%%%&&&&**********&***&*&*&*&&&&&&&&&&&&*&&**&**&&*&**&*&***&&***************=***=**=***=**=*==***=**=**=**=**=*=*=*====*=*====*==========-=-==================-=-=--=-==-===-=--=------;;-;;-;----=---=-=---=-=------------------;-------------------;---;--;;;-;---------------------------------------;------;-;-;--;--;---;-;---;-;-;-;-;-;-;;--;-;-;-;-;-;;;;;;;;;;;>>;;;;;;;;;;;;;-;;;;;;-;;-;;-;;-;-;;-;-;-;--;-;-;--;-;---;-;-;--;--;--;-;;;;;>;;>;;;;;;-;;-;-",
-"      . .    .  . .             . ..  . .  . .. ........ ... ......++@@@....+....+...+.+.+.+.++..++++++++@++@+++@+++@+@@@@@@@@@@@@@#@#@#@#@#########$###$$$$$$$%$$$%%%%&%&%%$$%$%%$$%%$%%%%%%%%&&*=******&***&*******&&&&&&&&&*&*&*&*&&&&&&*&*&*&**&&****&*&********=****=**********=*=**==*=*=*=*=*=*=*=*=*==***======*===============-=-========-=-=-=-=-=----========-=---------;;--;-;----=-=-=--=-----------------=---------;--;---=---;-;;-;-;--;;-;;;-;---------------------------------------;--;-------;--;-;-;---;-;-;-;-;-;-;-;--;;-;;;-;-;;;-;;;;;;;;;>;;;;;;;;;;;-;;-;;;;;;;;;;;;-;;-;-;--;-;-;-;;-;-;--;-;-;-;---;-;-;-;-;;-;-;;;;;>;;;;;;-;;;-;-;",
-" .  .  .  . .            . . . . .  .. . .. .. .. .. . ............+@@+@..+...+.+...+.+.+.+.+.++++.+++++++++++@@+@@@@@@+@@@@@@@@@@#@@@@##@#@##########$#$#$$$$$$$%%%%%%%%&%$$%$$%$%%%$%%$%%%%%&%&*********&******&***&&&&&*&&*&&&&&&&&*&*&**&*&&&*&***&*&***************=****=*=*=*=****=**=*=*=*=*=*=*=*=*=*=*===*=*=*===*=========-=-================-=-=--=-===-=======--------;--;;-;---=----=--=-------------------------------------------;-;-;-;-;;;-;----------=--------------------------;--------;-;-;--;--;-;-;;-;-;-;-;-;-;-;-;;;-;-;-;;;-;-;;;;;;;;;;>;>;;;;;;;;;;;-;-;;;;;;;-;;-;;-;-;-;;-;-;-;---;---;-;---;--;;---;---;--;-;;;;;;;>;>;;;;;-;-;;-",
-"   . .   .           .       .    .   .. . .. .. .. ...... ........+@@@+.+........+......+.+.++.+.++++++++@+@+++@+@+@+@@@+@@@@@@@@@@#@#@#####@#######$###$$$$$$$%$$%$%%%&%%%$%$%$%$%%%%$%%%%%%%&&*****************&*&*&&*&&&&&&*&&**&*&&&&&&**&**&*&*&****&***********=****=********==*=*=**=***=*=*=*=*=*=*=*=*=*======*===============-===========-====-=-=---====-=-=-----------;;--;------=-=--=--=--=------------------;-;-;-;-;---------;--;-;-;-;;;-;-;;------------------------------;--;-----;--;----;-;-;-;-;-;--;-;-;-;-;-;-;-;--;-;;-;--;-;;;;;;;;;;;;;>;;;;;;;;;;;;;-;-;;;;;;;;-;;-;;;-;--;-;--;-;;-;;-;---;;-;---;;--;;--;--;;-;;;>;;>;;;;;-;;;-;-",
-". .    .   .  .    .   .  .   . .  ..  .. . . ... ..... ..... .....+@+@+...+...+...+.+.+.+.+.+.++++++++++++++@+@+@+@+@@+@@@@@@@@@@#@@@@@#@#@############$#$$$$$$$%%%%%%%&&%$%$%$%$%$$%%%%%%%%%%&&**********&*&*&****&&&&&&&&&*&&*&&&*&*&*&*&&**&**&***&*&***&*****************=**=*=**=*=*=**==**=***=*=*=*===*=*==*==*==*=*=*=======--===-==========-=-==-=----=-=======---------;-;-;-;-;---=--=---------------------------------;----=------;--;-;-;-;;;;;---------=-----------------------------;-----;-;----;---;--;;-;-;-;-;-;;-;-;-;;-;-;;-;;-;-;;;;;;;-;;;>;>;;;;;;;;;;;;-;;;;;;;-;;;;;-;-;-;;;-;-;;-;--;--;-;-;--;-;;---;---;-;;-;;;;;;;;>;>;;;;;;-;-;-",
-"     .   .                  .   . .  ..  . . .. ... . .. ..........+@@@+.+.......+....+.+.+.+.+..+.++++++++@++@++@+@@+@@@@@@@@@@@@@@#@#@#@###########$##$$#$$$$$%$$%%%%%%%%$$%$$%$%%%$%%$%%%%%%%&*=******&*******&*&**&&&*&&&&*&&&*&&&&&&*&**&&&*&**&*&*******************=*=**=****=**=**=*=**=**===*=**=*=**===*==*==========*========-==========-====--=-=---==-=-==-==---------;-;-;-----=-=--=--=-=---------------------;-;-;---;----------;--;--;-;;;-;-;-;-------------------------;-------;---;-;--;--;-;--;;--;--;-;-;-;-;-;-;;-;;-;;-;-;;-;;;-;;;;;;;;;;;;>;;;;;;;;;;-;;--;;;;;;;;;-;;-;-;;--;-;-;-;-;-;--;-;--;-;--;;;-;;;-;-;-;-;;;;;>;;>;;;;;;;;;-;",
-". . .  .        .         .    .  . .   . .. . . . ....... ........+@@++...+...+...+.+....+.+.+++.++++++++++++++@++@+@@@+@@@@@@@@@@#@@@@#@##@##########$##$$$$$%$$%%%%%&%&%$%$%$%$%%$%%$%%%%%%%&&***************&***&&&&&&&&&&&&&*&&&**&*&&*&&***&*&*&**&*&*&**********=*=********=***=**=**=*=*=*=**=*==*=*===**==*===*=*==*========-=-=-===========-=-==-=----======-==-=--------;;;-;-;-----=-=--=-----------------------;----;-;;--------;-;-;-;-;--;;;;;;-;----------------------------;--;----------;--;-;-;-;--;;-;-;-;-;-;;;-;;-;;-;;-;-;;-;-;-;;;;;;;;;;;>>>;;;;;;;;;;;-;-;;;;;;;;-;;;-;;-;-;;-;-;-;-;-;-;;--;-;;-;-;---;---;-;-;-;;;;;>;;>;>;;;-;-;-;-",
-" .            .              .   .  . .. .  . . .... .. ..... .....@@+@+..........+....+.+.+.+.+.++.+++++++@+@+@+@@+@@+@@@+@@@@@@@#@####@#@#############$$$#$$$$$%$%$%%%&%%%$$%$%$%$%%%%%$%%%%%&&*********&*&*****&**&&&&&&&&&&*&&*&*&&&*&*&**&&&*&*&**&*******************=*=*=*=**=**==*==*=*=*=*==*=*==*=*=*===*==*==========*======================-=-=-==--===-=-==-=-------;-;;-;-;-;--==-=-==--=--=--------------------;;-;-;-;;---------;-;--;-;;-;-;-;----------------------------------;--;-;-;--;-;--;-;-;;--;;-;-;-;-;--;-;-;-;;-;;;;-;;;-;;;;;;;-;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;-;;;;-;-;;-;-;-;-;-;--;;-;--;-;-;;-;-;;-;-;;;;;;;;;>;>;>;;;;;;;;;-",
-"   .        .        .  .      .  .  .  . .. ... . .. ... ...... ..@@@+.........+...+...+.+.+.+.+.+++++++++++++@++@@+@@@+@@@@@@@@@@@@@@#@@##@#######$#$###$#$$$$$$%%%%%%%&%$%$$$%$%%$$%%%%%%%%%&&**=**********&*&***&*&&&&&*&*&&*&&*&&*&&*&*&****&***&**&*&*&************=***********=***=**=*=*=*=*==*=*==*=*==*==*==*==*=*==*=======-=-=-=============-=----=-=-=======-=---;----;;;;;;;------=-=-==-=---------------------;--;-;-;-------------;-;---;;;;;;-;-;-----------------------;----;----------;--;-;--;-;-;;--;-;-;-;;-;;-;;-;;-;;-;-;;-;-;-;;;;;;;;;;>>>>;;;;;;;;;;;;;--;;;;;;;;;;;-;-;-;;-;-;-;-;-;-;;;-;-;;-;-;;-;-;-;-;-;--;-;;;;;;>;>;;;;;;;-;-;",
-" .                          .   .  ..  . . . .  ... ....... ......+++@++..+.......+...+..+.+.+.++.+.+++++++++@+++@++@+@+@@@@@@@@@@@@###@##@############$##$$$$$%$%$%%%%%%&%%$$%$$%$%%%%$%%%%%%%&&****************&***&&&&&&&&&&&&*&&*&&*&&*&*&&*&*&*&*&********************=*=*=*=*=**=*=*==*=*=*=*=**===**===*==*=====*====*============-====*====-==-==-=-=---====-=--==---------;-;-;--;;-----=-=--=--=--------------------;--;-;-;;;------;--;-;--;;-;;-;;;-;---;-;---------------;----;-----;-;-;-;-;-;--;-;-;-;--;;-;-;-;;-;-;;-;;;-;;-;;;-;;;;;;;;;;-;;;;;;;;;>;;;;;;;;;-;-;;;;;;;;;-;-;;;;-;;-;-;-;;;-;-;---;-;--;-;--;-;-;-;-;-;;;-;;;;>>;>;>;;;-;;;;;-",
-"                          .      .    . . .  . ..  .. . . ........+@@+@..............+..+.+.+.+.+++.+++++++@+++@@++@@@+@@@@@@@@@@@@#@@@#@@##@######$#$###$#$$$$$$$%%%%%&%&%$$%$%$%$%$%%%%%%%%%%%&**=****************&*&&&&&*&&&&&&*&&&*&&*&*&&**&**&*****&**&*************=***=******=**=*=**=*=*==*===**===*==*====*=*===*====*=*=====-===-============-=-=-----========-=---------;;;-;;;-;--=--=--=--=---=-------------------;-;-;-;---------;--;-;---;;;;-;;-;-;--------------------------;-;----;--;--;-;-;-;--;-;;-;;;-;;-;;-;-;-;-;;-;;-;;-;-;-;;;;;;;-;;;;>>>;;;;;;;;;;;;;;-;;;;;;;;;;;-;-;;-;;;-;;--;-;;-;;-;-;;-;;-;;-;;-;-;-;;--;;;;;;;>;>;>;;;;;;-;;",
-"                              .    . .   . .. . . .. ...... ......+++@+.........+..+.......+.+++..+.+++++++++++++@@++@@@+@@@@@@@@@@@@#@@##@############$##$#$$$$%$%$%%%%%&%%$$%$%$%$%%$%%%%%%%&&&&************&*&****&&&&&&&&*&&*&&&*&&*&*&*&**&*&**&*&&***&****************=**=*==*=*=*=*=*=*=*==*=*=*===**==*==*=*====*===*=========-==-============-====-=-=--==-=-=-==------;-;;;-;;---;--------=--=-=-=--=---------------;-;-;;;;;;------------;-;-;-;;;;;-;-;--;--;----------;-;--;-;--;----;-;--;--;-;-;-;-;;-;--;--;;--;-;;-;;;-;;-;;;;-;;;;-;;;;;;;;;;;;>;>;;;;;;;;;;;;-;-;;;;;;;;;;-;;-;-;-;--;;-;;;;--;;-;-;-;;-;;-;-;-;;;-;-;;;;;;;>;>;>;>;;;;;;-;;-",
-"                       .         .   . . .  . .. . .. .. .... ....+@+@+.............+.+.+.+.+.+.++.++.+++++++@+@++@@+@@+@@@@@@@@@@@#@@#@@#@@############$#$$$$$$$$%%%%%%&%%$$%$$%$%%%%%$%%%%%%%&&*=**************&*&**&&&&*&&&&&&&*&&*&&*&*&*&**&**&****&******************=*=**=**=***=*=*===*==*===*==*===*=====*==*===*===*==*==*=======-============--==-=---==========-=-------;;-;;;--;----=---=-------=---=---------------;---;-;---------;--;--;-;;;;;;;-;;;--;------------------------;---;-;--;--;--;--;--;-;-;;--;;;-;-;;-;;;-;;-;-;;;-;-;-;;>;;-;;;;;>;>>;;;;;;;;;;;;-;-;;;;;;;;;;-;;;;-;-;;-;-;--;;;-;;-;;-;-;-;;-;-;--;;-;-;-;;;;;;>;>;>>;;;;;;;;;",
-"                            .  .  . .   . .. .  ... .. ... .......++@++...........+......+.+.+.+.++.++++++++++++@+++@+@@@+@@@@@@@@@@@#@@#@#@#@#####$#$#$###$$$$$$$$$%%%%%&%$%$$%$$%$%$%%%%%%%%&%&***=***********&***&*&&&&&&*&*&&*&&*&*&&*&*&*&&**&**&*&**&*************=*****=***=**==*=*=*=*==*==*==*===*===*=*==*===*======*========-=-=========-======--=-----===-=-=-=----------;;;-;;-;--------------------------------;--;--;-;-;;---------;--;;-;--;;;;;;;--;-----------;-----;-;--;-;--;-;----;-;;--;-;;-;;-;-;--;-;--;;;-;;;-;;;;;;;;-;;;;;;;;;;;;-;;;>;>;>;;;;;;;;;;;-;-;;;;;;;;;;;;;-;-;;;-;;-;;;-;-;-;-;;-;-;-;-;-;;;;;--;;-;;-;;;;;>;>;>;;;;;;;-;-",
-"                                      ..    . . .  .. .. ..... ...@+@++..............+.+...+.+.+.+.++++++++@++@+++@@+@@+@@@@@@@@@@@@@#@##@##@############$$#$$$$%$%%%%%&%&%$$$%$$%%$%%$%%%%%%%%&&*************&***&***&&&&&&&&&&*&&*&&*&*&&*&*&**&**&****&*******************=*=*=**=**=*=*====*==*==*==*==*=*========*==*=*======*========-==========-==-==-=-=--=-=======-=-------;;;-;;-;-;---=-------------------------;---;--;-;-;;-;----------;---;-;;;;;;;;;;-;------------;-------;----;-----;;-;---;-;--;--;-;-;;;;-;;-;-;-;-;;-;-;-;-;;;-;-;;;;;-;;;;;;;>;>;;;;;;;;;;;;;;-;;;;;;;;-;;-;;;;-;;-;-;--;;-;;-;;-;;;-;;;-;;-;-;;;;-;;-;;;;;>;>;>;>;;;-;;;;;",
-"                                 .  .   .. .  . . .  .. ... ......+++@+........+....+....+.+.+.+.++.+.++++++++++@+++@++@@+@@@@@@@@@@#@@@@#@##@#@#####$#$##$$$$$$$%$%%%%%%&%%$$$%$%$%%$%%$%%%%%%%&&=*************&****&&&&&&*&*&&&&*&*&&*&**&**&*&**&*******************=**=***=*=*==*==*====*=*==*=====*==*======*=*=*=======*==*======-=-=================-=----====-==-=-=--------;-;;-;;-;-----------------------------------;;-;-;;-;;-----------;-;-;-;;;;;;;;;;-;-;-----------;---;----;--;-;-;----;-;-;-;;-;;-;-;---;;-;;;;;;;;;-;;;;;;;;-;;;;;;>;-;;;;;;>>;>;;;;;;;;;;;-;-;;;;;;;;;;;;;;;-;-;-;;;;;;;;-;;-;;-;;-;;;-;;;-;-;-;-;;;-;;;;;;;>;>;>;;;;;;;;;-",
-"                   .           .     .    . . . ..... ... .. ... .@+@+................+...+.+.+.+.+++++++++++@++++@+@@+@+@@@@@@@@@@@@#@#@#@@#@#########$#$#$$$$$$$%$%%%%%&%$%$%$%$%$%%%%%$%%%&%&&&********************&&&&&&&&*&*&&&&*&*&&*&&**&****************************=****=*=*=*=**=*===*===*====*===*=*=========*=*=============-=-=-===========-=-=-=-=--==-==-====---------;-;;-;-;------=-------------------------;----;-;-;;-;;--------;--;-;-;-;;;;;;;-;--;-------;------;---;---;--;-;-;;;-;-;-;--;--;-;;-;;;-;;-;--;-;-;;;-;-;-;-;-;-;;>;;;;-;;;;;;>;>;;;;;;;;;;;-;-;;;;;;;;;;-;-;;-;;;--;--;-;;-;;;;;-;;-;-;-;-;;;;;;;-;;;;-;;;;>;>;>;>;;;;;;;;;",
-"                                  .    . .   . .     . . .... ...++@+++.................+..+.+.+.+.+++++++++++@+@++@++@+@+@@@@@@@@@@@@#@#@##@#@########$#$##$$$$%$$%%%%%%&%$$%$$$%$%$%$%%%%%%%%&&**=*****************&*&&&&*&*&*&&*&*&*&**&*&*&**&******************=****=***=*==*=*=*===*===*==*=====*========*=================*===================-===-==-=-----======-====-------;;-;-;;-;;------------------------;--------;-;;-;-;;;-;--------;--;-;-;;;;;;;;;-;;--;-;-;---;----------;--;--;-----;-;-;-;;-;;-;--;-;-;-;;-;;-;;;;-;;;;;;;;;;-;;>;-;-;;;;;;>;>>;;;;;;;;;;;;;;;-;;;;;;;;;;;;-;;;-;;;-;;;;-;;-;-;-;;-;;;;;;;;-;-;-;;;-;;;;;;;;>;>;>;>;;;;;;;-",
-"                                    . . .  ..  . ..... ... .......+++@...............+.+..+.+.+.+.+.++++++++++++++@++@+@@@@@@@@@@@@@@@@@#@#@@@###########$$#$$$$$$%$%%%&%&%$%$$%$%$%%%%%%%%%%%%%&&***************&****&&&&&&&&*&&*&*&*&&*&*&**&*&**********************=******=**=**==*=*==*==============*=================*==========-=-=-=-=========-===-=--=--=====-===-=--------;-;;-;-;;-----------------------------;--;-----;-;-;-;;----------;-;-;-;;>;;;;;;-;-;-;---------;--;-;-;-----;--;;-;---;--;--;-;-;;-;-;-;;-;;;;;-;-;;;-;-;-;-;;;;;;;;;;-;;;>>;>;>;;;;;;;;;-;-;-;;;;;;;;;;;;;;-;-;;-;;-;-;;-;;;;;;;-;;-;;-;-;;;;;;;;-;;-;;;;;>;>;>;>;;;;;;;;;",
-"                                         ..  .. .  . . . ... .....+@++.......................+.+.+++++++++++@++@+++@+@@+@@+@@@@@@@@@@@#@#@#@##@#@####$#$##$#$$$$%$%%%%%%%&%%$%$%%$%$%$%$%%%%%&%&&&=********************&*&&&&*&*&*&&&*&*&*&**&*&*******************=**=**=*=****=*==*==*==*==============================================-===============-==-=-----======-==-=--------;;-;-;--;-;-------------------------------;-;;-;-;;;;--;-------;---;;;;-;;;;;;;;-;----;--;--;---;-----;-;-;--;--;-;;-;-;-;;-;-;--;-;;;-;;-;-;;;;;;-;;;;;;;;;-;;;;;-;;;;;;;;>;>;;;;;;;;;;;;;-;;;;;;;;;;;;-;-;;;-;;;-;;;-;;;-;-;-;;;;;;-;;;;-;-;-;-;;;;;;;;>;>;>;>>;;;;;;;;-",
-"                                   .  .     .  . . . .. . .... ...+++@................+.+.+.+.+.+.+.+++++++++++++@++@++@@+@@@@@@@@@@@@@@#@##@@##########$#$$$$$$$$$%%%%%&%%$$$%$%$%%$%%%%%%%%%%%&&*=**=*************&*&*&&&&*&&&*&**&*&*&*&&*&******************=***********=*=*==*==*=====*==*===========================================-=--=========-==-=-=-=---=-==-==-==---------;-;-;;;-;------------------------------;---;--;;;-;-;;;---------;-;-;-;;;>;;;;;;;-;;;--;------;---;-;---;--;--;-;---;-;;-;-;-;-;;;;-;-;-;;;;-;-;-;;-;-;-;-;;;;>;;-;;;;;;>>;>>;;;;;;;;;;;;-;;-;;;;;;;;;;;;;;;-;;-;;;;-;;;-;;;;;;;;-;-;;;;-;;;;-;;;;;;;-;;;;>;>;>;>>;>;>;;;;",
-"                                    .   . .   . . . . . .. . ....++@++.....................+.+.+.+.+.++++++++@+@+++++@+@+@@@@@@@@@@@@@#@@#@@###@######$#$##$$$$$$$%$%%%%%%&%$%$$$%$$%%%$%%%%%%%&&&*********************&&*&&&&*&*&&&*&*&*&**&*&*&*******=***=*****=**=*=*=*=*****=*=*==*=*==*===========================================-==-==-======-======-=-----==-=========-------;-;;-;-;-;------------------------;------;---;-;-;;;-;;-;------;--;-;;-;;;;;;;;;;;;-;;;---;-;---;-----;---;--;-;--;;-;--;-;-;-;-;--;-;;;-;-;;-;;;;;;;;;;;;;-;>;-;;;-;;;>;;>;>>;;;;;;;;;;-;;-;;;;;;;;;;;;;-;;;-;;-;-;;;-;;;;;-;;-;;;;;;-;;;;-;;;;;-;-;;;;>;;>;>;>;>;;;;;;;;",
-"                                       .   . .  . .. . .. ..... .+++++................+.+.+...+.+.+.++++++++@+++++@+@+@+@@+@@@@@@@@@@@@@@#@#@@############$#$$$$%$%$%%%%&&%$%$$%%%%%%$%%%%%%%&%%&&*=*******************&&&*&&&&*&*&*&&*&*&*&*&************=***=*=***=*******=*=*=*=*==*=*====================================================-==========-=-=-=-=----==-=-=-=--=--------;-;-;-;-;-;-----------;--;--;-;-----;------;---;-;-;;-;---;--;--;;-;;;-;-;;;;;;;;-;;--;;;-----;---;-;--;;--;--;-;---;-;-;-;-;-;-;;-;;;-;;-;;;;-;-;-;-;-;-;;>;;;;;;;;;;;;>;>;;;;;;;;;;;;;;-;;-;>;;;;;;;;;;;-;;;;;;;;-;;;;;-;;;;;;-;;-;;;;-;;;;;-;;;;;;;;;;>;>>;>;>;;;;;;;-",
-"                                         .  . .  .  .. . .  .. ...++++.......................+.+.+.++.++++++++++@++@+@@+@+@+@@@@@@@@@@#@#@####@######$#$$$#$$$$$$%$%%%%%%%&$$%$%$$%$%%%%%%%%%%%&&&***=****************&*&*&&&*&&*&*&&*&*&*&*&**&*&****************=***=*=*=*=****=*==*====*=*============================================--===--======-====-=-=-----==========-=------;;;-;-;-;------------;------------------------;;-;;-;;;;-;------;--;-;-;-;;;;;;;;;;;-;;---;;-;---;--;--;--;-;-;-;-;;;-;-;-;-;-;;-;-;;--;;-;;-;;;;;;;;;;;;-;;>;;-;;-;;;>>>;>;>;;;;;;;;;;;--;;-;;;;;;;;;;-;;;;;-;-;;-;;;;-;;;;-;-;;;;;;;;-;;;;-;;;;;;;-;;;;;>;>;>;>;;>;>;;;;",
-"                                    .     .  . . ... . . ... ....+++++...................+.+..+.+.+.+++++++++++++@++@+@@+@@@@+@@@@@@@@@@@#@@#@##@#########$#$$$$$$%$%%%%&%&$$$%$%%$%%%%$%%%%%%%%%&*=***=***************&&&*&&&*&*&&*&&*&**&***&*************=**=****=**=*=**====**=*==*=*==================================================-============-===-=-=-=--=-=-=-=-==-=--------;;-;;-;;;------------------------;---;--;-;---;-;;-;-;;-;-;--;-;-;-;;;;-;;;;;;;;;;;;-;;;--;-;---;--;--;-;-;--;-;--;-;;-;-;-;-;;-;-;;;-;;;-;;-;-;-;-;-;-;;>;-;;;;;;;;;;>;>>;;;;;;;;;;;-;;-;;;;;;;;;;;;;;-;-;;;;-;;;-;;;-;;;;;;;;;-;-;;;;;-;;;-;;-;;;;;;;;;>;>;>>>;;;;;;;-",
-"                                       .   .    .   . .. . ......+++++.......................+.+.+.+..++++++++++++@+@@++@@@@@@@@@@@@@@@#@@##@#########$#$##$#$$$$%$%%%%%%%&$%%$$%$%%%%%%%%%%%%%&&&***=****************&**&&&*&&*&&*&**&&&*&*&**&*&********=**=**=*=**==***=*****==*=*====*===============================================-===-=-==========-=-=-=-----========-==-------;-;;--;---;;-------------;--;---;------------;-;--;;-;;;;----;---;-;----;-;;;;;;;;;;;;;;-;;---;;--;--;--;---;-;--;--;--;-;-;;-;-;;;--;;;-;;;-;;;;;;;-;;;;>;;;;-;;;;;>;>;>;>>;;;;;;;;;;;-;;-;;;;;;;;;;;;;;;;;;-;;;-;;;-;;;-;;;;-;;;;;-;;-;;;;;;;;;;;;;;;;>;>;>;>;>;;>;;;;;",
-"                                             . . . .. .  . . . ..+++++.....................+.+..+.+.+++.++++++++++@+@+@@@+@+@@@@@@@@@@#@@##@##@##########$#$$$$$$$%$%%%%&%&%$$$%$%%$%%%%%%%%%%%%%&**=*******************&&**&&*&&*&*&&&**&*&**&***************=**=**=**=*=**=====*==*==*===*=================================-============-=-===-=====-=-=-==-=-=----=-==-==-==---------;;-;;-;;;--------------------;--------;---;----;-;-;;-;;-;;-;-;-;--;-;;;;-;;;;;;;;;;;;;;;-;;-;--;--;--;--;;-;-;-;-;--;-;-;;-;-;;--;;;--;;;-;;;-;-;-;;-;>;;-;;;;;;;>;>;>;>;;;;;;>;;;;;-;;-;;;;>;;;;;;;-;;-;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;-;;;;-;;;;;;;;>;>;>;>>;;;>;;;-",
-"                                      .   .   . . .  . .. . .....+++++... ... ............+...+..+.+..++++++++++@++++@+@+@@@+@@@@@@@@@@@#@@##@##########$#$##$$$%$$%%%%%%&%%$%$%$%$%%%%%%%%%%%%&&&*****************&***&&*&&*&&*&*&*&**&&*&*&&**&*******=***=***=*==**=*=*==***=*=*===*===================-========-=-====-====-===========-=-=-====-======--=-=--=--===-==-==--=-------;-;;-;---;-;---------;------------;------;--;-;-;-;;;;;;;--;-;-;-;--;----;-;;;;;;;;;;;-;;;-;;-;;--;--;-;---;--;-;-;-;;-;;-;;-;;-;;;-;;;-;-;;-;;;;;;;-;>;;;;;-;;;;>;>;>;>>;;;;;;;;;;;-;;-;-;;;;;;;;;;;;;;;;-;;-;-;;-;;-;-;;-;;;-;;;;;;;;;;;;;;-;;;;-;;;;>;>;>>>>;>;>;;;;;",
-"                                    .       .      . . . . .. . .+++++. ....................+..+..+.++.++++++++++++@+@@+@+@@@@@@@@@@@@@@@#@@##############$$#$$$$$%$%%%&%%&%$%%$%%%%%%%%%%%%%&%%%&**=*=*****************&&*&&*&&*&*&*&&*&**&***&**&*******=**=***=**==*==**====*===*=*===*==================-==========-===-=====-========-===-=-======-=-===-=-------====-==-==-----;--;;;-;;;;-;-----------------;----;---;------------;--;;-;;;;-;-;------;;;;-;;;;>;;;;;;;;;-;;-;;--;;-;-;--;;--;;-;-;-;-;;-;;-;;-;-;-;;-;;;-;-;;-;-;-;;;>;;;;-;;;;;;;;>;>>;>;;;>;;;;>;;;-;;;;;;;;;;;;;;;;-;;-;;;;;;;;;-;;;;;;;;;;;;;;-;;-;;-;;;;;;;;;;;;;;;;>>;;>;>;;;;>;;-",
-"                                              . ... . . .. . ....++++.....................+...+.+.+.+.+.+++++++++@++@++@@@+@@@@@@@@@@@@#@@#@#@#########$$##$#$$$$$$$%%%%&%&%$$$%$$$%%%%%%%%%%%%%%&&********************&*&&&*&*&&&&*&**&*&&**&*************=**=*=*==**=*==*=**==*=*=*===================-=====-======-======-=-====-=======-=-===-========-=-=-=-=-----==-==-==-==-------;;;-;--;-;-------------;---------------;--;-;-;;-;;-;;;;;;;-;--;-;;;----;;-;;;;>;;;;;;;;;;;-;;;--;-;-;;--;;--;-;-;;-;-;--;--;;;;;-;-;-;;;;-;;;;;;;;;>;;-;;;;;;>;>>;>;;>>;;;;;>;;;;-;;;-;-;;;;;;;;;;;;;-;;;;-;;;-;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;-;;;;;;;;>;;>;>>>>;>;;;;;",
-"                                         . . .     . . .  .. . ..++++...... .................+.+.+.+.+.+++++++++++++++@@++@@+@+@@@@@@@@@@#@#@#############$#$$$$$%$%%%%%%%&%$%$%$%%$%%%%%%%%%%%%&&&*=**=****************&&**&*&&**&*&*&&*&**&*&****************=*=**===*=*=*===*=====*=*====================-====-=====-=-======-====-==-===-=-=-======-=-==-=--=-----==-==-==-==--------;-;;-;;-;-;---------;--------;--------;--;---;---;-;;;;;;;;-;-;;----;-;;;-;-;;;;;>;;;;;;;;;;;-;;;-;-;---;--;;-;-;;-;;-;;;-;;;--;-;;;-;;-;-;;-;-;-;;>;;;;;;;;;;;>;;>;>>>;;>;;;;;;;;;;-;-;;;;;>;;;;;-;;;;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;>;>>;>>>;;>;>;;;-",
-"                                               . .  . . ..  ... .+++++......... ...........+....+.+.+.++++++++++++@+@@++@@+@@@@@@@@@@#@#@@#@#@###########$##$#$$$$%$%%%%%&&%%$%$%%$%%%%%%%%%&%&%&%&=**=*****************&*&&&&*&&&*&*&**&*&&****&*********=**=*=*=*=**==*===*=*==*=========================-==-=-==========-======-====-==-====-=-===-====-=-=-=-------===-====--=----;--;;;;;;-;-;-;-------------;-;----;--;-------;--;;-;-;-;;;;;;;-;---;;--;---;-;;-;;>;;>;;;;;;;;;;-;;;-;;;;;-;;--;-;--;-;;-;-;;-;;;-;;-;;-;;;;;-;;;;;;>;-;-;;;;;;>;>;>>;>;;;;;;;;;;;;-;-;;;-;;;;;;;;;;;;;-;;;;-;;;;;;;;;;-;;-;;-;;;;;;;;;-;;;-;;;;;;;;;;;;>;>;>>;>>;;>;;;;;",
-"                                             .  . .   .  .. . ...++++.. . ..................+.+..+.+.+++++++++++++++++@@+@@++@+@@@@@@@@@#@####@###########$#$$$$$$$%$%%%%%&%$$$%$%%%%%%%%%&%%%%%%&&*=***=**=************&&*&*&***&&*&*&*&**&*&**************=**=*=====*==*=====*==*==*=*==============-=-=========-=-=-==-===-==-===-======---===--=====-==-=-=-=-=----=-==-=-===-=-------;-;-;;;-;--;---------;-------;------;-;-;--;---;-;;;;;;;;;;--;-;--;--;;-;;-;;;;;;;;>;>;;;;;;;;;-;;-;--;-;-;;;;-;;-;-;-;;-;;-;-;-;;-;;-;-;;;-;-;;>;;;;;;;;;;>;>;>;>>;>;;;;;>;;;;;;;;-;-;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;-;;;;;;;;;;;-;;;;;;;;;>;>;>>;>;;;>;>;-",
-"                                               .    .  ..  . . ..++++....... .............+.....+.+.+.+.++++++++++@+@@+@+@+@@@@@@@@@@@#@@@@@@###########$##$$$$$$$%$%%%%&%&%%$%$%$$%%%%%%%%%%%&%&&&**=********************&*&*&&*&*&&*&**&**&**&*&******=*=**=**=*=**==*=*=*=*==*==*====*================-===-==-======-======-===-=====-=====-=-==-==-==-====---=------=-==-=---=-----;--;;;;;-;;-;;----------------;----;-;-------;--;-;-;-;-;;;;;;;;-;-;;-;;-;-;-;;;-;;;;>;;;;;;;;;;;;;;;;-;;;;-;-;--;-;;;-;;-;;-;-;;;;-;;-;;;;;-;;;;>;;;-;;;;;;;;;>;>;>;>>;;;>;;;;;;;;-;-;;;;;>;;;;;;;;;-;;;;-;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>>;>>>;>>;;;;;",
-"                                            .     ..  .  .. . . .+.+++... ...... ............+.+...+.++++++++++++@+++++@+@+@+@@@@@@@@#@@#@##@#@#########$##$#$$$$%$%$%%%%&%&$%$%$%%$%%%%%%%%%%%&%&&*=**=*=***************&&&*&&*&&*&*&*&*&*&*&*****************=*=*===*===*=================================-==-===-======-=-==-====-=-====---=-==-=-=====-=-=-=---=----===-==-===---------;;;-;;;-;--;------------;----------;-;-;--;-;-;;-;;;;;;;;;;;;-;-;-;--;-;-;;-;;;;;>;>;>;>;;;;;;;;;;;;;-;;;;-;;;;-;-;;-;;-;;;;-;-;;-;;;-;-;;;;;;;;-;;;;;;;>>>;>;>;>>;;>;;;;;;;;;-;-;-;-;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;-;;;;-;;;;;;;;;;;;;;;;;-;;;;;>;>;>;>>>;>;;>;;;-",
-"                                              . .    . .  . .. ..++++.. ........................+.+.+..++++++++++++@+@++@+@+@@+@+@@@@@@@@@@@#@############$##$$$$$$%%%%%&%&%%$$%$%$%%%%%%%%%&%&%%&&**=*******************&*&&**&**&*&*&*&**&***************=*==*=*=*=*==*===*=*==*==*==============-====-==-==-===-==-==-=====-==-=-====-=-===-=-=-===-=-==-=-=-=-------=--=-=-=--=-----;-;-;;;;-;;-;;-----------------;--;--;--------;-;-;;-;-;-;-;;;;;;-;-;-;;-;;;--;;;;;;;;;>;;;;>;;;;;;;;;;-;;;-;;;-;-;;;-;;-;;;-;-;;;;-;;-;;;;;;;;>;;;;;;;;;;>;;;>;>>>;>;;;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;-;;-;;;;;;-;;;;;-;;;;;;;;;;;;;;;-;;;;;;;;;;>;>>>>;>>;>;>;;;;",
-"                                                  . .   .. . .. .+.++..... .. ..............+.+..+.+.++.+++++++++@++++@++@+@@+@@@@@@@#@@@@@#@#@##########$##$$$$$$%$$%%%%%&&%%$%$%%%%%%%%%&%%%%&%&&***=***=*=*********=**&&*&&*&*&*&*&***&**&*&*&********=*****=*===*==========*=====================-==========-=========-=-=========-=====--=-=-=--====-==-=-=--=------===-==-=--=-------;;-;;;-;;-;;-;---=--------;-----;---;-;-;-;--;--;;;;;-;;;;;;;;-;;-;-;;-;;;;;-;-;;;;;>;>>;;>;;;;;;;;;;;;;;;-;;;;;-;;-;;;-;;;;-;-;;-;;-;;;;;>;;;;;;;;;;>;;>>;>;>;>>;;;;;>;;;;;;-;-;--;-;;;;>;;;;;;;-;;;;;-;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;-;;;;;;;;;;;>;>>;>>>>>;>;;>;;-",
-"                                            .   .     .   . .  ..++++... .. ...... .............+....+.+.+++++++++++@++@++@@+@@@@@@@@@@#@#@@#@############$#$#$$$$$$%%%%%&%%%$%$%$%$%%%%%%%%%%%%%&&&==**=********=******&**&**&*&*&*&*&*&*&**&***************=**=*=*==*=*=*=*===============================-==-==-=-=-=-=====-=-=-=-===-=====-=-=-==-=====-==-=-=---------==---=-=----;-;--;;;-;;-;;-;------------------;---;-----;---;-;;-;--;;-;-;;;;;;;-;-;-;-;-;-;;;;;-;;;;>;;>;;>>;>;;>;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;>>>;>;>;>>;;>;>;;;;;;;;;-;-;;;;;>;;;;;;;;;;;;;;-;;;;;;;;;-;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;>;>>;>>;>;>;;>;;;;;",
-"                                                  . .   .. . .. ..+.+.. ....... .............+.+..+.++.++.+++++++++++@+++@++@@@@@@@@@@#@@@@@#@#@############$$$$$%$%%$%%%%%&%%$%$%$%%%%%%%%%%%&%%%&&=*********************&&&&&*&***&**&****&*************=*=**=*=*==*==================================-====-===-=-======-==-========-===-=-=--=-=--=-=-=-==-=-=--=-----==--===-=-=---------;;;;;;;;-;-;-----------------------;-;--;-;-;-;-;;--;;;;-;;;;-;-;-;-;-;;;;-;;;;;;;;;>;>;>;;;>;>;;>;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;>;;;;;;;;;;>;>;;>;>>>>>;;;;;;;;;;;;-;-;;;;-;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>;>>>>;>;>;;;-",
-"                                              .       .   . . ...+.+++.... .. ..................+..+..+.+++++++++++@+++@++@+@+@@@@@@@@@@@@@#@@###@####$##$##$#$$$$$$%%%%%&&&%$%$%$%%$%%%%%%%%&%%&&&&**==*=***********=***&*&*&*&*&&*&*&*&&*&***&**************=*=*=*===*=*====*=====================-==-==-==========-=-=-==-===-=-=-===-====-=--=-==-======-=-=-=---------==--=--=------;-;;;;;-;-;-;;;--;-------------------------;-;--;--;--;;-;-;;;;;;;;;-;-;;;--;-;;;;;;-;;;;;>;>;>>;;>;>;;>;;;;;;;;;;;;;;;;-;;-;;;;;;;;;;;>>;;;;;;;;;;;>;>;>>;>>;>;;;;;;;;;;;;;;;;;;-;-;;;;;;;;;;;;;;;;;-;;;-;;-;-;;;;-;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>;>>;>>>;>;>;>;;;;",
-"                                                 .  .  . . . .  ..+.+.. .. ...... ...........+...+..++.+.+.+++++++++++@++@+@+@@+@@@@@@@@@@@@#@#@###########$##$$$$$%$%%%%%%&%%$%$%$%%%%%%%%%%%%%%%&&*=*****=***=**********&*&*&*&**&*&****&*&***********=*=*=**=*=*=*=====*=*==============================-=-=-==-=======-===-==-===-=-==-===-=--=--=-=-==-==-=--=---------==--=--=-=----;---;;;;;;;-;-;--------------------;---------;--;--;--;-;;-;-;;;;;;;-;--;;-;;;-;;-;;;;;;;;>;>;;>;;;;>;;>;>;>;;;;;;;;;;;;;;;;;;;;;;;>;>;;;;;;;;;;>;>;>;>;;>;>>>>;>;;>;;;>;;;;--;-;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>;>>>;>>>;>;;;;;;",
-"                                                  .         . ...+.+.... .. .. .... ...........+...+...+.+.+++++++++@+++++++@+@@@@@@@@@@@@@@@@@#@#########$##$#$$$$$%$%%%%&%&$$%$%$%$%%%%%%%%%&%&%&&**=**=************=****&*&*&**&***&&*&******&*************=*=*===*=*===========================-==-=========-===-=-=-===-==-===-=====-=-=-=-==-=-=-==-==--=-=---=------=---=-=----------;-;;;;;-;;;;-;;----------------------;-;-;--;--;--;;-;-;-;;;-;;;;;;-;;--;;-;;-;;;;;;;;;;;>;>>;>>>>;>;>;>;;>;;;;;;;;;;;;;;;;;;;>;>;>;;;>;;>;>;>;>;>;>;>>>>;>;;;;;;;;;;;;;;-;;;;-;-;;;;>;;;;;;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>>;>>>>;>;>>;;;;",
-"                                                     . .. ..  . ..+.+..... .. ....................+..+++.+.++++++++++++@+@+@@@+@@@@@@@@@@@@@#@###@##########$$#$$$%$%%%%%&%%&$%%$%$%%%%%%%%%%%%%%%&&*=**=**=*=************&&&*&*&&**&*&**&***************=*=*=***=*=*=*===================================-==-=====-=-=-===-======-===-=-===-==------=--===-===-=-=---------===-=-=-=----;-;--;;;;;;;;-;;;--;------------------;------;---------;-;-;-;-;;-;;;;;;-;;;-;;;;;;;;;;;;;;;;;>;>>;;;>;>;;>;>;;;>;;;;>;;>;>;>>;>>;>;>;;>;;;>;>;;;>;>;>;>;>;>>;;;>;;>;;;;;;;-;;;-;;;;;;;;;;;;;;;;;;;-;;;;;;;-;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>>;>>>>>;>>>;;;;-",
-"                                                    .       . . ..+.+.. . .. ... ..............+.+.+.+..++.+.++++++++@+@++@++@+@@@@@@@@@@@@@@@#@###@#######$##$$$$$$%$%%%%%&&%$$%$%%$%%%%%%%&%&%&%&&***=*********=****=*****&*&*&*&*&***&**&****************=*===*======*=*======================-===-==-===-==-=-======-=-==--=-===-==-==-===-=-==-=-=-=-==--=--=-------------=------------;;-;;;;;;;;;-;-;---------------------;-;---;-;-;-;-;-;-;-;;;;-;;;;;;-;;-;;-;-;-;-;;;;;;;;;;;;>;>>>;>;>>;>>>>>;>>>>;>>;>;>;>;>;>;>;;>;;>;;;>;>>;>;>>>>>>>;;;;;;;;;;;;;;--;;-;;-;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>;>;>>;>>>;>;>;;;;;",
-"                                                  .      .  . . .+.++........ ..... ................+.+..+++++++++++++++@++@+@+@@@@@@@@@@@@@@@#@#@###########$#$$$$%$%%%%%&%%%%$%$%%%%%%%%%%%%%%%%%&&=****=****=**********&*&&*&**&**&**&*&**************=**=****=**=*=*==================================-========-=-===-=-====-=-==-=====-===-=---=--=-=-===-=--=-=--------=--=-=-=-----;---;-;;;;;;;;;;-;-;-;-------;-;-;--;-;---;;-------;----;-;--;-;;-;;-;;-;;-;;-;;;;;;;;;;;;;;;;;;>;>>>>>>>>;>;>>>;>;>>;>>;>>>>>>>;;;>;;>>;>>;>;;>;>>;>;>;>;>;>;>;;;;;;;;;;;-;;-;;-;;;;>;;;;;;;;;;-;-;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>>>>;>>>>;>;;;;;",
-"                                                      . . .  . ...+.... . . ... ...... .........+.+..+.++.+..+++++++++@++@++@+@@+@@@@@@@@@@@@@@##@##########$##$$$%$$%$%%%%&&%$%$%$%$%%%%%%%%%%&%&%&&*=*=**********=*******&**&*&&*&**&***************=****=**==*===*==============================-====-=====-==-==-==-====-=-==-=-==-=--==-=-=-=-=--=--==-=-===-=-----------==------=------;-;;;;;;;;;-;;;;;--;----;-------;-;--;;---;-;-;--;-;-;-;;-;;-;;-;;;;;;--;-;;--;-;-;;;;;;;;>;;;>;;>>;>;>>>>>;>>>>;>>;>>>;>;>;;>>>;>>;;>;;>;>>;>;>>;>>>;;;;;;;;;;;;;;-;-;;-;;;;;;;>;;;;;;;;;;;;;;;-;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>;>;>>>>;>>;;;;;;",
-"                                                            . . .+..+... ... . .. ..................+..+.+++++++++++++++@++@@+@+@@+@@@@@@@@@@#@#@#@##########$$#$$$$%$%%%%&%&%%%$%%$%%%%%%%%%%&%%%&&&**=***=*=*********=*****&*&****&****&**************=*=**=**=*=*==*=*=*===========================-====-===-==-===-===-=====-====-=====-==-==--=-=--=--==-=--=--=-----;--=---=-=-=------;-;-;;;;;;;;;;;-;--;-;--;-----;-;-;-;;--;-;-;-;--;---;--;-;;-;;-;;;;;;;;;;-;-;;;;-;;;;;;;;;;;;;;;>;;>>>>;>;>>>;>>>>>>>>;>>>;>>>;;>>;>>>;>>>>;>>>;>>>;;;>;>;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;-;;;;;;-;-;;;-;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>;>>>>>>>;>;>;;;;;",
-"                                                  .  .   . .   ...++... . . .... ... ...........+.+...+.+.+..++++++++++++++++@+@++@+@@@@@@@@@@@@#@##@####$##$##$$$$%$%$%%%%&%&$$%$%%%$%%%%%%%&%%&%%&&*=*=*=****=******=****&&*&*&*&&**&****&****************=*=**=*==*==========================-=============-=====-===-==-=-=-==-=-==-=-==-==-=-=----=--=-==-=-=-=--=-----;-=-=-------------;-;;;;;;;;;-;;-;;--------;-;--;--;-;-;-;------;--;-;-;-;--;;-;;-;;;;;;--;-;-;-;;;-;;;;;;;;;;;;;;;;;;>>>>>>>>>>;>>;>>;>>;;>>;>>>;>;>;>>;>;>>>;>>>;;;>;;;;;;;;;;;;;;-;-;-;-;;;;;;;;;>;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>;>>;>>>>;>>>;;;;;-",
-"                                                       .    . . ....+... ... . .. .................+.+.+.+.+++++++++++@+@+@+@+@+@@@@@@@@@@@@@@@#@#@##########$#$$$$$$%%%%%%&%&%$%%$%%%%%%%%%%%%%%&%%&**=****=****************&***&***&**&************=****=*=**==*=*=*=*==*================================-====-=-===-==-======-=======-=-==-==-=--=-=-=--=-=-=-=--=--------;---==-=-=-----;-;--;;;;;;;;;;;;;-;;-;-------;--;--;-;-;-;;-;-;-;-;--;-;-;--;-;-;;-;;;;;;;-;;-;--;;-;;;;;;;;;;;;;;>;;;;;>>;>>>>>>>>;>>;>>>;>>;;>>;>>;>;>>>;>>>;>;;>;;;;;;;;;;;;;;-;;;;-;;;-;;;>;;>;;;;;;;;;;;-;;-;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>;>>;>>>>>;>;;;;;;",
-"                                                         .   .  .+.+... ..  . . .. .. .. ...............+.++.+++.+++++++++++++@+@+@+@@@@@@@@@@@@#@#@###########$$$$$%$$%%%%%&%%%$%%$%%%%%%%%%%%&%%%&&***=*=***=****=***=****&*&&&**&***************=***=*=***==**=*=*===*==*========================-===-========-==-==-==-=-=-====---=-==-=-=-=-=--------=-=-=-=-==-=---------=---=---=-------;;-;;;;;;;;;-;;;;-;--;-;-;---;-;--;------;-------;-;----;;-;-;;-;;-;;;;;;--;-;;;-;-;-;;;;;;;;;;;;;;;;;;;;>;>;>>;>>;>>>;>>>;>>>;>>;>>>>;>>;>;;;;;;;;>;;;;;;;;;-;;-;-;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>;>>>>>>>>;>>;;;;;;;",
-"                                                            .  ........ . .........................+.+..+.+.+.++++++++++@+@+@++@+@+@@+@@@@@@@@#@@#@##########$$#$$$%$$%%%%&%&&%$$%$%%%%%%%%%%%%%%%&%&&*=*********=*******=*&**&***&*&*********************=*=**==*==*=*=======================================-====-=-=======-==-=-===-==-=-=-=-==-=-=-=-=---===-=-----------;----------------;--;;;;;;;;;;;;;;-;;-;-----;-;-;-;--;-;-;----;-;-;---;-;;--;-;;-;;-;;;;;;;;;;-;--;-;-;;-;;;;;;;;;;;;;>;;>;;;;;>;>>>>;>;>;>;>>>;>>;>>>;>;>;;;;>;;>;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;-;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>;>>;>>>>>>>;>;;;;;;",
-"                                                      .    .  . ...+.+. . .  . . .. ... ..........+....+.+.++++.+.++++++++++++@++@@+@@@@@@@@@@@@#@#@#@######$##$$$$$$%$%%%%%&%&$%%$%$%%%%%%%%&%&%&%&%&*=*=**=*******=********&**&&****&******************=**=*=**=*==*==*=*==*====================-==-====-=====-======-=-=-==-==-=-===-==-===-=--=--=-----=-=--=-==-=-=----;--;=-=--=--=------;-;-;;;;;;;;;;;;;;-;--;-;--;---;---------;-;------;-----;-;-;-;-;;;-;;;;;;;-;-;;-;;-;-;;-;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>>>>>;>;>;>;;;;;;;;>;;;;;;;;;;;;;;;;;-;-;-;-;-;;;;;;>;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>>;>>>;>>>;>>;;;;;;-",
-"                                                         .   .  ....+... . .. ... .. ..... .........+...+.+.+.+++++++++++@+@+++@+@+@+@@@@@@@@@@@@#@###########$#$$$$$%$%%%%%&&%%$%%%%%%%%%%%%%%%%%&%&&**=*=***=**=****=***=**&&***&*&***&*&*********=**=*****=*=*=**==*================-=====================-====-==-======-==-====-=-=-==--====-==---=-=----=-=-------------------------------;-;;;>;;;;;;;;;;-;-;;-;-;-;-;---;-;-;-;-----;-;---;-;;--;-;-;-;-;-;-;-;;;;;;;-;;-;-;-;-;-;;;;;;;;;;;;;;;;;>;;;;;;;;>;;;;;;;;;;;;>;;>;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;-;;;;;;-;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>>;>>>>>>>>;;;;;;;;",
-"                                                            .   ....... . .  .  .. .. ................+...+.++..+.+++++++++++@++@+@@+@+@@@@@@@@@@@#@@########$$#$$$$$$$%%%&%%%&$%%$%$%%%%%%%%%%%&%%%&&&=*=**=**=****=***=******&*&**********************=*==**=*=*===*=*=*=*================-==========-===========-==-=-=-=====-=-==-=-=-==-=---=--=------=---=-==-=-=------;-;--------------;--;-;-;>;;;;;;;;;;;;-;;-;--;-;-;--;--;---;-;-----;-----;--;-;-;-;-;;;;;;;;;;;;;-;-;-;;-;;-;-;-;-;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;-;-;-;-;-;;;;;;;;;>;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>;>>;>>>>>>>>;;;;;;;",
-"                                                              . ..+..... . .. ... ...... ............+..+.+.+.+++++++++++@+@+++@++@+@+@@@@@@@@@@@#@##@#########$#$$$%$%%%%%%&&&%%$%$%%%%%%%%%&%&%%%&%&**=***********************&***&*************=***=**=***=**=*=**========*===========-=====-====-====-=-=====-===-=====-=-=-====-====-=-==-===-==---=----=--=---------------;--=--=----------;-;;;;;>;;;;;;;;;;;;-;-;;------;--;---;-----;-;---;-;--;--;-;-;;-;-;-;;;;;;;;;;;-;;-;;-;;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;>;;;;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;-;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>;>>>>>>>>;>>;;;;;;;;",
-"                                                            .  ........ .. . . . .. .. .... .............+.+.+.+.+.+++++++++++++@+@+@@+@+@@@@@@@@@#@##@#######$#$$$$$$%$%%%%%&%%$%%$%%$%%%%%%%%%%&&%&%&*=*==*=***=******=****&*&**&***&**************=**=**==*==*=*==*=*=*====================================-=-==-===-=-===-===-=-=-=--==-=-=---=--=------------==-=-=------;--;-------------;--;-;-;;;;;;;;;;;;;;;-;;---;;-;--;---;--;-;-;---;-;---;;-;;-;-;-;;;;;;;;;;;;;;;;;;-;;-;;-;-;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;-;-;;-;-;;;;;>;;;;>;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>;>>;>>>>>>>>;;;;;;;;;",
-"                                                         .   .  ........  . . . .. ....................+..+.++.++++.+++++++@+@+++@+@+@@+@@@@@@@@@@#@@##########$#$$$$$$%%%%%&%&%%$%%%%%%%%%%%%%&%%%%&&&**=****=***=**=***=******&**&******************=**=**=**=*=*=*=*====*==*==================-====-===========-==-====-=-=-===-==-===-==-=-==-=-=--=--=------=--------------;---------------;-;;-;;;;>;;;;;;;;;;;;-;;-;----;--;-;-;---;--;-;---;-;--;--;-;-;-;-;-;;-;;;;;;;;;;;-;;-;;-;;;;-;-;;-;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>;>>>>;>>>>>>;;;;;;;;",
-"                                                                 ...... ..  . .. .... . . .. ...........+..+..++..+++++++++++++@++@+@++@@@@@@@@@@@@##@@########$#$$$$$%$%%%%%%&&%%%%$%%%%%%%%&%%&%&%%&&*=*=*=***=**********=***&*&*************=***=****=*=**==*=*==*==*=*==*==========================-==-==-==-==-====-=======-===-=-=-=-=-=-=-=-=-=-------------=-=------;-;---;--------------;--;-;;;;;>;>;;;;;;;;;--;---;----------;--;----;-;-;--;--;-;-;-;;;;;-;;;;;;;;;;;;;;;-;;-;-;-;-;;-;;;;;-;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;-;;-;-;;;;;;;;>;;;;;;;;;;;;-;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>;>>;>>>>>>>>>;;;;;;;;;",
-"                                                            .  .........  .. .  .. . .................+...+...+.+++.+++++++++++++@+@+@@@@@@@@@@@@@#@@@##########$#$$$%$$%%%%&&%&$$%$%%%%%%%%%%%%%%%%&%&**=*****=**=*****=**********&**************=**=*=****==**=*=*==*====*===*============-=-=====-=======-====-====--==-=-=-=-=-=-==-==-=-=-=--=-=--=----------=------------;-;-----------------;-;;;;>;;;;;;>;;;;;-;;;-;;---;--;-;-;--;--;-;-;-;-;;-;;-;-;;;;-;-;;;;;;;;;;;;;;;;;;;-;;;-;;;;-;;;-;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;-;;-;;;;;;;;;;;;;>;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;>;;;>>;>;>>>;>>>>>>>;;;;;;;;;",
-"                                                                 ...... ..  . ..  .... .. . ...............+.+..+.+++.+++++++@++++@+@++@@+@@@@@@@@@@####@#######$#$$$$$%%%%%%%&&%%$%%$%%%%%%%%%%%&%&%&&&**===*******=*=****=***&&****&******************=*=***==*=*=**=*=*===*===================-============-====-=-===-===-=-==-==-=-=-=-=-=-==-=-=---=----------=-=-----------;;---------;--;-;-;--;-;;>;>;>;;;;;;;;--;---;---;---;--;-;;-;-;---;--;--;-;--;-;-;;;-;;-;;;;;;;;;;;;;;;;-;;-;;;;-;;;;-;-;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;-;-;;;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;>;;>>>>;>>>>>>>>;;;;;;;;;;",
-"                                                              . ........  . .  ...   .. ...... ..........+..+.++.+.+++++++++++++@++@+@+@+@@@@@@@@@@#@@###########$$$$$%$%%%%%&%&%%%$%%%%%%%%%&%&%%&%%%&&*=***=*=*****************&*&************=**=*=***=*==**=*=*===*===*=*==*=*=============================-=======-==--====-==--=-=-=-=-=-=--=---==---=-------------------;-;--;--------------;-;;-;;;>;;>;;;;;;;;;;;-;;---;---;--;-----;-;-;;-;;;-;;;;-;;-;;;-;-;-;;;-;;;;;;;;;;;;;;;;-;-;-;;-;-;;;;;-;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;-;-;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;;>;;>>;>;>>>>>>>>>>;;;;;>;;;;",
-"                                                                 ....... . . ..   ... ... .. .............+..+...+.+.+++++++++++++@++@++@@@@@@@@@@@@@#@##########$#$$$$%$%%%%&%&%$$%$%%%%%%%%%%%%%%%&%&&**=*=***=*=***=**=*=******&**************=****=*=****==*=*=*=*=*=*===*==========================-==-======-=--==-===-=--==-==-=-==-=-=-=-=-=-=--=-----------=-=-----------;-;;--------;--------;;;;;>;;>;>;;;;;;;-;--;;---;--;---;-;-;--;--;---;-;--;;-;;-;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;-;;;;;-;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;-;;-;-;;-;;;;;;>;;;;;;;;;;;;;;;;;;;;-;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;>;>>>>;>>>>>>>>;;;;;;;;;;;",
-"                                                                 ...... . . .   . .  . . ..............+....+..++..+.+.++++++++++++@+@+@+@+@@@@@@@@@#@@#@####$##$##$$$$$%$%%%%&%&%%%%%%%%%%%&%%%%&%&%&%&&=*=*=*=*=**********=***&***&**************=****=*=*=**=*=*=*===*==*===*=*=*=========================-==-=====-==-=-=====--=-=-=--=-=-=-=-=-=--=---------------------;--;--;--;----------;-;;-;;-;;;;;>;;;;;;;;-;;;;;--;-;--;--;;-;--;-;--;;-;;;-;-;;-;;--;-;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;-;-;;;;;;-;-;-;;-;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;>>;>;>>>>;>>>>>>;;>;;;;;;;",
-"                                                               . ....... .  . .. . .. ... . .. .. ............+..++.++++.++++++++@++@+@+@+@@+@@@@@@@@##@#########$$#$$$%$%%%%&%&%%$$%%$%%%%%%%%&%%%&%%&&&=***=******=*=***********&**********=******=*=**=*=*=*=*=*=*=*==*===*====================-=-=============-=-==-====--=-=-==-==-==-=-=-=-=-=-=-=-=------------=----------;-;-;;------;--;----;--;;;;;>;;;;;;;;;;;;;-;;-;---;--;----;;-;-;;--;---;-;-;-;-;;;;;-;;;;-;-;;;;;;;;;;;;;;>;;;;;;;;;;;-;;-;;;;;;;;;;;-;;;;;;;;;;;;;;;;;-;;-;;;-;;;;;;;;;;;;>;;>;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>;>>>>>;>>>>>>>;;;;;;;;;;;",
-"                                                                 .......  .  . . .  .. ..... .............+.+..+..+.+.+++++++++++++@++++@@+@@@@@@@@@@@##@##########$$$$$%$%%%%%&&%%%$%%%%%%%%&%%&%%%&%%&&*==**=*=*=****=*=**=*****************=*=******=****=*=*=*==*==*==*=*=======*=====================-====-=====-==---===-=-=-=-=-=-=-=-=--=-=---=---=--------------------;--;-;--;--------------;-;-;;;;>;>;>;>;;;;;;;-;;-;;--;---;;---;-;--;-;;;;-;;-;;-;-;-;-;-;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;;;;;;;>;;;;;;>;>>;>;>>>>>>>>>;;;;;;;;;;;;",
-"                                                                 ....... . ..   . ..  .  . .... ................+..+.+..+.+++++++++++@+@++@@+@@@@@@@#@@@#########$#$$$%$$%$%%%&%&%$$%$%%%%%%%%%%%&%&%&%&&***=*=****=******=**=****&***************=*=*=*=*==*=*=*=*=*=*=*=====*=*=*============-=======-====-====-=-==-===-=--=-=-=-=-=-=-=-=-==-=--=-=-==--=------------------------;;-;---------;-;--;-;;-;;;;;;;;;;;;;;;;;;-;--;;-;-;---;;---;-;;---;-;-;--;;;-;-;;;;;;;;;;-;;;;;;;;;;;;;;;>;;;;;;;;;;;;;;;;;;;-;;;;;-;;;-;;;-;;;-;;;;;;;;;;;;;;;;;>;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;>;;>;>;>>>>;>>>>>>>>>;;;;;;>;;;;",
-"                                                                 .......  .   . . . .. .. .. .... ...........+.+..+.+.++++++++++++@+@+@++@+@@@@@@@@@@@###@########$#$$$$%$%%%%%&%&%%%%%%%%%%%%%&%%%%&%&%&**=*=**=*=**=*=****=****************=**=*=**=***=**=*=*=*=*==*==*=*=*================================-=====-====-==-=-=-=-=-=-=-=-=-=--=-=-=--=----------------=-------;-;-;--;;;-;----;--;--;--;-;-;;;>;>;>;;;;;;;;;;;;;;---;-;-;;--;-;--;-;;-;;-;;;-;-;;;;;-;-;;-;;;;;;;;;;;;>;;;>;;;;>;>;>;>;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;>;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;>;;>>>>;>>>>>>>>>>;;;;;;;;;;;;",
-"                                                                 ....... .  .. . . .  . ... .. ..................+.+.+.+.+.+++++++++@++@+@@@+@@@@@@@@#@@@#@#######$$#$$$$%%$%%&%&%%$$%$%%%%%%&%%%&%%%&%&&&*=**==**************=*****&**********=***=**=*=**=*=*==*==*==*========*===*=============-=======-=====-=-===--==--=-=-=-=-=-=-=-=-=--=-=-=-=--=-=-=-----------------------;-;--;----;---;--;-;;-;;;;;;;>;;;;>;;;;;;-;--;-;;----;--;;-;-;;-;--;-;;--;;;;-;-;-;;;;-;;-;;;;;;;;;;;;;;;;;>;;;;>;;;>;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>;;>;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;;;;;;;;;;>;;;>>>;>;>>>>>>>>>>;;;;>;;>;;;;;",
-"                                                                  ......   .  .  .  .. .  .. ...... ...........+..+...+.++++++++++@++@++@++@@+@@@@@@@@####@#######$#$$$$$$%%%%%%&&%%%%%%%%%%%%%%%%&%&%&%&&*==***=*=*=**==*=*=**=*************=**=*=**=*=*=*=*=*=*=*=*=*=*=*=*=*===*===================-=======-====-=-==-====-==-=-=-=-=-=-=-==-=---=-=---=--------------------;--;--;-;;-;-----;--------;----;;;;;>;;;;;;;;;;;;;-;-;;-;--;---;-;--;-;;-;-;;;--;-;-;-;;-;;;-;;;;;;;;;;;;;;;;;;;;;>;;;;>;;;;>;>;>;>;>;>;;;;;;;;;;;;;;;>;;;>;>;;;;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;>;;;;;;;;;;>;>;>>>>>>;>>>>>>>;;;;;;;;;;;;",
-"                                                                 ....... .  .   . ..  . .. .... . ...............+..+.++..+.+.+++++++++@++@+@@@@@@@@@@@@@@########$#$$$$$$%$%%%&%&%$$%$%%%%%%%&%&%%%%%%%&&***=*=*****=*******=*************=*******=**=***=*=*=*=*=*=*=====*====*=======================-===-====-=======-==-=--=-=-=-=-=-=-=--=-==--=-=-=--=-----------------------;--;-;;;--;---;-;-;---;-;;--;;>;;>;;;;;;;;;;;;-;--;-;--;;-;--;-;-;-;;-;--;;-;;;;;-;;;-;;;;;-;-;;;;;;;;;;;;;;;;;>;;;>;>;;;;;;>;;>;;;>;>;>;>;>;>;>;;;>;;;;;;>;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;>;>>>;>;>;>>>>>>>>;;;;;;;;;>;;;",
-"                                                                  ....... .  . . .  . . . .. . ...............+.+..+...+.++++++++++@++@++@++@+@@@@@@@@#@############$$$$$%$%%%%%&%&%%$%%%%%%%%%%%%&%&%&%&&&*=*=*==*=***=*=*****=**************=*=*=**==*=*=*=*=*==*==*=*=**===*=================-===============-==-=-=-==-=-===-=-=-=-=-=-=-==-=--=-------=---------------------;----;-;;-;;---;--;-----;---;-;;-;;>;;;>;;;;;;;;;;;;;-;-;-;--;-;-;-;-;;-;-;;;-;-;-;-;;;-;;-;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>;>;;>;;;>;>;>;;;;;>;;;>;>;;>;>;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;>;;;;;;;;;;>;>>;>>>>>>>>>>>>>;;;;;;;;;;;;;;",
-"                                                                  ... ..    .   .  . . . .  ....... ..............+.+.+.++.+.+.+++++++@+@++@@@+@+@@@@@@@#@#@#####$#$#$$$$$%$%%%%%&&$%%%$%%%%%%%%&%%&%%&%&&&*=*=***=***=****=*=**=***&*****=*=****=**=**=*=*=*=*=*=*=*==*====*===*==*===================-===-==-===-===-=-==-=--=-==-=--=-==-=--=-=--=-==-=--=-=--------------------;---;--;;;;-;-----;-;---;;-;-;;;;;;>;;;;;;;;;;;-;-;;-;;-;-;-;-;-;-;--;;-;-;;-;;;-;;--;;;;;;;-;;;-;;;;;;;;;;;;;;;;;>;;;;;;;;;;;>;;>;;;;;;;>;>;;;>;;>;;>;;;;;;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;>;;>;;;;;>;>>>;>>;>>>>>>>>;;>;;;>;;>;;;;",
-"                                                                  ...... .    .  . .  . . ..  . . .. ..........+.....+...+.++++.++++++++++@++@@+@@@@@@#@@###@######$$$$$$$$%%%%&%%&%$%%%$%%%%%%%%%%%&%&%%&&**=*==*=*=****=****=**************=*=**=**=**=*=*=*=*=*==*=*=*=*==*===*===*===============-===-===-======-====-=====-=--=-=-=---=-=-=-==--=--=-=-=-----------------------;-;-;;;-;;---;-;----;-;---;;-;-;;;;;>;;;;;;;;;;;;-;;-;-;-;-;-;-;-;;;-;;-;-;;-;-;-;;;;-;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;>;;;>;;>;;;;;>;;>;>;;;;>;;;>;;;;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;;;;;>>;>;>;>>>>>>>>>>>>;;;;;;;;;;;;;;",
-"                                                                  . .....  .    .   .. . .. .. ....... ...........+.+..++.+.+.++++++++++@++@++@@@@@@@@@#@@@##########$$$$%$$%%%%%&&%%$$%%%%%%%%%%%%%%%&%&%&**=**=**=*=*=**=*=**==*********=***=**=*==*=*=*=*=*=*=*=*===*====*==*================================-==-===--=--=--===-=--=-===-=-=-=--==-=--=---=-=------------------;----;--;;-;;;;---;-;-----;---;-;;;;>;;;;>;;;;;;;;;;;;;;;-;-;-;-;-;-;-;--;-;-;;-;;;-;-;;-;;;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;;;;;;>;;;>;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;;;;;;;>;;>>>>>>;>>>>>>>>>;;;;;;;;;;;;;;;",
-"                                                                  ....... .  . .  ..   . .  . .. . ................+..+..+.+.++++++++++@++@+@@+@+@@@@@@@@@#@@#######$#$$$$$%$%%%%&%&$%%$%%%%%&%%%&%&%&%%&%&&*=*=**=******=****=**=**********=***==***=*=*=*=*=*=*=*=*=*==*=*==*===*=*============-==-===-=-=-=-===-===-==-===-==--=-==--=----=-=-=-=--=-=--==-=----------------------;;--;;-;;-;--;------;-;---;--;-;;;;>;>;;;;;;;;;;;;-;-;;-;;-;-;-;-;-;;;-;;-;-;;;-;;;;-;;;-;;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;>;;>;;;>>>;>;>>>>>>>>>>;;;;;;;;>;;>;;;;",
-"                                                                   .. ..         .  . . . .. . .. .. ...........+...+..+..+.+.+.+.++++++++++++@@@@+@@@@@#@#@#@######$#$#$$%$%%%%%%&&%$%%%%%%%%%%&%%%%%&%%&&&**=*==*=*=*=**=*=*=*=********=***=*=**==**=*=*=*=*=*=*===*==*====*==*=====*===============-=============-===-==--=--==-=--==-=-==---=-=-==-=--=-----=-------------------;--;;--;;-;;----;-;-;----;--;-;-;;;;;;;;;>;;;;;;;;;;;;;-;;-;-;-;-;-;-;-;-;;-;;-;;;-;-;;-;;;-;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>>>>;>>>>>>>>>>>>>>;>;>;;;;;;;;;;;>",
-"                                                                   ......  .   .     . . . .. . ....... .............+..+..+++.+++++++++@+@+@+@+@@@@@@@@@@@#@#@#######$$$$$$$%%%%&%&%%$%%%%%%%%%%%%%&%%&%%&&**==**=**=*****=***=*=*********=**=****==*==*=*=*=*=*=*=*==*=*=*==*==*=*====================-==-==-=-=-==-===-===-==-=-===--=-=--==--=-=--=-=-=-=-=--=-----------------------;;-;;-;;;--------;---;----;--;;;;>;;;;;;;;;;;;;;;-;-;;-;-;-;;;;-;;-;-;;-;-;-;;;;;;;-;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;;>;;;;;;>;;;;;;;;>;>>;>;>;>>;>>>>>>;;;;;>;;;;;;>;>;",
-"                                                                   .. ...    .    . .   . .  .. . . . ... .............+..+...+.+.++++++++++@++@@+@@@@@@@#@@#@#######$$$$%$%$%%%%%%%&$%%$%%%%%%%%%%%%%&%%&%&&=**==*=**=*=*=*=*=**=*=********=**==*=**=**=*=*==*==*===*======*==*======================-==-==-======-===-==-=-=--=-=---=-=-=-=--=--=--=-=-=-=-=--=-=-----------------;-;-;--;--;-;-;---------;---;-;--;-;;;;;>;;;;>;;;;;;;;;;;-;;;;;;---;-;-;-;-;-;;-;;-;-;-;;;;-;;-;;-;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;>;;;>;>>;>>>>>>>>>>>>>>;;;;;;;;;;>;;;;;>",
-"                                                                   ..... .       .   . .   ... . . ........ ........+.+..+.+.+++.++++++++@+++@+@+@@@@@@@@@@@#@#######$#$$$$$%$%%%&%&&%%$%%%%%%%%%%%&%%%%&&%&&**=**=*==***=***=**=*=*******=***=***=*=*===*=*=*==*==*===*=*=*==*==*=*==========================-=-=-===-=-====-==-=-====-=--=-=-=-=-=-=--=---=--=---=-------------------;--;-;-;-;;-;----;-----------;;-;-;;>;;;>;;;;;;;;;;;;;;-;--;-;;;-;-;-;;;-;;-;;-;;;;;;;-;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;>;>>;>>;>;>>>>>>>>>>;;>;;;;;;;;;>;;>;",
-"                                                                   ... ..  .  .    .   . ..   ...... . .................+.+.+...++.++++++++@++@+@@@+@@@@@@@#@#@#######$#$$$$%$%%%%%&%%$%%$%%%%%%&%%%%&&%%%&&&*====*=**==**=*=**=*=**********=**===*=*=*=*=*=*==*=*==*=*===*==*==========================-===-=======-=====-=-==-=-=----=-==---=-=---=-=--==--=--=-=----------;-;------;--;---;-;--;;--;---;---;---;---;-;-;;;>;;;;>;;;;;;;;;;;;;;;-;-;-;;;-;--;;-;;-;;;-;-;-;;;-;-;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;;;>;;>;;;;;;;;>;;>;>>;>>>;>>>>>>>>>>>>;;;;;;>;;>;;;;;>>;",
-"                                                                   ......       .     .   . ..  .  ..................+......++.+.++.+++++++++@++@+@@@@@@@#@@@#@########$$$$$$%%%%%&%&%%$%%%%%%%%%%%%%%%&&%%&&&***=*=****=**=*=*=**===****=*=*=****=*===*=====*====*==*=*=*=====*=*==*=====================-==-=-=-===-=-=-===-===-==-==-=--==--=-=-=---=---=--=-----=------;----;-;--------;--;-;;-;;-----------;--;---;-;-;;;>;>;;;>;;;;;;;;;-;-;;;;-;--;;;;;-;;-;;-;;;;;;;-;;;;;;-;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;>;;;;;;;;;;;;;;;;;;;>>;>>>>>>>;>>>>>>;;>;;>;;;;;;;;;;;>;",
-"                                                                   . .....   .      .   . . . .. .. . . . .............+.+.+..+.+.+++++++++++++@+@+@@@@@@@@#@@#@######$#$$$%$$%%%%%%&&%%%$%%%%%%%%&%%&%%%&&%&&*=*==*==*=*==*****=*=**=******=**===*=*=*==*=*==*=*==*=======*=*========================-===========-=-======-==-=-=--=---=-=-=-=---=-=-=-=-=-=--=-=-=----------;---------;---;--;-;-;-;------;--------;--;-;-;;;;;;;;;;;;;;;;;;;;;;-;-;;;;-;---;;-;;-;;-;-;-;;;;-;;;;;-;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;;;;>;>>>;>>>;>>;>>>>>>>>>>;;;;;;;;;;;;>;;>>;",
-"                                                                   ... ..      .  .  . .    . . . .......... .........+......+..+.+.++++++++++@++@@+@@@@@@#@@#@#@#####$$$$$$$%$%%%&%&%%$$%%%%%%%%%%%&%%&%&%&&&**==*==**=****=====*=*=**=******==**=*====*=*=*==*==*=*=*=*=*====*==*=================-====-==-==-=-====---=-==-=-====-===-=---=--==---=---=----=--=---=---;-------;-;------;---;---;-;;;-;-----;--------;--;-;-;;>;>;;>;;;;;;;;;;;;;;;;-;-;-;;;;-;;-;;-;;;;;;;-;;;-;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;;>;;;;>;;>;>;>>>>>>>>>>>>;;;;;;;;;;;>;;;;>>>;",
-"                                                                    ......               . . . . . . . . ...............+.+.+.++.+.++.++++++@+++@+@@@+@@@@@@#@@##@######$$$$%$%$%%%%&&%%%$%$%%%%%&%%%%&%&%&%&&&*=*=**==**==******=*=**=***=*=***==*=*=*=*====*===*=====*===*==*=====*=================-=-==-==-==-=--====-=-====----=---=-==-=-=--=-=--=--=-=---=--=-------;-;--;------------;--;;-;-;-;---------;-;--;--;-;-;;;;;;;>;;;;;;;;;;;;;;;;;;;;;;-;-;-;-;;-;;-;-;;;;;-;;;;;;;;;;;-;;-;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;>;;;;;;;;;;>;>>>>>>>>>;>>>>>>>>>>;;;>;>;;>;;;;;;>;>;;",
-"                                                                   ......          .  . . .   . . . . ... ..... ...........+....+.+.++++++++++++@++@+@@@@@@@@##@@######$#$$$$$%%%%%%%&&$%%$%%%%%%%%&%%&%&%&&%&&**====**=**=*=*==*=*===*******=*=**==*==*==*=*==*==*=*=*==*=======*====*========================-=====--=-===---=====-==--=--=--=-=---=--=--=-=-=--=----------------------------;---;-;;-;--;--------;-----;-;--;;;>;;;>;>;;;;;;;;;;;;;;;-;;;-;;;-;;;;-;;;;-;-;;;;;;-;;-;;-;;;;;;-;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;>;;;;;;>;;;;>;;>;;;;>;>;;>;>;>>>>>>>>>>>>>;;;;;;;;;;;;;;>;;>;>;",
-"                                                                     .. ...      .          .. . . . .. .... ...........+...+..+..++.+.+++++++@++@@+@@@@@@@@@@@##########$$$$%$$%%&%&%&%$%%%%%%%%%%%&%%&%%&%&&&**=*=*==*=**=*=**=*=*=*=*=*=*=*=*==**==*==*====*====*=======*=*============================-==-==-=-=-=-===--=-==--=-=--=-=-=--=---=-=-=--=---=--=-----=------;-;----;-------;----;--;--;;;-----;--------;--;-;;;-;;>;>;;;>;>;;;;;;;;;;-;;;-;;;-;;-;-;;-;-;;;;-;;;-;;;;;;;;;;;;;;;;;;;;;;;;;-;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;;;>;;;;>>>>>>>;>;>>>>>>>>;>;>;;;;;;;;>;;;;>>;>;",
-"                                                                    ......          . . .  .  . . . .. ... ...............+....+.++.+.++++++++++@++@@+@@@@@@@@@#@@@#####$#$$$$$%%%%%%&&%%$%%%%%%%%%%%%%%&&%%&&&&*=*=*=*=*==*=*==*=*==*=****=****=**==*=*==*=*====*===*=*=*=====*==*=================-=-=-===-========-==--==-==--=-=-===-=-=-=--=----=--=--=--=--=--=------------;----;---------;--;--;--;-;------;--;-;--;--;--;-;;;;>;>;;;;>;;;;;;;;;;;;;;;-;;-;-;;;;;;;;-;;;-;;;-;;;;;;;;-;-;;-;;;;;;;;;;;;;;;-;;-;;-;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;;;>>>>;>;>;>>>>>>>>>>>>;;;;;;;;>;;;;;;;;>;>>;",
-"                                                                    .. ...                .    . . . . . .. .. ..............+.+...+.++.+++++++++@++@@@@@@@@@@#@#########$$$$$%$%%%%&%%&%$%$%%%%%%%&%&%&%&%&&%&&**====**=**=*=**=*==*=*=*=***==*=*=*=*==*=====*=*==*==*===*==*============================-===-=-==-===-==-=-=-==-=-=--=-=--=-=--=-=---=--=-----=-------=--------------------;----;-;;-;;-;;----------;--;--;-;-;;;-;>;>;>;>;;>;;;;;;;;;;;;;-;;-;;;;-;-;-;-;;;;;;;;;;-;-;-;;;;;;;;;;-;-;;;-;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;>;;;;;;;;;;;>;;;>;>;>;>;;>;>>>>>>>>>>>>>>>>;;;;;;>;;;;;;;;>;>>>;;;",
-"                                                                    .......                 . . . . . . . .. ..............+....+.+.+.++.+++++++++@++@@@@@@@@@@@###@######$$$$$%$%%%%&&&%%%%$%%%%%%%%%&%&%&%&&&&*=*=*==*==*==*==*=*=*==*=***=**=*=*=*==*==*=*==========*=*=======*==*==================-=======-=-==-=-=-=-==---==-=-=-=--==-=-=--=-=---=--=-=-----=---------------;----;------;------;-;-;-;-;-;--;-------;--;-;-;;;;;;;>;>;>;>;;;;;;;;;;;;;;;;;;-;;;;;;;;;-;-;-;;;;;;;;;;;;;;-;;;;;;;;-;;;;-;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;>;;;>;;;;;;;>;;;>;;;;;;>;>>>>;>;>>>>>>>>>>>>>;>;>;;;;;;;>;;;;>;;>;>;",
-"                                                                      .. .         .   .  .  .   . . . ... .... .. .........+.+..+.+.+.+++++++++@++@+@+@@@@@@@@@@#@#######$$$$$$%%%%%%%&%%$%%%%%%%&%&%%%%%&&%&&&&*==*=*=**=*=*=*=*=*=*=*=*=**=**=*===*==*====*==*=*==*======*==*========================-==-=-====-==-==-==--===-=--=-=-==--=--=-=----=--=------------=----=--------------------;-;-;--;-;-;;;-------;-;-;---;-;-;-;-;;;>;>;>;;;>;>;;;;;;;;;;;;;;;;;;;-;-;-;;;;;;-;-;;;;;-;;;-;;-;;-;;;;;;;;;;;;;;-;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>;;;;;;;;;;>;>;>;>;>>>>;>;>>>>>>>>>;;;;;;>;;;>;;;>;;;>>;>;;",
-"                                                                    .......          .        . .   .. .  ... ..................+..+.+.+.+++++++++++@+@+@@@@@@@#@@#######$#$$$$%$%%%%%&&&%%%%%%%%&%%%%&%&&%%&&&&&**==*==*===**=*=*==*===*=*=**=*=*=**=*==*=*=============*=*======================-==-====-=====-===-==-=--===----==-=-=--=-=-=-=--=-=------=-=--=---------------;----;--;-----------;--;-;-;-;;--;-;------;-;--;;-;;;;;;;;>;>;>;>;>;>;;;;;;;;;;;;;;-;;;;;;;-;;;;;;;;;-;;;;-;;;;;;;;;;;;;;;;-;;;;;;;-;;-;;;;-;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;>;;;;;;;>;>;;>;;>;>>>>>>;>>>>>>>>>>>>>;;>;;>;;;>;;;;;;;>>>;>;>;",
-"                                                                     .. .. .             .  .    ..   . ... .. . .............+..+.+.+.+.+.++++++@+++@+@@@@@@#@@#@#@#######$$$$$%$%%%&%%&%$%%%%%%%%&%&%%&%&&%&&&&**=*==*=***==*==*=*=*=*=****=*=*=*=====*===*=*==*=*==*=======*==*==================-==-=====-=-==-==-==-==---====--=-=-=--=-=---=-=--=-=--------------=------------;------;-----;-;---;-;-;;;;-;-----;-;-;---;;--;;-;-;;;>;>;>;>;;;>;;>;;;;;;;;;;;;;;;-;;;;;;-;;;-;;;;;;;;;;;;;;;-;;-;;;-;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;>;;;>;;;;;;;;>;;;;;;>;>;>>;>;>;>>>;>>>>>>>>>>;;>;;>;;>;;;;>;;;;>;;>;>;;",
-"                                                                     ... ..                    .   .. . . . . .... ...............+.+.++++++++++++@+@+@@@@@@@@#@@@########$$$$$%$%%%%%&&&%%%%%%%%%%%%%&%&%%&&%&&&&*=====*===*==*==*==*=====****=*=**=*=*==*=============*==*=============================-=-====-==--=-==-====----=------=--=-=-=---=-----=-----=--=-=---=-=--=--------------;------;-;--;;-;-;;;;-;-;-;-;-;;---;;-;;-;;;;;;;;;>;>>;;>;;>;;;;;;;;;;;;;;;;;-;;;;-;;;;-;-;-;-;;;;;-;;;;;;-;;;;;-;;-;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;>;;;>;;;>;;;;>;;>;;;;>;>>>>>>>;>>>>>>>>>>>>;;;;;;;;;;;>;;;>;>;>>;>;>;",
-"                                                                     . .. ..                 .  . . . . . . ... ................+..+.+....++++++++++++++@@@@@@@#@#@@@#######$$$$$$%%%%%%&&%$%%%%%%&%&%%&%&&%&&&&&&***=*==*=*=**==*=**==*=**=*=**=*=*=*==*==*==*=*=*==*=========*=======================-======-===-==-=-==-=--===-=-=====-=----=-=-=---=-----=------------------------;-;--;---;--------;--;-;-;;;;;-----;---;-;--;-;;;-;;;;;>>;>;;;>;>;;>;>;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;-;;;;;;;;;;;;-;;;;;;;-;;;-;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;;;;;;;>;;>;;;;>;;>;>>>;>;>;>;>>>>>>>>>>>>;>;>;>;;>;;>;;;;;;;>>;;>;;;;",
-"                                                                      .....             .  .     .   .  . . .. ... .. .........+..+..+.++++.++++++++@+@@+@@@@@@@@@#@########$$$$$%$%%%%&%&%%%%%%%%%%%&%%&&%&&&&&&&&*===*==*=====*=*===*=====*=*=*=*===*===*==================*=====================-=-===-=-=====-==-==-=-==-==--=-=--------=-=------=-----=-----=-----=----=-------;-----;---;--;-;-;-;---;-;;;;-;-;-;;;--;-;-;-;-;-;-;;-;;;;;>;;>>;;>;>;;;;;;;;;;;;;;;;;;;;;;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;>;;;;;;;>;>;;;;;;;;>;;;;;>;>;>>>>>>>>>>>>>>>>>>>>;;;;;;>;;;;;;>;>;>>;>>;>;>;",
-"                                                                     ... ..                   .    .  .. . . .. . .................+.++.+..++++++++@++++@@@@@@@#@#@#@@####$#$#$$%$%%%%%%&&&%%%%%&%&%%%%&%%&&%&&&&&&*=*===*==****===*=*==*=*=**=*=*=**=*=*==*=*=*==*==*==*==*=====*=============-==-====-=====-=-==-==-==-=--=--=-=--==-=-==----=-=-=----=------=---=-=----------------;-;---;---;-------;;--;--;-;;;;----;;-;-;-;-;-;-;;;;;;;;;;>>;>;>;>;>>>;>;>;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;-;;-;;-;;;;;;-;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;>;;;;>;;>;;;>;;;>;;;;>;;>;;;;;>>;>;>;>>;>;>>>>;>>>>>>>>>;;;>;>;;;;>;;>;;;;;>;>;;>;;>;",
-"                                                                      ......                    . . .   . . . .. ................+..+.+.+++.+++++++++@+@+@@@@@@@@@#@########$$$$$$$%%%%%%&&%%%%%%%%&%&%%&%&%&&&&&&***==*===*=====*=*==*====*=****=*==*===*=====================*=====================-=====-====-==-==-==-==-=-=-==--=--=--=-=-------=-------=---=-------=---------------;---;----;--;;---;;-;;-;;;-;;;----;-;--;-;-;;-;-;-;-;;;;;>;>;>;>;;;>;;;>;;;;;;;;;;;;;;;;;;;;;;-;;;;;-;;;;;;;;;;;;;;;;;;-;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;>;;;>;;;;;;;;;;;>;>;;;>;>>>;>>>>;>>>>>>>>>>>>>;;;;;;;>;;;;;;;;;>>;>;>;;>;;;",
-"                                                                       . . ..             .          . . . . . ... . .. ...............+..++.++++++@++++++@@@@@@#@#@#@#######$$$$%$%%%%&%&&&$%%%%%%%%%%&%&&&&&&&&&&&=*===*==*=*=*===*==*====*=*==*=**==**==*==*==*=*==*==*===============================-===-=====-=-=--==-=-=-=--=-=-=-=----=--=-=---=---=--=------------------------;---;--;;-;-;---;-;-;-;-;;-;;;;;;;;;--;-;-;-;--;-;-;;;-;;;;>;>;>;>;>>;>>;>;>;>;;;;;;;;;;;;;;-;;;;-;;;;;;;;;;;;;;;-;;-;;;;;;;;;;;;;;;;;;-;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;;>;;;;;;;;;;;>;;>;>;;>;;>>;>>;>>;>;>>>>>>>>>>>>>>;>;>;>;;;>;;;>;;>;;;>;>;>>;;>;",
-"                                                                      ......                .  .  . .  .  . .. .. .................+.+.+.++.+.+++++++@+@@+@+@@@@@@@@##########$$$$%$%%%%&%&&%%%%%&%&%&&%&%&&&&&&&&&&&=*=*=*====*==*===*======*=***=*==*===*=====================================-==-=-==-======-==-=-=-===-=-==-=-=-=--=--=-=------------=-------------=------------------;--;-------;---;--;-;;-;;-;-;;----;--;-;-;-;-;-;;-;;;-;;;>;>;>;>;;>;;>;>;>;;>;;;;;;;;;;;;;;;;;;;-;;;;-;;-;;-;;;;;;;-;;;;;;-;;;;;;-;;;;-;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;>;;;>;>;;>;;;>;;>;>;;>;;;;;;;;>;;>>;>>;>>>>>>>>>>>>>>>>>>>;;;;;;;;>;;;>;;;>;;>>;>;>;;;>;;",
-"                                                                      .. .. .                    .    . . . . . .. . .............+...+.+..++++.++++++@++@+@@@@@@#@#@######$#$$$$$$%%%%%%&&&%%%%%%%%&%%&%&&%&&&&&&&&**======*====*===*==*=====*=*=*=**=*=*==*=*=*==*===================================-===-=-===-=====--==-=--=-=-=-==-=------=--=--=-----=-=-=--=-=--------------------;--;--;;-;;;--;--;;-;-;;;-;;;;;;;;-;-;-;-;-;-;-;-;;;;;;;;;;;>>;>;>>;>>;>;>;>;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;>;;;;;;;;;;;;;;>;>;>;>;>>;>>>;>>;>;>>>>>>>>>>>>>>;;;;;>;;;;;;;;;;;;;>>>;>;>;>;;>;",
-"                                                                       .....                        .   .  . . . .... .. ...........+..+.++..+.+++++@++@+@+@@@@@@@@#@#@#######$$$$$$%%%&%%&&&%%%%&%%%&%&%%&&&&&&&&&&&*=*==*===**===*==*=====*=*=*=*===*=*=*===========*==*========================-==-===-=====-==-=--===-==-==-=-=-=-----=-=----------=-=---------------------------------;-----;---;-;-;--;-;--;;;-;;-;;;-;-;-;-;-;;-;;;-;-;-;-;-;;;;>;>;>;;>;>;;>;>;;>>;>;;;;;;;;;;;;;;;;;-;;;;;;;;;;-;;;;;;;;;-;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;;;;;;>;;;;;>;;>;;;>;>;;;;>;;>;>;>>;>;>>;>>>>>>;>>>>>>>>>;;>;>;;>;>;;>;;>;>;>;>;>;>;;>>;;;",
-"                                                                       . . ..                 .      . .  .  . .. . .. ..............+...+.++.++++++++++@+@+@@@@@@@@#@######$###$$$$%%%%&%&&&%%%%%%&%%&%&%&&&&&&&&&&&**==========*==============*=*=**=*===*=*=*==*=*==============================-=======-=-==-==-==-=-=--=--=-=-=--=-=-----=-=----=------=----=---------------------------;-;---;-;--;--;-;-;;;-;;;;;;;;;-;-;-;-;--;;--;-;-;;;;;;;;;;>;>;>>;>;>>>;>;>;;>;;>;>;;;;;;;;;;;;;;;;;;;;;-;;;;-;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;>;;>;;;>;;;;>;;;>;;;;;>;>;;>;>;;>;>>>;>>>>>;>>>>>>>>>>>;>;;;;;;;;;>;;;;;;;;>>;>;>;>;;;>;;",
-"                                                                      .......                     .      . . . . . ....... .............+..+.++.++++++@+++@+@@@@@@@@#@########$$$$$%$%%%%%%&&&%%%%&%%&%&%&&&&&&&&&*&&&*=*===*===*==*=*=*=*===*=*=*=*==*==*=====================================-=====-=-=-========-==-=-=-==-==-=-=--=-----=-------=---=-=-----=-------------------------;----;-;-;-;--;;-;--;-;--;;;-;;;;;;;;-;-;-;-;;-;;;-;;-;-;-;;;;;;;>;>;>>>;>;;>;>;>;;>;>;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;-;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;>;;;>;;;;;;;;;;;>;;;;;>;;;>;>;;>;>;>;>>>>>;>>>;>>>>>>>>>>>>>>>;;;;;>;>;;;;;;>;>;;>;>;>;>;;>;>;>;",
-"                                                                       . .. ..                       . .. . . . . .. . ...............+..++.+..++.++++++@@+@+@@@@@@@@#@#@###$$#$$$%$$%%%%&&&&&%%%%%%&%&%&%&%&&&&&&&&****======*===*=============*=*=*==**=*=*==*=*==*==*===================================-==-=-==-====-==-=-=-=--=---=-=---=--=-=---=-----------=------------------------;-;---;-;-;;--;;-;-;-;;-;-;;-;;;;;;;-;-;-;--;--;;-;;;;;;;-;;;;;;;>;>;;>;>>;>;>;>>;>;;>;;>;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;>;>;;>;;;;;;>;;;;>>;;>;>;>;>;>>;>;>>>>>>>>>>>>>>>>>>>;;;>;>;;;;;>;;;>;;;;>>>>;>;;>>;;>;;;",
-"                                                                        .....                              .  . . . ... ...............+...++++.++++++@+++@+@@@@@@@#@@@########$$$$$%$%%%%%%&&%%%%&%%%%&%&&&&&&&&&&&&&&=*==*====*=====*==========*=*=**======*=====================================-==-==-=======-==---==-==-=-=-=--=------=--------=------=----------------------------------;;-;--;--;--;;-;-;-;;-;;;;;-;;;;;;;-;-;;;-;;-;--;-;-;;;;-;;;;;;>;>>>>;>>;>;>;;>;>>;>;;>;;>;;;;;;;;;;;;;;;;;;;;-;;;;;-;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;>;;;;;;;;;;;;;;;>;;>;;;>;>;;;>;;>;>;>>>;>>>>>;>;>>>>>>>>>>>>>>;>;;;;;;>;;;;>;;;;;;>;>;>;>>;;;>;;;>;",
-"                                                                       .. . ..                  .  .    . .  . . . .. ... .. .............+..+.+..++++++++++@+@@@@@@@#@@########$$$$$$%%%&%&&&&%%%%&%&%&&&&&&&&&&&&*&&**==========*=*====*=====*==**=*==*=**==*==*=*==*=========================-===-==-=====-=-===-===-==--=-=-=-=---=-=----=-=--=-------------------------------------;--;----;-;;-;;-;;--;-;--;-;;-;-;;;;;;;;;;-;-;-;;-;-;;-;-;-;-;;;;;;;;;;>;>;>>;>>>;>>;>;;>;>>;;>;>;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;>;>;;;;>;;>;;>;>;;>;>>;>>;>;>>;>>>;>;>>>>>>>>>>>>>>>>>;>;;>;>;;;>;>;;>;;;>;>>;>;>;;>;>;;>;;;",
-"                                                                        ......                        .  .  .  . . . . . ..............+.+...+.+++++++++@+@@++@@@@@@#@@#@####$##$$$$%$%%%%%&%&&&%%%%&%&%&%&&&&&&&&&&&*&**=======*==*===*=========*=*=*=*=*===*==========*=================================-=-===-=--==-=-=-==--=---=-=-----=---------=---=----------------------------;----------;---;--;-;;;;;;;;-;-;-;;;-;;;;;;;;-;-;;-;-;;-;-;-;-;;;;-;;;;;;;>;>>;>;>;>>;>;>>;>;>;>;;;;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;>;>;;;>;;;;;;;;>;>;;;;;>;>;;>;>;;;>;>;>>;>>;>>>>>>>>>>>>>>>>>>>>;>;;;;;;;>;;;;;;;;;>;>>;>;>;;>;>;;>;>;;",
-"                                                                        .. . .                             . .. . . ...... ... ............+.++..+.+++++++++@@+@@@@@@@#@#@#####$#$$$$%%%%%%&&&&%%%&%%&%%&&%&&&&&&&*&&&&**============*============*=*=*=*=*=*==*=*=*=*=====================-==-===-===-=-======-=-==-=-=-=---=--==------=-=--=-=-=----------------------------------;---;-;--;-;--;;;-;;-;--;-;---;-;-;;-;;;;;;;;;;;;-;-;-;-;;-;;;;;-;-;;;;;;;;;;;;>>>>;>>;>>>;>>>;>;>;>>>>>;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;>;;>;;;;;>;>;>;;;>;;>;>>>;>>>>;>>;>>>;>>>>>>>>>>>>>>>>;;;;>;>;>;;>;>;>;>;>;>;>>>;>;>;;;;>;;;;;",
-"                                                                        ......                       .   .  .  . . .  .  ... ...........+...+.+++.++++++++@+++@@@@@@@@#@#@#######$$$$$$%%%%%&%&&&%%%&%&%&&&&&&&&*&&&*&*&**=========*=====*=========*=*=*===*=*=========*==*========================-======-=-=-===-==-=-=-==--=---=-=-=--=---------=------------------------;---;-----;----;----;----;-;-;;;-;-;;;;;-;-;;-;;-;;;;;;;;;-;-;;--;;-;-;-;;;-;;-;;;;;;;;;;>>>;>>;>>>;>;>>>;>;;;;;>>;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;>;;>;;>;>>;;>;>;>;>;>;>;;>;>;>;>>>>>>;>>>>>>>>>>>>>>>>>;>;>;;>;;;>;;;;;;;;;;>>>;>;>;>;>;>;;>;>;;",
-"                                                                         . ....                           .  .  . . .. ... ...............+....+.+.+.+++++++@+@+@@@@@@@@@#######$$$$$%$%%%%%&&&&&%%%%%%&%&&&&&&&&&&&&*&&**=======================*==*=*=*=*=*==*=*=*=*==========================-====-==-=======-==--=--=----=--=---=--=--=-=--=--------------------------;---;--;-;-----;--;-;---;-;-;-;-;-;-;;-;-;;;;-;;-;;-;;;;;;;;;-;;-;;--;-;;;;-;;-;;;;;;;;;;;;;;>>;>>>;>>>>;>;>>>>>>>;>;>;>;>;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;>;>;;;>;;>;;>;;>;;;;;>;;;>;>;;;>;>;>;>>;>>>>>>;>;>>>>>>>>>>>>>>>>>>>;;;;;>;;;>;;;>;>;>;>;>;;>>;>;>;>;>;;>;>;>;",
-"                                                                        ..... .                             .  .  . . . . .. ... ...........+.+..++++++++++@+@+@+@@@@@@@#@@#######$$$$$%%%&%&%&&&%%%&%&%&&&&&&&&&&&&*&&*&*===========*=*==*========*=*=*=*=*==*=*======*=====================-====-====-===-=-=-=--=-=-=--=-=--=--==--=-=--------=----------------------;---;---------;-;--------;---;-;-;-;-;;-;;;;-;-;;-;;;;;;;;;;;;;;;-;;-;;;;;-;-;-;;;;-;;;;;;;;;;;;;>;>;>>;>;>>>>;>;>;;>;>;>;>;>;;>;>;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;>;;;>;;>;;;;;;>;>;;>>;>;;>>;>;>;>>;>>>;>;>>>>>>>>>>>>>>>>>>>>>>;;>>;>;;;>;>;>;>;;;;;>>>>;;>;>;>;;;;>;;;;;;",
-"                                                                         .. ...                       .       . .. . . .... ..............+.....++..+.++++++++@+@+@@@#@#@##@###$$$$$$%$%$%%%&%&&&&%&%&%&&%&&&&&&&&*&&*&*&**=========================*=*=*=*=*=*===*=*====*==========================-====-====-=-==-=-=-==-=--=-=----=----=-=-=--------------------------------;--;-;-----;-;-;;--;-;--;;-;-;;-;;-;-;;;;-;;-;;-;-;;;;;;;;;-;-;-;-;;-;;;;-;-;;-;;;;;;;;;>;>>;>>;>>>>;>;>>>;>>;>;>;>;;;>;>;;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>;;;;;>;;>;;>;;;>;;>>;>>;>;>;;;>;>>;>>;>>>>;>>;>>>>>;>>>>>>>>>>>>>>>>>>;;;>;;;;;>;;;;;;;;;>;>;>;>;>>;>;;;>>;>;>;>;>;",
-"                                                                         .... .                         .   .     . . .  . .. ..............+.+..+++++.++++@+++@+@@@@@@@@@########$$$$$%%%%%%&&&&&%%%%&%&&&&&&&&*&&*&&*&***==============*=*=========*=*=*===*=*===*==*====*===================-=====-====-=-==-=-=-=--=--=--=--==-=--=-=-----------------------------;---;--;--;----;-;---;-;--;--;-;--;;;;-;;-;-;;;-;;;-;;-;;;;;;;;;;;;;;;;-;-;-;;-;-;;;;;;;-;;;;;;;;;;;;;>;>>;>;>>>;>>>;>>;>;>;>>;>;>;>>;>;>;>;>;>;;;;;;;;;;;;;;;;;>;>;;;;>;>;;;>;;;;;>;>;;>;;>;;>;;>>>;>;>;>;>>;>;>>>>>>;>;>>>>>>>>>>>>>>>>>>>;;>;;;>;>;>;>;>;>;>;;;>>>>;>;>;;>>;;;>;;;>;;;;",
-"                                                                          . ....                               . .  . .. .. ... .. ............+..+..+++++++@+@+@+@@@@@@##@#######$$$$$$%%%%&%%&&&%&%&%&%&&&&&&&&&*&&*&**&*========================*==*=*=*=*=*==*=====*=*================-=======-===-=-==-==-=-=-=--=--=--=-=--=--=--=---=-----=---------------;-;---;---------;-;-----;-----;-;--;--;---;-;-;;;-;-;;-;;-;;-;;-;;;;;;;;;;;;;;;;;-;;-;;-;-;-;;;-;;;;;;;;;;;;>;>>>>>;>>>;>>>;>>>;>>;>;>;>;;>;;;>;>;;;>;>>;>;>;>;>;>;>;;;;;>;>;;;;>;;>;>;>;>;;>;;>;>>;>>;;>;>>;>>>;>>>>>;>;>>>>>>>>>>>>>>>>>>>>>>;;;>;;>;;>;;;;;>;;;;;;>;>;>;>>>;>>;>;>;;;>;;;>;;",
-"                                                                         ......                           .   .  . .. . . .. . .............+.+..+.++.+++++++++@+@+@@@@@@@#@####$##$$$$%$%%%%%&&&&&%%%&%&%&&&&&*&&&&*&&*&*&*=========================*=*=*=*=*==*=*=*=*======*===============-==-===-=======--===-=-==--=--==-=-=--=--=--=-----=------------;--;-----;---;-;-;-;------;-;-;-;-;-;--;--;-;-;-;-;;--;;;;-;;;;;;;;-;;;;;;;;;;;;;;;-;-;;-;;-;;;;;;-;;;;;;;;;;;;>;;;;;>;>>;>;>>>;>>>;>>;>>>;>;>>>;>>;>;;>>;;;;>;>;>;;;;;>;>;>;>;;;>;>>;;>;>;>;;>;>>;>;>;>;>;>>;>>;>>;>>>>;>>>>>>>>>>>>>>>>>>>>>>>>>>;>;>;;>;;>;;;>;>;;>;>;>;>>>;>>;;>;;;;>;>;>;>;>;;;",
-"                                                                         . . . .                                .    . . . ..... ..............+.+.+.++.++++++++@+@+@@@@@@##@#####$$$$%$%$%%%&&&&&&&%%&%&&&&&&&&&*&*&**&*&***==-=-==========*==========*=**=*=*====*====*=*=======================-===-=---===---=-=--==-==----=--=--=--=---=------------------------------------;-;-;-------;---;;--;-;-;-;-;;-;;-;-;;;;-;;-;-;;-;-;;;;;;;;;;;;;;-;;;-;;-;-;-;;;-;;;;;;;;;;;;>;;;>>;>>>;>;>>;>>>;>;>;>>>;;;>>;>;>>;;>>>;;>;;;>>;>>;;;>;>;>>;;>;;>;>;;>;>>;>;;>;>;>;>>>;>>>;>>;>>;>>>>;>>>>>>>>>>>>>>>>>>>>>>;;;;>;;>;;>;;>;;>;;>;;;;;>>;>>;;>>;>;>;;;;>;;;;>;>;",
-"                                                                          .......                           .    . .  . ..  . . .. .. ..........+.+.+.++++++++@++@+@@@@@@@@#######$#$$$$$%%%%%%&%&&&&%%&&%&&&&&&&*&&*&&***&**========================*==*=*=*==**=*==*=*===*===*===============-====-======--====-=-==--=--=-=--=--=------=-------------------;--;-;-;-;-;-;-;-;------;-;-;-;-;-;--;-;--;--;--;;-;;-;-;-;;;;;;;;;;;;;;;;;;;;;;;;;;;-;-;;;;;;;;;-;;;-;;;;;;;;;;;;;;;;>;>>>>>;>>;>>>>>>>;>;>>>;>;>>;>>>;;>>;;>>>;>;;;>>;>;>;;>;>;>>;>;>>;>;>>;>>>>>>;>>;>>;>>>>>>>>>;>;>>>>>>>>>>>>>>>>>>>>>>>;>;>;;;;;>;;;>;>;;;;;>;>>>;>>;>>;;;>;>;>;>;;>;>;;;;;",
-"                                                                          ... ..                              .     .. .  .. ... .................+.++..++++++++@++@@@@@@#@@@######$$$$$%$%%%%&%&&&&%%&%%&&&&&&*&&&*&&*&&****====-=-==================*==*=*=**==*==*====*===*==============-=====-===-=-=-==-=--=-=-=-=-=--=-=--=--=-=-=-------------------------;---------------;-;----;----------;--;-;-;-;--;;-;;;-;;-;-;;-;-;-;;-;;;;;;;;;;;;;;;;-;-;-;-;-;;;;;;-;;;;;;;;;;;;;;;;;;>;>>>;>>;>;>;>>>>>;>>;>>;>;>;>>;;>>;>;>;>>;>;>;>;>>;>>;>;>;>>;>>>;>>;>;>;>>;>>;>>>;>;>>;>>>>>>>>>>>;>>>>>>>>>>>>>>;;;;>;;>;>;;;>;;;;;>;>;;;;;>>;>;>;>>>;>;;;>;>;;>;;>;>;",
-"                                                                           . .. .                                . .   . .. .. ... ............+.+..+.++++++++++++@@+@@@@@#@#@###$##$$$$$$%%%%%&&&&*&&%%&&&&&&&&&&*&*&***&****==========================*=*=**==*==*==*=*==*==============-====-=====-======-=-==-==-=-=--=--=--=--=----------------------;--;--;----;-;-;-;-;-;-;---;-;---;-;-;-;-;--;---;--;-;--;-;-;;-;;;;;;;;;;;-;;;;;;;;;;;;;;;;-;;;;;;;;;;-;-;;;;-;;;;;;;;;;;;;>;;;;>;>>>;>>>>>;>;>;>>;>>;>;>>>>;>>>;>;>;>;>>;>>>;>>;>>;>>>;>>;>;>;>>;>>>;>>>>>>>>;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;>;>;>;;>;>;;;>;>;>;>;>;;;>>>>;>>>>;>;;;;>;>;>;;>;;>;>;;",
-"                                                                          .......                                   . . .  .  .. ... .............++.+.+.+++++@+@+++@@@@@@@####@###$#$$$%%$%%%&%&&&&&&%&&%&&&&&&&*&*&*&*&**&**====-=-====================*=*=*=*=*==*=====*==*==============-=-==-=-==-=-=--==-=-=--==-=-=-=--=---=---=--=---------------------;--;-;---;----;----;-;--;-;--;--;--;--;-;-;-;-;-;-;-;;;-;;;-;-;;-;;;;;;;-;;;;;;;;;;;;;;;-;-;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;>;>>;>;>;>>>>>>;>>;>>>>;>;>>;>>>>>>>>;>>>;>>;>;>;>;>;>>;>>>>>>;>>>>>>;>;>>>>>>>>>>;>>>>>>>>>>>>>>>>>>>>>>>>;>;;>;;;>;;;;>;;;;;;>;;;;>>>;>;>>;;;>;>>>;;>;;;;>;;>;>;;;",
-"                                                                          .. .. .                           .   . .  .   . ... .. ...................++.+++++++++@@@+@@@@@#@#@######$#$$$$%%%%%%&&&&&&%%&%&&&&&*&&*&*&*&**&****======-====================*=*=*=*=*==*=*=*====*=*===================-==-=-==-==-====-=-=-=--=--=----=-----------------------;--------;----;;--;-;--;-;----;--;--;--;----;-;-;-;-;-;--;;-;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-;-;;;;-;;-;;;;;;;;;;;;;;;;;;;;;;;;;>>>>>>;>;>>>>>>>;>>>;>>>>;>;>;>;>>;>>>;>>>>>>>>>>;>>>;>;>>>>>;>>>>>>>;>>>>;>>>>>>>>>>>>>;>>>>>>>>>>>>;;>;>;;>;;;>;>;;>;>;>;;;>;>;>>>>>;>>>;>;;;;>;;>;>;;>;;>;>;;",
-"                                                                           .......                                 .   .. .   . .. . .. ........+.+.+.+.+.+++++@+++++@@@@@@@@######$#$$$$$$%%%%%%%&&*&&&%&&&&&&&&&&*&*&********====-====================*==*=*=*=*=**=*===*=*==============-===-==-==========-==-=--=-=-=--=-=--=-=---------------------;----;---;-;--;-;----;-;-;-----;-;--;--;-;--;-;;--;--;-;-;-;;-;;;-;-;;;;;-;;-;;;;;;;;;;;;;>;;>;;;;;;;;;;;-;;;;;;;-;;;;;;;;;;;;;;;;;>;;;;;;;>;>>>>>;>;>;>>>;>>;>;>>>>>>>>;>>>;>>;>;>;>;>;>>>;>>>>;>>;>>>;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>;>>>>>;;>;;;;>;;;>;;;;>;;>;;;>;>;;;>>;>;>>;;;>;;>;>;>;;>;;>;;>;;;>;",
-"                                                                            .. ..                             .      ..   . ... . ...................+.+.+++++++++@+@@+@@@@@@#@#####$$$$%$%$%%&%&&&&&&&%&%&&&&&&*&*&*&*&*&*&****=====-=-=====================**=*=*==*==*==*===*=========-===-===-==-=-=-=-=-==-==-=-=-==-==-=-=---------------------;----;----;----------;-;------;-;;-;--;--;---;-;-;--;--;-;-;-;--;-;-;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;-;;;-;;;;;;-;;;;;;;;;;;;;;;;;>;;;;;;;>;;>;>>>>>>>;>>>>>>>;>;>;>;>>>;>>;>>>>>>>>>>;>>>;>>>>>>>>>>>>>>>>>;>>>>>>>>>>;>>>>>>>>;>>>>;>;;>;;;>;;>;>;>;>;;;>;;;>;;;;>>>>;>>;>;>>>;>;>;;;;>;;>;;>;>;>;;",
-"                                                                           ..... ..                              .     . . .  . ... . ...........+.+.+.++.++++++@++@+@@@@@#@#@#@###$##$$$$%%%%%%%&%&&*&&%&%&&&&&&&*&**&*&*******==-=-=====-===============*=*==*=*=*==*==*===*=====================-======-=-=-=-=-==-=--=--=-----=--=-----------------;---------;-;-;-;-;---;-;;;--;----;;-;-;-;--;-;-;;-;-;-;-;-;-;-;-;;-;;-;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>;;;;>;>>;>;>;>>>;>;>>>>>>>>>>>;>>>>>>;>>;>>;>>>>>>>>>>>>>>>>>>>>;>>>>>>>>;>>>>>>>>>;;>;>>>>;>;;>;;;>;;;>;;;;;;;>;>;;>>;;>>>>>;;>>;>;>;;;>;>;;>>;;>;;>;;;;>;;;",
-"                                                                            .. ...                                 .    . . . . . ..... .. ...........+.++.+++++++@+++@@@@@@#@#######$$$$$$$%%%%%&&&&&*&%&&&&&&&*&&&*&*****&*****====-=-======-=============*=*=*=*=**=*===*==============-===-==-===-=-=====-==-==--=-=--=---=-=------------------;------;-;-;------------;--;---;--;-;----;--;-;--;----;-;-;-;-;-;-;-;-;;-;;;-;-;;;;;;;;;;;;;;;;;;;;;>;>;;;;;;;-;;;;;-;;;;;;-;;;;;;;;;;;;;;;;;;;;;;>;;;;;>;>>>>;>>>>>;>;>;>;>>>>;>;>>>>>>>>>>>>>;>>>>;>>>;>>;>>;>>>>>>>>>>>>>>>>>>;;>>>>>>;>>;>;;>;>;>;;;>;>;>;;;;;>;;;>;>>>;>>>;>;>>;>;>;;;>;;;>;;>;;>>;>;>;;",
-"                                                                            .......                                  . .   . . . .  . ..............+..+..++++++++++@+@@@@@#@@@@#####$#$$$$%$%%&%%&&&&&*%&%&&&&&&&*&&**&*&*******=-===-==-===================*=*=*=*=*==*=====*====================-=====--=-==-=-=-=-=--=-=-=-----=-------------;---;--;-------;-;-;-;-;-;-;----;-;--;-;-;-;-;-;-;-;-;;-;--;-;-;-;-;-;-;--;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>;;;;-;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;>>;>>>>>>>>;>;>>>>>;>>>;>>;>>;>>>;>>>>>>>>>>>>>>>>>>>>>>>>>>>;>;;>>>>;>;>>;;;;>;;;;;;;>;;;;>;;>>;>;;>;;>>;>>>;>>;>;;>;>;;>;;>;>;;>;>;;;>;;;>;",
-"                                                                            . .....                                      ..   . . .. .. . .........+..+..++.+++++@+@+@+@@@@@#@##@#####$$$$$$%%%%%&%&&&&&&%&&&&&&&&&*&*&*****&*****===-==-===-=================*=**=*===*==*=====================-====-=-===-=--==-=-=-=-==--=--=-=-------------;---;---;---;-;-;-;--;--;------;-;-;--;--;--;--;--;-;-;--;--;-;-;-;-;-;-;-;;;-;;;-;;;;-;;;;;;;;;;;>;;;;>;;;>;;;>;>;;;;;;;;;-;-;;;;;;;;;;;;;;;;;;;;;;>;;;;;>;;>;;>;;>;;>;>;>>;>>>>>>>>;>>>;>>>>>>;>>>>>>>>>>>>>>>>>>>>>>>>>>>;>;;;>;;>>;>;>>>>;;;>;;;;>;>;>;;>;>;;>;;>;;>;>>>;>;>;>>;;>;>;>;;>>;>;>;;>;;;>;>;;>>;;",
-"                                                                            ... . .                                   . .  ... . . .. .................++..++.+++++@++@+@@@@@@#@##@##$#$#$$%$$%%%%&&&&&**&%&&&&&*&&&*&*&*&********====-===-===-==-================*==*======*======================-=====-=====--=-=-=-=--=--=-----------------------;---;--;------;-;--;-;-;------;--;--;-;-;-;--;-;-;--;-;-;-;-;-;-;;-;--;;-;-;;-;;;;;;;;;;;;;;;;;>;;;;;;;>;;;;>;;;;;-;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;>;;>;;;>;;>>;>>>>>>>>>>>>>>>>>>>>>;>>>>>>>>>>>>>>>>>;>;;;;>;>;>;>>>;>>>>;;;;>;;;>;>;;;;;;>;;;>;;>;;;>;>>;>>>>;>;;>>;>;>;>;>;;;;;;>;>;>;;;>;;;>;",
-"                                                                             .......                                .         . . . .. . .. .........+...++.++++++++@+@@@@@@@@@#@######$$$$$%%%%%%%&&&&&*&&%&&&&&&*&&**&***&*******==-=--===-==================*=*==*=*=*=*============================-==-=--===-=-=-=-=--=--=-=-=-----------;--;-;--;--;---;-;-;----;--;-;-;-;;-;-;--;--;-;-;-;-;--;-;-;-;-;-;-;-;--;;-;;-;;-;-;;;;;;-;;;;;;;;;;;;;;;;>;;;;;;>;;>;;;;;;;;;;;-;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;>;;;;;;;;>;>;>>>>>>>>>>>>>>>>>;>;>;>;>;;>;;>;>>;>;;;>>>;>>>>;;;>;;;;>;;;;;;>;>;;;>;>;>;;>;>;>;>>>;>;>>>>;>;>;;>;>;;>>;>;;>;;;>;>;>;>;;",
-"                                                                             ... ...                                     . . . . . . . .. ..............+..+.+++++@++@++@@@@@@#@@@#####$$$$$$$%%%&%%&&*&&&%&&&&&&&&&*&*&**&********=====-=-====-==================*======*====*=======*==========-===-==-=====-=-=-=-=----=-=-----------------------;--;--;-;---;--;-;--;----;--;---;-;--;-;---;-;--;-;-;-;-;-;-;-;-;;--;;-;-;;;;-;-;-;;;;;;;;;;;;;;;>;;;;>;;>;;;;;>;>;;;;;;;;;;;;;;;;;-;;-;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;;;;>;>;>;;;;>;;;;;;;;>;;;;;;;;>;>;>;>;;>;;>;>;;>;>>>>;>>;>;>;>;;>;>;;>;>;>;;;;>>;;;;;;;>;;>>>>>;>>;>>;;>;;>;>>;;;;>;;>;;>;;>;;>;;;>;;;",
-"                                                                            . .... .                                        .   . . . .. ... ..........+..++.+++++++@++@@@@#@#@@######$#$#$$%$%%%%%&%&&&&**%&&&&&&*&&*&**&**********==-===-==-===-==-===-=-=====*==*=*=*===*=*==**=*=*=============-======-=--=-=-=-==-===----=-=-=---------;---;-;---;--;-;--;;--;-;--;--;-;--;--;--;-;-;---;;--;-;-;-;--;-;-;-;-;-;-;;;--;-;-;-;;;-;;;;;;;;;;;;;;;;;;;;>;;>;;;;>;;;;;>;;;;;;;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;>;;;;>;>;;>;>;;>;;;;;>;>;;;>;>;>;>;;>>;>>;>;;;;;>;;>;;>;;;;;>;>;>;>;>>;>;;;>;;;;;;;;;;;;>>;;;>;>>;>>;>>>>;>;>;>;>;>;>;>;>;;;>;>;;>;;>;;>;;>;;>>;;>;",
-"                                                                              . ....                                   .      . . . . . ... .........+...+.++.++++++++@++@@@@@@#@#@#####$$$$$%$%%%&%&&&&*&&&&&&&&*&&*&*&***&*********==-=-=-===-===-==-=====-=====*===*==*==*=*=====*===*============-==-==-==-=-=-=--=---=-=-----------------;-----;--;--;--;--;-;--;-;-;-;--;-;;-;;---;-;;-;-;;-;-;--;-;-;-;-;-;-;-;--;;;-;;;-;-;-;;-;-;-;;;;;;;;;;;;;;;;;;;>;>;;>;>;;;>;;;;;;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;>;;;;;;;;;>;;;;;>;;>;>;;>;;>;;>;>>>;>;>;>>>;;>;;>;;;>;>;>;>;>;>;;>;>;;;;>;;>>;>;>>>>>;>;;>;>;>;;>;>;>;;>;;>;>;;>;;>;;;>;;;",
-"                                                                             ........                                     . . .  . . ... . ............+..+.++.+++++@++@@+@@@@@#@##@####$#$$$$%%%%%%%&&&&**&&%&&&&&&&&&*&&*******=**====-==-=-=-=-===-==-=-=========*==*==*=*==*=*=====*==============-==-==-====-=-=-=-=----=-=----------------;-;--;--;--;--;--;-;--;---;-;-;---;--;;--;--;----;--;-;-;-;-;-;-;-;-;-;;--;;--;;;;-;-;;;;;;;;;;;;;;;;;;;;;>;>;;;;>;;;;;>;;;>;;;;;;;;;;;;-;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;>;;;;>;>;>;>;;;>;>;;;>;;;>;;>;;>;>>;;>>;>;>;;;>;;;;;>;;;;;>;;;>;;;>;;;;>;>;;>>;>>>>;>;;>;>>;>;>;>;>;>;;;>;;>;;;;>;;>;;>;;;>>;",
-"                                                                           . .........                                         .. . .   ...... ..........+.+..+.+++++++@+@@@@@@@#@########$$$$$$%%%&%&&&&&&*&&&&&&*&*&*&***&**********=-=--=-=-====-==-====-=-=====*=**==*=*=*==*==*=*====================-==-=--=-=-=-=-=-=-----=-----------------;--;--;-;-;-;-;--;-;-;;-;--;-;;-;--;-;-;-;-;;;--;-;-;-;-;-;-;-;-;-;;-;;;-;;-;-;;-;;--;-;-;;;;;;;;;;;>;;;;;;;>;;>;>;>;;>;;;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;>;;>;;>;>;;;;;;;;;;;;;;;>;;;>;;>;>;>;>;;>>>;>;>>;>;;;>;>;;;>;>;;;>;;;>;;>;>;;>;>>>>>;>;>>;>>;>;>;>;>;;>;>;;>>;;>;;>>;;>;>;>;;>>;;;",
-"                                                                            . ........ .                                    .       . ... . . .. .......+....+++++++++@++@+@@@@@@@@@#@###$##$$$%$%%%%%%&&&&&&%&%&&&&&&&&&&&&*&********==-==-=-==-=-==============*=*=*=**=*=*=**=**=*==*=*=*=========================-==-==-=====--=-=------------------------------------------------------------;------------------------;--;-;--;--;-;-;-;--;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;;--;-;-;-;-;;-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;>;;;;>;;;>;;;;;;;;;;;;;;;;;;;;;;;>;;;;;;;;;>;>;>;;>;>;;>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/usr/src/uts/intel/os/splashimage.xpm	Thu Sep 09 11:46:43 2010 -0400
@@ -0,0 +1,498 @@
+/* XPM */
+static char * isolaris_xpm[] = {
+"640 480 15 1",
+" 	c None",
+".	c #000100",
+"+	c #201A08",
+"@	c #352C0F",
+"#	c #4C3F14",
+"$	c #5F5220",
+"%	c #766220",
+"&	c #997D29",
+"*	c #C6A83F",
+"=	c #E6AF25",
+"-	c #E3BE40",
+";	c #ECCD49",
+">	c #EFD666",
+",	c #FCDE54",
+"'	c #F5E799",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+".................................................................................................................................+#%*****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************&$@................................................................................................................................",
+"................................................................................................................................%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*+..............................................................................................................................",
+"..............................................................................................................................+*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;$.............................................................................................................................",
+"..............................................................................................................................*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,@............................................................................................................................",
+".............................................................................................................................%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-............................................................................................................................",
+"............................................................................................................................+,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%...........................................................................................................................",
+"............................................................................................................................#,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*...........................................................................................................................",
+"............................................................................................................................%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,;...........................................................................................................................",
+"............................................................................................................................&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,+..........................................................................................................................",
+"............................................................................................................................&,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,...........................................................................................................................",
+"............................................................................................................................$,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-...........................................................................................................................",
+"............................................................................................................................@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&...........................................................................................................................",
+".............................................................................................................................*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,#...........................................................................................................................",
+".............................................................................................................................@,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&............................................................................................................................",
+"..............................................................................................................................%,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,-.............................................................................................................................",
+"...............................................................................................................................$;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,&..............................................................................................................................",
+"................................................................................................................................+&;,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,*$...............................................................................................................................",
+"...................................................................................................................................+#$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$@..................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+".......................................................................................................................................................................................................................................................................................................................................................................................................................@+.......................................................................................................................................................................................................................................",
+"......................................................................................................................................................................................................................................................................................................................................................................................................................+&$++.....................................................................................................................................................................................................................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................................+@&=#@.....................................................................................................................................................................................................................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................................+#==&#+....................................................................................................................................................................................................................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................................@%===%@+...................................................................................................................................................................................................................................",
+"....................................................................................................................................................................................................................................................................................................................................................................................................................+#&====#+...................................................................................................................................................................................................................................",
+"....................................................................................................................................................................................................................................................................................................................................................................................................................@#-----&@+..................................................................................................................................................................................................................................",
+"...................................................................................................................................................................................................................................................................................................................................................................................................................+@&------#+..........++@.....................................................................................................................................................................................................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................++@@+++.......+#*;-;;-;&@+.......+@@%&+....................................................................................................................................................................................................................",
+"....................................................................................................................................................................................................................................................................................................................................................................................................+&&&%##@@++...+@%;;;;;;;*#+....++@@$&=&+....................................................................................................................................................................................................................",
+"....................................................................................................................................................................................................................................................................................................................................................................................................+#=====&%#@@+++@*;;;;;;;;%@+.++@#$&===%@....................................................................................................................................................................................................................",
+"....................................................................................................................................................................................................................................................................................................................................................................................................+@%====--*&$@++#;-*****-;*@++@#%*-====$+....................................................................................................................................................................................................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................+#*==---;;-*%@#$##$$$$$%&@@$&-;;--===#+....................................................................................................................................................................................................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................+@%=--;;;;;-%@@#$%&&&&%#@@#*;;;;;--=*#+.......................................................................................................................................................#$%&%$#....................#%%&%$#@..........................",
+"......................................................................................................................................................................................................................................................................................................................................................................................................+#--;;;;;&#@#&*========&%##&;;;;;--&@.......................*----*......@-----%................*----*................*----*..........@----&......%-------@............%------@............%*,,,,,,,,,*%..............+&;,,,,,,,,,*%.......................",
+"......................................................................................................................................................................................................................................................................................................................................................................................................+@&-;;;;&##%===---------=*%$%;;;;--#@.......................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,,,,&............;,,,,,,#..........%;,,,,,,,,,,,,,-$...........$;,,,,,,,,,,,,&.......................",
+".......................................................................................................................................................................................................................................................................................................................................................................................................@$;;;;%##&===-->>>>>>>>--=&$%;;;;*#+.......................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,,,,-...........#,,,,,,,#.........*,,,,,,,,,,,,,,,,,&.........$,,,,,,,,,,,,,,&.......................",
+".......................................................................................................................................................................................................................................................................................................................................................................................................+#*;;%##*===->>>''''''>>>-=&$&;;;%@........................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,,,,,@..........&,,,,,,,#........*,,,,,,*%##$&-,,,,,,*.......+;,,,,,*$##%&*,,&.......................",
+".......................................................................................................................................................................................................................................................................................................................................................................................................+@%;&##&==-->>''''''''''>>-=%$&;-#+........................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,,,,,&..........;,,,,,,,#.......&,,,,,,%.......%,,,,,,&......%,,,,,&.......+%%.......................",
+"........................................................................................................................................................................................................................................................................................................................................................................................................+@*##&===->>>'''''''''''>-==%#-&@+........................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,,,,,-.........#,,,,,,,,#......$,,,,,,#.........$,,,,,,#.....*,,,,;..................................",
+".......................................................................................................................................................................................................................................................................................................................................................................................................++@@@#===-;>>''''''''''''>>-=&#&#++........................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,,,,,,#........&,,,,,,,,#......-,,,,,%...........&,,,,,*.....-,,,,-..................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................++@@#+@&==--;>>'''''''''''''>-==$@@+++.......................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,*,,,,&........,,,*,,,,,#.....$,,,,,-.............;,,,,,#....-,,,,,@.................................",
+"...................................................................................................................................................................................................................................................................................................................................................................................................+@@#%**@#===-;>>''''''''''''''>--=&@$$@@++.....................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,$,,,,;.......$,,,%,,,,,#.....*,,,,,%.............&,,,,,&....*,,,,,*+................................",
+".................................................................................................................................................................................................................................................................................................................................................................................................++@#&-;;%@%==-;;>>''''''''''''''>>-==#%;*&#@@++..................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,.,,,,,#......*,,,+,,,,,#.....;,,,,,+.............@,,,,,;....%,,,,,,;$...............................",
+"................................................................................................................................................................................................................................................................................................................................................................................................+@#&--;;;$#&==-;;>>''''''''''''''>>-==$#;;;-&$#@++................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,.*,,,,&.....+,,,&.,,,,,#....@,,,,,;...............,,,,,,+....-,,,,,,,&+.............................",
+"..............................................................................................................................................................................................................................................................................................................................................................................................+@#%==--;;;$#&==-;;>>>''''''''''''>>;-==%$-;;;-=*%#@+...............;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,.$,,,,;.....%,,,#.,,,,,#....$,,,,,*...............*,,,,,#....#,,,,,,,,,&............................",
+"..............................................................................................................................................................................................................................................................................................................................................................................................+#&===-;;;-$#===-;;>>>''''''''''''>>--==%$-;;;-=====&@..............;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,..,,,,,#....*,,;..,,,,,#....%,,,,,&...............*,,,,,$.....#,,,,,,,,,-#..........................",
+".............................................................................................................................................................................................................................................................................................................................................................................................+$=====-;;;*$#===-;;;>>'''''''''''>>;;-==%$*;;;--===&#+..............;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,..&,,,,&...+,,,&..,,,,,#....%,,,,,&...............&,,,,,%......#-,,,,,,,,,&.........................",
+".............................................................................................................................................................................................................................................................................................................................................................................................+%&&===-;;;-##&==-;;;>>>'''''''''>>>;--==%$-;;;-===%@+...............;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,..$,,,,;...%,,,#..,,,,,#....%,,,,,&...............&,,,,,$........&,,,,,,,,,*........................",
+"..............................................................................................................................................................................................................................................................................................................................................................................................+@@#%*--;;-##&==-;;;;>>>>'''''>>>>;;-===$$;;;--=*$@+................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,...;,,,,$..-,,;...,,,,,#....$,,,,,&...............*,,,,,$.........@*,,,,,,,,*.......................",
+"...............................................................................................................................................................................................................................................................................................................................................................................................++@@#%*-;;$@%==--;;;;>>>>>>>>>>>;;;-===#$;;;-*%#@+.................;,,,,-......@,,,,,&................;,,,,*................;,,,,*..........@,,,,*......&,,,,...&,,,,&.@,,,&...,,,,,#....$,,,,,*...............*,,,,,#...........$;,,,,,,,&......................",
+"..................................................................................................................................................................................................................................................................................................................................................................................................++@#$&-%@#===-;;;;;>>>>>>>>>;;;;-==&#&;-&$#@+...................;,,,,-......@,,,,,&................;,,,,*................;,,,,-..........#,,,,*......&,,,,...#,,,,,.&,,,@...,,,,,#....@,,,,,;...............,,,,,,+.............&,,,,,,,+.....................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................++@@#+@&==--;;;;;;,>>>;;;;;;-===%@&&#@@+.....................;,,,,-......@,,,,,&................;,,,,*................*,,,,,..........$,,,,*......&,,,,....;,,,,$;,,*....,,,,,#.....;,,,,,@.............#,,,,,-...............%,,,,,,$.....................",
+".......................................................................................................................................................................................................................................................................................................................................................................................................+++@@$===-;;;;;;;;;;;;;;;--==*@@@@++.......................;,,,,-......@,,,,,&................;,,,,*................*,,,,,..........%,,,,&......&,,,,....&,,,,-,,,%....,,,,,#.....*,,,,,&.............&,,,,,&................*,,,,,%.....................",
+".......................................................................................................................................................................................................................................................................................................................................................................................................++$*@#&===-;;;;;;;;;;;;;;-===$@$@+.........................;,,,,-......@,,,,,&................;,,,,*................&,,,,,@.........&,,,,&......&,,,,....#,,,,,,,,+....,,,,,#.....#,,,,,;............+;,,,,,#................&,,,,,&.....................",
+".......................................................................................................................................................................................................................................................................................................................................................................................................+@&;$@#====--;;;;;;;;;;--===&#$;#+.........................;,,,,-......@,,,,,&................;,,,,*................%,,,,,&.........-,,,,$......&,,,,.....;,,,,,,*.....,,,,,#......*,,,,,&...........&,,,,,*.................&,,,,,%.....................",
+".......................................................................................................................................................................................................................................................................................................................................................................................................+#-;*$@#====---;;;;;;--====&##*;&@+........................;,,,,-......@,,,,,&................;,,,,*................@,,,,,;........#,,,,,+......&,,,,.....&,,,,,,%.....,,,,,#......#,,,,,,%.........%,,,,,,#.................*,,,,,#.....................",
+"......................................................................................................................................................................................................................................................................................................................................................................................................+@%;;;*#@#*====-------=====&##&;;-#+........................;,,,,-......@,,,,,&++++++++++++....;,,,,*++++++++++++.....*,,,,,*+.....#;,,,,*.......&,,,,.....#,,,,,,+.....,,,,,#.......&,,,,,,&.......&,,,,,,%......-*%+.......&,,,,,-......................",
+"......................................................................................................................................................................................................................................................................................................................................................................................................+#*;;;;&#@#&==============%##&;;;;%@+.......................;,,,,-......@,,,,,,,,,,,,,,,,,,....;,,,,,,,,,,,,,,,,,#....+;,,,,,;*&$&*,,,,,,@.......&,,,,......;,,,,*......,,,,,#........*,,,,,,;&%$%*,,,,,,,&.......-,,,*&&$%&;,,,,,,$......................",
+"......................................................................................................................................................................................................................................................................................................................................................................................................@$--;;;;*#@@#&=========*%##$*;;;;-*#+.......................;,,,,-......@,,,,,,,,,,,,,,,,,,....;,,,,,,,,,,,,,,,,,#.....@;,,,,,,,,,,,,,,,$........&,,,,......&;;;;$......,,,,,#.........&,,,,,,,,,,,,,,,,,%........-,,,,,,,,,,,,,,,%.......................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................+@&---;;;;*$@+@#%&&&&&%#@@@$*;;;;--=$@.......................;,,,,-......@,,,,,,,,,,,,,,,,,,....;,,,,,,,,,,,,,,,,,#......+*,,,,,,,,,,,,-#.........&,,,,..................,,,,,#..........#*,,,,,,,,,,,,,*#.........-,,,,,,,,,,,,,;$........................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................+#*=---;;;;-#+@@@#####@@+@&;;;;;---=&@+......................&****&......+******************....******************@........#*,,,,,,,,-%...........$****..................*****@............$&;,,,,,,,;&#...........%*;,,,,,,,,,*%..........................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................+#===----*%@@@*&%$$$$$%&$+@%*;;---===#@.......................................................................................@$$$$#+.........................................................@#$$$#+.................+@#$$$$#.............................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................@$====*&$#@++@&;;;;--;;-#++@#$&--====&@+...................................................................................................................................................................................................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................@%==*%#@@+...+$-;;;;;;;&@+.++@@#%&*===$+...................................................................................................................................................................................................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................+&=%#@++.....+#*;;;;;;;%@.....++@@##$%&+...................................................................................................................................................................................................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................+&#@++........@%------*#+........++++++....................................................................................................................................................................................................................",
+"......................................................................................................................................................................................................................................................................................................................................................................................................++...........+#*-----%@+..................................................................................................................................................................................................................................",
+"....................................................................................................................................................................................................................................................................................................................................................................................................................@%====*#+...................................................................................................................................................................................................................................",
+"....................................................................................................................................................................................................................................................................................................................................................................................................................+#*===&@+...................................................................................................................................................................................................................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................................@$===$@....................................................................................................................................................................................................................................",
+".....................................................................................................................................................................................................................................................................................................................................................................................................................+@%=*#+....................................................................................................................................................................................................................................",
+"......................................................................................................................................................................................................................................................................................................................................................................................................................+@&&@+....................................................................................................................................................................................................................................",
+".......................................................................................................................................................................................................................................................................................................................................................................................................................+#&+.....................................................................................................................................................................................................................................",
+"........................................................................................................................................................................................................................................................................................................................................................................................................................++......................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................",
+"................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................"};
--- a/usr/src/uts/sparc/Makefile.sparc.shared	Wed Aug 18 15:52:48 2010 -0600
+++ b/usr/src/uts/sparc/Makefile.sparc.shared	Thu Sep 09 11:46:43 2010 -0400
@@ -233,7 +233,6 @@
 
 $(CLOSED_BUILD)CLOSED_DRV_KMODS	+= glm
 $(CLOSED_BUILD)CLOSED_DRV_KMODS	+= isp
-$(CLOSED_BUILD)CLOSED_DRV_KMODS	+= llc2
 $(CLOSED_BUILD)CLOSED_DRV_KMODS	+= mpt
 $(CLOSED_BUILD)CLOSED_DRV_KMODS += qus
 $(CLOSED_BUILD)CLOSED_DRV_KMODS	+= se