Subversion Repositories HelenOS

Rev

Rev 2730 | Rev 2732 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2730 Rev 2731
Line 494... Line 494...
494
    dentry->size = size;
494
    dentry->size = size;
495
    dentry->data = newdata;
495
    dentry->data = newdata;
496
    ipc_answer_0(rid, EOK);
496
    ipc_answer_0(rid, EOK);
497
}
497
}
498
 
498
 
-
 
499
void tmpfs_free(ipc_callid_t rid, ipc_call_t *request)
-
 
500
{
-
 
501
    int dev_handle = IPC_GET_ARG1(*request);
-
 
502
    unsigned long index = IPC_GET_ARG2(*request);
-
 
503
 
-
 
504
    link_t *hlp;
-
 
505
    hlp = hash_table_find(&dentries, &index);
-
 
506
    if (!hlp) {
-
 
507
        ipc_answer_0(rid, ENOENT);
-
 
508
        return;
-
 
509
    }
-
 
510
    tmpfs_dentry_t *dentry = hash_table_get_instance(hlp, tmpfs_dentry_t,
-
 
511
        dh_link);
-
 
512
   
-
 
513
    assert(!dentry->parent);
-
 
514
    assert(!dentry->child);
-
 
515
    assert(!dentry->sibling);
-
 
516
 
-
 
517
    if (dentry->type == TMPFS_FILE)
-
 
518
        free(dentry->data);
-
 
519
    free(dentry->name);
-
 
520
    free(dentry);
-
 
521
 
-
 
522
    ipc_answer_0(rid, EOK);
-
 
523
}
-
 
524
 
499
/**
525
/**
500
 * @}
526
 * @}
501
 */
527
 */