Index: uspace/lib/fs/libfs.c
===================================================================
--- uspace/lib/fs/libfs.c	(revision 5bb99076a8348af549486489a58dcb24eb1cc099)
+++ uspace/lib/fs/libfs.c	(revision cc574511968ab8b7b5afe2cbb60c2053608cc393)
@@ -77,5 +77,5 @@
 static void vfs_out_mounted(ipc_callid_t rid, ipc_call_t *req)
 {
-	devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*req);
+	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req);
 	char *opts;
 	int rc;
@@ -91,5 +91,5 @@
 	aoff64_t size;
 	unsigned lnkcnt;
-	rc = vfs_out_ops->mounted(devmap_handle, opts, &index, &size, &lnkcnt);
+	rc = vfs_out_ops->mounted(service_id, opts, &index, &size, &lnkcnt);
 
 	if (rc == EOK)
@@ -109,8 +109,8 @@
 static void vfs_out_unmounted(ipc_callid_t rid, ipc_call_t *req)
 {
-	devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*req);
+	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req);
 	int rc; 
 
-	rc = vfs_out_ops->unmounted(devmap_handle);
+	rc = vfs_out_ops->unmounted(service_id);
 
 	async_answer_0(rid, rc);
@@ -130,5 +130,5 @@
 static void vfs_out_read(ipc_callid_t rid, ipc_call_t *req)
 {
-	devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*req);
+	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req);
 	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req);
 	aoff64_t pos = (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*req),
@@ -137,5 +137,5 @@
 	int rc;
 
-	rc = vfs_out_ops->read(devmap_handle, index, pos, &rbytes);
+	rc = vfs_out_ops->read(service_id, index, pos, &rbytes);
 
 	if (rc == EOK)
@@ -147,5 +147,5 @@
 static void vfs_out_write(ipc_callid_t rid, ipc_call_t *req)
 {
-	devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*req);
+	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req);
 	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req);
 	aoff64_t pos = (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*req),
@@ -155,5 +155,5 @@
 	int rc;
 
-	rc = vfs_out_ops->write(devmap_handle, index, pos, &wbytes, &nsize);
+	rc = vfs_out_ops->write(service_id, index, pos, &wbytes, &nsize);
 
 	if (rc == EOK)
@@ -165,5 +165,5 @@
 static void vfs_out_truncate(ipc_callid_t rid, ipc_call_t *req)
 {
-	devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*req);
+	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req);
 	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req);
 	aoff64_t size = (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*req),
@@ -171,5 +171,5 @@
 	int rc;
 
-	rc = vfs_out_ops->truncate(devmap_handle, index, size);
+	rc = vfs_out_ops->truncate(service_id, index, size);
 
 	async_answer_0(rid, rc);
@@ -178,9 +178,9 @@
 static void vfs_out_close(ipc_callid_t rid, ipc_call_t *req)
 {
-	devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*req);
+	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req);
 	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req);
 	int rc;
 
-	rc = vfs_out_ops->close(devmap_handle, index);
+	rc = vfs_out_ops->close(service_id, index);
 
 	async_answer_0(rid, rc);
@@ -189,9 +189,9 @@
 static void vfs_out_destroy(ipc_callid_t rid, ipc_call_t *req)
 {
-	devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*req);
+	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req);
 	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req);
 	int rc;
 
-	rc = vfs_out_ops->destroy(devmap_handle, index);
+	rc = vfs_out_ops->destroy(service_id, index);
 
 	async_answer_0(rid, rc);
@@ -210,9 +210,9 @@
 static void vfs_out_sync(ipc_callid_t rid, ipc_call_t *req)
 {
-	devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*req);
+	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*req);
 	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*req);
 	int rc;
 
-	rc = vfs_out_ops->sync(devmap_handle, index);
+	rc = vfs_out_ops->sync(service_id, index);
 
 	async_answer_0(rid, rc);
@@ -380,8 +380,8 @@
     ipc_call_t *req)
 {
-	devmap_handle_t mp_devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*req);
+	service_id_t mp_service_id = (service_id_t) IPC_GET_ARG1(*req);
 	fs_index_t mp_fs_index = (fs_index_t) IPC_GET_ARG2(*req);
 	fs_handle_t mr_fs_handle = (fs_handle_t) IPC_GET_ARG3(*req);
-	devmap_handle_t mr_devmap_handle = (devmap_handle_t) IPC_GET_ARG4(*req);
+	service_id_t mr_service_id = (service_id_t) IPC_GET_ARG4(*req);
 	
 	async_sess_t *mountee_sess = async_clone_receive(EXCHANGE_PARALLEL);
@@ -392,5 +392,5 @@
 	
 	fs_node_t *fn;
-	int res = ops->node_get(&fn, mp_devmap_handle, mp_fs_index);
+	int res = ops->node_get(&fn, mp_service_id, mp_fs_index);
 	if ((res != EOK) || (!fn)) {
 		async_hangup(mountee_sess);
@@ -422,5 +422,5 @@
 	ipc_call_t answer;
 	int rc = async_data_write_forward_1_1(exch, VFS_OUT_MOUNTED,
-	    mr_devmap_handle, &answer);
+	    mr_service_id, &answer);
 	async_exchange_end(exch);
 	
