Re: [PATCH 2/3] mkimage: fit: Unmmap the memory before closing fd in fit_import_data()

2020-04-24 Thread Tom Rini
On Sat, Apr 18, 2020 at 01:59:10AM -0700, Bin Meng wrote: > From: Lihua Zhao > > Without calling munmap(), the follow-up call to open() the same file > with a flag O_TRUNC seems not to cause any issue on Linux, but it fails > on Windows with error like below: > > Can't open kernel_fdt.itb.t

[PATCH 2/3] mkimage: fit: Unmmap the memory before closing fd in fit_import_data()

2020-04-18 Thread Bin Meng
From: Lihua Zhao Without calling munmap(), the follow-up call to open() the same file with a flag O_TRUNC seems not to cause any issue on Linux, but it fails on Windows with error like below: Can't open kernel_fdt.itb.tmp: Permission denied Fix this by unmapping the memory before closing fd