diff options
author | Miles Bader <miles@gnu.org> | 1995-10-19 20:47:24 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-10-19 20:47:24 +0000 |
commit | d9cf46ccd62c581063bc58980ca9373af8ab8b46 (patch) | |
tree | daac734b075c7da027e041bb9dae888211e7ae0b /ufs/main.c | |
parent | 9adb7010ece9af11a1c3a78c52da91be18c4f1a2 (diff) |
(main):
Always include VM_PROT_WRITE in max prot.
Move stuff into get_hypermetadata.
Writable init code moved to diskfs_readonly_changed.
(diskfs_reload_global_state): New function.
Diffstat (limited to 'ufs/main.c')
-rw-r--r-- | ufs/main.c | 38 |
1 files changed, 10 insertions, 28 deletions
@@ -108,39 +108,12 @@ main (int argc, char **argv) err = vm_map (mach_task_self (), (vm_address_t *)&disk_image, disk_size, 0, 1, diskpagerport, 0, 0, VM_PROT_READ | (diskfs_readonly ? 0 : VM_PROT_WRITE), - VM_PROT_READ | (diskfs_readonly ? 0 : VM_PROT_WRITE), + VM_PROT_READ | VM_PROT_WRITE, VM_INHERIT_NONE); assert (!err); get_hypermetadata (); - if (disk_size < sblock->fs_size * sblock->fs_fsize) - { - fprintf (stderr, - "Disk size (%ld) less than necessary " - "(superblock says we need %ld)\n", - disk_size, sblock->fs_size * sblock->fs_fsize); - exit (1); - } - - vm_allocate (mach_task_self (), &zeroblock, sblock->fs_bsize, 1); - - /* If the filesystem has new features in it, don't pay attention to - the user's request not to use them. */ - if ((sblock->fs_inodefmt == FS_44INODEFMT - || direct_symlink_extension) - && compat_mode == COMPAT_BSD42) - /* XXX should syslog to this effect */ - compat_mode = COMPAT_BSD44; - - if (!diskfs_readonly) - { - sblock->fs_clean = 0; - strcpy (sblock->fs_fsmnt, "Hurd /"); /* XXX */ - sblock_dirty = 1; - diskfs_set_hypermetadata (1, 0); - } - inode_init (); /* Find our root node. */ @@ -156,3 +129,12 @@ main (int argc, char **argv) return 0; } + +error_t +diskfs_reload_global_state () +{ + flush_pokes (); + pager_flush (diskpager->p, 1); + get_hypermetadata (); + return 0; +} |