Changeset a35b458 in mainline for uspace/srv/fs/fat/fat_directory.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/fs/fat/fat_directory.c

    r3061bc1 ra35b458  
    6565{
    6666        errno_t rc = EOK;
    67        
     67
    6868        if (di->b)
    6969                rc = block_put(di->b);
    70        
     70
    7171        return rc;
    7272}
     
    106106        if (rc != EOK)
    107107                di->pos -= 1;
    108        
     108
    109109        return rc;
    110110}
     
    113113{
    114114        errno_t rc = EOK;
    115        
     115
    116116        if (di->pos > 0) {
    117117                di->pos -= 1;
     
    119119        } else
    120120                return ENOENT;
    121        
     121
    122122        if (rc != EOK)
    123123                di->pos += 1;
    124        
     124
    125125        return rc;
    126126}
     
    135135        if (rc != EOK)
    136136                di->pos = _pos;
    137        
     137
    138138        return rc;
    139139}
     
    142142{
    143143        errno_t rc;
    144        
     144
    145145        rc = fat_directory_block_load(di);
    146146        if (rc == EOK) {
     
    148148                *d = ((fat_dentry_t *)di->b->data) + o;
    149149        }
    150        
     150
    151151        return rc;
    152152}
     
    168168        assert(rc == EOK);
    169169        instance = (fat_instance_t *) data;
    170        
     170
    171171        do {
    172172                rc = fat_directory_get(di, &d);
     
    220220                        } else
    221221                                fat_dentry_name_get(d, name);
    222                                
     222
    223223                        *de = d;
    224224                        return EOK;
     
    232232                }
    233233        } while (fat_directory_next(di) == EOK);
    234        
     234
    235235        return ENOENT;
    236236}
     
    250250        d->name[0] = FAT_DENTRY_ERASED;
    251251        di->b->dirty = true;
    252        
     252
    253253        while (!flag && fat_directory_prev(di) == EOK) {
    254254                if (fat_directory_get(di, &d) == EOK &&
     
    276276        assert(rc == EOK);
    277277        instance = (fat_instance_t *) data;
    278        
     278
    279279        if (fat_valid_short_name(name)) {
    280280                /*
     
    296296                uint16_t wname[FAT_LFN_NAME_LEN];
    297297                size_t lfn_size, lfn_offset;
    298                
     298
    299299                rc = str_to_utf16(wname, FAT_LFN_NAME_LEN, name);
    300300                if (rc != EOK)
    301301                        return rc;
    302                
     302
    303303                lfn_size = utf16_wsize(wname);
    304304                long_entry_count = lfn_size / FAT_LFN_ENTRY_SIZE;
     
    440440        di->nodep->dirty = true;                /* need to sync node */
    441441        di->blocks = di->nodep->size / BPS(di->bs);
    442        
     442
    443443        return EOK;
    444444}
     
    450450        aoff64_t pos;
    451451        errno_t rc;
    452        
     452
    453453        do {
    454454                found = 0;
Note: See TracChangeset for help on using the changeset viewer.