X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=common-src%2Ffileheader-test.c;h=225990547936b3afd9b17fb3fde2fd1853655664;hb=HEAD;hp=f2b26649ec28462450e895119793a355c806616e;hpb=fd48f3e498442f0cbff5f3606c7c403d0566150e;p=debian%2Famanda diff --git a/common-src/fileheader-test.c b/common-src/fileheader-test.c index f2b2664..2259905 100644 --- a/common-src/fileheader-test.c +++ b/common-src/fileheader-test.c @@ -1,9 +1,10 @@ /* - * Copyright (c) 2010 Zmanda Inc. All Rights Reserved. + * Copyright (c) 2010-2012 Zmanda Inc. All Rights Reserved. * - * This library is free software; you can redistribute it and/or modify it - * under the terms of the GNU Lesser General Public License version 2.1 as - * published by the Free Software Foundation. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -70,6 +71,10 @@ rt_partnum(dumpfile_t *hdr) hdr->partnum = 2; hdr->totalparts = -1; if (!PREV_RT(hdr)) return 0; + } else if (hdr->type == F_DUMPFILE) { + hdr->partnum = 1; + hdr->totalparts = 1; + if (!PREV_RT(hdr)) return 0; } else { hdr->partnum = 0; hdr->totalparts = 0; @@ -371,7 +376,7 @@ rt_type(dumpfile_t *hdr) } /* one function for each field; each fn calls the one above */ -static int +static gboolean test_roundtrip(void) { int rv; @@ -384,7 +389,7 @@ test_roundtrip(void) rv = PREV_RT(&hdr); tu_dbg("%d round-trips run\n", n_round_trips); - return rv; + return (rv) ? TRUE : FALSE; } /* doc