VirtualBox

Changeset 890 in vbox for trunk/src/VBox/Runtime/generic


Ignore:
Timestamp:
Feb 14, 2007 9:35:02 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
18607
Message:

RTRand API (feel free to improve the fallback code).

File:
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/generic/rand-stubs-generic.cpp

    r839 r890  
    11/* $Id$ */
    22/** @file
    3  * InnoTek Portable Runtime - File System, Generic Stubs.
     3 * InnoTek Portable Runtime - Random Numbers and Byte Streams, Generic Stubs.
    44 */
    55
     
    2424*   Header Files                                                               *
    2525*******************************************************************************/
    26 #define LOG_GROUP RTLOGGROUP_FS
    27 
    28 #include <iprt/fs.h>
     26#include <iprt/rand.h>
    2927#include <iprt/err.h>
    30 #include <iprt/log.h>
    31 #include <iprt/assert.h>
    32 #include "internal/fs.h"
     28#include "internal/rand.h"
    3329
    3430
    35 
    36 RTR3DECL(int) RTFsQuerySizes(const char *pszFsPath, RTFOFF *pcbTotal, RTFOFF *pcbFree,
    37                              uint32_t *pcbBlock, uint32_t *pcbSector)
     31void rtRandLazyInitNative(void)
    3832{
    39     if (pcbTotal)
    40         *pcbTotal = _2G;
    41     if (pcbFree)
    42         *pcbFree = _1G;
    43     if (pcbBlock)
    44         *pcbBlock = _4K;
    45     if (pcbSector)
    46         *pcbSector = 512;
    47     LogFlow(("RTFsQuerySizes: success stub!\n"));
    48     return VINF_SUCCESS;
    4933}
    5034
    5135
    52 RTR3DECL(int) RTFsQuerySerial(const char *pszFsPath, uint32_t *pu32Serial)
     36int rtRandGenBytesNative(void *pv, size_t cb)
    5337{
    54     if (pu32Serial)
    55         *pu32Serial = 0xc0ffee;
    56     LogFlow(("RTFsQuerySerial: success stub!\n"));
    57     return VINF_SUCCESS;
     38    NOREF(pv);
     39    NOREF(cb);
     40    return VERR_NOT_SUPPORTED;
    5841}
    59 
    60 
    61 RTR3DECL(int) RTFsQueryProperties(const char *pszFsPath, PRTFSPROPERTIES pProperties)
    62 {
    63     pProperties->cbMaxComponent = 255;
    64     pProperties->fCaseSensitive = true;
    65     pProperties->fCompressed = false;
    66     pProperties->fFileCompression = false;
    67     pProperties->fReadOnly = false;
    68     pProperties->fRemote = false;
    69     pProperties->fSupportsUnicode = true;
    70     LogFlow(("RTFsQueryProperties: success stub!\n"));
    71     return VINF_SUCCESS;
    72 }
    73 
     42                   
Note: See TracChangeset for help on using the changeset viewer.

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