Index: uspace/app/tester/devmap/devmap1.c
===================================================================
--- uspace/app/tester/devmap/devmap1.c	(revision c5747fed053576a6a75fe794c2cce48244874acc)
+++ uspace/app/tester/devmap/devmap1.c	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
@@ -33,5 +33,5 @@
 #include <async.h>
 #include <errno.h>
-#include <ipc/devmap.h>
+#include <devmap.h>
 #include "../tester.h"
 
@@ -85,20 +85,12 @@
 	handle = (int)arg;
 
-	device_phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP,
-	    DEVMAP_CONNECT_TO_DEVICE, handle);
-
+	device_phone = devmap_device_connect(handle, 0);
 	if (device_phone < 0) {
-		printf("Failed to connect to devmap as client (handle = %u).\n",
+		printf("Failed to connect to device (handle = %u).\n",
 		    handle);
 		return -1;
 	}
-/*	
- *	device_phone = (int) IPC_GET_ARG5(answer);
- */
+
 	printf("Connected to device.\n");
-	ipc_call_sync_1_0(device_phone, 1024, 1025);
-/*
- * ipc_hangup(device_phone);
- */
 	ipc_hangup(device_phone);
 
@@ -120,124 +112,4 @@
 */
 	return EOK;
-}
-
-/**
- *
- */
-static int driver_register(char *name)
-{
-	ipcarg_t retval;
-	aid_t req;
-	ipc_call_t answer;
-	int phone;
-	ipcarg_t callback_phonehash;
-
-	phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP, DEVMAP_DRIVER, 0);
-	if (phone < 0) {
-		printf("Failed to connect to device mapper\n");
-		return -1;
-	}
-	
-	req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer);
-
-	retval = ipc_data_write_start(phone, (char *)name, str_size(name) + 1); 
-
-	if (retval != EOK) {
-		async_wait_for(req, NULL);
-		return -1;
-	}
-
-	async_set_client_connection(driver_client_connection);
-
-	ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash);
-/*	
-	if (NULL == async_new_connection(callback_phonehash, 0, NULL,
-			driver_client_connection)) {
-		printf("Failed to create new fibril.\n");	
-		async_wait_for(req, NULL);
-		return -1;
-	}
-*/
-	async_wait_for(req, &retval);
-	printf("Driver '%s' registered.\n", name);
-
-	return phone;
-}
-
-static int device_get_handle(int driver_phone, char *name, int *handle)
-{
-	ipcarg_t retval;
-	aid_t req;
-	ipc_call_t answer;
-
-	req = async_send_2(driver_phone, DEVMAP_DEVICE_GET_HANDLE, 0, 0,
-	    &answer);
-
-	retval = ipc_data_write_start(driver_phone, name, str_size(name) + 1);
-
-	if (retval != EOK) {
-		printf("Failed to send device name '%s'.\n", name);
-		async_wait_for(req, NULL);
-		return retval;
-	}
-
-	async_wait_for(req, &retval);
-
-	if (NULL != handle) {
-		*handle = -1;
-	}
-
-	if (EOK == retval) {
-		
-		if (NULL != handle) {
-			*handle = (int) IPC_GET_ARG1(answer);
-		}
-		printf("Device '%s' has handle %u.\n", name,
-		    (int) IPC_GET_ARG1(answer));
-	} else {
-		printf("Failed to get handle for device '%s'.\n", name);
-	}
-
-	return retval;
-}
-
-/** Register new device.
- * @param driver_phone
- * @param name Device name.
- * @param handle Output variable. Handle to the created instance of device.
- */
-static int device_register(int driver_phone, char *name, int *handle)
-{
-	ipcarg_t retval;
-	aid_t req;
-	ipc_call_t answer;
-
-	req = async_send_2(driver_phone, DEVMAP_DEVICE_REGISTER, 0, 0, &answer);
-
-	retval = ipc_data_write_start(driver_phone, (char *)name,
-	    str_size(name) + 1);
-
-	if (retval != EOK) {
-		printf("Failed to send device name '%s'.\n", name);
-		async_wait_for(req, NULL);
-		return retval;
-	}
-
-	async_wait_for(req, &retval);
-
-	if (NULL != handle) {
-		*handle = -1;
-	}
-
-	if (EOK == retval) {
-		
-		if (NULL != handle) {
-			*handle = (int) IPC_GET_ARG1(answer);
-		}
-		printf("Device registered with handle %u.\n",
-		    (int) IPC_GET_ARG1(answer));
-	}
-
-	return retval;
 }
 
