Sun Microsystems, Inc.
   www.sun.com docs.sun.com | | |  
   
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  
    
 
Sun Cluster HA and Data Servicesscha_strerror(3HA)


NAME

 scha_strerror - map error code to error message

SYNOPSIS

 
cc [flags...]-I /usr/cluster/include file -L /usr/cluster/lib -l scha
#include <scha.h>
char *scha_strerror(scha_err_t err_code);

DESCRIPTION

 

The scha_strerror() routine translates the given scha_err_t error code to an appropriate, but terse, error message. The char* string returned by this routine is not internationalized, as its return value is to be used by the resource type implementation for logging to the system log facility, syslog(3c).


RETURN VALUES

 

The following return value is supported:

const char
String describing the meaning of the error_code.

EXAMPLES

 Example 1. Using the scha_strerror() Routine
 
 
sample()
{
      scha_err_t  err;

      char * resource_group = "example_RG";   /* resource group containing example_R */
      char * resource_name = "example_R";     /* a configured resource */
      
      err = scha_control(SCHA_GIVEOVER, resource_group, resource_name);
      
      if (err != SCHA_ERR_NOERR) {
      	syslog(LOG_ERR, "scha_control GIVEOVER failed: %s", 
             scha_strerror(err));
      }
}

FILES

 
/usr/cluster/include/scha.h
include file
/usr/cluster/lib/libscha.so
library

ATTRIBUTES

 

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWscdev
Interface StabilityEvolving

SEE ALSO

 

scha_calls(3HA), syslog(3c), attributes(5)



Sun Cluster 3.1Go To TopLast Changed 22 August 2002

 
      
      
Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.