[...]
>Would it be possible to have a large file present in the root directory of
>a FAT partition which was in fact an image of a Minix Filesystem.  That
>way, people could have ELKS co-existing with MS-DOS (or another DOS) on
>the same hard drive.  The part of the code that read the Minix image would
>surely need to know virtually nothing about FAT and so the code size could
>be kept to a minimum (perhaps the user could even tell it where the image
>file lives on the FAT partition to further reduce necessary code)
[...]

This would actually be quite simple. The file would have to be unfragmented, 
and immovable; you then (from DOS) determine the start address and length of 
the partition and poke these into the kernel somewhere (with rdev?). Then when 
you start the kernel, the driver only sees that section of the drive.

Less than ten lines of code in the block device driver.

int transform_request(unsigned int* address, unsigned int* length)
{
  *address += setup->data.partition_offset;
  if ((*address < 0) || (*address + length >= setup->data.partition_length))
    return EINVAL;
  return 0;
}

-- 
+- David Given ---------------McQ-+ 
|  Work: [EMAIL PROTECTED]             | Does a Con Neumann machine run a Make
|  Play: [EMAIL PROTECTED]         | Machines Fast scam?                      
+- http://wired.st-and.ac.uk/~dg -+ 

Reply via email to