search for: guestfs_write

Displaying 20 results from an estimated 71 matches for "guestfs_write".

Did you mean: guestfs_pwrite
2013 May 09
1
PATCH: Allow specifying the filesystem driver for guestmount
Currently guestfish has mount-vfs, and the libguestfs API has guestfs_mount_vfs(), but guestmount doesn't allow the user to specify a filesystem. This patch extends the --mount argument, so you can force an ext2 partition to mount as ext4: guestmount -a mydisk.img -m /dev/vda:/:defaults:ext4 mountpoint You could also use it to choose between ntfs and ntfs-3g, or between hfsplus and the
2015 Oct 20
0
[PATCH 2/2] actions: turn some params into RelativePathnameList (RHBZ#1174551).
...ml | 14 +++++++------- tests/bigdirs/test-big-dirs.pl | 1 - 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/generator/actions.ml b/generator/actions.ml index 274ef3f..a6de484 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -2655,7 +2655,7 @@ See also C<guestfs_write>." }; { defaults with name = "lstatlist"; added = (1, 0, 77); - style = RStructList ("statbufs", "stat"), [Pathname "path"; StringList "names"], []; + style = RStructList ("statbufs", "stat"), [Pathname &q...
2015 May 26
6
[PATCH 0/6] Update the way that API versions are generated for the man page.
The existing mechanism was clunky, slow and used ~ 10 MB of local disk. Rich.
2012 Jan 16
1
[PATCH] generator: Add an explicit Cancellable flag
...e], (let md5 = Digest.to_hex (Digest.file "COPYING.LIB") in let offset = string_of_int 100 in let size = string_of_int ((Unix.stat "COPYING.LIB").Unix.st_size - 100) in @@ -6265,7 +6280,8 @@ C<path> does not exist, then a new file is created. See also C<guestfs_write>."); - ("compress_out", (RErr, [String "ctype"; Pathname "file"; FileOut "zfile"], [OInt "level"]), 291, [], + ("compress_out", (RErr, [String "ctype"; Pathname "file"; FileOut "zfile"], [OInt &quo...
2015 May 06
0
Re: libguestfs init problem
...(guestfs_mount (g, partitions[0], "/") == -1) > exit (EXIT_FAILURE); > > /* Create some files and directories. */ > if (guestfs_touch (g, "/empty") == -1) > exit (EXIT_FAILURE); > const char *message = "Hello, world\n"; > if (guestfs_write (g, "/hello", message, strlen (message)) == -1) > exit (EXIT_FAILURE); > if (guestfs_mkdir (g, "/foo") == -1) > exit (EXIT_FAILURE); > > /* This one uploads the local file /etc/resolv.conf into > * the disk image. > */ > if (gu...
2018 Aug 20
1
[PATCH nbdkit] tests: Add a root only test of the file plugin with
In libguestfs we have a few tests that require root privileges and they are skipped by default (normally you should not build or test as root), but you can do this to run them: sudo make check-root In nbdkit I wanted to check that the file plugin works with block devices (this is not tested), and the only way I can sensibly think to do this is using a loopback device and root. This commit
2015 May 05
3
libguestfs init problem
Hi ,all : thanks for helping me ! I am using libguestfs-1.28.1 on ubuntu 12.04 to manage vm disk created by KVM. I downloaded libguestfs-1.28.1.tar.gz ,and then executed (1) ./autogen.sh (2) ./configure (3) make (4) make check .there is the error. /usr/Libvmi/libguestfs-1.28.1/run --test guest-aux/make-fedora-img.pl md_create: feature 'mdadm' is not available in this
2012 Dec 13
0
ANNOUNCE: libguestfs 1.20 - tools for accessing and modifying virtual machine disk images
...y supported through the API, making reading or editing the Windows Registry much more efficient. Several libguestfs APIs were reimplemented so they no longer have any limits on output. The reimplemented APIs are: guestfs_cat, guestfs_find, guestfs_read_file, guestfs_read_lines, guestfs_write, guestfs_write_append, guestfs_lstatlist, guestfs_lxattrlist, guestfs_readlinklist, guestfs_ls. virt tools guestfish touch 'win:c:\new_file' now works as expected. guestfish has a new --network option, which enables the user network in libguestfs. You can set G...
2019 Apr 01
1
[PATCH nbdkit v2] Add readahead filter.
Simpler, and including tests. Rich.
2017 Apr 20
1
[PATCH] tests: Replace test-max-disks with several tests.
...-1) + exit (EXIT_FAILURE); + + if (asprintf (&file, "%s/disk%zu", mp, i) == -1) + error (EXIT_FAILURE, errno, "asprintf"); + if (asprintf (&data, "This is disk %zu.", i) == -1) + error (EXIT_FAILURE, errno, "asprintf"); + + if (guestfs_write (g, file, data, strlen (data)) == -1) + exit (EXIT_FAILURE); + } + + for (i = 0; i < ndisks; ++i) { + CLEANUP_FREE char *file = NULL, *expected = NULL, *actual = NULL; + + if (asprintf (&file, "/mp%zu/disk%zu", i, i) == -1) + error (EXIT_FAILURE, errno, "aspr...
2015 Oct 20
3
[PATCH 1/2] generator: add a RelativePathnameList parameter type
Mostly like StringList (so it can used in current StringList parameters), but checking client- and daemon-side that the elements are relative paths. --- generator/bindtests.ml | 3 ++- generator/c.ml | 29 ++++++++++++++++++++++++----- generator/csharp.ml | 4 ++-- generator/daemon.ml | 20 ++++++++++++++++++-- generator/erlang.ml | 2 +- generator/fish.ml |
2015 Oct 21
2
[PATCH 1/2] generator: add a FilenameList parameter type
Mostly like StringList (so it can used in current StringList parameters), but checking client- and daemon-side that the elements are file names. --- generator/bindtests.ml | 3 ++- generator/c.ml | 29 ++++++++++++++++++++++++----- generator/csharp.ml | 4 ++-- generator/daemon.ml | 20 ++++++++++++++++++-- generator/erlang.ml | 2 +- generator/fish.ml | 10
2012 Jan 09
1
[PATCH 1/2] generator: Rename java_structs to camel_structs to better reflect their purpose
This map was originally included just for the java bindings, but is generally useful to any binding which uses camel case by requirement or convention. --- generator/generator_haskell.ml | 4 ++-- generator/generator_java.ml | 10 +++++----- generator/generator_main.ml | 2 +- generator/generator_structs.ml | 12 +++++------- generator/generator_structs.mli | 8 ++++---- 5
2014 Sep 22
2
[PATCH] New APIs: Implement stat calls that return nanosecond timestamps (RHBZ#1144891).
...ec); return -1; } -#endif #if 0 /* Does not work! See https://bugzilla.redhat.com/show_bug.cgi?id=1144766 */ diff --git a/generator/actions.ml b/generator/actions.ml index 73dcd33..7782198 100644 --- a/generator/actions.ml +++ b/generator/actions.ml @@ -2605,6 +2605,7 @@ See also C<guestfs_write>." }; { defaults with name = "lstatlist"; style = RStructList ("statbufs", "stat"), [Pathname "path"; StringList "names"], []; + deprecated_by = Some "lstatnslist"; shortdesc = "lstat on multiple files&quo...
2017 Apr 21
0
[PATCH 1/2] generator: Simplify the handling of string parameters.
..."content"], []; + style = RErr, [String (Pathname, "path"); BufferIn "content"], []; tests = [ InitScratchFS, Always, TestResultString ( [["write"; "/write"; "new file contents"]; @@ -1132,7 +1132,7 @@ See also C<guestfs_write_append>." }; { defaults with name = "write_append"; added = (1, 11, 18); - style = RErr, [Pathname "path"; BufferIn "content"], []; + style = RErr, [String (Pathname, "path"); BufferIn "content"], []; tests = [ In...
2017 Apr 21
4
[PATCH 0/2] generator: Simplify the handling of string parameters.
Very large but mechanical change to the generator. Rich.
2017 Feb 21
1
[PATCH] generator: Put all the daemon procedure numbers (proc_nr)
This is a follow-up to the other generator changes in: https://www.redhat.com/archives/libguestfs/2017-February/msg00217.html Rich.
2015 Jun 14
2
[PATCH] pod: Use F<> for filenames instead of C<>.
...contains C</dev/mapper/*> devices, eg. ones created +The returned list contains F</dev/mapper/*> devices, eg. ones created by a previous call to C<guestfs_luks_open>. Device mapper devices which correspond to logical volumes are I<not> @@ -9376,8 +9376,8 @@ See also C<guestfs_write>." }; cancellable = true; shortdesc = "output compressed file"; longdesc = "\ -This command compresses C<file> and writes it out to the local -file C<zfile>. +This command compresses F<file> and writes it out to the local +file F<zfile>....
2017 Feb 18
8
[PATCH 0/6] generator: Split up generator/actions.ml
Split up the huge generator/actions.ml into several smaller files. Rich.
2011 Jan 04
0
builder-debian libguestfs success 7ce627fce02eae8c7db36b4090fa0ce1bf69bf44
...stfs.h:448: note: expected 'char * const*' but argument is of type 'const char **' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1write': com_redhat_et_libguestfs_GuestFS.c:7586: warning: pointer targets in passing argument 3 of 'guestfs_write' differ in signedness ../src/guestfs.h:1084: note: expected 'const char *' but argument is of type 'jbyte *' com_redhat_et_libguestfs_GuestFS.c: In function 'Java_com_redhat_et_libguestfs_GuestFS__1pwrite': com_redhat_et_libguestfs_GuestFS.c:7610: warning: pointer target...