gmon.out
virt-mem-*.tar.gz
lib/virt_mem_gettext.ml
+lib/virt_mem_version.ml
uname/virt-uname
dmesg/virt-dmesg
samples
\ No newline at end of file
aclocal.m4
+ChangeLog
configure.ac
COPYING
dmesg/.depend
lib/virt_mem_mmap.ml
lib/virt_mem_mmap.mli
lib/virt_mem_utils.ml
+lib/virt_mem_version.ml.in
Makefile.in
Make.rules.in
MANIFEST
AC_CONFIG_FILES([Makefile
Make.rules
lib/Makefile
+ lib/virt_mem_version.ml
uname/Makefile
dmesg/Makefile
po/Makefile
virt_mem.cmi: virt_mem_utils.cmo virt_mem_mmap.cmi
virt_mem_mmap.cmi: virt_mem_utils.cmo /usr/lib64/ocaml/bitmatch/bitmatch.cmi
-virt_mem.cmo: virt_mem_utils.cmo virt_mem_mmap.cmi virt_mem_gettext.cmo \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi virt_mem.cmi
-virt_mem.cmx: virt_mem_utils.cmx virt_mem_mmap.cmx virt_mem_gettext.cmx \
- /usr/lib64/ocaml/bitmatch/bitmatch.cmi virt_mem.cmi
+virt_mem.cmo: virt_mem_version.cmo virt_mem_utils.cmo virt_mem_mmap.cmi \
+ virt_mem_gettext.cmo /usr/lib64/ocaml/bitmatch/bitmatch.cmi virt_mem.cmi
+virt_mem.cmx: virt_mem_version.cmx virt_mem_utils.cmx virt_mem_mmap.cmx \
+ virt_mem_gettext.cmx /usr/lib64/ocaml/bitmatch/bitmatch.cmi virt_mem.cmi
virt_mem_mmap.cmo: virt_mem_utils.cmo /usr/lib64/ocaml/bitmatch/bitmatch.cmi \
virt_mem_mmap.cmi
virt_mem_mmap.cmx: virt_mem_utils.cmx /usr/lib64/ocaml/bitmatch/bitmatch.cmi \
TARGETS = virt_mem.cma virt_mem.cmxa
OBJS = virt_mem_gettext.cmo \
+ virt_mem_version.cmo \
virt_mem_utils.cmo \
virt_mem_mmap.cmo \
virt_mem.cmo
-XOBJS = virt_mem_gettext.cmx \
- virt_mem_utils.cmx \
- virt_mem_mmap.cmx \
- virt_mem.cmx
+XOBJS = $(OBJS:%.cmo=%.cmx)
all: $(TARGETS)
:: !images
in
+ let version () =
+ printf "virt-mem %s\n" Virt_mem_version.version;
+
+ let major, minor, release =
+ let v, _ = Libvirt.get_version () in
+ v / 1_000_000, (v / 1_000) mod 1_000, v mod 1_000 in
+ printf "libvirt %d.%d.%d\n" major minor release;
+ exit 0
+ in
+
let argspec = Arg.align [
"-A", Arg.String set_architecture,
"arch " ^ s_"Set kernel architecture, endianness and word size";
" " ^ s_"Debug mode (default: false)";
"-t", Arg.String memory_image,
"image " ^ s_"Use saved kernel memory image";
+ "--version", Arg.Unit version,
+ " " ^ s_"Display version and exit";
] in
let anon_fun str =
--- /dev/null
+(* Memory info for virtual domains.
+ (C) Copyright 2008 Richard W.M. Jones, Red Hat Inc.
+ http://libvirt.org/
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *)
+
+let version = "@PACKAGE_VERSION@"