~ubuntu-branches/ubuntu/lucid/rsync/lucid

« back to all changes in this revision

Viewing changes to generator.c

  • Committer: Bazaar Package Importer
  • Author(s): Paul Slootman
  • Date: 2009-06-17 13:43:12 UTC
  • mfrom: (1.2.2 upstream)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20090617134312-aopuowraetuj41s8
Tags: 3.0.6-1
* new upstream release.
* Manpage now states that MD5 is used for protocol version 30 and higher.
  closes:#520330
* Updated to standards version 3.8.2. Added debian/README.source .
* Added lintian override for embedded-zlib, as this is a modified version
  optimized for the rsync protocol. I.e. the standard zlib version will not
  work as well.
* Added a 'status' option to the init.d script.
  closes:#492138
* Manpage now declares --delete-during to be the default in the summary.
  closes:#472767,#476368

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 * Copyright (C) 1996-2000 Andrew Tridgell
5
5
 * Copyright (C) 1996 Paul Mackerras
6
6
 * Copyright (C) 2002 Martin Pool <mbp@samba.org>
7
 
 * Copyright (C) 2003-2008 Wayne Davison
 
7
 * Copyright (C) 2003-2009 Wayne Davison
8
8
 *
9
9
 * This program is free software; you can redistribute it and/or modify
10
10
 * it under the terms of the GNU General Public License as published by
700
700
                        if (iflags & ITEM_XNAME_FOLLOWS)
701
701
                                write_vstring(sock_f_out, xname, strlen(xname));
702
702
#ifdef SUPPORT_XATTRS
703
 
                        if (preserve_xattrs && !dry_run
 
703
                        if (preserve_xattrs && do_xfers
704
704
                         && iflags & (ITEM_REPORT_XATTR|ITEM_TRANSFER)) {
705
705
                                send_xattr_request(NULL, file,
706
706
                                        iflags & ITEM_REPORT_XATTR ? sock_f_out : -1);
1124
1124
                }
1125
1125
                switch (type) {
1126
1126
                case TYPE_DIR:
 
1127
                case TYPE_SPECIAL:
1127
1128
                        break;
1128
 
                case TYPE_SPECIAL:
1129
1129
                case TYPE_DEVICE:
1130
1130
                        devp = F_RDEV_P(file);
1131
1131
                        if (sxp->st.st_rdev != MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp)))
1613
1613
 
1614
1614
        if ((am_root && preserve_devices && IS_DEVICE(file->mode))
1615
1615
         || (preserve_specials && IS_SPECIAL(file->mode))) {
1616
 
                uint32 *devp = F_RDEV_P(file);
1617
 
                dev_t rdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
 
1616
                dev_t rdev;
 
1617
                if (IS_DEVICE(file->mode)) {
 
1618
                        uint32 *devp = F_RDEV_P(file);
 
1619
                        rdev = MAKEDEV(DEV_MAJOR(devp), DEV_MINOR(devp));
 
1620
                } else
 
1621
                        rdev = 0;
1618
1622
                if (statret == 0) {
1619
1623
                        int del_for_flag;
1620
1624
                        if (IS_DEVICE(file->mode)) {
1628
1632
                        }
1629
1633
                        if (statret == 0
1630
1634
                         && BITS_EQUAL(sx.st.st_mode, file->mode, _S_IFMT)
1631
 
                         && sx.st.st_rdev == rdev) {
 
1635
                         && (IS_SPECIAL(sx.st.st_mode) || sx.st.st_rdev == rdev)) {
1632
1636
                                /* The device or special file is identical. */
1633
1637
                                set_file_attrs(fname, file, &sx, NULL, maybe_ATTRS_REPORT);
1634
1638
                                if (itemizing)
2137
2141
                if (first_flist->in_progress || first_flist->to_redo)
2138
2142
                        break;
2139
2143
 
2140
 
                if (!read_batch) {
2141
 
                        write_ndx(sock_f_out, NDX_DONE);
 
2144
                write_ndx(sock_f_out, NDX_DONE);
 
2145
                if (!read_batch)
2142
2146
                        maybe_flush_socket(1);
2143
 
                }
2144
2147
 
2145
2148
                if (delete_during == 2 || !dir_tweaking) {
2146
2149
                        /* Skip directory touch-up. */
2285
2288
                }
2286
2289
        } while ((cur_flist = cur_flist->next) != NULL);
2287
2290
 
2288
 
        if (read_batch && inc_recurse)
2289
 
                write_ndx(f_out, NDX_DONE);
2290
 
 
2291
2291
        if (delete_during)
2292
2292
                delete_in_dir(NULL, NULL, &dev_zero);
2293
2293
        phase++;