* Used the original size for vmdk Extent Description, not the
sector-aligned one. * Truncated the image a little too short. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24789 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -190,7 +190,7 @@ main(int argc, char *argv[])
|
|||||||
sprintf(desc + strlen(desc),
|
sprintf(desc + strlen(desc),
|
||||||
"# Extent Description\n"
|
"# Extent Description\n"
|
||||||
"RW %llu FLAT \"%s\" %llu\n",
|
"RW %llu FLAT \"%s\" %llu\n",
|
||||||
imagesize / 512, name, headersize / 512);
|
actualImageSize / 512, name, headersize / 512);
|
||||||
sprintf(desc + strlen(desc),
|
sprintf(desc + strlen(desc),
|
||||||
"# Disk Data Base\n"
|
"# Disk Data Base\n"
|
||||||
"ddb.toolsVersion = \"0\"\n"
|
"ddb.toolsVersion = \"0\"\n"
|
||||||
@@ -222,7 +222,7 @@ main(int argc, char *argv[])
|
|||||||
|
|
||||||
if (!headerOnly) {
|
if (!headerOnly) {
|
||||||
if (clearImage && ftruncate(fd, headersize) != 0
|
if (clearImage && ftruncate(fd, headersize) != 0
|
||||||
|| ftruncate(fd, actualImageSize) != 0) {
|
|| ftruncate(fd, actualImageSize + headersize) != 0) {
|
||||||
fprintf(stderr, "Error: resizing file %s failed (%s)\n", file,
|
fprintf(stderr, "Error: resizing file %s failed (%s)\n", file,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
|
|||||||
Reference in New Issue
Block a user