Fix minor diagnostic discrepancies in incrementals
* src/incremen.c (read_directory_file, get_gnu_dumpdir): Be more consistent about fatal errors.
This commit is contained in:
@@ -1349,16 +1349,17 @@ read_directory_file (void)
|
|||||||
{
|
{
|
||||||
ebuf = buf + sizeof PACKAGE_NAME - 1;
|
ebuf = buf + sizeof PACKAGE_NAME - 1;
|
||||||
if (*ebuf++ != '-')
|
if (*ebuf++ != '-')
|
||||||
ERROR((1, 0, _("Bad incremental file format")));
|
FATAL_ERROR ((0, 0, _("Bad incremental file format")));
|
||||||
for (; *ebuf != '-'; ebuf++)
|
for (; *ebuf != '-'; ebuf++)
|
||||||
if (!*ebuf)
|
if (!*ebuf)
|
||||||
ERROR((1, 0, _("Bad incremental file format")));
|
FATAL_ERROR ((0, 0, _("Bad incremental file format")));
|
||||||
|
|
||||||
ebuf++;
|
ebuf++;
|
||||||
if (! ('0' <= *ebuf && *ebuf <= '0' + TAR_INCREMENTAL_VERSION
|
if (! ('0' <= *ebuf && *ebuf <= '0' + TAR_INCREMENTAL_VERSION
|
||||||
&& !c_isdigit (ebuf[1])))
|
&& !c_isdigit (ebuf[1])))
|
||||||
ERROR ((1, 0, _("Unsupported incremental format version: %s"),
|
FATAL_ERROR ((0, 0,
|
||||||
ebuf));
|
_("Unsupported incremental format version: %s"),
|
||||||
|
ebuf));
|
||||||
incremental_version = *ebuf - '0';
|
incremental_version = *ebuf - '0';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -1482,7 +1483,7 @@ get_gnu_dumpdir (struct tar_stat_info *stat_info)
|
|||||||
mv_size_left (size);
|
mv_size_left (size);
|
||||||
data_block = find_next_block ();
|
data_block = find_next_block ();
|
||||||
if (!data_block)
|
if (!data_block)
|
||||||
ERROR ((1, 0, _("Unexpected EOF in archive")));
|
FATAL_ERROR ((0, 0, _("Unexpected EOF in archive")));
|
||||||
copied = available_space_after (data_block);
|
copied = available_space_after (data_block);
|
||||||
if (copied > size)
|
if (copied > size)
|
||||||
copied = size;
|
copied = size;
|
||||||
|
|||||||
Reference in New Issue
Block a user