Lines Matching refs:tdata
495 struct tracing_data *tdata; in tracing_data_get() local
504 tdata = malloc(sizeof(*tdata)); in tracing_data_get()
505 if (!tdata) in tracing_data_get()
508 tdata->temp = temp; in tracing_data_get()
509 tdata->size = 0; in tracing_data_get()
514 snprintf(tdata->temp_file, sizeof(tdata->temp_file), in tracing_data_get()
516 if (!mkstemp(tdata->temp_file)) { in tracing_data_get()
518 free(tdata); in tracing_data_get()
522 temp_fd = open(tdata->temp_file, O_RDWR); in tracing_data_get()
524 pr_debug("Can't read '%s'", tdata->temp_file); in tracing_data_get()
525 free(tdata); in tracing_data_get()
562 tdata->size = lseek(output_fd, 0, SEEK_CUR); in tracing_data_get()
568 zfree(&tdata); in tracing_data_get()
571 return tdata; in tracing_data_get()
574 int tracing_data_put(struct tracing_data *tdata) in tracing_data_put() argument
578 if (tdata->temp) { in tracing_data_put()
579 err = record_file(tdata->temp_file, 0); in tracing_data_put()
580 unlink(tdata->temp_file); in tracing_data_put()
583 free(tdata); in tracing_data_put()
590 struct tracing_data *tdata; in read_tracing_data() local
596 tdata = tracing_data_get(pattrs, fd, false); in read_tracing_data()
597 if (!tdata) in read_tracing_data()
600 err = tracing_data_put(tdata); in read_tracing_data()