Index: uspace/lib/libc/include/ipc/console.h
===================================================================
--- uspace/lib/libc/include/ipc/console.h	(revision cb41a5e8d354c38c6d53f55fadf65c3d3dc83c6f)
+++ uspace/lib/libc/include/ipc/console.h	(revision 8bfe48e81c36cb4f2aef628c058c67d0583b320b)
@@ -28,5 +28,5 @@
 
 /** @addtogroup libcipc
- * @{ 
+ * @{
  */
 /** @file
@@ -37,13 +37,11 @@
 
 #include <ipc/ipc.h>
+#include <ipc/vfs.h>
 
 typedef enum {
-	CONSOLE_GETKEY = IPC_FIRST_USER_METHOD,
-	CONSOLE_PUTCHAR,
-	CONSOLE_WRITE,
+	CONSOLE_GET_SIZE = VFS_LAST_SRV,
+	CONSOLE_GET_EVENT,
+	CONSOLE_GOTO,
 	CONSOLE_CLEAR,
-	CONSOLE_GOTO,
-	CONSOLE_GETSIZE,
-	CONSOLE_FLUSH,
 	CONSOLE_SET_STYLE,
 	CONSOLE_SET_COLOR,
@@ -54,5 +52,5 @@
 
 #endif
- 
+
 /** @}
  */
Index: uspace/lib/libc/include/ipc/ipc.h
===================================================================
--- uspace/lib/libc/include/ipc/ipc.h	(revision cb41a5e8d354c38c6d53f55fadf65c3d3dc83c6f)
+++ uspace/lib/libc/include/ipc/ipc.h	(revision 8bfe48e81c36cb4f2aef628c058c67d0583b320b)
@@ -31,9 +31,10 @@
  */
 /** @file
- */ 
+ */
 
 #ifndef LIBIPC_IPC_H_
 #define LIBIPC_IPC_H_
 
+#include <task.h>
 #include <kernel/ipc/ipc.h>
 #include <kernel/ddi/irq.h>
@@ -41,9 +42,13 @@
 #include <kernel/synch/synch.h>
 
+#define IPC_FLAG_BLOCKING  0x01
+
 typedef sysarg_t ipcarg_t;
+
 typedef struct {
 	ipcarg_t args[IPC_CALL_LEN];
 	ipcarg_t in_phone_hash;
 } ipc_call_t;
+
 typedef sysarg_t ipc_callid_t;
 
@@ -57,47 +62,49 @@
  */
 #define ipc_call_sync_0_0(phoneid, method) \
-    ipc_call_sync_fast((phoneid), (method), 0, 0, 0, 0, 0, 0, 0, 0)
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, 0, 0, 0, 0, 0)
 #define ipc_call_sync_0_1(phoneid, method, res1) \
-    ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), 0, 0, 0, 0)
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), 0, 0, 0, 0)
 #define ipc_call_sync_0_2(phoneid, method, res1, res2) \
-    ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), 0, 0, 0)
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), 0, 0, 0)
 #define ipc_call_sync_0_3(phoneid, method, res1, res2, res3) \
-    ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
-        0, 0)
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
+	    0, 0)
 #define ipc_call_sync_0_4(phoneid, method, res1, res2, res3, res4) \
-    ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
-        (res4), 0)
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
+	    (res4), 0)
 #define ipc_call_sync_0_5(phoneid, method, res1, res2, res3, res4, res5) \
-    ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
-        (res4), (res5))
+	ipc_call_sync_fast((phoneid), (method), 0, 0, 0, (res1), (res2), (res3), \
+	    (res4), (res5))
+
 #define ipc_call_sync_1_0(phoneid, method, arg1) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, 0, 0, 0, 0, 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, 0, 0, 0, 0, 0)
 #define ipc_call_sync_1_1(phoneid, method, arg1, res1) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), 0, 0, 0, 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), 0, 0, 0, 0)
 #define ipc_call_sync_1_2(phoneid, method, arg1, res1, res2) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), 0, \
-	0, 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), 0, \
+	    0, 0)
 #define ipc_call_sync_1_3(phoneid, method, arg1, res1, res2, res3) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
-	(res3), 0, 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
+	    (res3), 0, 0)
 #define ipc_call_sync_1_4(phoneid, method, arg1, res1, res2, res3, res4) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
