Changeset d5c1051 in mainline for uspace/app/trace/trace.c


Ignore:
Timestamp:
2017-12-20T22:25:34Z (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:
39b54fe
Parents:
8610c2c
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:22:29)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2017-12-20 22:25:34)
Message:

"Obviously harmless" error handling tweaks.

File:
1 edited

Legend:

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

    r8610c2c rd5c1051  
    162162       
    163163        int rc = udebug_begin(ksess);
    164         if (rc < 0) {
     164        if (rc != EOK) {
    165165                printf("udebug_begin() -> %s\n", str_error_name(rc));
    166166                return rc;
     
    168168       
    169169        rc = udebug_set_evmask(ksess, UDEBUG_EM_ALL);
    170         if (rc < 0) {
     170        if (rc != EOK) {
    171171                printf("udebug_set_evmask(0x%x) -> %s\n ", UDEBUG_EM_ALL, str_error_name(rc));
    172172                return rc;
     
    186186        rc = udebug_thread_read(sess, thread_hash_buf,
    187187                THBUF_SIZE*sizeof(unsigned), &tb_copied, &tb_needed);
    188         if (rc < 0) {
     188        if (rc != EOK) {
    189189                printf("udebug_thread_read() -> %s\n", str_error_name(rc));
    190190                return rc;
     
    325325        rc = udebug_mem_read(sess, &call, sc_args[0], sizeof(call));
    326326       
    327         if (rc >= 0)
     327        if (rc == EOK)
    328328                ipcp_call_in(&call, sc_rc);
    329329}
     
    338338        rc = udebug_args_read(sess, thread_hash, sc_args);
    339339
    340         if (rc < 0) {
     340        if (rc != EOK) {
    341341                printf("error\n");
    342342                return;
     
    368368//      printf("[%d] ", thread_id);
    369369
    370         if (rc < 0) {
     370        if (rc != EOK) {
    371371                printf("error\n");
    372372                return;
     
    445445                }
    446446
    447                 if (rc >= 0) {
     447                if (rc == EOK) {
    448448                        switch (ev_type) {
    449449                        case UDEBUG_EVENT_SYSCALL_B:
     
    603603
    604604        rc = get_thread_list();
    605         if (rc < 0) {
     605        if (rc != EOK) {
    606606                printf("Failed to get thread list (%s)\n", str_error(rc));
    607607                return;
     
    859859
    860860        rc = connect_task(task_id);
    861         if (rc < 0) {
     861        if (rc != EOK) {
    862862                printf("Failed connecting to task %" PRIu64 ".\n", task_id);
    863863                return 1;
Note: See TracChangeset for help on using the changeset viewer.