Changeset 2475
- Timestamp:
- 01/27/07 10:38:56 (2 years ago)
- Files:
-
- trunk/lib_internal/unify.h (modified) (2 diffs)
- trunk/src/vhashify.c (modified) (6 diffs)
- trunk/src/vhashify.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib_internal/unify.h
r1926 r2475 47 47 (LHS)->st_ino ==(RHS)->st_ino)) 48 48 49 #define Unify_isUnifyable(LHS, RHS) \49 #define _Unify_isUnifyable(LHS, RHS) \ 50 50 ((bool)((LHS)->st_dev ==(RHS)->st_dev && \ 51 51 (LHS)->st_ino !=(RHS)->st_ino && \ … … 53 53 (LHS)->st_uid ==(RHS)->st_uid && \ 54 54 (LHS)->st_gid ==(RHS)->st_gid && \ 55 (LHS)->st_size ==(RHS)->st_size && \ 56 (LHS)->st_mtime==(RHS)->st_mtime)) 55 (LHS)->st_size ==(RHS)->st_size)) 56 #ifdef UTIL_VSERVER_UNIFY_MTIME_OPTIONAL 57 # define Unify_isUnifyable(LHS, RHS) \ 58 ((bool)(_Unify_isUnifyable(LHS, RHS) && \ 59 (global_args->ignore_mtime || \ 60 (LHS)->st_mtime==(RHS)->st_mtime))) 61 #else 62 # define Unify_isUnifyable(LHS, RHS) \ 63 _Unify_isUnifyable(LHS, RHS) 64 #endif 57 65 58 66 trunk/src/vhashify.c
r2403 r2475 21 21 #endif 22 22 23 #define UTIL_VSERVER_UNIFY_MTIME_OPTIONAL 24 23 25 #include "vhashify.h" 24 26 #include "util.h" … … 71 73 #define CMD_MANUALLY 0x1003 72 74 #define CMD_REFRESH 0x1004 75 #define CMD_NOMTIME 0x1005 73 76 74 77 struct option const … … 81 84 { "manually", no_argument, 0, CMD_MANUALLY }, 82 85 { "refresh", no_argument, 0, CMD_REFRESH }, 86 { "ignore-mtime", no_argument, 0, CMD_NOMTIME }, 83 87 { "dry-run", no_argument, 0, 'n' }, 84 88 { "verbose", no_argument, 0, 'v' }, … … 290 294 SET_ATTR(rdev), 291 295 SET_ATTR(size), 292 SET_ATTR(mtime)296 .mtime = (global_args->ignore_mtime ? 0 : st->st_mtime), 293 297 }; 294 298 … … 689 693 .dry_run = false, 690 694 .do_refresh = false, 695 .ignore_mtime = false, 691 696 }; 692 697 … … 707 712 case CMD_SLEDGE : args.insecure = 2; break; 708 713 case CMD_REFRESH : args.do_refresh = true; break; 714 case CMD_NOMTIME : args.ignore_mtime = true; break; 709 715 case 'n' : args.dry_run = true; break; 710 716 case 'v' : ++args.verbosity; break; trunk/src/vhashify.h
r1922 r2475 33 33 bool dry_run; 34 34 bool do_refresh; 35 bool ignore_mtime; 35 36 }; 36 37
