search for: split_lines_sb

Displaying 19 results from an estimated 19 matches for "split_lines_sb".

2015 Jun 17
0
[PATCH 4/4] daemon: add split_lines_sb
Mold split_lines_sb from split_lines, so it returns the strings buffer with the result of the split. This way, we can have the number of lines in the array, with no need to count them again later. split_lines is rewritten to take the ownership of the result of split_lines_sb. --- daemon/daemon.h | 1 + daemon/gue...
2015 Jun 17
4
[PATCH 1/4] daemon: introduce free_stringsbuf
Simple shortcut to easily cleanup a stringsbuf. --- daemon/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
2020 Mar 12
0
[PATCH libguestfs 2/3] daemon: Add filter_list utility function.
...emon/utils.c | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/daemon/daemon.h b/daemon/daemon.h index 4d7504b3f..a16953f23 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -74,6 +74,7 @@ extern void free_stringsbuf (struct stringsbuf *sb); extern struct stringsbuf split_lines_sb (char *str); extern char **split_lines (char *str); extern char **empty_list (void); +extern char **filter_list (int (*p) (const char *), char **strs); extern int is_power_of_2 (unsigned long v); extern void trim (char *str); extern int parse_btrfsvol (const char *desc, mountable_t *mountable)...
2020 Mar 16
0
[PATCH libguestfs v2 2/3] daemon: Add filter_list utility function.
...+++ b/daemon/daemon.h @@ -22,6 +22,7 @@ #include <stdio.h> #include <stdarg.h> #include <stdint.h> +#include <stdbool.h> #include <errno.h> #include <unistd.h> @@ -74,6 +75,7 @@ extern void free_stringsbuf (struct stringsbuf *sb); extern struct stringsbuf split_lines_sb (char *str); extern char **split_lines (char *str); extern char **empty_list (void); +extern char **filter_list (bool (*p) (const char *), char **strs); extern int is_power_of_2 (unsigned long v); extern void trim (char *str); extern int parse_btrfsvol (const char *desc, mountable_t *mountable...
2020 Mar 12
8
[PATCH libguestfs 0/3] daemon: Fix various commands which break on NTFS-3g compressed files.
https://bugzilla.redhat.com/show_bug.cgi?id=1811539 Commands including virt-diff which read extended attributes will sometimes fail on NTFS filesystems that are using system compressed. The reason is complex, see comment 5 of the bug linked above. This patch filters out the troublesome xattr. For justification, see the comment I added in patch 3. Patch 1 & 2 are refactoring. I was on the
2020 Mar 16
6
[PATCH libguestfs v2 0/3] daemon: Fix various commands which break on NTFS-3g compressed files.
v1 here: https://www.redhat.com/archives/libguestfs/2020-March/msg00099.html This one fixes most of the points picked up in review, and does not strdup the strings which should keep down memory usage if that is a concern. Rich.
2017 Jun 19
0
[PATCH v7 13/13] daemon: Link guestfsd with libutils.
...te strings, optionally with a separator string between - * each. On error, these return NULL but do NOT call reply_with_* nor - * free anything. - */ -extern char *concat_strings (char *const *argv); -extern char *join_strings (const char *separator, char *const *argv); - extern struct stringsbuf split_lines_sb (char *str); extern char **split_lines (char *str); diff --git a/daemon/debug.c b/daemon/debug.c index b18d87c26..e2d43a7ca 100644 --- a/daemon/debug.c +++ b/daemon/debug.c @@ -444,7 +444,7 @@ debug_ldd (const char *subcmd, size_t argc, char *const *const argv) static char * debug_ls (const ch...
2017 Jul 14
0
[PATCH 05/27] daemon: Reimplement several devsparts APIs in OCaml.
...e_stringsbuf (struct stringsbuf *sb); extern void sort_strings (char **argv, size_t len); extern void free_stringslen (char **argv, size_t len); -extern void sort_device_names (char **argv, size_t len); -extern int compare_device_names (const char *a, const char *b); - extern struct stringsbuf split_lines_sb (char *str); extern char **split_lines (char *str); diff --git a/daemon/devsparts.c b/daemon/devsparts.c index 82467b92f..1aacb8e16 100644 --- a/daemon/devsparts.c +++ b/daemon/devsparts.c @@ -33,263 +33,6 @@ #include "daemon.h" #include "actions.h" -typedef int (*block_d...
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
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’
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned: - Added the Optgroups module as suggested. - Remove command temporary files. - Replace command ~flags with ?fold_stdout_on_stderr. - Nest _with_mounted function. - Rebase & retest. Rich.
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here: https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html This series now depends on two small patches which I posted separately: https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html v1 -> v2: - Previously changes to generator/daemon.ml were made incrementally through the patch
2017 Jun 12
32
[PATCH v5 00/32] Refactor utilities, implement some APIs in OCaml.
This is a combination of: https://www.redhat.com/archives/libguestfs/2017-June/msg00046.html [PATCH 00/12] Refactor utility functions. plus: https://www.redhat.com/archives/libguestfs/2017-June/msg00023.html [PATCH v3 00/19] Allow APIs to be implemented in OCaml. with the second patches rebased on top of the utility refactoring, and some other adjustments and extensions. This passes
2017 Jul 14
45
[PATCH 00/27] Reimplement many daemon APIs in OCaml.
Previously posted as part of the mega utilities/inspection series here: https://www.redhat.com/archives/libguestfs/2017-June/msg00232.html What I've done is to extract just the parts related to rewriting daemon APIs in OCaml, rebase them on top of the current master, fix a few things, and recompile and test everything. Rich.
2017 Jun 19
16
[PATCH v7 00/13] Refactor utilities
This is just the utilities part of the patch series from: https://www.redhat.com/archives/libguestfs/2017-June/msg00103.html I believe this addresses everything raised in comments on that patch series. Rich.
2017 Jun 09
12
[PATCH 00/12] Refactor utility functions.
This turned out to be rather more involved than I thought. We have lots of utility functions, spread all over the repository, with not a lot of structure. This moves many of them under common/ and structures them so there are clear dependencies. This doesn't complete the job by any means. Other items I had on my to-do list for this change were: - Split up mllib/common_utils into: -
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.
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 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