Index: uspace/srv/devman/devman.c
===================================================================
--- uspace/srv/devman/devman.c	(revision 40225137b48916b77d143d5fec7e52b80ae67284)
+++ uspace/srv/devman/devman.c	(revision 86ffa27f45682aa2a5736f665f400ad262ce5baf)
@@ -37,5 +37,5 @@
 #include <ipc/driver.h>
 #include <ipc/devman.h>
-#include <devmap.h>
+#include <loc.h>
 #include <str_error.h>
 #include <stdio.h>
@@ -66,19 +66,19 @@
 }
 
-static int devmap_functions_compare(unsigned long key[], hash_count_t keys,
+static int loc_functions_compare(unsigned long key[], hash_count_t keys,
     link_t *item)
 {
-	fun_node_t *fun = hash_table_get_instance(item, fun_node_t, devmap_fun);
-	return (fun->devmap_handle == (devmap_handle_t) key[0]);
-}
-
-static int devmap_devices_class_compare(unsigned long key[], hash_count_t keys,
+	fun_node_t *fun = hash_table_get_instance(item, fun_node_t, loc_fun);
+	return (fun->service_id == (service_id_t) key[0]);
+}
+
+static int loc_devices_class_compare(unsigned long key[], hash_count_t keys,
     link_t *item)
 {
 	dev_class_info_t *class_info
-	    = hash_table_get_instance(item, dev_class_info_t, devmap_link);
+	    = hash_table_get_instance(item, dev_class_info_t, loc_link);
 	assert(class_info != NULL);
 
-	return (class_info->devmap_handle == (devmap_handle_t) key[0]);
+	return (class_info->service_id == (service_id_t) key[0]);
 }
 
@@ -99,13 +99,13 @@
 };
 
-static hash_table_operations_t devmap_devices_ops = {
+static hash_table_operations_t loc_devices_ops = {
 	.hash = devices_hash,
-	.compare = devmap_functions_compare,
+	.compare = loc_functions_compare,
 	.remove_callback = devices_remove_callback
 };
 
-static hash_table_operations_t devmap_devices_class_ops = {
+static hash_table_operations_t loc_devices_class_ops = {
 	.hash = devices_hash,
-	.compare = devmap_devices_class_compare,
+	.compare = loc_devices_class_compare,
 	.remove_callback = devices_remove_callback
 };
@@ -701,30 +701,30 @@
 }
 
-/** Create devmap path and name for the function. */
-void devmap_register_tree_function(fun_node_t *fun, dev_tree_t *tree)
-{
-	char *devmap_pathname = NULL;
-	char *devmap_name = NULL;
-	
-	asprintf(&devmap_name, "%s", fun->pathname);
-	if (devmap_name == NULL)
+/** Create loc path and name for the function. */
+void loc_register_tree_function(fun_node_t *fun, dev_tree_t *tree)
+{
+	char *loc_pathname = NULL;
+	char *loc_name = NULL;
+	
+	asprintf(&loc_name, "%s", fun->pathname);
+	if (loc_name == NULL)
 		return;
 	
-	replace_char(devmap_name, '/', DEVMAP_SEPARATOR);
-	
-	asprintf(&devmap_pathname, "%s/%s", DEVMAP_DEVICE_NAMESPACE,
-	    devmap_name);
-	if (devmap_pathname == NULL) {
-		free(devmap_name);
+	replace_char(loc_name, '/', LOC_SEPARATOR);
+	
+	asprintf(&loc_pathname, "%s/%s", LOC_DEVICE_NAMESPACE,
+	    loc_name);
+	if (loc_pathname == NULL) {
+		free(loc_name);
 		return;
 	}
 	
-	devmap_device_register_with_iface(devmap_pathname,
-	    &fun->devmap_handle, DEVMAN_CONNECT_FROM_DEVMAP);
-	
-	tree_add_devmap_function(tree, fun);
-	
-	free(devmap_name);
-	free(devmap_pathname);
+	loc_service_register_with_iface(loc_pathname,
+	    &fun->service_id, DEVMAN_CONNECT_FROM_LOC);
+	
+	tree_add_loc_function(tree, fun);
+	
+	free(loc_name);
+	free(loc_pathname);
 }
 
@@ -856,6 +856,6 @@
 	hash_table_create(&tree->devman_functions, DEVICE_BUCKETS, 1,
 	    &devman_functions_ops);
-	hash_table_create(&tree->devmap_functions, DEVICE_BUCKETS, 1,
-	    &devmap_devices_ops);
+	hash_table_create(&tree->loc_functions, DEVICE_BUCKETS, 1,
+	    &loc_devices_ops);
 	
 	fibril_rwlock_initialize(&tree->rwlock);
@@ -952,5 +952,5 @@
 		list_initialize(&res->classes);
 		link_initialize(&res->devman_fun);
-		link_initialize(&res->devmap_fun);
+		link_initialize(&res->loc_fun);
 	}
 	
@@ -1268,5 +1268,5 @@
 		memset(info, 0, sizeof(dev_class_info_t));
 		link_initialize(&info->dev_classes);
-		link_initialize(&info->devmap_link);
+		link_initialize(&info->loc_link);
 		link_initialize(&info->link);
 	}
@@ -1414,21 +1414,21 @@
 	list_initialize(&class_list->classes);
 	fibril_rwlock_initialize(&class_list->rwlock);
-	hash_table_create(&class_list->devmap_functions, DEVICE_BUCKETS, 1,
-	    &devmap_devices_class_ops);
-}
-
-
-/* Devmap devices */
-
-fun_node_t *find_devmap_tree_function(dev_tree_t *tree, devmap_handle_t devmap_handle)
+	hash_table_create(&class_list->loc_functions, DEVICE_BUCKETS, 1,
+	    &loc_devices_class_ops);
+}
+
+
+/* loc devices */
+
+fun_node_t *find_loc_tree_function(dev_tree_t *tree, service_id_t service_id)
 {
 	fun_node_t *fun = NULL;
 	link_t *link;
-	unsigned long key = (unsigned long) devmap_handle;
+	unsigned long key = (unsigned long) service_id;
 	
 	fibril_rwlock_read_lock(&tree->rwlock);
-	link = hash_table_find(&tree->devmap_functions, &key);
+	link = hash_table_find(&tree->loc_functions, &key);
 	if (link != NULL)
-		fun = hash_table_get_instance(link, fun_node_t, devmap_fun);
+		fun = hash_table_get_instance(link, fun_node_t, loc_fun);
 	fibril_rwlock_read_unlock(&tree->rwlock);
 	
@@ -1436,17 +1436,17 @@
 }
 
