/*
* 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
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
*/
/*
* Just in case we're not in a build environment, make sure that
* TEXT_DOMAIN gets set to something.
*/
#if !defined(TEXT_DOMAIN)
#endif
/*
* Return the values of runtime parameters stored in
* /etc/lvm/runtime.cf, converting them to data
* types appropriate for use by functions whose behavior
* is affected by those values.
*/
/*
* system include files
*/
#include <libintl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
/*
* SUNWmd include files
*/
#include <meta.h> /* for MDD_DOMAIN */
#include <meta_runtime.h> /* external interface definition */
#include <sdssc.h>
/*
* The following lines define the runtime parameter configuration file.
*/
/*
* The runtime parameter configuration file is an ascii text file.
* Each text line in the file has a maximum length of 80 four-byte
* wide characters. The line buffer size defined below accomodates
* the maximum line length plus the newline character at the end of
* the line and the null character that fgets() adds at the end of
* the line when it writes the line to the buffer.
*/
/*
* The format for parameter entries in the file is "name=value".
* Each "name=value" string must begin a line of the file.
* The "name" and "value" tokens may be preceded or followed by
* spaces. Lines beginning with "#" are comment lines.
*/
/*
* If a runtime parameter that can be set in the file is not set,
* or is set to an invalid value, or if the file can't be opened,
* the parameter takes on the default value given in the comments
* below.
*/
/*
* The following string constant declarations name the runtime
* configuration parameters that can be set in the runtime parameter
* configuration file. The allowed values of parameters that
* range over small sets of discrete values are also declared below
* as string constants.
*
* CAUTION: When adding new runtime parameters to the runtime
* parameter configuration file, declare their names
* as string constants below, and check for conflicts
* with the names of existing parameters.
*/
/*
* allowed values:
*/
/*
* The "ownerioctls" parameter controls whether the metaset -t and
* metaset -r commands issue the MHIOCTKOWN, MHIOCRELEASE, and
* MHIOCENFAILFAST ioctls when taking or releasing ownership of disksets.
* The allowed parameter values are "on" and "off".
*
* If the line "ownerioctls=off" appears in the runtime configuration file,
* the metaset -t command doesn't issue the MHIOCTKOWN ioctl when taking
* ownership of disksets, and the metaset -r command doesn't issue the
* MHIOCRELEASE and MHIOCENFAILFAST ioctls when releasing ownership of
* disksets.
*
* If the line "ownerioctls=on" appears in the file, the metaset -t
* command issues the MHIOCTKOWN ioctl when taking ownership of disksets,
* and the metaset -r command issues the MHIOCRELEASE AND MHIOCENFAILFAST
* icotls when releasing ownership of disksets.
*
* The default value of "ownerioctls" is "on".
*/
/*
* The following lines make forward declarations of private functions.
*/
static
char *
/*
* The following lines define public functions.
*/
do_owner_ioctls(void)
{
char *param_valuep;
/*
* If we're bound to a cluster machine never do ioctls.
* The SC3.0 cluster code will always deal with disk
* reservation.
*/
} else {
if (param_valuep != NULL) {
} else if (strcmp(param_valuep,
ownerioctls_onp) != 0) {
"%s: illegal value for %s: %s.\n"),
"%s: illegal value for %s: %s.\n"),
}
}
}
return (return_value);
}
/*
* Retrieve the verbosity level for rpc.mdcommd from the config file.
* If none is specified, don't print a warning and return 0
*/
commd_get_verbosity(void)
{
char *param_valuep;
if (param_valuep != NULL) {
}
return (retval);
}
/*
* Retrieve the debug output file for rpc.mdcommd from the config file.
* If none is specified, don't print a warning.
* Note that if returning non-NULL, the caller is responsible for freeing
* the result pointer.
*/
char *
commd_get_outfile(void)
{
}
/*
* This controls what type of RPC errors are sent to syslog().
* It is used as a bitmask against the clnt_stat list, which defines
* 0 as RPC_SUCCESS, so likely shouldn't be set.
*
* The #define below provides a default of all errors in the list.
* The default can then be modified to reduce the amount of traffic
* going to syslog in the event of RPC errors.
*/
meta_rpc_err_mask(void)
{
char *param_valuep;
if (param_valuep != NULL) {
}
return (retval);
}
/*
* The "disk_devid_check" parameter controls how disks are identified
* between the nodes when added to a disk set.
*
* By default "disk_devid_check=on" (or not set) a corresponding disk is
* located on the remote node by searching for the local disks device id.
* If no device id is available we fall back to using either the EFI device
* id or the dev_t and device time stamp for VTOC disks.
*
* When "disk_devid_check" is defined and not set to "on" only the fall back
* method is used. For this method to work device names must be constant
* between all nodes.
*/
disk_do_devid_check(void)
{
char *param_valuep;
if (param_valuep != NULL) {
}
}
return (return_value);
}
/*
* The following lines define private functions
*/
static char *
{
if (line_bufferp == NULL) {
"%s: malloc failed\n"), function_namep);
return (param_valuep);
}
if (param_filep == NULL) {
return (param_valuep);
}
(param_valuep == NULL)) {
*newlinep = '\0';
}
if ((param_name_tokenp != NULL) &&
}
if (param_value_tokenp != NULL) {
if (param_valuep == NULL) {
"%s: strdup failed\n"),
"%s: strdup failed\n"),
(void) fclose(param_filep);
return (param_valuep);
}
}
}
"%s: value of %s not set or error in %s\n"),
"%s: value of %s not set or error in %s\n"),
}
(void) fclose(param_filep);
return (param_valuep);
}