handle OSes where you can't rename a open file in the cleanup code.
[rsync/rsync.git] / options.c
index bd0e523..23b3c8c 100644 (file)
--- a/options.c
+++ b/options.c
@@ -120,9 +120,9 @@ void usage(int F)
   rprintf(F," -T  --temp-dir=DIR          create temporary files in directory DIR\n");
   rprintf(F," -z, --compress              compress file data\n");
   rprintf(F,"     --exclude=PATTERN       exclude file FILE\n");
-  rprintf(F,"     --exclude-from=PATTERN  exclude files listed in FILE\n");
+  rprintf(F,"     --exclude-from=FILE     exclude patterns listed in FILE\n");
   rprintf(F,"     --include=PATTERN       don't exclude file FILE\n");
-  rprintf(F,"     --include-from=PATTERN  don't exclude files listed in FILE\n");
+  rprintf(F,"     --include-from=FILE     don't exclude patterns listed in FILE\n");
   rprintf(F,"     --suffix=SUFFIX         override backup suffix\n");  
   rprintf(F,"     --version               print version number\n");  
   rprintf(F,"     --daemon                run as a rsync daemon\n");  
@@ -197,7 +197,8 @@ static struct option long_options[] = {
   {"port",        1,     0,    OPT_PORT},
   {0,0,0,0}};
 
-void parse_arguments(int argc, char *argv[])
+
+int parse_arguments(int argc, char *argv[])
 {
        int opt;
        int option_index;
@@ -301,7 +302,7 @@ void parse_arguments(int argc, char *argv[])
                        preserve_hard_links=1;
 #else 
                        rprintf(FERROR,"ERROR: hard links not supported on this platform\n");
-                       exit_cleanup(1);
+                       return 0;
 #endif
                        break;
 
@@ -412,10 +413,10 @@ void parse_arguments(int argc, char *argv[])
                        break;
 
                default:
-                       /* rprintf(FERROR,"bad option -%c\n",opt); */
-                       exit_cleanup(1);
+                       return 0;
                }
        }
+       return 1;
 }