Device majors incorrectly set to 0 during rsync
Wayne Davison
wayned at samba.org
Thu Apr 8 21:25:24 GMT 2004
On Thu, Apr 08, 2004 at 01:43:18PM -0700, Williams, Tom wrote:
> Major numbers on 64bit Solaris are being dropped, and created as 0 on
> recieving end. 32bit version works perfectly.
Looks like the code is masking a 64-bit number with a 32-bit mask
(ouch)! Try the attached patch and let me know if it fixes the problem.
..wayne..
-------------- next part --------------
--- flist.c 1 Apr 2004 18:04:59 -0000 1.206
+++ flist.c 8 Apr 2004 21:23:16 -0000
@@ -367,11 +367,11 @@ void send_file_entry(struct file_struct
} else
rdev = 0;
} else if (IS_DEVICE(mode)) {
- if ((file->u.rdev & ~0xFF) == rdev_high)
+ if ((file->u.rdev & ~(DEV64_T)0xFF) == rdev_high)
flags |= XMIT_SAME_HIGH_RDEV;
else {
rdev = file->u.rdev;
- rdev_high = rdev & ~0xFF;
+ rdev_high = rdev & ~(DEV64_T)0xFF;
}
}
}
@@ -594,7 +594,7 @@ void receive_file_entry(struct file_stru
} else if (IS_DEVICE(mode)) {
if (!(flags & XMIT_SAME_HIGH_RDEV)) {
rdev = (DEV64_T)read_int(f);
- rdev_high = rdev & ~0xFF;
+ rdev_high = rdev & ~(DEV64_T)0xFF;
} else
rdev = rdev_high | (DEV64_T)read_byte(f);
}
More information about the rsync
mailing list