@@ -253,7 +125,9 @@
 	int dev3_handle;
 	int handle;
+	int rc;
 
 	/* Register new driver */
-	driver_phone = driver_register("TestDriver");
+	driver_phone = devmap_driver_register("TestDriver",
+	    driver_client_connection);
 
 	if (driver_phone < 0) {
@@ -261,31 +135,37 @@
 	}
 
-	/* Register new device dev1*/
-	if (EOK != device_register(driver_phone, TEST_DEVICE1, &dev1_handle)) {
+	/* Register new device dev1. */
+	rc = devmap_device_register(driver_phone, TEST_DEVICE1, &dev1_handle);
+	if (rc != EOK) {
 		ipc_hangup(driver_phone);
 		return "Error: cannot register device.\n";
 	}
 
-	/* Get handle for dev2 (Should fail unless device is already 
-	 * registered by someone else) 
+	/*
+	 * Get handle for dev2 (Should fail unless device is already registered
+	 * by someone else).
 	 */
-	if (EOK == device_get_handle(driver_phone, TEST_DEVICE2, &handle)) {
+	rc = devmap_device_get_handle(TEST_DEVICE2, &handle, 0);
+	if (rc == EOK) {
 		ipc_hangup(driver_phone);
 		return "Error: got handle for dev2 before it was registered.\n";
 	}
 
-	/* Register new device dev2*/
-	if (EOK != device_register(driver_phone, TEST_DEVICE2, &dev2_handle)) {
+	/* Register new device dev2. */
+	rc = devmap_device_register(driver_phone, TEST_DEVICE2, &dev2_handle);
+	if (rc != EOK) {
 		ipc_hangup(driver_phone);
 		return "Error: cannot register device dev2.\n";
 	}
 
-	/* Register again device dev1 */
-	if (EOK == device_register(driver_phone, TEST_DEVICE1, &dev3_handle)) {
+	/* Register device dev1 again. */
+	rc = devmap_device_register(driver_phone, TEST_DEVICE1, &dev3_handle);
+	if (rc == EOK) {
 		return "Error: dev1 registered twice.\n";
 	}
 
-	/* Get handle for dev1*/
-	if (EOK != device_get_handle(driver_phone, TEST_DEVICE1, &handle)) {
+	/* Get handle for dev1. */
+	rc = devmap_device_get_handle(TEST_DEVICE1, &handle, 0);
+	if (rc != EOK) {
 		ipc_hangup(driver_phone);
 		return "Error: cannot get handle for 'DEVMAP_DEVICE1'.\n";
@@ -297,5 +177,5 @@
 	}
 
-	if (EOK != device_client(dev1_handle)) {
+	if (device_client(dev1_handle) != EOK) {
 		ipc_hangup(driver_phone);
 		return "Error: failed client test for 'DEVMAP_DEVICE1'.\n";
Index: uspace/lib/libblock/libblock.c
===================================================================
--- uspace/lib/libblock/libblock.c	(revision c5747fed053576a6a75fe794c2cce48244874acc)
+++ uspace/lib/libblock/libblock.c	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
@@ -147,7 +147,6 @@
 		return ENOMEM;
 	}
-	dev_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP,
-	    DEVMAP_CONNECT_TO_DEVICE, dev_handle);
-
+
+	dev_phone = devmap_device_connect(dev_handle, IPC_FLAG_BLOCKING);
 	if (dev_phone < 0) {
 		munmap(com_area, com_size);
Index: uspace/lib/libc/Makefile
===================================================================
--- uspace/lib/libc/Makefile	(revision c5747fed053576a6a75fe794c2cce48244874acc)
+++ uspace/lib/libc/Makefile	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
@@ -48,4 +48,5 @@
 	generic/cap.c \
 	generic/console.c \
+	generic/devmap.c \
 	generic/event.c \
 	generic/mem.c \
Index: uspace/lib/libc/generic/devmap.c
===================================================================
--- uspace/lib/libc/generic/devmap.c	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
+++ uspace/lib/libc/generic/devmap.c	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
@@ -0,0 +1,179 @@
+/*
+ * Copyright (c) 2007 Josef Cejka
+ * Copyright (c) 2009 Jiri Svoboda
+ * 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.
+ */
+
+#include <string.h>
+#include <ipc/ipc.h>
+#include <ipc/services.h>
+#include <ipc/devmap.h>
+#include <devmap.h>
+#include <async.h>
+#include <errno.h>
+
+static int devmap_phone = -1;
+
+/** Get phone to device mapper task. */
+static int devmap_get_phone(unsigned int flags)
+{
+	int phone;
+
+	if (devmap_phone >= 0)
+		return devmap_phone;
+
+	if (flags & IPC_FLAG_BLOCKING) {
+		phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP,
+		    DEVMAP_CLIENT, 0);
+	} else {
+		phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP,
+		    DEVMAP_CLIENT, 0);
+	}
+
+	if (phone < 0)
+		return phone;
+
+	devmap_phone = phone;
+	return phone;
+}
+
+/** Register new driver with devmap. */
+int devmap_driver_register(const char *name, async_client_conn_t conn)
+{
+	ipcarg_t retval;
+	aid_t req;
+	ipc_call_t answer;
+	int phone;
+	ipcarg_t callback_phonehash;
+
+	phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP,
+	    DEVMAP_DRIVER, 0);
+
+	if (phone < 0) {
+		return phone;
+	}
+	
+	req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer);
+	retval = ipc_data_write_start(phone, name, str_size(name) + 1); 
+
+	if (retval != EOK) {
+		async_wait_for(req, NULL);
+		ipc_hangup(phone);
+		return -1;
+	}
+
+	async_set_client_connection(conn);
+
+	ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash);
+	async_wait_for(req, &retval);
+
+	return phone;
+}
+
+int devmap_device_get_handle(const char *name, dev_handle_t *handle,
+    unsigned int flags)
+{
+	ipcarg_t retval;
+	aid_t req;
+	ipc_call_t answer;
+	int phone;
+
+	phone = devmap_get_phone(flags);
+	if (phone < 0)
+		return phone;
+
+	req = async_send_2(phone, DEVMAP_DEVICE_GET_HANDLE, flags, 0,
+	    &answer);
+
+	retval = ipc_data_write_start(phone, name, str_size(name) + 1);
+
+	if (retval != EOK) {
+		async_wait_for(req, NULL);
+		return retval;
+	}
+
+	async_wait_for(req, &retval);
+
+	if (retval != EOK) {
+		if (handle != NULL)
+			*handle = -1;
+		return retval;
+	}
+
+	if (handle != NULL)
+		*handle = (int) IPC_GET_ARG1(answer);
+
+	return retval;
+}
+
+int devmap_device_connect(dev_handle_t handle, unsigned int flags)
+{
+	int phone;
+
+	if (flags & IPC_FLAG_BLOCKING) {
+		phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP,
+		    DEVMAP_CONNECT_TO_DEVICE, handle);
+	} else {
+		phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP,
+		    DEVMAP_CONNECT_TO_DEVICE, handle);
+	}
+
+	return phone;
+}
+
+/** Register new device.
+ *
+ * @param driver_phone
+ * @param name Device name.
+ * @param handle Output: Handle to the created instance of device.
+ */
+int devmap_device_register(int driver_phone, const char *name, int *handle)
+{
+	ipcarg_t retval;
+	aid_t req;
+	ipc_call_t answer;
+
+	req = async_send_2(driver_phone, DEVMAP_DEVICE_REGISTER, 0, 0,
+	    &answer);
+
+	retval = ipc_data_write_start(driver_phone, name, str_size(name) + 1);
+
+	if (retval != EOK) {
+		async_wait_for(req, NULL);
+		return retval;
+	}
+
+	async_wait_for(req, &retval);
+
+	if (retval != EOK) {
+		if (handle != NULL)
+			*handle = -1;
+		return retval;
+	}
+
+	*handle = (int) IPC_GET_ARG1(answer);
+	return retval;
+}
Index: uspace/lib/libc/generic/vfs/vfs.c
===================================================================
--- uspace/lib/libc/generic/vfs/vfs.c	(revision c5747fed053576a6a75fe794c2cce48244874acc)
+++ uspace/lib/libc/generic/vfs/vfs.c	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
@@ -49,5 +49,5 @@
 #include <errno.h>
 #include <string.h>
