Index: uspace/srv/hw/irc/apic/apic.c
===================================================================
--- uspace/srv/hw/irc/apic/apic.c	(revision 5857be2e40c022b415aeaa6c8bbe900f882d56be)
+++ uspace/srv/hw/irc/apic/apic.c	(revision 4f4b4e7fb8b7c20ca4d80eb4a28ba77472c1274e)
@@ -38,5 +38,5 @@
 #include <ipc/services.h>
 #include <ipc/irc.h>
-#include <ipc/ns.h>
+#include <ns.h>
 #include <sysinfo.h>
 #include <as.h>
@@ -79,4 +79,10 @@
 		callid = async_get_call(&call);
 		
+		if (!IPC_GET_IMETHOD(call)) {
+			/* The other side has hung up. */
+			async_answer_0(callid, EOK);
+			return;
+		}
+		
 		switch (IPC_GET_IMETHOD(call)) {
 		case IRC_ENABLE_INTERRUPT:
@@ -87,8 +93,4 @@
 			async_answer_0(callid, EOK);
 			break;
-		case IPC_M_PHONE_HUNGUP:
-			/* The other side has hung up. */
-			async_answer_0(callid, EOK);
-			return;
 		default:
 			async_answer_0(callid, EINVAL);
@@ -106,5 +108,5 @@
 	
 	if ((sysinfo_get_value("apic", &apic) != EOK) || (!apic)) {
-		printf(NAME ": No APIC found\n");
+		printf("%s: No APIC found\n", NAME);
 		return false;
 	}
@@ -118,10 +120,11 @@
 int main(int argc, char **argv)
 {
-	printf(NAME ": HelenOS APIC driver\n");
+	printf("%s: HelenOS APIC driver\n", NAME);
 	
 	if (!apic_init())
 		return -1;
 	
-	printf(NAME ": Accepting connections\n");
+	printf("%s: Accepting connections\n", NAME);
+	task_retval(0);
 	async_manager();
 	
