- /* Allocate data sector(s) for the free map file
- and write its inode to disk. */
- map_inode = inode_create (free_map, FREE_MAP_SECTOR,
- bitmap_file_size (free_map));
- if (map_inode == NULL)
- PANIC ("free map creation failed--disk is too large");
- inode_commit (map_inode);
- inode_close (map_inode);
-
- /* Allocate data sector(s) for the root directory file
- and write its inodes to disk. */
- dir_inode = inode_create (free_map, ROOT_DIR_SECTOR,
- dir_size (NUM_DIR_ENTRIES));
- if (dir_inode == NULL)
+ /* Allocate free map and root dir files. */
+ if (!inode_create (free_map, FREE_MAP_SECTOR, bitmap_file_size (free_map)))
+ PANIC ("free map creation failed--file system partition is too large");
+ if (!inode_create (free_map, ROOT_DIR_SECTOR, dir_size (NUM_DIR_ENTRIES)))