diff options
author | Artem Bityutskiy <artem.bityutskiy@intel.com> | 2012-11-14 14:46:30 +0200 |
---|---|---|
committer | Gui Chen <gui.chen@intel.com> | 2012-12-12 19:33:45 +0800 |
commit | 1ae41ede0a71f9c2a1635cf32e7275230c315a75 (patch) | |
tree | 1c74c536ccb7a36426fb1c6f5a67c5a52a0188e3 /VERSION | |
parent | da99b15f0500e6a87f057ce754e0da3db1eb1077 (diff) | |
download | mic-1ae41ede0a71f9c2a1635cf32e7275230c315a75.tar.gz mic-1ae41ede0a71f9c2a1635cf32e7275230c315a75.tar.bz2 mic-1ae41ede0a71f9c2a1635cf32e7275230c315a75.zip |
SparseLoopbackDisk: fix sparse file creation
The SparseLoopbackDisk class created sparse file a bit incorrecly.
First of all, it created a sparse file of wrong size - one byte more than
asked. Indeed, look at Tizen images, they are of size '2717908993', which is
2.5GiB + 1 byte.
Second of all, the file was not as sparse as it could be - because of the write
to the end, the last block was mapped.
Change this to just use 'ftruncate()' to the right size, which does the trick.
Change-Id: If76d27515d5483e29a76a15f128ff8737872d57b
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
Diffstat (limited to 'VERSION')
0 files changed, 0 insertions, 0 deletions