Displaying 5 results from an estimated 5 matches for "do_getxattrs".
2014 Apr 30
2
[PATCH] daemon: xattr: factorize do_getxattr and do_lgetxattr
...txattrs (const char *path, ssize_t (*listxattr) (const char *path, char *list, size_t size), ssize_t *size);
+static char *_getxattr (const char *name, const char *path, ssize_t (*getxattr) (const char *path, const char *name, void *value, size_t size), size_t *size_r);
guestfs_int_xattr_list *
do_getxattrs (const char *path)
@@ -448,6 +449,15 @@ do_internal_lxattrlist (const char *path, char *const *names)
char *
do_getxattr (const char *path, const char *name, size_t *size_r)
{
+ return _getxattr (name, path, getxattr, size_r);
+}
+
+static char *
+_getxattr (const char *name, const char *path,...
2014 Jan 10
0
[PATCH] daemon: xattr: move the listxattrs code in an own function
...e_t size, int flags));
static int _removexattr (const char *xattr, const char *path, int (*removexattr) (const char *path, const char *name));
+static char *_listxattrs (const char *path, ssize_t (*listxattr) (const char *path, char *list, size_t size), ssize_t *size);
guestfs_int_xattr_list *
do_getxattrs (const char *path)
@@ -111,27 +112,10 @@ getxattrs (const char *path,
size_t i, j;
guestfs_int_xattr_list *r = NULL;
- CHROOT_IN;
- len = listxattr (path, NULL, 0);
- CHROOT_OUT;
- if (len == -1) {
- reply_with_perror ("listxattr: %s", path);
+ buf = _listxattrs (path, lis...
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
...ar *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 vallen, const char...
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:
> >
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-