2N/A/*
2N/A * CDDL HEADER START
2N/A *
2N/A * The contents of this file are subject to the terms of the
2N/A * Common Development and Distribution License, Version 1.0 only
2N/A * (the "License"). You may not use this file except in compliance
2N/A * with the License.
2N/A *
2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * or http://www.opensolaris.org/os/licensing.
2N/A * See the License for the specific language governing permissions
2N/A * and limitations under the License.
2N/A *
2N/A * When distributing Covered Code, include this CDDL HEADER in each
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A * If applicable, add the following below this CDDL HEADER, with the
2N/A * fields enclosed by brackets "[]" replaced with your own identifying
2N/A * information: Portions Copyright [yyyy] [name of copyright owner]
2N/A *
2N/A * CDDL HEADER END
2N/A */
2N/A/*
2N/A * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
2N/A * Use is subject to license terms.
2N/A */
2N/A
2N/A#pragma ident "%Z%%M% %I% %E% SMI"
2N/A
2N/A/*
2N/A * This file contains the message strings for the data store error
2N/A * return codes.
2N/A */
2N/A
2N/A#include <dhcp_svc_public.h>
2N/A#include <locale.h>
2N/A
2N/A/*
2N/A * Note: must be kept in sync with error codes in <dhcp_svc_public.h>
2N/A */
2N/Astatic char *errmsgs[DSVC_NERR] = {
2N/A/* 0 DSVC_SUCCESS */ "Success",
2N/A/* 1 DSVC_EXISTS */ "Already exists",
2N/A/* 2 DSVC_ACCESS */ "Access denied",
2N/A/* 3 DSVC_NO_CRED */ "No underlying service credential",
2N/A/* 4 DSVC_NOENT */ "Entry does not exist",
2N/A/* 5 DSVC_BUSY */ "Busy",
2N/A/* 6 DSVC_INVAL */ "Invalid arguments",
2N/A/* 7 DSVC_INTERNAL */ "Internal error",
2N/A/* 8 DSVC_UNAVAILABLE */ "Underlying service required by "
2N/A "public module is unavailable",
2N/A/* 9 DSVC_COLLISION */ "Update collision",
2N/A/* 10 DSVC_UNSUPPORTED */ "Operation unsupported",
2N/A/* 11 DSVC_NO_MEMORY */ "Virtual memory exhausted",
2N/A/* 12 DSVC_NO_RESOURCES */ "Non-memory resources unavailable",
2N/A/* 13 DSVC_BAD_RESOURCE */ "Malformed/missing RESOURCE setting",
2N/A/* 14 DSVC_BAD_PATH */ "Malformed/missing PATH setting",
2N/A/* 15 DSVC_MODULE_VERSION */ "Public module version mismatch",
2N/A/* 16 DSVC_MODULE_ERR */ "Error in public module",
2N/A/* 17 DSVC_MODULE_LOAD_ERR */ "Error loading public module",
2N/A/* 18 DSVC_MODULE_UNLOAD_ERR */ "Error unloading public module",
2N/A/* 19 DSVC_MODULE_CFG_ERR */ "Module-specific configuration failed",
2N/A/* 20 DSVC_SYNCH_ERR */ "Error in synchronization protocol",
2N/A/* 21 DSVC_NO_LOCKMGR */ "Cannot contact lock manager",
2N/A/* 22 DSVC_NO_LOCATION */ "Location does not exist",
2N/A/* 23 DSVC_BAD_CONVER */ "Malformed/missing CONVER setting",
2N/A/* 24 DSVC_NO_TABLE */ "Table does not exist",
2N/A/* 25 DSVC_TABLE_EXISTS */ "Table already exists"
2N/A};
2N/A
2N/A/*
2N/A * Return the appropriate error message for a given DSVC error.
2N/A */
2N/Aconst char *
2N/Adhcpsvc_errmsg(unsigned int index)
2N/A{
2N/A if (index >= DSVC_NERR)
2N/A return (dgettext(TEXT_DOMAIN, "<unknown error>"));
2N/A
2N/A return (dgettext(TEXT_DOMAIN, errmsgs[index]));
2N/A}