X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Ffileheader.c;h=9d18d8cf1d30fc246f1880e1ea836c0f16a629db;hb=d3b2175e084f88c8736ad7073eacbf4670147aec;hp=f6786a891cb128ee7ab5dbb01f9c94167ac30b2b;hpb=34197d9f46a5f4e944378cbb65fca32ee0eec7b9;p=debian%2Famanda diff --git a/common-src/fileheader.c b/common-src/fileheader.c index f6786a8..9d18d8c 100644 --- a/common-src/fileheader.c +++ b/common-src/fileheader.c @@ -383,7 +383,7 @@ parse_file_header( line += SIZEOF(SC) - 1; strncpy(file->cont_filename, line, SIZEOF(file->cont_filename) - 1); - continue; + continue; } #undef SC @@ -394,6 +394,14 @@ parse_file_header( continue; } #undef SC +#define SC "DUMPER=" + if (strncmp(line, SC, SIZEOF(SC) - 1) == 0) { + line += SIZEOF(SC) - 1; + strncpy(file->dumper, line, + SIZEOF(file->dumper) - 1); + continue; + } +#undef SC #define SC "To restore, position tape at start of file and run:" if (strncmp(line, SC, SIZEOF(SC) - 1) == 0) @@ -479,6 +487,7 @@ dump_dumpfile_t( dbprintf(("%s: name = '%s'\n", pname, file->name)); dbprintf(("%s: disk = '%s'\n", pname, file->disk)); dbprintf(("%s: program = '%s'\n", pname, file->program)); + dbprintf(("%s: dumper = '%s'\n", pname, file->dumper)); dbprintf(("%s: srvcompprog = '%s'\n", pname, file->srvcompprog)); dbprintf(("%s: clntcompprog = '%s'\n", pname, @@ -602,7 +611,7 @@ build_header( buflen -= n; n = 0; } - + if (strcmp(file->encrypt_suffix, "enc") == 0) { /* only output crypt if it's enabled */ n = snprintf(buffer, buflen, " crypt %s", file->encrypt_suffix); } @@ -658,6 +667,11 @@ build_header( buffer += n; buflen -= n; } + if (file->dumper[0] != '\0') { + n = snprintf(buffer, buflen, "DUMPER=%s\n", file->dumper); + buffer += n; + buflen -= n; + } if (file->is_partial != 0) { n = snprintf(buffer, buflen, "PARTIAL=YES\n"); buffer += n;