-fun_node_t *find_devmap_class_function(class_list_t *classes,
-    devmap_handle_t devmap_handle)
+fun_node_t *find_loc_class_function(class_list_t *classes,
+    service_id_t service_id)
 {
 	fun_node_t *fun = NULL;
 	dev_class_info_t *cli;
 	link_t *link;
-	unsigned long key = (unsigned long)devmap_handle;
+	unsigned long key = (unsigned long)service_id;
 	
 	fibril_rwlock_read_lock(&classes->rwlock);
-	link = hash_table_find(&classes->devmap_functions, &key);
+	link = hash_table_find(&classes->loc_functions, &key);
 	if (link != NULL) {
 		cli = hash_table_get_instance(link, dev_class_info_t,
-		    devmap_link);
+		    loc_link);
 		fun = cli->fun;
 	}
@@ -1456,20 +1456,20 @@
 }
 
-void class_add_devmap_function(class_list_t *class_list, dev_class_info_t *cli)
-{
-	unsigned long key = (unsigned long) cli->devmap_handle;
+void class_add_loc_function(class_list_t *class_list, dev_class_info_t *cli)
+{
+	unsigned long key = (unsigned long) cli->service_id;
 	
 	fibril_rwlock_write_lock(&class_list->rwlock);
-	hash_table_insert(&class_list->devmap_functions, &key, &cli->devmap_link);
+	hash_table_insert(&class_list->loc_functions, &key, &cli->loc_link);
 	fibril_rwlock_write_unlock(&class_list->rwlock);
 
-	assert(find_devmap_class_function(class_list, cli->devmap_handle) != NULL);
-}
-
-void tree_add_devmap_function(dev_tree_t *tree, fun_node_t *fun)
-{
-	unsigned long key = (unsigned long) fun->devmap_handle;
+	assert(find_loc_class_function(class_list, cli->service_id) != NULL);
+}
+
+void tree_add_loc_function(dev_tree_t *tree, fun_node_t *fun)
+{
+	unsigned long key = (unsigned long) fun->service_id;
 	fibril_rwlock_write_lock(&tree->rwlock);
-	hash_table_insert(&tree->devmap_functions, &key, &fun->devmap_fun);
+	hash_table_insert(&tree->loc_functions, &key, &fun->loc_fun);
 	fibril_rwlock_write_unlock(&tree->rwlock);
 }
Index: uspace/srv/devman/devman.h
===================================================================
--- uspace/srv/devman/devman.h	(revision 40225137b48916b77d143d5fec7e52b80ae67284)
+++ uspace/srv/devman/devman.h	(revision 86ffa27f45682aa2a5736f665f400ad262ce5baf)
@@ -41,5 +41,5 @@
 #include <adt/hash_table.h>
 #include <ipc/devman.h>
-#include <ipc/devmap.h>
+#include <ipc/loc.h>
 #include <fibril_synch.h>
 #include <atomic.h>
@@ -53,7 +53,7 @@
 #define DEVICE_BUCKETS 256
 
-#define DEVMAP_CLASS_NAMESPACE "class"
-#define DEVMAP_DEVICE_NAMESPACE "devices"
-#define DEVMAP_SEPARATOR '\\'
+#define LOC_CLASS_NAMESPACE "class"
+#define LOC_DEVICE_NAMESPACE "devices"
+#define LOC_SEPARATOR '\\'
 
 struct dev_node;
@@ -172,6 +172,6 @@
 	/** List of device classes to which this device function belongs. */
 	list_t classes;
-	/** Devmap handle if the device function is registered by devmap. */
-	devmap_handle_t devmap_handle;
+	/** Service ID if the device function is registered with loc. */
+	service_id_t service_id;
 	
 	/**
@@ -181,7 +181,7 @@
 	
 	/**
-	 * Used by the hash table of functions indexed by devmap device handles.
-	 */
-	link_t devmap_fun;
+	 * Used by the hash table of functions indexed by service IDs.
+	 */
+	link_t loc_fun;
 };
 
