Index: uspace/srv/clip/clip.c
===================================================================
--- uspace/srv/clip/clip.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/clip/clip.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <bool.h>
+#include <async.h>
 #include <ipc/ipc.h>
-#include <async.h>
+#include <ipc/ns.h>
 #include <ipc/services.h>
 #include <ipc/clipboard.h>
@@ -183,5 +184,5 @@
 	async_set_client_connection(clip_connection);
 	
-	if (ipc_connect_to_me(PHONE_NS, SERVICE_CLIPBOARD, 0, 0, NULL, NULL)) 
+	if (service_register(SERVICE_CLIPBOARD) != EOK)
 		return -1;
 	
Index: uspace/srv/devman/main.c
===================================================================
--- uspace/srv/devman/main.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/devman/main.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -586,5 +586,5 @@
 
 	/* Register device manager at naming service. */
-	if (ipc_connect_to_me(PHONE_NS, SERVICE_DEVMAN, 0, 0, NULL, NULL) != 0)
+	if (service_register(SERVICE_DEVMAN) != EOK)
 		return -1;
 
Index: uspace/srv/devmap/devmap.c
===================================================================
--- uspace/srv/devmap/devmap.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/devmap/devmap.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -1150,5 +1150,5 @@
 	
 	/* Register device mapper at naming service */
-	if (ipc_connect_to_me(PHONE_NS, SERVICE_DEVMAP, 0, 0, NULL, NULL) != 0)
+	if (service_register(SERVICE_DEVMAP) != EOK)
 		return -1;
 	
Index: uspace/srv/fs/devfs/devfs.c
===================================================================
--- uspace/srv/fs/devfs/devfs.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/fs/devfs/devfs.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -42,4 +42,5 @@
 #include <ipc/ipc.h>
 #include <ipc/services.h>
+#include <ipc/ns.h>
 #include <async.h>
 #include <errno.h>
@@ -126,5 +127,5 @@
 	}
 	
-	int vfs_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VFS, 0, 0);
+	int vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0);
 	if (vfs_phone < EOK) {
 		printf(NAME ": Unable to connect to VFS\n");
Index: uspace/srv/fs/fat/fat.c
===================================================================
--- uspace/srv/fs/fat/fat.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/fs/fat/fat.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -40,4 +40,5 @@
 #include <ipc/ipc.h>
 #include <ipc/services.h>
+#include <ipc/ns.h>
 #include <async.h>
 #include <errno.h>
@@ -153,5 +154,5 @@
 		goto err;
 
-	vfs_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VFS, 0, 0);
+	vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0);
 	if (vfs_phone < EOK) {
 		printf(NAME ": failed to connect to VFS\n");
Index: uspace/srv/fs/tmpfs/tmpfs.c
===================================================================
--- uspace/srv/fs/tmpfs/tmpfs.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/fs/tmpfs/tmpfs.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -44,4 +44,5 @@
 #include <ipc/ipc.h>
 #include <ipc/services.h>
+#include <ipc/ns.h>
 #include <async.h>
 #include <errno.h>
@@ -157,5 +158,5 @@
 	}
 
