/*
* 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
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* RCM module for managing the OS Quiesce event (SUNW_OS) in a
* clustered environment.
*/
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <thread.h>
#include <synch.h>
#include <assert.h>
#include <errno.h>
#include <libintl.h>
#include "rcm_module.h"
static int cluster_register(rcm_handle_t *);
static int cluster_unregister(rcm_handle_t *);
char **, char **, nvlist_t *, rcm_info_t **);
char **, rcm_info_t **);
char **, rcm_info_t **);
char **, rcm_info_t **);
char **, rcm_info_t **);
static int cluster_SUNW_os_registered = 0;
{
NULL,
NULL,
};
struct rcm_mod_ops *
{
return (&cluster_ops);
}
const char *
{
return (gettext("RCM Cluster module 1.3"));
}
int
{
return (RCM_SUCCESS);
}
static int
{
int bootflags;
return (RCM_SUCCESS);
gettext("unable to check cluster status\n"));
return (RCM_FAILURE);
}
/* attempt to determine if we are in cluster mode */
if (bootflags & CLUSTER_BOOTED) {
RCM_SUCCESS) {
gettext("failed to register\n"));
return (RCM_FAILURE);
} else {
"\n");
}
}
return (RCM_SUCCESS);
}
static int
{
if (cluster_SUNW_os_registered) {
RCM_SUCCESS) {
gettext("failed to unregister"));
}
}
return (RCM_SUCCESS);
}
/*ARGSUSED*/
static int
{
return (RCM_SUCCESS);
}
/*ARGSUSED*/
static int
{
return (RCM_FAILURE);
}
/*ARGSUSED*/
static int
{
return (RCM_SUCCESS);
}
/*
* By default, reject offline. If offline request is
* forced, attempt to relocate the cluster device.
*/
/*ARGSUSED*/
static int
{
return (RCM_FAILURE);
}
/*ARGSUSED*/
static int
{
return (RCM_SUCCESS);
}
/*ARGSUSED*/
static int
{
return (RCM_FAILURE);
}