source: MondoRescue/trunk/mondo/mondo/mondorestore/mondo-rstr-compare.c@ 688

Last change on this file since 688 was 688, checked in by bcornec, 18 years ago

Huge memory management patch.
Still not finished but a lot as been done.
What remains is around some functions returning strings, and some structure members.
(Could not finish due to laptop failure !)

  • Property svn:keywords set to Id
File size: 20.2 KB
Line 
1/***************************************************************************
2 * $Id: mondo-rstr-compare.c 688 2006-07-17 13:44:46Z bcornec $ - compares mondoarchive data
3**/
4
5
6#include "../common/my-stuff.h"
7#include "../common/mondostructures.h"
8#include "../common/libmondo.h"
9#include "mr-externs.h"
10#include "mondo-rstr-compare.h"
11#include "mondo-restore-EXT.h"
12#include "mondo-rstr-tools-EXT.h"
13#ifndef S_SPLINT_S
14#include <pthread.h>
15#endif
16
17void popup_changelist_from_file(char *);
18
19
20/**
21 * @addtogroup LLcompareGroup
22 * @{
23 */
24/**
25 * Compare biggiefile number @p bigfileno with the filesystem mounted on @p MNT_RESTORING.
26 * @param bkpinfo The backup information structure. Only used in insist_on_this_cd_number().
27 * @param bigfileno The biggiefile number (starting from 0) to compare.
28 * @note This function uses an MD5 checksum.
29 */
30int compare_a_biggiefile(struct s_bkpinfo *bkpinfo, long bigfileno)
31{
32
33 FILE *fin;
34 FILE *fout;
35
36 /** needs malloc *******/
37 char *checksum = NULL;
38 char *original_cksum = NULL;
39 char *bigfile_fname = NULL;
40 char *tmp = NULL;
41 char *tmp1 = NULL;
42 char *command = NULL;
43
44 char *p = NULL;
45 int i = 0;
46 int n = 0;
47 int retval = 0;
48
49 struct s_filename_and_lstat_info biggiestruct;
50
51 assert(bkpinfo != NULL);
52
53 tmp1 = slice_fname(bigfileno, 0, ARCHIVES_PATH, "");
54 if (!does_file_exist(tmp1)) {
55 if (does_file_exist(MNT_CDROM "/archives/NOT-THE-LAST")) {
56 insist_on_this_cd_number(bkpinfo, (++g_current_media_number));
57 } else {
58 log_msg(2, "No CD's left. No biggiefiles left. No problem.");
59 return (0);
60 }
61 }
62 if (!(fin = fopen(tmp1, "r"))) {
63 asprintf(&tmp, _("Cannot open bigfile %ld (%s)'s info file"),
64 bigfileno + 1, tmp);
65 log_to_screen(tmp);
66 paranoid_free(tmp);
67 paranoid_free(tmp1);
68 return (1);
69 }
70 fread((void *) &biggiestruct, 1, sizeof(biggiestruct), fin);
71 paranoid_fclose(fin);
72
73 asprintf(&checksum, biggiestruct.checksum);
74 asprintf(&bigfile_fname, biggiestruct.filename);
75
76 log_msg(2, "biggiestruct.filename = %s", bigfile_fname);
77 log_msg(2, "biggiestruct.checksum = %s", checksum);
78
79 if (!g_text_mode) {
80 asprintf(&tmp, _("Comparing %s"), bigfile_fname);
81 newtDrawRootText(0, 22, tmp);
82 newtRefresh();
83 paranoid_free(tmp);
84 }
85 /* BERLIOS: Useless ?
86 if (!checksum[0]) {
87 log_msg(2, "Warning - %s has no checksum", bigfile_fname_ptr);
88 } */
89 if (!strncmp(bigfile_fname, "/dev/", 5)) {
90 log_msg(2, _("Ignoring device %s"), bigfile_fname);
91 return(0);
92 } else {
93 asprintf(&command,
94 "md5sum \"%s%s\" > /tmp/md5sum.txt 2> /tmp/errors.txt",
95 MNT_RESTORING, bigfile_fname);
96 }
97 log_msg(2, command);
98 paranoid_system("cat /tmp/errors >> /tmp/mondo-restore.log 2> /dev/null");
99 if (system(command)) {
100 log_OS_error("Warning - command failed");
101 paranoid_free(command);
102 paranoid_free(bigfile_fname);
103 return (1);
104 } else {
105 paranoid_free(command);
106 if (!(fin = fopen("/tmp/md5sum.txt", "r"))) {
107 log_msg(2, "Unable to open /tmp/md5sum.txt; can't get live checksum");
108 paranoid_free(bigfile_fname);
109 return (1);
110 } else {
111 getline(&original_cksum, &n, fin);
112 paranoid_fclose(fin);
113 for (i = strlen(original_cksum);
114 i > 0 && original_cksum[i - 1] < 32; i--);
115 original_cksum[i] = '\0';
116 p = (char *) strchr(original_cksum, ' ');
117 if (p) {
118 *p = '\0';
119 }
120 }
121 }
122 if (!strcmp(checksum, original_cksum) != 0) {
123 log_msg(1, "bigfile #%ld ('%s') ... OK", bigfileno + 1, bigfile_fname);
124 } else {
125 log_msg(1, "bigfile #%ld ('%s') ... changed", bigfileno + 1, bigfile_fname);
126 retval++;
127 }
128 paranoid_free(original_cksum);
129 paranoid_free(checksum);
130
131 if (retval) {
132 if (!(fout = fopen("/tmp/changed.txt", "a"))) {
133 fatal_error("Cannot openout changed.txt");
134 }
135 fprintf(fout, "%s\n", bigfile_fname);
136 paranoid_fclose(fout);
137 }
138 paranoid_free(bigfile_fname);
139
140 return (retval);
141}
142
143/**************************************************************************
144 *END_COMPARE_A_BIGGIEFILE *
145 **************************************************************************/
146
147
148/**
149 * Compare all biggiefiles in the backup.
150 * @param bkpinfo The backup information structure. Used only in compare_a_biggiefile().
151 * @return 0 for success, nonzero for failure.
152 */
153int compare_all_biggiefiles(struct s_bkpinfo *bkpinfo)
154{
155 int retval = 0;
156 int res;
157 long noof_biggiefiles, bigfileno = 0;
158 char *tmp;
159
160 assert(bkpinfo != NULL);
161 log_msg(1, "Comparing biggiefiles");
162
163 if (length_of_file(BIGGIELIST) < 6) {
164 log_msg(1,
165 "OK, really teeny-tiny biggielist; not comparing biggiefiles");
166 return (0);
167 }
168 noof_biggiefiles = count_lines_in_file(BIGGIELIST);
169 if (noof_biggiefiles <= 0) {
170 log_msg(1, "OK, no biggiefiles; not comparing biggiefiles");
171 return (0);
172 }
173 mvaddstr_and_log_it(g_currentY, 0,
174 _
175 ("Comparing large files "));
176 open_progress_form(_("Comparing large files"),
177 _("I am now comparing the large files"),
178 _("against the filesystem. Please wait."), "",
179 noof_biggiefiles);
180 for (bigfileno = 0; bigfileno < noof_biggiefiles; bigfileno++) {
181 asprintf(&tmp, "Comparing big file #%ld", bigfileno + 1);
182 log_msg(1, tmp);
183 update_progress_form(tmp);
184 paranoid_free(tmp);
185 res = compare_a_biggiefile(bkpinfo, bigfileno);
186 retval += res;
187 g_current_progress++;
188 }
189 close_progress_form();
190 /* BERLIOS: useless ?
191 return (0);
192 */
193 if (retval) {
194 mvaddstr_and_log_it(g_currentY++, 74, _("Errors."));
195 } else {
196 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
197 }
198 return (retval);
199}
200
201/**************************************************************************
202 *END_COMPARE_ALL_BIGGIEFILES *
203 **************************************************************************/
204
205
206/**
207 * Compare afioball @p tarball_fname against the filesystem.
208 * You must be chdir()ed to the directory where the filesystem is mounted
209 * before you call this function.
210 * @param tarball_fname The filename of the tarball to compare.
211 * @param current_tarball_number The fileset number contained in @p tarball_fname.
212 * @return 0 for success, nonzero for failure.
213 */
214int compare_a_tarball(char *tarball_fname, int current_tarball_number)
215{
216 int retval = 0;
217 int res;
218 long noof_lines;
219 long archiver_errors;
220 bool use_star;
221
222 /*** needs malloc *********/
223 char *command = NULL;
224 char *tmp = NULL;
225 char *filelist_name = NULL;
226 char *logfile = NULL;
227 char *archiver_exe = NULL;
228 char *compressor_exe = NULL;
229
230 use_star = (strstr(tarball_fname, ".star")) ? TRUE : FALSE;
231 assert_string_is_neither_NULL_nor_zerolength(tarball_fname);
232 asprintf(&filelist_name, MNT_CDROM "/archives/filelist.%d",
233 current_tarball_number);
234
235 noof_lines = count_lines_in_file(filelist_name);
236 paranoid_free(filelist_name);
237
238 if (strstr(tarball_fname, ".bz2")) {
239 asprintf(&compressor_exe, "bzip2");
240 } else if (strstr(tarball_fname, ".lzo")) {
241 asprintf(&compressor_exe, "lzop");
242 } else {
243 compressor_exe = NULL;
244 }
245
246 if (use_star) {
247 asprintf(&archiver_exe, "star -bz");
248 } else {
249 asprintf(&archiver_exe, "afio");
250 }
251
252 if (compressor_exe != NULL) {
253 if (!find_home_of_exe(compressor_exe)) {
254 fatal_error("(compare_a_tarball) Compression program missing");
255 }
256 if (use_star) {
257 if (strcmp(compressor_exe, "bzip2")) {
258 fatal_error
259 ("(compare_a_tarball) Please use only bzip2 with star");
260 }
261 } else {
262 asprintf(&tmp, compressor_exe);
263 sprintf(compressor_exe, "-P %s -Z", tmp);
264 paranoid_free(tmp);
265 }
266 }
267// star -diff H=star -bz file=....
268
269#ifdef __FreeBSD__
270#define BUFSIZE 512L
271#else
272#define BUFSIZE (1024L*1024L)/TAPE_BLOCK_SIZE
273#endif
274
275 asprintf(&logfile, "/tmp/afio.log.%d", current_tarball_number);
276 if (use_star) // doesn't use compressor_exe
277 {
278 asprintf(&command,
279 "%s -diff H=star file=%s >> %s 2>> %s",
280 archiver_exe, tarball_fname, logfile, logfile);
281 } else {
282 asprintf(&command,
283 "%s -r -b %ld -M 16m -c %ld %s %s >> %s 2>> %s",
284 archiver_exe,
285 TAPE_BLOCK_SIZE,
286 BUFSIZE, compressor_exe, tarball_fname, logfile, logfile);
287 }
288#undef BUFSIZE
289 paranoid_free(archiver_exe);
290 paranoid_free(compressor_exe);
291
292 res = system(command);
293 retval += res;
294 if (res) {
295 log_OS_error(command);
296 }
297 if (length_of_file(logfile) > 5) {
298 sprintf(command,
299 "sed s/': \\\"'/\\|/ %s | sed s/'\\\": '/\\|/ | cut -d'|' -f2 | sort -u | grep -vx \"dev/.*\" >> /tmp/changed.txt",
300 logfile);
301 system(command);
302 archiver_errors = count_lines_in_file(logfile);
303 } else {
304 archiver_errors = 0;
305 }
306 paranoid_free(command);
307
308 if (archiver_errors) {
309 asprintf(&tmp,
310 "Differences found while processing fileset #%d ",
311 current_tarball_number);
312 log_msg(1, tmp);
313 paranoid_free(tmp);
314 }
315 unlink(logfile);
316 paranoid_free(logfile);
317 return (retval);
318}
319
320/**************************************************************************
321 *END_COMPARE_A_TARBALL *
322 **************************************************************************/
323
324
325/**
326 * Compare all afioballs in this backup.
327 * @param bkpinfo The backup media structure. Passed to other functions.
328 * @return 0 for success, nonzero for failure.
329 */
330int compare_all_tarballs(struct s_bkpinfo *bkpinfo)
331{
332 int retval = 0;
333 int res;
334 int current_tarball_number = 0;
335
336 /** needs malloc **********/
337
338 char *tarball_fname = NULL;
339 char *progress_str = NULL;
340 char *tmp = NULL;
341 long max_val;
342
343 assert(bkpinfo != NULL);
344 mvaddstr_and_log_it(g_currentY, 0, _("Comparing archives"));
345 read_cfg_var(g_mondo_cfg_file, "last-filelist-number", tmp);
346
347 max_val = atol(tmp);
348 paranoid_free(tmp);
349
350 asprintf(&progress_str, _("Comparing with %s #%d "),
351 media_descriptor_string(bkpinfo->backup_media_type),
352 g_current_media_number);
353
354 open_progress_form(_("Comparing files"),
355 _("Comparing tarballs against filesystem."),
356 _("Please wait. This may take some time."),
357 progress_str, max_val);
358
359 log_to_screen(progress_str);
360
361 for (;;) {
362 insist_on_this_cd_number(bkpinfo, g_current_media_number);
363 update_progress_form(progress_str);
364 asprintf(&tarball_fname,
365 MNT_CDROM "/archives/%d.afio.bz2", current_tarball_number);
366
367 if (!does_file_exist(tarball_fname)) {
368 paranoid_free(tarball_fname);
369 asprintf(&tarball_fname, MNT_CDROM "/archives/%d.afio.lzo",
370 current_tarball_number);
371 }
372 if (!does_file_exist(tarball_fname)) {
373 paranoid_free(tarball_fname);
374 asprintf(&tarball_fname, MNT_CDROM "/archives/%d.afio.",
375 current_tarball_number);
376 }
377 if (!does_file_exist(tarball_fname)) {
378 paranoid_free(tarball_fname);
379 asprintf(&tarball_fname, MNT_CDROM "/archives/%d.star.bz2",
380 current_tarball_number);
381 }
382 if (!does_file_exist(tarball_fname)) {
383 paranoid_free(tarball_fname);
384 asprintf(&tarball_fname, MNT_CDROM "/archives/%d.star.",
385 current_tarball_number);
386 }
387 if (!does_file_exist(tarball_fname)) {
388 if (!does_file_exist(MNT_CDROM "/archives/NOT-THE-LAST") ||
389 system("find " MNT_CDROM
390 "/archives/slice* > /dev/null 2> /dev/null")
391 == 0) {
392 log_msg(2, "OK, I think I'm done with tarballs...");
393 paranoid_free(tarball_fname);
394 break;
395 }
396 log_msg(2, "OK, I think it's time for another CD...");
397 g_current_media_number++;
398 paranoid_free(progress_str);
399 asprintf(&progress_str, _("Comparing with %s #%d "),
400 media_descriptor_string(bkpinfo->backup_media_type),
401 g_current_media_number);
402 log_to_screen(progress_str);
403 } else {
404 res = compare_a_tarball(tarball_fname, current_tarball_number);
405 paranoid_free(tarball_fname);
406
407 g_current_progress++;
408 current_tarball_number++;
409 }
410 }
411 paranoid_free(progress_str);
412 close_progress_form();
413
414 if (retval) {
415 mvaddstr_and_log_it(g_currentY++, 74, _("Errors."));
416 } else {
417 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
418 }
419 return (retval);
420}
421
422/**************************************************************************
423 *END_COMPARE_ALL_TARBALLS *
424 **************************************************************************/
425
426/* @} - end LLcompareGroup */
427
428
429/**
430 * @addtogroup compareGroup
431 * @{
432 */
433/**
434 * Compare all data on a CD-R/CD-RW/DVD/ISO/NFS-based backup.
435 * @param bkpinfo The backup information structure. Passed to other functions.
436 * @return 0 for success, nonzero for failure.
437 */
438int compare_to_CD(struct s_bkpinfo *bkpinfo)
439{
440 /** needs malloc *********/
441 char *tmp = NULL;
442 char *cwd = NULL;
443 char *new = NULL;
444 char *command = NULL;
445 int resA = 0;
446 int resB = 0;
447 long noof_changed_files;
448
449 malloc_string(cwd);
450 malloc_string(new);
451
452 assert(bkpinfo != NULL);
453
454 getcwd(cwd, MAX_STR_LEN - 1);
455 chdir(bkpinfo->restore_path);
456 getcwd(new, MAX_STR_LEN - 1);
457 insist_on_this_cd_number(bkpinfo, g_current_media_number);
458 unlink("/tmp/changed.txt");
459
460 resA = compare_all_tarballs(bkpinfo);
461 resB = compare_all_biggiefiles(bkpinfo);
462 chdir(cwd);
463 noof_changed_files = count_lines_in_file("/tmp/changed.txt");
464 if (noof_changed_files) {
465 asprintf(&tmp, _("%ld files do not match the backup "),
466 noof_changed_files);
467 // mvaddstr_and_log_it( g_currentY++, 0, tmp );
468 log_to_screen(tmp);
469 paranoid_free(tmp);
470
471 asprintf(&command, "cat /tmp/changed.txt >> %s", MONDO_LOGFILE);
472 paranoid_system(command);
473 paranoid_free(command);
474 } else {
475 asprintf(&tmp, _("All files match the backup "));
476 mvaddstr_and_log_it(g_currentY++, 0, tmp);
477 log_to_screen(tmp);
478 paranoid_free(tmp);
479 }
480
481 paranoid_free(cwd);
482 paranoid_free(new);
483
484 return (resA + resB);
485}
486
487/**************************************************************************
488 *END_COMPARE_TO_CD *
489 **************************************************************************/
490
491
492/**
493 * Compare all data in the user's backup.
494 * This function will mount filesystems, compare afioballs and biggiefiles,
495 * and show the user the differences.
496 * @param bkpinfo The backup information structure. Passed to other functions.
497 * @param mountlist The mountlist containing partitions to mount.
498 * @param raidlist The raidlist containing the user's RAID devices.
499 * @return The number of errors/differences found.
500 */
501int
502compare_mode(struct s_bkpinfo *bkpinfo,
503 struct mountlist_itself *mountlist,
504 struct raidlist_itself *raidlist)
505{
506 int retval = 0;
507 long q;
508 char *tmp;
509
510 /**************************************************************************
511 * also deletes tmp/filelist.full & tmp/biggielist.txt _and_ tries to *
512 * restore them from start of tape, if available *
513 **************************************************************************/
514 assert(bkpinfo != NULL);
515 assert(mountlist != NULL);
516 assert(raidlist != NULL);
517
518 while (get_cfg_file_from_archive(bkpinfo)) {
519 if (!ask_me_yes_or_no
520 (_
521 ("Failed to find config file/archives. Choose another source?")))
522 {
523 fatal_error("Unable to find config file/archives. Aborting.");
524 }
525 interactively_obtain_media_parameters_from_user(bkpinfo, FALSE);
526 }
527
528 read_cfg_file_into_bkpinfo(g_mondo_cfg_file, bkpinfo);
529 g_current_media_number = 1;
530 mvaddstr_and_log_it(1, 30, _("Comparing Automatically"));
531 iamhere("Pre-MAD");
532 retval = mount_all_devices(mountlist, FALSE);
533 iamhere("Post-MAD");
534 if (retval) {
535 unmount_all_devices(mountlist);
536 return (retval);
537 }
538 if (bkpinfo->backup_media_type == tape
539 || bkpinfo->backup_media_type == udev) {
540 retval += compare_to_tape(bkpinfo);
541 } else if (bkpinfo->backup_media_type == cdstream) {
542 retval += compare_to_cdstream(bkpinfo);
543 } else {
544 retval += compare_to_CD(bkpinfo);
545 }
546 if (retval) {
547 mvaddstr_and_log_it(g_currentY++,
548 0,
549 _
550 ("Warning - differences found during the compare phase"));
551 }
552
553 retval += unmount_all_devices(mountlist);
554
555 if (count_lines_in_file("/tmp/changed.txt") > 0) {
556 mvaddstr_and_log_it(g_currentY++, 0,
557 _
558 ("Differences found while files were being compared."));
559 streamline_changes_file("/tmp/changed.files", "/tmp/changed.txt");
560 if (count_lines_in_file("/tmp/changed.files") <= 0) {
561 mvaddstr_and_log_it(g_currentY++, 0,
562 _
563 ("...but they were logfiles and temporary files. Your archives are fine."));
564 log_to_screen(_
565 ("The differences were logfiles and temporary files. Your archives are fine."));
566 } else {
567 q = count_lines_in_file("/tmp/changed.files");
568 asprintf(&tmp, _("%ld significant difference%s found."), q,
569 (q != 1) ? "s" : "");
570 mvaddstr_and_log_it(g_currentY++, 0, tmp);
571 log_to_screen(tmp);
572 paranoid_free(tmp);
573
574 asprintf(&tmp,
575 _("Type 'less /tmp/changed.files' for a list of non-matching files"));
576 mvaddstr_and_log_it(g_currentY++, 0, tmp);
577 log_to_screen(tmp);
578 paranoid_free(tmp);
579
580 log_msg(2, "calling popup_changelist_from_file()");
581 popup_changelist_from_file("/tmp/changed.files");
582 log_msg(2, "Returning from popup_changelist_from_file()");
583 }
584 } else {
585 log_to_screen
586 (_
587 ("No significant differences were found. Your backup is perfect."));
588 }
589 kill_petris();
590 return (retval);
591}
592
593/**************************************************************************
594 *END_COMPARE_MODE *
595 **************************************************************************/
596
597
598/**
599 * Compare all data on a cdstream-based backup.
600 * @param bkpinfo The backup information structure. Fields used:
601 * - @c bkpinfo->disaster_recovery
602 * - @c bkpinfo->media_device
603 * - @c bkpinfo->restore_path
604 * @return 0 for success, nonzero for failure.
605 */
606int compare_to_cdstream(struct s_bkpinfo *bkpinfo)
607{
608 int res;
609
610 char *dir = NULL;
611 char *command = NULL;
612
613 assert(bkpinfo != NULL);
614 /** needs malloc **/
615 malloc_string(dir);
616 getcwd(dir, MAX_STR_LEN);
617 chdir(bkpinfo->restore_path);
618
619 asprintf(&command, "cp -f /tmp/LAST-FILELIST-NUMBER %s/tmp",
620 bkpinfo->restore_path);
621 run_program_and_log_output(command, FALSE);
622 paranoid_free(command);
623 mvaddstr_and_log_it(g_currentY,
624 0, _("Verifying archives against filesystem"));
625
626 if (bkpinfo->disaster_recovery
627 && does_file_exist("/tmp/CDROM-LIVES-HERE")) {
628 paranoid_free(bkpinfo->media_device);
629 // last_line_of_file allocates the string
630 bkpinfo->media_device = last_line_of_file("/tmp/CDROM-LIVES-HERE");
631 } else {
632 paranoid_free(bkpinfo->media_device);
633 // find_cdrom_device allocates the string
634 bkpinfo->media_device = find_cdrom_device(FALSE);
635 }
636 res = verify_tape_backups(bkpinfo);
637 chdir(dir);
638 if (length_of_file("/tmp/changed.txt") > 2
639 && length_of_file("/tmp/changed.files") > 2) {
640 log_msg(0,
641 "Type 'less /tmp/changed.files' to see which files don't match the archives");
642 log_msg(2, "Calling popup_changelist_from_file()");
643 popup_changelist_from_file("/tmp/changed.files");
644 log_msg(2, "Returned from popup_changelist_from_file()");
645 }
646
647 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
648 paranoid_free(dir);
649 return (res);
650}
651
652/**************************************************************************
653 *END_COMPARE_CD_STREAM *
654 **************************************************************************/
655
656
657/**
658 * Compare all data on a tape-based backup.
659 * @param bkpinfo The backup information structure. Field used: @c bkpinfo->restore_path.
660 * @return 0 for success, nonzero for failure.
661 */
662/**************************************************************************
663 * F@COMPARE_TO_TAPE() *
664 * compare_to_tape() - gots me?? *
665 * *
666 * returns: int *
667 **************************************************************************/
668int compare_to_tape(struct s_bkpinfo *bkpinfo)
669{
670 int res;
671 char *dir = NULL;
672 char *command = NULL;
673
674 assert(bkpinfo != NULL);
675 malloc_string(dir);
676
677 getcwd(dir, MAX_STR_LEN);
678 chdir(bkpinfo->restore_path);
679 asprintf(&command, "cp -f /tmp/LAST-FILELIST-NUMBER %s/tmp",
680 bkpinfo->restore_path);
681 run_program_and_log_output(command, FALSE);
682 paranoid_free(command);
683
684 mvaddstr_and_log_it(g_currentY,
685 0, _("Verifying archives against filesystem"));
686 res = verify_tape_backups(bkpinfo);
687 chdir(dir);
688 if (res) {
689 mvaddstr_and_log_it(g_currentY++, 74, _("Failed."));
690 } else {
691 mvaddstr_and_log_it(g_currentY++, 74, _("Done."));
692 }
693 paranoid_free(dir);
694 return (res);
695}
696
697/**************************************************************************
698 *END_COMPARE_TO_TAPE *
699 **************************************************************************/
700
701/* @} - end compareGroup */
Note: See TracBrowser for help on using the repository browser.