search for: cmp_modtime

Displaying 20 results from an estimated 20 matches for "cmp_modtime".

2005 Jul 31
1
I think I found a bug...
I am looking at rsync 2.6.6 When I try to rsync a directory using --link-dest it never creates hardlinks. After crashing my way through the code here is what I found: generator.c: function 'unchanged_file' if (ignore_times) return 0; return cmp_modtime(st->st_mtime, file->modtime) == 0; shouldn't these lines be: if (ignore_times) return 1; return cmp_modtime(st->st_mtime, file->modtime) >= 0; Or do I not understand something... Nathan Bullock Visit my website at http://www.nathanbullock.org _____________...
2001 Sep 01
3
Patch to make rsync preserve access times
...; + updated = 1; > + } > + } > + > if (verbose > 1 && report) { > if (updated) > rprintf(FINFO,"%s\n",fname); The above gets rejected by patch when applied against 2.4.6 source, since the modtime comparison is now down via a function called cmp_modtime(). A slight change to that hunk fixes the problem... ----------------------------------------------------------------------------- *************** *** 162,181 **** st = &st2; } - if (preserve_times && !S_ISLNK(st->st_mode) && - cmp_modtime(st->st_mtime, fi...
2004 Apr 10
0
patches for copying atimes
...7 Mar 2004 20:29:59 -0000 1.77 +++ generator.c 10 Apr 2004 23:28:35 -0000 @@ -43,6 +43,7 @@ extern int always_checksum; extern char *compare_dest; extern int link_dest; +extern int preserve_times; /* choose whether to skip a particular file */ @@ -90,7 +91,11 @@ return 0; } - return (cmp_modtime(st->st_mtime,file->modtime) == 0); + if (preserve_times && cmp_time(st->st_atime,file->atime) != 0) { + return 0; + } + + return (cmp_time(st->st_mtime,file->modtime) == 0); } @@ -466,7 +471,7 @@ return; } - if (update_only &&am...
2004 Apr 20
1
improved atime patch
...r.c 15 Apr 2004 16:55:23 -0000 1.79 +++ generator.c 20 Apr 2004 21:06:18 -0000 @@ -50,6 +50,7 @@ extern int only_existing; extern int orig_umask; extern int safe_symlinks; +extern int copy_atimes; /* choose whether to skip a particular file */ @@ -97,7 +98,11 @@ return 0; } - return (cmp_modtime(st->st_mtime,file->modtime) == 0); + if (copy_atimes && cmp_time(st->st_atime,file->atime) != 0) { + return 0; + } + + return (cmp_time(st->st_mtime,file->modtime) == 0); } @@ -464,7 +469,7 @@ return; } - if (update_only &&...
2002 May 16
1
[patch] suggestions for -v option
...rote %.0f bytes read %.0f bytes %.2f bytes/sec\n", (double)stats.total_written, (double)stats.total_read, --- rsync-2.5.5/generator.c.orig Mon Mar 25 06:54:31 2002 +++ rsync-2.5.5/generator.c Tue May 14 16:40:28 2002 @@ -417,7 +417,7 @@ } if (update_only && cmp_modtime(st.st_mtime,file->modtime)>0 && fnamecmp == fname) { - if (verbose > 1) + if (verbose > 0) rprintf(FINFO,"%s is newer\n",fname); return; }
2005 Jan 05
1
rsync filename heuristics
...2 for skip */ > +static int open_base_file(struct file_struct *file, > + char *fname, > + int statret, > + STRUCT_STAT *st) > +{ > + int fd = -1; > + > + if (statret == 0) { > + if (S_ISREG(st->st_mode)) { > + if (update_only > + && cmp_modtime(st->st_mtime, file->modtime) > 0) { > + if (verbose > 1) > + rprintf(FINFO,"%s is newer\n",fname); > + return -2; > + } > + if (skip_file(fname, file, st)) { > + set_perms(fname, file, st, 1); > + return -2; > + } > + fd = do...
2002 Sep 10
0
[PATCH] Add --preserve-atime switch to rsync
...modtime; return utime(fname,t); #else struct timeval t[2]; ! t[0].tv_sec = acctime; t[0].tv_usec = 0; t[1].tv_sec = modtime; t[1].tv_usec = 0; *** rsync.c@@/main/original/1 Tue Apr 9 14:03:28 2002 --- rsync.c Fri Apr 12 11:00:16 2002 *************** *** 165,171 **** cmp_modtime(st->st_mtime, file->modtime) != 0) { /* don't complain about not setting times on directories because some filesystems can't do it */ ! if (set_modtime(fname,file->modtime) != 0 && !S_ISDIR(st->st_mode)) { rprintf(FERROR,"failed to set time...
2003 Oct 03
2
Cygwin/rsync Hang Problem Testing Results
People of cygwin & rsync, I recently attempted to get cygwin and rsync working to solve a backup/mirroring need in my computer life. Well, as you might guess, I ran into a little but of trouble. Strangely enough, rsync seemed to be regularly hanging when I attempted to do a "get" (sycronize a remote to a local dir). Well, considering I want to automate this, that was not going
2004 May 10
2
read error produces null-byte-filled destination file
I've run into a bug in the IO handling when reading a file. Suppose I have a file that lives on an NFS filesystem. That filesystem is NOT being exported with auth=0 permissions. So, if I try to access a file as root, it successfully opens the file, but subsequent reads fail with EACCES. This produces a destination file full of null bytes. I noticed this with 2.5.7, but checked 2.6.2 as
2004 May 06
2
rsync-2.6.2: NFS clients confused after an rsync
We use rsync to update an nfs server. After an update, we noticed that a large number of clients didn't see the updated data. It took me a while to be able to reliably reproduce this problem, but it happens on old and new versions of rysnc. It also happens across all the platforms we use here (sun/linux/netapp). This shows the problem: [Note my home directory is NFS mounted]
2004 Jun 21
0
Problem found and fixed with --update
...; !make_backup(fname)) return; + /* if the target has been modified since the file list was generated, + just delete the tmp file, leaving the target behind. */ + + if(update_only) { + STRUCT_STAT target_st; + + ret = do_stat(fname, &target_st); + + if(ret == 0) { + if(cmp_modtime(target_st.st_mtime, file->modtime) > 0) { + rprintf(FINFO, "target \"%s\" newer, deleting \"%s\"\n", + fname, fnametmp); + do_unlink(fnametmp); + return; + } + } + } + /* move tmp file over real file */ + ret = robust_rename(fna...
2005 Jul 26
1
itemize() needs to use CHMOD_BITS (patch)
...9;m not subscribed to this mailing list, please Cc: if you need more info from me. Thanks. --- generator.c.~1~ Thu Jun 30 13:03:14 2005 +++ generator.c Tue Jul 26 12:51:11 2005 @@ -327,7 +327,8 @@ && (!(iflags & ITEM_XNAME_FOLLOWS) || *xname)) || (keep_time && cmp_modtime(file->modtime, st->st_mtime) != 0)) iflags |= ITEM_REPORT_TIME; - if (preserve_perms && file->mode != st->st_mode) + if (preserve_perms && (st->st_mode & CHMOD_BITS) + != (file->mode & CHMOD_BITS)) iflags |= ITEM_REPORT_PERMS; if (pre...
2004 Sep 15
0
[Bug 1764] New: dry-run does not show changes in owner / group, permission, or timestamp
...4 @@ -129,7 +129,6 @@ STRUCT_STAT st2; int change_uid, change_gid; - if (dry_run) return 0; if (!st) { if (link_stat(fname,&st2) != 0) { @@ -142,6 +141,10 @@ if (preserve_times && !S_ISLNK(st->st_mode) && cmp_modtime(st->st_mtime, file->modtime) != 0) { + if (dry_run) { + rprintf(FINFO,"modtime: %s\n",fname); + return 0; + } /* don't complain about not setting times on directories * because some...
2002 Mar 19
1
(fwd from uke@jeremy.org) thanks and patch
Jeremy, I'm glad you like rsync. Why does your encryption program not produce a file of the same size every time it is run on the same input? I can see what the patch does, but I'm having a bit of trouble understanding whether it would be generally useful. -- Martin -------------- next part -------------- An embedded message was scrubbed... From: jeremy bornstein
2003 Jan 24
5
Cygwin issues: modify-window and hangs
I had a friend run some Cygwin tests and we found that --modify-window=1 works just as well as --modify-window=2 on FAT filesystems to copy files from Unix and detect the difference in granularity. FAT filesystems always have timestamps that have an even number of seconds. On the other hand, NTFS filesystems can store the modification time down to the second, whereas previously people on this
2004 Apr 19
3
[PATCH] time limit
...sync-2.6.1pre-2/proto.h 2004-04-14 19:33:30.000000000 -0400 +++ rsync-2.6.1pre-2_modified/proto.h 2004-04-19 16:07:57.000000000 -0400 @@ -267,6 +267,7 @@ int unsafe_symlink(const char *dest, const char *src); char *timestring(time_t t); int msleep(int t); +time_t get_rsync_start_time(void); int cmp_modtime(time_t file1, time_t file2); int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); void *_new_array(unsigned int size, unsigned long num); diff -urN rsync-2.6.1pre-2/rsync.1 rsync-2.6.1pre-2_modified/rsync.1 --- rsync-2.6.1pre-2/rsync.1 2004-04-17 14:38:47.000000000 -0400 +++ rs...
2004 Apr 22
2
[PATCH] --timelimit and --stopat
...sync-2.6.1pre-2/proto.h 2004-04-14 19:33:30.000000000 -0400 +++ rsync-2.6.1pre-2_modified/proto.h 2004-04-22 15:36:33.000000000 -0400 @@ -267,6 +267,7 @@ int unsafe_symlink(const char *dest, const char *src); char *timestring(time_t t); int msleep(int t); +time_t get_rsync_start_time(void); int cmp_modtime(time_t file1, time_t file2); int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); void *_new_array(unsigned int size, unsigned long num); diff -urN rsync-2.6.1pre-2/rsync.1 rsync-2.6.1pre-2_modified/rsync.1 --- rsync-2.6.1pre-2/rsync.1 2004-04-17 14:38:47.000000000 -0400 +++ rs...
2003 Nov 17
0
[PATCH] --source-filter && --dest-filter for rsync 2.5.6
...;st_size != file->length) { - return 0; + if (! times_only) { + if (st->st_size != file->length) { + return 0; + } } if (link_dest) { if((st->st_mode & ~_S_IFMT) != (file->mode & ~_S_IFMT)) { @@ -59,6 +62,9 @@ return 0; } } + if (times_only) { + return (cmp_modtime(st->st_mtime,file->modtime) == 0); + } /* if always checksum is set then we use the checksum instead diff -ur rsync-2.5.6/options.c rsync-2.5.6-filtered/options.c --- rsync-2.5.6/options.c 2003-01-28 04:11:57.000000000 +0100 +++ rsync-2.5.6-filtered/options.c 2003-11-16 14:06:29.00000...
2006 Jan 24
1
propagate atimes with rsync-2.6.6 (fwd)
...SL an adequate diff -uNr rsync-2.6.6/rsync.c rsync-2.6.6_patch/rsync.c --- rsync-2.6.6/rsync.c 2005-03-14 18:06:08.000000000 +0100 +++ rsync-2.6.6_patch/rsync.c 2005-11-23 23:53:43.000000000 +0100 @@ -73,7 +73,7 @@ flags |= PERMS_SKIP_MTIME; if (!(flags & PERMS_SKIP_MTIME) && cmp_modtime(st->st_mtime, file->modtime) != 0) { - if (set_modtime(fname,file->modtime) != 0) { + if (set_modtime(fname,file->modtime,file->acctime) != 0) { rsyserr(FERROR, errno, "failed to set times on %s", full_fname(fname)); return 0; diff -uNr rsync-2.6.6/rsync.h rs...
2003 Jun 25
3
patch draft for extended attributes on linux
...g.h.in -x autom4te.cache -x config.log -x .cvsignore -x dummy -x .svn -x ID -x TAGS rsync-2.5.6/proto.h xa/proto.h --- rsync-2.5.6/proto.h 2003-01-27 14:35:09.000000000 +1100 +++ xa/proto.h 2003-06-25 08:29:48.000000000 +1000 @@ -265,4 +265,12 @@ char *timestring(time_t t); int msleep(int t); int cmp_modtime(time_t file1, time_t file2); int _Insure_trap_error(int a1, int a2, int a3, int a4, int a5, int a6); +int xalist_apply(const char *filename, + struct xa_list *xal); +int xalist_load(char *fname, + struct file_struct *file); +int xalist_send(int f, + st...