Changeset f17667a in mainline for uspace/srv/fs/tmpfs/tmpfs.c


Ignore:
Timestamp:
2008-02-17T13:32:53Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2616965d
Parents:
b5553a2
Message:

Add the VFS_FREE operation. This operation frees up whatever resources used by
a file system node for which there is no name (i.e. an unlinked node).

Cleanup VFS operations enums and remove unneeded VFS operations.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/tmpfs/tmpfs.c

    rb5553a2 rf17667a  
    5656        .ops = {
    5757                [IPC_METHOD_TO_VFS_OP(VFS_LOOKUP)] = VFS_OP_DEFINED,
    58                 [IPC_METHOD_TO_VFS_OP(VFS_OPEN)] = VFS_OP_DEFINED,
    59                 [IPC_METHOD_TO_VFS_OP(VFS_CLOSE)] = VFS_OP_DEFINED,
    6058                [IPC_METHOD_TO_VFS_OP(VFS_READ)] = VFS_OP_DEFINED,
    6159                [IPC_METHOD_TO_VFS_OP(VFS_WRITE)] = VFS_OP_DEFINED,
    62                 [IPC_METHOD_TO_VFS_OP(VFS_TRUNCATE)] = VFS_OP_NULL,
    63                 [IPC_METHOD_TO_VFS_OP(VFS_RENAME)] = VFS_OP_NULL,
    64                 [IPC_METHOD_TO_VFS_OP(VFS_OPENDIR)] = VFS_OP_NULL,
    65                 [IPC_METHOD_TO_VFS_OP(VFS_READDIR)] = VFS_OP_NULL,
    66                 [IPC_METHOD_TO_VFS_OP(VFS_CLOSEDIR)] = VFS_OP_NULL,
    67                 [IPC_METHOD_TO_VFS_OP(VFS_UNLINK)] = VFS_OP_NULL,
     60                [IPC_METHOD_TO_VFS_OP(VFS_TRUNCATE)] = VFS_OP_DEFINED,
    6861                [IPC_METHOD_TO_VFS_OP(VFS_MOUNT)] = VFS_OP_NULL,
    6962                [IPC_METHOD_TO_VFS_OP(VFS_UNMOUNT)] = VFS_OP_NULL,
     63                [IPC_METHOD_TO_VFS_OP(VFS_FREE)] = VFS_OP_DEFINED,
    7064        }
    7165};
     
    119113                        tmpfs_write(callid, &call);
    120114                        break;
     115                case VFS_TRUNCATE:
     116                        tmpfs_truncate(callid, &call);
     117                        break;
     118                case VFS_FREE:
     119                        tmpfs_free(callid, &call);
     120                        break;
    121121                default:
    122122                        ipc_answer_0(callid, ENOTSUP);
Note: See TracChangeset for help on using the changeset viewer.