/[hurd]/hurd/exec/exec.c
ViewVC logotype

Diff of /hurd/exec/exec.c

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

revision 1.84 by roland, Sat Apr 27 21:21:42 2002 UTC revision 1.85 by roland, Fri May 10 21:53:44 2002 UTC
# Line 740  prepare (file_t file, struct execdata *e Line 740  prepare (file_t file, struct execdata *e
740        e->filemap = rd;        e->filemap = rd;
741    
742        e->error = /* io_map_cntl (file, &e->cntlmap) */ EOPNOTSUPP; /* XXX */        e->error = /* io_map_cntl (file, &e->cntlmap) */ EOPNOTSUPP; /* XXX */
743        if (e->error)        if (!e->error)
         {  
           /* No shared page.  Do a stat to find the file size.  */  
           struct stat st;  
           e->error = io_stat (file, &st);  
           if (e->error)  
             return;  
           e->file_size = st.st_size;  
           e->optimal_block = st.st_blksize;  
         }  
       else  
744          e->error = vm_map (mach_task_self (), (vm_address_t *) &e->cntl,          e->error = vm_map (mach_task_self (), (vm_address_t *) &e->cntl,
745                             vm_page_size, 0, 1, e->cntlmap, 0, 0,                             vm_page_size, 0, 1, e->cntlmap, 0, 0,
746                             VM_PROT_READ|VM_PROT_WRITE,                             VM_PROT_READ|VM_PROT_WRITE,
# Line 792  prepare (file_t file, struct execdata *e Line 782  prepare (file_t file, struct execdata *e
782      /* We can't mmap FILE, but perhaps we can do normal I/O to it.  */      /* We can't mmap FILE, but perhaps we can do normal I/O to it.  */
783      e->error = 0;      e->error = 0;
784    
785      if (!e->error && !e->cntl)
786        {
787          /* No shared page.  Do a stat to find the file size.  */
788          struct stat st;
789          e->error = io_stat (file, &st);
790          if (e->error)
791            return;
792          e->file_size = st.st_size;
793          e->optimal_block = st.st_blksize;
794        }
795    
796    /* Initialize E's stdio stream.  */    /* Initialize E's stdio stream.  */
797    prepare_stream (e);    prepare_stream (e);
798  }  }

Legend:
Removed from v.1.84  
changed lines
  Added in v.1.85

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