Ignore:
Timestamp:
2010-05-08T07:53:23Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
051bc69a
Parents:
6c39a907 (diff), 1317380 (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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/console/kconsole.c

    r6c39a907 r25a76ab8  
    455455                        printf("No symbol information available.\n");
    456456                        return false;
    457                 }
    458                
    459                 if (isaddr)
    460                         *result = (unative_t) symaddr;
    461                 else if (isptr)
    462                         *result = **((unative_t **) symaddr);
    463                 else
    464                         *result = *((unative_t *) symaddr);
     457                case EOK:
     458                        if (isaddr)
     459                                *result = (unative_t) symaddr;
     460                        else if (isptr)
     461                                *result = **((unative_t **) symaddr);
     462                        else
     463                                *result = *((unative_t *) symaddr);
     464                        break;
     465                default:
     466                        printf("Unknown error.\n");
     467                        return false;
     468                }
    465469        } else {
    466470                /* It's a number - convert it */
    467                 *result = atoi(text);
    468                 if (isptr)
    469                         *result = *((unative_t *) *result);
     471                uint64_t value;
     472                int rc = str_uint64(text, NULL, 0, true, &value);
     473                switch (rc) {
     474                case EINVAL:
     475                        printf("Invalid number.\n");
     476                        return false;
     477                case EOVERFLOW:
     478                        printf("Integer overflow.\n");
     479                        return false;
     480                case EOK:
     481                        *result = (unative_t) value;
     482                        if (isptr)
     483                                *result = *((unative_t *) *result);
     484                        break;
     485                default:
     486                        printf("Unknown error.\n");
     487                        return false;
     488                }
    470489        }
    471490       
Note: See TracChangeset for help on using the changeset viewer.