-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vhd] fix truncated write operation when using a VHDX image as source
* The legacy code we used for writing disk images used the size of the source image as the maximum number of bytes we should copy, which is fine for uncompressed DD or VHD images, but not so much for compressed VHDX ones. So we now make sure to use the actual size of the virtual disk, which we obtain when mounting the VHD/VHDX. * Also fix log progress update as well as a MinGW warning.
- Loading branch information
Showing
4 changed files
with
42 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* Rufus: The Reliable USB Formatting Utility | ||
* Virtual Disk Handling definitions and prototypes | ||
* Copyright © 2022 Pete Batard <[email protected]> | ||
* Copyright © 2022-2024 Pete Batard <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -135,7 +135,8 @@ extern BOOL WimUnmountImage(const char* image, int index, BOOL commit); | |
extern char* WimGetExistingMountPoint(const char* image, int index); | ||
extern BOOL WimIsValidIndex(const char* image, int index); | ||
extern int8_t IsBootableImage(const char* path); | ||
extern char* VhdMountImage(const char* path); | ||
extern char* VhdMountImageAndGetSize(const char* path, uint64_t* disksize); | ||
#define VhdMountImage(path) VhdMountImageAndGetSize(path, NULL) | ||
extern void VhdUnmountImage(void); | ||
extern void VhdSaveImage(void); | ||
extern void IsoSaveImage(void); |