Always use 64-bit ino_t and dev_t internally, so that we can detect
[rsync/rsync.git] / batch.c
diff --git a/batch.c b/batch.c
index e45d364..4074e05 100644 (file)
--- a/batch.c
+++ b/batch.c
@@ -88,8 +88,8 @@ void write_batch_flist_info(int flist_count, struct file_struct **fptr)
            sizeof(time_t) +
            sizeof(OFF_T) +
            sizeof(mode_t) +
-           sizeof(INO_T) +
-           (2 * sizeof(dev_t)) + sizeof(uid_t) + sizeof(gid_t);
+           sizeof(INO64_T) +
+           (2 * sizeof(DEV64_T)) + sizeof(uid_t) + sizeof(gid_t);
 
        fdb_open = 1;
        fdb_close = 0;
@@ -150,6 +150,10 @@ void write_batch_argvs_file(int orig_argc, int argc, char **argv)
        /* Write argvs info to batch file */
 
        for (i = argc - orig_argc; i < argc; i++) {
+               /* FIXME: This apparently crashes if rsync is run with
+                * just "rsync -F".  I think directly manipulating
+                * argv[] is probably bogus -- what if -F is part of a
+                * run of several short options? */
                if (!strcmp(argv[i], "-F")) {   /* safer to change it here than script */
                        strncat(buff, "-f ", 3);        /* chg to -f + ext to get ready for remote */
                        strncat(buff, batch_file_ext,
@@ -285,8 +289,8 @@ void read_batch_flist_info(struct file_struct **fptr)
        read_batch_flist_file((char *) &file->modtime, sizeof(time_t));
        read_batch_flist_file((char *) &file->length, sizeof(OFF_T));
        read_batch_flist_file((char *) &file->mode, sizeof(mode_t));
-       read_batch_flist_file((char *) &file->inode, sizeof(INO_T));
-       read_batch_flist_file((char *) &file->dev, sizeof(dev_t));
+       read_batch_flist_file((char *) &file->inode, sizeof(INO64_T));
+       read_batch_flist_file((char *) &file->dev, sizeof(DEV64_T));
        read_batch_flist_file((char *) &file->rdev, sizeof(dev_t));
        read_batch_flist_file((char *) &file->uid, sizeof(uid_t));
        read_batch_flist_file((char *) &file->gid, sizeof(gid_t));