mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 23:25:08 +00:00
Add a simple /bin/df which gathers its info from /proc/df.
This commit is contained in:
parent
7d288aafb2
commit
43075e5878
8 changed files with 119 additions and 0 deletions
|
@ -1359,3 +1359,27 @@ bool Ext2FSInode::chmod(mode_t mode, int& error)
|
|||
set_metadata_dirty(true);
|
||||
return true;
|
||||
}
|
||||
|
||||
unsigned Ext2FS::total_block_count() const
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
return super_block().s_blocks_count;
|
||||
}
|
||||
|
||||
unsigned Ext2FS::free_block_count() const
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
return super_block().s_free_blocks_count;
|
||||
}
|
||||
|
||||
unsigned Ext2FS::total_inode_count() const
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
return super_block().s_inodes_count;
|
||||
}
|
||||
|
||||
unsigned Ext2FS::free_inode_count() const
|
||||
{
|
||||
LOCKER(m_lock);
|
||||
return super_block().s_free_inodes_count;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue