Hi,

Hope my questions are too stupid.

This is what I have done to try to open the storeio translator in
ext2fs, like what's mentioned in the TODO list.
```
   error_t err;
   mach_port_t bootstrap;

-  /* Initialize the diskfs library, parse arguments, and open the store.
-     This starts the first diskfs thread for us.  */
-  store = diskfs_init_main (&startup_argp, argc, argv,
-                           &store_parsed, &bootstrap);
+  /* Initialize the diskfs library.  Must come before any other diskfs call. */
+  err = diskfs_init_diskfs ();
+  if (err)
+    error (4, err, "diskfs_init_diskfs");
+
+  file_t source = file_name_lookup ("/dev/hd0s1", O_READ, 0);
+
+  store_create (source, 0, NULL, &store);

   if (store->size < SBLOCK_OFFS + SBLOCK_SIZE)
     ext2_panic ("device too small for superblock (%" PRIi64 " bytes)", 
store->size);
```

But I got stuck at 'add a storeio translator before it'. Does that mean
adding a bootstrap routine for storeio? And I'm quite curious about the
following statement in the TODO list:
"That wouldn't need any code modification if we were using an initial
ramfs exposing that storeio on /dev/wd0s1."

Do you mean adding /dev/storeio into an initrd and we load this initrd
in GRUB? I didn't see how can we get any help from this.

Sorry for so many questions, I'm not very familiar with the boot
process.

Best,
Zhaoming


Reply via email to