Index: uspace/srv/drivers/isa/isa.c
===================================================================
--- uspace/srv/drivers/isa/isa.c	(revision 5fe1c32a4930216079cf98a8a883d3e79f586afd)
+++ uspace/srv/drivers/isa/isa.c	(revision f928a8ada5c2d6dc33c5de53976697d179627577)
@@ -131,7 +131,5 @@
 
 static char * read_dev_conf(const char *conf_path)
-{
-	printf(NAME ": read_dev_conf conf_path = %s.\n", conf_path);
-		
+{		
 	bool suc = false;	
 	char *buf = NULL;
@@ -182,6 +180,12 @@
 }
 
-static char * str_get_line(char *str, char **next) {
+static char * str_get_line(char *str, char **next) {	
 	char *line = str;
+	
+	if (NULL == str) {
+		*next = NULL;
+		return NULL;
+	}
+	
 	while (0 != *str && '\n' != *str) {
 		str++;
@@ -192,7 +196,7 @@
 	} else {
 		*next = NULL;
-	}
-	
-	*str = 0;	
+	}	
+	
+	*str = 0;
 	
 	return line;
@@ -254,4 +258,6 @@
 		
 		data->hw_resources.count++;
+		
+		printf(NAME ": added irq 0x%x to device %s\n", irq, dev->name);
 	}	
 }
@@ -268,6 +274,9 @@
 		resources[count].res.io_range.address = addr;
 		resources[count].res.io_range.size = len;
-		resources[count].res.io_range.endianness = LITTLE_ENDIAN;		
+		resources[count].res.io_range.endianness = LITTLE_ENDIAN;	
+		
 		data->hw_resources.count++;
+		
+		printf(NAME ": added io range (addr=0x%x, size=0x%x) to device %s\n", addr, len, dev->name);
 	}	
 }
@@ -314,8 +323,6 @@
 	while (!isspace(*end)) {
 		end++;
-	}	
-	*end = 0;
-	
-	size_t size = str_size(val) + 1;
+	}		
+	size_t size = end - val + 1;
 	*id = (char *)malloc(size);
 	str_cpy(*id, size, val);	
@@ -353,5 +360,5 @@
 	match_id->score = score;
 	
-	printf(NAME ": adding match id %s with score %d to device %s\n", id, score, dev->name);
+	printf(NAME ": adding match id '%s' with score %d to device %s\n", id, score, dev->name);
 	add_match_id(&dev->match_ids, match_id);
 }
@@ -372,5 +379,4 @@
 static void get_dev_prop(device_t *dev, char *line)
 {
-	printf(NAME " get_dev_prop from line '%s'\n", line);
 	// skip leading spaces
 	line = skip_spaces(line);
@@ -380,5 +386,5 @@
 		!read_dev_prop(dev, line, "match", &get_dev_match_id)
 	) {		
-		printf(NAME " error undefined device property at line %s\n", line);
+		printf(NAME " error undefined device property at line '%s'\n", line);
 	} 	
 }
@@ -411,7 +417,4 @@
 	}
 	
-	printf(NAME ": next line ='%s'\n", dev_conf);
-	printf(NAME ": current line ='%s'\n", line);
-	
 	// get device name
 	dev_name = get_device_name(line);
@@ -432,5 +435,5 @@
 	// get properties of the device (match ids, irq and io range)
 	while (true) {		
-		line = str_get_line(dev_conf, &dev_conf);
+		line = str_get_line(dev_conf, &dev_conf);		
 		
 		if (line_empty(line)) {
@@ -442,6 +445,6 @@
 		get_dev_prop(dev, line);
 		
-		printf(NAME ": next line ='%s'\n", dev_conf);
-		printf(NAME ": current line ='%s'\n", line);		
+		//printf(NAME ": next line ='%s'\n", dev_conf);
+		//printf(NAME ": current line ='%s'\n", line);		
 	}
 	
@@ -449,4 +452,5 @@
 	dev->class = &isa_child_class;
 	
+	printf(NAME ": child_device_register(dev, parent); device is %s.\n", dev->name);
 	child_device_register(dev, parent);	
 	
@@ -456,5 +460,5 @@
 static char * parse_dev_conf(char *conf, device_t *parent)
 {
-	while (NULL != conf) {
+	while (NULL != conf && 0 != *conf) {
 		conf = read_isa_dev_info(conf, parent);
 	}	
