Index: uspace/srv/fs/mfs/mfs_ops.c
===================================================================
--- uspace/srv/fs/mfs/mfs_ops.c	(revision 9269c88731829c9efc25ba8adddf4258aa991f64)
+++ uspace/srv/fs/mfs/mfs_ops.c	(revision 6d4d88322786762d3f20ed62340bc6e25b401641)
@@ -43,8 +43,7 @@
 
 static bool check_magic_number(uint16_t magic, bool *native,
-			       mfs_version_t *version, bool *longfilenames);
+    mfs_version_t *version, bool *longfilenames);
 static int mfs_node_core_get(fs_node_t **rfn, struct mfs_instance *inst,
-			     fs_index_t index);
-
+    fs_index_t index);
 static int mfs_node_put(fs_node_t *fsnode);
 static int mfs_node_open(fs_node_t *fsnode);
@@ -64,11 +63,10 @@
 static hash_index_t open_nodes_hash(unsigned long key[]);
 static int open_nodes_compare(unsigned long key[], hash_count_t keys,
-		link_t *item);
+    link_t *item);
 static void open_nodes_remove_cb(link_t *link);
-
 static int mfs_node_get(fs_node_t **rfn, service_id_t service_id,
-			fs_index_t index);
-static int
-mfs_instance_get(service_id_t service_id, struct mfs_instance **instance);
+    fs_index_t index);
+static int mfs_instance_get(service_id_t service_id,
+    struct mfs_instance **instance);
 
 
@@ -96,5 +94,6 @@
 
 /* Hash table interface for open nodes hash table */
-static hash_index_t open_nodes_hash(unsigned long key[])
+static hash_index_t
+open_nodes_hash(unsigned long key[])
 {
 	/* TODO: This is very simple and probably can be improved */
@@ -102,6 +101,7 @@
 }
 
-static int open_nodes_compare(unsigned long key[], hash_count_t keys,
-		link_t *item)
+static int
+open_nodes_compare(unsigned long key[], hash_count_t keys,
+    link_t *item)
 {
 	struct mfs_node *mnode = hash_table_get_instance(item, struct mfs_node, link);
@@ -118,5 +118,6 @@
 }
 
-static void open_nodes_remove_cb(link_t *link)
+static void
+open_nodes_remove_cb(link_t *link)
 {
 	/* We don't use remove callback for this hash table */
@@ -129,8 +130,9 @@
 };
 
-int mfs_global_init(void)
+int
+mfs_global_init(void)
 {
 	if (!hash_table_create(&open_nodes, OPEN_NODES_BUCKETS,
-			OPEN_NODES_KEYS, &open_nodes_ops)) {
+	    OPEN_NODES_KEYS, &open_nodes_ops)) {
 		return ENOMEM;
 	}
@@ -140,5 +142,5 @@
 static int
 mfs_mounted(service_id_t service_id, const char *opts, fs_index_t *index,
-		aoff64_t *size, unsigned *linkcnt)
+    aoff64_t *size, unsigned *linkcnt)
 {
 	enum cache_mode cmode;
@@ -163,5 +165,5 @@
 		return rc;
 
-	/*Allocate space for generic MFS superblock*/
+	/* Allocate space for generic MFS superblock */
 	sbi = malloc(sizeof(*sbi));
 	if (!sbi) {
@@ -170,5 +172,5 @@
 	}
 
-	/*Allocate space for filesystem instance*/
+	/* Allocate space for filesystem instance */
 	instance = malloc(sizeof(*instance));
 	if (!instance) {
@@ -191,11 +193,11 @@
 
 	if (check_magic_number(sb->s_magic, &native, &version, &longnames)) {
-		/*This is a V1 or V2 Minix filesystem*/
+		/* This is a V1 or V2 Minix filesystem */
 		magic = sb->s_magic;
 	} else if (check_magic_number(sb3->s_magic, &native, &version, &longnames)) {
-		/*This is a V3 Minix filesystem*/
+		/* This is a V3 Minix filesystem */
 		magic = sb3->s_magic;
 	} else {
-		/*Not recognized*/
+		/* Not recognized */
 		mfsdebug("magic number not recognized\n");
 		rc = ENOTSUP;
@@ -205,5 +207,5 @@
 	mfsdebug("magic number recognized = %04x\n", magic);
 
-	/*Fill superblock info structure*/
+	/* Fill superblock info structure */
 
 	sbi->fs_version = version;
@@ -243,5 +245,5 @@
 		sbi->dirsize = longnames ? MFSL_DIRSIZE : MFS_DIRSIZE;
 		sbi->max_name_len = longnames ? MFS_L_MAX_NAME_LEN :
-				    MFS_MAX_NAME_LEN;
+		    MFS_MAX_NAME_LEN;
 	}
 
@@ -267,5 +269,5 @@
 	}
 
-	/*Initialize the instance structure and remember it*/
+	/* Initialize the instance structure and remember it */
 	instance->service_id = service_id;
 	instance->sbi = sbi;
@@ -328,5 +330,6 @@
 }
 
