Displaying 4 results from an estimated 4 matches for "1cf1b07f6".
2020 Mar 12
0
[PATCH libguestfs 2/3] daemon: Add filter_list utility function.
...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);
diff --git a/daemon/utils.c b/daemon/utils.c
index 1cf1b07f6..1fc8d2c80 100644
--- a/daemon/utils.c
+++ b/daemon/utils.c
@@ -482,6 +482,28 @@ empty_list (void)
return ret.argv;
}
+/**
+ * Filter a list of strings. Returns a newly allocated list of only
+ * the strings where C<p (str) != 0>.
+ */
+char **
+filter_list (int (*p) (const char *str),...
2020 Mar 16
0
[PATCH libguestfs v2 2/3] daemon: Add filter_list utility function.
...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);
diff --git a/daemon/utils.c b/daemon/utils.c
index 1cf1b07f6..21008b40e 100644
--- a/daemon/utils.c
+++ b/daemon/utils.c
@@ -24,6 +24,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <stdbool.h>
#include <string.h>
#include <unistd.h>
#include <rpc/types.h>
@@ -482,6 +483,31 @@ empty_list (void)
return ret.a...
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.
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