search for: deststat

Displaying 6 results from an estimated 6 matches for "deststat".

Did you mean: teststat
2006 Oct 09
1
Not fail if can't set permissions ?
...and exits with a non-zero status. This is expected but it complicates error detection on my end. Is there a way to make rsync not consider it an error when chmod() fails on a directory owned by someone else ? Possibly warn about it, but still exit with a zero status. stat (destpathname, &deststat); if ((deststat.st_mode & mask) != (srcstat.st_mode & mask)) { if (chmod (pathname, srcstat.st_mode) != 0) { if (errno == EPERM && deststat.st_uid != geteuid () && option_ignore_non_owner) { /* Expected error - just warn about it */ ;...
2014 Jan 13
0
[PATCH] New API: copy-attributes.
...GUESTFSD_EXT_CMD(str_file, file); GUESTFSD_EXT_CMD(str_zcat, zcat); @@ -584,3 +585,74 @@ do_filesize (const char *path) return buf.st_size; } + +int +do_copy_attributes (const char *src, const char *dest, int all, int mode, int xattributes, int ownership) +{ + int r; + struct stat srcstat, deststat; + + static const unsigned int file_mask = 07777; + + /* If it was specified to copy everything, manually enable all the flags + * not manually specified to avoid checking for flag || all everytime. + */ + if (all) { + if (!(optargs_bitmask & GUESTFS_COPY_ATTRIBUTES_MODE_BITMASK)) +...
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
...GUESTFSD_EXT_CMD(str_zcat, zcat); > @@ -584,3 +585,46 @@ do_filesize (const char *path) > > return buf.st_size; > } > + > +int > +do_copy_attributes (const char *src, const char *dest, int permissions, int xattributes) > +{ > + int r; > + struct stat srcstat, deststat; > + > + CHROOT_IN; > + r = stat (src, &srcstat); > + CHROOT_OUT; > + > + if (r == -1) { > + reply_with_perror ("stat: %s", src); > + return -1; > + } > + > + CHROOT_IN; > + r = stat (dest, &deststat); > + CHROOT_OUT; > + &gt...
2014 Jan 10
4
Re: RFC: copy-attributes command
...lesize (const char *path) > > > > return buf.st_size; > > > > } > > > > + > > +int > > +do_copy_attributes (const char *src, const char *dest, int > > permissions, int xattributes) +{ > > + int r; > > + struct stat srcstat, deststat; > > + > > + CHROOT_IN; > > + r = stat (src, &srcstat); > > + CHROOT_OUT; > > + > > + if (r == -1) { > > + reply_with_perror ("stat: %s", src); > > + return -1; > > + } > > + > > + CHROOT_IN; > > + r...
2008 Nov 23
14
CDR Design
I've taken the liberty of starting a new thread to discuss the design of the Asterisk CDR mechanism. The discussion has been kindly initiated by murf putting together a proposal: http://svn.digium.com/svn/asterisk/team/murf/RFCs. After reading the proposal I still don't think it's the right way to go. To my mind adding more channel variables increases the complexity in a situation