a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * CDDL HEADER START
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * The contents of this file are subject to the terms of the
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * Common Development and Distribution License (the "License").
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * You may not use this file except in compliance with the License.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * See the License for the specific language governing permissions
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * and limitations under the License.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * When distributing Covered Code, include this CDDL HEADER in each
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * If applicable, add the following below this CDDL HEADER, with the
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * fields enclosed by brackets "[]" replaced with your own identifying
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * information: Portions Copyright [yyyy] [name of copyright owner]
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * CDDL HEADER END
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * Use is subject to license terms.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu/* sbd_etab[] and sbd_etab_len provided by sbdgenerr.pl */
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu (void) vsnprintf(new->e_rsc, sizeof (new->e_rsc), fmt, args);
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu for (tp = sbd_etab, i = 0; i < sbd_etab_len; i++, tp++)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu if (ep->e_code >= tp->t_base && ep->e_code <= tp->t_bnd)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu (void) snprintf(buf, sizeof (buf), "error %d", ep->e_code);
a31148363f598def767ac48c5d82e1572e44b935Gerry Liusbd_err_set_c(sbd_error_t **ep, int ce, int e_code, char *fmt, ...)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liusbd_err_set(sbd_error_t **ep, int ce, int e_code, char *fmt, ...)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liudrerr_set_c(int log, sbd_error_t **ep, int e_code, char *fmt, ...)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * Memlist support.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liudr_memlist_intersect(struct memlist *al, struct memlist *bl)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liudr_memlist_add_span(struct memlist *mlist, uint64_t base, uint64_t len)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu for (tl = ml = mlist; ml; tl = ml, ml = ml->ml_next) {
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu } else if (base <= (ml->ml_address + ml->ml_size)) {
a31148363f598def767ac48c5d82e1572e44b935Gerry Liudr_memlist_del_span(struct memlist *mlist, uint64_t base, uint64_t len)
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * splitting an memlist entry.
a31148363f598def767ac48c5d82e1572e44b935Gerry Liu * add span without merging
a31148363f598def767ac48c5d82e1572e44b935Gerry Liudr_memlist_cat_span(struct memlist *mlist, uint64_t base, uint64_t len)