X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=server-src%2Ftapefile.c;h=8e4400bf4a9d49a9a99933661fd80c2bf3c26317;hb=refs%2Ftags%2Fupstream%2F3.3.1;hp=b4212e5894238b47bc4d49e9801938ba26f4d78e;hpb=cd0b924f27312d57bd42f6c4fae2b795139e2d0b;p=debian%2Famanda diff --git a/server-src/tapefile.c b/server-src/tapefile.c index b4212e5..8e4400b 100644 --- a/server-src/tapefile.c +++ b/server-src/tapefile.c @@ -106,6 +106,8 @@ write_tapelist( g_fprintf(tapef, " BARCODE:%s", tp->barcode); if (tp->meta) g_fprintf(tapef, " META:%s", tp->meta); + if (tp->blocksize) + g_fprintf(tapef, " BLOCKSIZE:%jd", (intmax_t)tp->blocksize); if (tp->comment) g_fprintf(tapef, " #%s", tp->comment); g_fprintf(tapef, "\n"); @@ -421,6 +423,15 @@ parse_tapeline( tp->meta = NULL; } + if (strncmp_const(s - 1, "BLOCKSIZE:") == 0) { + s1 = s - 1 + 10; + skip_non_whitespace(s, ch); + s[-1] = '\0'; + skip_whitespace(s, ch); + tp->blocksize = atol(s1); + } else { + tp->blocksize = 0; + } if (*(s - 1) == '#') { tp->comment = stralloc(s); /* skip leading '#' */ } else {