Lines Matching refs:fp
106 FILE *fp = fopen(fileName, "r"); in LoadPersistParam_() local
107 PARAM_WARNING_CHECK(fp != NULL, return, "No valid persist parameter file %s", fileName); in LoadPersistParam_()
110 while (fgets(buffer, buffSize, fp) != NULL) { in LoadPersistParam_()
120 (void)fclose(fp); in LoadPersistParam_()
181 FILE *fp = fopen(PERSIST_PARAM_FIXED_FLAGS, "w"); in LoadPersistParam() local
182 …PARAM_CHECK(fp != NULL, return -1, "create file %s fail error %d", PERSIST_PARAM_FIXED_FLAGS, errn… in LoadPersistParam()
183 (void)fclose(fp); in LoadPersistParam()
194 FILE *fp = fopen(path, "a+"); in SavePersistParam() local
195 if (fp != NULL) { in SavePersistParam()
196 ret = fprintf(fp, "%s=%s\n", name, value); in SavePersistParam()
197 (void)fclose(fp); in SavePersistParam()
204 FILE *fp = fopen(path[i], "a+"); in SavePersistParam() local
205 if (fp != NULL) { in SavePersistParam()
206 ret = fprintf(fp, "%s=%s\n", name, value); in SavePersistParam()
207 (void)fclose(fp); in SavePersistParam()
223 FILE *fp = fopen(path, "w"); in BatchSavePersistParamBegin() local
224 if (fp == NULL) { in BatchSavePersistParamBegin()
229 handle[0] = (PERSIST_SAVE_HANDLE)fp; in BatchSavePersistParamBegin()
238 FILE *fp = fopen(path[i], "w"); in BatchSavePersistParamBegin() local
239 if (fp == NULL) { in BatchSavePersistParamBegin()
242 handle[i] = (PERSIST_SAVE_HANDLE)fp; in BatchSavePersistParamBegin()
252 FILE *fp = (FILE*)handle[i]; in BatchSavePersistParam() local
253 if (fp != NULL) { in BatchSavePersistParam()
254 ret = fprintf(fp, "%s=%s\n", name, value); in BatchSavePersistParam()
265 FILE *fp = (FILE *)handle[0]; in BatchSavePersistParamEnd() local
266 (void)fflush(fp); in BatchSavePersistParamEnd()
267 (void)fsync(fileno(fp)); in BatchSavePersistParamEnd()
268 (void)fclose(fp); in BatchSavePersistParamEnd()
284 FILE *fp = (FILE *)handle[i]; in BatchSavePersistParamEnd() local
285 (void)fflush(fp); in BatchSavePersistParamEnd()
286 (void)fsync(fileno(fp)); in BatchSavePersistParamEnd()
287 (void)fclose(fp); in BatchSavePersistParamEnd()