Linux/macOS: enable quick format for file containers

Allow normal file-hosted containers to use quick format in the Unix volume creation path by sizing the host file with ftruncate before backup headers are written.

Enable the GUI checkbox for normal file containers and honor --quick in text mode. Update the Unix HTML documentation for the weaker deniability properties of sparse or unwritten host regions.
This commit is contained in:
Mounir IDRASSI
2026-05-21 16:17:52 +09:00
parent 1fd2fb06cd
commit 79bee911be
10 changed files with 67 additions and 12 deletions
+1
View File
@@ -87,6 +87,7 @@ namespace VeraCrypt
uint64 ReadAt (const BufferPtr &buffer, uint64 position) const;
void SeekAt (uint64 position) const;
void SeekEnd (int ofset) const;
void SetLength (uint64 length) const;
void Write (const ConstBufferPtr &buffer) const;
void Write (const ConstBufferPtr &buffer, size_t length) const { Write (buffer.GetRange (0, length)); }
void WriteAt (const ConstBufferPtr &buffer, uint64 position) const;
+6
View File
@@ -385,6 +385,12 @@ namespace VeraCrypt
throw_sys_sub_if (lseek (FileHandle, offset, SEEK_END) == -1, wstring (Path));
}
void File::SetLength (uint64 length) const
{
if_debug (ValidateState());
throw_sys_sub_if (ftruncate (FileHandle, length) == -1, wstring (Path));
}
void File::Write (const ConstBufferPtr &buffer) const
{
if_debug (ValidateState());