-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
sysctlbyname(3) for FreeBSD requires size_t type for the last
argument, not a pointer.
https://www.freebsd.org/cgi/man.cgi?query=sysctlbyname&format=html
Jung-uk Kim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJVA08xAAoJEHyflib82/FGl3oH/iwSRLYUy2vuUh9Of89Q4bkA
Xa2oaQnu4RhiExbLpqt+3b83fgEhdxljs7AgyT1RC8CDL9cmS4X4NIJO4lVGviN9
lvatHJsci1sXKnfGYAWituPr8vsaN5mWcl3H31+zfhSdSVEi1hIyE0Vz/dIcunXA
tLOxBsdBXjNNR8YAldZ/wy3An7Zkl6W6nD0xDViH44hmUFCYt/lD/l6jZNw/1GAN
tG1ebRZjFKmmsJyenoU8GDJvaOkeXl8ItGgoRI4/L5ts9Dfa2SyGdAgeZ3lr3kWM
32Rt3+lL0/GN5E4nw34Lwf8YmCgXBldOx6QcdEFh/ZyqzwI9osPDn0tLNl43cpY=
=zgVY
-----END PGP SIGNATURE-----
Index: src/VBox/Devices/PC/DrvACPI.cpp
===================================================================
--- src/VBox/Devices/PC/DrvACPI.cpp (revision 54716)
+++ src/VBox/Devices/PC/DrvACPI.cpp (working copy)
@@ -204,7 +204,7 @@ static DECLCALLBACK(int) drvACPIQueryPowerSource(P
int fAcLine = 0;
size_t cbParameter = sizeof(fAcLine);
- int rc = sysctlbyname("hw.acpi.acline", &fAcLine, &cbParameter, NULL, NULL);
+ int rc = sysctlbyname("hw.acpi.acline", &fAcLine, &cbParameter, NULL, 0);
if (!rc)
{
@@ -463,7 +463,7 @@ static DECLCALLBACK(int) drvACPIQueryBatteryStatus
int fBatteryState = 0;
size_t cbParameter = sizeof(fBatteryState);
- rc = sysctlbyname("hw.acpi.battery.state", &fBatteryState, &cbParameter, NULL, NULL);
+ rc = sysctlbyname("hw.acpi.battery.state", &fBatteryState, &cbParameter, NULL, 0);
if (!rc)
{
if ((fBatteryState & ACPI_BATT_STAT_NOT_PRESENT) == ACPI_BATT_STAT_NOT_PRESENT)
@@ -485,7 +485,7 @@ static DECLCALLBACK(int) drvACPIQueryBatteryStatus
/* Get battery level. */
int curCapacity = 0;
cbParameter = sizeof(curCapacity);
- rc = sysctlbyname("hw.acpi.battery.life", &curCapacity, &cbParameter, NULL, NULL);
+ rc = sysctlbyname("hw.acpi.battery.life", &curCapacity, &cbParameter, NULL, 0);
if (!rc && curCapacity >= 0)
*penmRemainingCapacity = (PDMACPIBATCAPACITY)curCapacity;
Index: src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp
===================================================================
--- src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp (revision 54716)
+++ src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp (working copy)
@@ -124,7 +124,7 @@ RTR3DECL(int) RTFileAioGetLimits(PRTFILEAIOLIMITS
&cReqsOutstandingMax, /* Where to store the old value. */
&cbParameter, /* Size of the memory pointed to. */
NULL, /* Where the new value is located. */
- NULL); /* Where the size of the new value is stored. */
+ 0); /* Where the size of the new value is stored. */
if (rcBSD == -1)
{
/* ENOENT means the value is unknown thus the module is not loaded. */
Index: src/VBox/Runtime/r3/freebsd/mp-freebsd.cpp
===================================================================
--- src/VBox/Runtime/r3/freebsd/mp-freebsd.cpp (revision 54716)
+++ src/VBox/Runtime/r3/freebsd/mp-freebsd.cpp (working copy)
@@ -93,7 +93,7 @@ RTDECL(bool) RTMpIsCpuOnline(RTCPUID idCpu)
char szDriver[10];
size_t cbDriver = sizeof(szDriver);
RT_ZERO(szDriver); /* this shouldn't be necessary. */
- int rcBsd = sysctlbyname(szName, szDriver, &cbDriver, NULL, NULL);
+ int rcBsd = sysctlbyname(szName, szDriver, &cbDriver, NULL, 0);
if (rcBsd == 0)
return true;
@@ -154,7 +154,7 @@ RTDECL(uint32_t) RTMpGetCurFrequency(RTCPUID idCpu
return 0;
/* CPU's have a common frequency. */
- int rc = sysctlbyname("dev.cpu.0.freq", &uFreqCurr, &cbParameter, NULL, NULL);
+ int rc = sysctlbyname("dev.cpu.0.freq", &uFreqCurr, &cbParameter, NULL, 0);
if (rc)
return 0;
@@ -176,7 +176,7 @@ RTDECL(uint32_t) RTMpGetMaxFrequency(RTCPUID idCpu
* CPU 0 has the freq levels entry. ENOMEM is ok as we don't need all supported
* levels but only the first one.
*/
- int rc = sysctlbyname("dev.cpu.0.freq_levels", szFreqLevels, &cbFreqLevels, NULL, NULL);
+ int rc = sysctlbyname("dev.cpu.0.freq_levels", szFreqLevels, &cbFreqLevels, NULL, 0);
if ( (rc && (errno != ENOMEM))
|| (cbFreqLevels == 0))
return 0;
_______________________________________________
vbox-dev mailing list
[email protected]
https://www.virtualbox.org/mailman/listinfo/vbox-dev