git.annexia.org
/
virt-df.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6c17fc4
)
Change bitmatch -> bitstring
author
Richard W.M. Jones
<rjones@redhat.com>
Thu, 17 Jul 2008 16:51:56 +0000
(17:51 +0100)
committer
Richard W.M. Jones
<rjones@redhat.com>
Thu, 17 Jul 2008 16:51:56 +0000
(17:51 +0100)
Makefile.in
patch
|
blob
|
history
configure.ac
patch
|
blob
|
history
diskzip/Makefile.in
patch
|
blob
|
history
diskzip/diskzip.ml
patch
|
blob
|
history
lib/META.in
patch
|
blob
|
history
lib/Makefile.in
patch
|
blob
|
history
lib/README
patch
|
blob
|
history
lib/diskimage.mli
patch
|
blob
|
history
lib/diskimage_impl.mli
patch
|
blob
|
history
lib/diskimage_ntfs.ml
patch
|
blob
|
history
virt-df/Makefile.in
patch
|
blob
|
history
diff --git
a/Makefile.in
b/Makefile.in
index
f9f2a51
..
d21bce8
100644
(file)
--- a/
Makefile.in
+++ b/
Makefile.in
@@
-22,7
+22,7
@@
VERSION = @PACKAGE_VERSION@
INSTALL = @INSTALL@
OCAMLDOC = @OCAMLDOC@
INSTALL = @INSTALL@
OCAMLDOC = @OCAMLDOC@
-OCAMLDOCFLAGS += -html -sort -package bit
match
-I lib
+OCAMLDOCFLAGS += -html -sort -package bit
string
-I lib
OCAMLDOCFILES := $(wildcard lib/diskimage*.mli) lib/int63.mli
SUBDIRS = lib virt-df diskzip
OCAMLDOCFILES := $(wildcard lib/diskimage*.mli) lib/int63.mli
SUBDIRS = lib virt-df diskzip
diff --git
a/configure.ac
b/configure.ac
index
25c30bb
..
8a784a4
100644
(file)
--- a/
configure.ac
+++ b/
configure.ac
@@
-54,9
+54,9
@@
if test "x$pkg_xml_light" != "xyes"; then
AC_MSG_ERROR([Cannot find required OCaml package 'xml-light'])
fi
AC_MSG_ERROR([Cannot find required OCaml package 'xml-light'])
fi
-AC_CHECK_OCAML_PKG(bit
match
)
-if test "x$pkg_bit
match
" != "xyes"; then
- AC_MSG_ERROR([Cannot find required OCaml package 'bit
match
'])
+AC_CHECK_OCAML_PKG(bit
string
)
+if test "x$pkg_bit
string
" != "xyes"; then
+ AC_MSG_ERROR([Cannot find required OCaml package 'bit
string
'])
fi
dnl Check for optional OCaml packages.
fi
dnl Check for optional OCaml packages.
@@
-67,7
+67,7
@@
AC_SUBST(pkg_unix)
AC_SUBST(pkg_extlib)
AC_SUBST(pkg_libvirt)
AC_SUBST(pkg_xml_light)
AC_SUBST(pkg_extlib)
AC_SUBST(pkg_libvirt)
AC_SUBST(pkg_xml_light)
-AC_SUBST(pkg_bit
match
)
+AC_SUBST(pkg_bit
string
)
AC_SUBST(pkg_gettext)
AC_SUBST(pkg_csv)
AC_SUBST(pkg_gettext)
AC_SUBST(pkg_csv)
diff --git
a/diskzip/Makefile.in
b/diskzip/Makefile.in
index
c3632e2
..
f44d347
100644
(file)
--- a/
diskzip/Makefile.in
+++ b/
diskzip/Makefile.in
@@
-28,7
+28,7
@@
bindir = @bindir@
pkg_gettext = @pkg_gettext@
pkg_gettext = @pkg_gettext@
-OCAMLCPACKAGES := -package unix,extlib,bit
match.syntax,bitmatch
-I ../lib
+OCAMLCPACKAGES := -package unix,extlib,bit
string.syntax,bitstring
-I ../lib
ifneq ($(pkg_gettext),no)
OCAMLCPACKAGES += -package gettext-stub
ifneq ($(pkg_gettext),no)
OCAMLCPACKAGES += -package gettext-stub
@@
-37,7
+37,7
@@
endif
OBJS := diskzip_gettext.cmo diskzip.cmo
XOBJS := $(OBJS:.cmo=.cmx)
OBJS := diskzip_gettext.cmo diskzip.cmo
XOBJS := $(OBJS:.cmo=.cmx)
-SYNTAX := -syntax bit
match
.syntax
+SYNTAX := -syntax bit
string
.syntax
OCAMLCFLAGS := @OCAMLCFLAGS@ $(SYNTAX)
OCAMLCLIBS := -linkpkg diskimage.cma
OCAMLCFLAGS := @OCAMLCFLAGS@ $(SYNTAX)
OCAMLCLIBS := -linkpkg diskimage.cma
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 ()
diff --git
a/lib/META.in
b/lib/META.in
index
d3ea966
..
e1c8f91
100644
(file)
--- a/
lib/META.in
+++ b/
lib/META.in
@@
-3,4
+3,4
@@
version="@PACKAGE_VERSION@"
description="Library for processing disk images"
archive(byte)="diskimage.cma"
archive(native)="diskimage.cmxa"
description="Library for processing disk images"
archive(byte)="diskimage.cma"
archive(native)="diskimage.cmxa"
-requires = "bit
match
"
+requires = "bit
string
"
diff --git
a/lib/Makefile.in
b/lib/Makefile.in
index
5e54923
..
b508016
100644
(file)
--- a/
lib/Makefile.in
+++ b/
lib/Makefile.in
@@
-28,7
+28,7
@@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
exec_prefix = @exec_prefix@
bindir = @bindir@
-OCAMLCPACKAGES := -package unix,extlib,bit
match
.syntax
+OCAMLCPACKAGES := -package unix,extlib,bit
string
.syntax
#----------------------------------------------------------------------
# Build up the list of object files.
#----------------------------------------------------------------------
# Build up the list of object files.
@@
-54,7
+54,7
@@
XOBJS := $(OBJS:.cmo=.cmx)
#----------------------------------------------------------------------
#----------------------------------------------------------------------
-SYNTAX := -syntax bit
match
.syntax
+SYNTAX := -syntax bit
string
.syntax
OCAMLCFLAGS := @OCAMLCFLAGS@ $(SYNTAX)
OCAMLCLIBS := -linkpkg
OCAMLCFLAGS := @OCAMLCFLAGS@ $(SYNTAX)
OCAMLCLIBS := -linkpkg
diff --git
a/lib/README
b/lib/README
index
e5de637
..
2886d35
100644
(file)
--- a/
lib/README
+++ b/
lib/README
@@
-9,8
+9,8
@@
Developer documentation
This subdirectory contains a library of useful functions for parsing
disk images.
This subdirectory contains a library of useful functions for parsing
disk images.
-It is all based on and uses the pa_bit
match
syntax extension &
-library. You need pa_bit
match >= 1.9.5
.
+It is all based on and uses the pa_bit
string
syntax extension &
+library. You need pa_bit
string >= 1.9.7
.
This program has suddenly become rather large and confusing.
Hopefully this documentation should go some way towards explaining
This program has suddenly become rather large and confusing.
Hopefully this documentation should go some way towards explaining
diff --git
a/lib/diskimage.mli
b/lib/diskimage.mli
index
cf39e91
..
ee95453
100644
(file)
--- a/
lib/diskimage.mli
+++ b/
lib/diskimage.mli
@@
-48,9
+48,9
@@
class virtual device :
Note: A default implementation is provided for [read],
but it is fairly inefficient because it uses {!map_block} to
map each block in the request. *)
Note: A default implementation is provided for [read],
but it is fairly inefficient because it uses {!map_block} to
map each block in the request. *)
- method read_bitstring : Int63.t -> Int63.t -> Bit
match
.bitstring
+ method read_bitstring : Int63.t -> Int63.t -> Bit
string
.bitstring
(** [read_bitstring] is the same as [read] but returns
(** [read_bitstring] is the same as [read] but returns
- a pa_bit
match
-style bitstring. *)
+ a pa_bit
string
-style bitstring. *)
method virtual blocksize : Int63.t
(** [blocksize] returns the natural block size of the device. *)
method virtual blocksize : Int63.t
(** [blocksize] returns the natural block size of the device. *)
@@
-91,7
+91,7
@@
class block_device : string -> Int63.t ->
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
- method read_bitstring : Int63.t -> Int63.t -> Bit
match
.bitstring
+ method read_bitstring : Int63.t -> Int63.t -> Bit
string
.bitstring
method blocksize : Int63.t
method map_block : Int63.t -> (device * Int63.t) list
method contiguous : Int63.t -> Int63.t
method blocksize : Int63.t
method map_block : Int63.t -> (device * Int63.t) list
method contiguous : Int63.t -> Int63.t
@@
-109,7
+109,7
@@
class offset_device : string -> Int63.t -> Int63.t -> Int63.t -> device ->
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
- method read_bitstring : Int63.t -> Int63.t -> Bit
match
.bitstring
+ method read_bitstring : Int63.t -> Int63.t -> Bit
string
.bitstring
method blocksize : Int63.t
method map_block : Int63.t -> (device * Int63.t) list
method contiguous : Int63.t -> Int63.t
method blocksize : Int63.t
method map_block : Int63.t -> (device * Int63.t) list
method contiguous : Int63.t -> Int63.t
@@
-129,7
+129,7
@@
class blocksize_overlay : Int63.t -> device ->
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
- method read_bitstring : Int63.t -> Int63.t -> Bit
match
.bitstring
+ method read_bitstring : Int63.t -> Int63.t -> Bit
string
.bitstring
method blocksize : Int63.t
method contiguous : Int63.t -> Int63.t
method map_block : Int63.t -> (device * Int63.t) list
method blocksize : Int63.t
method contiguous : Int63.t -> Int63.t
method map_block : Int63.t -> (device * Int63.t) list
diff --git
a/lib/diskimage_impl.mli
b/lib/diskimage_impl.mli
index
3a34dcb
..
05fcd70
100644
(file)
--- a/
lib/diskimage_impl.mli
+++ b/
lib/diskimage_impl.mli
@@
-33,7
+33,7
@@
class virtual device :
method virtual name : string
method virtual size : Int63.t
method read : Int63.t -> Int63.t -> string
method virtual name : string
method virtual size : Int63.t
method read : Int63.t -> Int63.t -> string
- method read_bitstring : Int63.t -> Int63.t -> Bit
match
.bitstring
+ method read_bitstring : Int63.t -> Int63.t -> Bit
string
.bitstring
method virtual blocksize : Int63.t
method virtual map_block : Int63.t -> (device * Int63.t) list
method virtual contiguous : Int63.t -> Int63.t
method virtual blocksize : Int63.t
method virtual map_block : Int63.t -> (device * Int63.t) list
method virtual contiguous : Int63.t -> Int63.t
@@
-44,7
+44,7
@@
class block_device : string -> Int63.t ->
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
- method read_bitstring : Int63.t -> Int63.t -> Bit
match
.bitstring
+ method read_bitstring : Int63.t -> Int63.t -> Bit
string
.bitstring
method blocksize : Int63.t
method map_block : Int63.t -> (device * Int63.t) list
method contiguous : Int63.t -> Int63.t
method blocksize : Int63.t
method map_block : Int63.t -> (device * Int63.t) list
method contiguous : Int63.t -> Int63.t
@@
-56,7
+56,7
@@
class offset_device : string -> Int63.t -> Int63.t -> Int63.t -> device ->
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
- method read_bitstring : Int63.t -> Int63.t -> Bit
match
.bitstring
+ method read_bitstring : Int63.t -> Int63.t -> Bit
string
.bitstring
method blocksize : Int63.t
method map_block : Int63.t -> (device * Int63.t) list
method contiguous : Int63.t -> Int63.t
method blocksize : Int63.t
method map_block : Int63.t -> (device * Int63.t) list
method contiguous : Int63.t -> Int63.t
@@
-67,7
+67,7
@@
class blocksize_overlay : Int63.t -> device ->
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
method name : string
method size : Int63.t
method read : Int63.t -> Int63.t -> string
- method read_bitstring : Int63.t -> Int63.t -> Bit
match
.bitstring
+ method read_bitstring : Int63.t -> Int63.t -> Bit
string
.bitstring
method blocksize : Int63.t
method map_block : Int63.t -> (device * Int63.t) list
method contiguous : Int63.t -> Int63.t
method blocksize : Int63.t
method map_block : Int63.t -> (device * Int63.t) list
method contiguous : Int63.t -> Int63.t
diff --git
a/lib/diskimage_ntfs.ml
b/lib/diskimage_ntfs.ml
index
a26a686
..
e43033d
100644
(file)
--- a/
lib/diskimage_ntfs.ml
+++ b/
lib/diskimage_ntfs.ml
@@
-415,7
+415,7
@@
and parse_runlist vcn lcn bits =
| { _ } ->
if !debug then (
eprintf "unknown field in the runlist\n%!";
| { _ } ->
if !debug then (
eprintf "unknown field in the runlist\n%!";
- Bit
match
.hexdump_bitstring Pervasives.stderr bits
+ Bit
string
.hexdump_bitstring Pervasives.stderr bits
);
[]
);
[]
diff --git
a/virt-df/Makefile.in
b/virt-df/Makefile.in
index
ade050d
..
312a257
100644
(file)
--- a/
virt-df/Makefile.in
+++ b/
virt-df/Makefile.in
@@
-28,7
+28,7
@@
bindir = @bindir@
pkg_gettext = @pkg_gettext@
pkg_gettext = @pkg_gettext@
-OCAMLCPACKAGES := -package unix,extlib,xml-light,libvirt,bit
match.syntax,bitmatch
-I ../lib
+OCAMLCPACKAGES := -package unix,extlib,xml-light,libvirt,bit
string.syntax,bitstring
-I ../lib
ifneq ($(pkg_gettext),no)
OCAMLCPACKAGES += -package gettext-stub
ifneq ($(pkg_gettext),no)
OCAMLCPACKAGES += -package gettext-stub