Changeset 69a60c4 in mainline


Ignore:
Timestamp:
2010-07-28T15:23:25Z (14 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7dfd339
Parents:
571addd
Message:

implement sync

Location:
uspace/srv/fs
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat_ops.c

    r571addd r69a60c4  
    15641564void fat_sync(ipc_callid_t rid, ipc_call_t *request)
    15651565{
    1566         /* Dummy implementation */
    1567         ipc_answer_0(rid, EOK);
     1566        dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
     1567        fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
     1568       
     1569        fs_node_t *fn;
     1570        int rc = fat_node_get(&fn, dev_handle, index);
     1571        if (rc != EOK) {
     1572                ipc_answer_0(rid, rc);
     1573                return;
     1574        }
     1575        if (!fn) {
     1576                ipc_answer_0(rid, ENOENT);
     1577                return;
     1578        }
     1579       
     1580        fat_node_t *nodep = FAT_NODE(fn);
     1581       
     1582        nodep->dirty = true;
     1583        rc = fat_node_sync(nodep);
     1584       
     1585        fat_node_put(fn);
     1586        ipc_answer_0(rid, rc);
    15681587}
    15691588
  • uspace/srv/fs/tmpfs/tmpfs_ops.c

    r571addd r69a60c4  
    736736void tmpfs_sync(ipc_callid_t rid, ipc_call_t *request)
    737737{
    738         /* Dummy implementation */
     738        /*
     739         * TMPFS keeps its data structures always consistent,
     740         * thus the sync operation is a no-op.
     741         */
    739742        ipc_answer_0(rid, EOK);
    740743}
Note: See TracChangeset for help on using the changeset viewer.