Save first filename and linenum in case exit_cleanup() recurses.
[rsync/rsync.git] / options.c
index 53640ad..546f63d 100644 (file)
--- a/options.c
+++ b/options.c
@@ -215,7 +215,7 @@ static const char *debug_verbosity[] = {
 static const char *info_verbosity[1+MAX_VERBOSITY] = {
        /*0*/ NULL,
        /*1*/ "COPY,DEL,FLIST,MISC,NAME,STATS,SYMSAFE",
-       /*2*/ "BACKUP,MOUNT,NAME2,REMOVE,SKIP",
+       /*2*/ "BACKUP,MISC2,MOUNT,NAME2,REMOVE,SKIP",
 };
 
 #define MAX_OUT_LEVEL 4 /* The largest N allowed for any flagN word. */
@@ -248,7 +248,7 @@ static struct output_struct info_words[COUNT_INFO+1] = {
        INFO_WORD(COPY, W_REC, "Mention files copied locally on the receiving side"),
        INFO_WORD(DEL, W_REC, "Mention deletions on the receiving side"),
        INFO_WORD(FLIST, W_CLI, "Mention file-list receiving/sending (levels 1-2)"),
-       INFO_WORD(MISC, W_SND|W_REC, "Mention miscellaneous information"),
+       INFO_WORD(MISC, W_SND|W_REC, "Mention miscellaneous information (levels 1-2)"),
        INFO_WORD(MOUNT, W_SND|W_REC, "Mention mounts that were found or skipped"),
        INFO_WORD(NAME, W_SND|W_REC, "Mention 1) updated file/dir names, 2) unchanged names"),
        INFO_WORD(PROGRESS, W_CLI, "Mention 1) per-file progress or 2) total transfer progress"),
@@ -279,6 +279,7 @@ static struct output_struct debug_words[COUNT_DEBUG+1] = {
        DEBUG_WORD(HASH, W_SND|W_REC, "Debug hashtable code"),
        DEBUG_WORD(HLINK, W_SND|W_REC, "Debug hard-link actions"),
        DEBUG_WORD(ICONV, W_CLI|W_SRV, "Debug iconv character conversions (levels 1-2)"),
+       DEBUG_WORD(IO, W_CLI|W_SRV, "Debug I/O routines (levels 1-4)"),
        DEBUG_WORD(OWN, W_REC, "Debug ownership changes in users & groups (levels 1-2)"),
        DEBUG_WORD(PROTO, W_CLI|W_SRV, "Debug protocol information"),
        DEBUG_WORD(RECV, W_REC, "Debug receiver functions"),
@@ -596,7 +597,7 @@ static void print_rsync_version(enum logcode f)
 #ifdef ICONV_OPTION
        iconv = "";
 #endif
-#if defined HAVE_LUTIMES && defined HAVE_UTIMES
+#ifdef CAN_SET_SYMLINK_TIMES
        symtimes = "";
 #endif
 
@@ -1420,14 +1421,16 @@ int parse_arguments(int *argc_p, const char ***argv_p)
                                arg = sanitize_path(NULL, arg, NULL, 0, SP_DEFAULT);
                        if (daemon_filter_list.head) {
                                int rej;
-                               char *dir, *cp = strdup(arg);
+                               char *cp = strdup(arg);
                                if (!cp)
                                        out_of_memory("parse_arguments");
                                if (!*cp)
-                                       goto options_rejected;
-                               dir = cp + (*cp == '/' ? module_dirlen : 0);
-                               clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
-                               rej = check_filter(&daemon_filter_list, FLOG, dir, 0) < 0;
+                                       rej = 1;
+                               else {
+                                       char *dir = cp + (*cp == '/' ? module_dirlen : 0);
+                                       clean_fname(dir, CFN_COLLAPSE_DOT_DOT_DIRS);
+                                       rej = check_filter(&daemon_filter_list, FLOG, dir, 0) < 0;
+                               }
                                free(cp);
                                if (rej)
                                        goto options_rejected;
@@ -1930,7 +1933,7 @@ int parse_arguments(int *argc_p, const char ***argv_p)
        }
        if (!xfer_dirs && delete_mode) {
                snprintf(err_buf, sizeof err_buf,
-                       "--delete does not work without -r or -d.\n");
+                       "--delete does not work without --recursive (-r) or --dirs (-d).\n");
                return 0;
        }
 
@@ -2358,7 +2361,7 @@ void server_options(char **args, int *argc_p)
                        argstr[x++] = '.';
                if (allow_inc_recurse)
                        argstr[x++] = 'i';
-#if defined HAVE_LUTIMES && defined HAVE_UTIMES
+#ifdef CAN_SET_SYMLINK_TIMES
                argstr[x++] = 'L';
 #endif
 #ifdef ICONV_OPTION