/*
* 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
/*
* print metedevice errors
*/
#include <meta.h>
#include <syslog.h>
/*
* clear error
*/
void
)
{
}
/*
* cook names
*/
static char *
)
{
char *name;
/* get name, or fake it */
MD_MIN2UNIT(mnum));
}
}
static char *
)
{
char *name;
/* get name or fake it */
meta_getminor(dev));
}
}
static char *
)
{
char *name;
}
}
static char *
)
{
if (setno == MD_SET_BAD)
return (NULL);
mdclrerror(&xep);
}
}
/*
* fill in all the appropriate md_error_t fields
*/
static void
char *name /* optional name or host */
)
{
/* get host name */
}
} else
/* get appropriate name */
}
} else {
/* can't do anything about these */
case MDEC_VOID:
case MDEC_SYS:
case MDEC_RPC:
default:
break;
/* device name */
case MDEC_DEV:
{
break;
}
/* device name */
case MDEC_USE:
{
"unknown"));
}
break;
}
/* metadevice name */
case MDEC_MD:
{
break;
}
/* component name */
case MDEC_COMP:
{
break;
}
/* hotspare pool name */
case MDEC_HSP:
{
break;
}
/* hotspare name */
case MDEC_HS:
{
break;
}
/* mddb name */
case MDEC_MDDB:
{
break;
}
/* set name */
case MDEC_DS:
{
break;
}
}
}
}
/*
* simple error
*/
int
md_error_t *ep,
char *name
)
{
mdclrerror(ep);
return (-1);
}
/*
* system error
*/
int
md_error_t *ep,
int errnum,
char *name
)
{
mdclrerror(ep);
if (errnum != 0) {
}
return (-1);
}
/*
* RPC error
*/
int
md_error_t *ep,
char *host,
char *extra
)
{
mdclrerror(ep);
return (-1);
}
/*
* RPC create error
*/
int
md_error_t *ep,
char *host,
char *extra
)
{
mdclrerror(ep);
return (-1);
}
/*
* device error
*/
int
md_error_t *ep,
char *name
)
{
mdclrerror(ep);
return (-1);
}
/*
* use error
*/
int
md_error_t *ep,
char *where,
char *name
)
{
mdclrerror(ep);
return (-1);
}
/*
* overlap error
*/
int
md_error_t *ep,
char *name,
char *where,
char *overlap
)
{
mdclrerror(ep);
return (-1);
}
/*
* metadevice error
*/
int
md_error_t *ep,
char *name
)
{
mdclrerror(ep);
return (-1);
}
/*
* component error
*/
int
md_error_t *ep,
char *name
)
{
mdclrerror(ep);
return (-1);
}
/*
* hotspare pool error
*/
int
md_error_t *ep,
char *name
)
{
mdclrerror(ep);
return (-1);
}
/*
* hotspare error
*/
int
md_error_t *ep,
char *name
)
{
mdclrerror(ep);
return (-1);
}
/*
* MDDB error
*/
int
md_error_t *ep,
char *name
)
{
mdclrerror(ep);
return (-1);
}
/*
* metadevice diskset (ds) error
*/
int
md_error_t *ep,
char *node,
char *drive,
char *name
)
{
mdclrerror(ep);
return (-1);
}
/*
*/
void
md_error_t *ep,
char *extra
)
{
else
}
/*
* steal (copy) an error code safely
*/
int
md_error_t *to,
)
{
mdclrerror(to);
return (-1);
}
/*
* do an ioctl, cook the error, and return status
*/
int
int cmd,
void *data,
md_error_t *ep,
char *name
)
{
int fd;
/* open admin device */
return (-1);
/* do ioctl */
mdclrerror(ep);
return (-1);
}
/* return success */
return (0);
}
/*
* print void class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
case MDE_NONE:
break;
case MDE_UNIT_NOT_FOUND:
break;
case MDE_DUPDRIVE:
break;
case MDE_INVAL_HSOP:
break;
case MDE_NO_SET:
break;
case MDE_SET_DIFF:
break;
case MDE_BAD_RD_OPT:
break;
case MDE_BAD_WR_OPT:
break;
case MDE_BAD_PASS_NUM:
break;
case MDE_BAD_RESYNC_OPT:
break;
case MDE_BAD_INTERLACE:
break;
case MDE_NO_HSPS:
break;
case MDE_NOTENOUGH_DB:
"must have at least 1 database (-f overrides)"));
break;
case MDE_DELDB_NOTALLOWED:
"cannot delete the last database replica in the diskset"));
break;
"Deleting specified valid replicas results in stale "
"state database. Configuration changes with stale "
"database result in panic(-f overrides)"));
break;
case MDE_SYSTEM_FILE:
break;
case MDE_MDDB_FILE:
break;
case MDE_MDDB_CKSUM:
break;
case MDE_VFSTAB_FILE:
break;
case MDE_NOSLICE:
"invalid slice number for drive name"));
break;
case MDE_SYNTAX:
break;
case MDE_OPTION:
break;
case MDE_TAKE_OWN:
break;
case MDE_NOT_DRIVENAME:
break;
case MDE_RESERVED:
break;
case MDE_DVERSION:
break;
case MDE_MVERSION:
"metadevice state database version mismatch"));
break;
case MDE_TESTERROR:
break;
case MDE_BAD_ORIG_NCOL:
break;
case MDE_RAID_INVALID:
"devices were not RAIDed previously or "
"are specified in the wrong order"));
break;
case MDE_MED_ERROR:
break;
case MDE_TOOMANYMED:
"too many mediator hosts requested"));
break;
case MDE_NOMED:
break;
case MDE_ONLYNODENAME:
"only the nodename of a host is required for deletes"));
break;
case MDE_RAID_BAD_PW_CNT:
"simultaneous writes out of range"));
break;
case MDE_DEVID_TOOBIG:
"relocation information size is greater than reported"));
break;
case MDE_NOPERM:
"Permission denied. You must have root privilege "
"to execute this command."));
break;
case MDE_NODEVID:
"Device relocation information not available "
"for this device"));
break;
case MDE_NOROOT:
break;
case MDE_EOF_TRANS:
break;
case MDE_NOT_MN:
"option only valid within a multi-owner set"));
break;
case MDE_ABR_SET:
"Invalid command for mirror with ABR set"));
break;
case MDE_INVAL_MNOP:
"Invalid operation on multi-owner set"));
break;
case MDE_MNSET_NOTRANS:
"Trans metadevice not supported on multi-owner set"));
break;
case MDE_MNSET_NORAID:
"RAID-5 metadevice not supported on multi-owner set"));
break;
case MDE_FORCE_DEL_ALL_DRV:
"Must specify -f option to delete all drives from set"));
break;
case MDE_STRIPE_TRUNC_SINGLE:
"The necessary rounding would result in data loss. "
"You can avoid this by concatenating additional devices "
"totaling at least %s blocks, or by increasing the size "
"of the specified component by exactly %s blocks."),
break;
"The necessary rounding would result in data loss. "
"You can avoid this by concatenating additional devices "
break;
case MDE_SMF_FAIL:
break;
case MDE_SMF_NO_SERVICE:
"service(s) not online in SMF"));
break;
case MDE_AMBIGUOUS_DEV:
"Specify complete path to avoid ambiguity."));
break;
case MDE_NAME_IN_USE:
"Name already in use for metadevice or hot spare pool."));
break;
case MDE_NAME_ILLEGAL:
"Invalid name for metadevice or hot spare pool."));
break;
case MDE_ZONE_ADMIN:
"Volume administration unavailable within non-global zones."));
break;
case MDE_MISSING_DEVID_DISK:
"device id does not exist."));
break;
default:
break;
}
return (buf);
}
/*
* print sys class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
char *emsg;
} else {
}
return (buf);
}
/*
* print RPC class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
return (buf);
}
/*
* print dev class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
case MDE_INVAL_HS:
break;
case MDE_FIX_INVAL_STATE:
"cannot enable hotspared device"));
break;
case MDE_FIX_INVAL_HS_STATE:
"hotspare isn't broken, can't enable"));
break;
case MDE_NOT_META:
break;
case MDE_IS_DUMP:
break;
case MDE_IS_META:
break;
case MDE_IS_SWAPPED:
break;
case MDE_NAME_SPACE:
break;
case MDE_IN_SHARED_SET:
break;
case MDE_NOT_IN_SET:
break;
case MDE_NOT_DISK:
break;
case MDE_CANT_CONFIRM:
break;
case MDE_INVALID_PART:
break;
case MDE_HAS_MDDB:
"has a metadevice database replica"));
break;
case MDE_NO_DB:
"no metadevice database replica on device"));
break;
case MDE_CANTVERIFY_VTOC:
break;
case MDE_NOT_LOCAL:
break;
case MDE_DEVICES_NAME:
break;
case MDE_REPCOMP_INVAL:
"replica slice is not usable as a metadevice component"));
break;
case MDE_REPCOMP_ONLY:
"only replica slice is usable for a diskset "
"database replica"));
break;
case MDE_INV_ROOT:
"invalid root device for this operation"));
break;
case MDE_MULTNM:
"multiple entries for device in Solaris Volume Manager "
"configuration"));
break;
case MDE_TOO_MANY_PARTS:
"Disks with more than %d partitions are not supported "
"in Solaris Volume Manager"), MD_MAX_PARTS);
break;
case MDE_REPART_REPLICA:
"cannot repartition a slice with an existing replica"));
break;
case MDE_DISKNAMETOOLONG:
"disk name is too long with device ids disabled "
"for md_devid_destroy, remove it and reboot"));
break;
default:
break;
}
return (buf);
}
/*
* print overlap class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
case MDE_OVERLAP_MOUNTED:
"overlaps with %s which is mounted as \'%s\'"),
break;
case MDE_OVERLAP_SWAP:
break;
case MDE_OVERLAP_DUMP:
break;
default:
break;
}
return (buf);
}
/*
* print use class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
case MDE_IS_MOUNTED:
break;
case MDE_ALREADY:
/*
* when the object of the error (existing device that
* would being used by SVM) is the metadb then it is necessary
* to explicitly specify the string in the error message so
* that it can be successfully localized for the Asian locales.
*/
"has appeared more than once in the "
} else {
"has appeared more than once in the "
"specification of " MDB_STR));
}
break;
case MDE_OVERLAP:
/*
* when the object of the error (existing device that
* would overlap) is the metadb then it is necessary
* to explicitly specify the string in the error message so
* that it can be successfully localized for the Asian locales.
*/
} else {
MDB_STR));
}
break;
case MDE_SAME_DEVID:
/*
* when the object of the error (existing device in the
* metaconfiguration that has the same devid)
* is the metadb then it is necessary
* to explicitly specify the string in the error message so
* that it can be successfully localized for the Asian locales.
*/
} else {
"identical devid detected in " MDB_STR));
}
break;
default:
break;
}
return (buf);
}
/*
* print md class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
case MDE_INVAL_UNIT:
break;
case MDE_UNIT_NOT_SETUP:
break;
case MDE_UNIT_ALREADY_SETUP:
break;
case MDE_NOT_MM:
break;
case MDE_IS_SM:
break;
case MDE_IS_OPEN:
break;
case MDE_C_WITH_INVAL_SM:
"attempted to clear mirror with submirror(s) "
"in invalid state"));
break;
case MDE_RESYNC_ACTIVE:
break;
case MDE_LAST_SM_RE:
"attempt to replace a component on the last "
"running submirror"));
break;
case MDE_MIRROR_FULL:
"mirror has maximum number of submirrors"));
break;
case MDE_IN_UNAVAIL_STATE:
"component is in unavailable state; run 'metastat -i'"));
break;
case MDE_IN_USE:
"metadevice in use"));
break;
case MDE_SM_TOO_SMALL:
break;
case MDE_NO_LABELED_SM:
"can't attach labeled submirror to an unlabeled mirror"));
break;
case MDE_SM_OPEN_ERR:
break;
case MDE_CANT_FIND_SM:
break;
case MDE_LAST_SM:
"attempt to detach last running submirror"));
break;
case MDE_NO_READABLE_SM:
"operation would result in no readable submirrors"));
break;
case MDE_SM_FAILED_COMPS:
"attempt an operation on a submirror "
"that has erred components"));
break;
case MDE_ILLEGAL_SM_STATE:
"attempt operation on a submirror in illegal state"));
break;
case MDE_RR_ALLOC_ERROR:
"attach failed, unable to allocate new resync info"));
break;
case MDE_MIRROR_OPEN_FAILURE:
break;
break;
case MDE_GROW_DELAYED:
break;
case MDE_NOT_MT:
break;
case MDE_HS_IN_USE:
"can't modify hot spare pool, hot spare in use"));
break;
case MDE_HAS_LOG:
break;
case MDE_UNKNOWN_TYPE:
break;
case MDE_NOT_STRIPE:
break;
case MDE_NOT_RAID:
break;
case MDE_NROWS:
break;
case MDE_NCOMPS:
break;
case MDE_NSUBMIRS:
break;
case MDE_BAD_STRIPE:
break;
case MDE_BAD_MIRROR:
break;
case MDE_BAD_TRANS:
break;
case MDE_BAD_RAID:
break;
case MDE_RAID_OPEN_FAILURE:
break;
case MDE_RAID_THREAD_FAILURE:
"attempt to start resync thread failed"));
break;
case MDE_RAID_NEED_FORCE:
"operation requires -f (force) flag"));
break;
case MDE_NO_LOG:
break;
case MDE_RAID_DOI:
break;
case MDE_RAID_LAST_ERRED:
"in Last Erred state, "
"errored components must be replaced"));
break;
case MDE_RAID_NOT_OKAY:
"all components must be Okay to perform this operation"));
break;
case MDE_RENAME_BUSY:
"metadevice is temporarily too busy for renames"));
break;
case MDE_RENAME_SOURCE_BAD:
"source metadevice is not able to be renamed"));
break;
case MDE_RENAME_TARGET_BAD:
"target metadevice is not able to be renamed"));
break;
"target metadevice is not related to source metadevice"));
break;
case MDE_RENAME_CONFIG_ERROR:
"metadevice driver configuration error; "
"rename can't occur"));
break;
case MDE_RENAME_ORDER:
"units may not be renamed in that order"));
break;
case MDE_RECOVER_FAILED:
break;
case MDE_SP_NOSPACE:
"not enough space available for request"));
break;
case MDE_SP_BADWMREAD:
break;
case MDE_SP_BADWMWRITE:
break;
case MDE_SP_BADWMMAGIC:
break;
case MDE_SP_BADWMCRC:
break;
case MDE_NOT_SP:
break;
case MDE_SP_OVERLAP:
break;
case MDE_SP_BAD_LENGTH:
break;
case MDE_SP_NOSP:
break;
case MDE_UNIT_TOO_LARGE:
break;
case MDE_LOG_TOO_LARGE:
"Trans log size must be less than 1 TByte"));
break;
default:
break;
}
return (buf);
}
/*
* print comp class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
case MDE_CANT_FIND_COMP:
"can't find component in unit"));
break;
case MDE_REPL_INVAL_STATE:
"component in invalid state to replace - "
"Replace \"Maintenance\" components first"));
break;
case MDE_COMP_TOO_SMALL:
"replace failure, new component is too small"));
break;
case MDE_COMP_OPEN_ERR:
break;
case MDE_RAID_COMP_ERRED:
"must replace errored component first"));
break;
case MDE_MAXIO:
"maxtransfer is too small"));
break;
case MDE_SP_COMP_OPEN_ERR:
"error opening device under soft partition. Check"
" device status, then use metadevadm(1M)."));
break;
default:
break;
}
return (buf);
}
/*
* print hsp class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
case MDE_HSP_CREATE_FAILURE:
"hotspare pool database create failure"));
break;
case MDE_HSP_IN_USE:
"hotspare pool in use"));
break;
case MDE_INVAL_HSP:
"invalid hotspare pool"));
break;
case MDE_HSP_BUSY:
"hotspare pool is busy"));
break;
case MDE_HSP_REF:
"hotspare pool is referenced"));
break;
case MDE_HSP_ALREADY_SETUP:
"hotspare pool is already setup"));
break;
case MDE_BAD_HSP:
"invalid hotspare pool configuration"));
break;
case MDE_HSP_UNIT_TOO_LARGE:
"units in the hotspare pool cannot exceed 1 TByte"));
break;
default:
break;
}
return (buf);
}
/*
* print hs class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
case MDE_HS_RESVD:
"hotspare is in use"));
break;
case MDE_HS_CREATE_FAILURE:
"hotspare database create failure"));
break;
case MDE_HS_INUSE:
"add or replace failed, hot spare is already in use"));
break;
case MDE_HS_UNIT_TOO_LARGE:
"hotspare size cannot exceed 1 TByte"));
break;
default:
break;
}
return (buf);
}
/*
* print mddb class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
case MDE_TOOMANY_REPLICAS:
"%d metadevice database replicas is too many; the maximum is %d"),
break;
case MDE_REPLICA_TOOSMALL:
"device size %d is too small for metadevice database replica"),
break;
case MDE_NOTVERIFIED:
"data not returned correctly from disk"));
break;
case MDE_DB_INVALID:
"invalid argument"));
break;
case MDE_DB_EXISTS:
"metadevice database replica exists on device"));
break;
case MDE_DB_MASTER:
"has bad master block on device"));
break;
case MDE_DB_TOOSMALL:
"device is too small"));
break;
case MDE_DB_NORECORD:
"no such metadevice database record"));
break;
case MDE_DB_NOSPACE:
"metadevice database is full, can't create new records"));
break;
case MDE_DB_NOTNOW:
"metadevice database has too few replicas, for "
"metadevice database operation"));
break;
case MDE_DB_NODB:
"there are no existing databases"));
break;
case MDE_DB_NOTOWNER:
"not owner of metadevice database"));
break;
case MDE_DB_STALE:
"stale databases"));
break;
case MDE_DB_TOOFEW:
"not enough databases"));
break;
case MDE_DB_TAGDATA:
"tagged data detected, user intervention required"));
break;
case MDE_DB_ACCOK:
"50% replicas & 50% mediator hosts available, "
"user intervention required"));
break;
case MDE_DB_NTAGDATA:
"no tagged data available or only one tag found"));
break;
case MDE_DB_ACCNOTOK:
"50% replicas & 50% mediator hosts not available"));
break;
case MDE_DB_NOLOCBLK:
"no valid locator blocks were found"));
break;
case MDE_DB_NOLOCNMS:
"no valid locator name information was found"));
break;
case MDE_DB_NODIRBLK:
"no valid directory blocks were found"));
break;
case MDE_DB_NOTAGREC:
"no tag record was allocated, so data "
"tagging is disabled"));
break;
case MDE_DB_NOTAG:
"no tag records exist or no matching tag was found"));
break;
case MDE_DB_BLKRANGE:
break;
default:
break;
}
return (buf);
}
/*
* print diskset (ds) class errors
*/
static char *
md_error_t *ep,
char *buf,
)
{
case MDE_DS_DUPHOST:
break;
case MDE_DS_NOTNODENAME:
break;
case MDE_DS_SELFNOTIN:
"nodename of host %s creating the set must be included"),
break;
case MDE_DS_NODEHASSET:
break;
case MDE_DS_NODENOSET:
break;
case MDE_DS_NOOWNER:
"must be owner of the set for this command"));
break;
case MDE_DS_NOTOWNER:
"only the current owner %s may operate on this set"),
break;
case MDE_DS_NODEISNOTOWNER:
break;
case MDE_DS_NODEINSET:
break;
case MDE_DS_NODENOTINSET:
break;
case MDE_DS_SETNUMBUSY:
"host %s already has a set numbered %ld"),
break;
case MDE_DS_SETNUMNOTAVAIL:
"no available set numbers"));
break;
case MDE_DS_SETNAMEBUSY:
break;
case MDE_DS_DRIVENOTCOMMON:
"drive %s is not common with host %s"),
break;
case MDE_DS_DRIVEINSET:
break;
case MDE_DS_DRIVENOTINSET:
break;
case MDE_DS_DRIVEINUSE:
break;
case MDE_DS_DUPDRIVE:
break;
case MDE_DS_INVALIDSETNAME:
"set name contains invalid characters"));
break;
case MDE_DS_HASDRIVES:
"unable to delete set, it still has drives"));
break;
case MDE_DS_SIDENUMNOTAVAIL:
"maximum number of nodenames exceeded"));
break;
case MDE_DS_SETNAMETOOLONG:
"set name is too long"));
break;
case MDE_DS_NODENAMETOOLONG:
break;
case MDE_DS_OHACANTDELSELF:
"administrator host %s deletion disallowed in one host admin mode"),
break;
case MDE_DS_HOSTNOSIDE:
break;
case MDE_DS_SETLOCKED:
"host %s is modifying set - try later or restart rpc.metad"),
break;
case MDE_DS_ULKSBADKEY:
"set unlock failed - bad key"));
break;
case MDE_DS_LKSBADKEY:
"set lock failed - bad key"));
break;
case MDE_DS_WRITEWITHSULK:
"write operation attempted on set with set unlocked"));
break;
case MDE_DS_SETCLEANUP:
"set \"%s\" is out of date - cleaning up - take failed"),
break;
case MDE_DS_CANTDELSELF:
"administrator host %s can't be deleted, other hosts still in set\n"
break;
case MDE_DS_HASMED:
"unable to delete set, it still has mediator hosts"));
break;
case MDE_DS_TOOMANYALIAS:
"%s causes there to be more aliases than allowed"),
break;
case MDE_DS_ISMED:
break;
case MDE_DS_ISNOTMED:
break;
case MDE_DS_INVALIDMEDNAME:
"mediator name \"%s\" contains invalid characters"),
break;
case MDE_DS_ALIASNOMATCH:
"mediator alias \"%s\" is not an alias for host "
break;
case MDE_DS_NOMEDONHOST:
"unable to contact %s on host \"%s\""),
break;
case MDE_DS_DRIVENOTONHOST:
"drive %s is not present on host %s"),
break;
case MDE_DS_CANTDELMASTER:
"master %s can't be deleted, other hosts still in set"),
break;
case MDE_DS_NOTINMEMBERLIST:
"node %s is not in membership list"),
break;
case MDE_DS_MNCANTDELSELF:
"host %s can't delete self from multi-owner set\n"
"while other hosts still in set"),
break;
case MDE_DS_RPCVERSMISMATCH:
"host %s does not support multi-owner diskset"),
break;
case MDE_DS_WITHDRAWMASTER:
"master host %s cannot withdraw from multi-owner diskset "
"when other owner nodes are still present in diskset"),
break;
case MDE_DS_CANTRESNARF:
"imported set could not be loaded"));
break;
case MDE_DS_INSUFQUORUM:
"insufficient replica quorum detected. Use "
"-f to force import of the set"));
break;
case MDE_DS_EXTENDEDNM:
"multiple namespace records detected"));
break;
"rpc.mdcommd on host %s is not yet drained during "
"suspend operation"),
break;
"rpc.mdcommd on host %s failed suspend operation"),
break;
"rpc.mdcommd on host %s failed reinitialization operation"),
break;
"rpc.mdcommd on host %s failed resume operation"),
break;
case MDE_DS_NOTNOW_RECONFIG:
"command terminated, host %s starting reconfig cycle"),
break;
case MDE_DS_NOTNOW_CMD:
"metaset or metadb command already running on diskset "
break;
case MDE_DS_COMMD_SEND_FAIL:
"rpc.mdcommd on host %s failed operation"),
break;
case MDE_DS_MASTER_ONLY:
"this command must be run on the master node of the set,"
break;
case MDE_DS_SINGLEHOST:
"diskset is auto-take; cannot accept additional hosts"));
break;
case MDE_DS_AUTONOTSET:
"auto-take is not enabled on diskset"));
break;
case MDE_DS_INVALIDDEVID:
break;
case MDE_DS_SETNOTIMP:
break;
case MDE_DS_NOTSELFIDENTIFY:
break;
default:
break;
}
return (buf);
}
/*
* convert error to printable string
*/
static char *
)
{
/* intialize buf */
buf[0] = '\0';
/* class specific */
case MDEC_VOID:
case MDEC_SYS:
case MDEC_RPC:
case MDEC_DEV:
case MDEC_USE:
case MDEC_MD:
case MDEC_COMP:
case MDEC_HSP:
case MDEC_HS:
case MDEC_MDDB:
case MDEC_DS:
case MDEC_OVERLAP:
default:
return (buf);
}
}
/*
* print log prefix
*/
void
)
{
time_t t;
}
}
/*
* varargs sperror()
*/
/*PRINTFLIKE2*/
static char *
md_error_t *ep,
const char *fmt,
)
{
char *p = buf;
/* get stuff */
host2 = ": ";
}
extra2 = ": ";
}
name2 = ": ";
}
/* context */
/* user defined part */
}
/* error code */
/* return error message */
return (buf);
}
/*
* printf-like sperror()
*/
/*PRINTFLIKE2*/
char *
md_error_t *ep,
const char *fmt,
...
)
{
char *emsg;
return (emsg);
}
/*
* printf-like perror()
*/
/*PRINTFLIKE2*/
void
md_error_t *ep,
const char *fmt,
...
)
{
char *emsg;
/* get error message */
/* stderr */
/* metalog */
}
/* syslog */
if (metasyslog) {
}
}
/*
* printf-like perror()
*/
/*PRINTFLIKE1*/
void
const char *fmt,
...
)
{
char *emsg;
/* get error message */
mdclrerror(&status);
/* stderr */
/* metalog */
}
/* syslog */
if (metasyslog) {
}
}
/*
* printf-like log
*/
/*PRINTFLIKE1*/
void
const char *fmt,
...
)
{
/* begin */
/* stderr */
/* metalog */
}
/* syslog */
if (metasyslog) {
}
/* end */
}
/*
* metaclust timing messages logging routine
*
* level - The class of the message to be logged. Message will be logged
* if this is less than or equal to the verbosity level.
*/
void
{
/*
* Log all messages upto MC_LOG2 to syslog regardless of the
* verbosity level
*/
else
}
/*
* Print all messages to stderr provided the message level is
* within the verbosity level
*/
}
}