-	(res3), (res4), 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
+	    (res3), (res4), 0)
 #define ipc_call_sync_1_5(phoneid, method, arg1, res1, res2, res3, res4, \
     res5) \
 	ipc_call_sync_fast((phoneid), (method), (arg1), 0, 0, (res1), (res2), \
 	    (res3), (res4), (res5))
+
 #define ipc_call_sync_2_0(phoneid, method, arg1, arg2) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, 0, 0, 0, \
-	0, 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, 0, 0, 0, \
+	    0, 0)
 #define ipc_call_sync_2_1(phoneid, method, arg1, arg2, res1) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), 0, 0, \
-	0, 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), 0, 0, \
+	    0, 0)
 #define ipc_call_sync_2_2(phoneid, method, arg1, arg2, res1, res2) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
-	(res2), 0, 0, 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
+	    (res2), 0, 0, 0)
 #define ipc_call_sync_2_3(phoneid, method, arg1, arg2, res1, res2, res3) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
-	(res2), (res3), 0, 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
+	    (res2), (res3), 0, 0)
 #define ipc_call_sync_2_4(phoneid, method, arg1, arg2, res1, res2, res3, \
     res4) \
@@ -108,13 +115,14 @@
 	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), 0, (res1), \
 	    (res2), (res3), (res4), (res5))
+
 #define ipc_call_sync_3_0(phoneid, method, arg1, arg2, arg3) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, 0, 0, \
-    0, 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), 0, 0, 0, \
+	    0, 0)
 #define ipc_call_sync_3_1(phoneid, method, arg1, arg2, arg3, res1) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
-	0, 0, 0, 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
+	    0, 0, 0, 0)
 #define ipc_call_sync_3_2(phoneid, method, arg1, arg2, arg3, res1, res2) \
-    ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
-	(res2), 0, 0, 0)
+	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), (res1), \
+	    (res2), 0, 0, 0)
 #define ipc_call_sync_3_3(phoneid, method, arg1, arg2, arg3, res1, res2, \
     res3) \
@@ -129,13 +137,14 @@
 	ipc_call_sync_fast((phoneid), (method), (arg1), (arg2), (arg3), \
 	    (res1), (res2), (res3), (res4), (res5))
+
 #define ipc_call_sync_4_0(phoneid, method, arg1, arg2, arg3, arg4) \
-    ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
-	0, 0, 0, 0, 0)
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
+	    0, 0, 0, 0, 0)
 #define ipc_call_sync_4_1(phoneid, method, arg1, arg2, arg3, arg4, res1) \
-    ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
-	(res1), 0, 0, 0, 0)
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
+	    (res1), 0, 0, 0, 0)
 #define ipc_call_sync_4_2(phoneid, method, arg1, arg2, arg3, arg4, res1, res2) \
-    ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
-	(res1), (res2), 0, 0, 0)
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), 0, \
+	    (res1), (res2), 0, 0, 0)
 #define ipc_call_sync_4_3(phoneid, method, arg1, arg2, arg3, arg4, res1, res2, \
     res3) \
@@ -150,10 +159,11 @@
 	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), \
 	    (arg4), 0, (res1), (res2), (res3), (res4), (res5))
+
 #define ipc_call_sync_5_0(phoneid, method, arg1, arg2, arg3, arg4, arg5) \
-    ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-        (arg5), 0, 0, 0, 0, 0)
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), 0, 0, 0, 0, 0)
 #define ipc_call_sync_5_1(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1) \
-    ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
-        (arg5), (res1), 0, 0, 0, 0)
+	ipc_call_sync_slow((phoneid), (method), (arg1), (arg2), (arg3), (arg4), \
+	    (arg5), (res1), 0, 0, 0, 0)
 #define ipc_call_sync_5_2(phoneid, method, arg1, arg2, arg3, arg4, arg5, res1, \
     res2) \
@@ -182,8 +192,10 @@
 extern ipc_callid_t ipc_wait_cycle(ipc_call_t *, uint32_t, int);
 extern ipc_callid_t ipc_wait_for_call_timeout(ipc_call_t *, uint32_t);
+
 static inline ipc_callid_t ipc_wait_for_call(ipc_call_t *data)
 {
 	return ipc_wait_for_call_timeout(data, SYNCH_NO_TIMEOUT);
 }
+
 extern ipc_callid_t ipc_trywait_for_call(ipc_call_t *);
 
@@ -195,15 +207,15 @@
  */
 #define ipc_answer_0(callid, retval) \
