Index: kernel/genarch/src/drivers/dsrln/dsrlnout.c
===================================================================
--- kernel/genarch/src/drivers/dsrln/dsrlnout.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
+++ kernel/genarch/src/drivers/dsrln/dsrlnout.c	(revision b60c582d0cf4f0476a720c8e05bd742fbffc87ce)
@@ -41,11 +41,16 @@
 #include <console/console.h>
 #include <sysinfo/sysinfo.h>
+#include <string.h>
 
 static ioport8_t *dsrlnout_base;
 
-static void dsrlnout_putchar(outdev_t *dev __attribute__((unused)), const char ch, bool silent)
+static void dsrlnout_putchar(outdev_t *dev __attribute__((unused)), const wchar_t ch, bool silent)
 {
-	if (!silent)
-		pio_write_8(dsrlnout_base, ch);
+	if (!silent) {
+		if (ascii_check(ch))
+			pio_write_8(dsrlnout_base, ch);
+		else
+			pio_write_8(dsrlnout_base, invalch);
+	}
 }
 
Index: kernel/genarch/src/multiboot/multiboot.c
===================================================================
--- kernel/genarch/src/multiboot/multiboot.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
+++ kernel/genarch/src/multiboot/multiboot.c	(revision b60c582d0cf4f0476a720c8e05bd742fbffc87ce)
@@ -42,16 +42,13 @@
 /** Extract command name from the multiboot module command line.
  *
- * @param buf      Destination buffer (will always null-terminate).
- * @param n        Size of destination buffer.
+ * @param buf      Destination buffer (will always NULL-terminate).
+ * @param sz       Size of destination buffer (in bytes).
  * @param cmd_line Input string (the command line).
  *
  */
-static void extract_command(char *buf, size_t n, const char *cmd_line)
+static void extract_command(char *buf, size_t sz, const char *cmd_line)
 {
-	const char *start, *end, *cp;
-	size_t max_len;
-	
 	/* Find the first space. */
-	end = strchr(cmd_line, ' ');
+	const char *end = str_chr(cmd_line, ' ');
 	if (end == NULL)
 		end = cmd_line + str_size(cmd_line);
@@ -61,6 +58,7 @@
 	 * next character. Otherwise, place start at beginning of buffer.
 	 */
-	cp = end;
-	start = buf;
+	const char *cp = end;
+	const char *start = buf;
+	
 	while (cp != start) {
 		if (*cp == '/') {
@@ -68,11 +66,9 @@
 			break;
 		}
-		--cp;
+		cp--;
 	}
 	
-	/* Copy the command and null-terminate the string. */
-	max_len = min(n - 1, (size_t) (end - start));
-	strncpy(buf, start, max_len + 1);
-	buf[max_len] = '\0';
+	/* Copy the command. */
+	str_ncpy(buf, start, min(sz, (size_t) (end - start) + 1));
 }
 
@@ -88,6 +84,4 @@
 {
 	uint32_t flags;
-	multiboot_mod_t *mods;
-	uint32_t i;
 	
 	if (signature == MULTIBOOT_LOADER_MAGIC)
@@ -99,8 +93,9 @@
 	
 	/* Copy module information. */
-	
+	uint32_t i;
 	if ((flags & MBINFO_FLAGS_MODS) != 0) {
 		init.cnt = min(mi->mods_count, CONFIG_INIT_TASKS);
-		mods = (multiboot_mod_t *) MULTIBOOT_PTR(mi->mods_addr);
+		multiboot_mod_t *mods
+		    = (multiboot_mod_t *) MULTIBOOT_PTR(mi->mods_addr);
 		
 		for (i = 0; i < init.cnt; i++) {
@@ -114,5 +109,5 @@
 				    MULTIBOOT_PTR(mods[i].string));
 			} else
-				init.tasks[i].name[0] = '\0';
+				init.tasks[i].name[0] = 0;
 		}
 	} else
@@ -121,11 +116,7 @@
 	/* Copy memory map. */
 	
