[haiku-commits] Re: haiku: hrev48308 - src/add-ons/kernel/file_systems/bfs

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 15 Nov 2014 22:59:53 +0100

On 11/15/2014 08:41 PM, jessica.l.hamilton@xxxxxxxxx wrote:
+Volume::WriteSuperBlock(bool initializing)
+{
+       if (initializing) {
+               const char emptySector[512] = { 0 };
+               // also erase the first block, otherwise we risk mis-identifying
+               // the file system later (e.g. NTFS is identified by sector 0).
+               if (write_pos(fDevice, 0, emptySector, 512) != 512)
+                       return B_IO_ERROR;
+       }

Please move that into its own function; there is no need to clobber this one. Besides, that part is not part of the super block, anyway.

Bye,
   Axel.


Other related posts: