Lines Matching refs:fp
119 FILE *fp = fopen(fileName, "r");
120 PARAM_WARNING_CHECK(fp != NULL, return, "No valid persist parameter file %s", fileName);
123 while (fgets(buffer, buffSize, fp) != NULL) {
133 (void)fclose(fp);
193 FILE *fp = fopen(PERSIST_PARAM_FIXED_FLAGS, "w");
194 PARAM_CHECK(fp != NULL, return -1, "create file %s fail error %d", PERSIST_PARAM_FIXED_FLAGS, errno);
195 (void)fclose(fp);
206 FILE *fp = fopen(path, "a+");
207 if (fp != NULL) {
208 ret = fprintf(fp, "%s=%s\n", name, value);
209 (void)fclose(fp);
216 FILE *fp = fopen(path[i], "a+");
217 if (fp != NULL) {
218 ret = fprintf(fp, "%s=%s\n", name, value);
219 (void)fclose(fp);
235 FILE *fp = fopen(path, "w");
236 if (fp == NULL) {
241 handle[0] = (PERSIST_SAVE_HANDLE)fp;
250 FILE *fp = fopen(path[i], "w");
251 if (fp == NULL) {
254 handle[i] = (PERSIST_SAVE_HANDLE)fp;
264 FILE *fp = (FILE*)handle[i];
265 if (fp != NULL) {
266 ret = fprintf(fp, "%s=%s\n", name, value);
277 FILE *fp = (FILE *)handle[0];
278 (void)fflush(fp);
279 (void)fsync(fileno(fp));
280 (void)fclose(fp);
296 FILE *fp = (FILE *)handle[i];
297 (void)fflush(fp);
298 (void)fsync(fileno(fp));
299 (void)fclose(fp);