search for: 536870912l

Displaying 3 results from an estimated 3 matches for "536870912l".

Did you mean: 536870912
2014 Jan 28
1
Re: [PATCH 05/10] examples: Update various examples to use new disk-create API.
...> 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
2014 Jan 28
0
[PATCH 05/10] examples: Update various examples to use new disk-create API.
..._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; (* Set the trace flag so that we can see each libguestfs call. *) g#set_trace true; diff --git a/perl/examples/create_disk.pl b/perl/examples/create_disk.pl index 2186ce7..0b9fa8d 100755 --- a/perl/examples/create_disk.pl +++ b/perl/examples/create_disk.pl @@ -10,9 +10,7 @@ my $output = &q...
2014 Jan 28
11
[PATCH 00/10] New API: disk-create for creating blank disks.
A lot of code runs 'qemu-img create' or 'truncate' to create blank disk images. In the past I resisted adding an API to do this, since it essentially duplicates what you can already do using other tools (ie. qemu-img). However this does simplify calling code quite a lot since qemu-img is somewhat error-prone to use (eg: don't try to create a disk called "foo:bar")