/developtools/hdc/src/host/ |
H A D | translate.cpp | 236 string ForwardPort(const char *input, FormatCommand *outCmd) in ForwardPort() argument 239 const char *pExtra = input + 6; // CMDSTR_FORWARD_FPORT CMDSTR_FORWARD_RPORT + " " size in ForwardPort() 240 if (!strncmp(input, CMDSTR_FORWARD_FPORT.c_str(), CMDSTR_FORWARD_FPORT.size()) && !strcmp(pExtra, "ls")) { in ForwardPort() 242 } else if (!strncmp(input, CMDSTR_FORWARD_FPORT.c_str(), CMDSTR_FORWARD_FPORT.size()) && in ForwardPort() 246 outCmd->parameters = input + FORWORD_PORT_RM_BUF_SIZE; in ForwardPort() 249 const char *p = input + FORWORD_PORT_OTHER_BUF_SIZE; in ForwardPort() 263 outCmd->parameters = input; in ForwardPort() 268 string RunMode(const char *input, FormatCommand *outCmd) in RunMode() argument 272 outCmd->parameters = input + CMDSTR_TARGET_MODE.size() + 1; // with ' ' in RunMode() 280 const char *tmp = input in RunMode() 294 TargetReboot(const char *input, FormatCommand *outCmd) TargetReboot() argument 311 string input = string(inputRaw, sizeInputRaw); String2FormatCommand() local [all...] |
/developtools/hapsigner/hapsigntool_cpp/utils/src/ |
H A D | file_utils.cpp | 93 int FileUtils::Read(std::ifstream& input, std::string& ret) in Read() argument 96 if (input.rdstate() != 0) { in Read() 97 PrintErrorNumberMsg("IO_ERROR", IO_ERROR, "invalid input stream"); in Read() 102 while (input) { in Read() 103 input.read(&buffer[0], buffer.size()); in Read() 104 ret.append(&buffer[0], input.gcount()); in Read() 114 PrintErrorNumberMsg("IO_ERROR", IO_ERROR, "open input file: " + path + " failed"); in ReadFile() 137 int FileUtils::ReadInputByOffsetAndLength(std::ifstream& input, size_t offset, size_t length, std::string& ret) in ReadInputByOffsetAndLength() argument 143 input.seekg(offset); in ReadInputByOffsetAndLength() 144 if (ReadInputByLength(input, lengt in ReadInputByOffsetAndLength() 151 ReadInputByLength(std::ifstream& input, size_t length, std::string& ret) ReadInputByLength() argument 182 AppendWriteFileByOffsetToFile(std::ifstream& input, std::ofstream& out, size_t offset, size_t size) AppendWriteFileByOffsetToFile() argument 248 WriteInputToOutPut(std::ifstream& input, std::ofstream& output, size_t length) WriteInputToOutPut() argument 294 WriteInputToOutPut(const std::string& input, const std::string& output) WriteInputToOutPut() argument [all...] |
H A D | hash_utils.cpp | 61 std::ifstream input(inputFile, std::ios::binary); in GetFileDigest() 62 if (0 != input.rdstate()) { in GetFileDigest() 63 PrintErrorNumberMsg("VERIFY_ERROR", VERIFY_ERROR, "failed to get input stream object!"); in GetFileDigest() 71 while (!input.eof()) { in GetFileDigest() 72 input.read(buffer, HASH_LEN); in GetFileDigest() 74 if (input.fail() && !input.eof()) { in GetFileDigest() 79 std::streamsize readLen = input.gcount(); in GetFileDigest()
|
/developtools/profiler/device/plugins/diskio_plugin/src/ |
H A D | io_stats.cpp | 47 std::ifstream input(SYSTIME_PATH, std::ios::in); in GetSystime() 48 CHECK_TRUE(!input.fail(), systime, "%s:open %s failed, errno = %d", __func__, SYSTIME_PATH, errno); in GetSystime() 50 if (!input.good()) { in GetSystime() 54 getline(input, line); in GetSystime() 65 input.close(); in GetSystime() 83 std::ifstream input(CPU_PATH, std::ios::in); in ParseCpuStats() 84 CHECK_TRUE(!input.fail(), false, "%s: open %s failed, errno = %d", __func__, CPU_PATH, errno); in ParseCpuStats() 86 if (!input.good()) { in ParseCpuStats() 90 getline(input, line); in ParseCpuStats() 97 } while (!input in ParseCpuStats() [all...] |
/developtools/hapsigner/hapsigntool_cpp_test/unittest/utils/ |
H A D | file_utils_test.cpp | 87 std::ifstream input(inputFile, std::ios::binary); in Worker() 89 if (!input) { in Worker() 98 int res = FileUtils::WriteInputToOutPut(input, output, length); in Worker() 105 input.close(); in Worker() 199 * @tc.steps: step1. make the input file is not exist in HWTEST_F() 200 * @tc.expected: step1. open input file failed, the return will be IO_ERROR. in HWTEST_F() 203 std::ifstream input("./utilsxxx/unsigned-file.out", std::ios::binary); in HWTEST_F() 204 int result = FileUtils::Read(input, outstr); in HWTEST_F() 219 * @tc.steps: step1. make the input file is not exist in HWTEST_F() 220 * @tc.expected: step1. open input fil in HWTEST_F() [all...] |
/developtools/hdc/hdc_rust/src/serializer/ |
H A D | serialize.rs | 110 fn parse(&mut self, input: Vec<u8>) -> io::Result<()> { in parse() 121 ptr: input.as_ptr() as *const libc::c_char, in parse() 122 size: input.len() as u64, in parse() 154 fn parse(&mut self, input: Vec<u8>) -> io::Result<()> { in parse() 158 ptr: input.as_ptr() as *const libc::c_char, in parse() 159 size: input.len() as u64, in parse() 206 fn parse(&mut self, input: Vec<u8>) -> io::Result<()> { in parse() 223 ptr: input.as_ptr() as *const libc::c_char, in parse() 224 size: input.len() as u64, in parse() 264 fn parse(&mut self, input [all...] |
/developtools/hapsigner/hapsigntool_cpp/zip/src/ |
H A D | zip_entry_data.cpp | 30 ZipEntryData* ZipEntryData::GetZipEntry(std::ifstream& input, uint32_t entryOffset, uint32_t fileSize) in GetZipEntry() argument 35 if (FileUtils::ReadInputByOffsetAndLength(input, entryOffset, ZipEntryHeader::HEADER_LENGTH, retStr) != 0) { in GetZipEntry() 46 if (!ReadEntryFileNameAndExtraByOffset(input, entryHeader, offset)) { in GetZipEntry() 53 input.seekg(fileSize, std::ios::cur); in GetZipEntry() 60 if (FileUtils::ReadInputByLength(input, DataDescriptor::DES_LENGTH, retStr) != 0) { in GetZipEntry() 76 bool ZipEntryData::ReadEntryFileNameAndExtraByOffset(std::ifstream& input, ZipEntryHeader* entryHeader, in ReadEntryFileNameAndExtraByOffset() argument 81 if (FileUtils::ReadInputByLength(input, entryHeader->GetFileNameLength(), fileNameStr) != 0) { in ReadEntryFileNameAndExtraByOffset() 90 if (FileUtils::ReadInputByLength(input, entryHeader->GetExtraLength(), extraStr) != 0) { in ReadEntryFileNameAndExtraByOffset()
|
H A D | zip_signer.cpp | 63 EndOfCentralDirectory* ZipSigner::GetZipEndOfCentralDirectory(std::ifstream& input) in GetZipEndOfCentralDirectory() argument 66 input.seekg(0, std::ios::end); in GetZipEndOfCentralDirectory() 67 uint64_t fileSize = static_cast<uint64_t>(input.tellg()); in GetZipEndOfCentralDirectory() 69 input.seekg(0, std::ios::beg); in GetZipEndOfCentralDirectory() 81 int ret = FileUtils::ReadFileByOffsetAndLength(input, m_eOCDOffset, eocdLength, retStr); in GetZipEndOfCentralDirectory() 95 m_eOCDOffset = static_cast<uint64_t>(input.tellg()) - eocdMaxLength; in GetZipEndOfCentralDirectory() 98 ret = FileUtils::ReadFileByOffsetAndLength(input, m_eOCDOffset, eocdMaxLength, retStr); in GetZipEndOfCentralDirectory() 116 bool ZipSigner::GetZipCentralDirectory(std::ifstream& input) in GetZipCentralDirectory() argument 118 input.seekg(0, std::ios::beg); in GetZipCentralDirectory() 125 int ret = FileUtils::ReadFileByOffsetAndLength(input, m_cDOffse in GetZipCentralDirectory() 178 GetZipEntries(std::ifstream& input) GetZipEntries() argument 201 ToFile(std::ifstream& input, std::ofstream& output) ToFile() argument [all...] |
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/utils/ |
H A D | FileUtils.java | 117 * Read byte from input file. 128 * Read byte from input stream. 130 * @param input Input stream 134 public static byte[] read(InputStream input) throws IOException { in read() argument 138 while ((read = input.read(buffer)) != FILE_END) { in read() 143 close(input); in read() 148 * Read byte from input file. 150 * @param file input file 156 try (FileInputStream input = new FileInputStream(file)) { in readFileByOffsetAndLength() 157 return readInputByOffsetAndLength(input, offse in readFileByOffsetAndLength() 170 readInputByOffsetAndLength(InputStream input, long offset, long length) readInputByOffsetAndLength() argument 182 readInputByLength(InputStream input, long length) readInputByLength() argument 195 writeInputToOutPut(InputStream input, OutputStream output, long length) writeInputToOutPut() argument 430 toByteArray(final InputStream input, final int size) toByteArray() argument [all...] |
/developtools/smartperf_host/trace_streamer/src/base/ |
H A D | string_help.cpp | 109 std::string StrTrim(const std::string &input) in StrTrim() argument 111 std::string str = input; in StrTrim() 121 void StrTrim(std::string &input) in StrTrim() argument 123 if (input.empty()) { in StrTrim() 126 input.erase(0, input.find_first_not_of(' ')); in StrTrim() 127 input.erase(input.find_last_not_of(' ') + 1); in StrTrim()
|
H A D | string_help.h | 31 std::string StrTrim(const std::string &input); 32 void StrTrim(std::string &input);
|
/developtools/hapsigner/hapsigntool_cpp/zip/include/ |
H A D | zip_signer.h | 58 bool ToFile(std::ifstream& input, std::ofstream& output); 94 EndOfCentralDirectory* GetZipEndOfCentralDirectory(std::ifstream& input); 96 bool GetZipCentralDirectory(std::ifstream& input); 98 std::string GetSigningBlock(std::ifstream& input); 100 bool GetZipEntries(std::ifstream& input);
|
H A D | zip_entry_data.h | 58 static ZipEntryData* GetZipEntry(std::ifstream& input, uint32_t entryOffset, uint32_t fileSize); 79 static bool ReadEntryFileNameAndExtraByOffset(std::ifstream& input, ZipEntryHeader* entryHeader,
|
/developtools/syscap_codec/src/ |
H A D | syscap_tool.c | 202 static int32_t ParseRpcidToJson(char *input, uint32_t inputLen, cJSON *rpcidJson)
in ParseRpcidToJson() argument 206 uint16_t sysCapLength = NtohsInter(*(uint16_t *)(input + sizeof(uint32_t)));
in ParseRpcidToJson() 212 char *sysCapBegin = input + sizeof(RPCIDHead) + sizeof(uint32_t);
in ParseRpcidToJson() 213 RPCIDHead *rpcidHeader = (RPCIDHead *)input;
in ParseRpcidToJson() 540 PRINT_ERR("input string too long(%zu).\n", inputLen);
in CopyInputString() 543 char *input = (char *)malloc(inputLen + 1);
in CopyInputString() local 544 if (input == NULL) {
in CopyInputString() 548 int32_t ret = strcpy_s(input, inputLen + 1, inputString);
in CopyInputString() 551 free(input);
in CopyInputString() 554 input[inputLe in CopyInputString() 558 GetPriSyscapData(char *input, char **priSyscap, uint32_t *priSyscapLen) GetPriSyscapData() argument 603 char *input = CopyInputString(inputString); SeparateSyscapFromString() local [all...] |
/developtools/hapsigner/hapsigntool_cpp/utils/include/ |
H A D | file_utils.h | 54 * Read byte from input stream. 56 * @param input Input stream 60 static int Read(std::ifstream& input, std::string& ret); 62 *Read byte from input file. 70 * Read byte from input file. 72 * @param file input file 80 * Read byte from input stream. 82 * @param input input stream 88 static int ReadInputByOffsetAndLength(std::ifstream& input, size_ [all...] |
/developtools/hapsigner/hapsigntool/hap_sign_tool_lib/src/main/java/com/ohos/hapsigntool/zip/ |
H A D | ZipEntryData.java | 77 try (FileInputStream input = new FileInputStream(file)) { in getZipEntry() 80 byte[] headBytes = FileUtils.readInputByOffsetAndLength(input, entryOffset, ZipEntryHeader.HEADER_LENGTH); in getZipEntry() 86 byte[] fileNameBytes = FileUtils.readInputByLength(input, entryHeader.getFileNameLength()); in getZipEntry() 92 byte[] extraBytes = FileUtils.readInputByLength(input, entryHeader.getExtraLength()); in getZipEntry() 101 input.skip(fileSize); in getZipEntry() 117 byte[] desBytes = FileUtils.readInputByLength(input, DataDescriptor.DES_LENGTH); in getZipEntry()
|
/developtools/profiler/device/plugins/process_plugin/src/ |
H A D | process_data_plugin.cpp | 395 std::ifstream input(path, std::ios::in); in ReadBootTime() 396 CHECK_TRUE(!input.fail(), false, "%s open %s failed, errno = %d", __func__, path.c_str(), errno); in ReadBootTime() 398 if (!input.good()) { in ReadBootTime() 402 getline(input, line); in ReadBootTime() 410 input.close(); in ReadBootTime() 443 std::ifstream input(path, std::ios::in); in ReadCpuUsage() 444 CHECK_TRUE(!input.fail(), false, "%s open %s failed, errno = %d", __func__, path.c_str(), errno); in ReadCpuUsage() 446 if (!input.good()) { in ReadCpuUsage() 450 getline(input, line); in ReadCpuUsage() 454 input in ReadCpuUsage() [all...] |
/developtools/hapsigner/hapsigntool_cpp/codesigning/sign/src/ |
H A D | code_signing.cpp | 48 bool CodeSigning::GetCodeSignBlock(const std::string &input, int64_t offset, in GetCodeSignBlock() argument 73 inputStream.open(input, std::ios::binary); in GetCodeSignBlock() 75 PrintErrorNumberMsg("IO_ERROR", IO_ERROR, "open file: " + input + "failed"); in GetCodeSignBlock() 91 if (!SignNativeLibs(input, ownerID)) { in GetCodeSignBlock() 176 bool CodeSigning::GetElfCodeSignBlock(const std::string &input, int64_t offset, in GetElfCodeSignBlock() argument 183 std::ifstream inputstream(input, std::ios::binary | std::ios::ate); in GetElfCodeSignBlock() 185 PrintErrorNumberMsg("IO_ERROR", IO_ERROR, "open file: " + input + "failed"); in GetElfCodeSignBlock() 222 bool CodeSigning::SignNativeLibs(const std::string &input, std::string &ownerID) in SignNativeLibs() argument 227 bool nativeLibflag = GetNativeEntriesFromHap(input, param); in SignNativeLibs() 229 SIGNATURE_TOOLS_LOGE("%s native libs handle failed", input in SignNativeLibs() 491 IsNativeFile(const std::string& input) IsNativeFile() argument [all...] |
/developtools/hdc/hdc_rust/src/host/ |
H A D | unittest.rs | 25 let input = "file recv file1 /data/local/tmp/file" in if_parse_cmd_param_works() 37 let actual = parser::split_opt_and_cmd(input); in if_parse_cmd_param_works() 45 let input = "-l5 checkserver" in if_parse_opt_cmd_works() 54 let actual = parser::split_opt_and_cmd(input); in if_parse_opt_cmd_works() 61 let input = "-l5 file recv file1 /data/local/tmp/file" in if_parse_opt_cmd_param_works() 73 let actual = parser::split_opt_and_cmd(input); in if_parse_opt_cmd_param_works()
|
/developtools/packing_tool/adapter/ohos/ |
H A D | UncompressEntrance.java | 239 LOG.error("UncompressEntrance::parseApp must input a app file!"); in parseApp() 258 * @param input Indicates the InputStream about the app package. 269 public static UncompressResult parseApp(InputStream input, String parseMode, String deviceType, String hapName, in parseApp() argument 273 if (input == null) { in parseApp() 274 LOG.error("UncompressEntrance::parseApp input is null!"); in parseApp() 276 compressResult.setMessage("ParseApp input is null"); in parseApp() 292 compressResult = Uncompress.uncompressAppByInput(utility, input); in parseApp() 314 LOG.error("UncompressEntrance::parseApp must input a app file!"); in parseApp() 332 * @param input Indicates the input strea 338 parseApp(InputStream input, ParseAppMode parseAppMode, String hapName) parseApp() argument 388 parseHap(InputStream input) parseHap() argument [all...] |
/developtools/ace_js2bundle/ace-loader/src/ |
H A D | resource-plugin.js | 28 let input = ''; 38 function copyFile(input, output) { 40 if (fs.existsSync(input)) { 45 const pathInfo = path.parse(input); 55 if (themeFileBuild(input, output)) { 59 const readStream = fs.createReadStream(input); 70 throw new Error(`${red}Failed to build file ${input}.${reset}`).message; 120 input = input_; 136 circularFile(path.resolve(input, item), path.resolve(output, item), ''); 140 circularFile(input, outpu [all...] |
/developtools/profiler/hidebug/frameworks/native/ |
H A D | hidebug_base.c | 65 static void ParseKeyValue(const char *input, uint32_t *paramCnt, struct Params *result, const uint32_t paramSize) in ParseKeyValue() argument 71 const char *colonPos = strchr(input, COLON_CHR); in ParseKeyValue() 76 errno_t err = strncpy_s(result[*paramCnt].key, MAX_PARA_LEN, input, colonPos - input); in ParseKeyValue() 89 static uint32_t SplitParams(char *input, struct Params *result, const uint32_t paramSize) in SplitParams() argument 95 param = strtok_s(input, space, &next); in SplitParams() 247 HIDEBUG_LOGE("input service name is null."); in InitEnvironmentParam() 252 HIDEBUG_LOGE("input service name is illegal."); in InitEnvironmentParam()
|
/developtools/hapsigner/hapsigntool_cpp/codesigning/sign/include/ |
H A D | code_signing.h | 52 bool GetCodeSignBlock(const std::string &input, int64_t offset, 55 bool GetElfCodeSignBlock(const std::string &input, int64_t offset, 60 static bool IsNativeFile(const std::string& input); 63 bool SignNativeLibs(const std::string &input, std::string &ownerID);
|
/developtools/syscap_codec/interfaces/inner_api/ |
H A D | syscap_interface.h | 47 bool DecodeOsSyscap(const char input[PCID_MAIN_BYTES], char (**output)[SINGLE_SYSCAP_LEN], int *outputCnt); 49 bool DecodePrivateSyscap(char *input, char (**output)[SINGLE_SYSCAP_LEN], int *outputCnt); 53 * pcidString, input string format pcid. 54 * rpcidString, input string format rpcid.
|
/developtools/global_resource_tool/src/ |
H A D | file_manager.cpp | 36 for (auto input : inputs) { in ScanModules() 37 if (ScanModule(input, output) != RESTOOL_SUCCESS) { in ScanModules() 54 uint32_t FileManager::ScanModule(const string &input, const string &output) in ScanModule() argument 56 ResourceModule resourceModule(input, output, moduleName_); in ScanModule()
|