search for: guestfs_int_xattr_list

Displaying 12 results from an estimated 12 matches for "guestfs_int_xattr_list".

2014 Jan 10
0
[PATCH] daemon: xattr: move the listxattrs code in an own function
....c | 64 ++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 44 insertions(+), 20 deletions(-) diff --git a/daemon/xattr.c b/daemon/xattr.c index b84cf3d..e01e9e2 100644 --- a/daemon/xattr.c +++ b/daemon/xattr.c @@ -54,6 +54,7 @@ optgroup_linuxxattrs_available (void) static guestfs_int_xattr_list *getxattrs (const char *path, ssize_t (*listxattr) (const char *path, char *list, size_t size), ssize_t (*getxattr) (const char *path, const char *name, void *value, size_t size)); static int _setxattr (const char *xattr, const char *val, int vallen, const char *path, int (*setxattr) (const char *...
2014 Apr 30
2
[PATCH] daemon: xattr: factorize do_getxattr and do_lgetxattr
...n, no functional changes. --- daemon/xattr.c | 54 +++++++++++------------------------------------------- 1 file changed, 11 insertions(+), 43 deletions(-) diff --git a/daemon/xattr.c b/daemon/xattr.c index abed5ff..d8ad59a 100644 --- a/daemon/xattr.c +++ b/daemon/xattr.c @@ -55,6 +55,7 @@ static guestfs_int_xattr_list *getxattrs (const char *path, ssize_t (*listxattr) static int _setxattr (const char *xattr, const char *val, int vallen, const char *path, int (*setxattr) (const char *path, const char *name, const void *value, size_t size, int flags)); static int _removexattr (const char *xattr, const char *path...
2014 Jan 10
4
Re: RFC: copy-attributes command
On Tuesday 07 January 2014 21:04:36 Richard W.M. Jones wrote: > On Tue, Jan 07, 2014 at 04:06:43PM +0100, Pino Toscano wrote: > > Hi, > > > > attached there is a prototype of patch for adding a new > > copy-attributes command. Such command would allow copy the > > attributes of a "file" to> > > another, so for example in guestfish: > >
2020 Mar 12
0
[PATCH libguestfs 1/3] daemon: xattr: Refactor code which splits attr names from the kernel.
...+ return take_stringsbuf (&ret); +} + static int compare_xattrs (const void *vxa1, const void *vxa2) { @@ -106,7 +135,8 @@ getxattrs (const char *path, { ssize_t len, vlen; CLEANUP_FREE char *buf = NULL; - size_t i, j; + CLEANUP_FREE_STRING_LIST char **names = NULL; + size_t i; guestfs_int_xattr_list *r = NULL; buf = _listxattrs (path, listxattr, &len); @@ -114,18 +144,17 @@ getxattrs (const char *path, /* _listxattrs issues reply_with_perror already. */ goto error; + names = split_attr_names (buf, len); + if (names == NULL) + goto error; + r = calloc (1, sizeof (*r...
2020 Mar 16
0
[PATCH libguestfs v2 1/3] daemon: xattr: Refactor code which splits attr names from the kernel.
...take_stringsbuf (&ret); +} + static int compare_xattrs (const void *vxa1, const void *vxa2) { @@ -106,7 +132,8 @@ getxattrs (const char *path, { ssize_t len, vlen; CLEANUP_FREE char *buf = NULL; - size_t i, j; + CLEANUP_FREE /* not string list */ char **names = NULL; + size_t i; guestfs_int_xattr_list *r = NULL; buf = _listxattrs (path, listxattr, &len); @@ -114,18 +141,17 @@ getxattrs (const char *path, /* _listxattrs issues reply_with_perror already. */ goto error; + names = split_attr_names (buf, len); + if (names == NULL) + goto error; + r = calloc (1, sizeof (*r...
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
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
...int do_txz_out (const char *dir) { + IF_NOT_AVAILABLE_ERROR (xz, -1); + return do_tXz_out (dir, "J"); } diff --git a/daemon/xattr.c b/daemon/xattr.c index 2445748..1b98555 100644 --- a/daemon/xattr.c +++ b/daemon/xattr.c @@ -520,55 +520,55 @@ optgroup_linuxxattrs_available (void) guestfs_int_xattr_list * do_getxattrs (const char *path) { - NOT_AVAILABLE (NULL); + NOT_AVAILABLE (linuxxattrs, NULL); } guestfs_int_xattr_list * do_lgetxattrs (const char *path) { - NOT_AVAILABLE (NULL); + NOT_AVAILABLE (linuxxattrs, NULL); } int do_setxattr (const char *xattr, const char *val, int val...
2020 Mar 16
0
[PATCH libguestfs v2 3/3] daemon: xattr: Filter out user.WofCompressedData from xattrs (RHBZ#1811539).
...xattrs (const void *vxa1, const void *vxa2) { @@ -132,6 +157,7 @@ getxattrs (const char *path, { ssize_t len, vlen; CLEANUP_FREE char *buf = NULL; + CLEANUP_FREE /* not string list */ char **names_unfiltered = NULL; CLEANUP_FREE /* not string list */ char **names = NULL; size_t i; guestfs_int_xattr_list *r = NULL; @@ -141,7 +167,10 @@ getxattrs (const char *path, /* _listxattrs issues reply_with_perror already. */ goto error; - names = split_attr_names (buf, len); + names_unfiltered = split_attr_names (buf, len); + if (names_unfiltered == NULL) + goto error; + names = filter_lis...
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2012 Mar 13
2
[PATCH 0/2] 'int' to 'size_t' changes
These two patches are probably not completely independent, but separating them is a lot of work. With *both* patches applied, all the tests and extra-tests pass. That's no guarantee however that there isn't a mistake, so I don't think this patch is a candidate for the 1.16 branch, until it's had a lot more testing in development. Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...heads, int sectors, - char *line) + char *line) { const char *lines[2] = { line, NULL }; diff --git a/daemon/xattr.c b/daemon/xattr.c index 23b00d8..a908a44 100644 --- a/daemon/xattr.c +++ b/daemon/xattr.c @@ -107,9 +107,9 @@ do_lremovexattr (char *xattr, char *path) static guestfs_int_xattr_list * getxattrs (char *path, - ssize_t (*listxattr) (const char *path, char *list, size_t size), - ssize_t (*getxattr) (const char *path, const char *name, - void *value, size_t size)) + ssize_t (*listxattr) (const char *path, char *list, size_t size), + ssize_t (*getxattr...