search for: return_error_if

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

2004 Aug 13
1
[patch] rsync large file support on AIX and HPUX
...therefore. IRIX, Linux seems to be o.k. There is an efix for AIX available but seems not to be deployed everywhere. Cheers Olaf *** rsync-2.6.2/syscall.c.ORG_SC Fri Aug 13 13:17:27 2004 --- rsync-2.6.2/syscall.c Fri Aug 13 13:19:29 2004 *************** *** 152,158 **** RETURN_ERROR_IF(dry_run, 0); RETURN_ERROR_IF(read_only, EROFS); ! #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) { int fd = mkstemp(template); if (fd == -1) --- 152,160 ---- RETURN_ERROR_IF(dry_run, 0); RETURN_ERROR_IF(read_on...
2007 Oct 20
2
DO NOT REPLY [Bug 5027] New: Perms in do_mkstemp are not always valid
...h makes sure that the user always has write permission to the temp file: diff -urN rsync-2.6.9-dist/syscall.c rsync-2.6.9/syscall.c --- rsync-2.6.9-dist/syscall.c 2007-10-19 20:49:29.000000000 -0500 +++ rsync-2.6.9/syscall.c 2007-10-19 20:53:02.000000000 -0500 @@ -190,6 +190,7 @@ { RETURN_ERROR_IF(dry_run, 0); RETURN_ERROR_IF(read_only, EROFS); + perms |= S_IWUSR; #if defined HAVE_SECURE_MKSTEMP && defined HAVE_FCHMOD && (!defined HAVE_OPEN64 || defined HAVE_MKSTEMP64) { -- Configure bugmail: https://bugzilla.samba.org/userprefs.cgi?tab=email ------...
2004 Apr 11
1
fchmod in do_mkstemp? (patch included)
...30 syscall.c --- syscall.c 18 Feb 2004 22:33:21 -0000 1.30 +++ syscall.c 10 Apr 2004 23:48:36 -0000 @@ -146,8 +146,8 @@ } -/* like mkstemp but forces permissions */ -int do_mkstemp(char *template, mode_t perms) +/* like mkstemp but force 0600 permissions */ +int do_mkstemp(char *template) { RETURN_ERROR_IF(dry_run, 0); RETURN_ERROR_IF(read_only, EROFS); @@ -155,21 +155,12 @@ #if defined(HAVE_SECURE_MKSTEMP) && defined(HAVE_FCHMOD) { int fd = mkstemp(template); - if (fd == -1) - return -1; - if (fchmod(fd, perms) != 0 && preserve_perms) { - int errno_save = errno; - clo...
2008 Dec 05
0
rsync patch to allow content from one device file to be synced to another device file
...EAD-20081115-2333GMT/syscall.c 2008-03-21 10:26:25.000000000 -0400 +++ rsync-HEAD-20081115-2333GMT-d2d/syscall.c 2008-12-04 16:56:38.000000000 -0500 @@ -35,6 +35,7 @@ extern int list_only; extern int preserve_perms; extern int preserve_executability; +extern int copy_devices; #define RETURN_ERROR_IF(x,e) \ do { \ @@ -50,6 +51,7 @@ { if (dry_run) return 0; RETURN_ERROR_IF_RO_OR_LO; + if (copy_devices) return 0; return unlink(fname); }
2010 Feb 11
0
DO NOT REPLY [Bug 6276] crtimes.patch does not preserve creation dates on Mac x86_64 only
...tested the following, and it worked. @@ -37,10 +37,13 @@ ?extern int preserve_perms; ?extern int preserve_executability; +#pragma pack(push) +#pragma pack(4) ?struct create_time { - ? ? ? unsigned long length; + ? ? ? uint32 length; ? ? ? ?struct timespec crtime; ?}; +#pragma pack(pop) ?#define RETURN_ERROR_IF(x,e) \ ? ? ? ?do { \ > ------- Comment #7 from wayned at samba.org 2010-02-06 15:57 CST ------- > Thanks for the detailed analysis! I'm thinking that all we need to do is to > change "unsigned long" to "uint32" in the create_time structure. I've checked >...
2010 Feb 12
1
[RFC] add support for fallocate()
...l.c b/syscall.c index aba0009..854010e 100644 --- a/syscall.c +++ b/syscall.c @@ -189,6 +189,15 @@ int do_open(const char *pathname, int flags, mode_t mode) return open(pathname, flags | O_BINARY, mode); } +#ifdef HAVE_FALLOCATE +int do_fallocate(int fd, int mode, OFF_T offset, OFF_T len) +{ + RETURN_ERROR_IF(dry_run, 0); + RETURN_ERROR_IF_RO_OR_LO; + return fallocate(fd, mode, offset, len); +} +#endif + #ifdef HAVE_CHMOD int do_chmod(const char *path, mode_t mode) { -- 1.6.6.1
2010 Jun 15
3
about rsyncing of block devices
Hiya, I can see it's a regular subject on this list. I, like others wanted to use rsync to synchronise two block devices (as it happens one lvm volume and one nbd device served by qemu-img on a remote host from a qcow2 disk image so that I can keep the old versions) As I couldn't find any report of it being done successfully, I'm just sharing my findings as it might benefit others.