5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * CDDL HEADER START
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * The contents of this file are subject to the terms of the
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * Common Development and Distribution License (the "License").
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * You may not use this file except in compliance with the License.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * or http://www.opensolaris.org/os/licensing.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * See the License for the specific language governing permissions
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * and limitations under the License.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * When distributing Covered Code, include this CDDL HEADER in each
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * If applicable, add the following below this CDDL HEADER, with the
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * fields enclosed by brackets "[]" replaced with your own identifying
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * information: Portions Copyright [yyyy] [name of copyright owner]
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * CDDL HEADER END
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * Use is subject to license terms.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * Description:
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland * Module for handling error messages that come from libpkg libraries.
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland/* max length of any formatted error message */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland/* private structures (not visible outside this file) */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland/* ---------------------- public functions ----------------------- */
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland newerr = (PKG_ERR *)malloc(sizeof (PKG_ERR));
4656d4747c8743290bfbe910c64cd75eb4e4af8dGarrett D'Amore/*PRINTFLIKE3*/
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterlandpkgerr_add(PKG_ERR *err, PKG_ERR_CODE code, char *fmt, ...)
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland (void) vsnprintf(errmsgbuf, MAX_ERRMSGLEN, fmt, ap);
5c51f1241dbbdf2656d0e10011981411ed0c9673Moriah Waterland err->errs = (PKG_ERR_CODE *)realloc(err->errs,