From 042a0db8b705abc0e5a5fec61309a1fe05878931 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sat, 3 Aug 2013 09:47:12 +0200 Subject: Refactor and remove unused code --- persistent-hello.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'persistent-hello.c') diff --git a/persistent-hello.c b/persistent-hello.c index 0efc60f..6274e99 100644 --- a/persistent-hello.c +++ b/persistent-hello.c @@ -302,16 +302,13 @@ main (int argc, char **argv) if (err) error (3, err, "trivfs_startup"); - /* Get reincarnation image. */ - mach_port_t *registered_ports = NULL; - size_t registered_ports_len = 0; - err = mach_ports_lookup (mach_task_self (), - ®istered_ports, ®istered_ports_len); + /* Get reincarnation port. */ + err = reincarnation_get_port (mach_task_self (), + &reincarnation); if (err) - error (5, err, "mach_port_lookup"); - - reincarnation = registered_ports[0]; + error (5, err, "reincarnation_get_port"); + /* Get reincarnation image. */ char *image = NULL; size_t image_len = 0; err = reincarnate (reincarnation, &image, &image_len); -- cgit v1.2.3