dumpstuff nbytes can't exceed 32 bits
authorDerrick Brashear <shadow@dementia.org>
Tue, 25 May 2010 22:21:32 +0000 (18:21 -0400)
committerDerrick Brashear <shadow@dementia.org>
Wed, 26 May 2010 04:28:23 +0000 (21:28 -0700)
the read returns a 32 bit type; we can't possibly need to write 64 bits.
(ssize_t is 32 bits on macos and so this ends up being a bad shift)

Change-Id: I4d8f99b0c752a2c75ce65b9cfa1b3cb0d484cc7f
Reviewed-on: http://gerrit.openafs.org/2024
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/volser/dumpstuff.c

index ae244a0..1051f63 100644 (file)
@@ -1560,7 +1560,7 @@ volser_WriteFile(int vn, struct iod *iodp, FdHandle_t * handleP, int tag,
        if (nBytes > 0)
            written += nBytes;
        if (nBytes != size) {
-           Log("1 Volser: WriteFile: Error writing (%d,%u) bytes to vnode %d: %s; restore aborted\n", (int)(nBytes>>32), (int)(nBytes & 0xffffffff), vn, afs_error_message(errno));
+           Log("1 Volser: WriteFile: Error writing (%u) bytes to vnode %d: %s; restore aborted\n", (int)(nBytes & 0xffffffff), vn, afs_error_message(errno));
            *status = 4;
            break;
        }