-	int vfs_phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VFS, 0, 0);
+	int vfs_phone = service_connect_blocking(SERVICE_VFS, 0, 0);
 	if (vfs_phone < EOK) {
 		printf(NAME ": Unable to connect to VFS\n");
Index: uspace/srv/hid/console/console.c
===================================================================
--- uspace/srv/hid/console/console.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/hid/console/console.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -40,4 +40,5 @@
 #include <ipc/fb.h>
 #include <ipc/services.h>
+#include <ipc/ns.h>
 #include <errno.h>
 #include <ipc/console.h>
@@ -762,5 +763,5 @@
 	
 	/* Connect to framebuffer driver */
-	fb_info.phone = ipc_connect_me_to_blocking(PHONE_NS, SERVICE_VIDEO, 0, 0);
+	fb_info.phone = service_connect_blocking(SERVICE_VIDEO, 0, 0);
 	if (fb_info.phone < 0) {
 		printf(NAME ": Failed to connect to video service\n");
@@ -838,8 +839,7 @@
 	
 	/* Receive kernel notifications */
+	async_set_interrupt_received(interrupt_received);
 	if (event_subscribe(EVENT_KCONSOLE, 0) != EOK)
 		printf(NAME ": Error registering kconsole notifications\n");
-	
-	async_set_interrupt_received(interrupt_received);
 	
 	return true;
Index: uspace/srv/hid/fb/main.c
===================================================================
--- uspace/srv/hid/fb/main.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/hid/fb/main.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -29,4 +29,5 @@
 #include <ipc/ipc.h>
 #include <ipc/services.h>
+#include <ipc/ns.h>
 #include <sysinfo.h>
 #include <async.h>
@@ -114,5 +115,5 @@
 		return -1;
 	
-	if (ipc_connect_to_me(PHONE_NS, SERVICE_VIDEO, 0, 0, NULL, NULL) != 0)
+	if (service_register(SERVICE_VIDEO) != EOK)
 		return -1;
 	
Index: uspace/srv/hid/kbd/generic/kbd.c
===================================================================
--- uspace/srv/hid/kbd/generic/kbd.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/hid/kbd/generic/kbd.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -223,8 +223,6 @@
 	
 	if (cir_service) {
-		while (cir_phone < 0) {
-			cir_phone = ipc_connect_me_to_blocking(PHONE_NS, cir_service,
-			    0, 0);
-		}
+		while (cir_phone < 0)
+			cir_phone = service_connect_blocking(cir_service, 0, 0);
 	}
 	
Index: uspace/srv/hw/irc/apic/apic.c
===================================================================
--- uspace/srv/hw/irc/apic/apic.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/hw/irc/apic/apic.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -108,5 +108,5 @@
 	
 	async_set_client_connection(apic_connection);
-	ipc_connect_to_me(PHONE_NS, SERVICE_APIC, 0, 0, NULL, NULL);
+	service_register(SERVICE_APIC);
 	
 	return true;
Index: uspace/srv/hw/irc/fhc/fhc.c
===================================================================
--- uspace/srv/hw/irc/fhc/fhc.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/hw/irc/fhc/fhc.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -137,5 +137,5 @@
 	
 	async_set_client_connection(fhc_connection);
-	ipc_connect_to_me(PHONE_NS, SERVICE_FHC, 0, 0, NULL, NULL);
+	service_register(SERVICE_FHC);
 	
 	return true;
Index: uspace/srv/hw/irc/i8259/i8259.c
===================================================================
--- uspace/srv/hw/irc/i8259/i8259.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/hw/irc/i8259/i8259.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -150,5 +150,5 @@
 	
 	async_set_client_connection(i8259_connection);
-	ipc_connect_to_me(PHONE_NS, SERVICE_I8259, 0, 0, NULL, NULL);
+	service_register(SERVICE_I8259);
 	
 	return true;
Index: uspace/srv/hw/irc/obio/obio.c
===================================================================
--- uspace/srv/hw/irc/obio/obio.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/hw/irc/obio/obio.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -138,5 +138,5 @@
 	
 	async_set_client_connection(obio_connection);
-	ipc_connect_to_me(PHONE_NS, SERVICE_OBIO, 0, 0, NULL, NULL);
+	service_register(SERVICE_OBIO);
 	
 	return true;
Index: uspace/srv/hw/netif/ne2000/ne2000.c
===================================================================
--- uspace/srv/hw/netif/ne2000/ne2000.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/hw/netif/ne2000/ne2000.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -45,4 +45,5 @@
 #include <ipc/ipc.h>
 #include <ipc/services.h>
+#include <ipc/ns.h>
 #include <ipc/irc.h>
 #include <net/modules.h>
@@ -389,8 +390,6 @@
 	
 	if (irc_service) {
-		while (irc_phone < 0) {
-			irc_phone = ipc_connect_me_to_blocking(PHONE_NS, irc_service,
-			    0, 0);
-		}
+		while (irc_phone < 0)
+			irc_phone = service_connect_blocking(irc_service, 0, 0);
 	}
 	
Index: uspace/srv/loader/main.c
===================================================================
--- uspace/srv/loader/main.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/loader/main.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -95,5 +95,5 @@
 
 /** Used to limit number of connections to one. */
-static bool connected;
+static bool connected = false;
 
 static void ldr_get_taskid(ipc_callid_t rid, ipc_call_t *request)
@@ -423,22 +423,17 @@
 int main(int argc, char *argv[])
 {
-	task_id_t id;
-	int rc;
-
-	connected = false;
-
+	/* Set a handler of incomming connections. */
+	async_set_client_connection(ldr_connection);
+	
 	/* Introduce this task to the NS (give it our task ID). */
-	id = task_get_id();
-	rc = async_req_2_0(PHONE_NS, NS_ID_INTRO, LOWER32(id), UPPER32(id));
+	task_id_t id = task_get_id();
+	int rc = async_req_2_0(PHONE_NS, NS_ID_INTRO, LOWER32(id), UPPER32(id));
 	if (rc != EOK)
 		return -1;
-
-	/* Set a handler of incomming connections. */
-	async_set_client_connection(ldr_connection);
 	
 	/* Register at naming service. */
-	if (ipc_connect_to_me(PHONE_NS, SERVICE_LOAD, 0, 0, NULL, NULL) != 0)
+	if (service_register(SERVICE_LOAD) != EOK)
 		return -2;
-
+	
 	async_manager();
 	
Index: uspace/srv/ns/clonable.c
===================================================================
--- uspace/srv/ns/clonable.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/ns/clonable.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -92,5 +92,5 @@
 	
 	ipc_forward_fast(csr->callid, phone, IPC_GET_ARG2(csr->call),
-		IPC_GET_ARG3(csr->call), 0, IPC_FF_NONE);
+	    IPC_GET_ARG3(csr->call), 0, IPC_FF_NONE);
 	
 	free(csr);
@@ -127,4 +127,5 @@
 	}
 	
+	link_initialize(&csr->link);
 	csr->service = service;
 	csr->call = *call;
Index: uspace/srv/ns/service.c
===================================================================
--- uspace/srv/ns/service.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/ns/service.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -43,5 +43,5 @@
 typedef struct {
 	link_t link;
-	sysarg_t service;        /**< Number of the service. */
+	sysarg_t service;        /**< Service ID. */
 	sysarg_t phone;          /**< Phone registered with the service. */
 	sysarg_t in_phone_hash;  /**< Incoming phone hash. */
@@ -56,8 +56,8 @@
  *
  */
-static hash_index_t service_hash(unsigned long *key)
+static hash_index_t service_hash(unsigned long key[])
 {
 	assert(key);
-	return (*key % SERVICE_HASH_TABLE_CHAINS);
+	return (key[0] % SERVICE_HASH_TABLE_CHAINS);
 }
 
@@ -86,5 +86,5 @@
 	
 	if (keys == 2)
-		return (key[1] == hs->in_phone_hash);
+		return ((key[0] == hs->service) && (key[1] == hs->in_phone_hash));
 	else
 		return (key[0] == hs->service);
@@ -195,5 +195,5 @@
 	hash_table_insert(&service_hash_table, keys, &hs->link);
 	
-	return 0;
+	return EOK;
 }
 
@@ -227,4 +227,5 @@
 			}
 			
