]> Dogcows Code - chaz/tar/commitdiff
*** empty log message ***
authorFrançois Pinard <pinard@iro.umontreal.ca>
Wed, 16 Nov 1994 03:03:09 +0000 (03:03 +0000)
committerFrançois Pinard <pinard@iro.umontreal.ca>
Wed, 16 Nov 1994 03:03:09 +0000 (03:03 +0000)
src/tar.c

index c159e6033e518d92e32782fc630a81db7ec27ce4..c439df5ee304363e36ba8b889c501cdeab79e7e3 100644 (file)
--- a/src/tar.c
+++ b/src/tar.c
@@ -191,6 +191,8 @@ struct option long_options[] =
        {"checkpoint",          0,      &f_checkpoint,          1},
        {"show-omitted-dirs",   0,      &f_show_omitted_dirs,   1},
        {"volno-file",          1,      0,                      17},
+       {"force-local",         0,      &f_force_local,         1},
+       {"atime-preserve",      0,      &f_atime_preserve,      1},
 
        {0, 0, 0, 0}
 };
@@ -301,9 +303,10 @@ options(argc, argv)
 
        /* Set default option values */
        blocking = DEFBLOCKING;         /* From Makefile */
-       ar_file = getenv("TAPE");       /* From environment, or */
-       if (ar_file == 0)
-               ar_file = DEF_AR_FILE;  /* From Makefile */
+       ar_files = malloc (sizeof (char *) * 10);
+       ar_files_len = 10;
+       n_ar_files = 0;
+       cur_ar_file = 0;
 
        /* Parse options */
        while ((c = getoldopt(argc, argv,
@@ -396,7 +399,11 @@ options(argc, argv)
 
                                sprintf(buf,"/dev/rmt%d",add+c-'0');
 #endif
-                               ar_file=buf;
+                               if (n_ar_files == ar_files_len)
+                                 ar_files 
+                                   = (sizeof (char *)
+                                      * (ar_files_len *= 2));
+                               ar_files[n_ar_files++]=buf;
                        }
                        break;
 
@@ -436,7 +443,12 @@ options(argc, argv)
                        break;
 
                case 'f':       /* Use ar_file for the archive */
-                       ar_file = optarg;
+                       if (n_ar_files == ar_files_len)
+                         ar_files
+                           = (sizeof (char *)
+                              * (ar_files_len *= 2));
+               
+                       ar_files[n_ar_files++] = optarg;
                        break;
 
                case 'F':
@@ -610,6 +622,18 @@ options(argc, argv)
        }
 
        blocksize = blocking * RECORDSIZE;
+       if (n_ar_files == 0)
+         {
+           n_ar_files = 1;
+           ar_files[0] = getenv("TAPE");       /* From environment, or */
+           if (ar_files[0] == 0)
+             ar_files[0] = DEF_AR_FILE;        /* From Makefile */
+         }
+       if (n_ar_files > 1 && !f_multivol)
+         {
+           msg ("Multiple archive files requires --multi-volume\n");
+           exit (EX_ARGSBAD);
+         }
 }
 
 
@@ -640,6 +664,7 @@ describe()
 
        fprintf(stdout, "\
 Other options:\n\
+--atime-preserve       don't change access times on dumped files\n\
 -b, --block-size N     block size of Nx512 bytes (default N=%d)\n", DEFBLOCKING);
        fputs ("\
 -B, --read-full-blocks reblock as we read (for reading 4.2BSD pipes)\n\
@@ -648,6 +673,7 @@ Other options:\n\
 ", stdout); /* KLUDGE */ fprintf(stdout, "\
 -f, --file [HOSTNAME:]F        use archive file or device F (default %s)\n",
                                 DEF_AR_FILE); fputs("\
+--force-local          archive file is local even if has a colon\n\
 -F, --info-script F    run script at end of each tape (implies -M)\n\
 -G, --incremental      create/list/extract old GNU-format incremental backup\n\
 -g, --listed-incremental F create/list/extract new GNU-format incremental backup\n\
@@ -675,7 +701,7 @@ Other options:\n\
 --remove-files         remove files after adding them to the archive\n\
 -s, --same-order,\n\
     --preserve-order   list of names to extract is sorted to match archive\n\
---same-order           create extracted files with the same ownership \n\
+--same-owner           create extracted files with the same ownership \n\
 -S, --sparse           handle sparse files efficiently\n\
 -T, --files-from F     get names to extract or create from file F\n\
 --null                 -T reads null-terminated names, disable -C\n\
This page took 0.025509 seconds and 4 git commands to generate.