Index: boot/generic/src/str.c
===================================================================
--- boot/generic/src/str.c	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ boot/generic/src/str.c	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -354,6 +354,10 @@
  *
  * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths.
+ * The strings are considered equal iff their length is equal
+ * and both strings consist of the same sequence of characters.
+ *
+ * A string is smaller than another string iff it is shorter or
+ * has a character with lower value at the first position where
+ * the strings differ.
  *
  * @param s1 First string to compare.
Index: contrib/bazaar/bzreml/__init__.py
===================================================================
--- contrib/bazaar/bzreml/__init__.py	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ contrib/bazaar/bzreml/__init__.py	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -108,4 +108,5 @@
 		if (revision_ac_id == revision_old_id):
 			break
+		
 		yield revision_ac_id
 
@@ -117,7 +118,9 @@
 		branch.repository.lock_read()
 		try:
-			body = StringIO()
+			revision_prev_id = revision_old_id
 			
-			for revision_ac_id in revision_sequence(branch, revision_old_id, revision_new_id):
+			for revision_ac_id in reversed(list(revision_sequence(branch, revision_old_id, revision_new_id))):
+				body = StringIO()
+				
 				revision_ac = branch.repository.get_revision(revision_ac_id)
 				revision_ac_no = branch.revision_id_to_revno(revision_ac_id)
@@ -139,5 +142,5 @@
 				body.write("\n")
 				
-				commit_message = ""
+				commit_message = None
 				body.write("Log:\n")
 				if (not revision_ac.message):
@@ -147,59 +150,60 @@
 					for line in log.split("\n"):
 						body.write("%s\n" % line)
-						if (commit_message == ""):
+						if (commit_message == None):
 							commit_message = line
 				
-				if (commit_message == ""):
+				if (commit_message == None):
 					commit_message = "(empty)"
 				
 				body.write("\n")
+				
+				tree_prev = branch.repository.revision_tree(revision_prev_id)
+				tree_ac = branch.repository.revision_tree(revision_ac_id)
+				
+				delta = tree_ac.changes_from(tree_prev)
+				
+				if (len(delta.added) > 0):
+					body.write("Added:\n")
+					for item in delta.added:
+						body.write("    %s\n" % item[0])
+				
+				if (len(delta.removed) > 0):
+					body.write("Removed:\n")
+					for item in delta.removed:
+						body.write("    %s\n" % item[0])
+				
+				if (len(delta.renamed) > 0):
+					body.write("Renamed:\n")
+					for item in delta.renamed:
+						body.write("    %s -> %s\n" % (item[0], item[1]))
+				
+				if (len(delta.kind_changed) > 0):
+					body.write("Changed:\n")
+					for item in delta.kind_changed:
+						body.write("    %s\n" % item[0])
+				
+				if (len(delta.modified) > 0):
+					body.write("Modified:\n")
+					for item in delta.modified:
+						body.write("    %s\n" % item[0])
+				
+				body.write("\n")
+				
+				tree_prev.lock_read()
+				try:
+					tree_ac.lock_read()
+					try:
+						diff = DiffTree.from_trees_options(tree_prev, tree_ac, body, "utf8", None, "", "", None)
+						diff.show_diff(None, None)
+					finally:
+						tree_ac.unlock()
+				finally:
+					tree_prev.unlock()
+				
+				subject = "r%d - %s" % (revision_ac_no, commit_message)
+				send_smtp("localhost", config_sender(config), config_to(config), subject, body.getvalue())
+				
+				revision_prev_id = revision_ac_id
 			
-			tree_old = branch.repository.revision_tree(revision_old_id)
-			tree_new = branch.repository.revision_tree(revision_new_id)
-			
-			revision_new_no = branch.revision_id_to_revno(revision_new_id)
-			delta = tree_new.changes_from(tree_old)
-			
-			if (len(delta.added) > 0):
-				body.write("Added:\n")
-				for item in delta.added:
-					body.write("    %s\n" % item[0])
-			
-			if (len(delta.removed) > 0):
-				body.write("Removed:\n")
-				for item in delta.removed:
-					body.write("    %s\n" % item[0])
-			
-			if (len(delta.renamed) > 0):
-				body.write("Renamed:\n")
-				for item in delta.renamed:
-					body.write("    %s -> %s\n" % (item[0], item[1]))
-			
-			if (len(delta.kind_changed) > 0):
-				body.write("Changed:\n")
-				for item in delta.kind_changed:
-					body.write("    %s\n" % item[0])
-			
-			if (len(delta.modified) > 0):
-				body.write("Modified:\n")
-				for item in delta.modified:
-					body.write("    %s\n" % item[0])
-			
-			body.write("\n")
-			
-			tree_old.lock_read()
-			try:
-				tree_new.lock_read()
-				try:
-					diff = DiffTree.from_trees_options(tree_old, tree_new, body, "utf8", None, "", "", None)
-					diff.show_diff(None, None)
-				finally:
-					tree_new.unlock()
-			finally:
-				tree_old.unlock()
-			
-			subject = "r%d - %s" % (revision_new_no, commit_message)
-			
-			send_smtp("localhost", config_sender(config), config_to(config), subject, body.getvalue())
 		finally:
 			branch.repository.unlock()
Index: contrib/bazaar/bzreml/setup.py
===================================================================
--- contrib/bazaar/bzreml/setup.py	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ contrib/bazaar/bzreml/setup.py	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -7,5 +7,5 @@
 	description = 'Commit email plugin for Bazaar',
 	keywords = 'plugin bzr email',
-	version = '1.2',
+	version = '1.3',
 	url = 'http://www.decky.cz/',
 	license = 'BSD',
@@ -13,5 +13,5 @@
 	author_email = 'martin@decky.cz',
 	long_description = """Hooks into Bazaar and sends commit notification emails.""",
-	package_dir = {'bzrlib.plugins.eml':'.'}, 
+	package_dir = {'bzrlib.plugins.eml':'.'},
 	packages = ['bzrlib.plugins.eml']
 )
Index: kernel/generic/src/lib/str.c
===================================================================
--- kernel/generic/src/lib/str.c	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ kernel/generic/src/lib/str.c	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -456,6 +456,10 @@
  *
  * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths.
+ * The strings are considered equal iff their length is equal
+ * and both strings consist of the same sequence of characters.
+ *
+ * A string is smaller than another string iff it is shorter or
+ * has a character with lower value at the first position where
+ * the strings differ.
  *
  * @param s1 First string to compare.
@@ -494,6 +498,12 @@
  *
  * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths and the length limit.
+ * The strings are considered equal iff
+ * min(str_length(s1), max_len) == min(str_length(s2), max_len)
+ * and both strings consist of the same sequence of characters,
+ * up to max_len characters.
+ *
+ * A string is smaller than another string iff it is shorter or
+ * has a character with lower value at the first position where
+ * the strings differ, considering only first max_len characters.
  *
  * @param s1      First string to compare.
Index: uspace/app/sportdmp/sportdmp.c
===================================================================
--- uspace/app/sportdmp/sportdmp.c	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/app/sportdmp/sportdmp.c	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -37,15 +37,25 @@
 static void syntax_print(void)
 {
-	fprintf(stderr, "Usage: sportdmp <baud> <device_service>\n");
+	fprintf(stderr, "Usage: sportdmp [--baud=<baud>] [device_service]\n");
 }
 
 int main(int argc, char **argv)
 {
-	const char* svc_path = "devices/\\hw\\pci0\\00:01.0\\com1\\a";
 	sysarg_t baud = 9600;
+	service_id_t svc_id;
 	
-	if (argc > 1) {
+	int arg = 1;
+	int rc;
+		
+	if (argc > arg && str_test_prefix(argv[arg], "--baud=")) {
+		size_t arg_offset = str_lsize(argv[arg], 7);
+		char* arg_str = argv[arg] + arg_offset;
+		if (str_length(arg_str) == 0) {
+			fprintf(stderr, "--baud requires an argument\n");
+			syntax_print();
+			return 1;
+		}
 		char *endptr;
-		baud = strtol(argv[1], &endptr, 10);
+		baud = strtol(arg_str, &endptr, 10);
 		if (*endptr != '\0') {
 			fprintf(stderr, "Invalid value for baud\n");
@@ -53,26 +63,55 @@
 			return 1;
 		}
+		arg++;
 	}
 	
-	if (argc > 2) {
-		svc_path = argv[2];
+	if (argc > arg) {
+		rc = loc_service_get_id(argv[arg], &svc_id, 0);
+		if (rc != EOK) {
+			fprintf(stderr, "Cannot find device service %s\n",
+			    argv[arg]);
+			return 1;
+		}
+		arg++;
+	}
+	else {
+		category_id_t serial_cat_id;
+		
+		rc = loc_category_get_id("serial", &serial_cat_id, 0);
+		if (rc != EOK) {
+			fprintf(stderr, "Failed getting id of category "
+			    "'serial'\n");
+			return 1;
+		}
+		
+		service_id_t *svc_ids;
+		size_t svc_count;
+		
+		rc = loc_category_get_svcs(serial_cat_id, &svc_ids, &svc_count);		if (rc != EOK) {
+			fprintf(stderr, "Failed getting list of services\n");
+			return 1;
+		}
+		
+		if (svc_count == 0) {
+			fprintf(stderr, "No service in category 'serial'\n");
+			free(svc_ids);
+			return 1;
+		}
+		
+		svc_id = svc_ids[0];
+		free(svc_ids);
 	}
 	
-	if (argc > 3) {
+	if (argc > arg) {
+		fprintf(stderr, "Too many arguments\n");
 		syntax_print();
 		return 1;
 	}
 	
-	service_id_t svc_id;
-	int rc = loc_service_get_id(svc_path, &svc_id, 0);
-	if (rc != EOK) {
-		fprintf(stderr, "Cannot find device service %s\n", svc_path);
-		return 1;
-	}
 	
 	async_sess_t *sess = loc_service_connect(EXCHANGE_SERIALIZE, svc_id,
 	    IPC_FLAG_BLOCKING);
 	if (!sess) {
-		fprintf(stderr, "Failed connecting to service %s\n", svc_path);
+		fprintf(stderr, "Failed connecting to service\n");
 	}
 	
Index: uspace/lib/c/arch/abs32le/_link.ld.in
===================================================================
--- uspace/lib/c/arch/abs32le/_link.ld.in	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/c/arch/abs32le/_link.ld.in	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -14,12 +14,13 @@
 SECTIONS {
 #ifdef LOADER
+	. = 0x70001000 + SIZEOF_HEADERS;
+	
 	.interp : {
 		*(.interp);
-	} :interp
-	
-	. = 0x70001000 + SIZEOF_HEADERS;
+	} :interp :text
 #else
 	. = 0x1000 + SIZEOF_HEADERS;
 #endif
+	
 	.text : {
 		*(.text .text.*);
Index: uspace/lib/c/arch/amd64/_link.ld.in
===================================================================
--- uspace/lib/c/arch/amd64/_link.ld.in	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/c/arch/amd64/_link.ld.in	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -15,12 +15,13 @@
 SECTIONS {
 #ifdef LOADER
+	. = 0x70001000 + SIZEOF_HEADERS;
+	
 	.interp : {
 		*(.interp);
-	} :interp
-	
-	. = 0x70001000 + SIZEOF_HEADERS;
+	} :interp :text
 #else
 	. = 0x1000 + SIZEOF_HEADERS;
 #endif
+	
 	.init : {
 		*(.init);
Index: uspace/lib/c/arch/arm32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/arm32/_link.ld.in	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/c/arch/arm32/_link.ld.in	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -14,12 +14,13 @@
 SECTIONS {
 #ifdef LOADER
+	. = 0x70001000 + SIZEOF_HEADERS;
+	
 	.interp : {
 		*(.interp);
-	} :interp
-	
-	. = 0x70001000 + SIZEOF_HEADERS;
+	} :interp :text
 #else
 	. = 0x1000 + SIZEOF_HEADERS;
 #endif
+	
 	.init : {
 		*(.init);
Index: uspace/lib/c/arch/ia32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/ia32/_link.ld.in	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/c/arch/ia32/_link.ld.in	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -19,9 +19,4 @@
 
 SECTIONS {
-#if defined(LOADER) || defined(DLEXE)
-	.interp : {
-		*(.interp);
-	} :interp
-#endif
 #ifdef LOADER
 	. = 0x70001000 + SIZEOF_HEADERS;
@@ -29,4 +24,11 @@
 	. = 0x1000 + SIZEOF_HEADERS;
 #endif
+	
+#if defined(LOADER) || defined(DLEXE)
+	.interp : {
+		*(.interp);
+	} :interp :text
+#endif
+	
 	.init : {
 		*(.init);
Index: uspace/lib/c/arch/ia64/_link.ld.in
===================================================================
--- uspace/lib/c/arch/ia64/_link.ld.in	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/c/arch/ia64/_link.ld.in	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -14,12 +14,13 @@
 SECTIONS {
 #ifdef LOADER
+	. = 0x800000000 + SIZEOF_HEADERS;
+	
 	.interp : {
 		*(.interp);
-	} :interp
-	
-	. = 0x800000000 + SIZEOF_HEADERS;
+	} :interp :text
 #else
 	. = 0x4000 + SIZEOF_HEADERS;
 #endif
+	
 	/*
 	 * XXX This is just a work around. Problem: .init section does not
@@ -27,5 +28,5 @@
 	 */
 	. = ALIGN(., 16);
-
+	
 	.init : {
 		*(.init);
Index: uspace/lib/c/arch/mips32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/mips32/_link.ld.in	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/c/arch/mips32/_link.ld.in	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -14,12 +14,13 @@
 SECTIONS {
 #ifdef LOADER
+	. = 0x70004000 + SIZEOF_HEADERS;
+	
 	.interp : {
 		*(.interp);
-	} :interp
-	
-	. = 0x70004000 + SIZEOF_HEADERS;
+	} :interp :text
 #else
 	. = 0x4000 + SIZEOF_HEADERS;
 #endif
+	
 	.init : {
 		*(.init);
Index: uspace/lib/c/arch/mips64/_link.ld.in
===================================================================
--- uspace/lib/c/arch/mips64/_link.ld.in	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/c/arch/mips64/_link.ld.in	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -15,12 +15,13 @@
 SECTIONS {
 #ifdef LOADER
+	. = 0x70004000 + SIZEOF_HEADERS;
+	
 	.interp : {
 		*(.interp);
-	} :interp
-	
-	. = 0x70004000 + SIZEOF_HEADERS;
+	} :interp :text
 #else
 	. = 0x4000 + SIZEOF_HEADERS;
 #endif
+	
 	.init : {
 		*(.init);
Index: uspace/lib/c/arch/ppc32/_link.ld.in
===================================================================
--- uspace/lib/c/arch/ppc32/_link.ld.in	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/c/arch/ppc32/_link.ld.in	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -15,12 +15,13 @@
 SECTIONS {
 #ifdef LOADER
+	. = 0x70001000 + SIZEOF_HEADERS;
+	
 	.interp : {
 		*(.interp);
-	} :interp
-	
-	. = 0x70001000 + SIZEOF_HEADERS;
+	} :interp :text
 #else
 	. = 0x1000 + SIZEOF_HEADERS;
 #endif
+	
 	.init : {
 		*(.init);
Index: uspace/lib/c/arch/sparc64/_link.ld.in
===================================================================
--- uspace/lib/c/arch/sparc64/_link.ld.in	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/c/arch/sparc64/_link.ld.in	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -14,12 +14,13 @@
 SECTIONS {
 #ifdef LOADER
+	. = 0x70004000 + SIZEOF_HEADERS;
+	
 	.interp : {
 		*(.interp);
-	} :interp
-	
-	. = 0x70004000 + SIZEOF_HEADERS;
+	} :interp :text
 #else
 	. = 0x4000 + SIZEOF_HEADERS;
 #endif
+	
 	.init : {
 		*(.init);
Index: uspace/lib/c/generic/str.c
===================================================================
--- uspace/lib/c/generic/str.c	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/c/generic/str.c	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -428,6 +428,10 @@
  *
  * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths.
+ * The strings are considered equal iff their length is equal
+ * and both strings consist of the same sequence of characters.
+ *
+ * A string is smaller than another string iff it is shorter or
+ * has a character with lower value at the first position where
+ * the strings differ.
  *
  * @param s1 First string to compare.
@@ -466,6 +470,12 @@
  *
  * Do a char-by-char comparison of two NULL-terminated strings.
- * The strings are considered equal iff they consist of the same
- * characters on the minimum of their lengths and the length limit.
+ * The strings are considered equal iff
+ * min(str_length(s1), max_len) == min(str_length(s2), max_len)
+ * and both strings consist of the same sequence of characters,
+ * up to max_len characters.
+ *
+ * A string is smaller than another string iff it is shorter or
+ * has a character with lower value at the first position where
+ * the strings differ, considering only first max_len characters.
  *
  * @param s1      First string to compare.
@@ -508,4 +518,40 @@
 	return 0;
 
+}
+
+/** Test whether p is a prefix of s.
+ *
+ * Do a char-by-char comparison of two NULL-terminated strings
+ * and determine if p is a prefix of s.
+ *
+ * @param s The string in which to look
+ * @param p The string to check if it is a prefix of s
+ *
+ * @return true iff p is prefix of s else false
+ *
+ */
+bool str_test_prefix(const char *s, const char *p)
+{
+	wchar_t c1 = 0;
+	wchar_t c2 = 0;
+	
+	size_t off1 = 0;
+	size_t off2 = 0;
+
+	while (true) {
+		c1 = str_decode(s, &off1, STR_NO_LIMIT);
+		c2 = str_decode(p, &off2, STR_NO_LIMIT);
+		
+		if (c2 == 0)
+			return true;
+
+		if (c1 != c2)
+			return false;
+		
+		if (c1 == 0)
+			break;
+	}
+
+	return false;
 }
 
Index: uspace/lib/c/include/str.h
===================================================================
--- uspace/lib/c/include/str.h	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/c/include/str.h	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -79,4 +79,6 @@
 extern int str_lcmp(const char *s1, const char *s2, size_t max_len);
 
+extern bool str_test_prefix(const char *s, const char *p);
+
 extern void str_cpy(char *dest, size_t size, const char *src);
 extern void str_ncpy(char *dest, size_t size, const char *src, size_t n);
Index: uspace/lib/clui/tinput.c
===================================================================
--- uspace/lib/clui/tinput.c	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/lib/clui/tinput.c	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -601,5 +601,9 @@
 	
 	unsigned int cols = max(1, (ti->con_cols + 1) / (max_length + 1));
-	unsigned int col_width = ti->con_cols / cols;
+	unsigned int padding = 0;
+	if ((cols * max_length) + (cols - 1) < ti->con_cols) {
+		padding = ti->con_cols - (cols * max_length) - (cols - 1);
+	}
+	unsigned int col_width = max_length + padding / cols;
 	unsigned int rows = cnum / cols + ((cnum % cols) != 0);
 	
Index: uspace/srv/loader/interp.S
===================================================================
--- uspace/srv/loader/interp.S	(revision c15849c8a44b459b927cd059efde5825ceb0a3a6)
+++ uspace/srv/loader/interp.S	(revision bd29f9c90890870fd0eb33ada07cd91500b34157)
@@ -5,10 +5,17 @@
 #
 
-#ifdef UARCH_arm32
-#define AT_NOTE	%note
-#else
-#define AT_NOTE	@note
+#if ((defined(UARCH_abs32le)) && (defined(COMPILER_gcc_cross)) \
+    && (defined(CROSS_TARGET_arm32)))
+	#define ATSIGN(arg)  % ## arg
 #endif
 
-.section .interp, "a", AT_NOTE
+#ifdef UARCH_arm32
+	#define ATSIGN(arg)  % ## arg
+#endif
+
+#ifndef ATSIGN
+	#define ATSIGN(arg)  @ ## arg
+#endif
+
+.section .interp, "a", ATSIGN(progbits)
 	.string "kernel"