+			link_initialize(&pr->link);
 			pr->service = service;
 			pr->callid = callid;
Index: uspace/srv/ns/task.c
===================================================================
--- uspace/srv/ns/task.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/ns/task.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -43,7 +43,5 @@
 
 #define TASK_HASH_TABLE_CHAINS  256
-#define P2I_HASH_TABLE_CHAINS  256
-
-static int get_id_by_phone(sysarg_t phone_hash, task_id_t *id);
+#define P2I_HASH_TABLE_CHAINS   256
 
 /* TODO:
@@ -57,8 +55,9 @@
 typedef struct {
 	link_t link;
-	task_id_t id;	/**< Task ID. */
-	bool finished;	/**< Task is done. */
-	bool have_rval;	/**< Task returned a value. */
-	int retval;	/**< The return value. */
+	
+	task_id_t id;    /**< Task ID. */
+	bool finished;   /**< Task is done. */
+	bool have_rval;  /**< Task returned a value. */
+	int retval;      /**< The return value. */
 } hashed_task_t;
 
@@ -71,8 +70,8 @@
  *
  */
-static hash_index_t task_hash(unsigned long *key)
+static hash_index_t task_hash(unsigned long key[])
 {
 	assert(key);
-	return (LOWER32(*key) % TASK_HASH_TABLE_CHAINS);
+	return (LOWER32(key[0]) % TASK_HASH_TABLE_CHAINS);
 }
 
@@ -124,6 +123,6 @@
 typedef struct {
 	link_t link;
-	sysarg_t phash;    /**< Task ID. */
-	task_id_t id;    /**< Task ID. */
+	sysarg_t in_phone_hash;  /**< Incoming phone hash. */
+	task_id_t id;            /**< Task ID. */
 } p2i_entry_t;
 
@@ -131,11 +130,12 @@
  *
  * @param key Array of keys.
+ *
  * @return Hash index corresponding to key[0].
  *
  */
