Index: kernel/generic/include/func.h
===================================================================
--- kernel/generic/include/func.h	(revision bcb6f27c94d88d0e64ed1c34d95c4db12a923376)
+++ kernel/generic/include/func.h	(revision 4ce914d4d867104231d15513fe8669e434fea7b2)
@@ -42,5 +42,4 @@
 
 extern void halt(void) __attribute__((noreturn));
-extern unative_t atoi(const char *text);
 
 #endif
Index: kernel/generic/src/console/cmd.c
===================================================================
--- kernel/generic/src/console/cmd.c	(revision bcb6f27c94d88d0e64ed1c34d95c4db12a923376)
+++ kernel/generic/src/console/cmd.c	(revision 4ce914d4d867104231d15513fe8669e434fea7b2)
@@ -837,21 +837,24 @@
 	bool pointer = false;
 	int rc;
-
-	if (((char *)argv->buffer)[0] == '*') {
+	
+	if (((char *) argv->buffer)[0] == '*') {
 		rc = symtab_addr_lookup((char *) argv->buffer + 1, &addr);
 		pointer = true;
-	} else if (((char *) argv->buffer)[0] >= '0' && 
-		   ((char *)argv->buffer)[0] <= '9') {
-		rc = EOK;
-		addr = atoi((char *)argv->buffer);
-	} else {
+	} else if (((char *) argv->buffer)[0] >= '0' &&
+		   ((char *) argv->buffer)[0] <= '9') {
+		uint64_t value;
+		rc = str_uint64((char *) argv->buffer, NULL, 0, true, &value);
+		if (rc == EOK)
+			addr = (uintptr_t) value;
+	} else
 		rc = symtab_addr_lookup((char *) argv->buffer, &addr);
-	}
-
+	
 	if (rc == ENOENT)
 		printf("Symbol %s not found.\n", argv->buffer);
+	else if (rc == EINVAL)
+		printf("Invalid address.\n");
 	else if (rc == EOVERFLOW) {
 		symtab_print_search((char *) argv->buffer);
-		printf("Duplicate symbol, be more specific.\n");
+		printf("Duplicate symbol (be more specific) or address overflow.\n");
 	} else if (rc == EOK) {
 		if (pointer)
@@ -859,7 +862,6 @@
 		printf("Writing %#" PRIx64 " -> %p\n", arg1, addr);
 		*(uint32_t *) addr = arg1;
-	} else {
+	} else
 		printf("No symbol information available.\n");
-	}
 	
 	return 1;
Index: kernel/generic/src/console/kconsole.c
===================================================================
--- kernel/generic/src/console/kconsole.c	(revision bcb6f27c94d88d0e64ed1c34d95c4db12a923376)
+++ kernel/generic/src/console/kconsole.c	(revision 4ce914d4d867104231d15513fe8669e434fea7b2)
@@ -455,17 +455,36 @@
 			printf("No symbol information available.\n");
 			return false;
-		}
-		
-		if (isaddr)
-			*result = (unative_t) symaddr;
-		else if (isptr)
-			*result = **((unative_t **) symaddr);
-		else
-			*result = *((unative_t *) symaddr);
+		case EOK:
+			if (isaddr)
+				*result = (unative_t) symaddr;
+			else if (isptr)
+				*result = **((unative_t **) symaddr);
+			else
+				*result = *((unative_t *) symaddr);
+			break;
+		default:
+			printf("Unknown error.\n");
+			return false;
+		}
 	} else {
 		/* It's a number - convert it */
-		*result = atoi(text);
-		if (isptr)
-			*result = *((unative_t *) *result);
+		uint64_t value;
+		int rc = str_uint64(text, NULL, 0, true, &value);
+		switch (rc) {
+		case EINVAL:
+			printf("Invalid number.\n");
+			return false;
+		case EOVERFLOW:
+			printf("Integer overflow.\n");
+			return false;
+		case EOK:
+			*result = (unative_t) value;
+			if (isptr)
+				*result = *((unative_t *) *result);
+			break;
+		default:
+			printf("Unknown error.\n");
+			return false;
+		}
 	}
 	
Index: kernel/generic/src/lib/func.c
===================================================================
--- kernel/generic/src/lib/func.c	(revision bcb6f27c94d88d0e64ed1c34d95c4db12a923376)
+++ kernel/generic/src/lib/func.c	(revision 4ce914d4d867104231d15513fe8669e434fea7b2)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
@@ -33,5 +33,5 @@
 /**
  * @file
- * @brief	Miscellaneous functions.
+ * @brief Miscellaneous functions.
  */
 
@@ -79,48 +79,4 @@
 }
 
-/** Convert ascii representation to unative_t
- *
- * Supports 0x for hexa & 0 for octal notation.
- * Does not check for overflows, does not support negative numbers
- *
- * @param text Textual representation of number
- * @return Converted number or 0 if no valid number ofund 
- */
-unative_t atoi(const char *text)
-{
-	int base = 10;
-	unative_t result = 0;
-
-	if (text[0] == '0' && text[1] == 'x') {
-		base = 16;
-		text += 2;
-	} else if (text[0] == '0')
-		base = 8;
-
-	while (*text) {
-		if (base != 16 && \
-		    ((*text >= 'A' && *text <= 'F' )
-		     || (*text >='a' && *text <='f')))
-			break;
-		if (base == 8 && *text >='8')
-			break;
-
-		if (*text >= '0' && *text <= '9') {
-			result *= base;
-			result += *text - '0';
-		} else if (*text >= 'A' && *text <= 'F') {
-			result *= base;
-			result += *text - 'A' + 10;
-		} else if (*text >= 'a' && *text <= 'f') {
-			result *= base;
-			result += *text - 'a' + 10;
-		} else
-			break;
-		text++;
-	}
-
-	return result;
-}
-
 /** @}
  */
Index: kernel/generic/src/lib/str.c
===================================================================
--- kernel/generic/src/lib/str.c	(revision bcb6f27c94d88d0e64ed1c34d95c4db12a923376)
+++ kernel/generic/src/lib/str.c	(revision 4ce914d4d867104231d15513fe8669e434fea7b2)
@@ -823,4 +823,6 @@
 				str++;
 				break;
+			default:
+				str--;
 			}
 		}
@@ -886,5 +888,5 @@
  * @param base   Zero or number between 2 and 36 inclusive.
  * @param strict Do not allow any trailing characters.
- * @apram result Result of the conversion.
+ * @param result Result of the conversion.
  *
  * @return EOK if conversion was successful.
