/vbox/src/VBox/Runtime/testcase/ |
H A D | tstRTFileAppend-1.cpp | 71 char szBuf[256]; local 72 rc = RTFileRead(hFile, szBuf, 1, &cb); 136 RTTESTI_CHECK_RC(rc = RTFileRead(hFile, szBuf, 10, &cb), VINF_SUCCESS); 138 RTTESTI_CHECK_MSG(RT_FAILURE(rc) || !memcmp(szBuf, "0123456789", 10), ("read the wrong stuff: %.10s - expected 0123456789\n", szBuf)); 154 RTTESTI_CHECK_RC(rc = RTFileRead(hFile, szBuf, 1, NULL), VERR_EOF); 156 RTTESTI_CHECK_RC(rc = RTFileRead(hFile, szBuf, 1, &cb), VINF_SUCCESS); 166 RTTESTI_CHECK_RC(rc = RTFileRead(hFile, szBuf, 10, NULL), VINF_SUCCESS); 167 RTTESTI_CHECK_MSG(RT_FAILURE(rc) || !memcmp(szBuf, "fghijklmno", 10), ("read the wrong stuff: %.10s - expected fghijklmno\n", szBuf)); [all...] |
H A D | tstEnv.cpp | 64 char szBuf[8192]; local 67 CHECK(cch < sizeof(szBuf)); 68 CHECK_RC(RTEnvGetEx(RTENV_DEFAULT, k_pszPathVar, szBuf, sizeof(szBuf), &cch), VINF_SUCCESS); 69 CHECK_RC(RTEnvGetEx(RTENV_DEFAULT, k_pszPathVar, szBuf, sizeof(szBuf), NULL), VINF_SUCCESS); 70 CHECK_RC(RTEnvGetEx(RTENV_DEFAULT, k_pszPathVar, szBuf, 1, &cch), VERR_BUFFER_OVERFLOW); 71 CHECK_RC(RTEnvGetEx(RTENV_DEFAULT, k_pszPathVar, szBuf, 1, NULL), VERR_BUFFER_OVERFLOW); 81 CHECK(cch < sizeof(szBuf)); 82 CHECK_RC(RTEnvGetEx(Env, k_pszPathVar, szBuf, sizeo [all...] |
H A D | tstFileAppendWin-1.cpp | 73 char szBuf[256]; local 111 if (ReadFile(hFile, szBuf, 1, &cb, NULL)) 181 if (!ReadFile(hFile, szBuf, 10, &cb, NULL) || cb != 10) 183 else if (memcmp(szBuf, "0123456789", 10)) 184 MyError("read the wrong stuff: %.10s - expected 0123456789\n", szBuf); 206 if (ReadFile(hFile, szBuf, 1, &cb, NULL) && cb != 0) 216 if (!ReadFile(hFile, szBuf, 10, &cb, NULL) || cb != 10) 218 else if (memcmp(szBuf, "fghijklmno", 10)) 219 MyError("read the wrong stuff: %.10s - expected fghijklmno\n", szBuf);
|
H A D | tstRTMp-1.cpp | 221 char szBuf[64]; local 222 int rc = RTMpGetDescription(idCpuOnline, &szBuf[0], sizeof(szBuf)); 225 RTTestIPrintf(RTTESTLVL_ALWAYS, "RTMpGetDescription -> '%s'\n", szBuf); 227 size_t cch = strlen(szBuf); 228 rc = RTMpGetDescription(idCpuOnline, &szBuf[0], cch); 232 rc = RTMpGetDescription(idCpuOnline, &szBuf[0], cch + 1);
|
H A D | tstRTTcp-1.cpp | 18 char szBuf[4096]; local 22 RT_ZERO(szBuf); 23 RTTESTI_CHECK_RC_RET(RTTcpRead(hSocket, szBuf, sizeof("dude!\n") - 1, NULL), VINF_SUCCESS, VERR_TCP_SERVER_STOP); 24 szBuf[sizeof("dude!\n") - 1] = '\0'; 25 RTTESTI_CHECK_RET(strcmp(szBuf, "dude!\n") == 0, VERR_TCP_SERVER_STOP); 28 RT_ZERO(szBuf); 32 RTTESTI_CHECK_RC_RET(RTTcpWrite(hSocket, szBuf, sizeof(szBuf)), VINF_SUCCESS, VERR_TCP_SERVER_STOP); 33 cbSent += sizeof(szBuf); 68 char szBuf[51 local 90 char szBuf[512]; local 120 char szBuf[512]; local 142 char szBuf[512]; local 176 char szBuf[512]; local [all...] |
H A D | tstRTTimeSpec.cpp | 47 static char szBuf[128]; local 48 RTStrPrintf(szBuf, sizeof(szBuf), "%04d-%02d-%02dT%02u:%02u:%02u.%09u [YD%u WD%u UO%d F%#x]", 60 return szBuf;
|
H A D | tstRTStrCache.cpp | 90 char szBuf[8192]; local 91 uint32_t cch = RTRandAdvU32Ex(hRand, 3, sizeof(szBuf) - 1); 92 RTRandAdvBytes(hRand, szBuf, cch); 93 szBuf[cch] = '\0'; 96 uint8_t b = szBuf[off]; 102 szBuf[off] = b; 104 apszTests[i] = (char *)RTMemDup(szBuf, cch + 1);
|
H A D | tstRTStrFormat.cpp | 66 char szBuf[512]; local 70 size_t cch = RTStrPrintf(szBuf, sizeof(szBuf), "%N", pszFormat, &va); 72 if (strcmp(szBuf, pszExpect)) 76 iLine, pszFormat, szBuf, pszExpect); 82 cch = RTStrPrintf(szBuf, sizeof(szBuf), "%uxxx%Nyyy%u", 43, pszFormat, &va, 43); 84 if ( strncmp(szBuf, "43xxx", 5) 85 || strncmp(szBuf + 5, pszExpect, cchExpect) 86 || strcmp( szBuf [all...] |
/vbox/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxOemHookStatusCodeLib/ |
H A D | VBoxOemHookStatusCodeLib.c | 164 CHAR8 szBuf[128]; local 167 cch = AsciiBSPrint(szBuf, sizeof(szBuf), pszFormat, bs); 168 if (cch >= sizeof(szBuf)) 169 cch = sizeof(szBuf) - 1; 171 && ( szBuf[cch - 1] == '\n' 172 || szBuf[cch - 1] == '\r')) 174 szBuf[cch] = '\0'; 179 VBoxPrintString(szBuf);
|
/vbox/src/VBox/Runtime/VBox/ |
H A D | log-vbox.cpp | 317 char szBuf[RTPATH_MAX]; local 318 RTTimeSpecToString(&TimeSpec, szBuf, sizeof(szBuf)); 319 RTLogLoggerEx(pLogger, 0, ~0U, "Log created: %s\n", szBuf);
|
/vbox/src/VBox/Additions/common/VBoxGuestLib/ |
H A D | VBoxGuestR3LibDaemonize.cpp | 296 char szBuf[256]; local 297 size_t cbPid = RTStrPrintf(szBuf, sizeof(szBuf), "%d\n", 299 RTFileWrite(hPidFile, szBuf, cbPid, NULL);
|
/vbox/src/VBox/Runtime/common/string/ |
H A D | straprintf.cpp | 143 char szBuf[2048]; local 145 char szBuf[256]; 149 Arg.cchBuffer = sizeof(szBuf); 150 Arg.pszBuffer = szBuf; 151 Arg.cch = sizeof(szBuf) - 1; 152 Arg.psz = szBuf; 154 szBuf[0] = '\0'; 160 /* duplicate the string in szBuf */ 161 Assert(Arg.pszBuffer == szBuf); 164 memcpy(psz, szBuf, cbRe [all...] |
/vbox/src/VBox/Runtime/r3/posix/ |
H A D | fs-posix.cpp | 200 char szBuf[1024]; local 203 while (getmntent_r(mounted, &mntEnt, szBuf, sizeof(szBuf)))
|
H A D | process-creation-posix.cpp | 137 char szBuf[1024]; 139 if (getpwnam_r(pszUser, &pw, szBuf, sizeof(szBuf), &ppw) != 0 || ppw == NULL) 816 char szBuf[256]; local 817 size_t cbPid = RTStrPrintf(szBuf, sizeof(szBuf), "%d\n", pid); 818 ssize_t cbIgnored = write(fdPidfile, szBuf, cbPid); NOREF(cbIgnored);
|
/vbox/src/VBox/Devices/EFI/Firmware/VBoxPkg/Library/VBoxDebugLib/ |
H A D | VBoxDebugLib.c | 49 CHAR8 szBuf[256]; local 59 cch = AsciiVSPrint(szBuf, sizeof(szBuf), Format, va); 63 if (cch >= sizeof(szBuf)) 64 cch = sizeof(szBuf) - 1; 65 while (cch > 0 && (szBuf[cch - 1] == '\n' || szBuf[cch - 1] == '\r')) 67 szBuf[cch] = '\0'; 75 VBoxPrintString(szBuf); 91 CHAR8 szBuf[38 local [all...] |
/vbox/src/VBox/Main/src-server/linux/ |
H A D | USBProxyServiceLinux.cpp | 339 char szBuf[WAKE_UP_STRING_LEN]; local 340 rc = RTPipeReadBlocking(mhWakeupPipeR, szBuf, sizeof(szBuf), NULL);
|
H A D | NetIf-linux.cpp | 52 char szBuf[1024]; local 62 while (fgets(szBuf, sizeof(szBuf)-1, fp)) 64 int n = sscanf(szBuf, "%16s %x %x %x %d %d %d %x %d %d %d\n", 89 char szBuf[256]; local 92 RTStrPrintf(szBuf, sizeof(szBuf), "/sys/class/net/%s/speed", pszName); 93 FILE *fp = fopen(szBuf, "r"); 104 RTStrPrintf(szBuf, sizeof(szBuf), "/sy [all...] |
H A D | PerformanceLinux.cpp | 145 char szBuf[128]; local 146 if (fgets(szBuf, sizeof(szBuf), f)) 148 if (sscanf(szBuf, "cpu %llu %llu %llu %llu %llu %llu %llu", 157 if (fgets(szBuf, sizeof(szBuf), f)) 159 if (sscanf(szBuf, "cpu0 %llu %llu %llu %llu %llu %llu %llu", 373 char szBuf[128]; local 374 while (fgets(szBuf, sizeof(szBuf), 472 char szBuf[128]; local 531 char szBuf[128]; local [all...] |
/vbox/src/VBox/HostDrivers/Support/linux/ |
H A D | SUPLib-linux.cpp | 266 char szBuf[256]; local 267 int rc = RTSystemQueryOSInfo(RTSYSOSINFO_RELEASE, szBuf, sizeof(szBuf)); 274 rc = RTStrToUInt32Ex(szBuf, &pszNext, 10, &uA);
|
/vbox/src/VBox/VMM/testcase/ |
H A D | tstVMREQ.cpp | 75 char szBuf[1024]; local 76 RTStrPrintfV(szBuf, sizeof(szBuf), pszFormat, va); 77 if (strcmp(szBuf, "some error string")) 79 RTPrintf(TESTCASE ": RTStrPrintfV -> '%s'!\n", szBuf); 108 char szBuf[1024]; local 109 RTStrPrintfV(szBuf, sizeof(szBuf), pszFormat, *pva); 110 if (strcmp(szBuf, "hello world")) 112 RTPrintf(TESTCASE ": RTStrPrintfV -> '%s'!\n", szBuf); [all...] |
/vbox/src/VBox/Main/src-server/generic/ |
H A D | NetIf-generic.cpp | 228 char szBuf[128]; /* We are not interested in long error messages. */ local 229 if (fgets(szBuf, sizeof(szBuf), fp)) 232 char *pLast = szBuf + strlen(szBuf) - 1; 233 if (pLast >= szBuf && *pLast == '\n') 236 if (!strncmp(VBOXNETADPCTL_NAME ":", szBuf, sizeof(VBOXNETADPCTL_NAME))) 241 "%s", szBuf); 246 size_t cbNameLen = strlen(szBuf) + 1; 252 strcpy(pInfo->szShortName, szBuf); [all...] |
/vbox/src/VBox/Main/src-server/solaris/ |
H A D | USBProxyServiceSolaris.cpp | 267 char szBuf[PATH_MAX + 48]; local 268 RTStrPrintf(szBuf, sizeof(szBuf), "%#x:%#x:%d:%s", pCur->idVendor, pCur->idProduct, pCur->bcdDevice, pathBuf); 269 pCur->pszAddress = RTStrDup(szBuf);
|
/vbox/src/apps/adpctl/ |
H A D | VBoxNetAdpCtl.cpp | 140 char szBuf[1024]; local 175 for (cAddrs = 0; cAddrs < MAX_ADDRESSES && fgets(szBuf, sizeof(szBuf), fp);) 177 int cbSkipWS = strspn(szBuf, " \t"); 178 char *pszWord = strtok(szBuf + cbSkipWS, " ");
|
/vbox/src/VBox/VMM/VMMR3/ |
H A D | DBGFDisas.cpp | 581 char szBuf[512]; local 582 DISFormatYasmEx(&State.Cpu, szBuf, sizeof(szBuf), 604 cch = RTStrPrintf(pszOutput, cbOutput, "%s", szBuf); 606 cch = RTStrPrintf(pszOutput, cbOutput, "%04x:%04x %s", Sel, (unsigned)GCPtr, szBuf); 610 cch = RTStrPrintf(pszOutput, cbOutput, "%RGv %s", GCPtr, szBuf); 612 cch = RTStrPrintf(pszOutput, cbOutput, "%08RX32 %s", (uint32_t)GCPtr, szBuf); 617 cch = RTStrPrintf(pszOutput, cbOutput, "%04x:%RGv %s", Sel, GCPtr, szBuf); 619 cch = RTStrPrintf(pszOutput, cbOutput, "%04x:%08RX32 %s", Sel, (uint32_t)GCPtr, szBuf); 629 szBuf); 759 char szBuf[256]; local 794 char szBuf[256]; local [all...] |
/vbox/src/VBox/Devices/Network/testcase/ |
H A D | tstIntNet-1.cpp | 614 char szBuf[1024]; local 624 while (fgets(szBuf, sizeof(szBuf)-1, fp)) 626 int n = sscanf(szBuf, "%16s %x %x %x %d %d %d %x %d %d %d\n",
|