search for: guestfs_touch

Displaying 11 results from an estimated 11 matches for "guestfs_touch".

2013 Jan 24
0
Libguestfs with Perl 6 :-)
...tfs_add_drive(OpaquePointer $handle, Str $path) returns Int is native('libguestfs') {} sub guestfs_launch(OpaquePointer $handle) returns Int is native('libguestfs') {} sub guestfs_mount(OpaquePointer $handle, Str $path, Str $target) returns Int is native('libguestfs') {} sub guestfs_touch(OpaquePointer $handle, Str $path) returns Int is native('libguestfs') {} sub guestfs_umount(OpaquePointer $handle, Str $path) returns Int is native('libguestfs') {} sub guestfs_shutdown(OpaquePointer $handle) returns Int is native('libguestfs') {} sub guestfs_close(OpaquePoi...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...s_mount (g, "/dev/sda1", "/") == -1) { - fprintf (stderr, - _("libguestfs-test-tool: failed to mount /dev/sda1 on /\n")); + if (guestfs_mount (g, "/dev/sda1", "/") == -1) exit (EXIT_FAILURE); - } /* Touch a file. */ - if (guestfs_touch (g, "/hello") == -1) { - fprintf (stderr, - _("libguestfs-test-tool: failed to touch file\n")); + if (guestfs_touch (g, "/hello") == -1) exit (EXIT_FAILURE); - } /* Close the handle. */ - if (guestfs_shutdown (g) == -1) { - fprintf (stder...
2015 May 06
0
Re: libguestfs init problem
...xt4", partitions[0]) == -1) > exit (EXIT_FAILURE); > > /* Now mount the filesystem so that we can add files. */ > if (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) >...
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.
2016 Feb 12
0
[PATCH] php: restructure and expand tests
...uot;, "VG", 200); +guestfs_lvcreate ($g, "LV2", "VG", 200); + +$lvs = guestfs_lvs ($g); +var_dump ($lvs); + +guestfs_mkfs ($g, "ext2", "/dev/VG/LV1"); +guestfs_mount ($g, "/dev/VG/LV1", "/"); +guestfs_mkdir ($g, "/p"); +guestfs_touch ($g, "/q"); + +function dir_cmp ($a, $b) +{ + return strcmp ($a["name"], $b["name"]); +} +function dir_extract ($n) +{ + return array ("name" => $n["name"], "ftyp" => $n["ftyp"]); +} +$dirs = guestfs_readdir ($g, "/&...
2020 Mar 17
2
[PATCH nbdkit v3] New tmpdisk plugin.
v2 was here: https://www.redhat.com/archives/libguestfs/2020-March/msg00154.html v3: - Micro-optimize tmpdir. - Quote $disk in default command shell fragment. - Don't redirect mkfs output to /dev/null. Instead use exec </dev/null >/dev/null before the shell fragment. We may want to do this in other places where we run external shell scripts, or more generally for all
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
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be
2020 Mar 17
2
[PATCH nbdkit v2] New tmpdisk plugin.
.../dev/sda", "/") == -1) + exit (EXIT_FAILURE); + if (guestfs_mount (g2, "/dev/sda", "/") == -1) + exit (EXIT_FAILURE); + + /* Create some files and directories on each. */ + if (guestfs_mkdir (g1, "/test1") == -1) + exit (EXIT_FAILURE); + if (guestfs_touch (g1, "/test1/file1") == -1) + exit (EXIT_FAILURE); + if (guestfs_mkdir (g2, "/test2") == -1) + exit (EXIT_FAILURE); + if (guestfs_touch (g2, "/test2/file2") == -1) + exit (EXIT_FAILURE); + + if (guestfs_sync (g1) == -1 || guestfs_sync (g2) == -1) + exit...
2009 Nov 20
1
fix new failures from latest-from-gnulib syntax-check
...dd_drive (g, argv[1]) == -1) exit (EXIT_FAILURE); - if (guestfs_launch (g) == -1) exit (1); + if (guestfs_launch (g) == -1) exit (EXIT_FAILURE); - if (guestfs_mount (g, argv[2], "/") == -1) exit (1); + if (guestfs_mount (g, argv[2], "/") == -1) exit (EXIT_FAILURE); - if (guestfs_touch (g, "/hello") == -1) exit (1); + if (guestfs_touch (g, "/hello") == -1) exit (EXIT_FAILURE); guestfs_sync (g); guestfs_close (g); diff --git a/examples/to-xml.c b/examples/to-xml.c index 6d0a1df..537ae91 100644 --- a/examples/to-xml.c +++ b/examples/to-xml.c @@ -25,7 +25...
2012 Jul 03
8
[PATCH 0/7 v2] Fix and workaround for qcow2 issues in qemu causing data corruption.
https://bugzilla.redhat.com/show_bug.cgi?id=836710 https://bugzilla.redhat.com/show_bug.cgi?id=836913 There are at least two related bugs going on: (1) Linux sync(2) system call doesn't send a write barrier to the disk, so in effect it doesn't force the hard disk to flush its cache. libguestfs used sync(2) to force changes to disk. We didn't expect that qemu was caching anything