-    ipc_answer_fast((callid), (retval), 0, 0, 0, 0)
+	ipc_answer_fast((callid), (retval), 0, 0, 0, 0)
 #define ipc_answer_1(callid, retval, arg1) \
-    ipc_answer_fast((callid), (retval), (arg1), 0, 0, 0)
+	ipc_answer_fast((callid), (retval), (arg1), 0, 0, 0)
 #define ipc_answer_2(callid, retval, arg1, arg2) \
-    ipc_answer_fast((callid), (retval), (arg1), (arg2), 0, 0)
+	ipc_answer_fast((callid), (retval), (arg1), (arg2), 0, 0)
 #define ipc_answer_3(callid, retval, arg1, arg2, arg3) \
-    ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), 0)
+	ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), 0)
 #define ipc_answer_4(callid, retval, arg1, arg2, arg3, arg4) \
-    ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), (arg4))
+	ipc_answer_fast((callid), (retval), (arg1), (arg2), (arg3), (arg4))
 #define ipc_answer_5(callid, retval, arg1, arg2, arg3, arg4, arg5) \
-    ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5))
+	ipc_answer_slow((callid), (retval), (arg1), (arg2), (arg3), (arg4), (arg5))
 
 extern ipcarg_t ipc_answer_fast(ipc_callid_t, ipcarg_t, ipcarg_t, ipcarg_t,
@@ -247,6 +259,4 @@
     ipcarg_t, ipcarg_t, void *, ipc_async_callback_t, int);
 
-#define IPC_FLAG_BLOCKING  0x01
-
 extern int ipc_connect_to_me(int, int, int, int, ipcarg_t *);
 extern int ipc_connect_me_to(int, int, int, int);
@@ -257,6 +267,5 @@
 extern int ipc_forward_fast(ipc_callid_t, int, int, ipcarg_t, ipcarg_t, int);
 extern int ipc_forward_slow(ipc_callid_t, int, int, ipcarg_t, ipcarg_t,
-    ipcarg_t, ipcarg_t, ipcarg_t, int); 
-
+    ipcarg_t, ipcarg_t, ipcarg_t, int);
 
 /*
@@ -264,11 +273,11 @@
  */
 #define ipc_share_in_start_0_0(phoneid, dst, size) \
-    ipc_share_in_start((phoneid), (dst), (size), 0, NULL)
+	ipc_share_in_start((phoneid), (dst), (size), 0, NULL)
 #define ipc_share_in_start_0_1(phoneid, dst, size, flags) \
-    ipc_share_in_start((phoneid), (dst), (size), 0, (flags))
+	ipc_share_in_start((phoneid), (dst), (size), 0, (flags))
 #define ipc_share_in_start_1_0(phoneid, dst, size, arg) \
-    ipc_share_in_start((phoneid), (dst), (size), (arg), NULL)
+	ipc_share_in_start((phoneid), (dst), (size), (arg), NULL)
 #define ipc_share_in_start_1_1(phoneid, dst, size, arg, flags) \
-    ipc_share_in_start((phoneid), (dst), (size), (arg), (flags))
+	ipc_share_in_start((phoneid), (dst), (size), (arg), (flags))
 
 extern int ipc_share_in_start(int, void *, size_t, ipcarg_t, int *);
@@ -285,6 +294,4 @@
 extern int ipc_data_write_finalize(ipc_callid_t, void *, size_t);
 
-#include <task.h>
-
 extern int ipc_connect_kbox(task_id_t);
 
Index: uspace/lib/libc/include/ipc/loader.h
===================================================================
--- uspace/lib/libc/include/ipc/loader.h	(revision cb41a5e8d354c38c6d53f55fadf65c3d3dc83c6f)
+++ uspace/lib/libc/include/ipc/loader.h	(revision 8bfe48e81c36cb4f2aef628c058c67d0583b320b)
@@ -43,4 +43,5 @@
 	LOADER_SET_PATHNAME,
 	LOADER_SET_ARGS,
+	LOADER_SET_FILES,
 	LOADER_LOAD,
 	LOADER_RUN
Index: uspace/lib/libc/include/ipc/ns.h
===================================================================
--- uspace/lib/libc/include/ipc/ns.h	(revision cb41a5e8d354c38c6d53f55fadf65c3d3dc83c6f)
+++ uspace/lib/libc/include/ipc/ns.h	(revision 8bfe48e81c36cb4f2aef628c058c67d0583b320b)
@@ -36,4 +36,11 @@
 #define LIBIPC_NS_H_
 
