/[hurd]/hurd/libnetfs/init-startup.c
ViewVC logotype

Diff of /hurd/libnetfs/init-startup.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.4 by thomas, Fri Mar 17 17:21:45 2000 UTC revision 1.5 by neal, Sun Mar 10 03:05:08 2002 UTC
# Line 1  Line 1 
1  /*  /*
2     Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc.     Copyright (C) 1996,97,2000,02 Free Software Foundation, Inc.
3     Written by Michael I. Bushnell, p/BSG.     Written by Michael I. Bushnell, p/BSG.
4    
5     This file is part of the GNU Hurd.     This file is part of the GNU Hurd.
# Line 26  Line 26 
26  mach_port_t  mach_port_t
27  netfs_startup (mach_port_t bootstrap, int flags)  netfs_startup (mach_port_t bootstrap, int flags)
28  {  {
29      error_t err;
30    mach_port_t realnode, right;    mach_port_t realnode, right;
31    struct port_info *newpi;    struct port_info *newpi;
32        
33    if (bootstrap == MACH_PORT_NULL)    if (bootstrap == MACH_PORT_NULL)
34      error (10, 0, "Must be started as a translator");      error (10, 0, "Must be started as a translator");
35    
36    errno = ports_create_port (netfs_control_class, netfs_port_bucket,    err = ports_create_port (netfs_control_class, netfs_port_bucket,
37                               sizeof (struct port_info), &newpi);                               sizeof (struct port_info), &newpi);
38    if (!errno)    if (!err)
39      {      {
40        right = ports_get_send_right (newpi);        right = ports_get_send_right (newpi);
41        errno = fsys_startup (bootstrap, flags, right, MACH_MSG_TYPE_COPY_SEND,        err = fsys_startup (bootstrap, flags, right, MACH_MSG_TYPE_COPY_SEND,
42                              &realnode);                              &realnode);
43        mach_port_deallocate (mach_task_self (), right);        mach_port_deallocate (mach_task_self (), right);
44        ports_port_deref (newpi);        ports_port_deref (newpi);
45      }      }
46    if (errno)    if (err)
47      error (11, errno, "Translator startup failure: fsys_startup");      error (11, err, "Translator startup failure: fsys_startup");
48    
49    mach_port_deallocate (mach_task_self (), bootstrap);    mach_port_deallocate (mach_task_self (), bootstrap);
50    

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26