Changeset 8565a42 in mainline for uspace/app/sysinfo


Ignore:
Timestamp:
2018-03-02T20:34:50Z (8 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a1a81f69, d5e5fd1
Parents:
3061bc1 (diff), 34e1206 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:34:50)
git-committer:
GitHub <noreply@…> (2018-03-02 20:34:50)
Message:

Remove all trailing whitespace, everywhere.

See individual commit messages for details.

File:
1 edited

Legend:

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

    r3061bc1 r8565a42  
    5454{
    5555        size_t offset = 0;
    56        
     56
    5757        while (offset < size) {
    5858                wchar_t c = str_decode(data, &offset, size);
     
    6969                return rc;
    7070        }
    71        
     71
    7272        printf("%s -> %" PRIu64 " (0x%" PRIx64 ")\n", ipath,
    7373            (uint64_t) value, (uint64_t) value);
    74        
     74
    7575        return EOK;
    7676}
     
    8484                return -1;
    8585        }
    86        
     86
    8787        printf("%s -> ", ipath);
    8888        dump_bytes_hex(data, size);
     
    9090        dump_bytes_text(data, size);
    9191        fputs("')\n", stdout);
    92        
     92
    9393        return EOK;
    9494}
     
    103103                return -1;
    104104        }
    105        
     105
    106106        printf("%s property %s -> ", ipath, iprop);
    107107        dump_bytes_hex(data, size);
     
    109109        dump_bytes_text(data, size);
    110110        fputs("')\n", stdout);
    111        
     111
    112112        return EOK;
    113113}
     
    125125        if ((keys == NULL) || (size == 0))
    126126                return;
    127        
     127
    128128        size_t pos = 0;
    129129        while (pos < size) {
     
    132132                if (keys[pos + cur_size] != 0)
    133133                        break;
    134                
     134
    135135                size_t path_size = str_size(path) + cur_size + 2;
    136136                char *cur_path = (char *) malloc(path_size);
    137137                if (cur_path == NULL)
    138138                        break;
    139                
     139
    140140                size_t length;
    141                
     141
    142142                if (path[0] != 0) {
    143143                        print_spaces(spaces);
    144144                        printf(".%s\n", keys + pos);
    145145                        length = str_length(keys + pos) + 1;
    146                        
     146
    147147                        snprintf(cur_path, path_size, "%s.%s", path, keys + pos);
    148148                } else {
    149149                        printf("%s\n", keys + pos);
    150150                        length = str_length(keys + pos);
    151                        
     151
    152152                        snprintf(cur_path, path_size, "%s", keys + pos);
    153153                }
    154                
     154
    155155                print_keys(cur_path, spaces + length);
    156                
     156
    157157                free(cur_path);
    158158                pos += cur_size + 1;
    159159        }
    160        
     160
    161161        free(keys);
    162162}
     
    165165{
    166166        int rc = 0;
    167        
     167
    168168        if (argc < 2) {
    169169                /* Print keys */
     
    171171                return rc;
    172172        }
    173        
     173
    174174        char *ipath = argv[1];
    175        
     175
    176176        if (argc < 3) {
    177177                sysinfo_item_val_type_t tag = sysinfo_get_val_type(ipath);
    178                
     178
    179179                switch (tag) {
    180180                case SYSINFO_VAL_UNDEFINED:
     
    194194                        break;
    195195                }
    196                
     196
    197197                return rc;
    198198        }
    199        
     199
    200200        char *iprop = argv[2];
    201201        rc = print_item_property(ipath, iprop);
Note: See TracChangeset for help on using the changeset viewer.