Changeset fe91f66 in mainline


Ignore:
Timestamp:
2017-03-26T20:57:06Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b5b5d84
Parents:
fcab7ef
Message:

Omit unnecessary prefixes and suffixes from method and interface names

Location:
uspace
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/trace/trace.c

    rfcab7ef rfe91f66  
    708708        proto_add_oper(p, VFS_IN_TRUNCATE, o);
    709709        o = oper_new("fstat", 1, arg_def, V_ERRNO, 0, resp_def);
    710         proto_add_oper(p, VFS_IN_FSTAT, o);
     710        proto_add_oper(p, VFS_IN_STAT, o);
    711711        o = oper_new("close", 1, arg_def, V_ERRNO, 0, resp_def);
    712712        proto_add_oper(p, VFS_IN_CLOSE, o);
     
    723723        o = oper_new("walk", 2, arg_def, V_INT_ERRNO, 0, resp_def);
    724724        proto_add_oper(p, VFS_IN_WALK, o);
    725         o = oper_new("open2", 2, arg_def, V_ERRNO, 0, resp_def);
    726         proto_add_oper(p, VFS_IN_OPEN2, o);
    727         o = oper_new("unlink2", 3, arg_def, V_ERRNO, 0, resp_def);
    728         proto_add_oper(p, VFS_IN_UNLINK2, o);
     725        o = oper_new("open", 2, arg_def, V_ERRNO, 0, resp_def);
     726        proto_add_oper(p, VFS_IN_OPEN, o);
     727        o = oper_new("unlink", 3, arg_def, V_ERRNO, 0, resp_def);
     728        proto_add_oper(p, VFS_IN_UNLINK, o);
    729729
    730730        proto_register(SERVICE_VFS, p);
  • uspace/lib/c/generic/vfs/vfs.c

    rfcab7ef rfe91f66  
    160160{
    161161        async_exch_t *exch = vfs_exchange_begin();
    162         sysarg_t rc = async_req_2_0(exch, VFS_IN_OPEN2, fildes, mode);
     162        sysarg_t rc = async_req_2_0(exch, VFS_IN_OPEN, fildes, mode);
    163163        vfs_exchange_end(exch);
    164164       
     
    654654        async_exch_t *exch = vfs_exchange_begin();
    655655       
    656         req = async_send_1(exch, VFS_IN_FSTAT, fildes, NULL);
     656        req = async_send_1(exch, VFS_IN_STAT, fildes, NULL);
    657657        rc = async_data_read_start(exch, (void *) stat, sizeof(struct stat));
    658658        if (rc != EOK) {
     
    808808}
    809809
    810 static int _vfs_unlink2(int parent, const char *path, int expect, int wflag)
     810static int _vfs_unlink(int parent, const char *path, int expect, int wflag)
    811811{
    812812        sysarg_t rc;
     
    815815        async_exch_t *exch = vfs_exchange_begin();
    816816       
    817         req = async_send_3(exch, VFS_IN_UNLINK2, parent, expect, wflag, NULL);
     817        req = async_send_3(exch, VFS_IN_UNLINK, parent, expect, wflag, NULL);
    818818        rc = async_data_write_start(exch, path, str_size(path));
    819819       
     
    849849        }
    850850       
    851         int rc = _vfs_unlink2(root, pa, -1, 0);
     851        int rc = _vfs_unlink(root, pa, -1, 0);
    852852       
    853853        if (rc != EOK) {
     
    882882        }
    883883       
    884         int rc = _vfs_unlink2(root, pa, -1, WALK_DIRECTORY);
     884        int rc = _vfs_unlink(root, pa, -1, WALK_DIRECTORY);
    885885        if (rc != EOK) {
    886886                errno = rc;
  • uspace/lib/c/include/ipc/vfs.h

    rfcab7ef rfe91f66  
    6666        VFS_IN_WRITE,
    6767        VFS_IN_TRUNCATE,
    68         VFS_IN_FSTAT,
     68        VFS_IN_STAT,
    6969        VFS_IN_CLOSE,
    7070        VFS_IN_MOUNT,
     
    7676        VFS_IN_STATFS,
    7777        VFS_IN_WALK,
    78         VFS_IN_OPEN2,
    79         VFS_IN_UNLINK2,
     78        VFS_IN_OPEN,
     79        VFS_IN_UNLINK,
    8080        VFS_IN_CLONE,
    8181} vfs_in_request_t;
  • uspace/srv/vfs/vfs.h

    rfcab7ef rfe91f66  
    206206extern int vfs_op_clone(int oldfd, int newfd, bool desc);
    207207extern int vfs_op_close(int fd);
    208 extern int vfs_op_fstat(int fd);
    209208extern int vfs_op_mount(int mpfd, unsigned servid, unsigned flags, unsigned instance, const char *opts, const char *fsname, int *outfd);
    210209extern int vfs_op_mtab_get(void);
    211 extern int vfs_op_open2(int fd, int flags);
     210extern int vfs_op_open(int fd, int flags);
    212211extern int vfs_op_read(int fd, aoff64_t, size_t *out_bytes);
    213212extern int vfs_op_rename(int basefd, char *old, char *new);
     213extern int vfs_op_stat(int fd);
    214214extern int vfs_op_statfs(int fd);
    215215extern int vfs_op_sync(int fd);
    216216extern int vfs_op_truncate(int fd, int64_t size);
    217 extern int vfs_op_unlink2(int parentfd, int expectfd, int wflag, char *path);
     217extern int vfs_op_unlink(int parentfd, int expectfd, int wflag, char *path);
    218218extern int vfs_op_unmount(int mpfd);
    219219extern int vfs_op_wait_handle(bool high_fd);
  • uspace/srv/vfs/vfs_ipc.c

    rfcab7ef rfe91f66  
    5151}
    5252
    53 static void vfs_in_fstat(ipc_callid_t rid, ipc_call_t *request)
    54 {
    55         int fd = IPC_GET_ARG1(*request);
    56         int rc = vfs_op_fstat(fd);
    57         async_answer_0(rid, rc);
    58 }
    59 
    6053static void vfs_in_mount(ipc_callid_t rid, ipc_call_t *request)
    6154{
     
    10396}
    10497
    105 static void vfs_in_open2(ipc_callid_t rid, ipc_call_t *request)
     98static void vfs_in_open(ipc_callid_t rid, ipc_call_t *request)
    10699{
    107100        int fd = IPC_GET_ARG1(*request);
    108101        int flags = IPC_GET_ARG2(*request);
    109102
    110         int rc = vfs_op_open2(fd, flags);
     103        int rc = vfs_op_open(fd, flags);
    111104        async_answer_0(rid, rc);
    112105}
     
    167160}
    168161
     162static void vfs_in_stat(ipc_callid_t rid, ipc_call_t *request)
     163{
     164        int fd = IPC_GET_ARG1(*request);
     165        int rc = vfs_op_stat(fd);
     166        async_answer_0(rid, rc);
     167}
     168
    169169static void vfs_in_statfs(ipc_callid_t rid, ipc_call_t *request)
    170170{
     
    190190}
    191191
    192 static void vfs_in_unlink2(ipc_callid_t rid, ipc_call_t *request)
     192static void vfs_in_unlink(ipc_callid_t rid, ipc_call_t *request)
    193193{
    194194        int parentfd = IPC_GET_ARG1(*request);
     
    199199        int rc = async_data_write_accept((void **) &path, true, 0, 0, 0, NULL);
    200200        if (rc == EOK)
    201                 rc = vfs_op_unlink2(parentfd, expectfd, wflag, path);
     201                rc = vfs_op_unlink(parentfd, expectfd, wflag, path);
    202202       
    203203        async_answer_0(rid, rc);
     
    272272                        vfs_in_close(callid, &call);
    273273                        break;
    274                 case VFS_IN_FSTAT:
    275                         vfs_in_fstat(callid, &call);
    276                         break;
    277274                case VFS_IN_MOUNT:
    278275                        vfs_in_mount(callid, &call);
    279276                        break;
    280                 case VFS_IN_OPEN2:
    281                         vfs_in_open2(callid, &call);
     277                case VFS_IN_OPEN:
     278                        vfs_in_open(callid, &call);
    282279                        break;
    283280                case VFS_IN_READ:
     
    291288                        vfs_in_rename(callid, &call);
    292289                        break;
     290                case VFS_IN_STAT:
     291                        vfs_in_stat(callid, &call);
     292                        break;
    293293                case VFS_IN_STATFS:
    294294                        vfs_in_statfs(callid, &call);
     
    300300                        vfs_in_truncate(callid, &call);
    301301                        break;
    302                 case VFS_IN_UNLINK2:
    303                         vfs_in_unlink2(callid, &call);
     302                case VFS_IN_UNLINK:
     303                        vfs_in_unlink(callid, &call);
    304304                        break;
    305305                case VFS_IN_UNMOUNT:
  • uspace/srv/vfs/vfs_ops.c

    rfcab7ef rfe91f66  
    130130}
    131131
    132 int vfs_op_fstat(int fd)
    133 {
    134         vfs_file_t *file = vfs_file_get(fd);
    135         if (!file)
    136                 return EBADF;
    137 
    138         vfs_node_t *node = file->node;
    139 
    140         async_exch_t *exch = vfs_exchange_grab(node->fs_handle);
    141         int rc = async_data_read_forward_fast(exch, VFS_OUT_STAT,
    142             node->service_id, node->index, true, 0, NULL);
    143         vfs_exchange_release(exch);
    144        
    145         vfs_file_put(file);
    146         return rc;
    147 }
    148 
    149132static int vfs_connect_internal(service_id_t service_id, unsigned flags,
    150133    unsigned instance, const char *options, const char *fsname,
     
    291274}
    292275
    293 int vfs_op_open2(int fd, int flags)
     276int vfs_op_open(int fd, int flags)
    294277{
    295278        if (flags == 0)
     
    602585}
    603586
     587int vfs_op_stat(int fd)
     588{
     589        vfs_file_t *file = vfs_file_get(fd);
     590        if (!file)
     591                return EBADF;
     592
     593        vfs_node_t *node = file->node;
     594
     595        async_exch_t *exch = vfs_exchange_grab(node->fs_handle);
     596        int rc = async_data_read_forward_fast(exch, VFS_OUT_STAT,
     597            node->service_id, node->index, true, 0, NULL);
     598        vfs_exchange_release(exch);
     599       
     600        vfs_file_put(file);
     601        return rc;
     602}
     603
    604604int vfs_op_statfs(int fd)
    605605{
     
    672672}
    673673
    674 int vfs_op_unlink2(int parentfd, int expectfd, int wflag, char *path)
     674int vfs_op_unlink(int parentfd, int expectfd, int wflag, char *path)
    675675{
    676676        int rc = EOK;
Note: See TracChangeset for help on using the changeset viewer.