VirtualBox

Changeset 60427 in vbox for trunk/include


Ignore:
Timestamp:
Apr 11, 2016 2:30:32 PM (9 years ago)
Author:
vboxsync
Message:

Runtime/linux/sysfs.cpp: Fixes for the tstRTSystemQueryDmi testcase, don't seek to the end of the file to get the file size because that is often bogus for sysfs entries (the indicated file size is much bigger than what can be read really). Fix an inconsistency in RTLinuxSysFsReadStrFileV() which would return a VERR_BUFFER_OVERFLOW error if the given buffer matches the string size if there is a newline end the end which is filtered out anyway. Small adjustment for RTLinuxSysFsWriteStr() to also write zero terminators if the string size is not given

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/linux/sysfs.h

    r60393 r60427  
    146146 * @param   hFile       The file descriptor returned by RTLinuxSysFsOpenEx or RTLinuxSysFsOpenExV.
    147147 * @param   pszBuf      The string to write.
    148  * @param   cchBuf      The string length without zero terminator - if 0 is given
    149  *                      the string length is determined before writing.
     148 * @param   cchBuf      The length of the string to write - if 0 is given
     149 *                      the string length is determined before writing it including the zero terminator.
    150150 * @param   pcchWritten Where to store the amount of characters written on success - optional.
    151151 */
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