Output some info about the size of our structures.
[rsync/rsync.git] / options.c
index f1538e8..304704b 100644 (file)
--- a/options.c
+++ b/options.c
@@ -116,7 +116,7 @@ int checksum_seed = 0;
 int inplace = 0;
 int delay_updates = 0;
 long block_size = 0; /* "long" because popt can't set an int32. */
-
+int flist_extra_cnt = 0; /* count of file-list extras that everyone gets */
 
 /** Network address family. **/
 #ifdef INET6
@@ -227,19 +227,15 @@ static void print_rsync_version(enum logcode f)
                RSYNC_NAME, RSYNC_VERSION, PROTOCOL_VERSION);
        rprintf(f, "Copyright (C) 1996-2006 by Andrew Tridgell, Wayne Davison, and others.\n");
        rprintf(f, "<http://rsync.samba.org/>\n");
-       rprintf(f, "Capabilities: %d-bit files, %ssocketpairs, "
-               "%shard links, %ssymlinks, batchfiles,\n",
-               (int) (sizeof (OFF_T) * 8),
-               got_socketpair, hardlinks, links);
-
-       /* Note that this field may not have type ino_t.  It depends
-        * on the complicated interaction between largefile feature
-        * macros. */
-       rprintf(f, "              %sinplace, %sIPv6, "
-               "%d-bit system inums, %d-bit internal inums\n",
-               have_inplace, ipv6,
-               (int) (sizeof dumstat->st_ino * 8),
-               (int) (sizeof (int64) * 8));
+       rprintf(f, "Capabilities: %d-bit files, %d-bit system inums, %d-bit internal inums,\n",
+               (int)(sizeof (OFF_T) * 8),
+               (int)(sizeof dumstat->st_ino * 8), /* Don't check ino_t! */
+               (int)(sizeof (int64) * 8));
+       rprintf(f, "    %ssocketpairs, %shardlinks, %ssymlinks, %sIPv6, batchfiles, %sinplace,\n",
+               got_socketpair, hardlinks, links, ipv6, have_inplace);
+       rprintf(f, "    %sappend\n",
+               have_inplace);
+
 #ifdef MAINTAINER_MODE
        rprintf(f, "Panic Action: \"%s\"\n", get_panic_action());
 #endif
@@ -1223,6 +1219,11 @@ int parse_arguments(int *argc, const char ***argv, int frommain)
                need_messages_from_generator = 1;
        }
 
+       if (preserve_uid)
+               preserve_uid = ++flist_extra_cnt;
+       if (preserve_gid)
+               preserve_gid = ++flist_extra_cnt;
+
        *argv = poptGetArgs(pc);
        *argc = count_args(*argv);
 
@@ -1665,11 +1666,11 @@ void server_options(char **args,int *argc)
                        args[ac++] = "--delete";
                if (delete_before > 1)
                        args[ac++] = "--delete-before";
-               if (delete_during) {
-                       args[ac++] = delete_during == 2 ? "--delete-delay"
-                                                       : "--delete-during";
-               }
-               if (delete_after)
+               else if (delete_during == 2)
+                       args[ac++] = "--delete-delay";
+               else if (delete_during)
+                       args[ac++] = "--delete-during";
+               else if (delete_after)
                        args[ac++] = "--delete-after";
                if (force_delete)
                        args[ac++] = "--force";