Changeset 85093 in vbox for trunk/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp
- Timestamp:
- Jul 7, 2020 6:23:08 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPR3HardenedMain.cpp
r83181 r85093 671 671 * @param rcExit The exit code. 672 672 */ 673 DECLNORETURN(void) suplibHardenedExit(RTEXITCODE rcExit) 673 DECLNORETURN(void) suplibHardenedExit(RTEXITCODE rcExit) RT_NO_THROW_DEF 674 674 { 675 675 for (;;) … … 888 888 * @param va Arguments to format. 889 889 */ 890 DECL HIDDEN(void) suplibHardenedPrintFV(const char *pszFormat, va_list va)890 DECL_HIDDEN_NOTHROW(void) suplibHardenedPrintFV(const char *pszFormat, va_list va) RT_NO_THROW_DEF 891 891 { 892 892 #ifdef IPRT_NO_CRT … … 1122 1122 * @param ... Arguments to format. 1123 1123 */ 1124 DECL HIDDEN(void) suplibHardenedPrintF(const char *pszFormat, ...)1124 DECL_HIDDEN_NOTHROW(void) suplibHardenedPrintF(const char *pszFormat, ...) RT_NO_THROW_DEF 1125 1125 { 1126 1126 va_list va; … … 1170 1170 * @copydoc RTPathFilename 1171 1171 */ 1172 DECL HIDDEN(char *) supR3HardenedPathFilename(const char *pszPath)1172 DECL_HIDDEN_NOTHROW(char *) supR3HardenedPathFilename(const char *pszPath) 1173 1173 { 1174 1174 const char *psz = pszPath; … … 1206 1206 * @copydoc RTPathAppPrivateNoArch 1207 1207 */ 1208 DECL HIDDEN(int) supR3HardenedPathAppPrivateNoArch(char *pszPath, size_t cchPath)1208 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppPrivateNoArch(char *pszPath, size_t cchPath) 1209 1209 { 1210 1210 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_PRIVATE) … … 1225 1225 * @copydoc RTPathAppPrivateArch 1226 1226 */ 1227 DECL HIDDEN(int) supR3HardenedPathAppPrivateArch(char *pszPath, size_t cchPath)1227 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppPrivateArch(char *pszPath, size_t cchPath) 1228 1228 { 1229 1229 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_PRIVATE_ARCH) … … 1244 1244 * @copydoc RTPathSharedLibs 1245 1245 */ 1246 DECL HIDDEN(int) supR3HardenedPathAppSharedLibs(char *pszPath, size_t cchPath)1246 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppSharedLibs(char *pszPath, size_t cchPath) 1247 1247 { 1248 1248 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_SHARED_LIBS) … … 1263 1263 * @copydoc RTPathAppDocs 1264 1264 */ 1265 DECL HIDDEN(int) supR3HardenedPathAppDocs(char *pszPath, size_t cchPath)1265 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppDocs(char *pszPath, size_t cchPath) 1266 1266 { 1267 1267 #if !defined(RT_OS_WINDOWS) && defined(RTPATH_APP_DOCS) … … 1432 1432 * @remarks not quite like RTPathExecDir actually... 1433 1433 */ 1434 DECL HIDDEN(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath)1434 DECL_HIDDEN_NOTHROW(int) supR3HardenedPathAppBin(char *pszPath, size_t cchPath) 1435 1435 { 1436 1436 /* … … 1459 1459 #endif 1460 1460 1461 DECL HIDDEN(void) supR3HardenedOpenLog(int *pcArgs, char **papszArgs)1461 DECL_HIDDEN_NOTHROW(void) supR3HardenedOpenLog(int *pcArgs, char **papszArgs) RT_NO_THROW_DEF 1462 1462 { 1463 1463 static const char s_szLogOption[] = "--sup-hardening-log="; … … 1477 1477 * Drop the argument from the vector (has trailing NULL entry). 1478 1478 */ 1479 memmove(&papszArgs[iArg], &papszArgs[iArg + 1], (cArgs - iArg) * sizeof(papszArgs[0]));1479 // memmove(&papszArgs[iArg], &papszArgs[iArg + 1], (cArgs - iArg) * sizeof(papszArgs[0])); 1480 1480 *pcArgs -= 1; 1481 1481 cArgs -= 1; … … 1499 1499 if (RT_SUCCESS(rc)) 1500 1500 { 1501 SUP_DPRINTF(("Log file opened: " VBOX_VERSION_STRING "r%u g_hStartupLog=%p g_uNtVerCombined=%#x\n",1502 VBOX_SVN_REV, g_hStartupLog, g_uNtVerCombined));1501 // SUP_DPRINTF(("Log file opened: " VBOX_VERSION_STRING "r%u g_hStartupLog=%p g_uNtVerCombined=%#x\n", 1502 // VBOX_SVN_REV, g_hStartupLog, g_uNtVerCombined)); 1503 1503 1504 1504 /* … … 1508 1508 if (RT_C_IS_ALPHA(pszLogFile[0]) && pszLogFile[1] == ':') 1509 1509 { 1510 RTUtf16CopyAscii(g_wszStartupLogVol, RT_ELEMENTS(g_wszStartupLogVol), "\\??\\");1510 // RTUtf16CopyAscii(g_wszStartupLogVol, RT_ELEMENTS(g_wszStartupLogVol), "\\??\\"); 1511 1511 g_wszStartupLogVol[sizeof("\\??\\") - 1] = RT_C_TO_UPPER(pszLogFile[0]); 1512 1512 g_wszStartupLogVol[sizeof("\\??\\") + 0] = ':'; … … 1527 1527 1528 1528 1529 DECL HIDDEN(void) supR3HardenedLogV(const char *pszFormat, va_list va)1529 DECL_HIDDEN_NOTHROW(void) supR3HardenedLogV(const char *pszFormat, va_list va) RT_NO_THROW_DEF 1530 1530 { 1531 1531 #ifdef RT_OS_WINDOWS … … 1559 1559 1560 1560 1561 DECL HIDDEN(void) supR3HardenedLog(const char *pszFormat, ...)1561 DECL_HIDDEN_NOTHROW(void) supR3HardenedLog(const char *pszFormat, ...) RT_NO_THROW_DEF 1562 1562 { 1563 1563 va_list va; … … 1568 1568 1569 1569 1570 DECL HIDDEN(void) supR3HardenedLogFlush(void)1570 DECL_HIDDEN_NOTHROW(void) supR3HardenedLogFlush(void) RT_NO_THROW_DEF 1571 1571 { 1572 1572 #ifdef RT_OS_WINDOWS … … 1647 1647 1648 1648 1649 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc,1650 const char *pszMsgFmt, va_list va)1649 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalMsgV(const char *pszWhere, SUPINITOP enmWhat, int rc, 1650 const char *pszMsgFmt, va_list va) 1651 1651 { 1652 1652 /* … … 1764 1764 1765 1765 1766 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc,1767 const char *pszMsgFmt, ...)1766 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalMsg(const char *pszWhere, SUPINITOP enmWhat, int rc, 1767 const char *pszMsgFmt, ...) 1768 1768 { 1769 1769 va_list va; … … 1774 1774 1775 1775 1776 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatalV(const char *pszFormat, va_list va)1776 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatalV(const char *pszFormat, va_list va) 1777 1777 { 1778 1778 supR3HardenedLog("Fatal error:\n"); … … 1809 1809 1810 1810 1811 DECL_NO_RETURN(DECL HIDDEN(void)) supR3HardenedFatal(const char *pszFormat, ...)1811 DECL_NO_RETURN(DECL_HIDDEN_NOTHROW(void)) supR3HardenedFatal(const char *pszFormat, ...) 1812 1812 { 1813 1813 va_list va; … … 1818 1818 1819 1819 1820 DECL HIDDEN(int) supR3HardenedErrorV(int rc, bool fFatal, const char *pszFormat, va_list va)1820 DECL_HIDDEN_NOTHROW(int) supR3HardenedErrorV(int rc, bool fFatal, const char *pszFormat, va_list va) 1821 1821 { 1822 1822 if (fFatal) … … 1845 1845 1846 1846 1847 DECL HIDDEN(int) supR3HardenedError(int rc, bool fFatal, const char *pszFormat, ...)1847 DECL_HIDDEN_NOTHROW(int) supR3HardenedError(int rc, bool fFatal, const char *pszFormat, ...) 1848 1848 { 1849 1849 va_list va; … … 1861 1861 * @remarks This function will not return on failure. 1862 1862 */ 1863 DECL HIDDEN(void) supR3HardenedMainOpenDevice(void)1863 DECL_HIDDEN_NOTHROW(void) supR3HardenedMainOpenDevice(void) 1864 1864 { 1865 1865 RTERRINFOSTATIC ErrInfo; … … 2516 2516 * @param envp The environment vector. 2517 2517 */ 2518 DECL HIDDEN(int) SUPR3HardenedMain(const char *pszProgName, uint32_t fFlags, int argc, char **argv, char **envp)2518 DECL_HIDDEN_NOTHROW(int) SUPR3HardenedMain(const char *pszProgName, uint32_t fFlags, int argc, char **argv, char **envp) 2519 2519 { 2520 2520 SUP_DPRINTF(("SUPR3HardenedMain: pszProgName=%s fFlags=%#x\n", pszProgName, fFlags));
Note:
See TracChangeset
for help on using the changeset viewer.