search for: guestfs_read_lin

Displaying 20 results from an estimated 20 matches for "guestfs_read_lin".

Did you mean: guestfs_read_lines
2013 Jun 07
1
[PATCH] inspect: Fix bogus warning for partitions without /boot.ini
...stfs_h *g) * systemroot locations */ CLEANUP_FREE char *boot_ini_path = guestfs___case_sensitive_path_silently (g, "/boot.ini"); - if (boot_ini_path) { + if (boot_ini_path && guestfs_is_file (g, boot_ini_path)) { CLEANUP_FREE_STRING_LIST char **boot_ini = guestfs_read_lines (g, boot_ini_path); if (!boot_ini) { -- 1.8.2.1
2015 Sep 09
2
[PATCH] inspect: try to use /etc/os-release on Linux guests
...*g, struct inspect_fs *fs, const char *filename) +{ + int64_t size; + CLEANUP_FREE_STRING_LIST char **lines = NULL; + size_t i; + enum inspect_os_distro distro = OS_DISTRO_UNKNOWN; + CLEANUP_FREE char *product_name = NULL; + int major_version = -1, minor_version = -1; + + /* Don't trust guestfs_read_lines not to break with very large files. + * Check the file size is something reasonable first. + */ + size = guestfs_filesize (g, filename); + if (size == -1) + /* guestfs_filesize failed and has already set error in handle */ + return -1; + if (size > MAX_SMALL_FILE_SIZE) { + erro...
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
2013 Jun 05
0
[PATCH 3/3] inspect: Partial support for non-standard windows system root
...h *g) } } + /* If the fs contains boot.ini, check it for non-standard + * systemroot locations */ + CLEANUP_FREE char *boot_ini_path = + guestfs___case_sensitive_path_silently (g, "/boot.ini"); + if (boot_ini_path) { + CLEANUP_FREE_STRING_LIST char **boot_ini = + guestfs_read_lines (g, boot_ini_path); + if (!boot_ini) { + debug (g, "error reading %s", boot_ini_path); + return NULL; + } + + int found_os = 0; + for (char **i = boot_ini; *i != NULL; i++) { + CLEANUP_FREE char *controller_type = NULL; + CLEANUP_FREE char *controller = N...
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.
2013 Jun 05
3
[PATCH 1/3] inspection: Refactor windows systemroot detection to allow re-use
This change refactors guestfs___has_windows_systemroot to guestfs___get_windows_systemroot. The new function returns a dynamically allocated char * which must be freed. The new function is no less efficient than before, as it returns the result of guestfs___case_sensitive_path_silently, which is required anyway. The new code is slightly more efficient than before, as it re-uses the result of this
2012 Dec 13
0
ANNOUNCE: libguestfs 1.20 - tools for accessing and modifying virtual machine disk images
...ting) is now directly 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....
2016 May 18
0
[PATCH 2/2] inspect: switch to version struct for os major/minor version
...fs *fs, const char *filename) size_t i; enum inspect_os_distro distro = OS_DISTRO_UNKNOWN; CLEANUP_FREE char *product_name = NULL; - int major_version = -1, minor_version = -1; + struct version version; + guestfs_int_version_from_values (&version, -1, -1, 0); /* Don't trust guestfs_read_lines not to break with very large files. * Check the file size is something reasonable first. @@ -220,43 +220,27 @@ parse_os_release (guestfs_h *g, struct inspect_fs *fs, const char *filename) free (product_name); product_name = safe_strndup (g, value, value_len); } else if (STR...
2016 May 17
3
[PATCH 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling
2016 May 18
3
[PATCH v2 0/2] src: introduce an helper version struct
Hi, this adds an helper version struct, and uses it in the backends (for the libvirt and qemu versions) and inspection code. This also moves common code to that, so it is not repeated in many places. This should help with the small refactoring proposed with https://www.redhat.com/archives/libguestfs/2016-May/msg00070.html Thanks, Pino Toscano (2): src: start unifying version handling
2013 Jan 25
4
[PATCH 0/3] Use __attribute__((cleanup(...)))
This patch series changes a small part of the library to use __attribute__((cleanup(...))) to automatically free memory when pointers go out of the current scope. In general terms this seems to be a small win although you do have to use it carefully. For functions where you can completely get rid of the "exit code paths", it can simplify things. For a good example, see the
2017 Jul 21
10
[PATCH v10 00/10] Reimplement inspection in the daemon.
v9 was here: https://www.redhat.com/archives/libguestfs/2017-July/msg00139.html This depends on these three series (the first two being single minor patches): https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html https://www.redhat.com/archives/libguestfs/2017-July/msg00215.html There is no substantive change. I
2017 Jul 17
12
[PATCH v9 00/11] Reimplement inspection in the daemon.
This depends on the patch series "[PATCH 00/27] Reimplement many daemon APIs in OCaml." (https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html) v8 was posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00274.html v9: - I split up the mega-patch into a more reviewable series of smaller, incremental patches. There are some other changes vs v8, but
2017 Aug 09
16
[PATCH v12 00/11] Reimplement inspection in the daemon.
This fixes almost everything. Note that it adds an extra commit which fixes the whole utf8/iconv business. It's probably better to list what isn't fixed: (1) I didn't leave the osinfo code around because I'm still haven't looked too closely at virt-builder-repository. Can't we just fetch this code from the git history when we need it? (2) I didn't change the way
2017 Jul 31
16
[PATCH v11 00/10] Reimplement inspection in the daemon.
v10: https://www.redhat.com/archives/libguestfs/2017-July/msg00245.html No actual change here, but I rebased and retested. Also this series now does not depend on any other patch series since everything else needed is upstream. Rich.
2017 Jun 19
29
[PATCH v7 00/29] Reimplement inspection in the daemon.
v6 was posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html and this requires the utilities refactoring posted here: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html Inspection is now complete[*], although not very well tested. I'm intending to compare the output of many guests using old & new virt-inspector to see if I can find any
2017 Apr 04
1
[PATCH] Use Unicode single quotes ‘’ in place of short single quoted strings throughout.
...the C<guestfs_aug_*> APIs. We don't document Augeas itself here because there is excellent documentation on the L<http://augeas.net/> website. -If you don't want to use Augeas (you fool!) then try calling +If you don’t want to use Augeas (you fool!) then try calling L</guestfs_read_lines> to get the file as a list of lines which you can iterate over. @@ -1105,7 +1105,7 @@ or by copying and resizing and on failure going back to the original. =head2 USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES -Although we don't want to discourage you from using the C API, we wi...
2017 Jun 21
45
[PATCH v8 00/42] Refactor utilities and reimplement inspection.
v7 was: https://www.redhat.com/archives/libguestfs/2017-June/msg00169.html https://www.redhat.com/archives/libguestfs/2017-June/msg00184.html I believe this addresses all comments received so far. Also it now passes a test where I compared about 100 disk images processed with old and new virt-inspector binaries. The output is identical in all cases except one which is caused by a bug in blkid
2017 Jun 15
45
[PATCH v6 00/41] Refactor utilities, reimplement inspection in the daemon.
v5: https://www.redhat.com/archives/libguestfs/2017-June/msg00065.html Since v5, this now implements inspection almost completely for Linux and Windows guests. Rich.
2015 Feb 14
2
[PATCH 0/2] Change guestfs__*
libguestfs has used double and triple underscores in identifiers. These aren't valid for global names in C++. (http://stackoverflow.com/a/228797) These large but completely mechanical patches change the illegal identifiers to legal ones. Rich.