MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / stat

Method stat

source/kernel/kfile.cpp:109–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109U32 KFile::stat(KProcess* process, U32 address, bool is64) {
110 FsOpenNode* openNode = this->openFile;
111 std::shared_ptr<FsNode> node = openNode->node;
112 U64 len = (U64)openNode->length();
113
114 KSystem::writeStat(process, node->path, address, is64, 1, node->id, node->getMode(), node->rdev, len, FS_BLOCK_SIZE, (len+FS_BLOCK_SIZE-1)/FS_BLOCK_SIZE, node->lastModified(), node->getHardLinkCount());
115 return 0;
116}
117
118U32 KFile::map(KThread* thread, U32 address, U32 len, S32 prot, S32 flags, U64 off) {
119 return this->openFile->map(thread, address, len, prot, flags, off);

Callers 1

fstat64Method · 0.45

Calls 4

getHardLinkCountMethod · 0.80
lengthMethod · 0.45
getModeMethod · 0.45
lastModifiedMethod · 0.45

Tested by

no test coverage detected