+#include <ipc/ipc.h>
+
+typedef enum {
+	NS_PING = IPC_FIRST_USER_METHOD,
+	NS_TASK_WAIT
+} ns_request_t;
+
 #endif
 
Index: uspace/lib/libc/include/ipc/vfs.h
===================================================================
--- uspace/lib/libc/include/ipc/vfs.h	(revision 8bfe48e81c36cb4f2aef628c058c67d0583b320b)
+++ uspace/lib/libc/include/ipc/vfs.h	(revision 8bfe48e81c36cb4f2aef628c058c67d0583b320b)
@@ -0,0 +1,147 @@
+/*
+ * Copyright (c) 2009 Martin Decky
+ * 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 libcipc
+ * @{
+ */
+/** @file
+ */
+
+#ifndef LIBC_IPC_VFS_H_
+#define LIBC_IPC_VFS_H_
+
+#include <sys/types.h>
+#include <ipc/ipc.h>
+
+#define FS_NAME_MAXLEN  20
+#define MAX_PATH_LEN    (64 * 1024)
+#define PLB_SIZE        (2 * MAX_PATH_LEN)
+
+/* Basic types. */
+typedef int16_t fs_handle_t;
+typedef uint32_t fs_index_t;
+
+/**
+ * A structure like this is passed to VFS by each individual FS upon its
+ * registration. It assosiates a human-readable identifier with each
+ * registered FS.
+ */
+typedef struct {
+	/** Unique identifier of the fs. */
+	char name[FS_NAME_MAXLEN + 1];
+} vfs_info_t;
+
+typedef enum {
+	VFS_OPEN_NODE = IPC_FIRST_USER_METHOD,
+	VFS_READ,
+	VFS_WRITE,
+	VFS_TRUNCATE,
+	VFS_MOUNT,
+	VFS_UNMOUNT,
+	VFS_DEVICE,
+	VFS_SYNC,
+	VFS_CLOSE,
+	VFS_LAST_CMN  /* keep this the last member of this enum */
+} vfs_request_cmn_t;
+
+typedef enum {
+	VFS_LOOKUP = VFS_LAST_CMN,
+	VFS_MOUNTED,
+	VFS_DESTROY,
+	VFS_LAST_CLNT  /* keep this the last member of this enum */
+} vfs_request_clnt_t;
+
+typedef enum {
+	VFS_REGISTER = VFS_LAST_CMN,
+	VFS_OPEN,
+	VFS_SEEK,
+	VFS_MKDIR,
+	VFS_UNLINK,
+	VFS_RENAME,
+	VFS_NODE,
+	VFS_LAST_SRV  /* keep this the last member of this enum */
+} vfs_request_srv_t;
+
+/*
+ * Lookup flags.
+ */
+
+/**
+ * No lookup flags used.
+ */
+#define L_NONE  0
+
+/**
+ * Lookup will succeed only if the object is a regular file.  If L_CREATE is
+ * specified, an empty file will be created. This flag is mutually exclusive
+ * with L_DIRECTORY.
+ */
+#define L_FILE  1
+
+/**
+ * Lookup wil succeed only if the object is a directory. If L_CREATE is
+ * specified, an empty directory will be created. This flag is mutually
+ * exclusive with L_FILE.
+ */
+#define L_DIRECTORY  2
+
+/**
+ * When used with L_CREATE, L_EXCLUSIVE will cause the lookup to fail if the
+ * object already exists. L_EXCLUSIVE is implied when L_DIRECTORY is used.
+ */
+#define L_EXCLUSIVE  4
+
+/**
+ * L_CREATE is used for creating both regular files and directories.
+ */
+#define L_CREATE  8
+
+/**
+ * L_LINK is used for linking to an already existing nodes.
+ */
+#define L_LINK  16
+
+/**
+ * L_UNLINK is used to remove leaves from the file system namespace. This flag
+ * cannot be passed directly by the client, but will be set by VFS during
+ * VFS_UNLINK.
+ */
+#define L_UNLINK  32
+
+/**
+ * L_OPEN is used to indicate that the lookup operation is a part of VFS_OPEN
+ * call from the client. This means that the server might allocate some
+ * resources for the opened file. This flag cannot be passed directly by the
+ * client.
+ */
+#define L_OPEN  64
+
+#endif
+
+/** @}
+ */
