Lines Matching defs:strLine
182 static int SetDhcpConfig(DhcpConfig *dhcpConfig, const char *strLine, int common)
184 if ((strLine == nullptr) || (strlen(strLine) == 0)) {
185 DHCP_LOGE("SetDhcpConfig param strLine is nullptr or len = 0!");
189 char *pSrc = (char *)strLine;
231 char strLine[FILE_LINE_LEN_MAX] = {0};
232 while (fgets(strLine, FILE_LINE_LEN_MAX, fp) != nullptr) {
233 DHCP_LOGI("fgets strLine = %{public}s", strLine);
234 if ((strchr(strLine, '#') != nullptr) || (strchr(strLine, '=') == nullptr) ||
235 !RemoveSpaceCharacters(strLine, FILE_LINE_LEN_MAX)) {
236 if (memset_s(strLine, FILE_LINE_LEN_MAX, 0, FILE_LINE_LEN_MAX) != EOK) {
241 if (memcmp(strLine, "interface", strlen("interface")) == 0) {
244 if ((ifname == nullptr) || (strlen(ifname) == 0) || (strstr(strLine, ifname) != nullptr)) {
245 DHCP_LOGI("%s %s find ifname:%s", configFile, strLine, ((ifname == nullptr) ? "" : ifname));
248 DHCP_LOGI("%s %s no find ifname:%s", configFile, strLine, ifname);
251 if (bValid && SetDhcpConfig(dhcpConfig, strLine, bComm) != RET_SUCCESS) {
252 DHCP_LOGE("set dhcp config %s %s failed", configFile, strLine);
256 if (memset_s(strLine, FILE_LINE_LEN_MAX, 0, FILE_LINE_LEN_MAX) != EOK) {