-static hash_index_t p2i_hash(unsigned long *key)
+static hash_index_t p2i_hash(unsigned long key[])
 {
 	assert(key);
-	return (*key % TASK_HASH_TABLE_CHAINS);
+	return (key[0] % TASK_HASH_TABLE_CHAINS);
 }
 
@@ -154,8 +154,8 @@
 	assert(keys == 1);
 	assert(item);
-
-	p2i_entry_t *e = hash_table_get_instance(item, p2i_entry_t, link);
-
-	return (key[0] == e->phash);
+	
+	p2i_entry_t *entry = hash_table_get_instance(item, p2i_entry_t, link);
+	
+	return (key[0] == entry->in_phone_hash);
 }
 
@@ -197,5 +197,5 @@
 		return ENOMEM;
 	}
-
+	
 	if (!hash_table_create(&phone_to_id, P2I_HASH_TABLE_CHAINS,
 	    1, &p2i_ops)) {
@@ -205,5 +205,4 @@
 	
 	list_initialize(&pending_wait);
-	
 	return EOK;
 }
@@ -238,5 +237,5 @@
 			    ht->retval);
 		}
-
+		
 		hash_table_remove(&task_hash_table, keys, 2);
 		list_remove(cur);
@@ -250,14 +249,14 @@
 	sysarg_t retval;
 	task_exit_t texit;
-
+	
 	unsigned long keys[2] = {
 		LOWER32(id),
 		UPPER32(id)
 	};
-
+	
 	link_t *link = hash_table_find(&task_hash_table, keys);
 	hashed_task_t *ht = (link != NULL) ?
 	    hash_table_get_instance(link, hashed_task_t, link) : NULL;
-
+	
 	if (ht == NULL) {
 		/* No such task exists. */
@@ -265,5 +264,5 @@
 		return;
 	}
-
+	
 	if (!ht->finished) {
 		/* Add to pending list */
@@ -275,4 +274,5 @@
 		}
 		
+		link_initialize(&pr->link);
 		pr->id = id;
 		pr->callid = callid;
@@ -293,38 +293,37 @@
 int ns_task_id_intro(ipc_call_t *call)
 {
-	task_id_t id;
 	unsigned long keys[2];
-	link_t *link;
-	p2i_entry_t *e;
-	hashed_task_t *ht;
-
-	id = MERGE_LOUP32(IPC_GET_ARG1(*call), IPC_GET_ARG2(*call));
-
+	
+	task_id_t id = MERGE_LOUP32(IPC_GET_ARG1(*call), IPC_GET_ARG2(*call));
 	keys[0] = call->in_phone_hash;
-
-	link = hash_table_find(&phone_to_id, keys);
+	
+	link_t *link = hash_table_find(&phone_to_id, keys);
 	if (link != NULL)
 		return EEXISTS;
-
-	e = (p2i_entry_t *) malloc(sizeof(p2i_entry_t));
-	if (e == NULL)
+	
+	p2i_entry_t *entry = (p2i_entry_t *) malloc(sizeof(p2i_entry_t));
+	if (entry == NULL)
 		return ENOMEM;
-
-	ht = (hashed_task_t *) malloc(sizeof(hashed_task_t));
+	
+	hashed_task_t *ht = (hashed_task_t *) malloc(sizeof(hashed_task_t));
 	if (ht == NULL)
 		return ENOMEM;
-
-	/* Insert to phone-to-id map. */
-
-	link_initialize(&e->link);
-	e->phash = call->in_phone_hash;
-	e->id = id;
-	hash_table_insert(&phone_to_id, keys, &e->link);
-
-	/* Insert to main table. */
-
+	
+	/*
+	 * Insert into the phone-to-id map.
+	 */
+	
+	link_initialize(&entry->link);
+	entry->in_phone_hash = call->in_phone_hash;
+	entry->id = id;
+	hash_table_insert(&phone_to_id, keys, &entry->link);
+	
+	/*
+	 * Insert into the main table.
+	 */
+	
 	keys[0] = LOWER32(id);
 	keys[1] = UPPER32(id);
-
+	
 	link_initialize(&ht->link);
 	ht->id = id;
@@ -333,20 +332,33 @@
 	ht->retval = -1;
 	hash_table_insert(&task_hash_table, keys, &ht->link);
-
+	
 	return EOK;
 }
 
