Deleted Added
full compact
pjdlog.c (210873) pjdlog.c (210875)
1/*-
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2009-2010 The FreeBSD Foundation
3 * All rights reserved.
4 *
5 * This software was developed by Pawel Jakub Dawidek under sponsorship from
6 * the FreeBSD Foundation.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 14 unchanged lines hidden (view full) ---

23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sbin/hastd/pjdlog.c 210873 2010-08-05 18:23:43Z pjd $");
31__FBSDID("$FreeBSD: head/sbin/hastd/pjdlog.c 210875 2010-08-05 18:26:38Z pjd $");
32
33#include <assert.h>
34#include <errno.h>
35#include <stdarg.h>
36#include <stdio.h>
37#include <stdlib.h>
38#include <string.h>
39#include <syslog.h>

--- 320 unchanged lines hidden (view full) ---

360{
361 va_list ap;
362
363 va_start(ap, fmt);
364 pjdlogv_exitx(exitcode, fmt, ap);
365 /* NOTREACHED */
366 va_end(ap);
367}
32
33#include <assert.h>
34#include <errno.h>
35#include <stdarg.h>
36#include <stdio.h>
37#include <stdlib.h>
38#include <string.h>
39#include <syslog.h>

--- 320 unchanged lines hidden (view full) ---

360{
361 va_list ap;
362
363 va_start(ap, fmt);
364 pjdlogv_exitx(exitcode, fmt, ap);
365 /* NOTREACHED */
366 va_end(ap);
367}
368
369/*
370 * Log assertion and exit.
371 */
372void
373pjdlog_verify(const char *func, const char *file, int line,
374 const char *failedexpr)
375{
376
377 if (func == NULL) {
378 pjdlog_critical("Assertion failed: (%s), file %s, line %d.",
379 failedexpr, file, line);
380 } else {
381 pjdlog_critical("Assertion failed: (%s), function %s, file %s, line %d.",
382 failedexpr, func, file, line);
383 }
384 abort();
385 /* NOTREACHED */
386}
387