Imported Upstream version 2.6.0p1
[debian/amanda] / restore-src / amrestore.c
index d9f285bce6474b4e8020d8a9a07be00a5f87a818..0e1b4b6cb4a242939aac6658d8958a0fd2c9860e 100644 (file)
@@ -98,7 +98,11 @@ static void handle_tape_restore(char * device_name, rst_flags_t * flags,
     Device * device;
     ReadLabelStatusFlags read_label_status;
 
+    dumpfile_t first_restored_file;
+
     device_api_init();
+
+    fh_init(&first_restored_file);
     
     device = device_open(device_name);
     if (device == NULL) {
@@ -128,7 +132,7 @@ static void handle_tape_restore(char * device_name, rst_flags_t * flags,
     }
 
     search_a_tape(device, stderr, flags, NULL, NULL, dumpspecs,
-                  NULL, NULL, 0, NULL);
+                  NULL, &first_restored_file, 0, NULL);
 }
 
 /*
@@ -188,19 +192,13 @@ main(
            } else if(*e == 'm' || *e == 'M') {
                rst_flags->blocksize *= 1024 * 1024;
            } else if(*e != '\0') {
-               error(_("invalid rst_flags->blocksize value \"%s\""), optarg);
+               error(_("invalid blocksize value \"%s\""), optarg);
                /*NOTREACHED*/
            }
            if(rst_flags->blocksize < DISK_BLOCK_BYTES) {
                error(_("minimum block size is %dk"), DISK_BLOCK_BYTES / 1024);
                /*NOTREACHED*/
            }
-           if(rst_flags->blocksize > MAX_TAPE_BLOCK_KB * 1024) {
-               g_fprintf(stderr,_("maximum block size is %dk, using it\n"),
-                       MAX_TAPE_BLOCK_KB);
-               rst_flags->blocksize = MAX_TAPE_BLOCK_KB * 1024;
-               /*NOTREACHED*/
-           }
            break;
        case 'c': rst_flags->compress = 1; break;
        case 'o':