Lines Matching refs:tar
159 struct tar_header_t tar; in get_header_tar() local
187 *(aliased_uint32_t*)&tar = 0; in get_header_tar()
188 i = full_read(archive_handle->src_fd, &tar, 512); in get_header_tar()
214 xread(archive_handle->src_fd, &tar, i); in get_header_tar()
219 if (tar.name[0] == 0 && tar.prefix[0] == 0 in get_header_tar()
228 while (full_read(archive_handle->src_fd, &tar, 512) == 512) in get_header_tar()
239 if (!is_prefixed_with(tar.magic, "ustar") in get_header_tar()
241 || memcmp(tar.magic, "\0\0\0\0", 5) != 0) in get_header_tar()
263 sum_u = ' ' * sizeof(tar.chksum); in get_header_tar()
268 sum_u += ((unsigned char*)&tar)[i]; in get_header_tar()
270 sum_s += ((signed char*)&tar)[i]; in get_header_tar()
274 sum_u += ((unsigned char*)&tar)[i]; in get_header_tar()
276 sum_s += ((signed char*)&tar)[i]; in get_header_tar()
286 tar_typeflag = (uint8_t)tar.typeflag; /* save it */ in get_header_tar()
287 sum = GET_OCTAL(tar.chksum); in get_header_tar()
296 if (tar.devmajor[0]) { in get_header_tar()
297 char t = tar.prefix[0]; in get_header_tar()
299 unsigned minor = GET_OCTAL(tar.devminor); in get_header_tar()
300 unsigned major = GET_OCTAL(tar.devmajor); in get_header_tar()
302 tar.prefix[0] = t; in get_header_tar()
310 if (!p_linkname && parse_names && tar.linkname[0]) { in get_header_tar()
311 file_header->link_target = xstrndup(tar.linkname, sizeof(tar.linkname)); in get_header_tar()
316 file_header->tar__uname = tar.uname[0] ? xstrndup(tar.uname, sizeof(tar.uname)) : NULL; in get_header_tar()
317 file_header->tar__gname = tar.gname[0] ? xstrndup(tar.gname, sizeof(tar.gname)) : NULL; in get_header_tar()
319 file_header->mtime = GET_OCTAL(tar.mtime); in get_header_tar()
320 file_header->size = GET_OCTAL(tar.size); in get_header_tar()
321 file_header->gid = GET_OCTAL(tar.gid); in get_header_tar()
322 file_header->uid = GET_OCTAL(tar.uid); in get_header_tar()
324 file_header->mode = 07777 & GET_OCTAL(tar.mode); in get_header_tar()
330 tar.mode[0] = '\0'; in get_header_tar()
331 if (tar.prefix[0]) { in get_header_tar()
334 tar.padding[0] = '\0'; in get_header_tar()
335 file_header->name = concat_path_file(tar.prefix, tar.name); in get_header_tar()
337 file_header->name = xstrdup(tar.name); in get_header_tar()
435 xread(archive_handle->src_fd, &tar, 512); in get_header_tar()