Index: uspace/lib/libblock/libblock.c
===================================================================
--- uspace/lib/libblock/libblock.c	(revision 16fc3c94620219718099d4fa2d485a4c03e071a5)
+++ uspace/lib/libblock/libblock.c	(revision 0b9ac3c7710d00960febdf1af77f1d65e298ad02)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2008 Jakub Jermar 
- * Copyright (c) 2008 Martin Decky 
+ * Copyright (c) 2008 Jakub Jermar
+ * Copyright (c) 2008 Martin Decky
  * All rights reserved.
  *
@@ -81,13 +81,13 @@
 	size_t comm_size;
 	void *bb_buf;
-	bn_t bb_addr;
+	aoff64_t bb_addr;
 	size_t pblock_size;		/**< Physical block size. */
 	cache_t *cache;
 } devcon_t;
 
-static int read_blocks(devcon_t *devcon, bn_t ba, size_t cnt);
-static int write_blocks(devcon_t *devcon, bn_t ba, size_t cnt);
+static int read_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt);
+static int write_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt);
 static int get_block_size(int dev_phone, size_t *bsize);
-static int get_num_blocks(int dev_phone, bn_t *nblocks);
+static int get_num_blocks(int dev_phone, aoff64_t *nblocks);
 
 static devcon_t *devcon_search(dev_handle_t dev_handle)
@@ -214,5 +214,5 @@
 }
 
-int block_bb_read(dev_handle_t dev_handle, bn_t ba)
+int block_bb_read(dev_handle_t dev_handle, aoff64_t ba)
 {
 	void *bb_buf;
@@ -334,5 +334,5 @@
 		}
 
-		long key = b->boff;
+		unsigned long key = b->boff;
 		hash_table_remove(&cache->block_hash, &key, 1);
 		
@@ -382,5 +382,5 @@
  * @return			EOK on success or a negative error code.
  */
-int block_get(block_t **block, dev_handle_t dev_handle, bn_t boff, int flags)
+int block_get(block_t **block, dev_handle_t dev_handle, aoff64_t boff, int flags)
 {
 	devcon_t *devcon;
@@ -657,8 +657,8 @@
  * @return		EOK on success or a negative return code on failure.
  */
-int block_seqread(dev_handle_t dev_handle, off_t *bufpos, size_t *buflen,
-    off_t *pos, void *dst, size_t size)
-{
-	off_t offset = 0;
+int block_seqread(dev_handle_t dev_handle, size_t *bufpos, size_t *buflen,
+    aoff64_t *pos, void *dst, size_t size)
+{
+	size_t offset = 0;
 	size_t left = size;
 	size_t block_size;
@@ -690,5 +690,5 @@
 		}
 		
-		if (*bufpos == (off_t) *buflen) {
+		if (*bufpos == *buflen) {
 			/* Refill the communication buffer with a new block. */
 			int rc;
@@ -718,5 +718,5 @@
  * @return		EOK on success or negative error code on failure.
  */
-int block_read_direct(dev_handle_t dev_handle, bn_t ba, size_t cnt, void *buf)
+int block_read_direct(dev_handle_t dev_handle, aoff64_t ba, size_t cnt, void *buf)
 {
 	devcon_t *devcon;
@@ -746,5 +746,5 @@
  * @return		EOK on success or negative error code on failure.
  */
-int block_write_direct(dev_handle_t dev_handle, bn_t ba, size_t cnt,
+int block_write_direct(dev_handle_t dev_handle, aoff64_t ba, size_t cnt,
     const void *data)
 {
@@ -789,5 +789,5 @@
  * @return		EOK on success or negative error code on failure.
  */
-int block_get_nblocks(dev_handle_t dev_handle, bn_t *nblocks)
+int block_get_nblocks(dev_handle_t dev_handle, aoff64_t *nblocks)
 {
 	devcon_t *devcon;
@@ -808,5 +808,5 @@
  * @return		EOK on success or negative error code on failure.
  */
-static int read_blocks(devcon_t *devcon, bn_t ba, size_t cnt)
+static int read_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt)
 {
 	int rc;
@@ -816,5 +816,5 @@
 	    UPPER32(ba), cnt);
 	if (rc != EOK) {
-		printf("Error %d reading %d blocks starting at block %" PRIuBN
+		printf("Error %d reading %d blocks starting at block %" PRIuOFF64
 		    " from device handle %d\n", rc, cnt, ba,
 		    devcon->dev_handle);
@@ -835,5 +835,5 @@
  * @return		EOK on success or negative error code on failure.
  */
-static int write_blocks(devcon_t *devcon, bn_t ba, size_t cnt)
+static int write_blocks(devcon_t *devcon, aoff64_t ba, size_t cnt)
 {
 	int rc;
@@ -843,5 +843,5 @@
 	    UPPER32(ba), cnt);
 	if (rc != EOK) {
-		printf("Error %d writing %d blocks starting at block %" PRIuBN
+		printf("Error %d writing %d blocks starting at block %" PRIuOFF64
 		    " to device handle %d\n", rc, cnt, ba, devcon->dev_handle);
 #ifndef NDEBUG
@@ -866,5 +866,5 @@
 
 /** Get total number of blocks on block device. */
-static int get_num_blocks(int dev_phone, bn_t *nblocks)
+static int get_num_blocks(int dev_phone, aoff64_t *nblocks)
 {
 	ipcarg_t nb_l, nb_h;
@@ -873,5 +873,5 @@
 	rc = async_req_0_2(dev_phone, BD_GET_NUM_BLOCKS, &nb_l, &nb_h);
 	if (rc == EOK) {
-		*nblocks = (bn_t) MERGE_LOUP32(nb_l, nb_h);
+		*nblocks = (aoff64_t) MERGE_LOUP32(nb_l, nb_h);
 	}
 
