Index: uspace/srv/fs/minixfs/mfs_const.h
===================================================================
--- uspace/srv/fs/minixfs/mfs_const.h	(revision dddb357af811c63d5ec1febe707f7f6f7b58517b)
+++ uspace/srv/fs/minixfs/mfs_const.h	(revision 096c8835c6a27f23e5b4d74d33df76d3392437d7)
@@ -37,5 +37,11 @@
 #include <sys/types.h>
 
+#define MFS_MAGIC_V1		0x137F
+#define MFS_MAGIC_V2		0x2468
+#define MFS_MAGIC_V3		0x4D5A
+
 #define MFS_ROOT_INO		1
+#define MFS_SUPER_BLOCK		0
+#define MFS_SUPER_BLOCK_SIZE	1024
 
 #define V2_NR_DIRECT_ZONES	7
Index: uspace/srv/fs/minixfs/mfs_super.c
===================================================================
--- uspace/srv/fs/minixfs/mfs_super.c	(revision 096c8835c6a27f23e5b4d74d33df76d3392437d7)
+++ uspace/srv/fs/minixfs/mfs_super.c	(revision 096c8835c6a27f23e5b4d74d33df76d3392437d7)
@@ -0,0 +1,81 @@
+/*
+ * Copyright (c) 2011 Maurizio Lombardi
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup fs
+ * @{
+ */
+
+#include "mfs_super.h"
+
+void mfs_mounted(ipc_callid_t rid, ipc_call_t *request)
+{
+	devmap_handle_t devmap_handle = (devmap_handle_t) IPC_GET_ARG1(*request);
+	enum cache_mode cmode;	
+	struct mfs_superblock *sp;
+
+	/* Accept the mount options */
+	char *opts;
+	int rc = async_data_write_accept((void **) &opts, true, 0, 0, 0, NULL);
+	
+	if (rc != EOK) {
+		async_answer_0(rid, rc);
+		return;
+	}
+
+	/* Check for option enabling write through. */
+	if (str_cmp(opts, "wtcache") == 0)
+		cmode = CACHE_MODE_WT;
+	else
+		cmode = CACHE_MODE_WB;
+
+	free(opts);
+
+	/* initialize libblock */
+	rc = block_init(devmap_handle, MFS_SUPER_BLOCK_SIZE);
+	if (rc != EOK) {
+		async_answer_0(rid, rc);
+		return;
+	}
+
+	/* prepare the superblock */
+	rc = block_bb_read(devmap_handle, MFS_SUPER_BLOCK);
+	if (rc != EOK) {
+		block_fini(devmap_handle);
+		async_answer_0(rid, rc);
+		return;
+	}
+
+	/* get the buffer with the superblock */
+	sp = block_bb_get(devmap_handle);
+}
+
+
+/**
+ * @}
+ */ 
+
Index: uspace/srv/fs/minixfs/mfs_super.h
===================================================================
--- uspace/srv/fs/minixfs/mfs_super.h	(revision dddb357af811c63d5ec1febe707f7f6f7b58517b)
+++ uspace/srv/fs/minixfs/mfs_super.h	(revision 096c8835c6a27f23e5b4d74d33df76d3392437d7)
@@ -35,5 +35,5 @@
 
 #include "mfs_const.h"
-
+#include "../../vfs/vfs.h"
 
 struct mfs_superblock {
@@ -67,4 +67,6 @@
 } __attribute__ ((packed));
 
+void mfs_mounted(ipc_callid_t rid, ipc_call_t *request);
+
 #endif
 
