Path: blob/main/cddl/contrib/opensolaris/tools/ctf/common/utils.c
39563 views
/*1* CDDL HEADER START2*3* The contents of this file are subject to the terms of the4* Common Development and Distribution License, Version 1.0 only5* (the "License"). You may not use this file except in compliance6* with the License.7*8* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE9* or http://www.opensolaris.org/os/licensing.10* See the License for the specific language governing permissions11* and limitations under the License.12*13* When distributing Covered Code, include this CDDL HEADER in each14* file and include the License file at usr/src/OPENSOLARIS.LICENSE.15* If applicable, add the following below this CDDL HEADER, with the16* fields enclosed by brackets "[]" replaced with your own identifying17* information: Portions Copyright [yyyy] [name of copyright owner]18*19* CDDL HEADER END20*/21/*22* Copyright (c) 1998-2001 by Sun Microsystems, Inc.23* All rights reserved.24*/2526#include <err.h>27#include <string.h>28#include <stdlib.h>29#include <stdarg.h>30#include <stdio.h>31#include <errno.h>3233#include "utils.h"3435/*LINTLIBRARY*/3637void38vdie(const char *format, va_list alist)39{40vwarn(format, alist);41exit(E_ERROR);42}4344/*PRINTFLIKE1*/45void46die(const char *format, ...)47{48va_list alist;4950va_start(alist, format);51vdie(format, alist);52va_end(alist);53}545556