| 502 | |
| 503 | |
| 504 | BOOLEAN |
| 505 | Ext2LoadInode (IN PEXT2_VCB Vcb, |
| 506 | IN struct inode *Inode) |
| 507 | { |
| 508 | struct ext4_inode* ext4i; |
| 509 | struct ext4_inode_info unused = {0}; |
| 510 | LONGLONG offset; |
| 511 | |
| 512 | if (!Ext2GetInodeLba(Vcb, Inode->i_ino, &offset)) { |
| 513 | DEBUG(DL_ERR, ("Ext2LoadInode: failed inode %u.\n", Inode->i_ino)); |
| 514 | return FALSE; |
| 515 | } |
| 516 | |
| 517 | ext4i = (struct ext4_inode*) Ext2AllocatePool(NonPagedPool, EXT4_INODE_SIZE(Inode->i_sb), EXT2_INODE_MAGIC); |
| 518 | if (!ext4i) { |
| 519 | return FALSE; |
| 520 | } |
| 521 | |
| 522 | if (!Ext2LoadBuffer(NULL, Vcb, offset, EXT4_INODE_SIZE(Inode->i_sb), ext4i)) { |
| 523 | ExFreePool(ext4i); |
| 524 | return FALSE; |
| 525 | } |
| 526 | |
| 527 | Ext2DecodeInode(Inode, ext4i); |
| 528 | |
| 529 | ext4_inode_csum_verify(Inode, ext4i, &unused); |
| 530 | |
| 531 | ExFreePool(ext4i); |
| 532 | |
| 533 | return TRUE; |
| 534 | } |
| 535 | |
| 536 | |
| 537 | BOOLEAN |
no test coverage detected