Index: uspace/srv/devman/devman.c
===================================================================
--- uspace/srv/devman/devman.c	(revision a087f2e34679a53fde70f9802d8b650c64cb8dc2)
+++ uspace/srv/devman/devman.c	(revision a1769ee69bfe08ce9226b2933a4d000a1218afd1)
@@ -591,5 +591,5 @@
 	size_t pathsize = (str_size(node->name) + 1);	
 	if (NULL != parent) {		
-		pathsize += str_size(parent->name) + 1;		
+		pathsize += str_size(parent->pathname) + 1;		
 	}
 	
Index: uspace/srv/drivers/root/root.c
===================================================================
--- uspace/srv/drivers/root/root.c	(revision a087f2e34679a53fde70f9802d8b650c64cb8dc2)
+++ uspace/srv/drivers/root/root.c	(revision a1769ee69bfe08ce9226b2933a4d000a1218afd1)
@@ -80,8 +80,7 @@
 	if (NULL == (platform = create_device())) {
 		goto failure;
-	}
+	}	
 	
-	// TODO - replace this with some better solution (sysinfo ?)
-	platform->name = STRING(UARCH);
+	platform->name = "hw";
 	printf(NAME ": the new device's name is %s.\n", platform->name);
 	
@@ -90,5 +89,7 @@
 		goto failure;
 	}
-	match_id->id = platform->name;
+	
+	// TODO - replace this with some better solution (sysinfo ?)
+	match_id->id = STRING(UARCH);
 	match_id->score = 100;
 	add_match_id(&platform->match_ids, match_id);	
@@ -130,18 +131,7 @@
 }
 
-static bool root_init() 
-{
-	// TODO  driver initialization	
-	return true;
-}
-
 int main(int argc, char *argv[])
 {
-	printf(NAME ": HelenOS root device driver\n");
-	if (!root_init()) {
-		printf(NAME ": Error while initializing driver.\n");
-		return -1;
-	}
-	
+	printf(NAME ": HelenOS root device driver\n");	
 	return driver_main(&root_driver);
 }
Index: uspace/srv/drivers/rootia32/Makefile
===================================================================
--- uspace/srv/drivers/rootia32/Makefile	(revision a1769ee69bfe08ce9226b2933a4d000a1218afd1)
+++ uspace/srv/drivers/rootia32/Makefile	(revision a1769ee69bfe08ce9226b2933a4d000a1218afd1)
@@ -0,0 +1,38 @@
+# Copyright (c) 2010 Lenka Trochtova
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# - Redistributions of source code must retain the above copyright
+#   notice, this list of conditions and the following disclaimer.
+# - Redistributions in binary form must reproduce the above copyright
+#   notice, this list of conditions and the following disclaimer in the
+#   documentation and/or other materials provided with the distribution.
+# - The name of the author may not be used to endorse or promote products
+#   derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+USPACE_PREFIX = ../../..
+LIBS = $(LIBDRV_PREFIX)/libdrv.a $(LIBC_PREFIX)/libc.a
+
+OUTPUT = rootia32
+
+SOURCES = \
+	rootia32.c
+
+include ../../Makefile.common
+
+EXTRA_CFLAGS = -I$(LIBDRV_PREFIX)/include
Index: uspace/srv/drivers/rootia32/rootia32.c
===================================================================
--- uspace/srv/drivers/rootia32/rootia32.c	(revision a1769ee69bfe08ce9226b2933a4d000a1218afd1)
+++ uspace/srv/drivers/rootia32/rootia32.c	(revision a1769ee69bfe08ce9226b2933a4d000a1218afd1)
@@ -0,0 +1,144 @@
+/*
+ * Copyright (c) 2010 Lenka Trochtova
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/**
+ * @defgroup root_ia32 Root HW device driver for ia32 platform.
+ * @brief HelenOS root HW device driver for ia32 platform.
+ * @{
+ */
+
+/** @file
+ */
+
+#include <assert.h>
+#include <stdio.h>
+#include <errno.h>
+#include <bool.h>
+#include <fibril_synch.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <macros.h>
+
+#include <driver.h>
+#include <devman.h>
+#include <ipc/devman.h>
+
+#define NAME "rootia32"
+
+static bool rootia32_add_device(device_t *dev);
+static bool rootia32_init();
+
+/** The root device driver's standard operations.
+ */
+static driver_ops_t rootia32_ops = {
+	.add_device = &rootia32_add_device
+};
+
+/** The root device driver structure. 
+ */
+static driver_t rootia32_driver = {
+	.name = NAME,
+	.driver_ops = &rootia32_ops
+};
+
+// TODO HW resources
+static bool rootia32_add_child(device_t *parent, const char *name, const char *str_match_id) {
+	printf(NAME ": adding new child device '%s'.\n", name);
+	
+	device_t *child = NULL;
+	match_id_t *match_id = NULL;	
+	
+	// create new device
+	if (NULL == (child = create_device())) {
+		goto failure;
+	}
+	
+	child->name = name;
+	
+	// initialize match id list
+	if (NULL == (match_id = create_match_id())) {
+		goto failure;
+	}
+	match_id->id = str_match_id;
+	match_id->score = 100;
+	add_match_id(&child->match_ids, match_id);	
+	
+	// register child  device
+	if (!child_device_register(child, parent)) {
+		goto failure;
+	}
+	
+	return true;
+	
+failure:
+	if (NULL != match_id) {
+		match_id->id = NULL;
+	}
+	
+	if (NULL != child) {
+		child->name = NULL;
+		delete_device(child);		
+	}
+	
+	printf(NAME ": failed to add child device '%s'.\n", name);
+	
+	return false;	
+}
+
+static bool rootia32_add_children(dev) 
+{
+	return rootia32_add_child(dev, "pci0", "intel_pci");
+}
+
+/** 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) 
+{
+	printf(NAME ": rootia32_add_device, device handle = %d\n", dev->handle);
+	
+	// register child devices	
+	if (!rootia32_add_children(dev)) {
+		printf(NAME ": failed to add child devices for platform ia32.\n");
+		return false;
+	}
+	
+	return true;
+}
+
+int main(int argc, char *argv[])
+{
+	printf(NAME ": HelenOS root device driver\n");	
+	return driver_main(&rootia32_driver);
+}
+
+/**
+ * @}
+ */
+ 
Index: uspace/srv/drivers/rootia32/rootia32.ma
===================================================================
--- uspace/srv/drivers/rootia32/rootia32.ma	(revision a1769ee69bfe08ce9226b2933a4d000a1218afd1)
+++ uspace/srv/drivers/rootia32/rootia32.ma	(revision a1769ee69bfe08ce9226b2933a4d000a1218afd1)
@@ -0,0 +1,1 @@
+10 ia32
