- Timestamp:
- Nov 26, 2008 2:09:41 PM (16 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r14575 r14645 46 46 #include <iprt/cpuset.h> 47 47 #include <iprt/uuid.h> 48 #include <VBox/param.h> 48 49 #include <VBox/log.h> 49 50 #include <VBox/err.h> … … 2071 2072 if (cPages < 1 || cPages >= 256) 2072 2073 { 2073 Log(("Illegal request cPages=%d, must be greater than 0 and smaller than 256 \n", cPages));2074 return VERR_ INVALID_PARAMETER;2074 Log(("Illegal request cPages=%d, must be greater than 0 and smaller than 256.\n", cPages)); 2075 return VERR_PAGE_COUNT_OUT_OF_RANGE; 2075 2076 } 2076 2077 … … 2152 2153 2153 2154 } 2154 if (cPages < 1 || cPages > 256)2155 if (cPages < 1 || cPages >= 256) 2155 2156 { 2156 2157 Log(("Illegal request cPages=%d, must be greater than 0 and smaller than 256.\n", cPages)); 2157 return VERR_ INVALID_PARAMETER;2158 return VERR_PAGE_COUNT_OUT_OF_RANGE; 2158 2159 } 2159 2160 … … 2393 2394 AssertReturn(ppvR3 || ppvR0, VERR_INVALID_PARAMETER); 2394 2395 AssertReturn(!fFlags, VERR_INVALID_PARAMETER); 2395 if (cPages < 1 || cPages > (128 * _1M)/PAGE_SIZE)2396 if (cPages < 1 || cPages > VBOX_MAX_ALLOC_PAGE_COUNT) 2396 2397 { 2397 2398 Log(("SUPR0PageAlloc: Illegal request cb=%u; must be greater than 0 and smaller than 128MB.\n", cPages)); 2398 return VERR_ INVALID_PARAMETER;2399 return VERR_PAGE_COUNT_OUT_OF_RANGE; 2399 2400 } 2400 2401 -
trunk/src/VBox/HostDrivers/Support/SUPLib.cpp
r14632 r14645 727 727 AssertPtrReturn(ppvPages, VERR_INVALID_POINTER); 728 728 *ppvPages = NULL; 729 AssertReturn(cPages > 0, VERR_ INVALID_PARAMETER);729 AssertReturn(cPages > 0, VERR_PAGE_COUNT_OUT_OF_RANGE); 730 730 731 731 #ifdef RT_OS_WINDOWS … … 750 750 */ 751 751 AssertPtrReturn(pvPages, VERR_INVALID_POINTER); 752 AssertReturn(cPages > 0, VERR_ INVALID_PARAMETER);752 AssertReturn(cPages > 0, VERR_PAGE_COUNT_OUT_OF_RANGE); 753 753 754 754 #ifdef RT_OS_WINDOWS … … 863 863 */ 864 864 AssertPtrReturn(pvPages, VERR_INVALID_POINTER); 865 AssertReturn(cPages > 0, VERR_ INVALID_PARAMETER);865 AssertReturn(cPages > 0, VERR_PAGE_COUNT_OUT_OF_RANGE); 866 866 867 867 /* … … 912 912 *pR0Ptr = NIL_RTR0PTR; 913 913 AssertPtrNullReturn(paPages, VERR_INVALID_POINTER); 914 AssertMsgReturn(cPages > 0 && cPages < 16384, ("cPages=%zu\n", cPages), VERR_INVALID_PARAMETER);914 AssertMsgReturn(cPages > 0 && cPages <= VBOX_MAX_ALLOC_PAGE_COUNT, ("cPages=%zu\n", cPages), VERR_PAGE_COUNT_OUT_OF_RANGE); 915 915 916 916 /* fake */ … … 998 998 */ 999 999 AssertPtrReturn(pvPages, VERR_INVALID_POINTER); 1000 AssertReturn(cPages > 0, VERR_ INVALID_PARAMETER);1000 AssertReturn(cPages > 0, VERR_PAGE_COUNT_OUT_OF_RANGE); 1001 1001 1002 1002 /* fake */ … … 1099 1099 return VINF_SUCCESS; 1100 1100 AssertPtrReturn(pv, VERR_INVALID_POINTER); 1101 AssertReturn(cPages > 0, VERR_ INVALID_PARAMETER);1101 AssertReturn(cPages > 0, VERR_PAGE_COUNT_OUT_OF_RANGE); 1102 1102 1103 1103 /* fake */ … … 1134 1134 *ppvPages = NULL; 1135 1135 AssertPtrReturn(paPages, VERR_INVALID_POINTER); 1136 AssertMsgReturn(cPages > 0 && cPages < 256, ("cPages=%d must be > 0 and < 256\n", cPages), VERR_ INVALID_PARAMETER);1136 AssertMsgReturn(cPages > 0 && cPages < 256, ("cPages=%d must be > 0 and < 256\n", cPages), VERR_PAGE_COUNT_OUT_OF_RANGE); 1137 1137 1138 1138 /* fake */ … … 1199 1199 return VINF_SUCCESS; 1200 1200 AssertPtrReturn(pv, VERR_INVALID_POINTER); 1201 AssertReturn(cPages > 0, VERR_ INVALID_PARAMETER);1201 AssertReturn(cPages > 0, VERR_PAGE_COUNT_OUT_OF_RANGE); 1202 1202 1203 1203 /* fake */ -
trunk/src/VBox/HostDrivers/Support/linux/files_vboxdrv
r14432 r14645 59 59 ${PATH_ROOT}/include/VBox/err.h=>include/VBox/err.h \ 60 60 ${PATH_ROOT}/include/VBox/log.h=>include/VBox/log.h \ 61 ${PATH_ROOT}/include/VBox/param.h=>include/VBox/param.h \ 61 62 ${PATH_ROOT}/include/VBox/sup.h=>include/VBox/sup.h \ 62 63 ${PATH_ROOT}/include/VBox/types.h=>include/VBox/types.h \ -
trunk/src/VBox/VMM/MMHyper.cpp
r14637 r14645 537 537 AssertPtrReturn(pvR3, VERR_INVALID_POINTER); 538 538 AssertPtrReturn(paPages, VERR_INVALID_POINTER); 539 AssertReturn(cPages > 0, VERR_ INVALID_PARAMETER);540 AssertReturn(cPages < 128 * _1M / PAGE_SIZE, VERR_INVALID_PARAMETER);539 AssertReturn(cPages > 0, VERR_PAGE_COUNT_OUT_OF_RANGE); 540 AssertReturn(cPages <= VBOX_MAX_ALLOC_PAGE_COUNT, VERR_PAGE_COUNT_OUT_OF_RANGE); 541 541 AssertPtrReturn(pszDesc, VERR_INVALID_POINTER); 542 542 AssertReturn(*pszDesc, VERR_INVALID_PARAMETER);
Note:
See TracChangeset
for help on using the changeset viewer.