MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2FlushVolume

Function Ext2FlushVolume

Ext2Mgr/enumDisk.cpp:809–830  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

807
808
809BOOL
810Ext2FlushVolume(CHAR *Device)
811{
812 HANDLE handle = NULL;
813 NT::NTSTATUS status;
814 NT::IO_STATUS_BLOCK iosb;
815
816 status = Ext2Open(Device, &handle, EXT2_DESIRED_ACCESS | GENERIC_WRITE);
817 if (!NT_SUCCESS(status)) {
818 goto errorout;
819 }
820
821 status = NT::ZwFlushBuffersFile(handle, &iosb);
822
823errorout:
824
825 if (handle) {
826 Ext2Close(&handle);
827 }
828
829 return NT_SUCCESS(status);
830}
831
832PEXT2_PARTITION
833Ext2QueryVolumePartition(

Callers 1

OnFlushMethod · 0.70

Calls 2

Ext2OpenFunction · 0.85
Ext2CloseFunction · 0.70

Tested by

no test coverage detected