Changeset 9c4cf0d in mainline for uspace/srv


Ignore:
Timestamp:
2017-04-02T11:24:06Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
151f1cc
Parents:
b19e892
Message:

Rename close() to vfs_put()

This is motivated mainly by the fact that a file handle does not
necessarily correspond to an open file and close() was no longer the
the opposite operation to open().

Location:
uspace/srv
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/devman/match.c

    rb19e892 r9c4cf0d  
    243243       
    244244        if (opened)
    245                 close(fd);
     245                vfs_put(fd);
    246246       
    247247        return suc;
  • uspace/srv/vfs/vfs.h

    rb19e892 r9c4cf0d  
    205205
    206206extern int vfs_op_clone(int oldfd, int newfd, bool desc);
    207 extern int vfs_op_close(int fd);
    208207extern int vfs_op_mount(int mpfd, unsigned servid, unsigned flags, unsigned instance, const char *opts, const char *fsname, int *outfd);
    209208extern int vfs_op_mtab_get(void);
    210209extern int vfs_op_open(int fd, int flags);
     210extern int vfs_op_put(int fd);
    211211extern int vfs_op_read(int fd, aoff64_t, size_t *out_bytes);
    212212extern int vfs_op_rename(int basefd, char *old, char *new);
  • uspace/srv/vfs/vfs_ipc.c

    rb19e892 r9c4cf0d  
    4444}
    4545
    46 static void vfs_in_close(ipc_callid_t rid, ipc_call_t *request)
    47 {
    48         int fd = IPC_GET_ARG1(*request);
    49         int rc = vfs_op_close(fd);
    50         async_answer_0(rid, rc);
    51 }
    52 
    5346static void vfs_in_mount(ipc_callid_t rid, ipc_call_t *request)
    5447{
     
    10598}
    10699
     100static void vfs_in_put(ipc_callid_t rid, ipc_call_t *request)
     101{
     102        int fd = IPC_GET_ARG1(*request);
     103        int rc = vfs_op_put(fd);
     104        async_answer_0(rid, rc);
     105}
     106
    107107static void vfs_in_read(ipc_callid_t rid, ipc_call_t *request)
    108108{
     
    268268                        vfs_in_clone(callid, &call);
    269269                        break;
    270                 case VFS_IN_CLOSE:
    271                         vfs_in_close(callid, &call);
    272                         break;
    273270                case VFS_IN_MOUNT:
    274271                        vfs_in_mount(callid, &call);
     
    276273                case VFS_IN_OPEN:
    277274                        vfs_in_open(callid, &call);
     275                        break;
     276                case VFS_IN_PUT:
     277                        vfs_in_put(callid, &call);
    278278                        break;
    279279                case VFS_IN_READ:
  • uspace/srv/vfs/vfs_ops.c

    rb19e892 r9c4cf0d  
    124124}
    125125
    126 int vfs_op_close(int fd)
     126int vfs_op_put(int fd)
    127127{
    128128        return vfs_fd_free(fd);
Note: See TracChangeset for help on using the changeset viewer.