| 14 | } |
| 15 | |
| 16 | int tmpfile_from_pattern(struct reftable_tmpfile *out, const char *pattern) |
| 17 | { |
| 18 | struct tempfile *tempfile; |
| 19 | |
| 20 | tempfile = mks_tempfile(pattern); |
| 21 | if (!tempfile) |
| 22 | return REFTABLE_IO_ERROR; |
| 23 | |
| 24 | out->path = tempfile->filename.buf; |
| 25 | out->fd = tempfile->fd; |
| 26 | out->priv = tempfile; |
| 27 | |
| 28 | return 0; |
| 29 | } |
| 30 | |
| 31 | int tmpfile_close(struct reftable_tmpfile *t) |
| 32 | { |
no test coverage detected