Lines Matching refs:header
176 * the header). The checksum field must be filled with blanks for the
187 /* Now write the header out to disk */
207 struct tar_header_t header;
214 memset(&header, 0, sizeof(header));
215 strcpy(header.name, "././@LongLink");
216 memcpy(header.mode, prefilled.mode, sizeof(prefilled));
217 PUT_OCTAL(header.size, size);
218 header.typeflag = type;
219 chksum_and_xwrite(fd, &header);
228 memset(&header, 0, size);
229 xwrite(fd, &header, size);
233 /* Write out a tar header for the specified file/directory/whatever */
237 struct tar_header_t header;
239 memset(&header, 0, sizeof(header));
241 strncpy(header.name, header_name, sizeof(header.name));
244 PUT_OCTAL(header.mode, statbuf->st_mode & 07777);
245 PUT_OCTAL(header.uid, statbuf->st_uid);
246 PUT_OCTAL(header.gid, statbuf->st_gid);
247 memset(header.size, '0', sizeof(header.size)-1); /* Regular file size is handled later */
248 PUT_OCTAL(header.mtime, statbuf->st_mtime);
251 safe_strncpy(header.uname, get_cached_username(statbuf->st_uid), sizeof(header.uname));
252 safe_strncpy(header.gname, get_cached_groupname(statbuf->st_gid), sizeof(header.gname));
256 header.typeflag = LNKTYPE;
257 strncpy(header.linkname, tbInfo->hlInfo->name,
258 sizeof(header.linkname));
261 if (header.linkname[sizeof(header.linkname)-1])
269 header.typeflag = SYMTYPE;
270 strncpy(header.linkname, lpath, sizeof(header.linkname));
273 if (header.linkname[sizeof(header.linkname)-1])
277 if (header.linkname[sizeof(header.linkname)-1]) {
285 header.typeflag = DIRTYPE;
287 if (!header.name[sizeof(header.name)-1])
288 header.name[strlen(header.name)] = '/';
290 header.typeflag = CHRTYPE;
291 PUT_OCTAL(header.devmajor, major(statbuf->st_rdev));
292 PUT_OCTAL(header.devminor, minor(statbuf->st_rdev));
294 header.typeflag = BLKTYPE;
295 PUT_OCTAL(header.devmajor, major(statbuf->st_rdev));
296 PUT_OCTAL(header.devminor, minor(statbuf->st_rdev));
298 header.typeflag = FIFOTYPE;
307 header.typeflag = REGTYPE;
308 PUT_OCTAL(header.size, statbuf->st_size);
317 if (header.name[sizeof(header.name)-1])
322 /* Now write the header out to disk */
323 chksum_and_xwrite(tbInfo->tarFd, &header);
457 /* We record size into header first, */
461 /* or even seeks back and updates header */
846 /* use numeric uid/gid from tar header, not textual */