Lines Matching refs:tdata
595 struct tracing_data *tdata; in tracing_data_get() local
604 tdata = malloc(sizeof(*tdata)); in tracing_data_get()
605 if (!tdata) in tracing_data_get()
608 tdata->temp = temp; in tracing_data_get()
609 tdata->size = 0; in tracing_data_get()
614 snprintf(tdata->temp_file, sizeof(tdata->temp_file), in tracing_data_get()
616 if (!mkstemp(tdata->temp_file)) { in tracing_data_get()
618 free(tdata); in tracing_data_get()
622 temp_fd = open(tdata->temp_file, O_RDWR); in tracing_data_get()
624 pr_debug("Can't read '%s'", tdata->temp_file); in tracing_data_get()
625 free(tdata); in tracing_data_get()
662 tdata->size = lseek(output_fd, 0, SEEK_CUR); in tracing_data_get()
668 zfree(&tdata); in tracing_data_get()
671 return tdata; in tracing_data_get()
674 int tracing_data_put(struct tracing_data *tdata) in tracing_data_put() argument
678 if (tdata->temp) { in tracing_data_put()
679 err = record_file(tdata->temp_file, 0); in tracing_data_put()
680 unlink(tdata->temp_file); in tracing_data_put()
683 free(tdata); in tracing_data_put()
690 struct tracing_data *tdata; in read_tracing_data() local
696 tdata = tracing_data_get(pattrs, fd, false); in read_tracing_data()
697 if (!tdata) in read_tracing_data()
700 err = tracing_data_put(tdata); in read_tracing_data()