search for: guestfs_int_xattr_list_len

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

2020 Mar 12
0
[PATCH libguestfs 1/3] daemon: xattr: Refactor code which splits attr names from the kernel.
...); + if (names == NULL) + goto error; + r = calloc (1, sizeof (*r)); if (r == NULL) { reply_with_perror ("calloc"); goto error; } - /* What we get from the kernel is a string "foo\0bar\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)...
2020 Mar 16
0
[PATCH libguestfs v2 1/3] daemon: xattr: Refactor code which splits attr names from the kernel.
...); + if (names == NULL) + goto error; + r = calloc (1, sizeof (*r)); if (r == NULL) { reply_with_perror ("calloc"); goto error; } - /* What we get from the kernel is a string "foo\0bar\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)...
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
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 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
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...c index d16939f..926baf0 100644 --- a/daemon/xattr.c +++ b/daemon/xattr.c @@ -410,7 +410,7 @@ do_lxattrlist (const char *path, char *const *names) fprintf (stderr, " %zu: special attrval = %s\n", k, entry[0].attrval.attrval_val); for (i = 1; k+i < ret->guestfs_int_xattr_list_len; ++i) { - if (strcmp (entry[i].attrname, "") == 0) + if (STREQ (entry[i].attrname, "")) break; fprintf (stderr, " name %s, value length %d\n", entry[i].attrname, entry[i].attrval.attrval_len); diff --git a/examples...
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.
...;guestfs_int_xattr_list_val[j].attrval.attrval_val, + vlen); CHROOT_OUT; if (vlen == -1) { reply_with_perror ("getxattr"); @@ -200,8 +200,8 @@ getxattrs (char *path, if (r) { if (r->guestfs_int_xattr_list_val) for (i = 0; i < r->guestfs_int_xattr_list_len; ++i) { - free (r->guestfs_int_xattr_list_val[i].attrname); - free (r->guestfs_int_xattr_list_val[i].attrval.attrval_val); + free (r->guestfs_int_xattr_list_val[i].attrname); + free (r->guestfs_int_xattr_list_val[i].attrval.attrval_val); } free (r->guestfs_i...