-	int32_t mmap_length;
-	multiboot_mmap_t *mme;
-	uint32_t size;
-	
 	if ((flags & MBINFO_FLAGS_MMAP) != 0) {
-		mmap_length = mi->mmap_length;
-		mme = MULTIBOOT_PTR(mi->mmap_addr);
+		int32_t mmap_length = mi->mmap_length;
+		multiboot_mmap_t *mme = MULTIBOOT_PTR(mi->mmap_addr);
 		e820counter = 0;
 		
@@ -135,5 +126,5 @@
 			
 			/* Compute address of next structure. */
-			size = sizeof(mme->size) + mme->size;
+			uint32_t size = sizeof(mme->size) + mme->size;
 			mme = ((void *) mme) + size;
 			mmap_length -= size;
Index: kernel/genarch/src/ofw/ebus.c
===================================================================
--- kernel/genarch/src/ofw/ebus.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
+++ kernel/genarch/src/ofw/ebus.c	(revision b60c582d0cf4f0476a720c8e05bd742fbffc87ce)
@@ -128,5 +128,5 @@
 		return false;
 		
-	if (strcmp(ofw_tree_node_name(controller), "pci") != 0) {
+	if (str_cmp(ofw_tree_node_name(controller), "pci") != 0) {
 		/*
 		 * This is not a PCI node.
Index: kernel/genarch/src/ofw/fhc.c
===================================================================
--- kernel/genarch/src/ofw/fhc.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
+++ kernel/genarch/src/ofw/fhc.c	(revision b60c582d0cf4f0476a720c8e05bd742fbffc87ce)
@@ -67,5 +67,5 @@
 				return true;
 			}
-			if (strcmp(ofw_tree_node_name(node->parent), "central") != 0)
+			if (str_cmp(ofw_tree_node_name(node->parent), "central") != 0)
 				panic("Unexpected parent node: %s.", ofw_tree_node_name(node->parent));
 			
Index: kernel/genarch/src/ofw/ofw_tree.c
===================================================================
--- kernel/genarch/src/ofw/ofw_tree.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
+++ kernel/genarch/src/ofw/ofw_tree.c	(revision b60c582d0cf4f0476a720c8e05bd742fbffc87ce)
@@ -67,5 +67,5 @@
 	
 	for (i = 0; i < node->properties; i++) {
-		if (strcmp(node->property[i].name, name) == 0)
+		if (str_cmp(node->property[i].name, name) == 0)
 			return &node->property[i];
 	}
@@ -110,5 +110,5 @@
 	 */
 	for (cur = node->child; cur; cur = cur->peer) {
-		if (strcmp(cur->da_name, name) == 0)
+		if (str_cmp(cur->da_name, name) == 0)
 			return cur;
 	}
@@ -122,5 +122,5 @@
 	 */
 	for (cur = node->child; cur; cur = cur->peer) {
-		if (strcmp(ofw_tree_node_name(cur), name) == 0)
+		if (str_cmp(ofw_tree_node_name(cur), name) == 0)
 			return cur;
 	}
@@ -147,5 +147,5 @@
 		if (!prop || !prop->value)
 			continue;
-		if (strcmp(prop->value, name) == 0)
+		if (str_cmp(prop->value, name) == 0)
 			return cur;
 	}
@@ -204,5 +204,5 @@
 		if (!prop || !prop->value)
 			continue;
-		if (strcmp(prop->value, name) == 0)
+		if (str_cmp(prop->value, name) == 0)
 			return cur;
 	}
@@ -230,5 +230,5 @@
 		if (!prop || !prop->value)
 			continue;
-		if (strcmp(prop->value, name) == 0)
+		if (str_cmp(prop->value, name) == 0)
 			return cur;
 	}
@@ -253,12 +253,13 @@
 		return NULL;
 	
-	for (i = 1; i < str_size(path) && node; i = j + 1) {
-		for (j = i; j < str_size(path) && path[j] != '/'; j++)
-			;
-		if (i == j)	/* skip extra slashes */
+	for (i = 1; (i < str_size(path)) && (node); i = j + 1) {
+		for (j = i; (j < str_size(path)) && (path[j] != '/'); j++);
+		
+		/* Skip extra slashes */
+		if (i == j)
 			continue;
-			
+		
 		memcpy(buf, &path[i], j - i);
-		buf[j - i] = '\0';
+		buf[j - i] = 0;
 		node = ofw_tree_find_child(node, buf);
 	}
Index: kernel/genarch/src/ofw/pci.c
===================================================================
--- kernel/genarch/src/ofw/pci.c	(revision 06b785f8cd841eaeec20587b753477850c12723b)
+++ kernel/genarch/src/ofw/pci.c	(revision b60c582d0cf4f0476a720c8e05bd742fbffc87ce)
@@ -59,5 +59,5 @@
 	prop = ofw_tree_getprop(node, "ranges");
 	if (!prop) {
-		if (strcmp(ofw_tree_node_name(node->parent), "pci") == 0)
+		if (str_cmp(ofw_tree_node_name(node->parent), "pci") == 0)
 			return ofw_pci_apply_ranges(node->parent, reg, pa);
 		return false;
