[haiku-development] Re: Writing a filesystem driver

  • From: "François Revol" <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 19 Oct 2009 13:59:40 +0200 CEST

so you're back home ? :)

> I'm willing to learn a little more about haiku than just the boring
> localization part.
> I'd like to write a driver to read floppies (or floppies images) from
> my old Amstrad CPC. I have all the needed information on the
> filesystem structure, but I don't really know where to start...
> I know I have to write a physical layer to handle the floppy itself
> if

We already have a pc_floppy driver, which mostly works, at least for
reading, though I recall having off-by-1 sector errors sometimes.
Even handles 2 drives :p
It doesn't use ISA DMA but well our ISA bus manager doesn't implement
it anyway...

Though it currently hardcodes rates for usual PC floppies, but it
should be doable to add to the table here :

But as long as they are Shuggart drives and the floppy is MFM encoded
with tracks like PC disks it should work.

> I want so, but I should be able to work on imagefiles. I also have to
> write a filesystem add on, but no idea where to start. Which one
> should I look at to get an overview of how it's done ?

Certainly not FAT :)

I think the kernel_interface.cpp is mostly the same for many of them,
it binds the internals with the VFS logic.
As for the rest, BFS is probably the most complete, but you probably
don't have transactions on this fs :)


Other related posts: