Index: uspace/srv/devman/devman.c
===================================================================
--- uspace/srv/devman/devman.c	(revision a78fa2a9d35d4b71830ba7c047cb36f2e14a33c7)
+++ uspace/srv/devman/devman.c	(revision 5af21c54a30301453f80f290f919569942bc2d67)
@@ -519,10 +519,12 @@
 	async_wait_for(req, &rc);
 	switch(rc) {
-		// TODO inspect return value to find out whether the device was successfully probed and added
 	case EOK:
+		node->state = DEVICE_USABLE;
+		break;
 	case ENOENT:
-		
+		node->state = DEVICE_NOT_PRESENT;
 		break;
-		
+	default:
+		node->state = DEVICE_INVALID;		
 	}
 	
Index: uspace/srv/devman/devman.h
===================================================================
--- uspace/srv/devman/devman.h	(revision a78fa2a9d35d4b71830ba7c047cb36f2e14a33c7)
+++ uspace/srv/devman/devman.h	(revision 5af21c54a30301453f80f290f919569942bc2d67)
@@ -93,4 +93,12 @@
 } driver_list_t;
 
+/** The state of the device. */
+typedef enum {
+	DEVICE_NOT_INITIALIZED = 0,
+	DEVICE_USABLE,
+	DEVICE_NOT_PRESENT,
+	DEVICE_INVALID
+} device_state_t;
+
 /** Representation of a node in the device tree.*/
 struct node {
@@ -113,4 +121,6 @@
 	/** Driver of this device.*/
 	driver_t *drv;
+	/** The state of the device. */
+	device_state_t state;
 	/** Pointer to the previous and next device in the list of devices
 	    owned by one driver */
Index: uspace/srv/devman/main.c
===================================================================
--- uspace/srv/devman/main.c	(revision a78fa2a9d35d4b71830ba7c047cb36f2e14a33c7)
+++ uspace/srv/devman/main.c	(revision 5af21c54a30301453f80f290f919569942bc2d67)
@@ -309,10 +309,11 @@
 			driver = dev->parent->drv;		
 		}
-	} else {
+	} else if (DEVICE_USABLE == dev->state) {
 		driver = dev->drv;		
+		assert(NULL != driver);
 	}
 	
 	if (NULL == driver) {	
-		printf(NAME ": devman_forward error - no driver to connect to.\n", handle);
+		printf(NAME ": devman_forward error - the device is not in usable state.\n", handle);
 		ipc_answer_0(iid, ENOENT);
 		return;	
@@ -331,6 +332,5 @@
 		return;
 	}
-	printf(NAME ": devman_forward: forward connection to device %s to driver %s with phone %d.\n", 
-		dev->pathname, driver->name, driver->phone);
+	printf(NAME ": devman_forward: forward connection to device %s to driver %s.\n", dev->pathname, driver->name);
 	ipc_forward_fast(iid, driver->phone, method, dev->handle, 0, IPC_FF_NONE);	
 }
Index: uspace/srv/drivers/isa/isa.c
===================================================================
--- uspace/srv/drivers/isa/isa.c	(revision a78fa2a9d35d4b71830ba7c047cb36f2e14a33c7)
+++ uspace/srv/drivers/isa/isa.c	(revision 5af21c54a30301453f80f290f919569942bc2d67)
@@ -89,5 +89,5 @@
 static device_class_t isa_child_class;
 
