Combined binary.
[virt-mem.git] / uname / virt_uname.ml
index fff6d7f..f2f6ddc 100644 (file)
@@ -23,20 +23,7 @@ open Virt_mem_gettext.Gettext
 open Virt_mem_utils
 open Virt_mem_mmap
 
-let usage = s_"NAME
-  virt-uname - uname command for virtual machines
-
-SUMMARY
-  virt-uname [-options] [domains]
-
-DESCRIPTION
-  virt-uname prints the uname information such as OS version,
-  architecture and node name for virtual machines running under
-  libvirt."
-
-let _, images = Virt_mem.start usage
-
-let () =
+let run debug images =
   (* Print new_utsname structure from bitstring. *)
   let print_new_utsname name bs =
     (* Truncate an OCaml string at the first ASCII NUL character, ie. as
@@ -100,3 +87,11 @@ let () =
            Not_found ->
              eprintf (f_"%s: could not find utsname in kernel image\n") name
   ) images
+
+let summary = s_"uname command for virtual machines"
+let description = s_"\
+virt-uname prints the uname information such as OS version,
+architecture and node name for virtual machines running under
+libvirt."
+
+let () = Virt_mem.register "uname" summary description true run