@@ -208,8 +208,8 @@
 	
 	/**
-	 * Hash table of devices registered by devmapper, indexed by devmap
-	 * handles.
-	 */
-	hash_table_t devmap_functions;
+	 * Hash table of services registered with location service, indexed by
+	 * service IDs.
+	 */
+	hash_table_t loc_functions;
 } dev_tree_t;
 
@@ -267,12 +267,12 @@
 	/** The name of the device function within the class. */
 	char *dev_name;
-	/** The handle of the device by device mapper in the class namespace. */
-	devmap_handle_t devmap_handle;
-	
-	/**
-	 * Link in the hash table of devices registered by the devmapper using
+	/** Service ID in the class namespace. */
+	service_id_t service_id;
+	
+	/**
+	 * Link to hash table of services registered with location service using
 	 * their class names.
 	 */
-	link_t devmap_link;
+	link_t loc_link;
 } dev_class_info_t;
 
@@ -283,8 +283,8 @@
 	
 	/**
-	 * Hash table of devices registered by devmapper using their class name,
-	 * indexed by devmap handles.
-	 */
-	hash_table_t devmap_functions;
+	 * Hash table of services registered with location service using their
+	 * class name, indexed by service IDs.
+	 */
+	hash_table_t loc_functions;
 	
 	/** Fibril mutex for list of classes. */
@@ -364,13 +364,13 @@
 extern void add_dev_class_no_lock(class_list_t *, dev_class_t *);
 
-/* Devmap devices */
-
-extern void devmap_register_tree_function(fun_node_t *, dev_tree_t *);
-
-extern fun_node_t *find_devmap_tree_function(dev_tree_t *, devmap_handle_t);
-extern fun_node_t *find_devmap_class_function(class_list_t *, devmap_handle_t);
-
-extern void class_add_devmap_function(class_list_t *, dev_class_info_t *);
-extern void tree_add_devmap_function(dev_tree_t *, fun_node_t *);
+/* Loc services */
+
+extern void loc_register_tree_function(fun_node_t *, dev_tree_t *);
+
+extern fun_node_t *find_loc_tree_function(dev_tree_t *, service_id_t);
+extern fun_node_t *find_loc_class_function(class_list_t *, service_id_t);
+
+extern void class_add_loc_function(class_list_t *, dev_class_info_t *);
+extern void tree_add_loc_function(dev_tree_t *, fun_node_t *);
 
 #endif
Index: uspace/srv/devman/main.c
===================================================================
--- uspace/srv/devman/main.c	(revision 40225137b48916b77d143d5fec7e52b80ae67284)
+++ uspace/srv/devman/main.c	(revision 86ffa27f45682aa2a5736f665f400ad262ce5baf)
@@ -56,5 +56,5 @@
 #include <ipc/driver.h>
 #include <thread.h>
-#include <devmap.h>
+#include <loc.h>
 
 #include "devman.h"
@@ -326,5 +326,5 @@
 		}
 	} else {
-		devmap_register_tree_function(fun, tree);
+		loc_register_tree_function(fun, tree);
 	}
 	