-static bool isa_add_device(device_t *dev);
+static int isa_add_device(device_t *dev);
 
 /** The isa device driver's standard operations.
@@ -474,5 +474,5 @@
 }
 
-static bool isa_add_device(device_t *dev) 
+static int isa_add_device(device_t *dev) 
 {
 	printf(NAME ": isa_add_device, device handle = %d\n", dev->handle);
@@ -482,5 +482,5 @@
 	printf(NAME ": finished the enumeration of legacy devices\n", dev->handle);
 	
-	return true;
+	return EOK;
 }
 
Index: uspace/srv/drivers/pciintel/pci.c
===================================================================
--- uspace/srv/drivers/pciintel/pci.c	(revision a78fa2a9d35d4b71830ba7c047cb36f2e14a33c7)
+++ uspace/srv/drivers/pciintel/pci.c	(revision 5af21c54a30301453f80f290f919569942bc2d67)
@@ -85,5 +85,5 @@
 
 
-static bool pci_add_device(device_t *dev);
+static int pci_add_device(device_t *dev);
 
 /** The pci bus driver's standard operations.
@@ -402,5 +402,5 @@
 			create_pci_match_ids(dev);
 			
-			if (!child_device_register(dev, parent)) {				
+			if (EOK != child_device_register(dev, parent)) {				
 				pci_clean_resource_list(dev);				
 				clean_match_ids(&dev->match_ids);
@@ -433,5 +433,5 @@
 }
 
-static bool pci_add_device(device_t *dev)
+static int pci_add_device(device_t *dev)
 {
 	printf(NAME ": pci_add_device\n");
@@ -440,5 +440,5 @@
 	if (NULL == bus_data) {
 		printf(NAME ": pci_add_device allocation failed.\n");
-		return false;
+		return ENOMEM;
 	}	
 	
@@ -447,5 +447,5 @@
 		printf(NAME ": pci_add_device failed to connect to the parent's driver.\n");
 		delete_pci_bus_data(bus_data);
-		return false;
+		return EPARTY;
 	}
 	
@@ -456,5 +456,5 @@
 		delete_pci_bus_data(bus_data);
 		ipc_hangup(dev->parent_phone);
-		return false;		
+		return EPARTY;		
 	}	
 	
@@ -472,5 +472,5 @@
 		ipc_hangup(dev->parent_phone);
 		clean_hw_resource_list(&hw_resources);
-		return false;					
+		return EADDRNOTAVAIL;					
 	}
 	bus_data->conf_data_port = (char *)bus_data->conf_addr_port + 4;
@@ -484,5 +484,5 @@
 	clean_hw_resource_list(&hw_resources);
 	
-	return true;
+	return EOK;
 }
 
Index: uspace/srv/drivers/root/root.c
===================================================================
--- uspace/srv/drivers/root/root.c	(revision a78fa2a9d35d4b71830ba7c047cb36f2e14a33c7)
+++ uspace/srv/drivers/root/root.c	(revision 5af21c54a30301453f80f290f919569942bc2d67)
@@ -52,5 +52,5 @@
 #define NAME "root"
 
-static bool root_add_device(device_t *dev);
+static int root_add_device(device_t *dev);
 
 /** The root device driver's standard operations.
@@ -67,10 +67,13 @@
 };
 
-/** Create the device which represents the root of HW device tree. 
+/** Create the device which represents the root of HW device tree.
+ * 
  * @param parent parent of the newly created device.
+ * @return 0 on success, negative error number otherwise.
  */
