X-Git-Url: http://git.annexia.org/?p=virt-mem.git;a=blobdiff_plain;f=dmesg%2Fvirt_dmesg.ml;h=dd41d26e541010a3a6751343fdf3089045710ea6;hp=10d231f54cbe82fa4a4eea9635450aacc564188d;hb=8eb1c2c4f71819108ceea4731f4dad75775ce6ae;hpb=9860e1f7cc0f5e63d5e2bfb487ef4533d5b8516b diff --git a/dmesg/virt_dmesg.ml b/dmesg/virt_dmesg.ml index 10d231f..dd41d26 100644 --- a/dmesg/virt_dmesg.ml +++ b/dmesg/virt_dmesg.ml @@ -23,22 +23,9 @@ open Virt_mem_gettext.Gettext open Virt_mem_utils open Virt_mem_mmap -let usage = s_"NAME - virt-dmesg - dmesg command for virtual machines - -SUMMARY - virt-dmesg [-options] [domains] - -DESCRIPTION - virt-dmesg prints the kernel messages for virtual machines running - under libvirt. The output is similar to the ordinary dmesg command - run inside the virtual machine." - -let verbose, images = Virt_mem.start usage - -let () = +let run debug images = List.iter ( - fun (name, arch, mem, lookup_ksym) -> + fun (_, name, arch, mem, lookup_ksym) -> try (* I don't know why but this symbol doesn't exist in 2.6.9 * even in kallsyms. Hence this won't work with that kernel. @@ -86,3 +73,11 @@ let () = eprintf (f_"%s: could not find kernel log buffer in kernel image\n") name ) images + +let summary = s_"display kernel messages" +let description = s_"\ +virt-dmesg prints the kernel messages for virtual machines running +under libvirt. The output is similar to the ordinary dmesg command +run inside the virtual machine." + +let () = Virt_mem.register "dmesg" summary description ~run