@@ -333,28 +333,28 @@
 }
 
-static void devmap_register_class_dev(dev_class_info_t *cli)
-{
-	/* Create devmap path and name for the device. */
-	char *devmap_pathname = NULL;
-
-	asprintf(&devmap_pathname, "%s/%s%c%s", DEVMAP_CLASS_NAMESPACE,
-	    cli->dev_class->name, DEVMAP_SEPARATOR, cli->dev_name);
-	if (devmap_pathname == NULL)
+static void loc_register_class_dev(dev_class_info_t *cli)
+{
+	/* Create loc path and name for the service. */
+	char *loc_pathname = NULL;
+
+	asprintf(&loc_pathname, "%s/%s%c%s", LOC_CLASS_NAMESPACE,
+	    cli->dev_class->name, LOC_SEPARATOR, cli->dev_name);
+	if (loc_pathname == NULL)
 		return;
 	
 	/*
-	 * Register the device by the device mapper and remember its devmap
-	 * handle.
+	 * Register the device with location service and remember its
+	 * service ID.
 	 */
-	devmap_device_register_with_iface(devmap_pathname,
-	    &cli->devmap_handle, DEVMAN_CONNECT_FROM_DEVMAP);
+	loc_service_register_with_iface(loc_pathname,
+	    &cli->service_id, DEVMAN_CONNECT_FROM_LOC);
 	
 	/*
-	 * Add device to the hash map of class devices registered by device
-	 * mapper.
+	 * Add device to the hash map of class devices registered with
+	 * location service.
 	 */
-	class_add_devmap_function(&class_list, cli);
-	
-	free(devmap_pathname);
+	class_add_loc_function(&class_list, cli);
+	
+	free(loc_pathname);
 }
 
@@ -381,6 +381,6 @@
 	dev_class_info_t *class_info = add_function_to_class(fun, cl, NULL);
 	
-	/* Register the device's class alias by devmapper. */
-	devmap_register_class_dev(class_info);
+	/* Register the device's class alias with location service. */
+	loc_register_class_dev(class_info);
 	
 	log_msg(LVL_NOTE, "Function `%s' added to class `%s' as `%s'.",
@@ -659,15 +659,15 @@
 }
 
-/** Function for handling connections from a client forwarded by the device
- * mapper to the device manager. */
-static void devman_connection_devmapper(ipc_callid_t iid, ipc_call_t *icall)
-{
-	devmap_handle_t devmap_handle = IPC_GET_ARG2(*icall);
+/** Function for handling connections from a client forwarded by the location
+ * service to the device manager. */
+static void devman_connection_loc(ipc_callid_t iid, ipc_call_t *icall)
+{
+	service_id_t service_id = IPC_GET_ARG2(*icall);
 	fun_node_t *fun;
 	dev_node_t *dev;
 
-	fun = find_devmap_tree_function(&device_tree, devmap_handle);
+	fun = find_loc_tree_function(&device_tree, service_id);
 	if (fun == NULL)
-		fun = find_devmap_class_function(&class_list, devmap_handle);
+		fun = find_loc_class_function(&class_list, service_id);
 	
 	if (fun == NULL || fun->dev->drv == NULL) {
@@ -689,5 +689,5 @@
 	
 	log_msg(LVL_DEBUG,
-	    "Forwarding devmapper request for `%s' function to driver `%s'.",
+	    "Forwarding loc service request for `%s' function to driver `%s'.",
 	    fun->pathname, dev->drv->name);
 }
@@ -708,7 +708,7 @@
 		devman_forward(iid, icall, false);
 		break;
-	case DEVMAN_CONNECT_FROM_DEVMAP:
-		/* Someone connected through devmap node. */
-		devman_connection_devmapper(iid, icall);
+	case DEVMAN_CONNECT_FROM_LOC:
+		/* Someone connected through loc node. */
+		devman_connection_loc(iid, icall);
 		break;
 	case DEVMAN_CONNECT_TO_PARENTS_DEVICE:
@@ -746,10 +746,10 @@
 	
 	/*
-	 * !!! devman_connection ... as the device manager is not a real devmap
+	 * !!! devman_connection ... as the device manager is not a real loc
 	 * driver (it uses a completely different ipc protocol than an ordinary
-	 * devmap driver) forwarding a connection from client to the devman by
-	 * devmapper would not work.
+	 * loc driver) forwarding a connection from client to the devman by
+	 * location service would not work.
 	 */
-	devmap_driver_register(NAME, devman_connection);
+	loc_server_register(NAME, devman_connection);
 	
 	return true;
