search for: guestfs_umount_all

Displaying 20 results from an estimated 31 matches for "guestfs_umount_all".

2012 Mar 31
1
modifying open_guest function (copy_over.c)
It works, but I should delete if (guestfs_umount_all (destg) == -1) ??? exit (EXIT_FAILURE); inmain() function and /* Clean up. */ ? if (guestfs_umount_all (srcg) == -1) { ??? pthread_cancel (threaddata->mainthread); ??? exit (EXIT_FAILURE); ? } in the start_scrthread() function or it will return an error after the program finish: libguestfs:...
2020 Feb 26
1
[PATCH] filesystems: fix size reporting for filesystems
...guestfs_push_error_handler (g, NULL, NULL); + + if (guestfs_mount_ro (g, fses[i], "/") == 0) { + CLEANUP_FREE_STATVFS struct guestfs_statvfs *stat = NULL; + + stat = guestfs_statvfs (g, "/"); + size = stat->blocks * stat->bsize; + guestfs_umount_all (g); + } else { + size = guestfs_blockdev_getsize64 (g, fses[i]); + } + + guestfs_pop_error_handler (g); + if (size == -1) exit (EXIT_FAILURE); } -- 2.24.1
2016 Mar 07
0
[PATCH] inspector: add --no-applications and --no-icon
...r) exit (EXIT_FAILURE); - if (size > 0) { - XMLERROR (-1, xmlTextWriterStartElement (xo, BAD_CAST "icon")); - XMLERROR (-1, xmlTextWriterWriteBase64 (xo, str, 0, size)); - XMLERROR (-1, xmlTextWriterEndElement (xo)); + /* Unmount (see inspect_mount_root above). */ + if (guestfs_umount_all (g) == -1) + exit (EXIT_FAILURE); } - /* Note we must free (str) even if size == 0, because that indicates - * there was no icon. - */ - free (str); - - /* Unmount (see inspect_mount_root above). */ - if (guestfs_umount_all (g) == -1) - exit (EXIT_FAILURE); XMLERROR (-1, xml...
2013 Feb 07
2
[PATCH 1/2] Fix bogus partition number passed to guestfs___check_for_filesystem_on
...r. */ @@ -149,7 +149,7 @@ guestfs___check_for_filesystem_on (guestfs_h *g, const char *device, return 0; /* Do the rest of the checks. */ - r = check_filesystem (g, device, is_block, is_partnum); + r = check_filesystem (g, device, whole_device); /* Unmount the filesystem. */ if (guestfs_umount_all (g) == -1) @@ -165,12 +165,17 @@ guestfs___check_for_filesystem_on (guestfs_h *g, const char *device, * (eg. /dev/sda1 => is_partnum == 1). */ static int -check_filesystem (guestfs_h *g, const char *device, - int is_block, int is_partnum) +check_filesystem (guestfs_h *g, co...
2012 Mar 09
1
[PATCH 1/2] Close all file descriptors in the recovery process.
From: "Richard W.M. Jones" <rjones at redhat.com> If the parent process uses a pipe (or any fd, but pipes are a particular problem), then the recovery process would hold open the file descriptor(s) of the pipe, meaning that it could not be fully closed in the parent. Because the recovery process doesn't use exec(2), this wasn't avoidable even using FD_CLOEXEC. Avoid this
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.
2018 Oct 04
0
[PATCH v2 3/4] inspector: Use libxml writer macros.
..., because that indicates + * there was no icon. + */ + free (str); } - /* Note we must free (str) even if size == 0, because that indicates - * there was no icon. - */ - free (str); + + /* Unmount (see inspect_mount_root above). */ + if (guestfs_umount_all (g) == -1) + exit (EXIT_FAILURE); } - - /* Unmount (see inspect_mount_root above). */ - if (guestfs_umount_all (g) == -1) - exit (EXIT_FAILURE); - } - - XMLERROR (-1, xmlTextWriterEndElement (xo)); + } end_element (); /* operatingsystem */ } static int @@ -548,23 +534,...
2010 Aug 02
5
[PATCH v3 0/5] Inspection code in C
The first three patches were posted previously: https://www.redhat.com/archives/libguestfs/2010-July/msg00082.html The last two patches in this series change guestfish -i to use this new code. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to
2010 Jul 29
4
[PATCH 0/3] Inspection code in C
These three patches (two were previously posted) can do simple operating system inspection in C. Example of use: ><fs> add-ro rhel55.img ><fs> run ><fs> inspect-os /dev/VolGroup00/LogVol00 ><fs> inspect-get-type /dev/VolGroup00/LogVol00 linux ><fs> inspect-get-distro /dev/VolGroup00/LogVol00 rhel ><fs> inspect-get-arch
2010 Aug 17
8
[PATCH v4 0/8] Inspection code in C
Previously discussed here: https://www.redhat.com/archives/libguestfs/2010-August/msg00002.html -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://et.redhat.com/~rjones/virt-df/
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
2017 Mar 04
0
[PATCH] rescue: Implement escape sequences.
...} + } + } + break; + + case 'q': case 'x': + return true /* exit virt-rescue at once */; + + case 'u': + printf ("\r\n"); + printf (_("unmounting filesystems ...\r\n")); + guestfs_umount_all (g); + break; + + default: + /* Any unrecognized escape sequence will be dropped. We could + * be obnoxious and ring the bell. XXX + */ + break; + } + /* Drop the escape key and return to non-escape mode. */ + memmove (&amp...
2016 Dec 06
3
[PATCH 1/2] inspect: fstab: Canonicalize paths appearing in fstab.
For example, converts "///usr//local//" -> "/usr/local". --- src/inspect-fs-unix.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/src/inspect-fs-unix.c b/src/inspect-fs-unix.c index a1a757c..0fea9c8 100644 --- a/src/inspect-fs-unix.c +++ b/src/inspect-fs-unix.c @@ -89,6 +89,7 @@ static char *resolve_fstab_device
2014 Aug 28
14
[PATCH 00/13] code refactorings for tools
Hi, this series does a couple of code reorganizations/refactoring in code used by tools: the windows path handling code, and the two types of file editing (using editor, and using perl expression). There's still a code duplication between the two variants of file editing, but it is just within a single source, and can be easily solved now (planning as next step). Pino Toscano (13): edit:
2018 Nov 02
7
[PATCH v3 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html v2 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00051.html v3: - Back to using string/string_format and attribute/attribute_format. - Add both single_element and single_element_format. - Rebased and retested. Rich.
2020 Feb 20
0
buffer overflow detected in collectd using libguestfs
...s[j], "/") == 0)) { fs_stats = guestfs_statvfs(g, "/"); if(fs_stats == NULL) { ERROR(PLUGIN_NAME " plugin: Failed guestfs_statvfs for filesystem %s", fses[i]); continue; //exit(EXIT_FAILURE); } guestfs_umount_all (g); fs = malloc(sizeof(struct fs_info)); if (fs == NULL) { ERROR(PLUGIN_NAME " plugin: Failed malloc for struct fs_info "); continue; //exit(EXIT_FAILURE); } fs->fs_name = strdup(fses[j]); if (fs...
2018 Oct 04
2
[PATCH 0/2] Use common macros to help with libxml2 writer.
Consolidate and extend the use of funky start_element() etc macros. Rich.
2018 Oct 04
6
[PATCH v2 0/4] common/utils: Move libxml2 writer macros to a common header file.
v1 was here: https://www.redhat.com/archives/libguestfs/2018-October/msg00047.html However it was broken in a few ways. First of all the documentation was broken because "/**" enhanced comments were not permitted on macros. This is fixed in the new 1/4 patch. Secondly we didn't use single_element() everywhere possible, which is fixed in the new 4/4 patch. Lastly I've
2013 Feb 12
7
Remaining btrfs patches
[PATCH 1/7] mount: Add mount_vfs_nochroot This is significantly reworked from before. umount is gone as discussed, and variable motion is minimised. [PATCH 2/7] btrfs: Update btrfs_subvolume_list to take Already provisionally ACKed. Previous comment was that cleanup could be tidier. I looked into creating a new cleanup function for fs_buf, but it isn't possible (or simple, anyway) in this
2017 Mar 04
7
[PATCH v3] Fix virt-rescue.
Version 3: - Tidies up the code further. - Implements correct handling of SIGTSTP and SIGCONT. - Adds: ^] s - sync filesystems - Adds: ^] z - suspend virt-rescue Rich.