/[hurd]/hurd/libcons/init-init.c
ViewVC logotype

Diff of /hurd/libcons/init-init.c

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

revision 1.1 by marcus, Thu Aug 22 19:24:19 2002 UTC revision 1.2 by marcus, Sun Sep 8 21:55:59 2002 UTC
# Line 18  Line 18 
18     along with this program; if not, write to the Free Software     along with this program; if not, write to the Free Software
19     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA. */     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA. */
20    
   
21  #include <errno.h>  #include <errno.h>
22  #include <malloc.h>  #include <malloc.h>
23    
# Line 30  Line 29 
29  #include "cons.h"  #include "cons.h"
30  #include "priv.h"  #include "priv.h"
31    
32    struct port_bucket *cons_port_bucket;  struct port_bucket *cons_port_bucket;
33    struct port_class *cons_port_class;  struct port_class *cons_port_class;
34    
35    
36  error_t  error_t
37  cons_init (void)  cons_init (void)
38  {  {
# Line 45  cons_init (void) Line 45  cons_init (void)
45    if (!cons_port_bucket)    if (!cons_port_bucket)
46      return errno;      return errno;
47    
48    cons_port_class = ports_create_class (NULL, NULL);    cons_port_class = ports_create_class (cons_vcons_destroy, NULL);
49    if (!cons_port_class)    if (!cons_port_class)
50      return errno;      return errno;
51    
# Line 56  cons_init (void) Line 56  cons_init (void)
56    mutex_init (&cons->lock);    mutex_init (&cons->lock);
57    cons->vcons_list = NULL;    cons->vcons_list = NULL;
58    cons->vcons_last = NULL;    cons->vcons_last = NULL;
   cons->active = NULL;  
59    cons->dir = opendir (_cons_file);    cons->dir = opendir (_cons_file);
60    cons->slack = _cons_slack;    cons->slack = _cons_slack;
61    if (!cons->dir)    if (!cons->dir)
# Line 83  cons_init (void) Line 82  cons_init (void)
82        return err;        return err;
83      }      }
84    dir_notify_port->cons = cons;    dir_notify_port->cons = cons;
   dir_notify_port->vcons = NULL;  
85    
86    dir_notify = ports_get_right (dir_notify_port);    dir_notify = ports_get_right (dir_notify_port);
87    err = dir_notice_changes (cons->dirport, dir_notify,    err = dir_notice_changes (cons->dirport, dir_notify,

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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