menu=Start MINIX 3:load_mods /boot/minix_default/mod*;multiboot /boot/minix_default/kernel rootdevname=$rootdevname $args
menu=Start latest MINIX 3:load_mods /boot/minix_latest/mod*;multiboot /boot/minix_latest/kernel rootdevname=$rootdevname $args
menu=Start latest MINIX 3 in single user mode:load_mods /boot/minix_latest/mod*;multiboot /boot/minix_latest/kernel rootdevname=$rootdevname bootopts=-s $args
-menu=Start latest MINIX 3 without file mmap:load_mods /boot/minix_latest/mod*;multiboot /boot/minix_latest/kernel rootdevname=$rootdevname filemap=0 $args
menu=Edit menu option:edit
menu=Drop to boot prompt:prompt
and F4 to navigate among them.
For more information on how to use MINIX 3, see the wiki:
-http://wiki.minix3.org.
+http://wiki.minix3.org. We'd like your feedback: http://minix3.org/community/
#include "fs.h"
#include <fcntl.h>
#include <string.h>
+#include <stdlib.h>
#include <minix/com.h>
#include <sys/stat.h>
#include "buf.h"
}
/* Fill in the super block. */
- STATICINIT(superblock, 1);
- if (!superblock)
+ if(!(superblock = malloc(sizeof(*superblock))))
panic("Can't allocate memory for superblock.");
+
superblock->s_dev = fs_dev; /* read_super() needs to know which dev */
r = read_super(superblock);
int r;
/* group descriptors, sp->s_group_desc points to this. */
static struct group_desc *group_descs;
- char *buf;
block_t gd_size; /* group descriptors table size in blocks */
int gdt_position;
static char superblock_buf[1024];
gd_size = sp->s_gdb_count * sp->s_block_size;
- buf = 0;
- STATICINIT(buf, gd_size);
- group_descs = (struct group_desc *) buf;
-
- buf = 0;
- STATICINIT(buf, gd_size);
- ondisk_group_descs = (struct group_desc *) buf;
-
- if (!group_descs || !ondisk_group_descs)
- panic("can't allocate memory for gdt buffer");
+ if(!(group_descs = malloc(gd_size * sizeof(struct group_desc))))
+ panic("can't allocate group desc array");
+ if(!(ondisk_group_descs = malloc(gd_size * sizeof(struct group_desc))))
+ panic("can't allocate group desc array");
/* s_first_data_block (block number, where superblock is stored)
* is 1 for 1Kb blocks and 0 for larger blocks.