@@ -428,5 +428,5 @@
 		fn->mp_data.mp_active = true;
 		fn->mp_data.fs_handle = mr_fs_handle;
-		fn->mp_data.devmap_handle = mr_devmap_handle;
+		fn->mp_data.service_id = mr_service_id;
 		fn->mp_data.sess = mountee_sess;
 	}
@@ -441,10 +441,10 @@
 void libfs_unmount(libfs_ops_t *ops, ipc_callid_t rid, ipc_call_t *req)
 {
-	devmap_handle_t mp_devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*req);
+	service_id_t mp_service_id = (service_id_t) IPC_GET_ARG1(*req);
 	fs_index_t mp_fs_index = (fs_index_t) IPC_GET_ARG2(*req);
 	fs_node_t *fn;
 	int res;
 
-	res = ops->node_get(&fn, mp_devmap_handle, mp_fs_index);
+	res = ops->node_get(&fn, mp_service_id, mp_fs_index);
 	if ((res != EOK) || (!fn)) {
 		async_answer_0(rid, combine_rc(res, ENOENT));
@@ -465,5 +465,5 @@
 	 */
 	async_exch_t *exch = async_exchange_begin(fn->mp_data.sess);
-	res = async_req_1_0(exch, VFS_OUT_UNMOUNTED, fn->mp_data.devmap_handle);
+	res = async_req_1_0(exch, VFS_OUT_UNMOUNTED, fn->mp_data.service_id);
 	async_exchange_end(exch);
 
@@ -475,5 +475,5 @@
 		fn->mp_data.mp_active = false;
 		fn->mp_data.fs_handle = 0;
-		fn->mp_data.devmap_handle = 0;
+		fn->mp_data.service_id = 0;
 		fn->mp_data.sess = NULL;
 		
@@ -510,5 +510,5 @@
 	unsigned int last = IPC_GET_ARG2(*req);
 	unsigned int next = first;
-	devmap_handle_t devmap_handle = IPC_GET_ARG3(*req);
+	service_id_t service_id = IPC_GET_ARG3(*req);
 	int lflag = IPC_GET_ARG4(*req);
 	fs_index_t index = IPC_GET_ARG5(*req);
@@ -524,5 +524,5 @@
 	fs_node_t *tmp = NULL;
 	
-	rc = ops->root_get(&cur, devmap_handle);
+	rc = ops->root_get(&cur, service_id);
 	on_error(rc, goto out_with_answer);
 	
@@ -530,5 +530,5 @@
 		async_exch_t *exch = async_exchange_begin(cur->mp_data.sess);
 		async_forward_slow(rid, exch, VFS_OUT_LOOKUP, next, last,
-		    cur->mp_data.devmap_handle, lflag, index,
+		    cur->mp_data.service_id, lflag, index,
 		    IPC_FF_ROUTE_FROM_ME);
 		async_exchange_end(exch);
@@ -591,5 +591,5 @@
 			async_exch_t *exch = async_exchange_begin(tmp->mp_data.sess);
 			async_forward_slow(rid, exch, VFS_OUT_LOOKUP, next,
-			    last, tmp->mp_data.devmap_handle, lflag, index,
+			    last, tmp->mp_data.service_id, lflag, index,
 			    IPC_FF_ROUTE_FROM_ME);
 			async_exchange_end(exch);
@@ -620,8 +620,8 @@
 				fs_node_t *fn;
 				if (lflag & L_CREATE)
-					rc = ops->create(&fn, devmap_handle,
+					rc = ops->create(&fn, service_id,
 					    lflag);
 				else
-					rc = ops->node_get(&fn, devmap_handle,
+					rc = ops->node_get(&fn, service_id,
 					    index);
 				on_error(rc, goto out_with_answer);
@@ -638,5 +638,5 @@
 						aoff64_t size = ops->size_get(fn);
 						async_answer_5(rid, fs_handle,
-						    devmap_handle,
+						    service_id,
 						    ops->index_get(fn),
 						    LOWER32(size),
@@ -706,7 +706,7 @@
 			fs_node_t *fn;
 			if (lflag & L_CREATE)
-				rc = ops->create(&fn, devmap_handle, lflag);
+				rc = ops->create(&fn, service_id, lflag);
 			else
-				rc = ops->node_get(&fn, devmap_handle, index);
+				rc = ops->node_get(&fn, service_id, index);
 			on_error(rc, goto out_with_answer);
 			
@@ -722,5 +722,5 @@
 					aoff64_t size = ops->size_get(fn);
 					async_answer_5(rid, fs_handle,
-					    devmap_handle,
+					    service_id,
 					    ops->index_get(fn),
 					    LOWER32(size),
@@ -748,5 +748,5 @@
 		if (rc == EOK) {
 			aoff64_t size = ops->size_get(cur);
-			async_answer_5(rid, fs_handle, devmap_handle,
+			async_answer_5(rid, fs_handle, service_id,
 			    ops->index_get(cur), LOWER32(size), UPPER32(size),
 			    old_lnkcnt);
@@ -786,5 +786,5 @@
 		if (rc == EOK) {
 			aoff64_t size = ops->size_get(cur);
-			async_answer_5(rid, fs_handle, devmap_handle,
+			async_answer_5(rid, fs_handle, service_id,
 			    ops->index_get(cur), LOWER32(size), UPPER32(size),
 			    ops->lnkcnt_get(cur));
@@ -810,9 +810,9 @@
     ipc_call_t *request)
 {
-	devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
+	service_id_t service_id = (service_id_t) IPC_GET_ARG1(*request);
 	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
 	
 	fs_node_t *fn;
-	int rc = ops->node_get(&fn, devmap_handle, index);
+	int rc = ops->node_get(&fn, service_id, index);
 	on_error(rc, answer_and_return(rid, rc));
 	
@@ -831,5 +831,5 @@
 	
 	stat.fs_handle = fs_handle;
-	stat.devmap_handle = devmap_handle;
+	stat.service_id = service_id;
 	stat.index = index;
 	stat.lnkcnt = ops->lnkcnt_get(fn);
@@ -837,5 +837,5 @@
 	stat.is_directory = ops->is_directory(fn);
 	stat.size = ops->size_get(fn);
-	stat.device = ops->device_get(fn);
+	stat.service = ops->device_get(fn);
 	
 	ops->node_put(fn);
@@ -856,9 +856,9 @@
     ipc_call_t *request)
 {
-	devmap_handle_t devmap_handle = IPC_GET_ARG1(*request);
+	service_id_t service_id = IPC_GET_ARG1(*request);
 	fs_index_t index = IPC_GET_ARG2(*request);
 	
 	fs_node_t *fn;
-	int rc = ops->node_get(&fn, devmap_handle, index);
+	int rc = ops->node_get(&fn, service_id, index);
 	on_error(rc, answer_and_return(rid, rc));
 	
Index: uspace/lib/fs/libfs.h
===================================================================
--- uspace/lib/fs/libfs.h	(revision 5bb99076a8348af549486489a58dcb24eb1cc099)
+++ uspace/lib/fs/libfs.h	(revision cc574511968ab8b7b5afe2cbb60c2053608cc393)
@@ -40,17 +40,17 @@
 #include <stdint.h>
 #include <async.h>
-#include <devmap.h>
+#include <loc.h>
 
 typedef struct {
-	int (* mounted)(devmap_handle_t, const char *, fs_index_t *, aoff64_t *,
+	int (* mounted)(service_id_t, const char *, fs_index_t *, aoff64_t *,
 	    unsigned *);
-	int (* unmounted)(devmap_handle_t);
-	int (* read)(devmap_handle_t, fs_index_t, aoff64_t, size_t *);
-	int (* write)(devmap_handle_t, fs_index_t, aoff64_t, size_t *,
+	int (* unmounted)(service_id_t);
+	int (* read)(service_id_t, fs_index_t, aoff64_t, size_t *);
+	int (* write)(service_id_t, fs_index_t, aoff64_t, size_t *,
 	    aoff64_t *);
-	int (* truncate)(devmap_handle_t, fs_index_t, aoff64_t);
-	int (* close)(devmap_handle_t, fs_index_t);
-	int (* destroy)(devmap_handle_t, fs_index_t);
-	int (* sync)(devmap_handle_t, fs_index_t);
+	int (* truncate)(service_id_t, fs_index_t, aoff64_t);
+	int (* close)(service_id_t, fs_index_t);
+	int (* destroy)(service_id_t, fs_index_t);
+	int (* sync)(service_id_t, fs_index_t);
 } vfs_out_ops_t;
 
@@ -59,5 +59,5 @@
 	async_sess_t *sess;
 	fs_handle_t fs_handle;
-	devmap_handle_t devmap_handle;
+	service_id_t service_id;
 } mp_data_t;
 
@@ -73,10 +73,10 @@
 	 * argument holds the output argument.
 	 */
-	int (* root_get)(fs_node_t **, devmap_handle_t);
+	int (* root_get)(fs_node_t **, service_id_t);
 	int (* match)(fs_node_t **, fs_node_t *, const char *);
-	int (* node_get)(fs_node_t **, devmap_handle_t, fs_index_t);
+	int (* node_get)(fs_node_t **, service_id_t, fs_index_t);
 	int (* node_open)(fs_node_t *);
 	int (* node_put)(fs_node_t *);
-	int (* create)(fs_node_t **, devmap_handle_t, int);
+	int (* create)(fs_node_t **, service_id_t, int);
 	int (* destroy)(fs_node_t *);
 	int (* link)(fs_node_t *, fs_node_t *, const char *);
@@ -92,5 +92,5 @@
 	bool (* is_directory)(fs_node_t *);
 	bool (* is_file)(fs_node_t *);
-	devmap_handle_t (* device_get)(fs_node_t *);
+	service_id_t (* device_get)(fs_node_t *);
 } libfs_ops_t;
 
