Index: uspace/srv/fs/fat/fat_ops.c
===================================================================
--- uspace/srv/fs/fat/fat_ops.c	(revision 24a25179b05f83c8e256aa72e57afcd2c60ee336)
+++ uspace/srv/fs/fat/fat_ops.c	(revision 827d73f23124302d0257a467a1990e68bd7a15e7)
@@ -45,4 +45,5 @@
 #include <ipc/services.h>
 #include <ipc/devmap.h>
+#include <macros.h>
 #include <async.h>
 #include <errno.h>
@@ -79,5 +80,5 @@
 static int fat_has_children(bool *, fs_node_t *);
 static fs_index_t fat_index_get(fs_node_t *);
-static size_t fat_size_get(fs_node_t *);
+static aoff64_t fat_size_get(fs_node_t *);
 static unsigned fat_lnkcnt_get(fs_node_t *);
 static char fat_plb_get_char(unsigned);
@@ -738,10 +739,10 @@
 			goto skip_dots;
 		}
-		d = (fat_dentry_t *)b->data;
-		if (fat_classify_dentry(d) == FAT_DENTRY_LAST ||
-		    str_cmp(d->name, FAT_NAME_DOT) == 0) {
+		d = (fat_dentry_t *) b->data;
+		if ((fat_classify_dentry(d) == FAT_DENTRY_LAST) ||
+		    (str_cmp((char *) d->name, FAT_NAME_DOT)) == 0) {
 			memset(d, 0, sizeof(fat_dentry_t));
-			str_cpy(d->name, 8, FAT_NAME_DOT);
-			str_cpy(d->ext, 3, FAT_EXT_PAD);
+			str_cpy((char *) d->name, 8, FAT_NAME_DOT);
+			str_cpy((char *) d->ext, 3, FAT_EXT_PAD);
 			d->attr = FAT_ATTR_SUBDIR;
 			d->firstc = host2uint16_t_le(childp->firstc);
@@ -749,9 +750,9 @@
 		}
 		d++;
-		if (fat_classify_dentry(d) == FAT_DENTRY_LAST ||
-		    str_cmp(d->name, FAT_NAME_DOT_DOT) == 0) {
+		if ((fat_classify_dentry(d) == FAT_DENTRY_LAST) ||
+		    (str_cmp((char *) d->name, FAT_NAME_DOT_DOT) == 0)) {
 			memset(d, 0, sizeof(fat_dentry_t));
-			str_cpy(d->name, 8, FAT_NAME_DOT_DOT);
-			str_cpy(d->ext, 3, FAT_EXT_PAD);
+			str_cpy((char *) d->name, 8, FAT_NAME_DOT_DOT);
+			str_cpy((char *) d->ext, 3, FAT_EXT_PAD);
 			d->attr = FAT_ATTR_SUBDIR;
 			d->firstc = (parentp->firstc == FAT_CLST_ROOT) ?
@@ -915,5 +916,5 @@
 }
 
-size_t fat_size_get(fs_node_t *fn)
+aoff64_t fat_size_get(fs_node_t *fn)
 {
 	return FAT_NODE(fn)->size;
@@ -1157,7 +1158,8 @@
 void fat_read(ipc_callid_t rid, ipc_call_t *request)
 {
-	dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
-	fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
-	off_t pos = (off_t)IPC_GET_ARG3(*request);
+	dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
+	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
+	aoff64_t pos =
+	    (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*request), IPC_GET_ARG4(*request));
 	fs_node_t *fn;
 	fat_node_t *nodep;
@@ -1223,5 +1225,5 @@
 	} else {
 		unsigned bnum;
-		off_t spos = pos;
+		aoff64_t spos = pos;
 		char name[FAT_NAME_LEN + 1 + FAT_EXT_LEN + 1];
 		fat_dentry_t *d;
@@ -1239,5 +1241,5 @@
 		bnum = (pos * sizeof(fat_dentry_t)) / bps;
 		while (bnum < nodep->size / bps) {
-			off_t o;
+			aoff64_t o;
 
 			rc = fat_block_get(&b, bs, nodep, bnum,
@@ -1295,7 +1297,8 @@
 void fat_write(ipc_callid_t rid, ipc_call_t *request)
 {
-	dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
-	fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
-	off_t pos = (off_t)IPC_GET_ARG3(*request);
+	dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
+	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
+	aoff64_t pos =
+	    (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*request), IPC_GET_ARG4(*request));
 	fs_node_t *fn;
 	fat_node_t *nodep;
@@ -1306,5 +1309,5 @@
 	unsigned spc;
 	unsigned bpc;		/* bytes per cluster */
-	off_t boundary;
+	aoff64_t boundary;
 	int flags = BLOCK_FLAGS_NONE;
 	int rc;
@@ -1452,7 +1455,8 @@
 void fat_truncate(ipc_callid_t rid, ipc_call_t *request)
 {
-	dev_handle_t dev_handle = (dev_handle_t)IPC_GET_ARG1(*request);
-	fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
-	size_t size = (off_t)IPC_GET_ARG3(*request);
+	dev_handle_t dev_handle = (dev_handle_t) IPC_GET_ARG1(*request);
+	fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request);
+	aoff64_t size =
+	    (aoff64_t) MERGE_LOUP32(IPC_GET_ARG3(*request), IPC_GET_ARG4(*request));
 	fs_node_t *fn;
 	fat_node_t *nodep;
