mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
Add unlink() syscall and /bin/rm.
This patch adds most of the plumbing for working file deletion in Ext2FS. Directory entries are removed and inode link counts updated. We don't yet update the inode or block bitmaps, I will do that separately.
This commit is contained in:
@@ -34,6 +34,7 @@ private:
|
||||
virtual void flush_metadata() override;
|
||||
virtual bool write(const ByteBuffer&) override;
|
||||
virtual bool add_child(InodeIdentifier child_id, const String& name, byte file_type, int& error) override;
|
||||
virtual bool remove_child(const String& name, int& error) override;
|
||||
virtual RetainPtr<Inode> parent() const override;
|
||||
virtual int set_atime(Unix::time_t) override;
|
||||
virtual int set_ctime(Unix::time_t) override;
|
||||
@@ -105,6 +106,8 @@ private:
|
||||
bool set_inode_allocation_state(unsigned inode, bool);
|
||||
bool set_block_allocation_state(GroupIndex, BlockIndex, bool);
|
||||
|
||||
void uncache_inode(InodeIndex);
|
||||
|
||||
unsigned m_blockGroupCount { 0 };
|
||||
|
||||
mutable ByteBuffer m_cached_super_block;
|
||||
|
||||
Reference in New Issue
Block a user