Home
last modified time | relevance | path

Searched refs:pFile (Results 1 – 25 of 34) sorted by relevance

12

/ohos5.0/base/telephony/sms_mms/frameworks/native/mms/src/
H A Dmms_buffer.cpp103 FILE *pFile = nullptr; in WriteBufferFromFile() local
119 pFile = fopen(realPath, "rb"); in WriteBufferFromFile()
120 if (pFile == nullptr) { in WriteBufferFromFile()
124 (void)fseek(pFile, 0, SEEK_END); in WriteBufferFromFile()
125 long fileLen = ftell(pFile); in WriteBufferFromFile()
127 (void)fclose(pFile); in WriteBufferFromFile()
137 (void)fclose(pFile); in WriteBufferFromFile()
141 (void)fseek(pFile, 0, SEEK_SET); in WriteBufferFromFile()
142 totolLength_ = fread(pduBuffer_.get(), 1, fileLen, pFile); in WriteBufferFromFile()
143 (void)fclose(pFile); in WriteBufferFromFile()
H A Dmms_body_part.cpp435 FILE *pFile = nullptr; in WriteBodyFromFile() local
450 pFile = fopen(realPath, "rb"); in WriteBodyFromFile()
451 if (pFile == nullptr) { in WriteBodyFromFile()
455 (void)fseek(pFile, 0, SEEK_END); in WriteBodyFromFile()
456 long fileLen = ftell(pFile); in WriteBodyFromFile()
458 (void)fclose(pFile); in WriteBodyFromFile()
467 (void)fclose(pFile); in WriteBodyFromFile()
472 (void)fseek(pFile, 0, SEEK_SET); in WriteBodyFromFile()
473 bodyLen_ = fread(pbodyPartBuffer_.get(), 1, fileLen, pFile); in WriteBodyFromFile()
474 (void)fclose(pFile); in WriteBodyFromFile()
/ohos5.0/foundation/resourceschedule/resource_schedule_service/ressched/test/fuzztest/loadfromconfigfile_fuzzer/
H A Dloadfromconfigfile_fuzzer.cpp29 FILE *pFile = fopen(fuzzedFile.c_str(), "wb"); in DoSomethingInterestingWithMyAPI() local
30 if (!pFile) { in DoSomethingInterestingWithMyAPI()
34 … int32_t retCode = fwrite(reinterpret_cast<const void*>(data), size, 1, pFile); // 1 means count=1 in DoSomethingInterestingWithMyAPI()
36 (void)fclose(pFile); in DoSomethingInterestingWithMyAPI()
37 pFile = nullptr; in DoSomethingInterestingWithMyAPI()
41 (void)fclose(pFile); in DoSomethingInterestingWithMyAPI()
42 pFile = nullptr; in DoSomethingInterestingWithMyAPI()
/ohos5.0/foundation/resourceschedule/resource_schedule_service/ressched/test/fuzztest/loadfromcustconfigfile_fuzzer/
H A Dloadfromcustconfigfile_fuzzer.cpp29 FILE *pFile = fopen(fuzzedFile.c_str(), "wb"); in DoSomethingInterestingWithMyAPI() local
30 if (!pFile) { in DoSomethingInterestingWithMyAPI()
34 … int32_t retCode = fwrite(reinterpret_cast<const void*>(data), size, 1, pFile); // 1 means count=1 in DoSomethingInterestingWithMyAPI()
36 (void)fclose(pFile); in DoSomethingInterestingWithMyAPI()
37 pFile = nullptr; in DoSomethingInterestingWithMyAPI()
41 (void)fclose(pFile); in DoSomethingInterestingWithMyAPI()
42 pFile = nullptr; in DoSomethingInterestingWithMyAPI()
/ohos5.0/foundation/resourceschedule/soc_perf/test/fuzztest/loadconfigxmlfile_fuzzer/
H A Dloadconfigxmlfile_fuzzer.cpp45 FILE *pFile = fopen(fuzzedFile.c_str(), "wb"); in DoSomethingInterestingWithMyAPI() local
46 if (!pFile) { in DoSomethingInterestingWithMyAPI()
50 … int32_t retCode = fwrite(reinterpret_cast<const void*>(data), size, 1, pFile); // 1 means count=1 in DoSomethingInterestingWithMyAPI()
52 (void)fclose(pFile); in DoSomethingInterestingWithMyAPI()
53 pFile = nullptr; in DoSomethingInterestingWithMyAPI()
57 (void)fclose(pFile); in DoSomethingInterestingWithMyAPI()
58 pFile = nullptr; in DoSomethingInterestingWithMyAPI()
/ohos5.0/base/startup/init/test/fuzztest/mountallwithfstabfile_fuzzer/
H A Dmountallwithfstabfile_fuzzer.cpp24 FILE *pFile = nullptr; in FuzzMountAllWithFstabFile() local
25 pFile = fopen("fstab.test", "w+"); in FuzzMountAllWithFstabFile()
26 if (pFile == nullptr) { in FuzzMountAllWithFstabFile()
30 if (fwrite(data, 1, size, pFile) != size) { in FuzzMountAllWithFstabFile()
32 (void)fclose(pFile); in FuzzMountAllWithFstabFile()
35 (void)fclose(pFile); in FuzzMountAllWithFstabFile()
/ohos5.0/base/startup/init/test/fuzztest/readfstabfromfile_fuzzer/
H A Dreadfstabfromfile_fuzzer.cpp24 FILE *pFile = nullptr; in FuzzReadFstabFromFile() local
25 pFile = fopen("fstab.test", "w+"); in FuzzReadFstabFromFile()
26 if (pFile == nullptr) { in FuzzReadFstabFromFile()
30 if (fwrite(data, 1, size, pFile) != size) { in FuzzReadFstabFromFile()
32 (void)fclose(pFile); in FuzzReadFstabFromFile()
35 (void)fclose(pFile); in FuzzReadFstabFromFile()
/ohos5.0/base/startup/init/test/fuzztest/releasefstab_fuzzer/
H A Dreleasefstab_fuzzer.cpp23 FILE *pFile = nullptr; in FuzzReleaseFstab() local
24 pFile = fopen("fstab.test", "w+"); in FuzzReleaseFstab()
25 if (pFile == nullptr) { in FuzzReleaseFstab()
29 if (fwrite(data, 1, size, pFile) != size) { in FuzzReleaseFstab()
31 (void)fclose(pFile); in FuzzReleaseFstab()
34 (void)fclose(pFile); in FuzzReleaseFstab()
/ohos5.0/base/startup/init/test/fuzztest/umountallwithfstabfile_fuzzer/
H A Dumountallwithfstabfile_fuzzer.cpp24 FILE *pFile = nullptr; in FuzzUmountAllWithFstabFile() local
25 pFile = fopen("fstab.test", "w+"); in FuzzUmountAllWithFstabFile()
26 if (pFile == nullptr) { in FuzzUmountAllWithFstabFile()
30 if (fwrite(data, 1, size, pFile) != size) { in FuzzUmountAllWithFstabFile()
32 (void)fclose(pFile); in FuzzUmountAllWithFstabFile()
35 (void)fclose(pFile); in FuzzUmountAllWithFstabFile()
/ohos5.0/base/startup/init/test/fuzztest/mountallwithfstab_fuzzer/
H A Dmountallwithfstab_fuzzer.cpp23 FILE *pFile = nullptr; in FuzzMountAllWithFstab() local
24 pFile = fopen("fstab.test", "w+"); in FuzzMountAllWithFstab()
25 if (pFile == nullptr) { in FuzzMountAllWithFstab()
29 if (fwrite(data, 1, size, pFile) != size) { in FuzzMountAllWithFstab()
31 (void)fclose(pFile); in FuzzMountAllWithFstab()
34 (void)fclose(pFile); in FuzzMountAllWithFstab()
/ohos5.0/foundation/bundlemanager/bundle_framework/test/fuzztest/fuzztest_others/parse_fuzzer/
H A Dparse_fuzzer.cpp36 auto pFile = fopen("myHap.hap", "wb"); in DoSomethingInterestingWithMyAPI() local
37 if (pFile == nullptr) { in DoSomethingInterestingWithMyAPI()
42 retCode = fputs(reinterpret_cast<const char*>(data), pFile); in DoSomethingInterestingWithMyAPI()
44 fclose(pFile); in DoSomethingInterestingWithMyAPI()
47 retCode = fclose(pFile); in DoSomethingInterestingWithMyAPI()
51 pFile = nullptr; in DoSomethingInterestingWithMyAPI()
/ohos5.0/base/startup/init/test/fuzztest/findfstabitemformountpoint_fuzzer/
H A Dfindfstabitemformountpoint_fuzzer.cpp25 FILE *pFile = nullptr; in FuzzFindFstabItemForMountPoint() local
26 pFile = fopen("fstab.test", "w+"); in FuzzFindFstabItemForMountPoint()
27 if (pFile == nullptr) { in FuzzFindFstabItemForMountPoint()
31 if (fwrite(data, 1, size, pFile) != size) { in FuzzFindFstabItemForMountPoint()
33 (void)fclose(pFile); in FuzzFindFstabItemForMountPoint()
36 (void)fclose(pFile); in FuzzFindFstabItemForMountPoint()
/ohos5.0/base/startup/init/test/fuzztest/findfstabitemforpath_fuzzer/
H A Dfindfstabitemforpath_fuzzer.cpp25 FILE *pFile = nullptr; in FuzzFindFstabItemForPath() local
26 pFile = fopen("fstab.test", "w+"); in FuzzFindFstabItemForPath()
27 if (pFile == nullptr) { in FuzzFindFstabItemForPath()
31 if (fwrite(data, 1, size, pFile) != size) { in FuzzFindFstabItemForPath()
33 (void)fclose(pFile); in FuzzFindFstabItemForPath()
36 (void)fclose(pFile); in FuzzFindFstabItemForPath()
/ohos5.0/base/startup/init/test/fuzztest/parsefstabperline_fuzzer/
H A Dparsefstabperline_fuzzer.cpp25 FILE *pFile = nullptr; in FuzzParseFstabPerLine() local
26 pFile = fopen("fstab.test", "w+"); in FuzzParseFstabPerLine()
27 if (pFile == nullptr) { in FuzzParseFstabPerLine()
31 if (fwrite(data, 1, size, pFile) != size) { in FuzzParseFstabPerLine()
33 (void)fclose(pFile); in FuzzParseFstabPerLine()
36 (void)fclose(pFile); in FuzzParseFstabPerLine()
/ohos5.0/base/startup/init/test/fuzztest/mountoneitem_fuzzer/
H A Dmountoneitem_fuzzer.cpp25 FILE *pFile = nullptr; in FuzzMountOneItem() local
26 pFile = fopen("fstab.test", "w+"); in FuzzMountOneItem()
27 if (pFile == nullptr) { in FuzzMountOneItem()
31 if (fwrite(data, 1, size, pFile) != size) { in FuzzMountOneItem()
33 (void)fclose(pFile); in FuzzMountOneItem()
36 (void)fclose(pFile); in FuzzMountOneItem()
/ohos5.0/base/startup/init/test/fuzztest/getblockdevicebymountpoint_fuzzer/
H A Dgetblockdevicebymountpoint_fuzzer.cpp24 FILE *pFile = nullptr; in FuzzGetBlockDeviceByMountPoint() local
25 pFile = fopen("fstab.test", "w+"); in FuzzGetBlockDeviceByMountPoint()
26 if (pFile == nullptr) { in FuzzGetBlockDeviceByMountPoint()
30 if (fwrite(data, 1, size, pFile) != size) { in FuzzGetBlockDeviceByMountPoint()
32 (void)fclose(pFile); in FuzzGetBlockDeviceByMountPoint()
35 (void)fclose(pFile); in FuzzGetBlockDeviceByMountPoint()
/ohos5.0/base/startup/init/test/fuzztest/getblockdevicebyname_fuzzer/
H A Dgetblockdevicebyname_fuzzer.cpp25 FILE *pFile = nullptr; in FuzzGetBlockDeviceByName() local
26 pFile = fopen("fstab.test", "w+"); in FuzzGetBlockDeviceByName()
27 if (pFile == nullptr) { in FuzzGetBlockDeviceByName()
31 if (fwrite(data, 1, size, pFile) != size) { in FuzzGetBlockDeviceByName()
33 (void)fclose(pFile); in FuzzGetBlockDeviceByName()
36 (void)fclose(pFile); in FuzzGetBlockDeviceByName()
/ohos5.0/foundation/bundlemanager/bundle_framework/test/fuzztest/fuzztest_others/parsesyscap_fuzzer/
H A Dparsesyscap_fuzzer.cpp37 auto pFile = fopen("rpcid.sc", "wb"); in DoSomethingInterestingWithMyAPI() local
38 if (pFile == nullptr) { in DoSomethingInterestingWithMyAPI()
44 retCode = fputs(info.c_str(), pFile); in DoSomethingInterestingWithMyAPI()
46 fclose(pFile); in DoSomethingInterestingWithMyAPI()
49 retCode = fclose(pFile); in DoSomethingInterestingWithMyAPI()
53 pFile = nullptr; in DoSomethingInterestingWithMyAPI()
/ohos5.0/base/startup/init/test/fuzztest/readfileindir_fuzzer/
H A Dreadfileindir_fuzzer.cpp44 FILE *pFile = nullptr; in FuzzReadFileInDir() local
45 pFile = fopen("ReadFileInDir.test", "w+"); in FuzzReadFileInDir()
46 if (pFile == nullptr) { in FuzzReadFileInDir()
50 if (fwrite(data, 1, size, pFile) != size) { in FuzzReadFileInDir()
52 (void)fclose(pFile); in FuzzReadFileInDir()
55 (void)fclose(pFile); in FuzzReadFileInDir()
/ohos5.0/base/update/updater/test/fuzztest/readfstabfromfile_fuzzer/
H A Dreadfstabfromfile_fuzzer.cpp32 FILE *pFile; in FuzzReadFstabFromFile() local
36 pFile = fopen("ReadFstabFromFile.txt", "w+"); in FuzzReadFstabFromFile()
37 if (pFile == nullptr) { in FuzzReadFstabFromFile()
42 (void)fwrite(data, 1, size, pFile); in FuzzReadFstabFromFile()
43 (void)fclose(pFile); in FuzzReadFstabFromFile()
/ohos5.0/base/telephony/sms_mms/services/mms/
H A Dmms_network_client.cpp373 FILE *pFile = nullptr; in GetMmsPduFromFile() local
380 pFile = fopen(realPath, "rb"); in GetMmsPduFromFile()
381 if (pFile == nullptr) { in GetMmsPduFromFile()
387 long fileLen = ftell(pFile); in GetMmsPduFromFile()
389 (void)fclose(pFile); in GetMmsPduFromFile()
396 (void)fclose(pFile); in GetMmsPduFromFile()
403 (void)fclose(pFile); in GetMmsPduFromFile()
493 FILE *pFile = nullptr; in WriteBufferToFile() local
495 if (!pFile) { in WriteBufferToFile()
502 (void)fclose(pFile); in WriteBufferToFile()
[all …]
/ohos5.0/base/telephony/sms_mms/frameworks/js/napi/src/
H A Dnapi_send_recv_mms.cpp81 if (pFile == nullptr) { in GetMmsPduFromFile()
86 (void)fseek(pFile, 0, SEEK_END); in GetMmsPduFromFile()
87 long fileLen = ftell(pFile); in GetMmsPduFromFile()
89 (void)fclose(pFile); in GetMmsPduFromFile()
96 (void)fclose(pFile); in GetMmsPduFromFile()
100 (void)fseek(pFile, 0, SEEK_SET); in GetMmsPduFromFile()
109 (void)fclose(pFile); in GetMmsPduFromFile()
325 if (pFile == nullptr) { in WriteBufferToFile()
330 (void)fclose(pFile); in WriteBufferToFile()
406 if (pFile == nullptr) { in DownloadExceptionCase()
[all …]
/ohos5.0/foundation/multimedia/audio_framework/frameworks/native/audiocapturer/test/example/
H A Daudio_capturer_test.cpp130 …bool StartCapture(const unique_ptr<AudioCapturer> &audioCapturer, bool isBlocking, FILE *pFile) co… in StartCapture()
169 if (fwrite(buffer.get(), size, bytesRead, pFile) != bytesRead) { in StartCapture()
224 FILE *pFile = fopen(filePath.c_str(), "wb"); in TestRecording() local
225 if (pFile == nullptr) { in TestRecording()
230 if (!StartCapture(audioCapturer, isBlocking, pFile)) { in TestRecording()
232 fclose(pFile); in TestRecording()
236 fflush(pFile); in TestRecording()
248 fclose(pFile); in TestRecording()
/ohos5.0/foundation/multimedia/audio_framework/frameworks/native/audiorenderer/test/example/
H A Daudio_voip_test.cpp201 …bool StartCapture(const unique_ptr<AudioCapturer> &audioCapturer, bool isBlocking, FILE *pFile) co… in StartCapture()
235 if (fwrite(buffer.get(), size, bytesRead, pFile) != bytesRead) { in StartCapture()
261 FILE *pFile = fopen(capturePath, "wb"); in TestRecording() local
262 if (pFile == nullptr) { in TestRecording()
267 if (!StartCapture(audioCapturer, isBlocking, pFile)) { in TestRecording()
269 fclose(pFile); in TestRecording()
273 fflush(pFile); in TestRecording()
285 fclose(pFile); in TestRecording()
/ohos5.0/drivers/peripheral/audio/hal/hdi_binder/server/src/
H A Dhdf_audio_pnp_uevent_hdmi.c164 FILE *pFile = fopen(HDMI_STATUS_FILE_PATH, "r"); in InitializeHdmiStateInternal() local
165 if (pFile == NULL) { in InitializeHdmiStateInternal()
170 size_t length = fread(buffer, 1, FILE_BUFFER_SIZE, pFile); in InitializeHdmiStateInternal()
172 (void)fclose(pFile); in InitializeHdmiStateInternal()
177 (void)fclose(pFile); in InitializeHdmiStateInternal()

12