+static int get_id_by_phone(sysarg_t phone_hash, task_id_t *id)
+{
+	unsigned long keys[1] = {phone_hash};
+	
+	link_t *link = hash_table_find(&phone_to_id, keys);
+	if (link == NULL)
+		return ENOENT;
+	
+	p2i_entry_t *entry = hash_table_get_instance(link, p2i_entry_t, link);
+	*id = entry->id;
+	
+	return EOK;
+}
+
 int ns_task_retval(ipc_call_t *call)
 {
 	task_id_t id;
-	unsigned long keys[2];
-	int rc;
-
-	rc = get_id_by_phone(call->in_phone_hash, &id);
+	int rc = get_id_by_phone(call->in_phone_hash, &id);
 	if (rc != EOK)
 		return rc;
-
-	keys[0] = LOWER32(id);
-	keys[1] = UPPER32(id);
+	
+	unsigned long keys[2] = {
+		LOWER32(id),
+		UPPER32(id)
+	};
 	
 	link_t *link = hash_table_find(&task_hash_table, keys);
@@ -354,11 +366,11 @@
 	    hash_table_get_instance(link, hashed_task_t, link) : NULL;
 	
-	if ((ht == NULL) || ht->finished)
+	if ((ht == NULL) || (ht->finished))
 		return EINVAL;
-
+	
 	ht->finished = true;
 	ht->have_rval = true;
 	ht->retval = IPC_GET_ARG1(*call);
-
+	
 	return EOK;
 }
@@ -367,19 +379,18 @@
 {
 	unsigned long keys[2];
+	
 	task_id_t id;
-	int rc;
-
-	rc = get_id_by_phone(call->in_phone_hash, &id);
+	int rc = get_id_by_phone(call->in_phone_hash, &id);
 	if (rc != EOK)
 		return rc;
-
+	
 	/* Delete from phone-to-id map. */
 	keys[0] = call->in_phone_hash;
 	hash_table_remove(&phone_to_id, keys, 1);
-
+	
 	/* Mark task as finished. */
 	keys[0] = LOWER32(id);
 	keys[1] = UPPER32(id);
-
+	
 	link_t *link = hash_table_find(&task_hash_table, keys);
 	hashed_task_t *ht =
@@ -387,24 +398,7 @@
 	if (ht == NULL)
 		return EOK;
-
+	
 	ht->finished = true;
-
-	return EOK;
-}
-
-static int get_id_by_phone(sysarg_t phone_hash, task_id_t *id)
-{
-	unsigned long keys[1];
-	link_t *link;
-	p2i_entry_t *e;
-
-	keys[0] = phone_hash;
-	link = hash_table_find(&phone_to_id, keys);
-	if (link == NULL)
-		return ENOENT;
-
-	e = hash_table_get_instance(link, p2i_entry_t, link);
-	*id = e->id;
-
+	
 	return EOK;
 }
Index: uspace/srv/ns/task.h
===================================================================
--- uspace/srv/ns/task.h	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/ns/task.h	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -39,9 +39,9 @@
 extern void process_pending_wait(void);
 
-extern void wait_for_task(task_id_t id, ipc_call_t *call, ipc_callid_t callid);
+extern void wait_for_task(task_id_t, ipc_call_t *, ipc_callid_t);
 
-extern int ns_task_id_intro(ipc_call_t *call);
-extern int ns_task_disconnect(ipc_call_t *call);
-extern int ns_task_retval(ipc_call_t *call);
+extern int ns_task_id_intro(ipc_call_t *);
+extern int ns_task_disconnect(ipc_call_t *);
+extern int ns_task_retval(ipc_call_t *);
 
 
Index: uspace/srv/vfs/vfs.c
===================================================================
--- uspace/srv/vfs/vfs.c	(revision bf75e3cb2c7ba437dce4bc70fc808e165cdb0206)
+++ uspace/srv/vfs/vfs.c	(revision 4db1fbf7ba8464cc0ba04d663a9a284673fdd25b)
@@ -38,4 +38,5 @@
 #include <ipc/ipc.h>
 #include <ipc/services.h>
+#include <ipc/ns.h>
 #include <async.h>
 #include <errno.h>
@@ -47,5 +48,5 @@
 #include "vfs.h"
 
-#define NAME "vfs"
+#define NAME  "vfs"
 
 static void vfs_connection(ipc_callid_t iid, ipc_call_t *icall)
@@ -172,5 +173,8 @@
 	 * Register at the naming service.
 	 */
-	ipc_connect_to_me(PHONE_NS, SERVICE_VFS, 0, 0, NULL, NULL);
+	if (service_register(SERVICE_VFS) != EOK) {
+		printf("%s: Cannot register VFS service\n", NAME);
+		return EINVAL;
+	}
 	
 	/*
