| 807 | |
| 808 | |
| 809 | BOOL |
| 810 | Ext2FlushVolume(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 | |
| 823 | errorout: |
| 824 | |
| 825 | if (handle) { |
| 826 | Ext2Close(&handle); |
| 827 | } |
| 828 | |
| 829 | return NT_SUCCESS(status); |
| 830 | } |
| 831 | |
| 832 | PEXT2_PARTITION |
| 833 | Ext2QueryVolumePartition( |