Changeset a35b458 in mainline for uspace/srv/vfs/vfs_ipc.c


Ignore:
Timestamp:
2018-03-02T20:10:49Z (7 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f1380b7
Parents:
3061bc1
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
Message:

style: Remove trailing whitespace on _all_ lines, including empty ones, for particular file types.

Command used: tools/srepl '\s\+$' '' -- *.c *.h *.py *.sh *.s *.S *.ag

Currently, whitespace on empty lines is very inconsistent.
There are two basic choices: Either remove the whitespace, or keep empty lines
indented to the level of surrounding code. The former is AFAICT more common,
and also much easier to do automatically.

Alternatively, we could write script for automatic indentation, and use that
instead. However, if such a script exists, it's possible to use the indented
style locally, by having the editor apply relevant conversions on load/save,
without affecting remote repository. IMO, it makes more sense to adopt
the simpler rule.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_ipc.c

    r3061bc1 ra35b458  
    4040        int newfd = IPC_GET_ARG2(*request);
    4141        bool desc = IPC_GET_ARG3(*request);
    42        
     42
    4343        int outfd = -1;
    4444        errno_t rc = vfs_op_clone(oldfd, newfd, desc, &outfd);
     
    5454        size_t len;
    5555        errno_t rc;
    56        
     56
    5757        /*
    5858         * Now we expect the client to send us data with the name of the file
     
    6565                return;
    6666        }
    67        
     67
    6868        rc = vfs_op_fsprobe(fs_name, service_id, &info);
    6969        async_answer_0(rid, rc);
    7070        if (rc != EOK)
    7171                goto out;
    72        
     72
    7373        /* Now we should get a read request */
    7474        if (!async_data_read_receive(&callid, &len))
     
    114114{
    115115        int mpfd = IPC_GET_ARG1(*request);
    116        
     116
    117117        /*
    118118         * We expect the library to do the device-name to device-handle
     
    121121         */
    122122        service_id_t service_id = (service_id_t) IPC_GET_ARG2(*request);
    123        
     123
    124124        unsigned int flags = (unsigned int) IPC_GET_ARG3(*request);
    125125        unsigned int instance = IPC_GET_ARG4(*request);
    126        
     126
    127127        char *opts = NULL;
    128128        char *fs_name = NULL;
    129        
     129
    130130        /* Now we expect to receive the mount options. */
    131131        errno_t rc = async_data_write_accept((void **) &opts, true, 0,
     
    135135                return;
    136136        }
    137        
     137
    138138        /* Now, we expect the client to send us data with the name of the file
    139139         * system.
     
    146146                return;
    147147        }
    148        
     148
    149149        int outfd = 0;
    150150        rc = vfs_op_mount(mpfd, service_id, flags, instance, opts, fs_name,
    151151             &outfd);
    152152        async_answer_1(rid, rc, outfd);
    153        
     153
    154154        free(opts);
    155155        free(fs_name);
     
    190190        char *new = NULL;
    191191        errno_t rc;
    192        
     192
    193193        basefd = IPC_GET_ARG1(*request);
    194        
     194
    195195        /* Retrieve the old path. */
    196196        rc = async_data_write_accept((void **) &old, true, 0, 0, 0, NULL);
    197197        if (rc != EOK)
    198198                goto out;
    199        
     199
    200200        /* Retrieve the new path. */
    201201        rc = async_data_write_accept((void **) &new, true, 0, 0, 0, NULL);
    202202        if (rc != EOK)
    203203                goto out;
    204        
     204
    205205        size_t olen;
    206206        size_t nlen;
    207207        char *oldc = canonify(old, &olen);
    208208        char *newc = canonify(new, &nlen);
    209        
     209
    210210        if ((!oldc) || (!newc)) {
    211211                rc = EINVAL;
    212212                goto out;
    213213        }
    214        
     214
    215215        assert(oldc[olen] == '\0');
    216216        assert(newc[nlen] == '\0');
    217        
     217
    218218        rc = vfs_op_rename(basefd, oldc, newc);
    219219
     
    245245{
    246246        int fd = (int) IPC_GET_ARG1(*request);
    247        
     247
    248248        errno_t rc = vfs_op_statfs(fd);
    249249        async_answer_0(rid, rc);
     
    261261        int parentfd = IPC_GET_ARG1(*request);
    262262        int expectfd = IPC_GET_ARG2(*request);
    263        
     263
    264264        char *path;
    265265        errno_t rc = async_data_write_accept((void **) &path, true, 0, 0, 0, NULL);
    266266        if (rc == EOK)
    267267                rc = vfs_op_unlink(parentfd, expectfd, path);
    268        
     268
    269269        async_answer_0(rid, rc);
    270270}
     
    293293        int parentfd = IPC_GET_ARG1(*request);
    294294        int flags = IPC_GET_ARG2(*request);
    295        
     295
    296296        int fd = 0;
    297297        char *path;
     
    318318{
    319319        bool cont = true;
    320        
     320
    321321        /*
    322322         * The connection was opened via the IPC_CONNECT_ME_TO call.
     
    324324         */
    325325        async_answer_0(iid, EOK);
    326        
     326
    327327        while (cont) {
    328328                ipc_call_t call;
    329329                ipc_callid_t callid = async_get_call(&call);
    330                
     330
    331331                if (!IPC_GET_IMETHOD(call))
    332332                        break;
    333                
     333
    334334                switch (IPC_GET_IMETHOD(call)) {
    335335                case VFS_IN_CLONE:
     
    393393                }
    394394        }
    395        
     395
    396396        /*
    397397         * Open files for this client will be cleaned up when its last
Note: See TracChangeset for help on using the changeset viewer.