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


Ignore:
Timestamp:
2012-01-28T10:51:56Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7c506ced
Parents:
fe56c08a
Message:

some TODO's solved + removed debugging messages

File:
1 edited

Legend:

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

    rfe56c08a rca3d77a  
    373373int ext4fs_create_node(fs_node_t **rfn, service_id_t service_id, int flags)
    374374{
    375         EXT4FS_DBG("");
    376375        int rc;
    377376
     
    405404        }
    406405
    407         EXT4FS_DBG("allocated");
    408 
    409406        enode->inode_ref = inode_ref;
    410407        enode->instance = inst;
     
    430427        *rfn = fs_node;
    431428
    432         EXT4FS_DBG("finished");
    433 
    434         // TODO
    435429        return EOK;
    436430}
     
    439433int ext4fs_destroy_node(fs_node_t *fn)
    440434{
    441         EXT4FS_DBG("");
    442435        int rc;
    443436
     
    450443
    451444        if (has_children) {
    452                 EXT4FS_DBG("destroying non-empty node");
    453445                ext4fs_node_put(fn);
    454446                return EINVAL;
     
    489481int ext4fs_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
    490482{
    491         EXT4FS_DBG("");
    492 
    493483        int rc;
    494484
     
    497487                return ENAMETOOLONG;
    498488        }
    499 
    500         EXT4FS_DBG("name checked");
    501 
    502489        ext4fs_node_t *parent = EXT4FS_NODE(pfn);
    503490        ext4fs_node_t *child = EXT4FS_NODE(cfn);
     
    509496                return rc;
    510497        }
    511 
    512         EXT4FS_DBG("dentry added");
    513498
    514499        // Fill new dir -> add '.' and '..' entries
     
    520505                        return rc;
    521506                }
    522 
    523                 EXT4FS_DBG("added dot");
    524507
    525508                rc = ext4_directory_add_entry(fs, child->inode_ref, "..", parent->inode_ref);
     
    530513                }
    531514
    532                 EXT4FS_DBG("added dotdot");
    533 
    534515                uint16_t parent_links = ext4_inode_get_links_count(parent->inode_ref->inode);
    535516                parent_links++;
     
    552533int ext4fs_unlink(fs_node_t *pfn, fs_node_t *cfn, const char *name)
    553534{
    554 //      EXT4FS_DBG("unlinking \%s", name);
    555 
    556535        int rc;
    557536
     
    559538        rc = ext4fs_has_children(&has_children, cfn);
    560539        if (rc != EOK) {
    561                 EXT4FS_DBG("\%s error: \%u", name, rc);
    562540                return rc;
    563541        }
     
    573551        rc = ext4_directory_remove_entry(fs, parent, name);
    574552        if (rc != EOK) {
    575                 EXT4FS_DBG("\%s removing entry failed: \%u", name, rc);
    576553                return rc;
    577554        }
     
    10861063        rc = ext4fs_node_get(&fn, service_id, index);
    10871064        if (rc != EOK) {
    1088                 EXT4FS_DBG("node get error");
    10891065                return rc;
    10901066        }
     
    10961072                ext4fs_node_put(fn);
    10971073                async_answer_0(callid, rc);
    1098                 EXT4FS_DBG("data write recv");
    10991074                return rc;
    11001075        }
     
    11361111                rc = ext4_filesystem_set_inode_data_block_index(fs, inode_ref, iblock, fblock);
    11371112                if (rc != EOK) {
    1138                         EXT4FS_DBG("ERROR: setting index failed");
     1113                        ext4_balloc_free_block(fs, inode_ref, fblock);
     1114                        ext4fs_node_put(fn);
     1115                        async_answer_0(callid, rc);
     1116                        return rc;
    11391117                }
    11401118                inode_ref->dirty = true;
Note: See TracChangeset for help on using the changeset viewer.