On Tuesday 28 January 2014 16:24:52 Richard W.M. Jones wrote:
> --- a/ocaml/examples/create_disk.ml
> +++ b/ocaml/examples/create_disk.ml
> @@ -9,9 +9,7 @@ let () =
>    let g = new Guestfs.guestfs () in
> 
>    (* Create a raw-format sparse disk image, 512 MB in size. *)
> -  let fd = openfile output [O_WRONLY;O_CREAT;O_TRUNC;O_NOCTTY] 0o666 in
> -  ftruncate fd (512 * 1024 * 1024);
> -  close fd;
> +  g#disk_create output "raw" 536870912L;

Minor niptick: I'd leave the multiplication, as it was before and as
the other examples do (easier to spot and to change).

-- 
Pino Toscano

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://www.redhat.com/mailman/listinfo/libguestfs

Reply via email to