Changeset 1b20da0 in mainline for uspace/srv/fs/fat


Ignore:
Timestamp:
2018-02-28T17:52:03Z (8 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:
3061bc1
Parents:
df6ded8
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
Message:

style: Remove trailing whitespace on non-empty lines, in certain file types.

Command used: tools/srepl '\([^[:space:]]\)\s\+$' '\1' -- *.c *.h *.py *.sh *.s *.S *.ag

Location:
uspace/srv/fs/fat
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/fat/fat.c

    rdf6ded8 r1b20da0  
    3131/** @addtogroup fs
    3232 * @{
    33  */ 
     33 */
    3434
    3535/**
  • uspace/srv/fs/fat/fat.h

    rdf6ded8 r1b20da0  
    3030/** @addtogroup fs
    3131 * @{
    32  */ 
     32 */
    3333
    3434#ifndef FAT_FAT_H_
  • uspace/srv/fs/fat/fat_dentry.c

    rdf6ded8 r1b20da0  
    3030/** @addtogroup fs
    3131 * @{
    32  */ 
     32 */
    3333
    3434/**
     
    263263 *
    264264 * @param str  NULL-terminated (or not) string. The pointer comes from a packed
    265  *             structure and as such is expected to be unaligned. 
     265 *             structure and as such is expected to be unaligned.
    266266 * @param size Maximum number of bytes to consider.
    267267 *
     
    274274
    275275        while (offset < size) {
    276                 if (str[offset] == 0 || str[offset] == FAT_LFN_PAD) 
     276                if (str[offset] == 0 || str[offset] == FAT_LFN_PAD)
    277277                        break;
    278278                offset++;
     
    294294        size += fat_lfn_str_nlength(FAT_LFN_PART1(d), FAT_LFN_PART1_SIZE);
    295295        size += fat_lfn_str_nlength(FAT_LFN_PART2(d), FAT_LFN_PART2_SIZE);
    296         size += fat_lfn_str_nlength(FAT_LFN_PART3(d), FAT_LFN_PART3_SIZE);     
     296        size += fat_lfn_str_nlength(FAT_LFN_PART3(d), FAT_LFN_PART3_SIZE);
    297297       
    298298        return size;
     
    429429/**
    430430 * @}
    431  */ 
     431 */
  • uspace/srv/fs/fat/fat_dentry.h

    rdf6ded8 r1b20da0  
    3030/** @addtogroup fs
    3131 * @{
    32  */ 
     32 */
    3333
    3434#ifndef FAT_FAT_DENTRY_H_
  • uspace/srv/fs/fat/fat_directory.c

    rdf6ded8 r1b20da0  
    2929/** @addtogroup fs
    3030 * @{
    31  */ 
     31 */
    3232
    3333/**
     
    4949{
    5050        di->b = NULL;
    51         di->nodep = nodep;     
     51        di->nodep = nodep;
    5252        if (di->nodep->type != FAT_DIRECTORY)
    5353                return EINVAL;
     
    183183                                /* We found long entry */
    184184                                long_entry_count--;
    185                                 if ((FAT_LFN_ORDER(d) == long_entry_count) && 
     185                                if ((FAT_LFN_ORDER(d) == long_entry_count) &&
    186186                                    (checksum == FAT_LFN_CHKSUM(d))) {
    187187                                        /* Right order! */
     
    201201                                        long_entry = true;
    202202                                        long_entry_count = FAT_LFN_COUNT(d);
    203                                         lfn_size = (FAT_LFN_ENTRY_SIZE * 
     203                                        lfn_size = (FAT_LFN_ENTRY_SIZE *
    204204                                            (FAT_LFN_COUNT(d) - 1)) +
    205205                                            fat_lfn_size(d);
     
    212212                        break;
    213213                case FAT_DENTRY_VALID:
    214                         if (long_entry && 
     214                        if (long_entry &&
    215215                            (checksum == fat_dentry_chksum(d->name))) {
    216216                                wname[lfn_size] = '\0';
     
    253253        while (!flag && fat_directory_prev(di) == EOK) {
    254254                if (fat_directory_get(di, &d) == EOK &&
    255                     fat_classify_dentry(d) == FAT_DENTRY_LFN && 
     255                    fat_classify_dentry(d) == FAT_DENTRY_LFN &&
    256256                    checksum == FAT_LFN_CHKSUM(d)) {
    257257                        if (FAT_IS_LFN(d))
     
    479479                                break;
    480480                        }
    481                 } while (fat_directory_next(di) == EOK);       
     481                } while (fat_directory_next(di) == EOK);
    482482        } while (fat_directory_expand(di) == EOK);
    483483
     
    564564/**
    565565 * @}
    566  */ 
     566 */
  • uspace/srv/fs/fat/fat_fat.c

    rdf6ded8 r1b20da0  
    520520                        return rc;
    521521                }
    522         } else 
     522        } else
    523523                ((uint8_t *) b->data)[(offset % BPS(bs)) + 1] = byte2;
    524524
     
    966966                 * set to one.
    967967                 */
    968                 if (!FAT_IS_FAT12(bs) && 
     968                if (!FAT_IS_FAT12(bs) &&
    969969                    ((e0 >> 8) != (FAT_MASK(bs) >> 8) || e1 != FAT_MASK(bs)))
    970970                        return ENOTSUP;
  • uspace/srv/fs/fat/fat_idx.c

    rdf6ded8 r1b20da0  
    2929/** @addtogroup fs
    3030 * @{
    31  */ 
     31 */
    3232
    3333/**
     
    9292
    9393        list_foreach(unused_list, link, unused_t, u) {
    94                 if (u->service_id == service_id) 
     94                if (u->service_id == service_id)
    9595                        return u;
    9696        }
     
    108108 * The index structures are hashed by the service_id, parent node's first
    109109 * cluster and index within the parent directory.
    110  */ 
     110 */
    111111static hash_table_t up_hash;
    112112
     
    211211        u = unused_find(service_id, true);
    212212        if (!u)
    213                 return false;   
     213                return false;
    214214
    215215        if (list_empty(&u->freed_list)) {
    216                 if (u->remaining) { 
     216                if (u->remaining) {
    217217                        /*
    218218                         * There are no freed indices, allocate one directly
     
    333333
    334334        fidx = (fat_idx_t *) malloc(sizeof(fat_idx_t));
    335         if (!fidx) 
     335        if (!fidx)
    336336                return ENOMEM;
    337337        if (!fat_index_alloc(service_id, &fidx->index)) {
     
    469469errno_t fat_idx_init(void)
    470470{
    471         if (!hash_table_create(&up_hash, 0, 0, &uph_ops)) 
     471        if (!hash_table_create(&up_hash, 0, 0, &uph_ops))
    472472                return ENOMEM;
    473473        if (!hash_table_create(&ui_hash, 0, 0, &uih_ops)) {
     
    535535         * Remove this instance's index structure from up_hash and ui_hash.
    536536         * Process up_hash first and ui_hash second because the index structure
    537          * is actually removed in idx_remove_callback(). 
     537         * is actually removed in idx_remove_callback().
    538538         */
    539539        fibril_mutex_lock(&used_lock);
     
    556556                free(f);
    557557        }
    558         free(u); 
     558        free(u);
    559559}
    560560
    561561/**
    562562 * @}
    563  */ 
     563 */
  • uspace/srv/fs/fat/fat_ops.c

    rdf6ded8 r1b20da0  
    312312        d = ((fat_dentry_t *)b->data) + (idxp->pdi % DPS(bs));
    313313        if (FAT_IS_FAT32(bs)) {
    314                 nodep->firstc = uint16_t_le2host(d->firstc_lo) | 
     314                nodep->firstc = uint16_t_le2host(d->firstc_lo) |
    315315                    (uint16_t_le2host(d->firstc_hi) << 16);
    316316        } else
     
    535535        if (flags & L_DIRECTORY)
    536536                (void) fat_free_clusters(bs, service_id, mcl);
    537         return rc;             
     537        return rc;
    538538}
    539539
Note: See TracChangeset for help on using the changeset viewer.