-static bool add_platform_child(device_t *parent) {
+static int add_platform_child(device_t *parent) {
 	printf(NAME ": adding new child for platform device.\n");
 	
+	int res = EOK;
 	device_t *platform = NULL;
 	match_id_t *match_id = NULL;	
@@ -78,4 +81,5 @@
 	// create new device
 	if (NULL == (platform = create_device())) {
+		res = ENOMEM;
 		goto failure;
 	}	
@@ -86,4 +90,5 @@
 	// initialize match id list
 	if (NULL == (match_id = create_match_id())) {
+		res = ENOMEM;
 		goto failure;
 	}
@@ -95,9 +100,10 @@
 	
 	// register child  device
-	if (!child_device_register(platform, parent)) {
+	res = child_device_register(platform, parent);
+	if (EOK != res) {
 		goto failure;
 	}
 	
-	return true;
+	return res;
 	
 failure:
@@ -111,5 +117,5 @@
 	}
 	
-	return false;	
+	return res;	
 }
 
@@ -117,15 +123,15 @@
  * @param dev the device which is root of the whole device tree (both of HW and pseudo devices).
  */
-static bool root_add_device(device_t *dev) 
+static int root_add_device(device_t *dev) 
 {
 	printf(NAME ": root_add_device, device handle = %d\n", dev->handle);
 	
 	// register root device's children	
-	if (!add_platform_child(dev)) {
+	int res = add_platform_child(dev);	
+	if (EOK != res) {
 		printf(NAME ": failed to add child device for platform.\n");
-		return false;
 	}
 	
-	return true;
+	return res;
 }
 
Index: uspace/srv/drivers/rootia32/rootia32.c
===================================================================
--- uspace/srv/drivers/rootia32/rootia32.c	(revision a78fa2a9d35d4b71830ba7c047cb36f2e14a33c7)
+++ uspace/srv/drivers/rootia32/rootia32.c	(revision 5af21c54a30301453f80f290f919569942bc2d67)
@@ -59,5 +59,5 @@
 } rootia32_child_dev_data_t;
 
-static bool rootia32_add_device(device_t *dev);
+static int rootia32_add_device(device_t *dev);
 static bool rootia32_init();
 
@@ -144,5 +144,5 @@
 	
 	// register child  device
-	if (!child_device_register(child, parent)) {
+	if (EOK != child_device_register(child, parent)) {
 		goto failure;
 	}
@@ -171,7 +171,9 @@
 
 /** Get the root device.
+ * 
  * @param dev the device which is root of the whole device tree (both of HW and pseudo devices).
- */
-static bool rootia32_add_device(device_t *dev) 
+ * @return 0 on success, negative error number otherwise.
+ */
+static int rootia32_add_device(device_t *dev) 
 {
 	printf(NAME ": rootia32_add_device, device handle = %d\n", dev->handle);
@@ -182,5 +184,5 @@
 	}
 	
-	return true;
+	return EOK;
 }
 
Index: uspace/srv/drivers/serial/serial.c
===================================================================
--- uspace/srv/drivers/serial/serial.c	(revision a78fa2a9d35d4b71830ba7c047cb36f2e14a33c7)
+++ uspace/srv/drivers/serial/serial.c	(revision 5af21c54a30301453f80f290f919569942bc2d67)
@@ -93,5 +93,5 @@
 static device_class_t serial_dev_class;
 
-static bool serial_add_device(device_t *dev);
+static int serial_add_device(device_t *dev);
 
 /** The serial port device driver's standard operations.
@@ -123,5 +123,5 @@
 static bool serial_pio_enable(device_t *dev)
 {
-	printf(NAME ": serial_pio_enable = %s\n", dev->name);
+	printf(NAME ": serial_pio_enable %s\n", dev->name);
 	
 	serial_dev_data_t *data = (serial_dev_data_t *)dev->driver_data;
@@ -138,5 +138,5 @@
 static bool serial_dev_probe(device_t *dev)
 {
-	printf(NAME ": serial_dev_probe dev = %s\n", dev->name);
+	printf(NAME ": serial_dev_probe %s\n", dev->name);
 	
 	serial_dev_data_t *data = (serial_dev_data_t *)dev->driver_data;
@@ -166,8 +166,9 @@
 }
 
-static bool serial_dev_initialize(device_t *dev)
-{
-	printf(NAME ": serial_dev_initialize dev = %s\n", dev->name);
-	
+static int serial_dev_initialize(device_t *dev)
+{
+	printf(NAME ": serial_dev_initialize %s\n", dev->name);
+	
+	int ret = EOK;
 	hw_resource_list_t hw_resources;
 	memset(&hw_resources, 0, sizeof(hw_resource_list_t));
@@ -176,5 +177,5 @@
 	serial_dev_data_t *data = create_serial_dev_data();	
 	if (NULL == data) {
-		return false;
+		return ENOMEM;
 	}
 	dev->driver_data = data;
@@ -184,4 +185,5 @@
 	if (dev->parent_phone <= 0) {
 		printf(NAME ": failed to connect to the parent driver of the device %s.\n", dev->name);
+		ret = EPARTY;
 		goto failed;
 	}
@@ -191,4 +193,5 @@
 	if (!get_hw_resources(dev->parent_phone, &hw_resources)) {
 		printf(NAME ": failed to get hw resources for the device %s.\n", dev->name);
+		ret = EPARTY;
 		goto failed;
 	}	
@@ -211,4 +214,5 @@
 			if (res->res.io_range.size < REG_COUNT) {
 				printf(NAME ": i/o range assigned to the device %s is too small.\n", dev->name);
+				ret = EPARTY;
 				goto failed;
 			}
@@ -221,37 +225,40 @@
 	if (!irq || !ioport) {
 		printf(NAME ": missing hw resource(s) for the device %s.\n", dev->name);
+		ret = EPARTY;
 		goto failed;
 	}		
 	
 	clean_hw_resource_list(&hw_resources);
-	return true;
+	return ret;
 	
 failed:
 	serial_dev_cleanup(dev);	
 	clean_hw_resource_list(&hw_resources);	
-	return false;	
-}
-
-static bool serial_add_device(device_t *dev) 
-{
-	printf(NAME ": serial_add_device, device handle = %d\n", dev->handle);
-	
-	if (!serial_dev_initialize(dev)) {
-		return false;
+	return ret;	
+}
+
+static int serial_add_device(device_t *dev) 
+{
+	printf(NAME ": serial_add_device %s (handle = %d)\n", dev->name, dev->handle);
+	
+	int res = serial_dev_initialize(dev);
+	if (EOK != res) {
+		return res;
 	}
 	
 	if (!serial_pio_enable(dev)) {
 		serial_dev_cleanup(dev);
-		return false;
-	}
+		return EADDRNOTAVAIL;
+	}
+	
 	
 	if (!serial_dev_probe(dev)) {
 		serial_dev_cleanup(dev);
-		return false;
+		return ENOENT;
 	}	
 	
 	// TODO interrupt and serial port initialization (baud rate etc.)
 	
-	return true;
+	return EOK;
 }
 
