VirtualBox

Changeset 11350 in vbox for trunk


Ignore:
Timestamp:
Aug 12, 2008 11:25:18 AM (17 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
34518
Message:

iprt: Added RTSystemQueryOSInfo.

Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/system.h

    r11323 r11350  
    4242 */
    4343
     44/**
     45 * Info level for RTSystemGetOSInfo().
     46 */
     47typedef enum RTSYSOSINFO
     48{
     49    RTSYSOSINFO_INVALID = 0,    /**< The usual invalid entry. */
     50    RTSYSOSINFO_PRODUCT,        /**< OS product name. (uname -o) */
     51    RTSYSOSINFO_RELEASE,        /**< OS release. (uname -r) */
     52    RTSYSOSINFO_VERSION,        /**< OS version, optional. (uname -v) */
     53    RTSYSOSINFO_SERVICEPACK,    /**< Service/fix pack level, optional. */
     54    RTSYSOSINFO_END             /**< End of the valid info levels. */
     55} RTSYSOSINFO;
     56
     57
     58/**
     59 * Queries information about the OS.
     60 *
     61 * @returns IPRT status code.
     62 * @retval  VINF_SUCCESS on success.
     63 * @retval  VERR_INVALID_PARAMETER if enmInfo is invalid.
     64 * @retval  VERR_INVALID_POINTER if pszInfoStr is invalid.
     65 * @retval  VERR_BUFFER_OVERFLOW if the buffer is too small. The buffer will
     66 *          contain the chopped off result in this case, provided cchInfo isn't 0.
     67 * @retval  VERR_NOT_SUPPORTED if the info level isn't implemented. The buffer will
     68 *          contain an empty string.
     69 *
     70 * @param   enmInfo         The OS info level.
     71 * @param   pszInfo         Where to store the result.
     72 * @param   cchInfo         The size of the output buffer.
     73 */
     74RTDECL(int) RTSystemQueryOSInfo(RTSYSOSINFO enmInfo, char *pszInfo, size_t cchInfo);
     75
     76
    4477/** @} */
    4578
  • trunk/src/VBox/Runtime/Makefile.kmk

    r11347 r11350  
    289289        generic/RTMpGetCurFrequency-generic.cpp \
    290290        generic/RTMpGetMaxFrequency-generic.cpp \
     291        generic/RTSystemQueryOSInfo-generic.cpp \
    291292        nt/RTErrConvertFromNtStatus.cpp \
    292293        r3/posix/env-posix.cpp \
     
    330331        r3/linux/sched-linux.cpp \
    331332        r3/linux/time-linux.cpp \
     333        r3/posix/RTSystemQueryOSInfo-posix.cpp \
    332334        r3/posix/alloc-posix.cpp \
    333335        r3/posix/dir-posix.cpp \
     
    386388        r3/os2/thread-os2.cpp \
    387389        r3/os2/time-os2.cpp \
     390        r3/posix/RTSystemQueryOSInfo-posix.cpp \
    388391        r3/posix/alloc-posix.cpp \
    389392        r3/posix/dir-posix.cpp \
     
    419422        r3/darwin/mp-darwin.cpp \
    420423        r3/darwin/time-darwin.cpp \
     424        r3/posix/RTSystemQueryOSInfo-posix.cpp \
    421425        r3/posix/dir-posix.cpp \
    422426        r3/posix/env-posix.cpp \
     
    452456        generic/RTMpGetMaxFrequency-generic.cpp \
    453457        r3/freebsd/alloc-freebsd.cpp \
     458        r3/posix/RTSystemQueryOSInfo-posix.cpp \
    454459        r3/posix/dir-posix.cpp \
    455460        r3/posix/env-posix.cpp \
     
    486491        generic/utf16locale-generic.cpp \
    487492        generic/uuid-generic.cpp \
     493        r3/posix/RTSystemQueryOSInfo-posix.cpp \
    488494        r3/posix/dir-posix.cpp \
    489495        r3/posix/env-posix.cpp \
     
    531537        generic/RTFileMove-generic.cpp \
    532538        generic/RTLogWriteDebugger-generic.cpp \
     539        generic/RTSystemQueryOSInfo-generic.cpp \
    533540        generic/RTTimeLocalNow-generic.cpp \
    534541        generic/RTUuidCreate-generic.cpp \
  • trunk/src/VBox/Runtime/testcase/Makefile.kmk

    r11064 r11350  
    8383        tstStrFormat \
    8484        tstStrToNum \
     85        tstSystemQueryOsInfo \
    8586        tstThread-1 \
    8687        tstTime \
     
    292293tstStrToNum_SOURCES = tstStrToNum.cpp
    293294
     295tstSystemQueryOsInfo_SOURCES = tstSystemQueryOsInfo.cpp
     296
    294297tstThread-1_SOURCES = tstThread-1.cpp
    295298
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