diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2011-10-06 13:56:06 +0100 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2011-10-06 13:56:06 +0100 |
commit | d9808d402d04ae320284b41133c16398ff64318c (patch) | |
tree | c147fb2b3cb68f2138405fb583306153fa497bcc | |
parent | 89bc67f9d4b29f52cfb8ef367f2fb8d0712fd73d (diff) | |
download | tbdiff-d9808d402d04ae320284b41133c16398ff64318c.tar.gz |
Fixed tbd-create not writing the commands to alter special devices if they were
different
-rw-r--r-- | libtbd_create.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/libtbd_create.c b/libtbd_create.c index c430b3c..80874a8 100644 --- a/libtbd_create.c +++ b/libtbd_create.c @@ -510,21 +510,12 @@ tbd_create_cmd_special_delta(FILE *stream, tbd_stat_t *a, tbd_stat_t *b) { - uint16_t metadata_mask = TBD_METADATA_NONE; - - /* If nothing changes we issue no command */ - if(a->mtime != b->mtime) - metadata_mask |= TBD_METADATA_MTIME; - if(a->uid != b->uid) - metadata_mask |= TBD_METADATA_UID; - if(a->gid != b->gid) - metadata_mask |= TBD_METADATA_GID; - if(a->mode != b->mode) - metadata_mask |= TBD_METADATA_MODE; + uint16_t metadata_mask = tbd_metadata_mask(a, b); if(a->rdev != b->rdev) metadata_mask |= TBD_METADATA_RDEV; - if(metadata_mask != TBD_METADATA_NONE) + /* If nothing changes we issue no command */ + if(metadata_mask == TBD_METADATA_NONE) return 0; int err; |