VirtualBox

source: vbox/trunk/src/VBox/Runtime/r0drv/solaris/assert-r0drv-solaris.c@ 4717

最後變更 在這個檔案從4717是 4717,由 vboxsync 提交於 18 年 前

Solaris changes.

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.9 KB
 
1/* $Id: assert-r0drv-solaris.c 4717 2007-09-12 06:44:18Z vboxsync $ */
2/** @file
3 * innotek Portable Runtime - Assertion Workers, Ring-0 Drivers, Solaris.
4 */
5
6/*
7 * Copyright (C) 2006-2007 innotek GmbH
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.alldomusa.eu.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License as published by the Free Software Foundation,
13 * in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14 * distribution. VirtualBox OSE is distributed in the hope that it will
15 * be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*******************************************************************************
20* Header Files *
21*******************************************************************************/
22#include "the-solaris-kernel.h"
23
24#include <iprt/assert.h>
25#include <iprt/log.h>
26#include <iprt/string.h>
27#include <iprt/stdarg.h>
28
29
30RTDECL(void) AssertMsg1(const char *pszExpr, unsigned uLine, const char *pszFile, const char *pszFunction)
31{
32#ifdef IN_GUEST_R0
33 RTLogBackdoorPrintf("\n!!Assertion Failed!!\n"
34 "Expression: %s\n"
35 "Location : %s(%d) %s\n",
36 pszExpr, pszFile, uLine, pszFunction);
37#endif
38
39 uprintf("\r\n!!Assertion Failed!!\r\n"
40 "Expression: %s\r\n"
41 "Location : %s(%d) %s\r\n",
42 pszExpr, pszFile, uLine, pszFunction);
43}
44
45
46RTDECL(void) AssertMsg2(const char *pszFormat, ...)
47{
48 va_list va;
49 char szMsg[256];
50
51#ifdef IN_GUEST_R0
52 va_start(va, pszFormat);
53 RTLogBackdoorPrintfV(pszFormat, va);
54 va_end(va);
55#endif
56
57 va_start(va, pszFormat);
58 RTStrPrintfV(szMsg, sizeof(szMsg) - 1, pszFormat, va);
59 szMsg[sizeof(szMsg) - 1] = '\0';
60 va_end(va);
61 uprintf("%s", szMsg);
62}
63
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette