search for: guestfs_int_xattr_list_v

Displaying 9 results from an estimated 9 matches for "guestfs_int_xattr_list_v".

2020 Mar 12
0
[PATCH libguestfs 1/3] daemon: xattr: Refactor code which splits attr names from the kernel.
...r\0baz" of length - * len. First count the strings. - */ - r->guestfs_int_xattr_list_len = 0; - for (i = 0; i < (size_t) len; i += strlen (&buf[i]) + 1) - r->guestfs_int_xattr_list_len++; + r->guestfs_int_xattr_list_len = guestfs_int_count_strings (names); r->guestfs_int_xattr_list_val = calloc (r->guestfs_int_xattr_list_len, sizeof (guestfs_int_xattr)); @@ -134,34 +163,34 @@ getxattrs (const char *path, goto error; } - for (i = 0, j = 0; i < (size_t) len; i += strlen (&buf[i]) + 1, ++j) { + for (i = 0; names[i] != NULL; ++i) { CHROOT_IN; - vl...
2020 Mar 16
0
[PATCH libguestfs v2 1/3] daemon: xattr: Refactor code which splits attr names from the kernel.
...r\0baz" of length - * len. First count the strings. - */ - r->guestfs_int_xattr_list_len = 0; - for (i = 0; i < (size_t) len; i += strlen (&buf[i]) + 1) - r->guestfs_int_xattr_list_len++; + r->guestfs_int_xattr_list_len = guestfs_int_count_strings (names); r->guestfs_int_xattr_list_val = calloc (r->guestfs_int_xattr_list_len, sizeof (guestfs_int_xattr)); @@ -134,34 +160,34 @@ getxattrs (const char *path, goto error; } - for (i = 0, j = 0; i < (size_t) len; i += strlen (&buf[i]) + 1, ++j) { + for (i = 0; names[i] != NULL; ++i) { CHROOT_IN; - vl...
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.
2009 Aug 17
13
total warning-removal for daemon/
The warnings in daemon were aggravating and risky for development (too easy to miss new ones) so I spent some time last week and today working on removing them. The first patch gets us down to almost no warnings with the original -Wall setting. That was by far the hardest part. Once I'd done that, I enabled nearly all of gcc's warnings via gnulib's warnings and manywarnings modules
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.
2015 Nov 09
6
[PATCH 0/5] build: Enable some more warnings.
Add some warnings. Well, the first patch is a miscellaneous change, but patches 2-5 add some warnings. Rich.
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...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 len, vlen; char *buf = NULL; @@ -175,15 +175,15 @@ getxattrs (char *path, r->guestfs_int_xattr_list_val[j].attrval.attrval_len = vlen; if (r->guestfs_int_xattr_list_val[j].attrname == NULL || - r->guestfs_int_xattr_list_val[j].attrval.attrval_val == NULL) { + r->guestfs_int_xattr_list_val[j].attrval.attrval_val == NULL) { reply_with_perror ("malloc"); g...
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...4 --- a/daemon/xattr.c +++ b/daemon/xattr.c @@ -403,7 +403,7 @@ do_lxattrlist (const char *path, char *const *names) fprintf (stderr, "lxattrlist: returning: [\n"); for (k = 0; k < ret->guestfs_int_xattr_list_len; ++k) { const guestfs_int_xattr *entry = &ret->guestfs_int_xattr_list_val[k]; - if (strcmp (entry[0].attrname, "") != 0) { + if (STRNEQ (entry[0].attrname, "")) { fprintf (stderr, "ERROR: expecting empty attrname at k = %zu\n", k); break; } diff --git a/fish/destpaths.c b/fish/destpaths.c index 02e9f22..8...