search for: do_lgetxattr

Displaying 7 results from an estimated 7 matches for "do_lgetxattr".

Did you mean: do_lgetxattrs
2014 Apr 30
2
[PATCH] daemon: xattr: factorize do_getxattr and do_lgetxattr
..., + ssize_t (*getxattr) (const char *path, const char *name, + void *value, size_t size), + size_t *size_r) +{ ssize_t r; char *buf; size_t len; @@ -496,49 +506,7 @@ do_getxattr (const char *path, const char *name, size_t *size_r) char * do_lgetxattr (const char *path, const char *name, size_t *size_r) { - ssize_t r; - char *buf; - size_t len; - - CHROOT_IN; - r = lgetxattr (path, name, NULL, 0); - CHROOT_OUT; - if (r == -1) { - reply_with_perror ("lgetxattr"); - return NULL; - } - - len = r; - - if (len > XATTR_SI...
2012 Feb 01
1
[PATCH] Clarify the error message when unavailable functions are called (RHBZ#679737).
...on/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 *path) { - NOT_AVAILABLE (-1); + NOT_AVAILABLE (linuxxattrs, -1); } int do_lsetxattr (const char *xattr, const char *val,...
2014 Jan 09
1
Re: RFC: copy-attributes command
...uary 2014 21:04:36 Richard W.M. Jones wrote: > On Tue, Jan 07, 2014 at 04:06:43PM +0100, Pino Toscano wrote: > > diff --git a/daemon/xattr.c b/daemon/xattr.c > > index af8bfd4..97a94d5 100644 > > --- a/daemon/xattr.c > > +++ b/daemon/xattr.c > > @@ -545,8 +545,98 @@ do_lgetxattr (const char *path, const char > > *name, size_t *size_r)> > > return buf; /* caller frees */ > > > > } > > > > +int > > +copy_xattrs (const char *src, const char *dest) > > +{ > > +#if defined(HAVE_LISTXATTR) && defined(HAVE_G...
2014 Jan 07
8
RFC: copy-attributes command
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: copy-attributes foo bar permissions:true xattributes:false would only copy the permissions of foo to bar, not copying its extended attributes too. Just few notes: - my first daemon command, so
2014 Jan 13
0
[PATCH] New API: copy-attributes.
...p_linuxxattrs_available ()) { + if (!copy_xattrs (src, dest)) + /* copy_xattrs replies with an error already. */ + return -1; + } + + return 0; +} diff --git a/daemon/xattr.c b/daemon/xattr.c index ebacc02..abed5ff 100644 --- a/daemon/xattr.c +++ b/daemon/xattr.c @@ -541,8 +541,77 @@ do_lgetxattr (const char *path, const char *name, size_t *size_r) return buf; /* caller frees */ } +int +copy_xattrs (const char *src, const char *dest) +{ + ssize_t len, vlen, ret, attrval_len = 0; + CLEANUP_FREE char *buf = NULL, *attrval = NULL; + size_t i; + + buf = _listxattrs (src, listxattr, &a...
2014 Jan 07
0
Re: RFC: copy-attributes command
...up_linuxxattrs_available ()) { > + if (!copy_xattrs (src, dest)) > + return -1; > + } > + > + return 0; > +} > diff --git a/daemon/xattr.c b/daemon/xattr.c > index af8bfd4..97a94d5 100644 > --- a/daemon/xattr.c > +++ b/daemon/xattr.c > @@ -545,8 +545,98 @@ do_lgetxattr (const char *path, const char *name, size_t *size_r) > return buf; /* caller frees */ > } > > +int > +copy_xattrs (const char *src, const char *dest) > +{ > +#if defined(HAVE_LISTXATTR) && defined(HAVE_GETXATTR) && defined(HAVE_SETXATTR) I wonder if there...
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-