-service_id_t mfs_service_get(fs_node_t *fsnode)
+service_id_t
+mfs_service_get(fs_node_t *fsnode)
 {
 	struct mfs_node *node = fsnode->data;
@@ -334,5 +337,6 @@
 }
 
-static int mfs_create_node(fs_node_t **rfn, service_id_t service_id, int flags)
+static int
+mfs_create_node(fs_node_t **rfn, service_id_t service_id, int flags)
 {
 	int r;
@@ -348,5 +352,5 @@
 		return r;
 
-	/*Alloc a new inode*/
+	/* Alloc a new inode */
 	r = mfs_alloc_inode(inst, &inum);
 	if (r != EOK)
@@ -375,5 +379,5 @@
 	if (flags & L_DIRECTORY) {
 		ino_i->i_mode = S_IFDIR;
-		ino_i->i_nlinks = 2; /*This accounts for the '.' dentry*/
+		ino_i->i_nlinks = 2; /* This accounts for the '.' dentry */
 	} else {
 		ino_i->i_mode = S_IFREG;
@@ -428,5 +432,6 @@
 }
 
-static int mfs_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
+static int
+mfs_match(fs_node_t **rfn, fs_node_t *pfn, const char *component)
 {
 	struct mfs_node *mnode = pfn->data;
@@ -450,5 +455,5 @@
 
 		if (!d_info.d_inum) {
-			/*This entry is not used*/
+			/* This entry is not used */
 			continue;
 		}
@@ -457,8 +462,8 @@
 
 		if (comp_size == dentry_name_size &&
-			!bcmp(component, d_info.d_name, dentry_name_size)) {
-			/*Hit!*/
+		    !bcmp(component, d_info.d_name, dentry_name_size)) {
+			/* Hit! */
 			mfs_node_core_get(rfn, mnode->instance,
-					  d_info.d_inum);
+			    d_info.d_inum);
 			goto found;
 		}
@@ -469,5 +474,6 @@
 }
 
-static aoff64_t mfs_size_get(fs_node_t *node)
+static aoff64_t
+mfs_size_get(fs_node_t *node)
 {
 	const struct mfs_node *mnode = node->data;
@@ -477,5 +483,5 @@
 static int
 mfs_node_get(fs_node_t **rfn, service_id_t service_id,
-			fs_index_t index)
+    fs_index_t index)
 {
 	int rc;
@@ -521,5 +527,6 @@
 }
 
