summaryrefslogtreecommitdiffstats
path: root/fastboot/engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'fastboot/engine.c')
-rw-r--r--fastboot/engine.c14
1 files changed, 0 insertions, 14 deletions
diff --git a/fastboot/engine.c b/fastboot/engine.c
index 8d46991..b07e742 100644
--- a/fastboot/engine.c
+++ b/fastboot/engine.c
@@ -286,21 +286,7 @@ void generate_ext4_image(struct image_data *image)
int fd;
struct stat st;
-#ifdef USE_MINGW
- /* Ideally we should use tmpfile() here, the same as with unix version.
- * But unfortunately it is not portable as it is not clear whether this
- * function opens file in TEXT or BINARY mode.
- *
- * There are also some reports it is buggy:
- * http://pdplab.it.uom.gr/teaching/gcc_manuals/gnulib.html#tmpfile
- * http://www.mega-nerd.com/erikd/Blog/Windiots/tmpfile.html
- */
- char *filename = tempnam(getenv("TEMP"), "fastboot-format.img");
- fd = open(filename, O_RDWR | O_CREAT | O_TRUNC | O_BINARY, 0644);
- unlink(filename);
-#else
fd = fileno(tmpfile());
-#endif
make_ext4fs_sparse_fd(fd, image->partition_size, NULL, NULL);
fstat(fd, &st);