-#include <ipc/devmap.h>
+#include <devmap.h>
 #include "../../../srv/vfs/vfs.h"
 
@@ -116,45 +116,6 @@
 }
 
-static int device_get_handle(const char *name, dev_handle_t *handle,
-    const unsigned int flags)
-{
-	int phone;
-	
-	if (flags & IPC_FLAG_BLOCKING)
-		phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT, 0);
-	else
-		phone = ipc_connect_me_to(PHONE_NS, SERVICE_DEVMAP, DEVMAP_CLIENT, 0);
-	
-	if (phone < 0)
-		return phone;
-	
-	ipc_call_t answer;
-	aid_t req = async_send_2(phone, DEVMAP_DEVICE_GET_HANDLE, flags, 0,
-	    &answer);
-	
-	ipcarg_t retval = ipc_data_write_start(phone, name, str_size(name) + 1);
-	
-	if (retval != EOK) {
-		async_wait_for(req, NULL);
-		ipc_hangup(phone);
-		return retval;
-	}
-	
-	async_wait_for(req, &retval);
-	
-	if (handle != NULL)
-		*handle = -1;
-	
-	if (retval == EOK) {
-		if (handle != NULL)
-			*handle = (dev_handle_t) IPC_GET_ARG1(answer);
-	}
-	
-	ipc_hangup(phone);
-	return retval;
-}
-
 int mount(const char *fs_name, const char *mp, const char *dev,
-    const char *opts, const unsigned int flags)
+    const char *opts, unsigned int flags)
 {
 	int res;
@@ -163,5 +124,5 @@
 	dev_handle_t dev_handle;
 	
-	res = device_get_handle(dev, &dev_handle, flags);
+	res = devmap_device_get_handle(dev, &dev_handle, flags);
 	if (res != EOK)
 		return res;
Index: uspace/lib/libc/include/devmap.h
===================================================================
--- uspace/lib/libc/include/devmap.h	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
+++ uspace/lib/libc/include/devmap.h	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2009 Jiri Svoboda
+ * 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.
+ */
+
+/** @addtogroup libc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_DEVMAP_H_
+#define LIBC_DEVMAP_H_
+
+#include <ipc/devmap.h>
+#include <async.h>
+
+typedef int dev_handle_t;
+
+extern int devmap_driver_register(const char *, async_client_conn_t);
+extern int devmap_device_get_handle(const char *, dev_handle_t *,
+    unsigned int);
+extern int devmap_device_connect(dev_handle_t, unsigned int);
+extern int devmap_device_register(int, const char *, int *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/libc/include/ipc/devmap.h
===================================================================
--- uspace/lib/libc/include/ipc/devmap.h	(revision c5747fed053576a6a75fe794c2cce48244874acc)
+++ uspace/lib/libc/include/ipc/devmap.h	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
@@ -34,4 +34,5 @@
 #define DEVMAP_DEVMAP_H_
 
+#include <atomic.h>
 #include <ipc/ipc.h>
 #include <libadt/list.h>
Index: uspace/lib/libc/include/vfs/vfs.h
===================================================================
--- uspace/lib/libc/include/vfs/vfs.h	(revision c5747fed053576a6a75fe794c2cce48244874acc)
+++ uspace/lib/libc/include/vfs/vfs.h	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
@@ -41,5 +41,5 @@
 
 extern int mount(const char *, const char *, const char *, const char *,
-    const unsigned int flags);
+    unsigned int flags);
 
 #endif
Index: uspace/srv/rd/rd.c
===================================================================
--- uspace/srv/rd/rd.c	(revision c5747fed053576a6a75fe794c2cce48244874acc)
+++ uspace/srv/rd/rd.c	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
@@ -53,5 +53,5 @@
 #include <futex.h>
 #include <stdio.h>
-#include <ipc/devmap.h>
+#include <devmap.h>
 #include <ipc/bd.h>
 
@@ -181,64 +181,4 @@
 }
 
-static int driver_register(char *name)
-{
-	ipcarg_t retval;
-	aid_t req;
-	ipc_call_t answer;
-	int phone;
-	ipcarg_t callback_phonehash;
-
-	phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_DEVMAP, DEVMAP_DRIVER, 0);
-	if (phone < 0) {
-		printf(NAME ": Failed to connect to device mapper\n");
-		return -1;
-	}
-	
-	req = async_send_2(phone, DEVMAP_DRIVER_REGISTER, 0, 0, &answer);
-
-	retval = ipc_data_write_start(phone, (char *) name, str_size(name) + 1);
-
-	if (retval != EOK) {
-		async_wait_for(req, NULL);
-		return -1;
-	}
-
-	async_set_client_connection(rd_connection);
-
-	ipc_connect_to_me(phone, 0, 0, 0, &callback_phonehash);
-	async_wait_for(req, &retval);
-
-	return phone;
-}
-
-static int device_register(int driver_phone, char *name, int *handle)
-{
-	ipcarg_t retval;
-	aid_t req;
-	ipc_call_t answer;
-
-	req = async_send_2(driver_phone, DEVMAP_DEVICE_REGISTER, 0, 0, &answer);
-
-	retval = ipc_data_write_start(driver_phone, (char *) name,
-	    str_size(name) + 1);
-
-	if (retval != EOK) {
-		async_wait_for(req, NULL);
-		return retval;
-	}
-
-	async_wait_for(req, &retval);
-
-	if (handle != NULL)
-		*handle = -1;
-	
-	if (EOK == retval) {
-		if (NULL != handle)
-			*handle = (int) IPC_GET_ARG1(answer);
-	}
-	
-	return retval;
-}
-
 /** Prepare the ramdisk image for operation. */
 static bool rd_init(void)
@@ -265,5 +205,5 @@
 	printf(NAME ": Found RAM disk at %p, %d bytes\n", rd_ph_addr, rd_size);
 	
-	int driver_phone = driver_register(NAME);
+	int driver_phone = devmap_driver_register(NAME, rd_connection);
 	if (driver_phone < 0) {
 		printf(NAME ": Unable to register driver\n");
@@ -272,5 +212,5 @@
 	
 	int dev_handle;
-	if (EOK != device_register(driver_phone, "initrd", &dev_handle)) {
+	if (devmap_device_register(driver_phone, "initrd", &dev_handle) != EOK) {
 		ipc_hangup(driver_phone);
 		printf(NAME ": Unable to register device\n");
@@ -284,5 +224,5 @@
 	 * be created dynamically...
 	 */
-	if (EOK != device_register(driver_phone, "spared", &dev_handle)) {
+	if (devmap_device_register(driver_phone, "spared", &dev_handle) != EOK) {
 		ipc_hangup(driver_phone);
 		printf(NAME ": Unable to register device\n");
Index: uspace/srv/vfs/vfs.h
===================================================================
--- uspace/srv/vfs/vfs.h	(revision c5747fed053576a6a75fe794c2cce48244874acc)
+++ uspace/srv/vfs/vfs.h	(revision 1090b8c5d547b44cb82f921d66261080be81ccc2)
@@ -39,4 +39,5 @@
 #include <rwlock.h>
 #include <sys/types.h>
+#include <devmap.h>
 #include <bool.h>
 
@@ -50,5 +51,4 @@
 /* Basic types. */
 typedef int16_t fs_handle_t;
-typedef int16_t dev_handle_t;
 typedef uint32_t fs_index_t;
 