-static int mfs_node_open(fs_node_t *fsnode)
+static int
+mfs_node_open(fs_node_t *fsnode)
 {
 	/*
@@ -530,5 +537,6 @@
 }
 
-static fs_index_t mfs_index_get(fs_node_t *fsnode)
+static fs_index_t
+mfs_index_get(fs_node_t *fsnode)
 {
 	struct mfs_node *mnode = fsnode->data;
@@ -536,5 +544,6 @@
 }
 
-static unsigned mfs_lnkcnt_get(fs_node_t *fsnode)
+static unsigned
+mfs_lnkcnt_get(fs_node_t *fsnode)
 {
 	struct mfs_node *mnode = fsnode->data;
@@ -551,6 +560,7 @@
 }
 
-static int mfs_node_core_get(fs_node_t **rfn, struct mfs_instance *inst,
-			     fs_index_t index)
+static int
+mfs_node_core_get(fs_node_t **rfn, struct mfs_instance *inst,
+    fs_index_t index)
 {
 	fs_node_t *node = NULL;
@@ -624,5 +634,6 @@
 }
 
-static bool mfs_is_directory(fs_node_t *fsnode)
+static bool
+mfs_is_directory(fs_node_t *fsnode)
 {
 	const struct mfs_node *node = fsnode->data;
@@ -630,5 +641,6 @@
 }
 
-static bool mfs_is_file(fs_node_t *fsnode)
+static bool
+mfs_is_file(fs_node_t *fsnode)
 {
 	struct mfs_node *node = fsnode->data;
@@ -636,5 +648,6 @@
 }
 
-static int mfs_root_get(fs_node_t **rfn, service_id_t service_id)
+static int
+mfs_root_get(fs_node_t **rfn, service_id_t service_id)
 {
 	int rc = mfs_node_get(rfn, service_id, MFS_ROOT_INO);
@@ -642,5 +655,6 @@
 }
 
-static int mfs_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
+static int
+mfs_link(fs_node_t *pfn, fs_node_t *cfn, const char *name)
 {
 	struct mfs_node *parent = pfn->data;
@@ -717,5 +731,6 @@
 }
 
-static int mfs_has_children(bool *has_children, fs_node_t *fsnode)
+static int
+mfs_has_children(bool *has_children, fs_node_t *fsnode)
 {
 	struct mfs_node *mnode = fsnode->data;
@@ -738,5 +753,5 @@
 
 		if (d_info.d_inum) {
-			/*A valid entry has been found*/
+			/* A valid entry has been found */
 			*has_children = true;
 			break;
@@ -750,5 +765,5 @@
 static int
 mfs_read(service_id_t service_id, fs_index_t index, aoff64_t pos,
-		size_t *rbytes)
+    size_t *rbytes)
 {
 	int rc;
@@ -780,5 +795,5 @@
 
 		if (pos < 2) {
-			/*Skip the first two dentries ('.' and '..')*/
+			/* Skip the first two dentries ('.' and '..') */
 			pos = 2;
 		}
@@ -790,5 +805,5 @@
 
 			if (d_info.d_inum) {
-				/*Dentry found!*/
+				/* Dentry found! */
 				goto found;
 			}
@@ -806,5 +821,5 @@
 
 		if (pos >= (size_t) ino_i->i_size) {
-			/*Trying to read beyond the end of file*/
+			/* Trying to read beyond the end of file */
 			bytes = 0;
 			(void) async_data_read_finalize(callid, NULL, 0);
@@ -823,5 +838,5 @@
 
 		if (zone == 0) {
-			/*sparse file*/
+			/* sparse file */
 			uint8_t *buf = malloc(sbi->block_size);
 			if (!buf) {
@@ -831,5 +846,5 @@
 			memset(buf, 0, sizeof(sbi->block_size));
 			async_data_read_finalize(callid,
-						 buf + pos % sbi->block_size, bytes);
+			    buf + pos % sbi->block_size, bytes);
 			free(buf);
 			goto out_success;
@@ -841,5 +856,5 @@
 
 		async_data_read_finalize(callid, b->data +
-					 pos % sbi->block_size, bytes);
+		    pos % sbi->block_size, bytes);
 
 		rc = block_put(b);
@@ -862,5 +877,5 @@
 static int
 mfs_write(service_id_t service_id, fs_index_t index, aoff64_t pos,
-		size_t *wbytes, aoff64_t *nsize)
+    size_t *wbytes, aoff64_t *nsize)
 {
 	fs_node_t *fn;
@@ -954,5 +969,5 @@
 		return ENOENT;
 
-	/*Destroy the inode*/
+	/* Destroy the inode */
 	return mfs_destroy_node(fn);
 }
@@ -973,10 +988,10 @@
 	assert(!has_children);
 
-	/*Free the entire inode content*/
+	/* Free the entire inode content */
 	r = mfs_inode_shrink(mnode, mnode->ino_i->i_size);
 	if (r != EOK)
 		goto out;
 
-	/*Mark the inode as free in the bitmap*/
+	/* Mark the inode as free in the bitmap */
 	r = mfs_free_inode(mnode->instance, mnode->ino_i->index);
 
@@ -1017,7 +1032,7 @@
 
 	rc = fs_instance_get(service_id, &data);
-	if (rc == EOK) {
+	if (rc == EOK)
 		*instance = (struct mfs_instance *) data;
-	} else {
+	else {
 		mfsdebug("instance not found\n");
 	}
@@ -1026,6 +1041,7 @@
 }
 
-static bool check_magic_number(uint16_t magic, bool *native,
-			       mfs_version_t *version, bool *longfilenames)
+static bool
+check_magic_number(uint16_t magic, bool *native,
+		mfs_version_t *version, bool *longfilenames)
 {
 	bool rc = true;
