MCPcopy Create free account
hub / github.com/LemonOSProject/LemonOS / Ext2Node

Method Ext2Node

Kernel/src/fs/ext2.cpp:1488–1520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1486 }
1487
1488 Ext2Node::Ext2Node(Ext2Volume* vol, ext2_inode_t& ino, ino_t inode){
1489 this->vol = vol;
1490 volumeID = vol->volumeID;
1491
1492 uid = ino.uid;
1493 size = ino.size;
1494 nlink = ino.linkCount;
1495 this->inode = inode;
1496
1497 switch (ino.mode & EXT2_S_IFMT)
1498 {
1499 case EXT2_S_IFBLK:
1500 flags = FS_NODE_BLKDEVICE;
1501 break;
1502 case EXT2_S_IFCHR:
1503 flags = FS_NODE_CHARDEVICE;
1504 break;
1505 case EXT2_S_IFDIR:
1506 flags = FS_NODE_DIRECTORY;
1507 break;
1508 case EXT2_S_IFLNK:
1509 flags = FS_NODE_SYMLINK;
1510 break;
1511 case EXT2_S_IFSOCK:
1512 flags = FS_NODE_SOCKET;
1513 break;
1514 default:
1515 flags = FS_NODE_FILE;
1516 break;
1517 }
1518
1519 e2inode = ino;
1520 }
1521
1522 int Ext2Node::ReadDir(DirectoryEntry* ent, uint32_t idx){
1523 flock.AcquireRead();

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected