commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 01/02: New upstream snapshot


From: Samuel Thibault
Subject: [hurd] 01/02: New upstream snapshot
Date: Mon, 09 Feb 2015 09:59:04 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to annotated tag debian/1%0.5.git20150208-1
in repository hurd.

commit 32b4f1d60d6204365099d9ef7a3d9fe70da4b2be
Author: Samuel Thibault <address@hidden>
Date:   Sun Feb 8 23:55:40 2015 +0000

    New upstream snapshot
---
 Makeconf                                |   2 +
 aclocal.m4                              |   2 +-
 auth/auth.c                             |  21 +-
 boot/Makefile                           |   2 +
 boot/boot.c                             |   4 +-
 configure.ac                            |   4 +-
 console-client/bdf.c                    |   2 +-
 console-client/bdf.h                    |   2 +-
 console-client/xkb/README               |   2 +-
 console-client/xkb/TODO                 |   4 +-
 console-client/xkb/parser.y             |   6 +-
 console-client/xkb/xkb-data/keymap/hurd | 182 ++++++++---------
 console-client/xkb/xkb.c                |   6 +-
 console-client/xkb/xkb.h                |   2 +-
 console-client/xkb/xkbdata.c            |   6 +-
 console-client/xkb/xkbtimer.c           |   2 +-
 console/display.c                       |  37 ++--
 console/input.c                         |   2 +-
 console/input.h                         |   2 +-
 daemons/lmail.c                         |   2 +-
 defpager/defpager.c                     |   3 +-
 devnode/Makefile                        |   1 +
 devnode/mig-mutate.h                    |   2 +
 eth-filter/mig-decls.h                  |   6 +
 eth-filter/mig-mutate.h                 |   4 +
 eth-multiplexer/Makefile                |   1 +
 eth-multiplexer/mig-decls.h             |   6 +
 eth-multiplexer/mig-mutate.h            |   4 +
 exec/exec.c                             |  18 +-
 ext2fs/ext2fs.c                         |   2 +-
 ext2fs/getblk.c                         |   2 +-
 ext2fs/inode.c                          |   8 +-
 ext2fs/pager.c                          |   8 +-
 fatfs/fat.h                             |   2 +-
 fatfs/pager.c                           |   2 +-
 ftpfs/dir.c                             |   4 +-
 ftpfs/netfs.c                           |   2 +-
 hurd/console.h                          |   2 +-
 hurd/hurd_types.defs                    |   4 +-
 hurd/io.defs                            |   2 +-
 hurd/process.defs                       |  11 +-
 isofs/inode.c                           |   2 +-
 isofs/lookup.c                          |   4 +-
 isofs/main.c                            |   2 +-
 isofs/pager.c                           |   2 +-
 isofs/rr.c                              |   6 +-
 libdiskfs/boot-start.c                  |   1 +
 libdiskfs/dir-lookup.c                  |   4 +-
 libdiskfs/file-get-trans.c              |  10 +-
 libdiskfs/file-getfh.c                  |   2 +-
 libdiskfs/file-statfs.c                 |   2 +-
 libfshelp/fetch-root.c                  |   6 +-
 libfshelp/start-translator-long.c       |   6 +-
 libfshelp/start-translator.c            |   2 +-
 libftpconn/create.c                     |   2 +-
 libftpconn/open.c                       |   2 +-
 libftpconn/unix.c                       |   4 +-
 libiohelp/return-buffer.c               |   2 +-
 libmachdev/Makefile                     |   6 +-
 libmachdev/block.c                      |   4 +-
 libmachdev/mig-decls.h                  |   6 +
 libmachdev/mig-mutate.h                 |   4 +
 libnetfs/dir-lookup.c                   |   4 +-
 libpager/Makefile                       |   8 +-
 libpager/chg-compl.c                    |   3 +-
 libpager/data-request.c                 |   3 +-
 libpager/data-return.c                  |  13 +-
 libpager/data-unlock.c                  |   3 +-
 libpager/demuxer.c                      |   6 +-
 libpager/lock-completed.c               |   3 +-
 libpager/mig-mutate.h                   |   9 -
 libpager/no-senders.c                   |  35 ----
 libpager/notify-stubs.c                 |  66 -------
 libpager/object-init.c                  |   3 +-
 libpager/object-terminate.c             |   3 +-
 libpager/pagemap.c                      |   2 +-
 libpager/pager-attr.c                   |   2 +-
 libpager/pager-create.c                 |   2 -
 libpager/pager.h                        |   2 +-
 libpager/priv.h                         |   3 -
 libpager/stubs.c                        |   9 +-
 libpipe/pipe.c                          |   6 +-
 libpipe/pq.c                            |  12 +-
 libpipe/pq.h                            |   2 +-
 libports/manage-multithread.c           |   5 +
 libps/procstat.c                        |   4 +-
 libps/ps.h                              |   2 +-
 libps/spec.c                            |   2 +-
 libshouldbeinlibc/cacheq.c              |   2 +-
 libshouldbeinlibc/idvec.c               |   2 +-
 libshouldbeinlibc/portxlate.c           |   6 +-
 libshouldbeinlibc/ugids.c               |   4 +-
 libstore/argp.c                         |   2 +-
 libstore/enc.c                          |   4 +-
 libstore/kids.c                         |   2 +-
 libstore/part.c                         |   2 +-
 libstore/remap.c                        |   2 +-
 libstore/unzipstore.c                   |   6 +-
 libthreads/alpha/thread.c               |   2 +-
 libtreefs/fsys.c                        |   4 +-
 libtreefs/treefs-hooks.h                |   4 +-
 libtrivfs/file-statfs.c                 |   2 +-
 mach-defpager/Makefile                  |   2 +-
 mach-defpager/default_pager.c           |  12 +-
 mach-defpager/wiring.c                  |   2 +-
 pfinet/ethernet.c                       |  10 +-
 pfinet/glue-include/asm/uaccess.h       |   2 +-
 pfinet/io-ops.c                         |   2 +-
 pfinet/linux-src/net/ipv4/devinet.c     |   2 +
 pfinet/linux-src/net/ipv4/tcp.c         |  59 +++---
 pfinet/linux-src/net/ipv4/tcp_input.c   |   3 +
 pfinet/linux-src/net/ipv4/tcp_output.c  |   1 +
 pfinet/options.c                        | 341 ++++++++++++++++++++++++--------
 pfinet/socket.c                         |   2 +-
 pfinet/timer-emul.c                     |   2 +-
 pfinet/tunnel.c                         |   2 +-
 pflocal/io.c                            |   4 +-
 proc/Makefile                           |   4 +-
 proc/main.c                             |  34 +++-
 proc/mgt.c                              | 145 +++++++++++++-
 proc/msg.c                              |   2 +-
 proc/proc.h                             |   6 +
 procfs/TODO                             |   2 +-
 procfs/main.c                           |   2 +-
 procfs/process.c                        |   4 +-
 procfs/procfs.h                         |   2 +-
 random/gnupg-random.c                   |   4 +-
 startup/startup.c                       | 113 +++++++----
 storeio/dev.c                           |   6 +-
 storeio/storeio.c                       |   4 +-
 sutils/fstab.c                          |   4 +-
 usermux/usermux.c                       |   5 +-
 utils/fakeauth.c                        |   2 +-
 utils/frobauth.c                        |   2 +-
 utils/login.c                           |   4 +-
 utils/rpctrace.c                        |   3 +-
 utils/x.c                               |   4 +-
 137 files changed, 925 insertions(+), 594 deletions(-)

diff --git a/Makeconf b/Makeconf
index f0d3fe3..ed2f6d0 100644
--- a/Makeconf
+++ b/Makeconf
@@ -546,6 +546,7 @@ MIGCOMFLAGS := -subrprefix __
 
 %.sdefsi %.sdefs.d: %.defs
        $(CPP) $(CPPFLAGS) $(MIGSFLAGS) $($*-MIGSFLAGS) -DSERVERPREFIX=S_ \
+         -DHURD_SERVER=1 \
          -MD -MF $*.sdefs.d.new \
          $< -o $*.sdefsi
        sed -e 's/[^:]*:/$*Server.c $(mig-sheader-prefix)$*_S.h:/' \
@@ -577,6 +578,7 @@ mach_defs_names = bootstrap exc mach mach4 \
        mach_host mach_port mach_timer_reply memory_object \
        memory_object_default notify \
        gnumach \
+       task_notify \
 
 mach_debug_defs_names = mach_debug
 device_defs_names = dev_forward device device_reply device_request
diff --git a/aclocal.m4 b/aclocal.m4
index 8823289..4f091fb 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -135,7 +135,7 @@ fi[]dnl
 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
 #
 # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
-# only at the first occurence in configure.ac, so if the first place
+# only at the first occurrence in configure.ac, so if the first place
 # it's called might be skipped (such as if it is within an "if", you
 # have to call PKG_CHECK_EXISTS manually
 # --------------------------------------------------------------
diff --git a/auth/auth.c b/auth/auth.c
index 7d35bd3..d5ef587 100644
--- a/auth/auth.c
+++ b/auth/auth.c
@@ -25,6 +25,7 @@
 #include <pthread.h>
 #include <hurd.h>
 #include <hurd/startup.h>
+#include <hurd/paths.h>
 #include <hurd/ports.h>
 #include <hurd/ihash.h>
 #include <idvec.h>
@@ -59,7 +60,7 @@ create_authhandle (struct authhandle **new)
   error_t err = ports_create_port (authhandle_portclass, auth_bucket,
                                   sizeof **new, new);
   if (! err)
-    bzero (&(*new)->euids, (void *) &(*new)[1] - (void *) &(*new)->euids);
+    memset (&(*new)->euids, 0, (void *)&(*new)[1] - (void *)&(*new)->euids);
   return err;
 }
 
@@ -299,7 +300,7 @@ S_auth_user_authenticate (struct authhandle *userauth,
   if (! userauth)
     return EOPNOTSUPP;
 
-  if (rendezvous == MACH_PORT_NULL || rendezvous == MACH_PORT_DEAD)
+  if (! MACH_PORT_VALID (rendezvous))
     return EINVAL;
 
   u.user = userauth;
@@ -380,7 +381,7 @@ S_auth_server_authenticate (struct authhandle *serverauth,
   if (! serverauth)
     return EOPNOTSUPP;
 
-  if (rendezvous == MACH_PORT_NULL || rendezvous == MACH_PORT_DEAD)
+  if (! MACH_PORT_VALID (rendezvous))
     return EINVAL;
 
   pthread_mutex_lock (&pending_lock);
@@ -482,6 +483,7 @@ main (int argc, char **argv)
 {
   error_t err;
   mach_port_t boot;
+  mach_port_t startup;
   process_t proc;
   mach_port_t hostpriv, masterdev;
   struct authhandle *firstauth;
@@ -518,10 +520,21 @@ main (int argc, char **argv)
   _hurd_port_set (&_hurd_ports[INIT_PORT_PROC], proc);
   _hurd_proc_init (argv, NULL, 0);
 
+  startup = file_name_lookup (_SERVERS_STARTUP, 0, 0);
+  if (! MACH_PORT_VALID (startup))
+    {
+      error (0, errno, "%s", _SERVERS_STARTUP);
+      /* Fall back to using the bootstrap port as before.  */
+      startup = boot;
+    }
+
   /* Init knows intimately that we will be ready for messages
      as soon as this returns. */
-  startup_essential_task (boot, mach_task_self (), MACH_PORT_NULL, "auth",
+  startup_essential_task (startup, mach_task_self (), MACH_PORT_NULL, "auth",
                          hostpriv);
+
+  if (startup != boot)
+    mach_port_deallocate (mach_task_self (), startup);
   mach_port_deallocate (mach_task_self (), boot);
   mach_port_deallocate (mach_task_self (), hostpriv);
 
diff --git a/boot/Makefile b/boot/Makefile
index 2d52f3f..0afdb43 100644
--- a/boot/Makefile
+++ b/boot/Makefile
@@ -37,6 +37,8 @@ include ../Makeconf
 #/usr/local/bin/uxboot: uxboot
 #      cp $< $@
 
+MIGSFLAGS = -DHURD_DEFAULT_PAYLOAD_TO_PORT=1
+
 all: boot # uxboot
 
 uxboot.o: boot.c
diff --git a/boot/boot.c b/boot/boot.c
index e2cb907..4bdeb52 100644
--- a/boot/boot.c
+++ b/boot/boot.c
@@ -359,7 +359,7 @@ boot_script_exec_cmd (void *hook,
   *(char **) p = 0;
   p = (void *) p + sizeof (char *);
   memcpy (p, strings, stringlen);
-  bzero (args, (vm_offset_t) arg_pos & (vm_page_size - 1));
+  memset (args, 0, (vm_offset_t)arg_pos & (vm_page_size - 1));
   vm_write (task, trunc_page ((vm_offset_t) arg_pos), (vm_address_t) args,
            stack_end - trunc_page ((vm_offset_t) arg_pos));
   munmap ((caddr_t) args,
@@ -1579,7 +1579,7 @@ S_io_stat (mach_port_t object,
   if (object != pseudo_console)
     return EOPNOTSUPP;
 
-  bzero (st, sizeof (struct stat));
+  memset (st, 0, sizeof(struct stat));
   st->st_blksize = 1024;
   return 0;
 }
diff --git a/configure.ac b/configure.ac
index f8856db..a388e09 100644
--- a/configure.ac
+++ b/configure.ac
@@ -72,8 +72,8 @@ esac
 enable_static_progs=`echo "$enable_static_progs" | sed 's/[[, ]][[, ]]*/ /g'`
 AC_SUBST(enable_static_progs)
 
-[# Don't needlessly overwrite files that whose contents haven't changed.  This
-# helps for avoinding unneccessary recompilation cycles when keeping
+[# Don't needlessly overwrite files whose contents haven't changed.
+# This helps avoiding unnecessary recompilation cycles when keeping
 # cross-compilation toolchains up-to-date.  Thus, unconditionally use the
 # supplied `install-sh', as the GNU Coreutils one doesn't provide this
 # functionality yet (TODO: change that).  TODO: $ac_abs_top_builddir et al. are
diff --git a/console-client/bdf.c b/console-client/bdf.c
index f62a247..467c139 100644
--- a/console-client/bdf.c
+++ b/console-client/bdf.c
@@ -781,7 +781,7 @@ expand_glyphs (bdf_font_t font, int count)
 }
 
 
-/* Add a new glyph with the specified paramters to the font FONT.  If
+/* Add a new glyph with the specified parameters to the font FONT.  If
    encoding is -1, internal_encoding specifies the internal
    encoding.  All other parameters are mandatory.  */
 bdf_error_t
diff --git a/console-client/bdf.h b/console-client/bdf.h
index 17cd023..f8b6d19 100644
--- a/console-client/bdf.h
+++ b/console-client/bdf.h
@@ -243,7 +243,7 @@ bdf_error_t bdf_add_string_property (bdf_font_t font, const 
char *name,
 bdf_error_t bdf_add_number_property (bdf_font_t font, const char *name,
                                     int value);
 
-/* Add a new glyph with the specified paramters to the font FONT.  If
+/* Add a new glyph with the specified parameters to the font FONT.  If
    encoding is -1, internal_encoding specifies the internal
    encoding.  All other parameters are mandatory.  */
 bdf_error_t bdf_add_glyph (bdf_font_t font, const char *name, int encoding,
diff --git a/console-client/xkb/README b/console-client/xkb/README
index de78114..b8e246a 100644
--- a/console-client/xkb/README
+++ b/console-client/xkb/README
@@ -154,7 +154,7 @@ SwitchScreen (screen += 1) --> Switch to the console right 
of the
 
 --
 More functions will be added. One to send keysyms to other VCs (can be
-usefull to control a mixer, ogg vorbis player, etc.). It should also
+useful to control a mixer, ogg vorbis player, etc.). It should also
 be capable of inserting often used strings like "apfelkorn" :).
 
 A function to call the configuration dialog should be added.
diff --git a/console-client/xkb/TODO b/console-client/xkb/TODO
index 120dd48..2066f9c 100644
--- a/console-client/xkb/TODO
+++ b/console-client/xkb/TODO
@@ -1,6 +1,4 @@
-For release:
-
-Use rules instead of keymaps
+Use layout/variant rules instead of keymaps
 Indicators.
 Use libihash.
 Better memory handling.
diff --git a/console-client/xkb/parser.y b/console-client/xkb/parser.y
index 27b6214..8f26568 100644
--- a/console-client/xkb/parser.y
+++ b/console-client/xkb/parser.y
@@ -306,7 +306,7 @@ types:
 | flags "xkb_types" STR '{' typessect '}' ';'
 ;
 
-/* A list of virtual modifier declarations (see vmods_def), seperated 
+/* A list of virtual modifier declarations (see vmods_def), separated
    by commas.  */
 vmodslist:
   IDENTIFIER { vmod_add ($1); }
@@ -340,7 +340,7 @@ rmod:
 | "mod5"       { $$ = RMOD_MOD5; }
 ;
 
-/* One of more modifiers, seperated by '+'. A modmap_t will return all real
+/* One of more modifiers, separated by '+'. A modmap_t will return all real
    and virtual modifiers specified.  */
 mods:
   mods '+' rmod { $$.rmods = $1.rmods | $3; }
@@ -1317,7 +1317,7 @@ include_section (char *incl, int sectionsymbol, char 
*dirname,
   return 0;
 }
 
-/* Include multiple file sections, seperated by '+'. INCL is the
+/* Include multiple file sections, separated by '+'. INCL is the
    include string. SECTIONSYMBOL is the token that marks the beginning
    of the section. DIRNAME is the name of the directory from where the
    includefiles must be loaded. NEW_MM is the mergemode that should be
diff --git a/console-client/xkb/xkb-data/keymap/hurd 
b/console-client/xkb/xkb-data/keymap/hurd
index b123f2b..3d47277 100644
--- a/console-client/xkb/xkb-data/keymap/hurd
+++ b/console-client/xkb/xkb-data/keymap/hurd
@@ -4,7 +4,7 @@
 xkb_keymap "Hurd" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols        { include 
"pc(pc105)+us+hurd+group(win_switch)+compose(menu)"   };
     xkb_geometry       { include "pc"                  };
 };
@@ -12,7 +12,7 @@ xkb_keymap "Hurd" {
 default xkb_keymap "us" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"                };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+us+hurd"           };
     xkb_geometry       { include "pc"                  };
 };
@@ -21,21 +21,21 @@ default xkb_keymap "us" {
 xkb_keymap "ar" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ara+hurd"  };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "be"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+be+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "bg"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+bg+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
@@ -43,7 +43,7 @@ xkb_keymap "bg"       {
 xkb_keymap "br"        {
     xkb_keycodes       { include "xfree86"     };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+br+hurd"   };
     xkb_geometry       { include "pc(abnt2)"           };
 };
@@ -53,168 +53,168 @@ xkb_keymap "br"   {
 xkb_keymap "cz" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+cz+hurd"   };
     xkb_geometry       { include "pc"                  };
 };
 xkb_keymap "de"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+de+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "ch_de"     {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ch(de)+hurd"       };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "ch_fr"     {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ch(fr)+hurd"       };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "dk"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+dk+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "dvorak" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+us(dvorak)+hurd"};
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "en_US" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols        { include "pc(pc105)+us+hurd"   };
     xkb_geometry       { include "pc"                  };
 };
 xkb_keymap "es"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+es+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "fr"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+fr+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "fr-latin9" {
     xkb_keycodes        { include "xfree86"             };
     xkb_types           { include "default+hurd"        };
-    xkb_compatibility   { include "default"             };
+    xkb_compatibility   { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"            
 };
     xkb_symbols         { include "pc(pc105)+fr-latin9+hurd" };
     xkb_geometry        { include "pc"                 };
 };
 xkb_keymap "fr_CA"     {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ca+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "gb"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+gb+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "hr"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+hr+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "it"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+it+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "jp106" {
     xkb_keycodes       { include "xfree86"     };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "jp(jp106)+hurd"      };
     xkb_geometry       { include "pc(jp106)"           };
 };
 xkb_keymap "lt"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+lt+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "lt_std"    {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+lt(std)+hurd"      };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "lv"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+lv+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "mk" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+mk+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "mt" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+mt+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "neo"       {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include 
"default+caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock)"    
      };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)+caps(caps_lock)+misc(assign_shift_left_action)+level5(level5_lock)"
               };
     xkb_symbols                { include "pc(pc105)+de(neo)+hurd"      };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "no"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+no+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "pl"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+pl+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "pt"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+pt+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
@@ -222,49 +222,49 @@ xkb_keymap "pt"   {
 xkb_keymap "ro" {
     xkb_keycodes       { include "xfree86"                     };
     xkb_types          { include "default+hurd"                };
-    xkb_compatibility  { include "default"                     };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"            
      };
     xkb_symbols                { include "pc(pc105)+ro(pc101)+hurd"    };
     xkb_geometry       { include "pc(pc101)"                   };
 };
 xkb_keymap "ro_microsoft" {
     xkb_keycodes       { include "xfree86"                     };
     xkb_types          { include "default+hurd"                };
-    xkb_compatibility  { include "default"                     };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"            
      };
     xkb_symbols                { include "pc(pc105)+ro(pc105)+hurd"    };
     xkb_geometry       { include "pc(pc105)"                   };
 };
 xkb_keymap "ru"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ru+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "se_FI"     {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+fi+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "se_SE"     {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+se+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "sl" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+si+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "sl_SI" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+si+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
@@ -274,7 +274,7 @@ xkb_keymap "sl_SI" {
 xkb_keymap "sk" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+sk+hurd"   };
     xkb_geometry       { include "pc"                  };
 };
@@ -282,49 +282,49 @@ xkb_keymap "sk" {
 xkb_keymap "syr" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+syr+hurd"  };
     xkb_geometry       { include "pc(pc102)"           };
 };    
 xkb_keymap "th"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+th+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "th_tis"    {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+th(tis)+hurd"      };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "th_pat"    {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+th(pat)+hurd"      };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "tr" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+tr+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "uk" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+uk)+hurd"  };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "us_flexpro" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "us(pc105)+hurd"      };
     xkb_geometry       { include "keytronic(FlexPro)"  };
 };
@@ -334,14 +334,14 @@ xkb_keymap "us_flexpro" {
 xkb_keymap "us_intl" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "us(pc101)+us(intl)+hurd"     };
     xkb_geometry       { include "pc"                  };
 };
 xkb_keymap "us_microsoft" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "us(pc105)+hurd"      };
     xkb_geometry       { include "microsoft"           };
 };
@@ -349,7 +349,7 @@ xkb_keymap "us_microsoft" {
 xkb_keymap "uz" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+uz+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
@@ -358,35 +358,35 @@ xkb_keymap "uz" {
 xkb_keymap "cz_qwerty" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+cz(qwerty)+hurd"   };
     xkb_geometry       { include "pc"                  };
 };
 xkb_keymap "de_CH"     {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ch(de)+hurd"       };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "fr_CH"     {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ch(fr)+hurd"       };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "mt_us" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+mt(us)+hurd"       };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "sk_qwerty" {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+sk(qwerty)+hurd"   };
     xkb_geometry       { include "pc"                  };
 };
@@ -395,266 +395,266 @@ xkb_keymap "sk_qwerty" {
 xkb_keymap "al"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+al+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "ara"       {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ara+hurd"  };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "bd"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+bd+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "by"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+by+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "in"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+in+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "ba"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ba+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "ca"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ca+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "cn"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+cn+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "nl"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+nl+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "bt"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+bt+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "epo"       {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+epo+hurd"  };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "ee"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ee+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "et"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+et+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "fi"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+fi+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "ge"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ge+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "gr"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+gr+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "il"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+il+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "hu"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+hu+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "is"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+is+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "ie"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ie+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "jp"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+jp+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "kz"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+kz+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "kh"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+kh+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "kg"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+kg+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "kr"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+kr+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "la"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+la+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "latam"     {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+latam+hurd"        };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "np"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+np+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "ir"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ir+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "rs"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+rs+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "pk"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+pk+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "lk"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+lk+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "si"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+si+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "se"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+se+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "ch"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ch+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "tr"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+tr+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "ua"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+ua+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
 xkb_keymap "vn"        {
     xkb_keycodes       { include "xfree86"             };
     xkb_types          { include "default+hurd"        };
-    xkb_compatibility  { include "default"             };
+    xkb_compatibility  { include 
"basic+mousekeys+accessx(basic)+misc+iso9995+level5+caps(caps_lock)"          };
     xkb_symbols                { include "pc(pc105)+vn+hurd"   };
     xkb_geometry       { include "pc(pc102)"           };
 };
diff --git a/console-client/xkb/xkb.c b/console-client/xkb/xkb.c
index 0039714..bed3da8 100644
--- a/console-client/xkb/xkb.c
+++ b/console-client/xkb/xkb.c
@@ -72,7 +72,7 @@ static group_t latchedgroup;
 static boolctrls bboolctrls;
 
 /* A counter to count how often the modifier was set. This is used
-   when two seperate actions set the same modifier. (example: Left
+   when two separate actions set the same modifier. (example: Left
    Shift and Right Shift.).  */
 modcount_t modsc;
 
@@ -546,7 +546,7 @@ setgroup (keypress_t key, group_t group, int flags)
       else
        /* XXX: Maybe oldgroup should be restored for !groupAbsolute
           too, because wrapgroup might have affected the calculation
-          and substracting will not undo the set operation. However
+          and subtracting will not undo the set operation. However
           this way of handeling relative groups is better because the
           order of releasing keys when multiple relative setgroup keys
           are pressed doesn't matter.  */
@@ -616,7 +616,7 @@ lockcontrols (keypress_t key, boolctrls ctrls, int flags)
   else
     {
       //      clearcontrols (key, boolctrls, flags);
-      /* This unlock behaviour doesnt work and sucks, just like the protocol
+      /* This unlock behaviour doesn't work and sucks, just like the protocol
         specification where it was documented.  */
       //      if (!(flags & noUnlock))
       //       lboolctrls &= ~keystate[key.keycode].bool;
diff --git a/console-client/xkb/xkb.h b/console-client/xkb/xkb.h
index 0769493..e38b5ae 100644
--- a/console-client/xkb/xkb.h
+++ b/console-client/xkb/xkb.h
@@ -413,7 +413,7 @@ error_t ksrm_add (symbol ks, int rmod);
 void ksrm_apply (void);
 
 /* Set the current rmod for the key with keyname KEYNAME.  */
-/* XXX: It shouldn't be applied immediatly because the key can be
+/* XXX: It shouldn't be applied immediately because the key can be
    replaced.  */
 void set_rmod_keycode (char *keyname, int rmod);
 
diff --git a/console-client/xkb/xkbdata.c b/console-client/xkb/xkbdata.c
index 767bf38..a6e2522 100644
--- a/console-client/xkb/xkbdata.c
+++ b/console-client/xkb/xkbdata.c
@@ -14,8 +14,8 @@
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     GNU General Public License for more details.  */
 
-/* Generate a key for the string S.  XXX: The are many more effecient
-   algoritms, this one should be replaced by one of those.  */
+/* Generate a key for the string S.  XXX: There are many more efficient
+   algorithms, this one should be replaced by one of those.  */
 
 #include <stdlib.h>
 #include <string.h>
@@ -442,7 +442,7 @@ ksrm_apply (void)
 /* Keycode to realmodifier mapping.  */
 
 /* Set the current rmod for the key with keyname KEYNAME.  */
-/* XXX: It shouldn't be applied immediatly because the key can be
+/* XXX: It shouldn't be applied immediately because the key can be
    replaced.  */
 void
 set_rmod_keycode (char *keyname, int rmod)
diff --git a/console-client/xkb/xkbtimer.c b/console-client/xkb/xkbtimer.c
index 7621af7..24791e9 100644
--- a/console-client/xkb/xkbtimer.c
+++ b/console-client/xkb/xkbtimer.c
@@ -214,7 +214,7 @@ xkb_input_key (int key)
     }
   else
     {
-      /* Immediatly report the keypress.  */
+      /* Immediately report the keypress.  */
       xkb_handle_key (keyc);
 
       /* Check if this repeat is allowed for this keycode.  */
diff --git a/console/display.c b/console/display.c
index 09add5c..eb420fd 100644
--- a/console/display.c
+++ b/console/display.c
@@ -298,16 +298,18 @@ nowait_file_changed (mach_port_t notify_port, natural_t 
tickno,
 static void
 free_modreqs (struct modreq *mr)
 {
+  error_t err;
   struct modreq *tmp;
   for (; mr; mr = tmp)
     {
       mach_port_t old;
       /* Cancel the dead-name notification.  */
-      mach_port_request_notification (mach_task_self (), mr->port,
-                                     MACH_NOTIFY_DEAD_NAME, 0,
-                                     MACH_PORT_NULL,
-                                     MACH_MSG_TYPE_MAKE_SEND_ONCE, &old);
-      mach_port_deallocate (mach_task_self (), old);
+      err = mach_port_request_notification (mach_task_self (), mr->port,
+                                           MACH_NOTIFY_DEAD_NAME, 0,
+                                           MACH_PORT_NULL,
+                                           MACH_MSG_TYPE_MAKE_SEND_ONCE, &old);
+      if (! err && MACH_PORT_VALID (old))
+       mach_port_deallocate (mach_task_self(), old);
 
       /* Deallocate the user's port.  */
       mach_port_deallocate (mach_task_self (), mr->port);
@@ -438,16 +440,19 @@ do_mach_notify_msg_accepted (struct port_info *pi, 
mach_port_t send)
                                 notify_port->pi.port_right);
       if (err && err != MACH_SEND_WILL_NOTIFY)
        {
+         error_t e;
          mach_port_t old;
          *preq = req->next;
          pthread_mutex_unlock (&display->lock);
 
-         /* Cancel the dead-name notification.  */
-         mach_port_request_notification (mach_task_self (), req->port,
-                                         MACH_NOTIFY_DEAD_NAME, 0,
-                                         MACH_PORT_NULL,
-                                         MACH_MSG_TYPE_MAKE_SEND_ONCE, &old);
-         mach_port_deallocate (mach_task_self (), old);
+         /* Cancel the dead-name notification.  */
+         e = mach_port_request_notification (mach_task_self (), req->port,
+                                             MACH_NOTIFY_DEAD_NAME, 0,
+                                             MACH_PORT_NULL,
+                                             MACH_MSG_TYPE_MAKE_SEND_ONCE,
+                                             &old);
+         if (! e && MACH_PORT_VALID (old))
+           mach_port_deallocate (mach_task_self(), old);
 
          mach_port_deallocate (mach_task_self (), req->port);
          free (req);
@@ -564,13 +569,15 @@ display_notice_filechange (display_t display)
            }
          else
            {
+             error_t e;
              mach_port_t old;
 
              /* Cancel the dead-name notification.  */
-             mach_port_request_notification (mach_task_self (), req->port,
-                                             MACH_NOTIFY_DEAD_NAME, 0,
-                                             MACH_PORT_NULL, 0, &old);
-             mach_port_deallocate (mach_task_self (), old);
+             e = mach_port_request_notification (mach_task_self (), req->port,
+                                                 MACH_NOTIFY_DEAD_NAME, 0,
+                                                 MACH_PORT_NULL, 0, &old);
+             if (! e && MACH_PORT_VALID (old))
+               mach_port_deallocate (mach_task_self(), old);
              mach_port_deallocate (mach_task_self (), req->port);
              free (req);
            }
diff --git a/console/input.c b/console/input.c
index 91f21c1..c6f9974 100644
--- a/console/input.c
+++ b/console/input.c
@@ -82,7 +82,7 @@ void input_destroy (input_t input)
 
 /* Enter DATALEN characters from the buffer DATA into the input queue
    INPUT.  The DATA must be supplied in UTF-8 encoding (XXX UCS-4
-   would be nice, too, but it requires knowledge of endianess).  The
+   would be nice, too, but it requires knowledge of endianness).  The
    function returns the amount of bytes written (might be smaller than
    DATALEN) or -1 and the error number in errno.  If NONBLOCK is not
    zero, return with -1 and set errno to EWOULDBLOCK if operation
diff --git a/console/input.h b/console/input.h
index 47de35e..3f66e1d 100644
--- a/console/input.h
+++ b/console/input.h
@@ -35,7 +35,7 @@ void input_destroy (input_t input);
 
 /* Enter DATALEN characters from the buffer DATA into the input queue
    INPUT.  The DATA must be supplied in UTF-8 encoding (XXX UCS-4
-   would be nice, too, but it requires knowledge of endianess).  The
+   would be nice, too, but it requires knowledge of endianness).  The
    function returns the amount of bytes written (might be smaller than
    DATALEN) or -1 and the error number in errno.  If NONBLOCK is not
    zero, return with -1 and set errno to EWOULDBLOCK if operation
diff --git a/daemons/lmail.c b/daemons/lmail.c
index 23c7b49..963f5dc 100644
--- a/daemons/lmail.c
+++ b/daemons/lmail.c
@@ -354,7 +354,7 @@ deliver (int msg, char *msg_name, char *rcpt, int flags, 
struct params *params)
          fd = open (mbox, O_WRONLY|O_APPEND|O_CREAT|O_EXCL|O_NOLINK|O_EXLOCK,
                     S_IRUSR|S_IWUSR);
          if (fd >= 0)
-           /* Made a new mailbox!  Set the owner and group appropiately.  */
+           /* Made a new mailbox!  Set the owner and group appropriately.  */
            {
              if (fchown (fd, pw->pw_uid, pw->pw_gid) < 0)
                {
diff --git a/defpager/defpager.c b/defpager/defpager.c
index 3a824cf..f97b489 100644
--- a/defpager/defpager.c
+++ b/defpager/defpager.c
@@ -45,8 +45,7 @@ expand_map (struct user_pager_info *p, vm_offset_t addr)
       newsize = page + vm_page_size;
       newmap = realloc (pager->map, size / vm_page_size * sizeof (off_t));
 
-      bzero (pager->map + pager->size / vm_page_size * sizeof (off_t),
-            (newsize - pager->size) / vm_page_size * sizeof (off_t));
+      memset (pager->map + pager->size / vm_page_size * sizeof(off_t), 0, 
(newsize - pager->size) / vm_page_size * sizeof(off_t));
       pager->size = newsize;
       pager->map = newmap;
     }
diff --git a/devnode/Makefile b/devnode/Makefile
index d9a9c23..9529fa7 100644
--- a/devnode/Makefile
+++ b/devnode/Makefile
@@ -24,6 +24,7 @@ HURDLIBS = ports trivfs fshelp shouldbeinlibc
 target = devnode
 MIGSTUBS = deviceServer.o notifyServer.o
 MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h
+device-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name"
 OBJS = $(SRCS:.c=.o) $(MIGSTUBS)
 
 include ../Makeconf
diff --git a/devnode/mig-mutate.h b/devnode/mig-mutate.h
index f692236..0656014 100644
--- a/devnode/mig-mutate.h
+++ b/devnode/mig-mutate.h
@@ -19,6 +19,8 @@
 
 #define NOTIFY_INTRAN                                          \
   port_info_t begin_using_port_info_port (mach_port_t)
+#define NOTIFY_INTRAN_PAYLOAD                                  \
+  port_info_t begin_using_port_info_payload
 #define NOTIFY_DESTRUCTOR                                      \
   end_using_port_info (port_info_t)
 #define NOTIFY_IMPORTS                                         \
diff --git a/eth-filter/mig-decls.h b/eth-filter/mig-decls.h
index 0bb29a6..a3f700c 100644
--- a/eth-filter/mig-decls.h
+++ b/eth-filter/mig-decls.h
@@ -35,6 +35,12 @@ begin_using_device_port (mach_port_t port)
   return ports_lookup_port (port_bucket, port, user_portclass);
 }
 
+static inline struct proxy_user * __attribute__ ((unused))
+begin_using_device_payload (unsigned long payload)
+{
+  return ports_lookup_payload (port_bucket, payload, user_portclass);
+}
+
 static inline void __attribute__ ((unused))
 end_using_device (struct proxy_user *p)
 {
diff --git a/eth-filter/mig-mutate.h b/eth-filter/mig-mutate.h
index 388ce09..5c6cde9 100644
--- a/eth-filter/mig-mutate.h
+++ b/eth-filter/mig-mutate.h
@@ -19,6 +19,8 @@
 
 #define NOTIFY_INTRAN                                          \
   port_info_t begin_using_port_info_port (mach_port_t)
+#define NOTIFY_INTRAN_PAYLOAD                                  \
+  port_info_t begin_using_port_info_payload
 #define NOTIFY_DESTRUCTOR                                      \
   end_using_port_info (port_info_t)
 #define NOTIFY_IMPORTS                                         \
@@ -26,6 +28,8 @@
 
 #define DEVICE_INTRAN                                          \
   proxy_user_t begin_using_device_port (mach_port_t)
+#define DEVICE_INTRAN_PAYLOAD                                  \
+  proxy_user_t begin_using_device_payload
 #define DEVICE_DESTRUCTOR                                      \
   end_using_device (proxy_user_t)
 #define DEVICE_IMPORTS                                         \
diff --git a/eth-multiplexer/Makefile b/eth-multiplexer/Makefile
index fbee1ca..bfd065a 100644
--- a/eth-multiplexer/Makefile
+++ b/eth-multiplexer/Makefile
@@ -23,6 +23,7 @@ target = eth-multiplexer
 SRCS = ethernet.c vdev.c multiplexer.c dev_stat.c netfs_impl.c notify_impl.c 
device_impl.c demuxer.c
 MIGSTUBS = deviceServer.o notifyServer.o
 MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h
+device-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name"
 OBJS = $(SRCS:.c=.o) $(MIGSTUBS)
 LCLHDRS = ethernet.h util.h vdev.h netfs_impl.h
 HURDLIBS=ports fshelp shouldbeinlibc netfs bpf
diff --git a/eth-multiplexer/mig-decls.h b/eth-multiplexer/mig-decls.h
index a68e2ec..6ad9ebf 100644
--- a/eth-multiplexer/mig-decls.h
+++ b/eth-multiplexer/mig-decls.h
@@ -35,6 +35,12 @@ begin_using_device_port (mach_port_t port)
   return ports_lookup_port (port_bucket, port, vdev_portclass);
 }
 
+static inline struct vether_device * __attribute__ ((unused))
+begin_using_device_payload (unsigned long payload)
+{
+  return ports_lookup_payload (port_bucket, payload, vdev_portclass);
+}
+
 static inline void __attribute__ ((unused))
 end_using_device (struct vether_device *p)
 {
diff --git a/eth-multiplexer/mig-mutate.h b/eth-multiplexer/mig-mutate.h
index 2403c29..55eca31 100644
--- a/eth-multiplexer/mig-mutate.h
+++ b/eth-multiplexer/mig-mutate.h
@@ -19,6 +19,8 @@
 
 #define NOTIFY_INTRAN                                          \
   port_info_t begin_using_port_info_port (mach_port_t)
+#define NOTIFY_INTRAN_PAYLOAD                                  \
+  port_info_t begin_using_port_info_payload
 #define NOTIFY_DESTRUCTOR                                      \
   end_using_port_info (port_info_t)
 #define NOTIFY_IMPORTS                                         \
@@ -26,6 +28,8 @@
 
 #define DEVICE_INTRAN                                          \
   vether_device_t begin_using_device_port (mach_port_t)
+#define DEVICE_INTRAN_PAYLOAD                                  \
+  vether_device_t begin_using_device_payload
 #define DEVICE_DESTRUCTOR                                      \
   end_using_device (vether_device_t)
 #define DEVICE_IMPORTS                                         \
diff --git a/exec/exec.c b/exec/exec.c
index 0ecf2d3..bbe0244 100644
--- a/exec/exec.c
+++ b/exec/exec.c
@@ -47,13 +47,6 @@ pthread_rwlock_t std_lock = PTHREAD_RWLOCK_INITIALIZER;
 
 #include <hurd/sigpreempt.h>
 
-static error_t
-safe_bzero (void *ptr, size_t size)
-{
-  return hurd_safe_memset (ptr, 0, size);
-}
-
-
 /* Load or allocate a section.  */
 static void
 load_section (void *section, struct execdata *u)
@@ -328,7 +321,9 @@ load_section (void *section, struct execdata *u)
              vm_deallocate (u->task, mapstart, memsz);
              return;
            }
-         u->error = safe_bzero ((void *) (ourpage + (addr - overlap_page)),
+         u->error = hurd_safe_memset (
+                                (void *) (ourpage + (addr - overlap_page)),
+                                0,
                                 size - (addr - overlap_page));
          if (! u->error && !(vm_prot & VM_PROT_WRITE))
            u->error = vm_protect (u->task, overlap_page, size,
@@ -887,7 +882,7 @@ do_exec (file_t file,
        pthread_rwlock_unlock (&std_lock);
        goto out;
       }
-    bzero (&boot->pi + 1, (char *) &boot[1] - (char *) (&boot->pi + 1));
+    memset (&boot->pi + 1, 0, (char *) &boot[1] - (char *) (&boot->pi + 1));
 
     /* These flags say the information we pass through to the new program
        may need to be modified.  */
@@ -960,7 +955,7 @@ do_exec (file_t file,
     /* Keep track of which ports in BOOT->portarray come from the original
        PORTARRAY, and which we replace.  */
     ports_replaced = alloca (boot->nports * sizeof *ports_replaced);
-    bzero (ports_replaced, boot->nports * sizeof *ports_replaced);
+    memset (ports_replaced, 0, boot->nports * sizeof *ports_replaced);
 
     if (portarray[INIT_PORT_BOOTSTRAP] == MACH_PORT_NULL &&
        oldtask != MACH_PORT_NULL)
@@ -1326,7 +1321,8 @@ do_exec (file_t file,
        /* Kill the pointers to the argument information so the cleanup
           of BOOT doesn't deallocate it.  It will be deallocated my MiG
           when we return the error.  */
-       bzero (&boot->pi + 1, (char *) &boot[1] - (char *) (&boot->pi + 1));
+       memset (&boot->pi + 1, 0,
+               (char *) &boot[1] - (char *) (&boot->pi + 1));
       else
        /* Do this before we release the last reference.  */
        if (boot->nports > INIT_PORT_PROC)
diff --git a/ext2fs/ext2fs.c b/ext2fs/ext2fs.c
index 128b6ed..beb7cad 100644
--- a/ext2fs/ext2fs.c
+++ b/ext2fs/ext2fs.c
@@ -106,7 +106,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
       if (values == 0)
        return ENOMEM;
       state->hook = values;
-      bzero (values, sizeof *values);
+      memset (values, 0, sizeof *values);
       values->sb_block = SBLOCK_BLOCK;
       break;
 
diff --git a/ext2fs/getblk.c b/ext2fs/getblk.c
index bde66e1..d7ddb6a 100644
--- a/ext2fs/getblk.c
+++ b/ext2fs/getblk.c
@@ -105,7 +105,7 @@ ext2_alloc_block (struct node *node, block_t goal, int zero)
   if (result && zero)
     {
       char *bh = disk_cache_block_ref (result);
-      bzero (bh, block_size);
+      memset (bh, 0, block_size);
       record_indir_poke (node, bh);
     }
 
diff --git a/ext2fs/inode.c b/ext2fs/inode.c
index ed78265..6b8b749 100644
--- a/ext2fs/inode.c
+++ b/ext2fs/inode.c
@@ -39,7 +39,7 @@
 #define UF_IMMUTABLE 0
 #endif
 
-#define        INOHSZ  512
+#define        INOHSZ  8192
 #if    ((INOHSZ&(INOHSZ-1)) == 0)
 #define        INOHASH(ino)    ((ino)&(INOHSZ-1))
 #else
@@ -733,7 +733,7 @@ diskfs_set_translator (struct node *np, const char *name, 
unsigned namelen,
 
       buf[0] = namelen & 0xFF;
       buf[1] = (namelen >> 8) & 0xFF;
-      bcopy (name, buf + 2, namelen);
+      memcpy (buf + 2, name, namelen);
 
       blkptr = disk_cache_block_ref (blkno);
       memcpy (blkptr, buf, block_size);
@@ -805,7 +805,7 @@ write_symlink (struct node *node, const char *target)
 
   assert (node->dn_stat.st_blocks == 0);
 
-  bcopy (target, node->dn->info.i_data, len);
+  memcpy (node->dn->info.i_data, target, len);
   node->dn_stat.st_size = len - 1;
   node->dn_set_ctime = 1;
   node->dn_set_mtime = 1;
@@ -822,7 +822,7 @@ read_symlink (struct node *node, char *target)
 
   assert (node->dn_stat.st_size < MAX_INODE_SYMLINK);
 
-  bcopy (node->dn->info.i_data, target, node->dn_stat.st_size);
+  memcpy (target, node->dn->info.i_data, node->dn_stat.st_size);
   return 0;
 }
 
diff --git a/ext2fs/pager.c b/ext2fs/pager.c
index 298dae7..a6c4fbb 100644
--- a/ext2fs/pager.c
+++ b/ext2fs/pager.c
@@ -209,7 +209,7 @@ file_pager_read_page (struct node *node, vm_offset_t page,
              else
                /* We've already got some buffer, so copy into it.  */
                {
-                 bcopy (new_buf, *buf + offs, new_len);
+                 memcpy (*buf + offs, new_buf, new_len);
                  free_page_buf (new_buf); /* Return NEW_BUF to our pool.  */
                  STAT_INC (file_pagein_freed_bufs);
                }
@@ -265,7 +265,7 @@ file_pager_read_page (struct node *node, vm_offset_t page,
                break;
              STAT_INC (file_pagein_alloced_bufs);
            }
-         bzero (*buf + offs, block_size);
+         memset (*buf + offs, 0, block_size);
          offs += block_size;
        }
       else
@@ -316,7 +316,7 @@ pending_blocks_write (struct pending_blocks *pb)
        /* Put what we're going to write into a page-aligned buffer.  */
        {
          void *page_buf = get_page_buf ();
-         bcopy (pb->buf + pb->offs, (void *)page_buf, length);
+         memcpy ((void *)page_buf, pb->buf + pb->offs, length);
          err = store_write (store, dev_block, page_buf, length, &amount);
          free_page_buf (page_buf);
        }
@@ -446,7 +446,7 @@ disk_pager_read_page (vm_offset_t page, void **buf, int 
*writelock)
   if (read != length)
     return EIO;
   if (!err && length != vm_page_size)
-    bzero ((void *)(*buf + length), vm_page_size - length);
+    memset ((void *)(*buf + length), 0, vm_page_size - length);
 
   *writelock = 0;
 
diff --git a/fatfs/fat.h b/fatfs/fat.h
index 58b45c6..eac7015 100644
--- a/fatfs/fat.h
+++ b/fatfs/fat.h
@@ -32,7 +32,7 @@
    Reserved
 
      The reserved region consists of the boot sector, and with it the
-     BIOS Paramter Block, which contains all necessary data about the
+     BIOS Parameter Block, which contains all necessary data about the
      filesystem like sector size, number of clusters etc. It also
      holds the filesystem info block.
 
diff --git a/fatfs/pager.c b/fatfs/pager.c
index 0c59084..10d1fc9 100644
--- a/fatfs/pager.c
+++ b/fatfs/pager.c
@@ -152,7 +152,7 @@ root_dir_pager_read_page (vm_offset_t page, void **buf, int 
*writelock)
   pthread_rwlock_unlock (&diskfs_root_node->dn->alloc_lock);
 
   if (overrun)
-    bzero ((void *) *buf + vm_page_size - overrun, overrun);
+    memset ((void *)*buf + vm_page_size - overrun, 0, overrun);
 
   return err;
 }
diff --git a/ftpfs/dir.c b/ftpfs/dir.c
index a9fea22..be20b3d 100644
--- a/ftpfs/dir.c
+++ b/ftpfs/dir.c
@@ -64,7 +64,7 @@ rehash (struct ftpfs_dir *dir, size_t new_len)
   if (! new_htable)
     return ENOMEM;
 
-  bzero (new_htable, new_len * sizeof (struct ftpfs_dir_entry *));
+  memset (new_htable, 0, new_len * sizeof(struct ftpfs_dir_entry *));
 
   for (i = 0; i < old_len; i++)
     while (old_htable[i])
@@ -124,7 +124,7 @@ lookup (struct ftpfs_dir *dir, const char *name, int add)
          e->node = 0;
          e->dir = dir;
          e->stat_timestamp = 0;
-         bzero (&e->stat, sizeof e->stat);
+         memset (&e->stat, 0, sizeof e->stat);
          e->symlink_target = 0;
          e->noent = 0;
          e->valid = 0;
diff --git a/ftpfs/netfs.c b/ftpfs/netfs.c
index 5359acb..cf5d907 100644
--- a/ftpfs/netfs.c
+++ b/ftpfs/netfs.c
@@ -385,7 +385,7 @@ error_t
 netfs_attempt_statfs (struct iouser *cred, struct node *node,
                      struct statfs *st)
 {
-  bzero (st, sizeof *st);
+  memset (st, 0, sizeof *st);
   st->f_type = FSTYPE_FTP;
   st->f_fsid = getpid ();
   return 0;
diff --git a/hurd/console.h b/hurd/console.h
index baf0394..05177eb 100644
--- a/hurd/console.h
+++ b/hurd/console.h
@@ -90,7 +90,7 @@ struct cons_display
 {
 #define CONS_MAGIC 0x48555244  /* Hex for "HURD".  */
   uint32_t magic;              /* CONS_MAGIC, use to detect
-                                  endianess.  */
+                                  endianness.  */
 #define CONS_VERSION_MAJ 0x0
 #define CONS_VERSION_MAJ_SHIFT 16
 #define CONS_VERSION_AGE 0x0
diff --git a/hurd/hurd_types.defs b/hurd/hurd_types.defs
index 57af6dc..5fa59f3 100644
--- a/hurd/hurd_types.defs
+++ b/hurd/hurd_types.defs
@@ -18,6 +18,7 @@ along with the GNU Hurd; see the file COPYING.  If not, write 
to
 the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 
+#ifdef HURD_SERVER
 /* The Hurd uses protected payloads to quickly look up the object
    receiving a message.  Looking up objects is optimized at the cost
    of having to translate payloads back to port names if the server
@@ -42,7 +43,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 
02139, USA.  */
 #undef HURD_DEFAULT_PAYLOAD_TO_PORT
 #endif
 #else
-   import <hurd/ports.h>;
+  import <hurd/ports.h>;
 #define HURD_DEFAULT_PAYLOAD_TO_PORT ports_payload_get_name
 #endif
 
@@ -52,6 +53,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 
02139, USA.  */
 #ifdef HURD_DEFAULT_PAYLOAD_TO_PORT
 #define MACH_PAYLOAD_TO_PORT   HURD_DEFAULT_PAYLOAD_TO_PORT
 #endif
+#endif /* HURD_SERVER */
 
 #include <mach/std_types.defs>
 #include <mach/mach_types.defs>
diff --git a/hurd/io.defs b/hurd/io.defs
index ba0b807..5bc399e 100644
--- a/hurd/io.defs
+++ b/hurd/io.defs
@@ -259,7 +259,7 @@ routine io_eofnotify (
        io_object: io_t RPTLAST);
 
 /* If the user wants to write past the prenotify size, a call needs to
-   be made to io_prenotify giving the paramters of the write.  Upon
+   be made to io_prenotify giving the parameters of the write.  Upon
    return from io_prenotify, there is no guarantee that the prenotify
    size will now permit the write, so it should be re-checked.  The
    routine should be called while the user has the conch.  The user
diff --git a/hurd/process.defs b/hurd/process.defs
index 498faba..4ceb69e 100644
--- a/hurd/process.defs
+++ b/hurd/process.defs
@@ -1,5 +1,5 @@
 /* Definitions for process server interface
-   Copyright (C) 1992,93,94,95,96,97,2001,2013 Free Software Foundation
+   Copyright (C) 1992,93,94,95,96,97,2001,13,14 Free Software Foundation
 
 This file is part of the GNU Hurd.
 
@@ -404,3 +404,12 @@ routine proc_get_code (
        process: process_t;
        out start_code: vm_address_t;
        out end_code: vm_address_t);
+
+/* Create a new task namespace.  PROCESS claims the responsibility to
+   manage all tasks in this namespace.  Any task created in this
+   namespace will automatically be declared a child of PROCESS, and a
+   `mach_notify_new_task' message is sent to NOTIFY.  If PROCESS dies,
+   the proc server will terminate all tasks in the namespace.  */
+routine proc_make_task_namespace (
+       process: process_t;
+       notify: mach_port_send_t);
diff --git a/isofs/inode.c b/isofs/inode.c
index cdc05ae..247d8ac 100644
--- a/isofs/inode.c
+++ b/isofs/inode.c
@@ -599,7 +599,7 @@ diskfs_set_statfs (struct statfs *st)
 {
   /* There is no easy way to determine the number of files on an
      ISO 9660 filesystem.  */
-  bzero (st, sizeof *st);
+  memset (st, 0, sizeof *st);
   st->f_type = FSTYPE_ISO9660;
   st->f_bsize = logical_block_size;
   st->f_blocks = isonum_733 (sblock->vol_sp_size);
diff --git a/isofs/lookup.c b/isofs/lookup.c
index b5b814d..e51b9cb 100644
--- a/isofs/lookup.c
+++ b/isofs/lookup.c
@@ -338,7 +338,7 @@ diskfs_get_directs (struct node *dp,
                           (ouralloc
                            ? (allocsize *= 2)
                            : (allocsize = vm_page_size * 2)), 1);
-             bcopy ((void *) *data, (void *)newdata, datap - *data);
+             memcpy ((void *) newdata, (void *) *data, datap - *data);
 
              if (ouralloc)
                munmap (*data, allocsize / 2);
@@ -374,7 +374,7 @@ diskfs_get_directs (struct node *dp,
          userp->d_type = DT_UNKNOWN;
          userp->d_reclen = reclen;
          userp->d_namlen = namlen;
-         bcopy (name, userp->d_name, namlen);
+         memcpy (userp->d_name, name, namlen);
          userp->d_name[namlen] = '\0';
 
          /* And move along */
diff --git a/isofs/main.c b/isofs/main.c
index 5d002af..4f531f7 100644
--- a/isofs/main.c
+++ b/isofs/main.c
@@ -101,7 +101,7 @@ read_sblock ()
   sblock = malloc (sizeof (struct sblock));
   if (!sblock)
     error (1, errno, "Could not allocate memory for superblock");
-  bcopy (sb, sblock, sizeof (struct sblock));
+  memcpy (sblock, sb, sizeof (struct sblock));
   diskfs_end_catch_exception ();
 
   /* Parse some important bits of this */
diff --git a/isofs/pager.c b/isofs/pager.c
index d72a514..35de37e 100644
--- a/isofs/pager.c
+++ b/isofs/pager.c
@@ -75,7 +75,7 @@ pager_read_page (struct user_pager_info *upi,
     return EIO;
 
   if (overrun)
-    bzero ((void *) *buf + vm_page_size - overrun, overrun);
+    memset ((void *)*buf + vm_page_size - overrun, 0, overrun);
     
   return 0;
 }
diff --git a/isofs/rr.c b/isofs/rr.c
index be4395d..adc95c3 100644
--- a/isofs/rr.c
+++ b/isofs/rr.c
@@ -282,7 +282,7 @@ rrip_work (struct dirrect *dr, struct rrip_lookup *rr,
            nmbuf = realloc (nmbuf, (nmbufsize += nmlen) + 1);
          assert (nmbuf);
 
-         bcopy (nm->name, nmbuf + nmbufsize - nmlen, nmlen);
+         memcpy (nmbuf + nmbufsize - nmlen, nm->name, nmlen);
 
          if (nm->flags & NAME_CONTINUE)
            goto next_field;
@@ -375,7 +375,7 @@ rrip_work (struct dirrect *dr, struct rrip_lookup *rr,
                rr->target = realloc (rr->target, targalloced *= 2);
              assert (rr->target);
 
-             bcopy (cname, rr->target + targused, cnamelen);
+             memcpy (rr->target + targused, cname, cnamelen);
              targused += cnamelen;
            }
 
@@ -391,7 +391,7 @@ rrip_work (struct dirrect *dr, struct rrip_lookup *rr,
            slbuf = realloc (slbuf, slbufsize += crlen);
          assert (slbuf);
 
-         bcopy (sl->data, slbuf + slbufsize - crlen, crlen);
+         memcpy (slbuf + slbufsize - crlen, sl->data, crlen);
 
          if (sl->flags & 1)
            /* We'll finish later. */
diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
index cfe2303..9be8ed2 100644
--- a/libdiskfs/boot-start.c
+++ b/libdiskfs/boot-start.c
@@ -61,6 +61,7 @@ get_console ()
     return MACH_PORT_NULL;
 
   err = device_open (device_master, D_WRITE | D_READ, "console", &console);
+  mach_port_deallocate (mach_task_self (), device_master);
   if (err)
     return MACH_PORT_NULL;
 
diff --git a/libdiskfs/dir-lookup.c b/libdiskfs/dir-lookup.c
index e228745..f3364cd 100644
--- a/libdiskfs/dir-lookup.c
+++ b/libdiskfs/dir-lookup.c
@@ -327,7 +327,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
                      translator_path[end - path_start] = '\0';
                    }
 
-                 if (dircred->po->path == NULL)
+                 if (dircred->po->path == NULL || !strcmp 
(dircred->po->path,"."))
                      /* dircred is the root directory.  */
                      complete_path = translator_path;
                  else
@@ -528,7 +528,7 @@ diskfs_S_dir_lookup (struct protid *dircred,
   if (! error)
     {
       free (newpi->po->path);
-      if (dircred->po->path == NULL)
+      if (dircred->po->path == NULL || !strcmp (dircred->po->path,"."))
        {
          /* dircred is the root directory.  */
          newpi->po->path = relpath;
diff --git a/libdiskfs/file-get-trans.c b/libdiskfs/file-get-trans.c
index db5bbda..e6e994d 100644
--- a/libdiskfs/file-get-trans.c
+++ b/libdiskfs/file-get-trans.c
@@ -45,7 +45,7 @@ diskfs_S_file_get_translator (struct protid *cred,
       assert (diskfs_shortcut_symlink);
       if (len > *translen)
        *trans = mmap (0, len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
-      bcopy (_HURD_SYMLINK, *trans, sizeof _HURD_SYMLINK);
+      memcpy (*trans, _HURD_SYMLINK, sizeof _HURD_SYMLINK);
 
       if (diskfs_read_symlink_hook)
        err = (*diskfs_read_symlink_hook) (np,
@@ -85,7 +85,7 @@ diskfs_S_file_get_translator (struct protid *cred,
 
       if (buflen > *translen)
        *trans = mmap (0, buflen, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
-      bcopy (buf, *trans, buflen);
+      memcpy (*trans, buf, buflen);
       free (buf);
       *translen = buflen;
       err = 0;
@@ -97,7 +97,7 @@ diskfs_S_file_get_translator (struct protid *cred,
       len = sizeof _HURD_FIFO;
       if (len > *translen)
        *trans = mmap (0, len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
-      bcopy (_HURD_FIFO, *trans, sizeof _HURD_FIFO);
+      memcpy (*trans, _HURD_FIFO, sizeof _HURD_FIFO);
       *translen = len;
       err = 0;
     }
@@ -108,7 +108,7 @@ diskfs_S_file_get_translator (struct protid *cred,
       len = sizeof _HURD_IFSOCK;
       if (len > *translen)
        *trans = mmap (0, len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
-      bcopy (_HURD_IFSOCK, *trans, sizeof _HURD_IFSOCK);
+      memcpy (*trans, _HURD_IFSOCK, sizeof _HURD_IFSOCK);
       *translen = len;
       err = 0;
     }
@@ -125,7 +125,7 @@ diskfs_S_file_get_translator (struct protid *cred,
            {
              if (len > *translen)
                *trans = mmap (0, len, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
-             bcopy (string, *trans, len);
+             memcpy (*trans, string, len);
              *translen = len;
              free (string);
            }
diff --git a/libdiskfs/file-getfh.c b/libdiskfs/file-getfh.c
index 035705b..e4bc892 100644
--- a/libdiskfs/file-getfh.c
+++ b/libdiskfs/file-getfh.c
@@ -50,7 +50,7 @@ diskfs_S_file_getfh (struct protid *cred, char **fh, size_t 
*fh_len)
 
   f = (union diskfs_fhandle *) *fh;
 
-  bzero (f, sizeof *f);
+  memset (f, 0, sizeof *f);
   f->data.cache_id = node->cache_id;
   f->data.gen = node->dn_stat.st_gen;
 
diff --git a/libdiskfs/file-statfs.c b/libdiskfs/file-statfs.c
index 9d97ce6..c9fd6f1 100644
--- a/libdiskfs/file-statfs.c
+++ b/libdiskfs/file-statfs.c
@@ -31,7 +31,7 @@ diskfs_S_file_statfs (struct protid *file,
 
   /* Start will all zeros, so the fs can skip fields for which
      it has no information to contribute.  */
-  bzero (statbuf, sizeof *statbuf);
+  memset (statbuf, 0, sizeof *statbuf);
 
   if (diskfs_readonly)
     statbuf->f_flag |= ST_RDONLY;
diff --git a/libfshelp/fetch-root.c b/libfshelp/fetch-root.c
index 45c7dd0..712c11f 100644
--- a/libfshelp/fetch-root.c
+++ b/libfshelp/fetch-root.c
@@ -121,9 +121,9 @@ fshelp_fetch_root (struct transbox *box, void *cookie,
            goto return_error;
        }
 
-      bzero (ports, INIT_PORT_MAX * sizeof (mach_port_t));
-      bzero (fds, (STDERR_FILENO + 1) * sizeof (mach_port_t));
-      bzero (ints, INIT_INT_MAX * sizeof (int));
+      memset (ports, 0, INIT_PORT_MAX * sizeof (mach_port_t));
+      memset (fds, 0, (STDERR_FILENO + 1) * sizeof (mach_port_t));
+      memset (ints, 0, INIT_INT_MAX * sizeof (int));
 
       ports[INIT_PORT_CWDIR] = dotdot;
       ports[INIT_PORT_CRDIR] = reauth (getcrdir ());
diff --git a/libfshelp/start-translator-long.c 
b/libfshelp/start-translator-long.c
index 64a20be..8b00e08 100644
--- a/libfshelp/start-translator-long.c
+++ b/libfshelp/start-translator-long.c
@@ -232,7 +232,7 @@ fshelp_start_translator_long (fshelp_open_fn_t 
underlying_open_fn,
   err = task_priority(task, 25, FALSE);
 
   if (err)
-    goto lose;
+    goto lose_task;
 
   /* Designate TASK as our child and set it's owner accordingly. */
   proc = getproc ();
@@ -240,11 +240,11 @@ fshelp_start_translator_long (fshelp_open_fn_t 
underlying_open_fn,
   err = proc_task2proc (proc, task, &childproc);
   mach_port_deallocate (mach_task_self (), proc);
   if (err)
-    goto lose;
+    goto lose_task;
   err = proc_setowner (childproc, owner_uid, owner_uid == (uid_t) -1);
   mach_port_deallocate (mach_task_self (), childproc);
   if (err)
-    goto lose;
+    goto lose_task;
 
   assert (ports_len > INIT_PORT_BOOTSTRAP);
   switch (ports_type)
diff --git a/libfshelp/start-translator.c b/libfshelp/start-translator.c
index ba5418e..7f0ae70 100644
--- a/libfshelp/start-translator.c
+++ b/libfshelp/start-translator.c
@@ -38,7 +38,7 @@ fshelp_start_translator (fshelp_open_fn_t underlying_open_fn,
     ports[i] = MACH_PORT_NULL;
   for (i = 0; i < STDERR_FILENO + 1; i++)
     fds[i] = MACH_PORT_NULL;
-  bzero (ints, INIT_INT_MAX * sizeof (int));
+  memset (ints, 0, INIT_INT_MAX * sizeof(int));
 
   ports[INIT_PORT_CWDIR] = getcwdir ();
   ports[INIT_PORT_CRDIR] = getcrdir ();
diff --git a/libftpconn/create.c b/libftpconn/create.c
index 20a6456..0ffdb49 100644
--- a/libftpconn/create.c
+++ b/libftpconn/create.c
@@ -54,7 +54,7 @@ ftp_conn_create (const struct ftp_conn_params *params,
   new->actv_data_addr = 0;
   new->cwd = 0;
   new->type = 0;
-  bzero (&new->syshooks, sizeof new->syshooks);
+  memset (&new->syshooks, 0, sizeof new->syshooks);
 
   if (new->hooks && new->hooks->init)
     err = (*new->hooks->init) (new);
diff --git a/libftpconn/open.c b/libftpconn/open.c
index f52bf4d..f1a1b85 100644
--- a/libftpconn/open.c
+++ b/libftpconn/open.c
@@ -189,7 +189,7 @@ ftp_conn_open (struct ftp_conn *conn)
       close (conn->control);
       conn->control = -1;
     }
-  bzero (&conn->syshooks, sizeof conn->syshooks);
+  memset (&conn->syshooks, 0, sizeof conn->syshooks);
 
   csock = socket (PF_INET, SOCK_STREAM, 0);
   if (csock < 0)
diff --git a/libftpconn/unix.c b/libftpconn/unix.c
index 28efefd..882fee8 100644
--- a/libftpconn/unix.c
+++ b/libftpconn/unix.c
@@ -305,7 +305,7 @@ drwxrwxrwt   7 34       archive       512 May  1 14:28 /tmp
   if (strncasecmp (p, "total ", 6) == 0)
     return EAGAIN;
 
-  bzero (stat, sizeof *stat);
+  memset (stat, 0, sizeof *stat);
 
 #ifdef FSTYPE_FTP
   stat->st_fstype = FSTYPE_FTP;
@@ -471,7 +471,7 @@ drwxrwxrwt   7 34       archive       512 May  1 14:28 /tmp
   /* Date.  Ick.  */
   /* Formats:  MONTH DAY HH:MM and MONTH DAY  YEAR  */
 
-  bzero (&tm, sizeof tm);
+  memset (&tm, 0, sizeof tm);
 
   SKIP_WS ();
   e = p + strcspn (p, " \t\n");
diff --git a/libiohelp/return-buffer.c b/libiohelp/return-buffer.c
index e186698..1beb4ae 100644
--- a/libiohelp/return-buffer.c
+++ b/libiohelp/return-buffer.c
@@ -44,7 +44,7 @@ iohelp_return_malloced_buffer (char *buf, size_t len,
   if (! err)
     {
       if (len)
-       bcopy (buf, *rbuf, len);
+       memcpy (*rbuf, buf, len);
       *rlen = len;
     }
 
diff --git a/libmachdev/Makefile b/libmachdev/Makefile
index 345c004..7116c3e 100644
--- a/libmachdev/Makefile
+++ b/libmachdev/Makefile
@@ -20,14 +20,16 @@ makemode := library
 libname = libmachdev
 
 SRCS = deviceUser.c machUser.c net.c ds_routines.c queue.c trivfs_server.c \
-       device_replyUser.c deviceServer.c notifyServer.c misc.c block.c
+       device_replyUser.c deviceServer.c notifyServer.c misc.c
+#block.c
 LCLHDRS = dev_hdr.h device_emul.h ds_routines.h vm_param.h \
          util.h queue.h io_req.h if_ether.h machdev.h linux-errno.h \
          errno-base.h
 installhdrs = machdev.h
-HURDLIBS = ports trivfs ddekit bpf
+HURDLIBS = ports trivfs bpf
 OTHERLIBS = -lpthread
 OBJS = $(SRCS:.c=.o) $(MIGSTUBS)
 MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h
+device-MIGSFLAGS="-DMACH_PAYLOAD_TO_PORT=ports_payload_get_name"
 
 include ../Makeconf
diff --git a/libmachdev/block.c b/libmachdev/block.c
index cd868d2..7996207 100644
--- a/libmachdev/block.c
+++ b/libmachdev/block.c
@@ -65,7 +65,7 @@ dev_to_port (void *nd)
          : MACH_PORT_NULL);
 }
 
-extern struct device_emulation_ops linux_block_emulation_ops;
+static struct device_emulation_ops linux_block_emulation_ops;
 
 #define DISK_NAME_LEN 32
 
@@ -286,7 +286,7 @@ device_get_status (void *d, dev_flavor_t flavor, 
dev_status_t status,
   return D_SUCCESS;
 }
 
-struct device_emulation_ops linux_block_emulation_ops =
+static struct device_emulation_ops linux_block_emulation_ops =
 {
   NULL,
   NULL,
diff --git a/libmachdev/mig-decls.h b/libmachdev/mig-decls.h
index b3dc43d..8302029 100644
--- a/libmachdev/mig-decls.h
+++ b/libmachdev/mig-decls.h
@@ -34,6 +34,12 @@ begin_using_device_port (mach_port_t port)
   return ports_lookup_port (device_bucket, port, dev_class);
 }
 
+static inline struct mach_device * __attribute__ ((unused))
+begin_using_device_payload (unsigned long payload)
+{
+  return ports_lookup_payload (device_bucket, payload, dev_class);
+}
+
 static inline void __attribute__ ((unused))
 end_using_device (struct mach_device *p)
 {
diff --git a/libmachdev/mig-mutate.h b/libmachdev/mig-mutate.h
index 56c6965..902ff16 100644
--- a/libmachdev/mig-mutate.h
+++ b/libmachdev/mig-mutate.h
@@ -19,6 +19,8 @@
 
 #define NOTIFY_INTRAN                                          \
   port_info_t begin_using_port_info_port (mach_port_t)
+#define NOTIFY_INTRAN_PAYLOAD                                  \
+  port_info_t begin_using_port_info_payload
 #define NOTIFY_DESTRUCTOR                                      \
   end_using_port_info (port_info_t)
 #define NOTIFY_IMPORTS                                         \
@@ -26,6 +28,8 @@
 
 #define DEVICE_INTRAN                                          \
   mach_device_t begin_using_device_port (mach_port_t)
+#define DEVICE_INTRAN_PAYLOAD                                  \
+  mach_device_t begin_using_device_payload
 #define DEVICE_DESTRUCTOR                                      \
   end_using_device (mach_device_t)
 #define DEVICE_IMPORTS                                         \
diff --git a/libnetfs/dir-lookup.c b/libnetfs/dir-lookup.c
index 77cbbbd..7ca526b 100644
--- a/libnetfs/dir-lookup.c
+++ b/libnetfs/dir-lookup.c
@@ -310,7 +310,7 @@ netfs_S_dir_lookup (struct protid *diruser,
                      translator_path[end - filename_start] = '\0';
                    }
 
-                 if (diruser->po->path == NULL)
+                 if (diruser->po->path == NULL || !strcmp 
(diruser->po->path,"."))
                      /* diruser is the root directory.  */
                      complete_path = translator_path;
                  else
@@ -444,7 +444,7 @@ netfs_S_dir_lookup (struct protid *diruser,
     }
 
   free (newpi->po->path);
-  if (diruser->po->path == NULL)
+  if (diruser->po->path == NULL || !strcmp (diruser->po->path,"."))
     {
       /* diruser is the root directory.  */
       newpi->po->path = relpath;
diff --git a/libpager/Makefile b/libpager/Makefile
index a15a899..72b4bfd 100644
--- a/libpager/Makefile
+++ b/libpager/Makefile
@@ -20,18 +20,18 @@ makemode := library
 libname = libpager
 SRCS = data-request.c data-return.c data-unlock.c pager-port.c \
        inhibit-term.c lock-completed.c lock-object.c mark-error.c \
-       no-senders.c object-init.c object-terminate.c pagemap.c \
+       object-init.c object-terminate.c pagemap.c \
        pager-create.c pager-flush.c pager-shutdown.c pager-sync.c \
        stubs.c demuxer.c chg-compl.c pager-attr.c clean.c \
-       dropweak.c notify-stubs.c get-upi.c pager-memcpy.c pager-return.c \
+       dropweak.c get-upi.c pager-memcpy.c pager-return.c \
        offer-page.c
 installhdrs = pager.h
 
 HURDLIBS= ports
 LDLIBS += -lpthread
-OBJS = $(SRCS:.c=.o) memory_objectServer.o notifyServer.o
+OBJS = $(SRCS:.c=.o) memory_objectServer.o
 
-MIGSFLAGS = -DSEQNOS -imacros $(srcdir)/mig-mutate.h
+MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h
 MIGCOMSFLAGS = -prefix _pager_
 
 include ../Makeconf
diff --git a/libpager/chg-compl.c b/libpager/chg-compl.c
index 89ccfc8..3ffe60a 100644
--- a/libpager/chg-compl.c
+++ b/libpager/chg-compl.c
@@ -22,8 +22,7 @@
    when a memory_object_change_attributes call has completed.  Read this
    in combination with pager-attr.c.  */
 kern_return_t
-_pager_seqnos_memory_object_change_completed (struct pager *p,
-                                      mach_port_seqno_t seq,
+_pager_S_memory_object_change_completed (struct pager *p,
                                       boolean_t maycache,
                                       memory_object_copy_strategy_t strat)
 {
diff --git a/libpager/data-request.c b/libpager/data-request.c
index 18f3de6..7069fc8 100644
--- a/libpager/data-request.c
+++ b/libpager/data-request.c
@@ -22,8 +22,7 @@
 
 /* Implement pagein callback as described in <mach/memory_object.defs>. */
 kern_return_t
-_pager_seqnos_memory_object_data_request (struct pager *p,
-                                         mach_port_seqno_t seqno,
+_pager_S_memory_object_data_request (struct pager *p,
                                          mach_port_t control,
                                          vm_offset_t offset,
                                          vm_size_t length,
diff --git a/libpager/data-return.c b/libpager/data-return.c
index f16f323..01f3db2 100644
--- a/libpager/data-return.c
+++ b/libpager/data-return.c
@@ -21,13 +21,12 @@
 #include <string.h>
 #include <assert.h>
 
-/* Worker function used by _pager_seqnos_memory_object_data_return
-   and _pager_seqnos_memory_object_data_initialize.  All args are
-   as for _pager_seqnos_memory_object_data_return; the additional
+/* Worker function used by _pager_S_memory_object_data_return
+   and _pager_S_memory_object_data_initialize.  All args are
+   as for _pager_S_memory_object_data_return; the additional
    INITIALIZING arg identifies which function is calling us. */
 kern_return_t
 _pager_do_write_request (struct pager *p,
-                        mach_port_seqno_t seqno,
                         mach_port_t control,
                         vm_offset_t offset,
                         pointer_t data,
@@ -113,6 +112,7 @@ _pager_do_write_request (struct pager *p,
      than we really have to require (because *all* future writes on
      this object are going to wait for seqno while we wait for the
      previous write), but the case is relatively infrequent.  */
+  /* XXX: Is this still needed?  */
  retry:
   for (i = 0; i < npages; i++)
     if (pm_entries[i] & PM_PAGINGOUT)
@@ -254,8 +254,7 @@ _pager_do_write_request (struct pager *p,
 
 /* Implement pageout call back as described by <mach/memory_object.defs>. */
 kern_return_t
-_pager_seqnos_memory_object_data_return (struct pager *p,
-                                        mach_port_seqno_t seqno,
+_pager_S_memory_object_data_return (struct pager *p,
                                         mach_port_t control,
                                         vm_offset_t offset,
                                         pointer_t data,
@@ -263,6 +262,6 @@ _pager_seqnos_memory_object_data_return (struct pager *p,
                                         int dirty,
                                         int kcopy)
 {
-  return _pager_do_write_request (p, seqno, control, offset, data,
+  return _pager_do_write_request (p, control, offset, data,
                                  length, dirty, kcopy, 0);
 }
diff --git a/libpager/data-unlock.c b/libpager/data-unlock.c
index 8c7c776..8c9680c 100644
--- a/libpager/data-unlock.c
+++ b/libpager/data-unlock.c
@@ -22,8 +22,7 @@
 /* Implement kernel requests for access as described in
    <mach/memory_object.defs>. */
 kern_return_t
-_pager_seqnos_memory_object_data_unlock (struct pager *p,
-                                        mach_port_seqno_t seqno,
+_pager_S_memory_object_data_unlock (struct pager *p,
                                         mach_port_t control,
                                         vm_offset_t offset,
                                         vm_size_t length,
diff --git a/libpager/demuxer.c b/libpager/demuxer.c
index a06c4bf..4dd3cd8 100644
--- a/libpager/demuxer.c
+++ b/libpager/demuxer.c
@@ -22,7 +22,7 @@
 
 #include "priv.h"
 #include "memory_object_S.h"
-#include "notify_S.h"
+#include "libports/notify_S.h"
 #include "queue.h"
 
 /*
@@ -88,8 +88,8 @@ pager_demuxer (struct requests *requests,
   error_t err = MIG_NO_REPLY;
 
   mig_routine_t routine;
-  if (! ((routine = _pager_seqnos_memory_object_server_routine (inp)) ||
-        (routine = _pager_seqnos_notify_server_routine (inp))))
+  if (! ((routine = _pager_memory_object_server_routine (inp)) ||
+        (routine = ports_notify_server_routine (inp))))
     return FALSE;
 
 #define MASK   (8u - 1u)
diff --git a/libpager/lock-completed.c b/libpager/lock-completed.c
index 30b1dd3..4b0d87a 100644
--- a/libpager/lock-completed.c
+++ b/libpager/lock-completed.c
@@ -23,8 +23,7 @@
    when a memory_object_lock_request call has completed.  Read this
    in combination with lock-object.c.  */
 kern_return_t
-_pager_seqnos_memory_object_lock_completed (struct pager *p,
-                                           mach_port_seqno_t seqno,
+_pager_S_memory_object_lock_completed (struct pager *p,
                                            mach_port_t control,
                                            vm_offset_t offset,
                                            vm_size_t length)
diff --git a/libpager/mig-mutate.h b/libpager/mig-mutate.h
index c4f30ce..66d37cd 100644
--- a/libpager/mig-mutate.h
+++ b/libpager/mig-mutate.h
@@ -21,12 +21,3 @@
 #define MEMORY_OBJECT_INTRAN_PAYLOAD pager_t begin_using_pager_payload
 #define MEMORY_OBJECT_DESTRUCTOR end_using_pager (pager_t)
 #define MEMORY_OBJECT_IMPORTS import "mig-decls.h";
-
-#define NOTIFY_INTRAN                                          \
-  port_info_t begin_using_port_info_port (mach_port_t)
-#define NOTIFY_INTRAN_PAYLOAD                                  \
-  port_info_t begin_using_port_info_payload
-#define NOTIFY_DESTRUCTOR                                      \
-  end_using_port_info (port_info_t)
-#define NOTIFY_IMPORTS                                         \
-  import "libports/mig-decls.h";
diff --git a/libpager/no-senders.c b/libpager/no-senders.c
deleted file mode 100644
index d0bbe27..0000000
--- a/libpager/no-senders.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Called when a nosenders notification happens
-   Copyright (C) 1994, 1995 Free Software Foundation
-
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, or (at
-   your option) any later version.
-
-   This program is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
-
-
-#include "priv.h"
-#include <mach/notify.h>
-#include "notify_S.h"
-
-error_t
-_pager_do_seqnos_mach_notify_no_senders (struct port_info *pi,
-                                        mach_port_seqno_t seqno,
-                                        mach_port_mscount_t mscount)
-{
-  if (!pi ||
-      pi->class != _pager_class)
-    return EOPNOTSUPP;
-
-  ports_no_senders (pi, mscount);
-
-  return 0;
-}
diff --git a/libpager/notify-stubs.c b/libpager/notify-stubs.c
deleted file mode 100644
index a826420..0000000
--- a/libpager/notify-stubs.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/* 
-   Copyright (C) 1995, 2011 Free Software Foundation, Inc.
-   Written by Michael I. Bushnell.
-
-   This file is part of the GNU Hurd.
-
-   The GNU Hurd is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2, or (at
-   your option) any later version.
-
-   The GNU Hurd is distributed in the hope that it will be useful, but
-   WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA. */
-
-#include "priv.h"
-#include "notify_S.h"
-#include <errno.h>
-
-error_t
-_pager_do_seqnos_mach_notify_port_deleted (struct port_info *pi,
-                                          mach_port_seqno_t seqno,
-                                          mach_port_t name
-                                          __attribute__ ((unused)))
-{
-  return 0;
-}
-
-error_t
-_pager_do_seqnos_mach_notify_msg_accepted (struct port_info *pi,
-                                          mach_port_seqno_t seqno,
-                                          mach_port_t name
-                                            __attribute__ ((unused)))
-{
-  return 0;
-}
-
-error_t
-_pager_do_seqnos_mach_notify_port_destroyed (struct port_info *pi,
-                                            mach_port_seqno_t seqno,
-                                            mach_port_t name
-                                              __attribute__ ((unused)))
-{
-  return 0;
-}
-
-error_t
-_pager_do_seqnos_mach_notify_send_once (struct port_info *pi,
-                                       mach_port_seqno_t seqno)
-{
-  return 0;
-}
-
-error_t
-_pager_do_seqnos_mach_notify_dead_name (struct port_info *pi,
-                                       mach_port_seqno_t seqno,
-                                       mach_port_t name
-                                         __attribute__ ((unused)))
-{
-  return 0;
-}
diff --git a/libpager/object-init.c b/libpager/object-init.c
index eb62c44..619d28f 100644
--- a/libpager/object-init.c
+++ b/libpager/object-init.c
@@ -22,8 +22,7 @@
 /* Implement the object initialiation call as described in
    <mach/memory_object.defs>.  */
 kern_return_t
-_pager_seqnos_memory_object_init (struct pager *p,
-                                 mach_port_seqno_t seqno,
+_pager_S_memory_object_init (struct pager *p,
                                  mach_port_t control,
                                  mach_port_t name,
                                  vm_size_t pagesize)
diff --git a/libpager/object-terminate.c b/libpager/object-terminate.c
index e8c6f38..9529821 100644
--- a/libpager/object-terminate.c
+++ b/libpager/object-terminate.c
@@ -22,8 +22,7 @@
 /* Implement the object termination call from the kernel as described
    in <mach/memory_object.defs>. */
 kern_return_t
-_pager_seqnos_memory_object_terminate (struct pager *p,
-                                      mach_port_seqno_t seqno,
+_pager_S_memory_object_terminate (struct pager *p,
                                       mach_port_t control,
                                       mach_port_t name)
 {
diff --git a/libpager/pagemap.c b/libpager/pagemap.c
index b8b3362..963f656 100644
--- a/libpager/pagemap.c
+++ b/libpager/pagemap.c
@@ -36,7 +36,7 @@ _pager_pagemap_resize (struct pager *p, vm_address_t off)
       err = (newaddr == (void *) -1) ? errno : 0;
       if (! err)
        {
-         bcopy (p->pagemap, newaddr, p->pagemapsize * sizeof (*p->pagemap));
+         memcpy (newaddr, p->pagemap, p->pagemapsize * sizeof (*p->pagemap));
          munmap (p->pagemap, p->pagemapsize * sizeof (*p->pagemap));
          p->pagemap = newaddr;
          p->pagemapsize = newsize;
diff --git a/libpager/pager-attr.c b/libpager/pager-attr.c
index ad1560e..cf16d9d 100644
--- a/libpager/pager-attr.c
+++ b/libpager/pager-attr.c
@@ -20,7 +20,7 @@
 
 /* Change the attributes of the memory object underlying pager P.
    Arguments MAY_CACHE and COPY_STRATEGY are as for
-   memory_object_change_atributes.  Wait for the kernel to report
+   memory_object_change_attributes.  Wait for the kernel to report
    completion if WAIT is set.  */
 void
 pager_change_attributes (struct pager *p,
diff --git a/libpager/pager-create.c b/libpager/pager-create.c
index 1fc15b8..b583f02 100644
--- a/libpager/pager-create.c
+++ b/libpager/pager-create.c
@@ -42,10 +42,8 @@ pager_create (struct user_pager_info *upi,
   p->notify_on_evict = notify_on_evict;
   p->memobjcntl = MACH_PORT_NULL;
   p->memobjname = MACH_PORT_NULL;
-  p->seqno = -1;
   p->noterm = 0;
   p->termwaiting = 0;
-  p->waitingforseqno = 0;
   p->pagemap = 0;
   p->pagemapsize = 0;
 
diff --git a/libpager/pager.h b/libpager/pager.h
index 29ec833..fe34238 100644
--- a/libpager/pager.h
+++ b/libpager/pager.h
@@ -109,7 +109,7 @@ pager_offer_page (struct pager *pager,
 
 /* Change the attributes of the memory object underlying pager PAGER.
    Arguments MAY_CACHE and COPY_STRATEGY are as for
-   memory_object_change_atributes.  Wait for the kernel to report
+   memory_object_change_attributes.  Wait for the kernel to report
    completion if WAIT is set.  */
 void
 pager_change_attributes (struct pager *pager,
diff --git a/libpager/priv.h b/libpager/priv.h
index 4576e12..a45ae3f 100644
--- a/libpager/priv.h
+++ b/libpager/priv.h
@@ -55,12 +55,9 @@ struct pager
   memory_object_control_t memobjcntl;
   memory_object_name_t memobjname;
 
-  mach_port_seqno_t seqno;
-
   int noterm;                  /* number of threads blocking termination */
 
   int termwaiting:1;
-  int waitingforseqno:1;
 
 #ifdef KERNEL_INIT_RACE
   /* Out of sequence object_init calls waiting for
diff --git a/libpager/stubs.c b/libpager/stubs.c
index c7f1a5a..9a766ec 100644
--- a/libpager/stubs.c
+++ b/libpager/stubs.c
@@ -21,8 +21,7 @@
 #include <stdio.h>
 
 kern_return_t
-_pager_seqnos_memory_object_copy (struct pager *p,
-                          mach_port_seqno_t seq,
+_pager_S_memory_object_copy (struct pager *p,
                           memory_object_control_t obj_ctl,
                           vm_offset_t off,
                           vm_size_t len,
@@ -33,8 +32,7 @@ _pager_seqnos_memory_object_copy (struct pager *p,
 }
 
 kern_return_t
-_pager_seqnos_memory_object_data_write (struct pager *p,
-                                mach_port_seqno_t seq,
+_pager_S_memory_object_data_write (struct pager *p,
                                 mach_port_t ctl,
                                 vm_offset_t off,
                                 pointer_t data,
@@ -45,8 +43,7 @@ _pager_seqnos_memory_object_data_write (struct pager *p,
 }
 
 kern_return_t
-_pager_seqnos_memory_object_supply_completed (struct pager *p,
-                                      mach_port_seqno_t seq,
+_pager_S_memory_object_supply_completed (struct pager *p,
                                       mach_port_t ctl,
                                       vm_offset_t off,
                                       vm_size_t len,
diff --git a/libpipe/pipe.c b/libpipe/pipe.c
index b7ee851..9580eb7 100644
--- a/libpipe/pipe.c
+++ b/libpipe/pipe.c
@@ -18,7 +18,7 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
-#include <string.h>            /* For bzero() */
+#include <string.h>            /* For memset() */
 #include <assert.h>
 #include <stdlib.h>
 
@@ -58,8 +58,8 @@ pipe_create (struct pipe_class *class, struct pipe **pipe)
   new->write_limit = 16*1024;
   new->write_atomic = 16*1024;
 
-  bzero (&new->read_time, sizeof (new->read_time));
-  bzero (&new->write_time, sizeof (new->write_time));
+  memset (&new->read_time, 0, sizeof(new->read_time));
+  memset (&new->write_time, 0, sizeof(new->write_time));
 
   pthread_cond_init (&new->pending_reads, NULL);
   pthread_cond_init (&new->pending_read_selects, NULL);
diff --git a/libpipe/pq.c b/libpipe/pq.c
index 102f3ee..fe7dd8a 100644
--- a/libpipe/pq.c
+++ b/libpipe/pq.c
@@ -249,10 +249,10 @@ packet_realloc (struct packet *packet, size_t new_len)
        /* If there was an operation like vm_move, we could use that in the
           case where both the old and the new buffers were vm_alloced (on
           the assumption that creating COW pages is somewhat more costly).
-          But there's not, and bcopy will do vm_copy where it can.  Will we
+          But there's not, and memcpy may do vm_copy where it can.  Will we
           still takes faults on the new copy, even though we've deallocated
           the old one???  XXX */
-       bcopy (start, new_buf, end - start);
+       memcpy (new_buf, start, end - start);
 
       /* And get rid of the old buffer.  */
       if (old_len > 0)
@@ -305,7 +305,7 @@ packet_set_ports (struct packet *packet,
       packet->ports = new_ports;
       packet->ports_alloced = num_ports;
     }
-  bcopy (ports, packet->ports, sizeof (mach_port_t) * num_ports);
+  memcpy (packet->ports, ports, sizeof (mach_port_t) * num_ports);
   packet->num_ports = num_ports;
   return 0;
 }
@@ -324,7 +324,7 @@ packet_read_ports (struct packet *packet,
        return errno;
     }
   *num_ports = packet->num_ports;
-  bcopy (packet->ports, *ports, length);
+  memcpy (*ports, packet->ports, length);
   packet->num_ports = 0;
   return 0;
 }
@@ -341,7 +341,7 @@ packet_write (struct packet *packet,
     return err;
 
   /* Add the new data.  */
-  bcopy (data, packet->buf_end, data_len);
+  memcpy (packet->buf_end, data, data_len);
   packet->buf_end += data_len;
   if (amount != NULL)
     *amount = data_len;
@@ -411,7 +411,7 @@ packet_fetch (struct packet *packet,
          if (*data_len < amount)
            *data = mmap (0, amount, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
 
-         bcopy (start, *data, amount);
+         memcpy (*data, start, amount);
          start += amount;
 
          if (remove && start - buf > 2 * PACKET_SIZE_LARGE)
diff --git a/libpipe/pq.h b/libpipe/pq.h
index 4e500b6..7238ace 100644
--- a/libpipe/pq.h
+++ b/libpipe/pq.h
@@ -176,7 +176,7 @@ packet_fit (struct packet *packet, size_t amount)
           than 25% of the buffer size, then move the data instead of growing
           the buffer. */
        {
-         bcopy (start, buf, cur_len);
+         memmove (buf, start, cur_len);
          packet->buf_start = buf;
          packet->buf_end = buf + cur_len;
        }
diff --git a/libports/manage-multithread.c b/libports/manage-multithread.c
index 2067cba..ad22991 100644
--- a/libports/manage-multithread.c
+++ b/libports/manage-multithread.c
@@ -50,6 +50,11 @@ adjust_priority (unsigned int totalthreads)
   thread_switch (MACH_PORT_NULL, SWITCH_OPTION_DEPRESS, t);
 
   err = get_privileged_ports (&host_priv, NULL);
+  if (err == MACH_SEND_INVALID_DEST)
+    /* This is returned if we neither have the privileged host control
+       port cached nor have a proc server to talk to.  Give up.  */
+    return;
+
   if (err)
     goto error_host_priv;
 
diff --git a/libps/procstat.c b/libps/procstat.c
index 0d4a565..9f488cd 100644
--- a/libps/procstat.c
+++ b/libps/procstat.c
@@ -361,7 +361,7 @@ summarize_thread_basic_info (struct procinfo *pi, 
ps_flags_t have)
   if (!tbi)
     return 0;
 
-  bzero (tbi, sizeof *tbi);
+  memset (tbi, 0, sizeof *tbi);
 
   for (i = 0; i < pi->nthreads; i++)
     if (! pi->threadinfos[i].died
@@ -458,7 +458,7 @@ summarize_thread_sched_info (struct procinfo *pi)
   if (!tsi)
     return 0;
 
-  bzero (tsi, sizeof *tsi);
+  memset (tsi, 0, sizeof *tsi);
 
   for (i = 0; i < pi->nthreads; i++)
     if (! pi->threadinfos[i].died
diff --git a/libps/ps.h b/libps/ps.h
index 06af96b..3ee142d 100644
--- a/libps/ps.h
+++ b/libps/ps.h
@@ -824,7 +824,7 @@ void ps_fmt_free (struct ps_fmt *fmt);
 error_t ps_fmt_clone (struct ps_fmt *fmt, struct ps_fmt **copy);
 
 /* Write an appropriate header line for FMT, containing the titles of all its
-   fields appropiately aligned with where the values would be printed, to
+   fields appropriately aligned with where the values would be printed, to
    STREAM (without a trailing newline).  If count is non-NULL, the total
    number number of characters output is added to the integer it points to.
    If any fatal error occurs, the error code is returned, otherwise 0.  */
diff --git a/libps/spec.c b/libps/spec.c
index d645b82..d8188d6 100644
--- a/libps/spec.c
+++ b/libps/spec.c
@@ -1036,7 +1036,7 @@ specs_add_alias (struct ps_fmt_specs *specs,
   exp->nominal_fn = alias->nominal_fn ?: src->nominal_fn;
 
   /* Now add the list-end marker.  */
-  bzero (exp + 1, sizeof (*exp));
+  memset (exp + 1, 0, sizeof(*exp));
 
   return exp;
 }
diff --git a/libshouldbeinlibc/cacheq.c b/libshouldbeinlibc/cacheq.c
index c1be59c..5912f84 100644
--- a/libshouldbeinlibc/cacheq.c
+++ b/libshouldbeinlibc/cacheq.c
@@ -97,7 +97,7 @@ cacheq_set_length (struct cacheq *cq, int length)
          if (fh && th)
            bcopy (fh, th, esz); /* Copy the bits in a moved entry.  */
          else if (th)
-           bzero (th, esz);    /* Zero the bits in a new entry.  */
+           memset (th, 0, esz);        /* Zero the bits in a new entry.  */
 
          if (th)
            /* Fixup headers.  */
diff --git a/libshouldbeinlibc/idvec.c b/libshouldbeinlibc/idvec.c
index 7fdee10..c60fc9f 100644
--- a/libshouldbeinlibc/idvec.c
+++ b/libshouldbeinlibc/idvec.c
@@ -115,7 +115,7 @@ idvec_insert (struct idvec *idvec, unsigned pos, uid_t id)
       if (pos < num)
        bcopy (ids + pos, ids + pos + 1, (num - pos) * sizeof (uid_t));
       else if (pos > num)
-       bzero (ids + num, (pos - num) * sizeof (uid_t));
+       memset (ids + num, 0, (pos - num) * sizeof(uid_t));
       ids[pos] = id;
       idvec->num = new_num;
     }
diff --git a/libshouldbeinlibc/portxlate.c b/libshouldbeinlibc/portxlate.c
index f78abbf..eb6abfb 100644
--- a/libshouldbeinlibc/portxlate.c
+++ b/libshouldbeinlibc/portxlate.c
@@ -113,7 +113,7 @@ port_name_xlator_xlate (struct port_name_xlator *x,
   error_t err;
   mach_port_t port;
   mach_msg_type_number_t i;
-  mach_msg_type_name_t aquired_type;
+  mach_msg_type_name_t acquired_type;
   mach_msg_type_name_t valid_to_types;
 
   if (from_type == 0)
@@ -137,7 +137,7 @@ port_name_xlator_xlate (struct port_name_xlator *x,
                              ? MACH_MSG_TYPE_MAKE_SEND
                              : MACH_MSG_TYPE_COPY_SEND),
                             &port,
-                            &aquired_type);
+                            &acquired_type);
 
   if (err)
     return err;
@@ -155,7 +155,7 @@ port_name_xlator_xlate (struct port_name_xlator *x,
                                      ? MACH_MSG_TYPE_MAKE_SEND
                                      : MACH_MSG_TYPE_COPY_SEND),
                                     &x->ports[i],
-                                    &aquired_type);
+                                    &acquired_type);
          if (err)
            x->to_types[i] = 0; /* Don't try to fetch this port again.  */
        }
diff --git a/libshouldbeinlibc/ugids.c b/libshouldbeinlibc/ugids.c
index db1ce3c..cb2631b 100644
--- a/libshouldbeinlibc/ugids.c
+++ b/libshouldbeinlibc/ugids.c
@@ -30,7 +30,7 @@ make_ugids ()
 {
   struct ugids *u = malloc (sizeof (struct ugids));
   if (u)
-    bzero (u, sizeof *u);
+    memset (u, 0, sizeof *u);
   return u;
 }
 
@@ -58,7 +58,7 @@ ugids_add_gid (struct ugids *ugids, gid_t gid, int avail)
 }
 
 /* Add UID to UGIDS, plus any gids to which that user belongs.  If AVAIL is
-   true, the are added to the avail gids instead of the effective ones.  */
+   true, they are added to the avail gids instead of the effective ones.  */
 error_t
 ugids_add_user (struct ugids *ugids, uid_t uid, int avail)
 {
diff --git a/libstore/argp.c b/libstore/argp.c
index 6ed7996..73146a8 100644
--- a/libstore/argp.c
+++ b/libstore/argp.c
@@ -350,7 +350,7 @@ parse_opt (int opt, char *arg, struct argp_state *state)
        parsed = state->hook = malloc (sizeof (struct store_parsed));
        if (! parsed)
          return ENOMEM;
-       bzero (parsed, sizeof (struct store_parsed));
+       memset (parsed, 0, sizeof(struct store_parsed));
        parsed->classes = params->classes;
        parsed->default_type =
          find_class (params->default_type ?: DEFAULT_STORE_CLASS.name,
diff --git a/libstore/enc.c b/libstore/enc.c
index d5002a0..5838c17 100644
--- a/libstore/enc.c
+++ b/libstore/enc.c
@@ -33,7 +33,7 @@ store_enc_init (struct store_enc *enc,
                off_t *offsets, mach_msg_type_number_t num_offsets,
                char *data, mach_msg_type_number_t data_len)
 {
-  bzero (enc, sizeof (*enc));
+  memset (enc, 0, sizeof(*enc));
 
   enc->ports = enc->init_ports = ports;
   enc->num_ports = num_ports;
@@ -75,7 +75,7 @@ store_enc_dealloc (struct store_enc *enc)
     munmap (enc->data, enc->data_len);
 
   /* For good measure...  */
-  bzero (enc, sizeof (*enc));
+  memset (enc, 0, sizeof(*enc));
 }
 
 /* Copy out the parameters from ENC into the given variables suitably for
diff --git a/libstore/kids.c b/libstore/kids.c
index 901a7f8..5ad9454 100644
--- a/libstore/kids.c
+++ b/libstore/kids.c
@@ -206,7 +206,7 @@ store_open_children (const char *name, int flags,
       if (! *stores)
        return ENOMEM;
 
-      bzero (*stores, count * sizeof (struct store *));
+      memset (*stores, 0, count * sizeof(struct store *));
 
       /* Open each child store.  */
       for (p = name, k = 0; !err && p && p[1]; p = end, k++)
diff --git a/libstore/part.c b/libstore/part.c
index 60ef6c2..0ef2bd4 100644
--- a/libstore/part.c
+++ b/libstore/part.c
@@ -33,7 +33,7 @@
 
 /* Initialize a PedDevice using SOURCE.  The SOURCE will NOT be destroyed;
    the caller created it, it is the caller's responsilbility to free it
-   after it calls ped_device_destory.  SOURCE is not registered in Parted's
+   after it calls ped_device_destroy.  SOURCE is not registered in Parted's
    list of devices.  */
 PedDevice* ped_device_new_from_store (struct store *source);
 
diff --git a/libstore/remap.c b/libstore/remap.c
index 55ab51a..de21812 100644
--- a/libstore/remap.c
+++ b/libstore/remap.c
@@ -320,7 +320,7 @@ store_remap (struct store *source,
     /* Use the class-specific remaping function.  */
     return (* source->class->remap) (source, runs, num_runs, store);
   else
-    /* Just replace SOURCE's runs-list by an appropiately translated RUNS. */
+    /* Just replace SOURCE's runs-list by an appropriately translated RUNS. */
     {
       struct store_run *xruns = 0;
       size_t num_xruns = 0;
diff --git a/libstore/unzipstore.c b/libstore/unzipstore.c
index 8d500c1..cc86887 100644
--- a/libstore/unzipstore.c
+++ b/libstore/unzipstore.c
@@ -81,7 +81,7 @@ unzip_store (struct store *from, void **buf, size_t *buf_len)
            {
              if (left > maxread)
                left = maxread;
-             bcopy (in_buf + in_buf_offs, buf, left);
+             memcpy (buf, in_buf + in_buf_offs, left);
              in_buf_offs += left;
              buf += left;
              maxread -= left;
@@ -150,7 +150,7 @@ unzip_store (struct store *from, void **buf, size_t 
*buf_len)
 
              if (out_buf_offs > 0)
                /* Copy the old buffer into the start of the new & free it. */
-               bcopy (old_buf, new_buf, out_buf_offs);
+               memcpy (new_buf, old_buf, out_buf_offs);
 
              munmap (old_buf, old_buf_len);
 
@@ -160,7 +160,7 @@ unzip_store (struct store *from, void **buf, size_t 
*buf_len)
          *buf_len = new_buf_len;
        }
 
-      bcopy (wbuf, *buf + out_buf_offs, nwrite);
+      memcpy (*buf + out_buf_offs, wbuf, nwrite);
       out_buf_offs += nwrite;
     }
 
diff --git a/libthreads/alpha/thread.c b/libthreads/alpha/thread.c
index db2cb0c..350fd5f 100644
--- a/libthreads/alpha/thread.c
+++ b/libthreads/alpha/thread.c
@@ -82,7 +82,7 @@ cproc_setup(
         * Set up ALPHA call frame and registers.
         */
        ts = &state;
-       bzero((char *) ts, sizeof(struct alpha_thread_state));
+       memset ((char *)ts, 0, sizeof(struct alpha_thread_state));
 
        top = (integer_t *) (child->stack_base + child->stack_size);
 
diff --git a/libtreefs/fsys.c b/libtreefs/fsys.c
index d6565bb..fe1b917 100644
--- a/libtreefs/fsys.c
+++ b/libtreefs/fsys.c
@@ -81,7 +81,7 @@ treefs_create_fsys (struct port_bucket *port_bucket,
   (*fsys)->root = NULL;
 
   (*fsys)->underlying_port = MACH_PORT_NULL;
-  bzero (&(*fsys)->underlying_stat, sizeof (struct stat));
+  memset (&(*fsys)->underlying_stat, 0, sizeof(struct stat));
 
   (*fsys)->flags = treefs_default_flags;
   (*fsys)->max_symlinks = treefs_default_max_symlinks;
@@ -109,7 +109,7 @@ void ACKACKACK()
     goto barf;
 
   /* Remember stat info for the node we're mounted on.  */
-  bzero (&(*fsys)->underlying_stat, sizeof (struct stat));
+  memset (&(*fsys)->underlying_stat, 0, sizeof (struct stat));
   file_stat (realnode, &(*fsys)->underlying_stat);
 
   /* Note that it points to *FSYS, but *FSYS's root doesn't point to it...
diff --git a/libtreefs/treefs-hooks.h b/libtreefs/treefs-hooks.h
index 3af4a54..6dc2f73 100644
--- a/libtreefs/treefs-hooks.h
+++ b/libtreefs/treefs-hooks.h
@@ -264,7 +264,7 @@ DNH(dir_init, error_t)
 /* If NODE is a symlink, copies the contents into BUF, which should have at
    least *LEN bytes available, and returns 0; if the symlink is too big,
    E2BIG is returned.  Either way, the actual length of the symlink is
-   returned in *LEN (so if it's too big, you can allocate an appropiately
+   returned in *LEN (so if it's too big, you can allocate an appropriately
    sized buffer and try again).  If NODE is not a symlink, EINVAL is
    returned.  */
 DNH(node_get_symlink, error_t, char *buf, int *len)
@@ -275,7 +275,7 @@ DNH(node_get_symlink, error_t, char *buf, int *len)
    should have at least *LEN bytes available, and returns 0; if the string is
    too big, E2BIG is returned.  Either way, the actual length of the
    translator string is returned in *LEN (so if it's too big, you can
-   allocate an appropiately sized buffer and try again).  If NODE has no
+   allocate an appropriately sized buffer and try again).  If NODE has no
    passive translator, EINVAL is returned.  */
 DNH(node_get_passive_trans, error_t, char *buf, int *len)
 #define treefs_node_get_passive_trans(node, args...)                         \
diff --git a/libtrivfs/file-statfs.c b/libtrivfs/file-statfs.c
index 348126e..267ac50 100644
--- a/libtrivfs/file-statfs.c
+++ b/libtrivfs/file-statfs.c
@@ -28,7 +28,7 @@ trivfs_S_file_statfs (struct trivfs_protid *cred,
   if (!trivfs_fsid)
     trivfs_fsid = getpid();
 
-  bzero (stb, sizeof (struct statfs));
+  memset (stb, 0, sizeof(struct statfs));
   stb->f_type = trivfs_fstype;
   stb->f_fsid = trivfs_fsid;
 
diff --git a/mach-defpager/Makefile b/mach-defpager/Makefile
index 09debed..4f987fa 100644
--- a/mach-defpager/Makefile
+++ b/mach-defpager/Makefile
@@ -35,4 +35,4 @@ LDFLAGS += -static
 
 include ../Makeconf
 
-MIGSFLAGS = -DSEQNOS -imacros $(srcdir)/mig-mutate.h
+MIGSFLAGS = -DSEQNOS -imacros $(srcdir)/mig-mutate.h 
-DHURD_DEFAULT_PAYLOAD_TO_PORT=1
diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c
index 831ed96..83382c0 100644
--- a/mach-defpager/default_pager.c
+++ b/mach-defpager/default_pager.c
@@ -192,7 +192,7 @@ new_partition (const char *name, struct file_direct *fdp,
        part->going_away= FALSE;
        part->file = fdp;
 
-       bzero((char *)part->bitmap, bmsize);
+       memset ((char *)part->bitmap, 0, bmsize);
 
        if (check_linux_signature < 0)
          {
@@ -428,10 +428,10 @@ create_paging_partition(const char *name,
                        new_list = (partition_t *)
                                kalloc( n * sizeof(partition_t) );
                        if (new_list == 0) no_paging_space(TRUE);
-                       bzero(new_list, n*sizeof(partition_t));
+                       memset (new_list, 0, n * sizeof(partition_t));
                        if (i) {
                            old_list = all_partitions.partition_list;
-                           bcopy(old_list, new_list, i*sizeof(partition_t));
+                           memcpy (new_list, old_list, i*sizeof(partition_t));
                        }
                        all_partitions.partition_list = new_list;
                        all_partitions.n_partitions = n;
@@ -1640,7 +1640,7 @@ default_read(ds, addr, size, offset, out_addr, 
deallocate, external)
                 * An external object is requesting unswapped data,
                 * zero fill the page and return.
                 */ 
-               bzero((char *) addr, vm_page_size);
+               memset ((char *)addr, 0, vm_page_size);
                *out_addr = addr;
                return (PAGER_SUCCESS);
            }
@@ -1678,7 +1678,7 @@ ddprintf 
("default_read(%x,%x,%x,%d)\n",addr,size,offset,block.block.p_index);
             * the next piece.
             */
            first_time = FALSE;
-           bcopy((char *)raddr, (char *)addr, rsize);
+           memcpy ((char *)addr, (char *)raddr, rsize);
            addr += rsize;
            offset += rsize;
            size -= rsize;
@@ -2118,7 +2118,7 @@ default_pager_t pager_port_alloc(size)
        ds = (default_pager_t) kalloc(sizeof *ds);
        if (ds == DEFAULT_PAGER_NULL)
            panic("%spager_port_alloc",my_name);
-       bzero((char *) ds, sizeof *ds);
+       memset ((char *)ds, 0, sizeof *ds);
 
        dstruct_lock_init(ds);
 
diff --git a/mach-defpager/wiring.c b/mach-defpager/wiring.c
index 883770f..a0a608d 100644
--- a/mach-defpager/wiring.c
+++ b/mach-defpager/wiring.c
@@ -92,7 +92,7 @@ wire_all_memory()
        if (priv_host_port == MACH_PORT_NULL)
            return;
 
-       /* iterate thru all regions, wiring */
+       /* iterate through all regions, wiring */
        address = 0;
        while (
            (kr = vm_region(this_task, &address,
diff --git a/pfinet/ethernet.c b/pfinet/ethernet.c
index 1678243..e6ae53c 100644
--- a/pfinet/ethernet.c
+++ b/pfinet/ethernet.c
@@ -158,10 +158,10 @@ ethernet_demuxer (mach_msg_header_t *inp,
   skb->dev = dev;
 
   /* Copy the two parts of the frame into the buffer. */
-  bcopy (msg->header, skb->data, ETH_HLEN);
-  bcopy (msg->packet + sizeof (struct packet_header),
-        skb->data + ETH_HLEN,
-        datalen - ETH_HLEN);
+  memcpy (skb->data, msg->header, ETH_HLEN);
+  memcpy (skb->data + ETH_HLEN,
+         msg->packet + sizeof (struct packet_header),
+         datalen - ETH_HLEN);
 
   /* Drop it on the queue. */
   skb->protocol = eth_type_trans (skb, dev);
@@ -389,7 +389,7 @@ setup_ethernet_device (char *name, struct device **device)
     error (2, err, "%s: Cannot get hardware Ethernet address", name);
   net_address[0] = ntohl (net_address[0]);
   net_address[1] = ntohl (net_address[1]);
-  bcopy (net_address, dev->dev_addr, ETH_ALEN);
+  memcpy (dev->dev_addr, net_address, ETH_ALEN);
 
   /* That should be enough.  */
 
diff --git a/pfinet/glue-include/asm/uaccess.h 
b/pfinet/glue-include/asm/uaccess.h
index 6f6dc41..752c61c 100644
--- a/pfinet/glue-include/asm/uaccess.h
+++ b/pfinet/glue-include/asm/uaccess.h
@@ -43,7 +43,7 @@ struct __large_struct { unsigned long buf[100]; };
 
 #define copy_to_user(to,from,n)                (memcpy ((to), (from), (n)), 0)
 #define copy_from_user(to,from,n)      (memcpy ((to), (from), (n)), 0)
-#define        clear_user(mem, len)            (bzero ((mem), (len)), 0)
+#define        clear_user(mem, len)            (memset ((mem), 0, (len)), 0)
 
 #define copy_to_user_ret(to,from,n,retval) ({ if (copy_to_user(to,from,n)) 
return retval; })
 
diff --git a/pfinet/io-ops.c b/pfinet/io-ops.c
index 96dbec8..cc666cd 100644
--- a/pfinet/io-ops.c
+++ b/pfinet/io-ops.c
@@ -339,7 +339,7 @@ S_io_stat (struct sock_user *user,
   if (!user)
     return EOPNOTSUPP;
 
-  bzero (st, sizeof (struct stat));
+  memset (st, 0, sizeof(struct stat));
 
   st->st_fstype = FSTYPE_SOCKET;
   st->st_fsid = getpid ();
diff --git a/pfinet/linux-src/net/ipv4/devinet.c 
b/pfinet/linux-src/net/ipv4/devinet.c
index 0416ee8..a566743 100644
--- a/pfinet/linux-src/net/ipv4/devinet.c
+++ b/pfinet/linux-src/net/ipv4/devinet.c
@@ -214,10 +214,12 @@ inet_insert_ifa(struct in_device *in_dev, struct 
in_ifaddr *ifa)
 {
        struct in_ifaddr *ifa1, **ifap, **last_primary;
 
+#ifndef _HURD_
        if (ifa->ifa_local == 0) {
                inet_free_ifa(ifa);
                return 0;
        }
+#endif
 
        ifa->ifa_flags &= ~IFA_F_SECONDARY;
        last_primary = &in_dev->ifa_list;
diff --git a/pfinet/linux-src/net/ipv4/tcp.c b/pfinet/linux-src/net/ipv4/tcp.c
index 8cde385..1a05743 100644
--- a/pfinet/linux-src/net/ipv4/tcp.c
+++ b/pfinet/linux-src/net/ipv4/tcp.c
@@ -1059,13 +1059,11 @@ static int tcp_recv_urg(struct sock * sk, int nonblock,
        if (sk->err)
                return sock_error(sk);
 
-       if (sk->done)
+       if (sk->state == TCP_CLOSE && !sk->done)
                return -ENOTCONN;
 
-       if (sk->state == TCP_CLOSE || (sk->shutdown & RCV_SHUTDOWN)) {
-               sk->done = 1;
+       if (sk->state == TCP_CLOSE || (sk->shutdown & RCV_SHUTDOWN))
                return 0;
-       }
 
        lock_sock(sk);
        if (tp->urg_data & URG_VALID) {
@@ -1177,9 +1175,6 @@ int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
        int err = 0;
        int target = 1;         /* Read at least this many bytes */
 
-       if (sk->err)
-               return sock_error(sk);
-
        if (sk->state == TCP_LISTEN)
                return -ENOTCONN;
 
@@ -1261,36 +1256,36 @@ int tcp_recvmsg(struct sock *sk, struct msghdr *msg,
                if (copied >= target)
                        break;
 
-               /*
-                  These three lines and clause if (sk->state == TCP_CLOSE)
-                  are unlikely to be correct, if target > 1.
-                  I DO NOT FIX IT, because I have no idea, what
-                  POSIX prescribes to make here. Probably, it really
-                  wants to lose data 8), if not all target is received.
-                                                                --ANK
-                */
-               if (sk->err && !(flags&MSG_PEEK)) {
-                       copied = sock_error(sk);
-                       break;
-               }
+               if (copied) {
+                       if (sk->err ||
+                           sk->state == TCP_CLOSE ||
+                           (sk->shutdown & RCV_SHUTDOWN) ||
+                           nonblock)
+                               break;
+               } else {
+                       if (sk->done)
+                               break;
 
-               if (sk->shutdown & RCV_SHUTDOWN) {
-                       sk->done = 1;
-                       break;
-               }
+                       if (sk->err) {
+                               copied = sock_error(sk);
+                               break;
+                       }
+
+                       if (sk->shutdown & RCV_SHUTDOWN)
+                               break;
 
-               if (sk->state == TCP_CLOSE) {
-                       if (!sk->done) {
-                               sk->done = 1;
+                       if (sk->state == TCP_CLOSE) {
+                               if (!sk->done) {
+                                       copied = -ENOTCONN;
+                                       break;
+                               }
                                break;
                        }
-                       copied = -ENOTCONN;
-                       break;
-               }
 
-               if (nonblock) {
-                       copied = -EAGAIN;
-                       break;
+                       if (nonblock) {
+                               copied = -EAGAIN;
+                               break;
+                       }
                }
 
                cleanup_rbuf(sk, copied);
diff --git a/pfinet/linux-src/net/ipv4/tcp_input.c 
b/pfinet/linux-src/net/ipv4/tcp_input.c
index e84eaf4..e2dfc15 100644
--- a/pfinet/linux-src/net/ipv4/tcp_input.c
+++ b/pfinet/linux-src/net/ipv4/tcp_input.c
@@ -1129,6 +1129,9 @@ static void tcp_fin(struct sk_buff *skb, struct sock *sk, 
struct tcphdr *th)
 
        tcp_send_ack(sk);
 
+       sk->shutdown |= RCV_SHUTDOWN;
+       sk->done = 1;
+
        if (!sk->dead) {
                sk->state_change(sk);
                sock_wake_async(sk->socket, 1);
diff --git a/pfinet/linux-src/net/ipv4/tcp_output.c 
b/pfinet/linux-src/net/ipv4/tcp_output.c
index 9ea4b7a..a15b7b3 100644
--- a/pfinet/linux-src/net/ipv4/tcp_output.c
+++ b/pfinet/linux-src/net/ipv4/tcp_output.c
@@ -922,6 +922,7 @@ void tcp_connect(struct sock *sk, struct sk_buff *buff, int 
mtu)
        tp->rcv_nxt = 0;
 
        sk->err = 0;
+       sk->done = 0;
        
        /* We'll fix this up when we get a response from the other end.
         * See tcp_input.c:tcp_rcv_state_process case TCP_SYN_SENT.
diff --git a/pfinet/options.c b/pfinet/options.c
index e9b81a9..daffcd5 100644
--- a/pfinet/options.c
+++ b/pfinet/options.c
@@ -60,23 +60,26 @@ extern struct inet6_dev *ipv6_find_idev (struct device 
*dev);
 extern int inet6_addr_add (int ifindex, struct in6_addr *pfx, int plen);
 extern int inet6_addr_del (int ifindex, struct in6_addr *pfx, int plen);
 
+#ifdef CONFIG_IPV6
+static struct rt6_info * ipv6_get_dflt_router (void);
+#endif
+
 
 /* Pfinet options.  Used for both startup and runtime.  */
 static const struct argp_option options[] =
 {
-  {"interface", 'i', "DEVICE",  0,  "Network interface to use", 1},
+  {"interface", 'i', "DEVICE",   0,  "Network interface to use", 1},
   {0,0,0,0,"These apply to a given interface:", 2},
-  {"address",   'a', "ADDRESS", 0, "Set the network address"},
-  {"netmask",   'm', "MASK",    0, "Set the netmask"},
-  {"peer",      'p', "ADDRESS", 0, "Set the peer address"},
-  {"gateway",   'g', "ADDRESS", 0, "Set the default gateway"},
-  {"ipv4",      '4', "NAME",    0, "Put active IPv4 translator on NAME"},
+  {"address",   'a', "ADDRESS",  OPTION_ARG_OPTIONAL, "Set the network 
address"},
+  {"netmask",   'm', "MASK",     OPTION_ARG_OPTIONAL, "Set the netmask"},
+  {"peer",      'p', "ADDRESS",  OPTION_ARG_OPTIONAL, "Set the peer address"},
+  {"gateway",   'g', "ADDRESS",  OPTION_ARG_OPTIONAL, "Set the default 
gateway"},
+  {"ipv4",      '4', "NAME",     0, "Put active IPv4 translator on NAME"},
 #ifdef CONFIG_IPV6  
-  {"ipv6",      '6', "NAME",    0, "Put active IPv6 translator on NAME"},
-  {"address6",  'A', "ADDR/LEN",0, "Set the global IPv6 address"},
-  {"gateway6",  'G', "ADDRESS", 0, "Set the IPv6 default gateway"},
+  {"ipv6",      '6', "NAME",     0, "Put active IPv6 translator on NAME"},
+  {"address6",  'A', "ADDR/LEN", OPTION_ARG_OPTIONAL, "Set the global IPv6 
address"},
+  {"gateway6",  'G', "ADDRESS",  OPTION_ARG_OPTIONAL, "Set the IPv6 default 
gateway"},
 #endif
-  {"shutdown",  's', 0,         0, "Shut it down"},
   {0}
 };
 
@@ -112,6 +115,51 @@ struct parse_hook
   struct parse_interface *curint;
 };
 
+static void
+parse_interface_copy_device(struct device *src,
+                           struct parse_interface *dst)
+{
+  uint32_t broad;
+  struct rt_key key = { 0 };
+  struct inet6_dev *idev = NULL;
+  struct fib_result res;
+
+  inquire_device (src, &dst->address, &dst->netmask,
+                 &dst->peer, &broad);
+  /* Get gateway */
+  dst->gateway = INADDR_NONE;
+  key.oif = src->ifindex;
+  if (! main_table->tb_lookup (main_table, &key, &res)
+      && FIB_RES_GW(res) != INADDR_ANY)
+    dst->gateway = FIB_RES_GW (res);
+#ifdef CONFIG_IPV6
+  if (trivfs_protid_portclasses[PORTCLASS_INET6] != MACH_PORT_NULL)
+    idev = ipv6_find_idev(src);
+
+  if (idev)
+    {
+      struct inet6_ifaddr *ifa = idev->addr_list;
+
+      /* Look for IPv6 default router and add it to the interface,
+       * if it belongs to it.
+       */
+      struct rt6_info *rt6i = ipv6_get_dflt_router();
+      if (rt6i->rt6i_dev == src)
+       memcpy (&dst->gateway6, &rt6i->rt6i_gateway, sizeof (struct in6_addr));
+      /* Search for global address and set it in dst */
+      do
+       {
+         if (!IN6_IS_ADDR_LINKLOCAL (&ifa->addr))
+           {
+             memcpy (&dst->address6, ifa, sizeof (struct inet6_ifaddr));
+             break;
+           }
+       }
+      while ((ifa = ifa->if_next));
+    }
+#endif
+}
+
 /* Adds an empty interface slot to H, and sets H's current interface to it, or
    returns an error. */
 static error_t
@@ -122,6 +170,7 @@ parse_hook_add_interface (struct parse_hook *h)
             (h->num_interfaces + 1) * sizeof (struct parse_interface));
   if (! new)
     return ENOMEM;
+
   h->interfaces = new;
   h->num_interfaces++;
   h->curint = new + h->num_interfaces - 1;
@@ -183,10 +232,16 @@ parse_opt (int opt, char *arg, struct argp_state *state)
      if (addr == INADDR_NONE) PERR (EINVAL, "Malformed %s", type);           \
      addr; })
 
+  if (!arg && state->next < state->argc
+      && (*state->argv[state->next] != '-'))
+    {
+      arg = state->argv[state->next];
+      state->next ++;
+    }
+
   switch (opt)
     {
-      struct parse_interface *in;
-      uint32_t gateway;
+      struct parse_interface *in, *gw4_in;
 #ifdef CONFIG_IPV6
       struct parse_interface *gw6_in;
       char *ptr;
@@ -217,29 +272,61 @@ parse_opt (int opt, char *arg, struct argp_state *state)
       if (err)
        FAIL (err, 10, err, "%s", arg);
 
+      /* Set old interface values */
+      parse_interface_copy_device (in->device, in);
       break;
 
     case 'a':
-      h->curint->address = ADDR (arg, "address");
-      if (!IN_CLASSA (ntohl (h->curint->address))
-         && !IN_CLASSB (ntohl (h->curint->address))
-         && !IN_CLASSC (ntohl (h->curint->address)))
+      if (arg)
        {
-         if (IN_MULTICAST (ntohl (h->curint->address)))
-           FAIL (EINVAL, 1, 0,
-                 "%s: Cannot set interface address to multicast address",
-                 arg);
-         else
-           FAIL (EINVAL, 1, 0,
-                 "%s: Illegal or undefined network address", arg);
+         h->curint->address = ADDR (arg, "address");
+         if (!IN_CLASSA (ntohl (h->curint->address))
+             && !IN_CLASSB (ntohl (h->curint->address))
+             && !IN_CLASSC (ntohl (h->curint->address)))
+           {
+             if (IN_MULTICAST (ntohl (h->curint->address)))
+               FAIL (EINVAL, 1, 0,
+                     "%s: Cannot set interface address to multicast address",
+                     arg);
+             else
+               FAIL (EINVAL, 1, 0,
+                     "%s: Illegal or undefined network address", arg);
+           }
+       }
+      else
+       {
+         h->curint->address = ADDR ("0.0.0.0", "address");
+         h->curint->netmask = ADDR ("255.0.0.0", "netmask");
+         h->curint->gateway = INADDR_NONE;
        }
       break;
+
     case 'm':
-      h->curint->netmask = ADDR (arg, "netmask"); break;
+      if (arg)
+       h->curint->netmask = ADDR (arg, "netmask");
+      else
+       h->curint->netmask = INADDR_NONE;
+      break;
+
     case 'p':
-      h->curint->peer = ADDR (arg, "peer"); break;
+      if (arg)
+       h->curint->peer = ADDR (arg, "peer");
+      else
+       h->curint->peer = INADDR_NONE;
+      break;
+
     case 'g':
-      h->curint->gateway = ADDR (arg, "gateway"); break;
+      if (arg)
+       {
+         /* Remove an possible other default gateway */
+         for (in = h->interfaces; in < h->interfaces + h->num_interfaces;
+              in++)
+           in->gateway = INADDR_NONE;
+         h->curint->gateway = ADDR (arg, "gateway");
+       }
+      else
+       h->curint->gateway = INADDR_NONE;
+      break;
 
     case '4':
       pfinet_bind (PORTCLASS_INET, arg);
@@ -254,36 +341,46 @@ parse_opt (int opt, char *arg, struct argp_state *state)
       break;
 
     case 'A':
-      if ((ptr = strchr (arg, '/'))) 
+      if (arg)
        {
-         h->curint->address6.prefix_len = atoi (ptr + 1);
-         if (h->curint->address6.prefix_len > 128) 
-           FAIL (EINVAL, 1, 0, "%s: The prefix-length is invalid", arg);
+         if ((ptr = strchr (arg, '/')))
+           {
+             h->curint->address6.prefix_len = atoi (ptr + 1);
+             if (h->curint->address6.prefix_len > 128)
+               FAIL (EINVAL, 1, 0, "%s: The prefix-length is invalid", arg);
 
-         *ptr = 0;
-       }
-      else
-       {
-         h->curint->address6.prefix_len = 64;
-         fprintf (stderr, "No prefix-length given, defaulting to %s/64.\n",
-                  arg);
-       }
+             *ptr = 0;
+           }
+         else
+           {
+             h->curint->address6.prefix_len = 64;
+             fprintf (stderr, "No prefix-length given, "
+                      "defaulting to %s/64.\n", arg);
+           }
 
-      if (inet_pton (AF_INET6, arg, &h->curint->address6.addr) <= 0)
-       PERR (EINVAL, "Malformed address");
+         if (inet_pton (AF_INET6, arg, &h->curint->address6.addr) <= 0)
+           PERR (EINVAL, "Malformed address");
 
-      if (IN6_IS_ADDR_MULTICAST (&h->curint->address6.addr))
-       FAIL (EINVAL, 1, 0, "%s: Cannot set interface address to "
-             "multicast address", arg);
+         if (IN6_IS_ADDR_MULTICAST (&h->curint->address6.addr))
+           FAIL (EINVAL, 1, 0, "%s: Cannot set interface address to "
+                 "multicast address", arg);
+       }
+      else
+       memset (&h->curint->address6, 0, sizeof (struct inet6_ifaddr));
       break;
 
     case 'G':
-      if (inet_pton (AF_INET6, arg, &h->curint->gateway6) <= 0)
-       PERR (EINVAL, "Malformed gateway");
+      if (arg)
+       {
+         if (inet_pton (AF_INET6, arg, &h->curint->gateway6) <= 0)
+           PERR (EINVAL, "Malformed gateway");
 
-      if (IN6_IS_ADDR_MULTICAST (&h->curint->gateway6))
-       FAIL (EINVAL, 1, 0, "%s: Cannot set gateway to "
-             "multicast address", arg);
+         if (IN6_IS_ADDR_MULTICAST (&h->curint->gateway6))
+           FAIL (EINVAL, 1, 0, "%s: Cannot set gateway to "
+                 "multicast address", arg);
+       }
+      else
+       memset (&h->curint->gateway6, 0, sizeof (struct in6_addr));
       break;
 #endif /* CONFIG_IPV6 */
 
@@ -323,20 +420,19 @@ parse_opt (int opt, char *arg, struct argp_state *state)
          /* Specifying a netmask for an address-less interface is a no-no.  */
          FAIL (EDESTADDRREQ, 14, 0, "Cannot set netmask");
 #endif
-
-      gateway = INADDR_NONE;
 #ifdef CONFIG_IPV6
       gw6_in = NULL;
 #endif
+      gw4_in = NULL;
       for (in = h->interfaces; in < h->interfaces + h->num_interfaces; in++)
        {
+         /* delete interface if it doesn't match the actual netmask */
+         if (! ( (h->curint->address & h->curint->netmask)
+                 == (h->curint->gateway & h->curint->netmask)))
+           h->curint->gateway = INADDR_NONE;
+
          if (in->gateway != INADDR_NONE)
-           {
-             if (gateway != INADDR_NONE)
-               FAIL (err, 15, 0, "Cannot have multiple default gateways");
-             gateway = in->gateway;
-             in->gateway = INADDR_NONE;
-           }
+             gw4_in = in;
 
 #ifdef CONFIG_IPV6
          if (!IN6_IS_ADDR_UNSPECIFIED (&in->gateway6))
@@ -361,15 +457,20 @@ parse_opt (int opt, char *arg, struct argp_state *state)
            idev = ipv6_find_idev(in->device);
 #endif
 
-         if (in->address != INADDR_NONE || in->netmask != INADDR_NONE)
+         if (in->address == INADDR_NONE && in->netmask == INADDR_NONE)
+           {
+             h->curint->address = ADDR ("0.0.0.0", "address");
+             h->curint->netmask = ADDR ("255.0.0.0", "netmask");
+           }
+
+         if (in->device)
+           err = configure_device (in->device, in->address, in->netmask,
+                                   in->peer, INADDR_NONE);
+
+         if (err)
            {
-             err = configure_device (in->device, in->address, in->netmask,
-                                     in->peer, INADDR_NONE);
-             if (err)
-               {
-                 pthread_mutex_unlock (&global_lock);
-                 FAIL (err, 16, 0, "cannot configure interface");
-               }
+             pthread_mutex_unlock (&global_lock);
+             FAIL (err, 16, 0, "cannot configure interface");
            }
 
 #ifdef CONFIG_IPV6
@@ -384,7 +485,8 @@ parse_opt (int opt, char *arg, struct argp_state *state)
              struct inet6_ifaddr *c_ifa = ifa;
              ifa = ifa->if_next;
 
-             if (IN6_ARE_ADDR_EQUAL (&c_ifa->addr, &in->address6.addr))
+             if (!IN6_IS_ADDR_UNSPECIFIED (&in->address6.addr)
+                 && IN6_ARE_ADDR_EQUAL (&c_ifa->addr, &in->address6.addr))
                memset (&in->address6, 0, sizeof (struct inet6_ifaddr));
 
              else if (!IN6_IS_ADDR_LINKLOCAL (&c_ifa->addr)
@@ -418,33 +520,41 @@ parse_opt (int opt, char *arg, struct argp_state *state)
        req.nlh.nlmsg_seq = 0;
        req.nlh.nlmsg_len = NLMSG_LENGTH (sizeof req.rtm);
 
-       bzero (&req.rtm, sizeof req.rtm);
-       bzero (&rta, sizeof rta);
+       memset (&req.rtm, 0, sizeof req.rtm);
+       memset (&rta, 0, sizeof rta);
        req.rtm.rtm_scope = RT_SCOPE_UNIVERSE;
        req.rtm.rtm_type = RTN_UNICAST;
        req.rtm.rtm_protocol = RTPROT_STATIC;
-       rta.rta_gw = &gateway;
 
-       if (gateway == INADDR_NONE)
+       if (!gw4_in)
          {
-           /* Delete any existing default route.  */
-           req.nlh.nlmsg_type = RTM_DELROUTE;
-           req.nlh.nlmsg_flags = 0;
-           tb = fib_get_table (req.rtm.rtm_table);
-           if (tb)
+           /* Delete any existing default route on configured devices  */
+           for (in = h->interfaces; in < h->interfaces + h->num_interfaces;
+                in++)
              {
-               err = - (*tb->tb_delete) (tb, &req.rtm, &rta, &req.nlh, 0);
-               if (err && err != ESRCH)
+               req.nlh.nlmsg_type = RTM_DELROUTE;
+               req.nlh.nlmsg_flags = 0;
+               rta.rta_oif = &in->device->ifindex;
+               tb = fib_get_table (req.rtm.rtm_table);
+               if (tb)
                  {
-                   pthread_mutex_unlock (&global_lock);
-                   FAIL (err, 17, 0, "cannot remove old default gateway");
+                   err = - (*tb->tb_delete)
+                     (tb, &req.rtm, &rta, &req.nlh, 0);
+                   if (err && err != ESRCH)
+                     {
+                       pthread_mutex_unlock (&global_lock);
+                       FAIL (err, 17, 0,
+                             "cannot remove old default gateway");
+                     }
+                   err = 0;
                  }
-               err = 0;
              }
          }
        else
          {
            /* Add a default route, replacing any existing one.  */
+           rta.rta_oif = &gw4_in->device->ifindex;
+           rta.rta_gw = &gw4_in->gateway;
            req.nlh.nlmsg_type = RTM_NEWROUTE;
            req.nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE | NLM_F_REPLACE;
            tb = fib_new_table (req.rtm.rtm_table);
@@ -467,12 +577,76 @@ parse_opt (int opt, char *arg, struct argp_state *state)
          if (!gw6_in || rt6i->rt6i_dev != gw6_in->device
              || !IN6_ARE_ADDR_EQUAL (&rt6i->rt6i_gateway, &gw6_in->gateway6))
            {
-             rt6_purge_dflt_routers (0);
+             /* Delete any existing default route on configured devices  */
+             for (in = h->interfaces; in < h->interfaces
+                  + h->num_interfaces; in++)
+               if (rt6i->rt6i_dev == in->device || gw6_in )
+                 rt6_purge_dflt_routers (0);
+
              if (gw6_in)
                rt6_add_dflt_router (&gw6_in->gateway6, gw6_in->device);
            }
        }
-#endif       
+#endif
+
+      /* Setup the routing required for DHCP. */
+      for (in = h->interfaces; in < h->interfaces + h->num_interfaces; in++)
+       {
+         struct kern_rta rta;
+         struct
+         {
+           struct nlmsghdr nlh;
+           struct rtmsg rtm;
+         } req;
+         struct fib_table *tb;
+         struct rtentry route;
+         struct sockaddr_in *dst;
+         struct device *dev;
+
+         if (!in->device)
+           continue;
+
+         dst = (struct sockaddr_in *) &route.rt_dst;
+         if (!in->device->name)
+           {
+             pthread_mutex_unlock (&global_lock);
+             FAIL (ENODEV, 17, 0, "unknown device");
+           }
+         dev = dev_get (in->device->name);
+         if (!dev)
+           {
+             pthread_mutex_unlock (&global_lock);
+             FAIL (ENODEV, 17, 0, "unknown device");
+           }
+
+         /* Simulate the SIOCADDRT behavior.  */
+         memset (&route, 0, sizeof (struct rtentry));
+         memset (&req.rtm, 0, sizeof req.rtm);
+         memset (&rta, 0, sizeof rta);
+         req.nlh.nlmsg_type = RTM_NEWROUTE;
+
+         /* Append this routing for 0.0.0.0.  By this way we can send always
+            dhcp messages (e.g dhcp renew). */
+         req.nlh.nlmsg_flags = NLM_F_REQUEST | NLM_F_CREATE
+           | NLM_F_APPEND;
+         req.rtm.rtm_protocol = RTPROT_BOOT;
+         req.rtm.rtm_scope = RT_SCOPE_LINK;
+         req.rtm.rtm_type = RTN_UNICAST;
+         rta.rta_dst = &dst->sin_addr.s_addr;
+         rta.rta_oif = &dev->ifindex;
+
+         tb = fib_new_table (req.rtm.rtm_table);
+         if (tb)
+           err = tb->tb_insert (tb, &req.rtm, &rta, &req.nlh, NULL);
+         else
+           err = ENOBUFS;
+
+         if (err)
+           {
+             pthread_mutex_unlock (&global_lock);
+             FAIL (err, 17, 0, "cannot add route");
+           }
+       }
 
       pthread_mutex_unlock (&global_lock);
 
@@ -526,8 +700,9 @@ trivfs_append_args (struct trivfs_control *fsys, char 
**argz, size_t *argz_len)
         ADD_ADDR_OPT ("netmask", mask);
       if (peer != addr)
        ADD_ADDR_OPT ("peer", peer);
-      key.iif = dev->ifindex;
-      if (! main_table->tb_lookup (main_table, &key, &res)) 
+      key.oif = dev->ifindex;
+      if (! main_table->tb_lookup (main_table, &key, &res)
+          && FIB_RES_GW(res) != INADDR_ANY)
        ADD_ADDR_OPT ("gateway", FIB_RES_GW (res));
 
 #undef ADD_ADDR_OPT
diff --git a/pfinet/socket.c b/pfinet/socket.c
index 23a2dd9..06ce2c7 100644
--- a/pfinet/socket.c
+++ b/pfinet/socket.c
@@ -50,7 +50,7 @@ sock_alloc (void)
     return 0;
   c = (void *) &sock[1];
   pthread_cond_init (c, NULL);
-  bzero (sock, sizeof *sock);
+  memset (sock, 0, sizeof *sock);
   sock->state = SS_UNCONNECTED;
   sock->identity = MACH_PORT_NULL;
   sock->refcnt = 1;
diff --git a/pfinet/timer-emul.c b/pfinet/timer-emul.c
index f6760d7..2053f80 100644
--- a/pfinet/timer-emul.c
+++ b/pfinet/timer-emul.c
@@ -152,7 +152,7 @@ mod_timer (struct timer_list *timer, unsigned long expires)
 void
 init_timer (struct timer_list *timer)
 {
-  bzero (timer, sizeof (struct timer_list));
+  memset (timer, 0, sizeof(struct timer_list));
 }
 
 void
diff --git a/pfinet/tunnel.c b/pfinet/tunnel.c
index 6a7f355..02e9ee8 100644
--- a/pfinet/tunnel.c
+++ b/pfinet/tunnel.c
@@ -395,7 +395,7 @@ trivfs_S_io_write (struct trivfs_protid *cred,
   skb->len = datalen;
   skb->dev = &tdev->dev;
 
-  bcopy (data, skb->data, datalen);
+  memcpy (skb->data, data, datalen);
 
   /* Drop it on the queue. */
   skb->mac.raw = skb->data;
diff --git a/pflocal/io.c b/pflocal/io.c
index 00e859a..ee6fb84 100644
--- a/pflocal/io.c
+++ b/pflocal/io.c
@@ -19,7 +19,7 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
 
-#include <string.h>            /* For bzero() */
+#include <string.h>            /* For memset() */
 #include <unistd.h>
 #include <sys/types.h>
 #include <sys/fcntl.h>
@@ -319,7 +319,7 @@ S_io_stat (struct sock_user *user, struct stat *st)
 
   sock = user->sock;
 
-  bzero (st, sizeof (struct stat));
+  memset (st, 0, sizeof (struct stat));
 
   st->st_fstype = FSTYPE_SOCKET;
   st->st_mode = sock->mode;
diff --git a/proc/Makefile b/proc/Makefile
index aa31ffb..2275a66 100644
--- a/proc/Makefile
+++ b/proc/Makefile
@@ -27,9 +27,11 @@ SRCS = wait.c hash.c host.c info.c main.c mgt.c      
notify.c pgrp.c msg.c \
 MIGSFLAGS = -imacros $(srcdir)/mig-mutate.h
 
 MIGSTUBS = processServer.o notifyServer.o \
-       ourmsgUser.o proc_excUser.o proc_excServer.o
+       ourmsgUser.o proc_excUser.o proc_excServer.o \
+       task_notifyServer.o
 OBJS = $(SRCS:.c=.o) $(MIGSTUBS)
 HURDLIBS = ihash ports shouldbeinlibc
+
 OTHERLIBS = -lpthread
 
 include ../Makeconf
diff --git a/proc/main.c b/proc/main.c
index 3419d44..6df4141 100644
--- a/proc/main.c
+++ b/proc/main.c
@@ -22,6 +22,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 
02139, USA.  */
 #include <mach.h>
 #include <hurd/hurd_types.h>
 #include <hurd.h>
+#include <hurd/paths.h>
 #include <hurd/startup.h>
 #include <device/device.h>
 #include <assert.h>
@@ -31,6 +32,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 
02139, USA.  */
 #include <pids.h>
 
 #include "proc.h"
+#include "gnumach_U.h"
 
 const char *argp_program_version = STANDARD_HURD_VERSION (proc);
 
@@ -38,6 +40,7 @@ const char *argp_program_version = STANDARD_HURD_VERSION 
(proc);
 #include "notify_S.h"
 #include "../libports/interrupt_S.h"
 #include "proc_exc_S.h"
+#include "task_notify_S.h"
 
 int
 message_demuxer (mach_msg_header_t *inp,
@@ -47,7 +50,8 @@ message_demuxer (mach_msg_header_t *inp,
   if ((routine = process_server_routine (inp)) ||
       (routine = notify_server_routine (inp)) ||
       (routine = ports_interrupt_server_routine (inp)) ||
-      (routine = proc_exc_server_routine (inp)))
+      (routine = proc_exc_server_routine (inp)) ||
+      (routine = task_notify_server_routine (inp)))
     {
       pthread_mutex_lock (&global_lock);
       (*routine) (inp, outp);
@@ -59,6 +63,7 @@ message_demuxer (mach_msg_header_t *inp,
 }
 
 pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER;
+int startup_fallback;
 
 error_t
 increase_priority (void)
@@ -96,6 +101,7 @@ main (int argc, char **argv, char **envp)
   error_t err;
   void *genport;
   process_t startup_port;
+  mach_port_t startup;
   struct argp argp = { 0, 0, 0, "Hurd process server" };
 
   argp_parse (&argp, argc, argv, 0, 0, 0);
@@ -152,6 +158,12 @@ main (int argc, char **argv, char **envp)
   if (err)
     error (0, err, "Increasing priority failed");
 
+  err = register_new_task_notification (_hurd_host_priv,
+                                       generic_port,
+                                       MACH_MSG_TYPE_MAKE_SEND);
+  if (err)
+    error (0, err, "Registering task notifications failed");
+
   {
     /* Get our stderr set up to print on the console, in case we have
        to panic or something.  */
@@ -164,6 +176,26 @@ main (int argc, char **argv, char **envp)
     mach_port_deallocate (mach_task_self (), cons);
   }
 
+  startup = file_name_lookup (_SERVERS_STARTUP, 0, 0);
+  if (MACH_PORT_VALID (startup))
+    {
+      err = startup_essential_task (startup, mach_task_self (),
+                                   MACH_PORT_NULL, "proc", _hurd_host_priv);
+      if (err)
+       /* Due to the single-threaded nature of /hurd/startup, it can
+          only handle requests once the core server bootstrap has
+          completed.  Therefore, it does not bind itself to
+          /servers/startup until it is ready.  */
+       /* Fall back to abusing the message port lookup.  */
+       startup_fallback = 1;
+
+      err = mach_port_deallocate (mach_task_self (), startup);
+      assert_perror (err);
+    }
+  else
+    /* Fall back to abusing the message port lookup.   */
+    startup_fallback = 1;
+
   while (1)
     ports_manage_port_operations_multithread (proc_bucket,
                                              message_demuxer,
diff --git a/proc/mgt.c b/proc/mgt.c
index 02d69db..bf400ba 100644
--- a/proc/mgt.c
+++ b/proc/mgt.c
@@ -1,5 +1,5 @@
 /* Process management
-   Copyright (C) 1992,93,94,95,96,99,2000,01,02,13
+   Copyright (C) 1992,93,94,95,96,99,2000,01,02,13,14
      Free Software Foundation, Inc.
 
 This file is part of the GNU Hurd.
@@ -220,6 +220,13 @@ S_proc_child (struct proc *parentp,
       childp->end_code = parentp->end_code;
     }
 
+  if (MACH_PORT_VALID (parentp->p_task_namespace))
+    {
+      mach_port_mod_refs (mach_task_self (), parentp->p_task_namespace,
+                         MACH_PORT_RIGHT_SEND, +1);
+      childp->p_task_namespace = parentp->p_task_namespace;
+    }
+
   return 0;
 }
 
@@ -577,6 +584,7 @@ allocate_proc (task_t task)
 
   memset (&p->p_pi + 1, 0, sizeof *p - sizeof p->p_pi);
   p->p_task = task;
+  p->p_task_namespace = MACH_PORT_NULL;
   p->p_msgport = MACH_PORT_NULL;
 
   pthread_cond_init (&p->p_wakeup, NULL);
@@ -721,6 +729,16 @@ new_proc (task_t task)
   return p;
 }
 
+/* Used with prociterate to terminate all tasks in a task
+   namespace.  */
+static void
+namespace_terminate (struct proc *p, void *cookie)
+{
+  mach_port_t *namespacep = cookie;
+  if (p->p_task_namespace == *namespacep)
+    task_terminate (p->p_task);
+}
+
 /* The task associated with process P has died.  Drop most state,
    and then record us as dead.  Our parent will eventually complete the
    deallocation. */
@@ -751,13 +769,39 @@ process_has_exited (struct proc *p)
 
   ids_rele (p->p_id);
 
-  /* Reparent our children to init by attaching the head and tail
-     of our list onto init's.  */
+  /* Reparent our children to init by attaching the head and tail of
+     our list onto init's.  If the process is part of a task
+     namespace, reparent to the process that created the namespace
+     instead.  */
   if (p->p_ochild)
     {
+      struct proc *reparent_to = init_proc;
       struct proc *tp;         /* will point to the last one.  */
       int isdead = 0;
 
+      if (MACH_PORT_VALID (p->p_task_namespace))
+       {
+         for (tp = p;
+              MACH_PORT_VALID (tp->p_parent->p_task_namespace);
+              tp = tp->p_parent)
+           {
+             /* Walk up the process hierarchy until we find the
+                creator of the task namespace.  */
+           }
+
+         if (p == tp)
+           {
+             /* The creator of the task namespace died.  Terminate
+                all tasks.  */
+             prociterate (namespace_terminate, &p->p_task_namespace);
+
+             mach_port_deallocate (mach_task_self (), p->p_task_namespace);
+             p->p_task_namespace = MACH_PORT_NULL;
+           }
+         else
+           reparent_to = tp;
+       }
+
       /* first tell them their parent is changing */
       for (tp = p->p_ochild; tp->p_sib; tp = tp->p_sib)
        {
@@ -765,7 +809,7 @@ process_has_exited (struct proc *p)
            nowait_msg_proc_newids (tp->p_msgport, tp->p_task,
                                    1, tp->p_pgrp->pg_pgid,
                                    !tp->p_pgrp->pg_orphcnt);
-         tp->p_parent = init_proc;
+         tp->p_parent = reparent_to;
          if (tp->p_dead)
            isdead = 1;
        }
@@ -773,17 +817,17 @@ process_has_exited (struct proc *p)
        nowait_msg_proc_newids (tp->p_msgport, tp->p_task,
                                1, tp->p_pgrp->pg_pgid,
                                !tp->p_pgrp->pg_orphcnt);
-      tp->p_parent = init_proc;
+      tp->p_parent = reparent_to;
 
       /* And now append the lists. */
-      tp->p_sib = init_proc->p_ochild;
+      tp->p_sib = reparent_to->p_ochild;
       if (tp->p_sib)
        tp->p_sib->p_prevsib = &tp->p_sib;
-      init_proc->p_ochild = p->p_ochild;
-      p->p_ochild->p_prevsib = &init_proc->p_ochild;
+      reparent_to->p_ochild = p->p_ochild;
+      p->p_ochild->p_prevsib = &reparent_to->p_ochild;
 
       if (isdead)
-       alert_parent (init_proc);
+       alert_parent (reparent_to);
     }
 
   /* If an operation is in progress for this process, cause it
@@ -795,6 +839,23 @@ process_has_exited (struct proc *p)
 
   /* Cancel any outstanding RPCs done on behalf of the dying process.  */
   ports_interrupt_rpcs (p);
+
+  /* No one is going to wait for processes in a task namespace.  */
+  if (MACH_PORT_VALID (p->p_task_namespace))
+    {
+      mach_port_t task;
+      mach_port_deallocate (mach_task_self (), p->p_task_namespace);
+      p->p_waited = 1;
+
+      /* XXX: `complete_exit' will destroy p->p_task if it is valid.
+        Prevent this so that `do_mach_notify_dead_name' can
+        deallocate the right.  The proper fix is not to use
+        mach_port_destroy in the first place.  */
+      task = p->p_task;
+      p->p_task = MACH_PORT_NULL;
+      complete_exit (p);
+      mach_port_deallocate (mach_task_self (), task);
+    }
 }
 
 void
@@ -981,3 +1042,69 @@ S_proc_get_code (struct proc *callerp,
 
   return 0;
 }
+
+/* Handle new task notifications from the kernel.  */
+error_t
+S_mach_notify_new_task (mach_port_t notify,
+                       mach_port_t task,
+                       mach_port_t parent)
+{
+  struct proc *parentp, *childp;
+
+  if (notify != generic_port)
+    return EOPNOTSUPP;
+
+  parentp = task_find_nocreate (parent);
+  if (! parentp)
+    {
+      mach_port_deallocate (mach_task_self (), task);
+      mach_port_deallocate (mach_task_self (), parent);
+      return ESRCH;
+    }
+
+  childp = task_find_nocreate (task);
+  if (! childp)
+    {
+      mach_port_mod_refs (mach_task_self (), task, MACH_PORT_RIGHT_SEND, +1);
+      childp = new_proc (task);
+    }
+
+  if (MACH_PORT_VALID (parentp->p_task_namespace))
+    {
+      error_t err;
+      /* Tasks in a task namespace are not expected to call
+        proc_child, so we do it on their behalf.  */
+      mach_port_mod_refs (mach_task_self (), task, MACH_PORT_RIGHT_SEND, +1);
+      err = S_proc_child (parentp, task);
+      if (! err)
+       /* Relay the notification.  This consumes TASK and PARENT.  */
+       return mach_notify_new_task (childp->p_task_namespace, task, parent);
+    }
+
+  mach_port_deallocate (mach_task_self (), task);
+  mach_port_deallocate (mach_task_self (), parent);
+  return 0;
+}
+
+/* Implement proc_make_task_namespace as described in
+   <hurd/process.defs>.  */
+error_t
+S_proc_make_task_namespace (struct proc *callerp,
+                           mach_port_t notify)
+{
+  if (! callerp)
+    return EOPNOTSUPP;
+
+  if (! MACH_PORT_VALID (notify))
+    return EINVAL;
+
+  if (MACH_PORT_VALID (callerp->p_task_namespace))
+    {
+      mach_port_deallocate (mach_task_self (), notify);
+      return EBUSY;
+    }
+
+  callerp->p_task_namespace = notify;
+
+  return 0;
+}
diff --git a/proc/msg.c b/proc/msg.c
index 796cae3..c7bab99 100644
--- a/proc/msg.c
+++ b/proc/msg.c
@@ -63,7 +63,7 @@ S_proc_setmsgport (struct proc *p,
     prociterate (check_message_return, p);
   p->p_checkmsghangs = 0;
 
-  if (p == startup_proc)
+  if (p == startup_proc && startup_fallback)
     {
     /* Init is single threaded, so we can't delay our reply for
        the essential task RPC; spawn a thread to do it. */
diff --git a/proc/proc.h b/proc/proc.h
index 6196697..4be1de4 100644
--- a/proc/proc.h
+++ b/proc/proc.h
@@ -58,6 +58,10 @@ struct proc
   /* Process group structure */
   struct pgrp *p_pgrp;
 
+  /* Processes may live in a task namespace identified by the
+     notification port registered by proc_make_task_namespace.  */
+  mach_port_t p_task_namespace;        /* send right */
+
   /* Communication */
   mach_port_t p_msgport;       /* send right */
 
@@ -147,6 +151,8 @@ mach_port_t generic_port;   /* messages not related to a 
specific proc */
 
 pthread_mutex_t global_lock;
 
+extern int startup_fallback;   /* (ab)use /hurd/startup's message port */
+
 /* Forward declarations */
 void complete_wait (struct proc *, int);
 int check_uid (struct proc *, uid_t);
diff --git a/procfs/TODO b/procfs/TODO
index 952d67b..90e4420 100644
--- a/procfs/TODO
+++ b/procfs/TODO
@@ -12,7 +12,7 @@ Improvements and new features
   keeps the inner interface simple and preserves the read/readdir semantics
   (performance is probably not critical for a proc filesystem.)
   One way would be to add an (optional) "needed_length" field to
-  procfs_node_ops, and arrange to pass a sufficent buffer in (*contents,
+  procfs_node_ops, and arrange to pass a sufficient buffer in (*contents,
   *contents_len) when get_contents is called. Then the user-provided buffer
   might be used directly under some circumstances.
 
diff --git a/procfs/main.c b/procfs/main.c
index 320f55b..d07dea8 100644
--- a/procfs/main.c
+++ b/procfs/main.c
@@ -154,7 +154,7 @@ struct argp_option common_options[] = {
       "purposes.  If PID is omitted, \"self\" will point to init.  "
       "(default: no self link)" },
   { "kernel-process", 'k', "PID", 0,
-      "Process identifier for the kernel, used to retreive its command "
+      "Process identifier for the kernel, used to retrieve its command "
       "line, as well as the global up and idle times. "
       "(default: " STR (OPT_KERNEL_PID) ")" },
   { "compatible", 'c', NULL, 0,
diff --git a/procfs/process.c b/procfs/process.c
index a9b1a59..2255bcd 100644
--- a/procfs/process.c
+++ b/procfs/process.c
@@ -33,7 +33,7 @@
    contain.  A libps proc_stat structure is created for each process
    node, and is used by the individual file content generators as a
    source of information.  Each possible file (cmdline, environ, ...) is
-   decribed in a process_file_desc structure, which specifies which bits
+   described in a process_file_desc structure, which specifies which bits
    of information (ie. libps flags) it needs, and what function should
    be used to generate the file's contents.
 
@@ -235,7 +235,7 @@ process_file_gc_stat (struct proc_stat *ps, char **contents)
   return asprintf (contents,
       "%d (%.*s) %c "          /* pid, command, state */
       "%d %d %d "              /* ppid, pgid, session */
-      "%d %d "                 /* controling tty stuff */
+      "%d %d "                 /* controlling tty stuff */
       "%u "                    /* flags, as defined by <linux/sched.h> */
       "%lu %lu %lu %lu "       /* page fault counts */
       "%lu %lu %ld %ld "       /* user/sys times, in sysconf(_SC_CLK_TCK) */
diff --git a/procfs/procfs.h b/procfs/procfs.h
index d04bbad..f2fb30e 100644
--- a/procfs/procfs.h
+++ b/procfs/procfs.h
@@ -81,7 +81,7 @@ void procfs_node_chtype (struct node *np, mode_t type);
 /* Interface for the libnetfs side. */
 
 /* Get the inode number which will be given to a child of NP named FILENAME.
-   This allows us to retreive them for readdir() without creating the
+   This allows us to retrieve them for readdir() without creating the
    corresponding child nodes.  */
 ino64_t procfs_make_ino (struct node *np, const char *filename);
 
diff --git a/random/gnupg-random.c b/random/gnupg-random.c
index 8f30862..54ee3c5 100644
--- a/random/gnupg-random.c
+++ b/random/gnupg-random.c
@@ -592,7 +592,7 @@ read_pool( byte *buffer, size_t length, int level )
        mix_pool(rndpool); rndstats.mixrnd++;
        mix_pool(keypool); rndstats.mixkey++;
        /* read the required data
-        * we use a readpoiter to read from a different postion each
+        * we use a readpointer to read from a different position each
         * time */
 #ifdef __HURD__
        if (level == 2 && length > pool_balance)
@@ -722,7 +722,7 @@ fast_random_poll()
     }
     #endif
   #endif
-    /* time and clock are availabe on all systems - so
+    /* time and clock are available on all systems - so
      * we better do it just in case one of the above functions
      * didn't work */
     {  time_t x = time(NULL);
diff --git a/startup/startup.c b/startup/startup.c
index e177075..da78b13 100644
--- a/startup/startup.c
+++ b/startup/startup.c
@@ -33,6 +33,7 @@
 #include <sys/file.h>
 #include <unistd.h>
 #include <string.h>
+#include <mach/gnumach.h>
 #include <mach/notify.h>
 #include <stdlib.h>
 #include <hurd/msg.h>
@@ -376,6 +377,7 @@ run (const char *server, mach_port_t *ports, task_t *task)
              printf ("Pausing for %s\n", prog);
              getchar ();
            }
+          task_set_name (*task, (char *) prog);
          err = file_exec (file, *task, 0,
                           (char *)prog, strlen (prog) + 1, /* Args.  */
                           startup_envz, startup_envz_len,
@@ -512,6 +514,32 @@ demuxer (mach_msg_header_t *inp,
          startup_server (inp, outp));
 }
 
+error_t
+install_as_translator (void)
+{
+  error_t err;
+  file_t node;
+
+  node = file_name_lookup (_SERVERS_STARTUP, O_NOTRANS, 0);
+  if (! MACH_PORT_VALID (node))
+    {
+      if (errno == ENOENT)
+       {
+         /* Degrade gracefully if the node does not exist.  */
+         error (0, errno, "%s", _SERVERS_STARTUP);
+         return 0;
+       }
+      return errno;
+    }
+
+  err = file_set_translator (node,
+                            0, FS_TRANS_SET, 0,
+                            NULL, 0,
+                            startup, MACH_MSG_TYPE_COPY_SEND);
+  mach_port_deallocate (mach_task_self (), node);
+  return err;
+}
+
 static int
 parse_opt (int key, char *arg, struct argp_state *state)
 {
@@ -585,18 +613,6 @@ main (int argc, char **argv, char **envp)
   /* Crash if the boot filesystem task dies.  */
   request_dead_name (fstask);
 
-  file_t node = file_name_lookup (_SERVERS_STARTUP, O_NOTRANS, 0);
-  if (node == MACH_PORT_NULL)
-    error (0, errno, "%s", _SERVERS_STARTUP);
-  else
-    {
-      file_set_translator (node,
-                          0, FS_TRANS_SET, 0,
-                          NULL, 0,
-                          startup, MACH_MSG_TYPE_COPY_SEND);
-      mach_port_deallocate (mach_task_self (), node);
-    }
-
   /* Set up the set of ports we will pass to the programs we exec.  */
   for (i = 0; i < INIT_PORT_MAX; i++)
     switch (i)
@@ -649,10 +665,11 @@ launch_core_servers (void)
   error_t err;
 
   /* Reply to the proc and auth servers.   */
-  startup_procinit_reply (procreply, procreplytype, 0,
-                         mach_task_self (), authserver,
-                         host_priv, MACH_MSG_TYPE_COPY_SEND,
-                         device_master, MACH_MSG_TYPE_COPY_SEND);
+  err = startup_procinit_reply (procreply, procreplytype, 0,
+                               mach_task_self (), authserver,
+                               host_priv, MACH_MSG_TYPE_COPY_SEND,
+                               device_master, MACH_MSG_TYPE_COPY_SEND);
+  assert_perror (err);
   if (!fakeboot)
     {
       mach_port_deallocate (mach_task_self (), device_master);
@@ -660,19 +677,34 @@ launch_core_servers (void)
     }
 
   /* Mark us as important.  */
-  proc_mark_important (procserver);
-  proc_mark_exec (procserver);
+  err = proc_mark_important (procserver);
+  assert_perror (err);
+  err = proc_mark_exec (procserver);
+  assert_perror (err);
 
   /* Declare that the filesystem and auth are our children. */
-  proc_child (procserver, fstask);
-  proc_child (procserver, authtask);
+  err = proc_child (procserver, fstask);
+  assert_perror (err);
+  err = proc_child (procserver, authtask);
+  assert_perror (err);
 
-  proc_task2proc (procserver, authtask, &authproc);
-  proc_mark_important (authproc);
-  proc_mark_exec (authproc);
-  startup_authinit_reply (authreply, authreplytype, 0, authproc,
-                         MACH_MSG_TYPE_COPY_SEND);
-  mach_port_deallocate (mach_task_self (), authproc);
+  err = proc_task2proc (procserver, authtask, &authproc);
+  assert_perror (err);
+  err = proc_mark_important (authproc);
+  assert_perror (err);
+  err = proc_mark_exec (authproc);
+  assert_perror (err);
+
+  err = install_as_translator ();
+  if (err)
+    /* Good luck.  Who knows, maybe it's an old installation.  */
+    error (0, err, "Failed to bind to " _SERVERS_STARTUP);
+
+  err = startup_authinit_reply (authreply, authreplytype, 0, authproc,
+                               MACH_MSG_TYPE_COPY_SEND);
+  assert_perror (err);
+  err = mach_port_deallocate (mach_task_self (), authproc);
+  assert_perror (err);
 
   /* Give the library our auth and proc server ports.  */
   _hurd_port_set (&_hurd_ports[INIT_PORT_AUTH], authserver);
@@ -681,13 +713,16 @@ launch_core_servers (void)
   /* Do NOT run _hurd_proc_init!  That will start signals, which we do not
      want.  We listen to our own message port.  Tell the proc server where
      our args and environment are.  */
-  proc_set_arg_locations (procserver,
-                         (vm_address_t) global_argv, (vm_address_t) environ);
+  err = proc_set_arg_locations (procserver,
+                               (vm_address_t) global_argv,
+                               (vm_address_t) environ);
+  assert_perror (err);
 
   default_ports[INIT_PORT_AUTH] = authserver;
 
   /* Declare that the proc server is our child.  */
-  proc_child (procserver, proctask);
+  err = proc_child (procserver, proctask);
+  assert_perror (err);
   err = proc_task2proc (procserver, proctask, &procproc);
   if (!err)
     {
@@ -696,13 +731,18 @@ launch_core_servers (void)
       mach_port_deallocate (mach_task_self (), procproc);
     }
 
-  proc_register_version (procserver, host_priv, "init", "", HURD_VERSION);
+  err = proc_register_version (procserver, host_priv,
+                              "init", "", HURD_VERSION);
+  assert_perror (err);
 
   /* Get the bootstrap filesystem's proc server port.
      We must do this before calling proc_setmsgport below.  */
-  proc_task2proc (procserver, fstask, &fsproc);
-  proc_mark_important (fsproc);
-  proc_mark_exec (fsproc);
+  err = proc_task2proc (procserver, fstask, &fsproc);
+  assert_perror (err);
+  err = proc_mark_important (fsproc);
+  assert_perror (err);
+  err = proc_mark_exec (fsproc);
+  assert_perror (err);
 
 #if 0
   printf ("Init has completed.\n");
@@ -717,7 +757,8 @@ launch_core_servers (void)
      before accepting more RPC requests!  However, we must do this before
      calling fsys_init, because fsys_init blocks on exec_init, and
      exec_init will block waiting on our message port.  */
-  proc_setmsgport (procserver, startup, &old);
+  err = proc_setmsgport (procserver, startup, &old);
+  assert_perror (err);
   if (old != MACH_PORT_NULL)
     mach_port_deallocate (mach_task_self (), old);
 
@@ -742,8 +783,8 @@ init_stdarrays ()
   std_port_array = alloca (sizeof (mach_port_t) * INIT_PORT_MAX);
   std_int_array = alloca (sizeof (int) * INIT_INT_MAX);
 
-  bzero (std_port_array, sizeof (mach_port_t) * INIT_PORT_MAX);
-  bzero (std_int_array, sizeof (int) * INIT_INT_MAX);
+  memset (std_port_array, 0, sizeof(mach_port_t) * INIT_PORT_MAX);
+  memset (std_int_array, 0, sizeof(int) * INIT_INT_MAX);
 
   __USEPORT (AUTH, auth_makeauth (port, 0, MACH_MSG_TYPE_COPY_SEND, 0,
                                  0, 0, 0, 0, 0, 0, 0, 0, &nullauth));
diff --git a/storeio/dev.c b/storeio/dev.c
index 8f520cd..614c257 100644
--- a/storeio/dev.c
+++ b/storeio/dev.c
@@ -336,7 +336,7 @@ dev_write (struct dev *dev, off_t offs, void *buf, size_t 
len,
 {
   error_t buf_write (size_t buf_offs, size_t io_offs, size_t len)
     {
-      bcopy (buf + io_offs, dev->buf + buf_offs, len);
+      memcpy (dev->buf + buf_offs, buf + io_offs, len);
       dev->buf_dirty = 1;
       return 0;
     }
@@ -398,7 +398,7 @@ dev_read (struct dev *dev, off_t offs, size_t whole_amount,
     {
       error_t err = ensure_buf ();
       if (! err)
-       bcopy (dev->buf + buf_offs, *buf + io_offs, len);
+       memcpy (*buf + io_offs, dev->buf + buf_offs, len);
       return err;
     }
   error_t raw_read (off_t offs, size_t io_offs, size_t len, size_t *amount)
@@ -424,7 +424,7 @@ dev_read (struct dev *dev, off_t offs, size_t whole_amount,
                  if (req_buf != _req_buf)
                    /* Copy from wherever the read put it. */
                    {
-                     bcopy (req_buf, _req_buf, req_len);
+                     memcpy (_req_buf, req_buf, req_len);
                      munmap (req_buf, req_len);
                    }
                  *amount = req_len;
diff --git a/storeio/storeio.c b/storeio/storeio.c
index eb38349..fcf2f30 100644
--- a/storeio/storeio.c
+++ b/storeio/storeio.c
@@ -99,7 +99,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
     case ARGP_KEY_INIT:
       /* Now store_argp's parser will get to initialize its state.
         The default_type member is our input parameter to it.  */
-      bzero (&params->store_params, sizeof params->store_params);
+      memset (&params->store_params, 0, sizeof params->store_params);
       params->store_params.default_type = "device";
       params->store_params.store_optional = 1;
       state->child_inputs[0] = &params->store_params;
@@ -128,7 +128,7 @@ main (int argc, char *argv[])
   struct dev device;
   struct storeio_argp_params params;
 
-  bzero (&device, sizeof device);
+  memset (&device, 0, sizeof device);
   pthread_mutex_init (&device.lock, NULL);
 
   params.dev = &device;
diff --git a/sutils/fstab.c b/sutils/fstab.c
index e13f15b..24a1a0d 100644
--- a/sutils/fstab.c
+++ b/sutils/fstab.c
@@ -600,7 +600,7 @@ fstab_add_mntent (struct fstab *const fstab, const struct 
mntent *mntent,
       fs = malloc (sizeof (struct fs));
       if (fs)
        {
-         bzero (fs, sizeof (struct fs));
+         memset (fs, 0, sizeof(struct fs));
          fs->mounted = fs->readonly = -1;
          fs->fsys = MACH_PORT_NULL;
          new = 1;
@@ -783,7 +783,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
       /* Initialize our parsing state.  */
       if (! params)
        return EINVAL;  /* Need at least a way to return a result.  */
-      bzero (params, sizeof *params);
+      memset (params, 0, sizeof *params);
       break;
 
     case 'A':
diff --git a/usermux/usermux.c b/usermux/usermux.c
index fad923c..e89177b 100644
--- a/usermux/usermux.c
+++ b/usermux/usermux.c
@@ -84,10 +84,11 @@ main (int argc, char **argv)
        case OPT_USER_PAT: mux.user_pat = arg; break;
        case OPT_HOME_PAT: mux.home_pat = arg; break;
        case OPT_UID_PAT: mux.uid_pat = arg; break;
-       case 'C': bzero (&mux, sizeof mux); break;
+       case 'C': memset (&mux, 0, sizeof mux); break;
 
        case ARGP_KEY_NO_ARGS:
-         bzero (&mux, sizeof mux); /* Default doesn't use them; be careful. */
+         memset (&mux, 0, sizeof mux); /* Default doesn't use them;
+                                          be careful. */
          return argz_create_sep (_HURD_SYMLINK, 0,
                                  &mux.trans_template, &mux.trans_template_len);
        case ARGP_KEY_ARGS:
diff --git a/utils/fakeauth.c b/utils/fakeauth.c
index 590a421..ba6a3ee 100644
--- a/utils/fakeauth.c
+++ b/utils/fakeauth.c
@@ -50,7 +50,7 @@ create_authhandle (struct authhandle **new)
   error_t err = ports_create_port (authhandle_portclass, auth_bucket,
                                   sizeof **new, new);
   if (! err)
-    bzero (&(*new)->euids, (void *) &(*new)[1] - (void *) &(*new)->euids);
+    memset (&(*new)->euids, 0, (void *)&(*new)[1] - (void *)&(*new)->euids);
   return err;
 }
 
diff --git a/utils/frobauth.c b/utils/frobauth.c
index 44690d8..5de7720 100644
--- a/utils/frobauth.c
+++ b/utils/frobauth.c
@@ -123,7 +123,7 @@ common_parse_opt (int key, char *arg, struct argp_state 
*state)
       break;
 
     case ARGP_KEY_INIT:
-      bzero (fs, sizeof *fs);
+      memset (fs, 0, sizeof *fs);
       fs->frobauth = frobauth;
       fs->pids_argp_params.pids = &frobauth->pids;
       fs->pids_argp_params.num_pids = &frobauth->num_pids;
diff --git a/utils/login.c b/utils/login.c
index a3e0563..9ee296a 100644
--- a/utils/login.c
+++ b/utils/login.c
@@ -158,7 +158,7 @@ add_utmp_entry (char *args, unsigned args_len, int 
inherit_host)
   char const *host = 0;
   long addr = 0;
 
-  bzero (&utmp, sizeof (utmp));
+  memset (&utmp, 0, sizeof(utmp));
 
   gettimeofday (&utmp.ut_tv, 0);
   strncpy (utmp.ut_name, envz_get (args, args_len, "USER") ?: "",
@@ -683,7 +683,7 @@ main(int argc, char *argv[])
     proc_setowner (proc_server, 0, 1); /* Clear the owner.  */
 
   /* Now start constructing the exec arguments.  */
-  bzero (ints, sizeof (*ints) * INIT_INT_MAX);
+  memset (ints, 0, sizeof (*ints) * INIT_INT_MAX);
   arg = envz_get (args, args_len, "UMASK");
   ints[INIT_UMASK] = arg && *arg ? strtoul (arg, 0, 8) : umask (0);
 
diff --git a/utils/rpctrace.c b/utils/rpctrace.c
index 62d3c87..48daa07 100644
--- a/utils/rpctrace.c
+++ b/utils/rpctrace.c
@@ -404,7 +404,8 @@ new_receiver_info (mach_port_t right, mach_port_t owner)
                                        MACH_MSG_TYPE_MAKE_SEND_ONCE, &foo);
   if (err)
     error (2, err, "mach_port_request_notification");
-  mach_port_deallocate (mach_task_self (), foo);
+  if (MACH_PORT_VALID (foo))
+    mach_port_deallocate (mach_task_self (), foo);
 
   err = hurd_ihash_add (&traced_names, info->forward, info);
   if (err)
diff --git a/utils/x.c b/utils/x.c
index 7bbc8ac..518f384 100644
--- a/utils/x.c
+++ b/utils/x.c
@@ -228,8 +228,8 @@ main(int argc, char *argv[])
     }
   struct argp argp = {options, parse_opt, args_doc, doc};
 
-  bzero (add, sizeof add);
-  bzero (remove, sizeof remove);
+  memset (add, 0, sizeof add);
+  memset (remove, 0, sizeof remove);
 
 
   err =

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]