Added "debug_type" to the exclude_list_struct.
[rsync/rsync.git] / flist.c
diff --git a/flist.c b/flist.c
index aa43235..077e42c 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -227,17 +227,14 @@ static int check_exclude_file(char *fname, int is_dir, int exclude_level)
                }
        }
        if (server_exclude_list.head
-        && check_exclude(&server_exclude_list, fname, is_dir,
-                         "server pattern"))
+        && check_exclude(&server_exclude_list, fname, is_dir))
                return 1;
        if (exclude_level != ALL_EXCLUDES)
                return 0;
-       if (exclude_list.head
-           && check_exclude(&exclude_list, fname, is_dir, "pattern"))
+       if (exclude_list.head && check_exclude(&exclude_list, fname, is_dir))
                return 1;
        if (local_exclude_list.head
-           && check_exclude(&local_exclude_list, fname, is_dir,
-                            "local-cvsignore"))
+           && check_exclude(&local_exclude_list, fname, is_dir))
                return 1;
        return 0;
 }
@@ -327,7 +324,8 @@ void send_file_entry(struct file_struct *file, int f, unsigned short base_flags)
        unsigned short flags;
        static time_t modtime;
        static mode_t mode;
-       static dev_t dev, rdev;
+       static uint64 dev;
+       static dev_t rdev;
        static uint32 rdev_major;
        static uid_t uid;
        static gid_t gid;
@@ -341,7 +339,7 @@ void send_file_entry(struct file_struct *file, int f, unsigned short base_flags)
        if (!file) {
                write_byte(f, 0);
                modtime = 0, mode = 0;
-               dev = rdev = makedev(0, 0);
+               dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
                *lastname = '\0';
@@ -478,20 +476,14 @@ void send_file_entry(struct file_struct *file, int f, unsigned short base_flags)
 
 #if SUPPORT_HARD_LINKS
        if (flags & XMIT_HAS_IDEV_DATA) {
-               if (protocol_version >= 28) {
-                       /* major/minor dev_t and 64-bit ino_t */
-                       if (!(flags & XMIT_SAME_DEV)) {
-                               write_int(f, major(dev));
-                               write_int(f, minor(dev));
-                       }
-                       write_longint(f, file->F_INODE);
-               } else if (protocol_version < 26) {
+               if (protocol_version < 26) {
                        /* 32-bit dev_t and ino_t */
                        write_int(f, dev);
                        write_int(f, file->F_INODE);
                } else {
                        /* 64-bit dev_t and ino_t */
-                       write_longint(f, dev);
+                       if (!(flags & XMIT_SAME_DEV))
+                               write_longint(f, dev);
                        write_longint(f, file->F_INODE);
                }
        }
@@ -524,7 +516,8 @@ void receive_file_entry(struct file_struct **fptr, unsigned short flags,
 {
        static time_t modtime;
        static mode_t mode;
-       static dev_t dev, rdev;
+       static uint64 dev;
+       static dev_t rdev;
        static uint32 rdev_major;
        static uid_t uid;
        static gid_t gid;
@@ -539,7 +532,7 @@ void receive_file_entry(struct file_struct **fptr, unsigned short flags,
 
        if (!fptr) {
                modtime = 0, mode = 0;
-               dev = rdev = makedev(0, 0);
+               dev = 0, rdev = makedev(0, 0);
                rdev_major = 0;
                uid = 0, gid = 0;
                *lastname = '\0';
@@ -677,19 +670,13 @@ void receive_file_entry(struct file_struct **fptr, unsigned short flags,
        if (preserve_hard_links && protocol_version < 28 && S_ISREG(mode))
                flags |= XMIT_HAS_IDEV_DATA;
        if (flags & XMIT_HAS_IDEV_DATA) {
-               INO64_T inode;
-               if (protocol_version >= 28) {
-                       if (!(flags & XMIT_SAME_DEV)) {
-                               uint32 dev_major = read_int(f);
-                               uint32 dev_minor = read_int(f);
-                               dev = makedev(dev_major, dev_minor);
-                       }
-                       inode = read_longint(f);
-               } else if (protocol_version < 26) {
-                       dev = (dev_t)read_int(f);
+               uint64 inode;
+               if (protocol_version < 26) {
+                       dev = read_int(f);
                        inode = read_int(f);
                } else {
-                       dev = (dev_t)read_longint(f);
+                       if (!(flags & XMIT_SAME_DEV))
+                               dev = read_longint(f);
                        inode = read_longint(f);
                }
                if (flist->hlink_pool) {
@@ -957,7 +944,7 @@ void send_file_name(int f, struct file_list *flist, char *fname,
        if (recursive && S_ISDIR(file->mode)
            && !(file->flags & FLAG_MOUNT_POINT)) {
                struct exclude_list_struct last_list = local_exclude_list;
-               memset(&local_exclude_list, 0, sizeof local_exclude_list);
+               local_exclude_list.head = local_exclude_list.tail = NULL;
                send_directory(f, flist, f_name_to(file, fbuf));
                free_exclude_list(&local_exclude_list);
                local_exclude_list = last_list;