search for: have_linux_xattrs

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

2014 Jan 09
1
Re: RFC: copy-attributes command
...implemented) would cause regressions in such old Linux systems. > We don't care about RHEL 5 since it > now has its own branch ("oldlinux"), so the code might be made simpler > by an accompanying patch which reduces all of the HAVE_*XATTR* macros > down to a single one (HAVE_LINUX_XATTRS). Sounds reasonable; attached a patch for it. -- Pino Toscano
2014 Jan 10
2
Re: RFC: copy-attributes command
On Fri, Jan 10, 2014 at 05:36:39PM +0100, Pino Toscano wrote: > +int > +copy_xattrs (const char *src, const char *dest) > +{ > + abort (); > +} Is this called in the case where someone does copy-attributes foo bar xattributes:true on a version of libguestfs with no support for xattrs? It's probably better to silently ignore this case instead of crashing. Rich. --
2018 Nov 22
1
[PATCH] Fix include for xattr.h
...se.c | 2 +- m4/guestfs-libraries.m4 | 1 - 4 files changed, 3 insertions(+), 12 deletions(-) diff --git a/daemon/xattr.c b/daemon/xattr.c index bbe571b3f8bb..b10f6bddf4d0 100644 --- a/daemon/xattr.c +++ b/daemon/xattr.c @@ -37,12 +37,8 @@ #ifdef HAVE_LINUX_XATTRS -# ifdef HAVE_ATTR_XATTR_H -# include <attr/xattr.h> -# else -# ifdef HAVE_SYS_XATTR_H -# include <sys/xattr.h> -# endif +# ifdef HAVE_SYS_XATTR_H +# include <sys/xattr.h> # endif int diff --git a/fuse/test-fuse.c b/fuse/test-fuse.c index 5c...
2014 Jan 13
0
[PATCH] New API: copy-attributes.
...o error; + } + + CHROOT_IN; + ret = setxattr (dest, &buf[i], attrval, vlen, 0); + CHROOT_OUT; + if (ret == -1) { + reply_with_perror ("setxattr: %s, %s", dest, &buf[i]); + goto error; + } + } + + return 1; + + error: + return 0; +} + #else /* no HAVE_LINUX_XATTRS */ OPTGROUP_LINUXXATTRS_NOT_AVAILABLE +int +copy_xattrs (const char *src, const char *dest) +{ + abort (); +} + #endif /* no HAVE_LINUX_XATTRS */ diff --git a/fish/Makefile.am b/fish/Makefile.am index bd0485f..fb0e99e 100644 --- a/fish/Makefile.am +++ b...
2014 Jan 10
0
Re: RFC: copy-attributes command
...es:true > > on a version of libguestfs with no support for xattrs? It's probably > better to silently ignore this case instead of crashing. This version shouldn't be ever called, since it is called when optgroup_linuxxattrs_available returns true, which is not the case in the !HAVE_LINUX_XATTRS block (where the abort version of copy_xattrs is implemented). -- Pino Toscano
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 07
0
Re: RFC: copy-attributes command
...bably has none of them, and RHEL 5 / Ubuntu 10.10 probably had only some of them. We don't care about RHEL 5 since it now has its own branch ("oldlinux"), so the code might be made simpler by an accompanying patch which reduces all of the HAVE_*XATTR* macros down to a single one (HAVE_LINUX_XATTRS). > + ssize_t len, vlen, ret; > + CLEANUP_FREE char *buf = NULL, *attrval = NULL; > + size_t i, attrval_len = 0; > + > + CHROOT_IN; > + len = listxattr (src, NULL, 0); > + CHROOT_OUT; > + if (len == -1) { > + reply_with_perror ("listxattr: %s", src);...
2015 Oct 05
0
[PATCH 2/2] Fix whitespace.
...fined(HAVE_LISTXATTR) && defined(HAVE_LLISTXATTR) && \ + defined(HAVE_GETXATTR) && defined(HAVE_LGETXATTR) && \ + defined(HAVE_REMOVEXATTR) && defined(HAVE_LREMOVEXATTR) && \ + defined(HAVE_SETXATTR) && defined(HAVE_LSETXATTR) # define HAVE_LINUX_XATTRS #endif diff --git a/daemon/xfs.c b/daemon/xfs.c index c1a1854..f748902 100644 --- a/daemon/xfs.c +++ b/daemon/xfs.c @@ -316,7 +316,7 @@ parse_xfs_info (char **lines) return ret; -error: + error: free (ret->xfs_mntpoint); free (ret->xfs_logname);...
2015 Oct 05
3
[PATCH 1/2] Change 'fprintf (stdout,...)' -> printf.
Result of earlier copy and paste. --- align/scan.c | 35 ++++++++++--------- cat/cat.c | 39 +++++++++++---------- cat/filesystems.c | 69 +++++++++++++++++++------------------- cat/log.c | 35 ++++++++++--------- cat/ls.c | 61 +++++++++++++++++---------------- df/main.c | 43 ++++++++++++------------