Home
last modified time | relevance | path

Searched refs:buffSize (Results 1 – 25 of 40) sorted by relevance

12

/base/startup/init/services/begetctl/
Dparam_cmd.c56 static char *GetLocalBuffer(uint32_t *buffSize) in GetLocalBuffer() argument
59 BEGET_CHECK(buffSize == NULL, *buffSize = sizeof(buffer)); in GetLocalBuffer()
63 static char *GetRealParameter(BShellHandle shell, const char *name, char *buffer, uint32_t buffSize) in GetRealParameter() argument
75 ret = memcpy_s(buffer, buffSize, current, realLen); in GetRealParameter()
77 ret = memcpy_s(buffer, buffSize, "#", 1); in GetRealParameter()
82 realLen = sprintf_s(buffer, buffSize, "%s", current); in GetRealParameter()
84 realLen = sprintf_s(buffer, buffSize, "%s%s", current, name); in GetRealParameter()
87 realLen = sprintf_s(buffer, buffSize, "%s", current); in GetRealParameter()
89 realLen = sprintf_s(buffer, buffSize, "%s", name); in GetRealParameter()
99 uint32_t buffSize = 0; in SetParamShellPrompt() local
[all …]
/base/startup/init/test/moduletest/
Dparam_test_cmds.c34 static char *GetLocalBuffer(uint32_t *buffSize) in GetLocalBuffer() argument
37 if (buffSize != NULL) { in GetLocalBuffer()
38 *buffSize = sizeof(buffer); in GetLocalBuffer()
47 uint32_t buffSize = 0; in CmdReader() local
48 char *buffer = GetLocalBuffer(&buffSize); in CmdReader()
51 uint32_t size = buffSize; in CmdReader()
208 uint32_t buffSize = 0; in BShellParamCmdWatch() local
209 char *buffer = GetLocalBuffer(&buffSize); in BShellParamCmdWatch()
212 int len = sprintf_s(buffer, buffSize, "%s.%zu", argv[1], count); in BShellParamCmdWatch()
225 uint32_t buffSize = 0; in BShellParamCmdInstall() local
[all …]
/base/security/device_security_level/baselib/utils/src/
Dutils_tlv.c70 …e(const TlvCommon *tlv, uint32_t tlvCount, uint8_t *buff, uint32_t maxBuffSize, uint32_t *buffSize) in Serialize() argument
72 if (tlv == NULL || buff == NULL || buffSize == NULL) { in Serialize()
86 *buffSize = curr - buff; in Serialize()
90 uint32_t Deserialize(const uint8_t *buff, uint32_t buffSize, TlvCommon *tlv, uint32_t maxTlvCount, … in Deserialize() argument
97 const uint8_t *boundary = buff + buffSize; in Deserialize()
/base/security/device_security_level/baselib/utils/include/
Dutils_tlv.h37 …(const TlvCommon *tlv, uint32_t tlvCount, uint8_t *buff, uint32_t maxBuffSize, uint32_t *buffSize);
39 uint32_t Deserialize(const uint8_t *buff, uint32_t buffSize, TlvCommon *tlv, uint32_t maxTlvCount, …
/base/startup/init/ueventd/
Dueventd_socket.c31 int buffSize = UEVENT_SOCKET_BUFF_SIZE; in UeventdSocketInit() local
48 setsockopt(sockfd, SOL_SOCKET, SO_RCVBUFFORCE, &buffSize, sizeof(buffSize)); in UeventdSocketInit()
/base/startup/init/services/param/adapter/
Dparam_persistadp.c49 const int buffSize = PARAM_NAME_LEN_MAX + PARAM_CONST_VALUE_LEN_MAX + 10; // 10 max len in LoadPersistParam() local
50 char *buffer = malloc(buffSize); in LoadPersistParam()
56 while (fgets(buffer, buffSize, fp) != NULL) { in LoadPersistParam()
57 buffer[buffSize - 1] = '\0'; in LoadPersistParam()
Dparam_dac.c144 const uint32_t buffSize = PARAM_NAME_LEN_MAX + PARAM_CONST_VALUE_LEN_MAX + 10; // 10 size in LoadParamLabels() local
145 char *buff = (char *)calloc(1, buffSize); in LoadParamLabels()
146 while (fp != NULL && buff != NULL && fgets(buff, buffSize, fp) != NULL) { in LoadParamLabels()
147 buff[buffSize - 1] = '\0'; in LoadParamLabels()
352 const uint32_t buffSize = 1024; // 1024 max buffer for decode in LoadGroupUser_() local
353 char *buff = (char *)calloc(1, buffSize); in LoadGroupUser_()
354 while (fp != NULL && buff != NULL && fgets(buff, buffSize, fp) != NULL) { in LoadGroupUser_()
355 buff[buffSize - 1] = '\0'; in LoadGroupUser_()
/base/useriam/user_auth_framework/common/utils/
Diam_time.cpp32 constexpr uint32_t buffSize = 64; in GetNowTimeString() local
38 char timeStr[buffSize + 1] = {0}; in GetNowTimeString()
/base/security/certificate_manager/test/unittest/src/
Dcm_app_cert_test.cpp395 uint32_t buffSize = MAX_COUNT_CERTIFICATE * sizeof(struct CredentialAbstract); variable
396 … certificateList.credentialAbstract = static_cast<struct CredentialAbstract *>(CmMalloc(buffSize));
402 (void)memset_s(certificateList.credentialAbstract, buffSize, 0, buffSize);
430 uint32_t buffSize = MAX_COUNT_CERTIFICATE * sizeof(struct CredentialAbstract); variable
431 … certificateList.credentialAbstract = static_cast<struct CredentialAbstract *>(CmMalloc(buffSize));
434 (void)memset_s(certificateList.credentialAbstract, buffSize, 0, buffSize);
471 uint32_t buffSize = MAX_COUNT_CERTIFICATE * sizeof(struct CredentialAbstract); variable
472 … certificateList.credentialAbstract = static_cast<struct CredentialAbstract *>(CmMalloc(buffSize));
475 (void)memset_s(certificateList.credentialAbstract, buffSize, 0, buffSize);
Dcm_test_common.cpp75 uint32_t buffSize = MAX_COUNT_CERTIFICATE * sizeof(struct CertAbstract); in InitCertList() local
76 (*cList)->certAbstract = static_cast<struct CertAbstract *>(CmMalloc(buffSize)); in InitCertList()
80 (void)memset_s((*cList)->certAbstract, buffSize, 0, buffSize); in InitCertList()
/base/update/ota_lite/frameworks/source/updater/
Dhota_updater.c421 static int CopyToDloadCompBuffer(const unsigned char *buffer, unsigned int buffSize) in CopyToDloadCompBuffer() argument
423 if (g_currentDloadComp.currentSize + buffSize > MAX_BUFFER_SIZE) { in CopyToDloadCompBuffer()
429 buffer, buffSize) != EOK) { in CopyToDloadCompBuffer()
509 static int HotaDefaultWrite(unsigned char *buffer, unsigned int offset, unsigned int buffSize) in HotaDefaultWrite() argument
511 if ((buffer == NULL) || (buffSize == 0) || (buffSize > MAX_TRANSPORT_BUFF_SIZE)) { in HotaDefaultWrite()
512 … printf("Param is illegal. buffer is NULL or buffSize too big. buffsize = %u.\r\n", buffSize); in HotaDefaultWrite()
523 unsigned int tempBuffSize = buffSize; in HotaDefaultWrite()
620 int HotaWrite(unsigned char *buffer, unsigned int offset, unsigned int buffSize) in HotaWrite() argument
623 return HotaHalWrite(0, buffer, offset, buffSize); in HotaWrite()
626 return HotaDefaultWrite(buffer, offset, buffSize); in HotaWrite()
/base/security/certificate_manager/services/cert_manager_standard/cert_manager_service/main/os_dependency/idl/cm_ipc/
Dcm_ipc_service_serialization.c125 …uint32_t buffSize = sizeof(uint32_t) + (sizeof(uint32_t) + MAX_LEN_SUBJECT_NAME + sizeof(uint32_t)… in CmGetCertListPack() local
127 if (certificateList->size < buffSize) { in CmGetCertListPack()
131 certificateList->size = buffSize; in CmGetCertListPack()
196 uint32_t buffSize = sizeof(uint32_t) + MAX_LEN_CERTIFICATE + sizeof(uint32_t) + in CmServiceGetCertInfoPack() local
198 if (certificateInfo->size < buffSize) { in CmServiceGetCertInfoPack()
202 certificateInfo->size = buffSize; in CmServiceGetCertInfoPack()
/base/security/certificate_manager/interfaces/kits/napi/src/
Dcm_napi_get_app_cert_list_common.cpp101 uint32_t buffSize = (MAX_COUNT_CERTIFICATE * sizeof(struct CredentialAbstract)); in InitAppCertList() local
102 … credentialList->credentialAbstract = static_cast<struct CredentialAbstract *>(CmMalloc(buffSize)); in InitAppCertList()
107 (void)memset_s(credentialList->credentialAbstract, buffSize, 0, buffSize); in InitAppCertList()
Dcm_napi_get_system_cert_list.cpp162 uint32_t buffSize = MAX_COUNT_CERTIFICATE * sizeof(struct CertAbstract); in GetCertListExecute() local
163 context->certificateList->certAbstract = static_cast<struct CertAbstract *>(CmMalloc(buffSize)); in GetCertListExecute()
169 (void)memset_s(context->certificateList->certAbstract, buffSize, 0, buffSize); in GetCertListExecute()
/base/startup/init/services/loopevent/task/
Dle_task.c82 buffer->buffSize = bufferSize; in CreateBuffer()
157 uint8_t *LE_GetBufferInfo(const BufferHandle handle, uint32_t *dataSize, uint32_t *buffSize) in LE_GetBufferInfo() argument
164 if (buffSize) { in LE_GetBufferInfo()
165 *buffSize = (uint32_t)buffer->buffSize; in LE_GetBufferInfo()
/base/hiviewdfx/hilog/services/hilogd/
Dlog_buffer.cpp338 uint64_t buffSize = g_maxBufferSizeByType[logType]; in GetBuffLen() local
339 return buffSize; in GetBuffLen()
342 int32_t HilogBuffer::SetBuffLen(uint16_t logType, uint64_t buffSize) in SetBuffLen() argument
347 if (buffSize < MIN_BUFFER_SIZE || buffSize > MAX_BUFFER_SIZE) { in SetBuffLen()
351 g_maxBufferSizeByType[logType] = buffSize; in SetBuffLen()
/base/startup/init/services/param/base/
Dparam_base.h31 INIT_LOCAL_API int ParamSprintf(char *buffer, size_t buffSize, const char *format, ...);
/base/update/updater/services/package/pkg_package/
Dpkg_upgradefile.cpp122 size_t buffSize = GetUpgradeSignatureLen() + UPGRADE_RESERVE_LEN; in SavePackage() local
123 buffSize = ((UPGRADE_FILE_HEADER_LEN > buffSize) ? UPGRADE_FILE_HEADER_LEN : buffSize); in SavePackage()
124 std::vector<uint8_t> buffer(buffSize); in SavePackage()
183 size_t buffSize = UPGRADE_FILE_HEADER_LEN + sizeof(UpgradeCompInfo) + in LoadPackage() local
185 PKG_CHECK(fileLen > 0 && fileLen >= buffSize, in LoadPackage()
190 PkgBuffer buffer(buffSize); in LoadPackage()
228 size_t buffSize = BUFFER_SIZE; in Verify() local
231 PkgBuffer buffer(buffSize); in Verify()
237 remainBytes = ((remainBytes > buffSize) ? buffSize : remainBytes); in Verify()
/base/startup/init/services/param/manager/
Dparam_server.c171 const int buffSize = PARAM_NAME_LEN_MAX + PARAM_CONST_VALUE_LEN_MAX + 10; // 10 max len in LoadDefaultParam_() local
172 char *buffer = malloc(buffSize); in LoadDefaultParam_()
177 while (fgets(buffer, buffSize, fp) != NULL) { in LoadDefaultParam_()
178 buffer[buffSize - 1] = '\0'; in LoadDefaultParam_()
/base/security/certificate_manager/frameworks/cert_manager_standard/main/os_dependency/cm_ipc/src/
Dcm_ipc_client.c43 …uint32_t buffSize = sizeof(uint32_t) + (sizeof(uint32_t) + MAX_LEN_SUBJECT_NAME + sizeof(uint32_t)… in GetCertListInitOutData() local
45 outListBlob->data = (uint8_t *)CmMalloc(buffSize); in GetCertListInitOutData()
49 outListBlob->size = buffSize; in GetCertListInitOutData()
100 uint32_t buffSize = sizeof(uint32_t) + MAX_LEN_CERTIFICATE + sizeof(uint32_t) + in GetCertInfoInitOutData() local
103 outInfoBlob->data = (uint8_t *)CmMalloc(buffSize); in GetCertInfoInitOutData()
107 outInfoBlob->size = buffSize; in GetCertInfoInitOutData()
298 …uint32_t buffSize = sizeof(uint32_t) + (sizeof(uint32_t) + MAX_LEN_SUBJECT_NAME + sizeof(uint32_t)… in GetAppCertListInitBlob() local
300 outBlob->data = (uint8_t *)CmMalloc(buffSize); in GetAppCertListInitBlob()
304 outBlob->size = buffSize; in GetAppCertListInitBlob()
437 uint32_t buffSize = sizeof(uint32_t) + sizeof(uint32_t) + MAX_LEN_SUBJECT_NAME + in GetAppCertInitBlob() local
[all …]
/base/update/ota_lite/interfaces/kits/
Dhota_updater.h129 int HotaWrite(unsigned char *buffer, unsigned int offset, unsigned int buffSize);
/base/update/updater/test/unittest/updater_binary/
Dupdater_binary_unittest.cpp85 size_t buffSize = 4096; in BuildFileDigest() local
86 PkgBuffer buff(buffSize); in BuildFileDigest()
96 ret = stream->Read(buff, offset, buffSize, readLen); in BuildFileDigest()
/base/update/updater/test/fuzztest/UpdaterStartUpdaterProc_fuzzer/
DUpdaterStartUpdaterProc_fuzzer.cpp62 size_t buffSize = 4096; in BuildFileDigest() local
63 PkgBuffer buff(buffSize); in BuildFileDigest()
73 ret = stream->Read(buff, offset, buffSize, readLen); in BuildFileDigest()
/base/update/updater/test/unittest/package/
Dpkg_test.h81 size_t buffSize = 4096; in BuildFileDigest() local
82 Hpackage::PkgBuffer buff(buffSize); in BuildFileDigest()
92 ret = stream->Read(buff, offset, buffSize, readLen); in BuildFileDigest()
/base/startup/init/services/init/
Dinit_service_socket.c84 int buffSize = SOCKET_BUFF_SIZE; in SetSocketOptionAndBind() local
85 if (setsockopt(sockopt->sockFd, SOL_SOCKET, SO_RCVBUFFORCE, &buffSize, sizeof(buffSize))) { in SetSocketOptionAndBind()

12