Changeset f49638e in mainline for uspace/srv/fs/ext4fs/ext4fs_ops.c


Ignore:
Timestamp:
2011-11-22T10:01:42Z (12 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8be96a0
Parents:
ebeaaa06
Message:

directory entry delete operation (without HTree index modification)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/ext4fs/ext4fs_ops.c

    rebeaaa06 rf49638e  
    446446int ext4fs_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *name)
    447447{
    448 
    449         return ENOTSUP;
    450 
    451448        int rc;
    452449
     
    463460
    464461        // Remove entry from parent directory
    465         // TODO
    466 //      rc = ext4_directory_remove_entry(EXT4FS_NODE(pfn), name);
    467 //      if (rc != EOK) {
    468 //              return rc;
    469 //      }
     462        ext4_inode_ref_t *parent = EXT4FS_NODE(pfn)->inode_ref;
     463        ext4_filesystem_t *fs = EXT4FS_NODE(pfn)->instance->filesystem;
     464        rc = ext4_directory_remove_entry(fs, parent, name);
     465        if (rc != EOK) {
     466                return rc;
     467        }
    470468
    471469        // Decrement links count
     
    489487                parent_inode_ref->dirty = true;
    490488        }
    491 
    492489
    493490        return EOK;
Note: See TracChangeset for help on using the changeset viewer.