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

Method fstatfs64

source/kernel/kprocess.cpp:1370–1388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1368}
1369
1370U32 KProcess::fstatfs64(FD fildes, U32 address) {
1371 KFileDescriptorPtr fd = this->getFileDescriptor(fildes);
1372
1373 if (!fd) {
1374 return -K_EBADF;
1375 }
1376 memory->writed(address, 0xEF53); // f_type (EXT3)
1377 memory->writed(address + 4, FS_BLOCK_SIZE); // f_bsize
1378 memory->writeq(address + 8, FS_SIZE / FS_BLOCK_SIZE); // f_blocks
1379 memory->writeq(address + 16, FS_FREE_SIZE / FS_BLOCK_SIZE); // f_bfree
1380 memory->writeq(address + 24, FS_FREE_SIZE / FS_BLOCK_SIZE); // f_bavail
1381 memory->writeq(address + 32, 1024 * 1024); // f_files
1382 memory->writeq(address + 40, 1024 * 1024); // f_ffree
1383 memory->writeq(address + 48, 12719298601114463092ull); // f_fsid
1384 memory->writed(address + 56, MAX_FILEPATH_LEN); // f_namelen
1385 memory->writed(address + 60, FS_BLOCK_SIZE); // f_frsize
1386 memory->writed(address + 64, 4096); // f_flags
1387 return 0;
1388}
1389
1390U32 KProcess::setitimer(U32 which, U32 newValue, U32 oldValue) {
1391

Callers 1

syscall_fstatfs64Function · 0.80

Calls 3

getFileDescriptorMethod · 0.95
writeqMethod · 0.80
writedMethod · 0.45

Tested by

no test coverage detected