-diskimage_impl.cmi: int63.cmi /usr/lib64/ocaml/bitmatch/bitmatch.cmi
+diskimage_impl.cmi: int63.cmi /usr/lib/ocaml/bitmatch/bitmatch.cmi
diskimage_lvm2_metadata.cmi: int63.cmi
diskimage_lvm2_parser.cmi: int63.cmi diskimage_lvm2_metadata.cmi
-diskimage.cmi: int63.cmi /usr/lib64/ocaml/bitmatch/bitmatch.cmi
+diskimage.cmi: int63.cmi /usr/lib/ocaml/bitmatch/bitmatch.cmi
diskimage_ext2.cmo: int63.cmi diskimage_impl.cmi \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_ext2.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_ext2.cmi
diskimage_ext2.cmx: int63.cmx diskimage_impl.cmx \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_ext2.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_ext2.cmi
diskimage_fat.cmo: int63.cmi diskimage_impl.cmi \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_fat.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_fat.cmi
diskimage_fat.cmx: int63.cmx diskimage_impl.cmx \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_fat.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_fat.cmi
diskimage_impl.cmo: int63.cmi diskimage_impl.cmi
diskimage_impl.cmx: int63.cmx diskimage_impl.cmi
diskimage_linux_swap.cmo: int63.cmi diskimage_impl.cmi \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_linux_swap.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_linux_swap.cmi
diskimage_linux_swap.cmx: int63.cmx diskimage_impl.cmx \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_linux_swap.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_linux_swap.cmi
diskimage_linux_swsuspend.cmo: int63.cmi diskimage_impl.cmi \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_linux_swsuspend.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_linux_swsuspend.cmi
diskimage_linux_swsuspend.cmx: int63.cmx diskimage_impl.cmx \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_linux_swsuspend.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_linux_swsuspend.cmi
diskimage_lvm2_metadata.cmo: int63.cmi diskimage_lvm2_metadata.cmi
diskimage_lvm2_metadata.cmx: int63.cmx diskimage_lvm2_metadata.cmi
diskimage_lvm2.cmo: int63.cmi diskimage_lvm2_metadata.cmi diskimage_impl.cmi \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_lvm2.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_lvm2.cmi
diskimage_lvm2.cmx: int63.cmx diskimage_lvm2_metadata.cmx diskimage_impl.cmx \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_lvm2.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_lvm2.cmi
diskimage_lvm2_parser.cmo: int63.cmi diskimage_lvm2_metadata.cmi \
diskimage_lvm2_parser.cmi
diskimage_lvm2_parser.cmx: int63.cmx diskimage_lvm2_metadata.cmx \
diskimage_lvm2_parser.cmi
diskimage_mbr.cmo: int63.cmi diskimage_impl.cmi \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_mbr.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_mbr.cmi
diskimage_mbr.cmx: int63.cmx diskimage_impl.cmx \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_mbr.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_mbr.cmi
diskimage.cmo: diskimage_ntfs.cmi diskimage_mbr.cmi diskimage_lvm2.cmi \
diskimage_linux_swsuspend.cmi diskimage_linux_swap.cmi diskimage_impl.cmi \
diskimage_fat.cmi diskimage_ext2.cmi diskimage.cmi
diskimage_linux_swsuspend.cmx diskimage_linux_swap.cmx diskimage_impl.cmx \
diskimage_fat.cmx diskimage_ext2.cmx diskimage.cmi
diskimage_ntfs.cmo: int63.cmi diskimage_impl.cmi \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_ntfs.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_ntfs.cmi
diskimage_ntfs.cmx: int63.cmx diskimage_impl.cmx \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi diskimage_ntfs.cmi
+ /usr/lib/ocaml/bitmatch/bitmatch.cmi diskimage_ntfs.cmi
int63.cmo: int63.cmi
int63.cmx: int63.cmi
int63_on_32.cmo: int63_on_32.cmi
fs_cb = callbacks ();
fs_dev = fs_dev;
fs_blocksize = blocksize;
- fs_blocks_total = number_of_sectors *^ bytes_per_sector /^ blocksize;
+ fs_blocks_total = number_of_sectors *^ sectorsize /^ blocksize;
fs_is_swap = false;
fs_blocks_reserved = blocks_reserved;
fs_blocks_avail = blocks_avail;
fat_sectors_per_fat = size } f =
let cn = ref ~^0 in
- for i = 0 to size-1 do
+ for i = 0 to (Int63.to_int size)-1 do
let sector =
dev#read_bitstring ((start +^ Int63.of_int i) *^ sectorsize) sectorsize in
let rec loop bits =
| 0 -> Free
| 1 -> Reserved1
| (0xffffff0|0xffffff1|0xffffff2|0xffffff3|
- 0xffffff4|0xffffff5|0xffffff6) as r -> Reserved r
+ 0xffffff4|0xffffff5|0xffffff6) as r ->
+ Reserved (Int63.of_int r)
| 0xffffff7 -> Bad
| (0xffffff8|0xffffff9|0xffffffa|0xffffffb|
0xffffffc|0xffffffd|0xffffffe|
- 0xfffffff) as r -> Last r
- | _ -> Used e in
+ 0xfffffff) as r -> Last (Int63.of_int r)
+ | _ -> Used (Int63.of_int e) in
if !cn >= ~^2 then f !cn e;
cn := !cn +^ ~^1;
let blocksize = Int63.of_int blocksize in
let number_of_sectors = Int63.of_int64 number_of_sectors in
+ let bytes_per_sector = Int63.of_int bytes_per_sector in
(* The blocksize of the filesystem is likely to be quite different
* from that of the underlying device, so create an overlay device
let vcnsize = ref vcnsize in
while !vcnsize > ~^0 && !data_size > ~^0 do
let size = min blocksize !data_size in
- let data = String.make size '\000' in
+ let data = String.make (Int63.to_int size) '\000' in
f None !vcn data;
vcn := !vcn +^ ~^1;
vcnsize := !vcnsize -^ ~^1;
let data =
match lcn with
| Some lcn -> dev#read (lcn *^ blocksize +^ vcnoffset) size
- | None -> String.make size '\000' (* sparse hole *) in
+ | None -> String.make (Int63.to_int size) '\000' (* sparse hole *) in
data
(* This is easy: just look at the bitmap. *)
let byteoffset = lcn >^> 3 and bitoffset = lcn &^ ~^7 in
let byte = read_file ntfs file byteoffset ~^1 in
let byte = Char.code byte.[0] in
- let bit = byte >^> (~^0x80 >^> (Int63.to_int bitoffset)) in
+ let bit = Int63.of_int byte >^> (0x80 lsr Int63.to_int bitoffset) in
bit <> ~^0
with