mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-07-19 22:42:26 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user