Changeset a35b458 in mainline for uspace/app/trace/trace.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/app/trace/trace.c

    r3061bc1 ra35b458  
    146146{
    147147        async_sess_t *ksess = async_connect_kbox(task_id);
    148        
     148
    149149        if (!ksess) {
    150150                if (errno == ENOTSUP) {
     
    155155                        return errno;
    156156                }
    157                
     157
    158158                printf("Error connecting\n");
    159159                printf("ipc_connect_task(%" PRIu64 ") -> %s ", task_id, str_error_name(errno));
    160160                return errno;
    161161        }
    162        
     162
    163163        errno_t rc = udebug_begin(ksess);
    164164        if (rc != EOK) {
     
    166166                return rc;
    167167        }
    168        
     168
    169169        rc = udebug_set_evmask(ksess, UDEBUG_EM_ALL);
    170170        if (rc != EOK) {
     
    172172                return rc;
    173173        }
    174        
     174
    175175        sess = ksess;
    176176        return 0;
     
    283283        ipc_call_t call;
    284284        sysarg_t phoneid;
    285        
     285
    286286        if (sc_rc != EOK)
    287287                return;
     
    324324        memset(&call, 0, sizeof(call));
    325325        rc = udebug_mem_read(sess, &call, sc_args[0], sizeof(call));
    326        
     326
    327327        if (rc == EOK)
    328328                ipcp_call_in(&call, sc_rc);
     
    525525        int fd_stdout;
    526526        int fd_stderr;
    527        
     527
    528528        fd_root = vfs_root();
    529529        if (fd_root >= 0) {
     
    533533                        goto error;
    534534        }
    535        
     535
    536536        if ((stdin != NULL) && (vfs_fhandle(stdin, &fd_stdin) == EOK)) {
    537537                rc = loader_add_inbox(ldr, "stdin", fd_stdin);
     
    539539                        goto error;
    540540        }
    541        
     541
    542542        if ((stdout != NULL) && (vfs_fhandle(stdout, &fd_stdout) == EOK)) {
    543543                rc = loader_add_inbox(ldr, "stdout", fd_stdout);
     
    545545                        goto error;
    546546        }
    547        
     547
    548548        if ((stderr != NULL) && (vfs_fhandle(stderr, &fd_stderr) == EOK)) {
    549549                rc = loader_add_inbox(ldr, "stderr", fd_stderr);
     
    551551                        goto error;
    552552        }
    553        
     553
    554554        /* Load the program. */
    555555        rc = loader_load_program(ldr);
     
    571571
    572572        (void) arg;
    573        
     573
    574574        console_ctrl_t *console = console_init(stdin, stdout);
    575        
     575
    576576        while (true) {
    577577                fibril_mutex_lock(&state_lock);
     
    579579                        fibril_condvar_wait(&state_cv, &state_lock);
    580580                fibril_mutex_unlock(&state_lock);
    581                
     581
    582582                if (!console_get_event(console, &event))
    583583                        return EINVAL;
    584                
     584
    585585                if (event.type == CEV_KEY) {
    586586                        fibril_mutex_lock(&state_lock);
     
    750750        display_mask_t dm = 0;
    751751        const char *c = text;
    752        
     752
    753753        while (*c) {
    754754                switch (*c) {
     
    769769                        exit(1);
    770770                }
    771                
     771
    772772                ++c;
    773773        }
    774        
     774
    775775        return dm;
    776776}
     
    810810                        break;
    811811                }
    812                
     812
    813813                --argc;
    814814                ++argv;
     
    831831        /* Preload the specified program file. */
    832832        printf("Spawning '%s' with arguments:\n", *argv);
    833        
     833
    834834        char **cp = argv;
    835835        while (*cp)
    836836                printf("'%s'\n", *cp++);
    837        
     837
    838838        task_ldr = preload_task(*argv, argv, &task_id);
    839839        task_wait_for = true;
Note: See TracChangeset for help on using the changeset viewer.