Rev 1655 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#include <drivers/keyb.h>
void ctrlc_exit(KEY_EVT *k)
{
extern void dump_sem_table(void);
extern void dump_nop_table(void);
grx_close();
cprintf("CTRL-C pressed!\n");
grx_modeinfo();
sys_end();
}
#include <fs/bdevinit.h>
#include <fs/fsinit.h>
#include <fs/bdev.h>
#include <sys/types.h>
#include <sys/mount.h>
int __register_sub_init_prologue(void)
{
return 0;
}
int __register_sub_init(void)
{
return 0;
}
dev_t root_device;
int choose_root_callback(dev_t dev,u_int8_t fs)
{
if (fs==FS_MSDOS) return dev;
return -1;
}
int __bdev_sub_init(void)
{
BDEV_PARMS bdev=BASE_BDEV;
bdev_def_showinfo(bdev,TRUE);
bdev_init(&bdev);
root_device=bdev_scan_devices(choose_root_callback);
if (root_device<0) {
cprintf("can't find root device to mount on /!!!\n");
sys_end();
return -1;
}
return 0;
}
extern int libc_initialize(void);
int __fs_sub_init(void)
{
FILESYSTEM_PARMS fs=BASE_FILESYSTEM;
//struct mount_opts opts;
//memset(&opts,0,sizeof(struct mount_opts));
//opts.flags=MOUNT_FLAG_RW;
filesystem_def_rootdevice(fs,root_device);
filesystem_def_fs(fs,FS_MSDOS);
filesystem_def_showinfo(fs,TRUE);
filesystem_init(&fs);
libc_initialize();
return 0;
}