QEMU/KVM virtual machine management via QMP
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

atp, http, qemu: complete Json.t/Json.Codec.Value.t disambiguation

- hermest main.ml: generate dune.inc with [libraries atp json] (not jsont).
- Json.to_string/of_string args: codec is Json.Codec.Value.t (not Json.t
which is a type).
- test_huri: Json.to_string_exn/of_string_exn raise; remove bogus
pattern-match on result.
- Various value-context uses of Json.t fixed to Json.Codec.Value.t when
they were codec args, and to Json.string/Json.null etc. when they were
value constructors.

+3 -5
+1 -2
bin/main.ml
··· 171 171 Fmt.pr "Connected.@."; 172 172 (match Qemu.Vm.query_status vm with 173 173 | Ok status -> Fmt.pr "Status: %a@." Qemu.Qmp.Status.pp status 174 - | Error e -> 175 - Fmt.epr "Status error: %s@." e); 174 + | Error e -> Fmt.epr "Status error: %s@." e); 176 175 `Ok ())) 177 176 $ name_arg $ cpus_arg $ memory_arg $ kernel_arg $ initrd_arg $ cmdline_arg 178 177 $ disk_arg $ accel_arg $ kvm_arg $ no_kvm_arg $ socket_arg)
+1 -1
lib/dune
··· 1 1 (library 2 2 (name qemu) 3 3 (public_name qemu) 4 - (libraries eio json json.bytesrw logs bytesrw vlog tty unix fmt)) 4 + (libraries eio json logs bytesrw vlog tty unix fmt))
+1 -1
lib/qemu.ml
··· 29 29 (* Query status *) 30 30 match Qemu.Vm.query_status vm with 31 31 | Ok status -> Fmt.pr "VM status: %a@." Qemu.Qmp.Status.pp status 32 - | Error e -> Fmt.pr "Error: %s@." e) 32 + | Error e -> Fmt.pr "Error: %s@." (Json.Error.to_string e)) 33 33 ]} 34 34 35 35 {1 Architecture}
-1
lib/vm.ml
··· 10 10 module Log = (val Logs.src_log src) 11 11 12 12 let err_qmp e = Error (Fmt.str "%a" Qmp_protocol.Error.pp e) 13 - 14 13 let err_greeting_read e = Error (Fmt.str "Failed to read greeting: %s" e) 15 14 16 15 let err_capabilities e =