Changeset a35b458 in mainline for uspace/app/tester/vfs


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/app/tester/vfs/vfs1.c

    r3061bc1 ra35b458  
    5050{
    5151        TPRINTF("Opening the root directory...");
    52        
     52
    5353        DIR *dirp = opendir("/");
    5454        if (!dirp) {
     
    5757        } else
    5858                TPRINTF("OK\n");
    59        
     59
    6060        struct dirent *dp;
    6161        while ((dp = readdir(dirp)))
    6262                TPRINTF(" node \"%s\"\n", dp->d_name);
    6363        closedir(dirp);
    64        
     64
    6565        return NULL;
    6666}
     
    7777        }
    7878        TPRINTF("Created directory %s\n", TEST_DIRECTORY);
    79        
     79
    8080        int fd0;
    8181        rc = vfs_lookup_open(TEST_FILE, WALK_REGULAR | WALK_MAY_CREATE,
     
    8484                return "vfs_lookup_open() failed";
    8585        TPRINTF("Created file %s (fd=%d)\n", TEST_FILE, fd0);
    86        
     86
    8787        size_t size = sizeof(text);
    8888        size_t cnt;
     
    9393
    9494        pos = 0;
    95        
     95
    9696        char buf[BUF_SIZE];
    9797        TPRINTF("read..\n");
     
    100100                if (rc != EOK)
    101101                        return "read() failed";
    102                
     102
    103103                int icnt = (int) cnt;
    104104                if ((size_t) icnt != cnt) {
     
    109109                }
    110110        }
    111        
     111
    112112        vfs_put(fd0);
    113        
     113
    114114        const char *rv = read_root();
    115115        if (rv != NULL)
    116116                return rv;
    117        
     117
    118118        if (vfs_rename_path(TEST_FILE, TEST_FILE2) != EOK)
    119119                return "vfs_rename_path() failed";
    120120        TPRINTF("Renamed %s to %s\n", TEST_FILE, TEST_FILE2);
    121        
     121
    122122        if (vfs_unlink_path(TEST_FILE2) != EOK)
    123123                return "vfs_unlink_path() failed";
    124124        TPRINTF("Unlinked %s\n", TEST_FILE2);
    125        
     125
    126126        if (vfs_unlink_path(TEST_DIRECTORY) != EOK)
    127127                return "vfs_unlink_path() failed";
    128128        TPRINTF("Removed directory %s\n", TEST_DIRECTORY);
    129        
     129
    130130        rv = read_root();
    131131        if (rv != NULL)
    132132                return rv;
    133        
     133
    134134        return NULL;
    135135}
Note: See TracChangeset for help on using the changeset viewer.