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

Function Ext2LoadSuper

Ext4Fsd/ext3/generic.c:24–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22/* FUNCTIONS ***************************************************************/
23
24NTSTATUS
25Ext2LoadSuper(IN PEXT2_VCB Vcb,
26 IN BOOLEAN bVerify,
27 OUT PEXT2_SUPER_BLOCK * Sb)
28{
29 NTSTATUS Status;
30 PEXT2_SUPER_BLOCK Ext2Sb = NULL;
31
32 Ext2Sb = (PEXT2_SUPER_BLOCK)
33 Ext2AllocatePool(
34 PagedPool,
35 sizeof(EXT2_SUPER_BLOCK),
36 EXT2_SB_MAGIC
37 );
38 if (!Ext2Sb) {
39 Status = STATUS_INSUFFICIENT_RESOURCES;
40 goto errorout;
41 }
42
43 Status = Ext2ReadDisk(
44 Vcb,
45 (ULONGLONG) SUPER_BLOCK_OFFSET,
46 sizeof(EXT2_SUPER_BLOCK),
47 (PVOID) Ext2Sb,
48 bVerify );
49
50 if (!NT_SUCCESS(Status)) {
51 Ext2FreePool(Ext2Sb, EXT2_SB_MAGIC);
52 Ext2Sb = NULL;
53 }
54
55errorout:
56
57 *Sb = Ext2Sb;
58 return Status;
59}
60
61
62BOOLEAN

Callers 2

Ext2MountVolumeFunction · 0.85
Ext2VerifyVolumeFunction · 0.85

Calls 3

Ext2AllocatePoolFunction · 0.85
Ext2ReadDiskFunction · 0.85
Ext2FreePoolFunction · 0.85

Tested by

no test coverage detected