diff options
Diffstat (limited to 'sysutils/amanda-server/patches/patch-an')
-rw-r--r-- | sysutils/amanda-server/patches/patch-an | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/sysutils/amanda-server/patches/patch-an b/sysutils/amanda-server/patches/patch-an deleted file mode 100644 index 74e414ed008..00000000000 --- a/sysutils/amanda-server/patches/patch-an +++ /dev/null @@ -1,78 +0,0 @@ -$NetBSD: patch-an,v 1.1 2007/01/05 13:20:54 obache Exp $ - -Prevent amverify from looping forever. Patch provided by Jean-Louis -Martineau on amanda-users: -http://groups.yahoo.com/group/amanda-users/message/55099 - ---- restore-src/amrestore.c.orig 2003-02-10 15:22:11.000000000 +0000 -+++ restore-src/amrestore.c -@@ -482,6 +482,7 @@ char **argv; - char *e; - char *err; - char *label = NULL; -+ int count_error; - - for(fd = 3; fd < FD_SETSIZE; fd++) { - /* -@@ -667,25 +668,29 @@ char **argv; - get_pname()); - } - -- while(file.type == F_TAPESTART || file.type == F_DUMPFILE) { -- amfree(filename); -- filename = make_filename(&file); -+ count_error=0; -+ while(count_error < 10) { -+ if(file.type == F_TAPEEND) break; - found_match = 0; -- for(me = match_list; me; me = me->next) { -- if(disk_match(&file,me->datestamp,me->hostname,me->diskname) != 0) { -- found_match = 1; -- break; -+ if(file.type == F_DUMPFILE) { -+ amfree(filename); -+ filename = make_filename(&file); -+ for(me = match_list; me; me = me->next) { -+ if(disk_match(&file,me->datestamp,me->hostname,me->diskname) != 0) { -+ found_match = 1; -+ break; -+ } -+ } -+ fprintf(stderr, "%s: %3d: %s ", -+ get_pname(), -+ file_number, -+ found_match ? "restoring" : "skipping"); -+ if(file.type != F_DUMPFILE) { -+ print_header(stderr, &file); -+ } else { -+ fprintf(stderr, "%s\n", filename); - } - } -- fprintf(stderr, "%s: %3d: %s ", -- get_pname(), -- file_number, -- found_match ? "restoring" : "skipping"); -- if(file.type != F_DUMPFILE) { -- print_header(stderr, &file); -- } else { -- fprintf(stderr, "%s\n", filename); -- } - if(found_match) { - restore(&file, filename, isafile); - if(compress_pid > 0) { -@@ -718,6 +723,7 @@ char **argv; - if((tapedev = tape_open(tapename, 0)) < 0) { - error("could not open %s: %s", tapename, strerror(errno)); - } -+ count_error++; - } else { - /* - * If the last read got something (even an error), we can -@@ -726,6 +732,7 @@ char **argv; - if(tapefd_fsf(tapedev, 1) < 0) { - error("could not fsf %s: %s", tapename, strerror(errno)); - } -+ count_error=0; - } - file_number++; - read_file_header(&file, isafile); |