search for: add_sprintf

Displaying 10 results from an estimated 10 matches for "add_sprintf".

2014 Aug 26
6
[PATCH 0/3] fix setting lvm filter with newer lvm2
Hi, newer lvm2 releases don't have have uncommented "filter" lines, so the current way to edit lvm.conf doesn't work anymore. Instead, switch to augeas (with a "custom" len) for a cleaner and working way to set the lvm filter. Pino Toscano (3): daemon: add add_sprintf daemon: move AUGEAS_ERROR to the common header daemon: lvm-filter: use augeas for setting the filter appliance/Makefile.am | 6 +- appliance/guestfs_lvm_conf.aug | 74 +++++++++++++++++ daemon/augeas.c | 17 ---- daemon/daemon.h | 19 +++++ daemon/g...
2015 Jun 17
4
[PATCH 1/4] daemon: introduce free_stringsbuf
...n/daemon.h | 1 + daemon/guestfsd.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/daemon/daemon.h b/daemon/daemon.h index 53cb797..bed4dbc 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -92,6 +92,7 @@ extern int add_string (struct stringsbuf *sb, const char *str); extern int add_sprintf (struct stringsbuf *sb, const char *fs, ...) __attribute__((format (printf,2,3))); extern int end_stringsbuf (struct stringsbuf *sb); +extern void free_stringsbuf (struct stringsbuf *sb); extern size_t count_strings (char *const *argv); extern void sort_strings (char **argv, size_t len); di...
2016 Jul 07
0
[PATCH 2/2] daemon: fix cleanup of stringsbuf usages
...533,8 +531,6 @@ add_string (struct stringsbuf *sb, const char *str) new_str = strdup (str); if (new_str == NULL) { reply_with_perror ("strdup"); - free_stringslen (sb->argv, sb->size); - sb->argv = NULL; return -1; } } @@ -554,8 +550,6 @@ add_sprintf (struct stringsbuf *sb, const char *fs, ...) va_end (args); if (r == -1) { reply_with_perror ("vasprintf"); - free_stringslen (sb->argv, sb->size); - sb->argv = NULL; return -1; } diff --git a/daemon/initrd.c b/daemon/initrd.c index c9fc2dd..21865de 100...
2016 Jul 07
2
[PATCH 1/2] daemon: free the string on stringsbuf add failure
If add_string_nodup fails free the passed string instead of leaking it, as that string would have been owned by the stringbuf. Adapt few places to this behaviour. --- daemon/btrfs.c | 4 +--- daemon/devsparts.c | 8 ++++---- daemon/guestfsd.c | 1 + 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 9b52aa8..d70565a 100644 ---
2016 May 12
1
[PATCH] New API: btrfs-filesystem-show (RHBZ#1164765)
...es ")) + continue; + else if (STRPREFIX (lines[i], "\tdevid ")) { + const char *p = strstr (lines[i], " path "); + const char *end; + if (!p) + continue; + + p += strlen (" path "); + end = strchrnul (p, ' '); + add_sprintf (&ret, "%.*s", (int) (end - p), p); + } else if (STRPREFIX (lines[i], "\t*** Some devices missing")) { + reply_with_error_errno (ENODEV, "%s: missing devices", device); + return NULL; + } else { + reply_with_error ("unrecognized line in ou...
2017 Aug 03
9
[PATCH 0/6] tests: Fix handling of device API parameters (RHBZ#1477623).
https://bugzilla.redhat.com/show_bug.cgi?id=1477623 The first two patches are cleanups. The third patch changes the way that we handle Device and Dev_or_Path parameters so that a parameter marked as such can really only contain a block device name (and not, for instance, a chardev). Using a chardev here caused hangs in the API. The next two patches fix API usage to conform to this new stricter
2016 Feb 23
4
[PATCH v3 0/4] [FOR COMMENTS ONLY] Rework inspection.
Previously posted: https://www.redhat.com/archives/libguestfs/2015-December/msg00038.html Inspection now really succeeds on a small number of simple guests. To test it out: $ ./run guestfish -v -x -a /tmp/centos-6.img ><fs> run ><fs> debug sh "guestfs-inspection --verbose" Rich.
2015 Dec 05
6
[PATCH 0/6 v2] [FOR COMMENTS ONLY] Rework inspection.
This is a more working version. Inspection (partially) succeeds on a real guest this time :-) You can test it out on a real guest (in this case, a CentOS disk image located at /tmp/centos-6.img) by doing: $ ./run guestfish -v -x -a /tmp/centos-6.img ><fs> run ><fs> debug sh "guestfs-inspection --verbose" which will print lots of debugging, and at the end the
2016 Jan 21
8
[PATCH v3 0/6] [FOR COMMENTS ONLY] Rework inspection.
For background on this change, see: https://rwmj.wordpress.com/2015/12/06/inspection-now-with-added-prolog/ v2 was previously posted here: https://www.redhat.com/archives/libguestfs/2015-December/msg00038.html To test this patch series on a real guest, you can do: $ ./run guestfish -v -x -a /var/tmp/centos-6.img ><fs> run ><fs> debug sh "guestfs-inspection
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option ‘./guestfsd --print-external-commands’