VirtualBox

Changeset 54962 in vbox for trunk/src/VBox/Runtime


Ignore:
Timestamp:
Mar 26, 2015 9:16:03 AM (10 years ago)
Author:
vboxsync
Message:

On FreeBSD hosts use the correct semantics of the last parameter of sysctlbyname(). Thank you Jung-uk Kim.

Location:
trunk/src/VBox/Runtime/r3/freebsd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/freebsd/fileaio-freebsd.cpp

    r45678 r54962  
    125125                         &cbParameter,               /* Size of the memory pointed to. */
    126126                         NULL,                       /* Where the new value is located. */
    127                          NULL);                      /* Where the size of the new value is stored. */
     127                         0);                         /* Where the size of the new value is stored. */
    128128    if (rcBSD == -1)
    129129    {
  • trunk/src/VBox/Runtime/r3/freebsd/mp-freebsd.cpp

    r44529 r54962  
    9494    size_t  cbDriver = sizeof(szDriver);
    9595    RT_ZERO(szDriver);                  /* this shouldn't be necessary. */
    96     int rcBsd = sysctlbyname(szName, szDriver, &cbDriver, NULL, NULL);
     96    int rcBsd = sysctlbyname(szName, szDriver, &cbDriver, NULL, 0);
    9797    if (rcBsd == 0)
    9898        return true;
     
    155155
    156156    /* CPU's have a common frequency. */
    157     int rc = sysctlbyname("dev.cpu.0.freq", &uFreqCurr, &cbParameter, NULL, NULL);
     157    int rc = sysctlbyname("dev.cpu.0.freq", &uFreqCurr, &cbParameter, NULL, 0);
    158158    if (rc)
    159159        return 0;
     
    177177     * levels but only the first one.
    178178     */
    179     int rc = sysctlbyname("dev.cpu.0.freq_levels", szFreqLevels, &cbFreqLevels, NULL, NULL);
     179    int rc = sysctlbyname("dev.cpu.0.freq_levels", szFreqLevels, &cbFreqLevels, NULL, 0);
    180180    if (   (rc && (errno != ENOMEM))
    181181        || (cbFreqLevels == 0))
Note: See TracChangeset for help on using the changeset viewer.

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