/[hurd]/hurd/tmpfs/node.c
ViewVC logotype

Diff of /hurd/tmpfs/node.c

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

revision 1.8 by roland, Sun May 6 00:39:20 2001 UTC revision 1.9 by roland, Mon Oct 1 01:05:06 2001 UTC
# Line 20  the Free Software Foundation, 675 Mass A Line 20  the Free Software Foundation, 675 Mass A
20  #include "tmpfs.h"  #include "tmpfs.h"
21  #include <stddef.h>  #include <stddef.h>
22  #include <stdlib.h>  #include <stdlib.h>
23    #include <fcntl.h>
24    #include <hurd/hurd_types.h>
25    #include <hurd/store.h>
26  #include <mach/default_pager.h>  #include <mach/default_pager.h>
27    
28  unsigned int num_files;  unsigned int num_files;
# Line 526  diskfs_S_file_get_storage_info (struct p Line 529  diskfs_S_file_get_storage_info (struct p
529                                  mach_msg_type_number_t *num_offsets,                                  mach_msg_type_number_t *num_offsets,
530                                  char **data, mach_msg_type_number_t *data_len)                                  char **data, mach_msg_type_number_t *data_len)
531  {  {
532    return EOPNOTSUPP;    mach_port_t memobj = diskfs_get_filemap (cred->po->np, VM_PROT_ALL);
533      if (memobj == MACH_PORT_NULL)
534        return errno;
535    
536      assert (*num_ports >= 1);     /* mig always gives us some */
537      *num_ports = 1;
538      *ports_type = MACH_MSG_TYPE_MOVE_SEND;
539      (*ports)[0] = memobj;
540    
541      assert (*num_offsets >= 2);   /* mig always gives us some */
542      *num_offsets = 2;
543      (*offsets)[0] = 0;
544      (*offsets)[1] = cred->po->np->dn_stat.st_size;
545    
546      assert (*num_ints >= 6);      /* mig always gives us some */
547      *num_ints = 6;
548      (*ints)[0] = STORAGE_MEMORY;
549      (*ints)[1] = (((cred->po->openstat & O_RDWR) == O_READ)
550                    ? STORE_READONLY : 0);
551      (*ints)[2] = 1;               /* block size */
552      (*ints)[3] = 1;               /* 1 run in offsets list */
553      (*ints)[4] = 0;               /* name len */
554      (*ints)[5] = 0;               /* misc len */
555    
556      *data_len = 0;
557    
558      return 0;
559  }  }

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

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