let block_size, block_nb = handle_unix begin function () -> ignore (lseek disk (-4) SEEK_END); let buffer = String.create 4 in really_read disk buffer 0 4; let size = (fstat disk).st_size in let block_size = Misc.read_int buffer 0 in assert (((size - 4) mod block_size = 0) && block_size >= min_block_size); block_size, size / block_size end () |