/[hurd]/hurd/console/main.c
ViewVC logotype

Diff of /hurd/console/main.c

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

revision 1.1 by marcus, Sun Mar 17 18:04:49 2002 UTC revision 1.2 by roland, Mon Mar 18 06:57:51 2002 UTC
# Line 21  Line 21 
21  #include <hurd.h>  #include <hurd.h>
22  #include <fcntl.h>  #include <fcntl.h>
23  #include <hurd/trivfs.h>  #include <hurd/trivfs.h>
24    #include <hurd/fsys.h>
25  #include <stdio.h>  #include <stdio.h>
26  #include <argp.h>  #include <argp.h>
27  #include <hurd/fsys.h>  #include <error.h>
28  #include <string.h>  #include <string.h>
29    
30  #include <version.h>  #include <version.h>
# Line 45  int trivfs_support_exec = 0; Line 46  int trivfs_support_exec = 0;
46  int trivfs_allow_open = O_READ|O_WRITE;  int trivfs_allow_open = O_READ|O_WRITE;
47    
48  /* Properties of the underlying node.  */  /* Properties of the underlying node.  */
49  int console_mode;  mode_t console_mode;
50  int console_owner;  uid_t console_owner;
51  int console_group;  gid_t console_group;
52    
53  /* The argument line options.  */  /* The argument line options.  */
54  struct  struct
# Line 125  main (int argc, char **argv) Line 126  main (int argc, char **argv)
126    struct stat st;    struct stat st;
127    
128    argp_parse (&main_argp, argc, argv, 0, 0, 0);    argp_parse (&main_argp, argc, argv, 0, 0, 0);
129      
130    task_get_bootstrap_port (mach_task_self (), &bootstrap);    task_get_bootstrap_port (mach_task_self (), &bootstrap);
131    if (bootstrap == MACH_PORT_NULL)    if (bootstrap == MACH_PORT_NULL)
132      {      {
# Line 137  main (int argc, char **argv) Line 138  main (int argc, char **argv)
138    err = trivfs_startup (bootstrap, 0, 0, 0, 0, 0, &fsys);    err = trivfs_startup (bootstrap, 0, 0, 0, 0, 0, &fsys);
139    mach_port_deallocate (mach_task_self (), bootstrap);    mach_port_deallocate (mach_task_self (), bootstrap);
140    if (err)    if (err)
141      {      error (1, err, "Starting translator");
       perror ("Starting translator");  
       exit (1);  
     }  
142    
143    /* Initialize status from underlying node.  */    /* Initialize status from underlying node.  */
144    err = io_stat (fsys->underlying, &st);    err = io_stat (fsys->underlying, &st);
# Line 164  main (int argc, char **argv) Line 162  main (int argc, char **argv)
162                                              0, 0, 0);                                              0, 0, 0);
163    
164    return 0;    return 0;
165  }    }
   
166    
167  kern_return_t  kern_return_t
168  S_tioctl_tiocflush (struct trivfs_protid *cred, int queue_selector)  S_tioctl_tiocflush (struct trivfs_protid *cred, int queue_selector)
# Line 183  S_tioctl_tiocflush (struct trivfs_protid Line 180  S_tioctl_tiocflush (struct trivfs_protid
180    
181    if (queue_selector & O_READ)    if (queue_selector & O_READ)
182      vcons_flush_input (vcons);      vcons_flush_input (vcons);
183    if (queue_selector & O_WRITE)     if (queue_selector & O_WRITE)
184      vcons_discard_output (vcons);      vcons_discard_output (vcons);
185    
186    return 0;    return 0;

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