811{
814
816
823
824
827
829 {
831 }
832
833
837
838
840 {
841 DPRINT1(
"Mke2fs: Volume %wZ does not exist, ...\n", DriveRoot);
842 goto clean_up;
843 }
844
845
847 {
848 DPRINT1(
"Mke2fs: Can't get media information\n");
849 goto clean_up;
850 }
851
853
856
857
858
859
860
861 Ext2Sb.s_inodes_count =
863
864
865
866
867 Ext2Sb.s_r_blocks_count = (Ext2Sb.s_blocks_count * 5) / 100;
868
869
872 {
874 }
875
877
878
880 {
882 goto clean_up;
883 }
884
885
887
888
889
890
891 {
895 }
896
897
898
899
900
901
902 {
904
905 for (
i = 0,
val = 0 ;
i <
sizeof(Ext2Sb.s_uuid);
i++)
906 val += Ext2Sb.s_uuid[
i];
907
909 }
910
911
912
913
915 {
919 ansi_label.
Buffer = Ext2Sb.s_volume_name;
921 }
922
924
926 if (!bRet)
927 {
928 goto clean_up;
929 }
930
931
933 blocks = Ext2Sb.s_blocks_count;
934
935#ifdef ZAP_BOOTBLOCK
936 DPRINT1(
"Mke2fs: zeroing volume boot record\n");
938#endif
939
940
941
942
943
944
945
949
953
954 if (!bRet)
955 {
956 DPRINT1(
"Mke2fs: zeroing block %lu at end of filesystem", ret_blk);
957 goto clean_up;
958 }
959
961
964
966
968
969 DPRINT(
"Mke2fs: Writing superblocks and filesystem accounting information ... \n");
970
972 {
973 DPRINT1(
"Mke2fs: Slow format not supported yet\n");
974 }
975
977 {
978 DPRINT1(
"Mke2fs: Warning, had trouble writing out superblocks.\n");
979 goto clean_up;
980 }
981
982 DPRINT(
"Mke2fs: Writing superblocks and filesystem accounting information done!\n");
983
985
986clean_up:
987
988
990
993
995 {
998 }
999
1001
1003}
bool create_bad_block_inode(PEXT2_FILESYS Ext2Sys, PEXT2_BADBLK_LIST bb_list)
void ext2_free_inode_bitmap(PEXT2_FILESYS Ext2Sys)
void ext2_free_block_bitmap(PEXT2_FILESYS Ext2Sys)
NTSTATUS Ext2GetMediaInfo(PEXT2_FILESYS Ext2Sys)
NTSTATUS Ext2OpenDevice(PEXT2_FILESYS Ext2Sys, PUNICODE_STRING DeviceName)
NTSTATUS Ext2DisMountVolume(PEXT2_FILESYS Ext2Sys)
NTSTATUS Ext2UnLockVolume(PEXT2_FILESYS Ext2Sys)
NTSTATUS Ext2CloseDevice(PEXT2_FILESYS Ext2Sys)
void ext2_free_group_desc(PEXT2_FILESYS Ext2Sys)
bool ext2_reserve_inodes(PEXT2_FILESYS fs)
bool ext2_allocate_tables(PEXT2_FILESYS Ext2Sys)
bool write_inode_tables(PEXT2_FILESYS fs)
bool zero_blocks(PEXT2_FILESYS fs, ULONG blk, ULONG num, ULONG *ret_blk, ULONG *ret_count)
bool create_root_dir(PEXT2_FILESYS fs)
bool ext2_flush(PEXT2_FILESYS fs)
bool create_lost_and_found(PEXT2_FILESYS Ext2Sys)
void set_fs_defaults(const char *fs_type, PEXT2_SUPER_BLOCK super, int blocksize, int *inode_ratio)
bool zap_sector(PEXT2_FILESYS Ext2Sys, int sect, int nsect)
void ext2_print_super(PEXT2_SUPER_BLOCK pExt2Sb)
void uuid_generate(__u8 *uuid)
bool ext2_initialize_sb(PEXT2_FILESYS pExt2Sys)
#define NT_SUCCESS(StatCode)
#define EXT2_DFL_MAX_MNT_COUNT
#define EXT2_BLOCK_SIZE(sb)
NTSTATUS Ext2LockVolume(IN PEXT2_IRP_CONTEXT IrpContext)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
#define memcpy(s1, s2, n)
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
#define UNREFERENCED_PARAMETER(P)
PEXT2_SUPER_BLOCK ext2_sb
PARTITION_INFORMATION PartInfo
#define RtlZeroMemory(Destination, Length)
#define STATUS_UNSUCCESSFUL
_In_ WDFINTERRUPT _In_ PFN_WDF_INTERRUPT_SYNCHRONIZE Callback