git.annexia.org
/
virt-df.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Change bitmatch -> bitstring
[virt-df.git]
/
diskzip
/
diskzip.ml
diff --git
a/diskzip/diskzip.ml
b/diskzip/diskzip.ml
index
55094e7
..
0eed721
100644
(file)
--- a/
diskzip/diskzip.ml
+++ b/
diskzip/diskzip.ml
@@
-311,7
+311,7
@@
and go_decompress ?output extcompress args =
-(* Since we have the wonderful pa_bit
match
, might as well use it to
+(* Since we have the wonderful pa_bit
string
, might as well use it to
* define a robust binary format for the compressed files.
*
* These functions are in matched pairs "write_foo" / "read_foo" so
* define a robust binary format for the compressed files.
*
* These functions are in matched pairs "write_foo" / "read_foo" so
@@
-359,9
+359,9
@@
and write_header disks =
0xD152 : 16; 0x01 : 8; 0x00 : 8; (* file magic, version 1.0 *)
nr_disks : 8 (* number of disks being packed *)
} in
0xD152 : 16; 0x01 : 8; 0x00 : 8; (* file magic, version 1.0 *)
nr_disks : 8 (* number of disks being packed *)
} in
- let len = Bit
match
.bitstring_length bs in
+ let len = Bit
string
.bitstring_length bs in
assert (len land 7 = 0);
assert (len land 7 = 0);
- Bit
match
.string_of_bitstring bs in
+ Bit
string
.string_of_bitstring bs in
let names = List.map (
fun name ->
let bs =
let names = List.map (
fun name ->
let bs =
@@
-369,9
+369,9
@@
and write_header disks =
String.length name : 16;
name : -1 : string
} in
String.length name : 16;
name : -1 : string
} in
- let len = Bit
match
.bitstring_length bs in
+ let len = Bit
string
.bitstring_length bs in
assert (len land 7 = 0);
assert (len land 7 = 0);
- Bit
match
.string_of_bitstring bs
+ Bit
string
.string_of_bitstring bs
) names in
(* Construct the final header. *)
) names in
(* Construct the final header. *)
@@
-382,7
+382,7
@@
and write_header disks =
(*
and read_header () =
(* Diskzip headers are limited to overall max size of 1024 bytes. *)
(*
and read_header () =
(* Diskzip headers are limited to overall max size of 1024 bytes. *)
- let bs = Bit
match
.bitstring_of_file_descr_max stdin 1024 in
+ let bs = Bit
string
.bitstring_of_file_descr_max stdin 1024 in
bitmatch bs with
| { 0xD152 : 16; (* file magic *)
bitmatch bs with
| { 0xD152 : 16; (* file magic *)
@@
-427,7
+427,7
@@
and write_stretch_header disknum free start_offset len_bytes =
len_bytes : 64 (* Length in bytes. *)
} in
len_bytes : 64 (* Length in bytes. *)
} in
- let str = Bit
match
.string_of_bitstring bs in
+ let str = Bit
string
.string_of_bitstring bs in
ignore (write stdout str 0 (String.length str))
and write_stretch dev start_offset len_bytes =
ignore (write stdout str 0 (String.length str))
and write_stretch dev start_offset len_bytes =
@@
-449,7
+449,7
@@
and write_trailer () =
let bs = BITSTRING {
0xD152FFFF_l : 32
} in
let bs = BITSTRING {
0xD152FFFF_l : 32
} in
- let str = Bit
match
.string_of_bitstring bs in
+ let str = Bit
string
.string_of_bitstring bs in
ignore (write stdout str 0 (String.length str))
let () = main ()
ignore (write stdout str 0 (String.length str))
let () = main ()