Index: uspace/srv/fs/fat/fat.c
===================================================================
--- uspace/srv/fs/fat/fat.c	(revision 37e7dc5443b33b573716c39d62ce98c332b85af0)
+++ uspace/srv/fs/fat/fat.c	(revision 84b86dcbcab1a5af5f923fea93e451f3fece8b46)
@@ -43,5 +43,5 @@
 #include <unistd.h>
 #include <stdio.h>
-#include <as.h>>
+#include <as.h>
 #include "../../vfs/vfs.h"
 
@@ -65,4 +65,6 @@
 
 uint8_t *plb_ro = NULL;
+
+int fs_handle = 0;
 
 /**
@@ -156,6 +158,6 @@
 	 * Request sharing the Path Lookup Buffer with VFS.
 	 */
-	rc = ipc_call_sync_3(vfs_phone, IPC_M_AS_AREA_RECV, plb_ro, PLB_SIZE, 0,
-	    NULL, NULL, NULL);
+	rc = ipc_call_sync_3(vfs_phone, IPC_M_AS_AREA_RECV, (ipcarg_t) plb_ro,
+	    PLB_SIZE, 0, NULL, NULL, NULL);
 	if (rc) {
 		async_wait_for(req, NULL);
@@ -164,4 +166,11 @@
 	 
 	/*
+	 * Pick up the answer for the request to the VFS_REQUEST call.
+	 */
+	async_wait_for(req, NULL);
+	fs_handle = (int) IPC_GET_ARG1(answer);
+	dprintf("FAT filesystem registered, fs_handle=%d.\n", fs_handle);
+
+	/*
 	 * Create a connection fibril to handle the callback connection.
 	 */
@@ -173,10 +182,4 @@
 	 */
 	async_set_client_connection(fat_connection);
-
-	/*
-	 * Pick up the answer for the request to the VFS_REQUEST call.
-	 */
-	async_wait_for(req, NULL);
-	dprintf("FAT filesystem registered.\n");
 
 	async_create_manager();
