Index: uspace/app/mkexfat/mkexfat.c
===================================================================
--- uspace/app/mkexfat/mkexfat.c	(revision ffee7bf137c50507bd2c67ece6fecf461c731ad9)
+++ uspace/app/mkexfat/mkexfat.c	(revision 5dbd69669d92be4b3b8f009238f2eeb3c0ba1985)
@@ -68,5 +68,5 @@
 	size_t   sector_size;
 	size_t   cluster_size;
-	unsigned long total_clusters;
+	uint32_t total_clusters;
 } exfat_cfg_t;
 
@@ -83,5 +83,7 @@
 cfg_params_initialize(exfat_cfg_t *cfg)
 {
-	aoff64_t const volume_bytes = cfg->volume_count * cfg->sector_size;
+	unsigned long fat_bytes;
+	aoff64_t const volume_bytes = (cfg->volume_count - FAT_SECTOR_START) *
+	    cfg->sector_size;
 
 	/** Number of clusters required to index the entire device, it must
@@ -100,4 +102,10 @@
 		n_req_clusters = volume_bytes / cfg->cluster_size;
 	}
+
+	cfg->total_clusters = n_req_clusters;
+
+	/* Compute the FAT size in sectors */
+	fat_bytes = (cfg->total_clusters + 1) * 4;
+	cfg->fat_sector_count = div_round_up(fat_bytes, cfg->sector_size);
 }
 
@@ -203,6 +211,7 @@
 	rc = block_get_nblocks(service_id, &cfg.volume_count);
 	if (rc != EOK) {
-		printf(NAME ": Warning, failed to obtain device block size.\n");
-		/* FIXME: the user should specify the filesystem size */
+		printf(NAME ": Warning, failed to obtain" \
+		    " device block size.\n");
+		/* FIXME: the user should be able to specify the filesystem size */
 		return 1;
 	} else {
