&& !S_ISDIR (hstat.st_mode)
&& (f_new_files > 1 || new_time > hstat.st_ctime))
{
- if (curdev < 0)
+ if (curdev == -1)
{
msg ("%s: is unchanged; not dumped", p);
}
/* sum += i;
if (sum < upperbound)
goto extend;*/
- if (index_offset + i < upperbound)
+ if (index_offset + i <= upperbound)
{
index_offset += i;
exhdr->ext_hdr.isextended++;
* realloc the scratch area, since we've run out of room --
*/
sparsearray = (struct sp_array *)
- realloc (sparsearray,
+ ck_realloc (sparsearray,
2 * sp_array_size * (sizeof (struct sp_array)));
sp_array_size *= 2;
}
}
if (amidst_data)
sparsearray[sparse_ind++].numbytes = numbytes;
+ else
+ {
+ sparsearray[sparse_ind].offset = offset-1;
+ sparsearray[sparse_ind++].numbytes = 1;
+ }
close (fd);
return sparse_ind - 1;
strncpy (header->header.arch_name, name, NAMSIZ);
header->header.arch_name[NAMSIZ - 1] = '\0';
- to_oct ((long) (st->st_mode & 07777),
+ to_oct ((long) (f_oldarch ? (st->st_mode & 07777) : st->st_mode),
8, header->header.mode);
to_oct ((long) st->st_uid, 8, header->header.uid);
to_oct ((long) st->st_gid, 8, header->header.gid);