VirtualBox

Changeset 54962 in vbox


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
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/PC/DrvACPI.cpp

    r48947 r54962  
    205205    size_t cbParameter = sizeof(fAcLine);
    206206
    207     int rc = sysctlbyname("hw.acpi.acline", &fAcLine, &cbParameter, NULL, NULL);
     207    int rc = sysctlbyname("hw.acpi.acline", &fAcLine, &cbParameter, NULL, 0);
    208208
    209209    if (!rc)
     
    464464        size_t cbParameter = sizeof(fBatteryState);
    465465
    466         rc = sysctlbyname("hw.acpi.battery.state", &fBatteryState, &cbParameter, NULL, NULL);
     466        rc = sysctlbyname("hw.acpi.battery.state", &fBatteryState, &cbParameter, NULL, 0);
    467467        if (!rc)
    468468        {
     
    486486                int curCapacity = 0;
    487487                cbParameter = sizeof(curCapacity);
    488                 rc = sysctlbyname("hw.acpi.battery.life", &curCapacity, &cbParameter, NULL, NULL);
     488                rc = sysctlbyname("hw.acpi.battery.life", &curCapacity, &cbParameter, NULL, 0);
    489489                if (!rc && curCapacity >= 0)
    490490                    *penmRemainingCapacity = (PDMACPIBATCAPACITY)curCapacity;
  • 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