Lines Matching refs:pax
24 * pax calib format
261 calib_done(Pax_t* pax, register Paxarchive_t* ap)
278 calib_getprologue(Pax_t* pax, Paxformat_t* fp, register Paxarchive_t* ap, Paxfile_t* f, unsigned char* buf, size_t size)
294 else if (paxread(pax, ap, hdr, (off_t)sizeof(hdr), (off_t)sizeof(hdr), 0) <= 0)
297 paxunread(pax, ap, hdr, sizeof(hdr));
302 paxnospace(pax);
313 if (paxseek(pax, ap, n, SEEK_SET, 1) != n)
314 (*pax->errorf)(NiL, pax, 3, "%s: %s format block header seek error", ap->name, ap->format->name);
315 if (paxread(pax, ap, blk, (off_t)sizeof(blk), (off_t)sizeof(blk), 0) <= 0)
316 (*pax->errorf)(NiL, pax, 3, "%s: %s format block header read error", ap->name, ap->format->name);
319 if (pax->test & 0x20000)
320 (*pax->errorf)(NiL, pax, 1, "blk %c%c%c%c%c%c%c%c %02x %02x %02x %02x %02x %02x %02x %02x", ccmapchr(ar->map, blk[0]), ccmapchr(ar->map, blk[1]), ccmapchr(ar->map, blk[2]), ccmapchr(ar->map, blk[3]), ccmapchr(ar->map, blk[4]), ccmapchr(ar->map, blk[5]), ccmapchr(ar->map, blk[6]), ccmapchr(ar->map, blk[7]), blk[8], blk[9], blk[10], blk[11], blk[12], blk[13], blk[14], blk[15]);
323 if (paxread(pax, ap, dir, (off_t)sizeof(dir), (off_t)sizeof(dir), 0) <= 0)
324 (*pax->errorf)(NiL, pax, 3, "%s: %s format header read error", ap->name, ap->format->name);
325 if (pax->test & 0x20000)
326 (*pax->errorf)(NiL, pax, 1, "dir %c%c%c%c%c%c%c%c %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x %02x", ccmapchr(ar->map, dir[0]), ccmapchr(ar->map, dir[1]), ccmapchr(ar->map, dir[2]), ccmapchr(ar->map, dir[3]), ccmapchr(ar->map, dir[4]), ccmapchr(ar->map, dir[5]), ccmapchr(ar->map, dir[6]), ccmapchr(ar->map, dir[7]), dir[8], dir[9], dir[10], dir[11], dir[12], dir[13], dir[14], dir[15], dir[16], dir[17], dir[18], dir[19], dir[20], dir[21]);
333 paxnospace(pax);
352 calib_done(pax, ap);
359 calib_getdata(Pax_t* pax, register Paxarchive_t* ap, register Paxfile_t* f, int wfd)
400 (*pax->errorf)(NiL, pax, 2, "%s: cannot write", f->name);
407 noted = !wfp || !pax->warn;
408 if (pax->test & 0x00200)
416 version = (pax->test & 0x00400) ? -1 : ar->version;
440 if (pax->test & 0x08000)
441 (*pax->errorf)(NiL, pax, 0, "%03d %3u %3u %5u %3u %03o %4u %4u %4u %4u %4u %4o %4o %4o %4u %4u", error_info.line, ar->count, ar->next - hdr, ar->next - ar->buffer, hdr[0], hdr[1], hdr[2], hdr[3], hdr[4], hdr[5], hdr[6], hdr[7], hdr[8], hdr[9], hdr[10], hdr[11]);
442 if (pax->test & 0x10000)
443 (*pax->errorf)(NiL, pax, 0, "%03d %3u %3u %3u %03o %04..4u %04..4u %04..4u %04..4u %04..4u %04..4u %04..4u %04..4u %04..4u %04..4u", error_info.line, ar->count, ar->next - hdr, hdr[0], hdr[1], hdr[2], hdr[3], hdr[4], hdr[5], hdr[6], hdr[7], hdr[8], hdr[9], hdr[10], hdr[11]);
444 if (pax->test & 0x20000)
445 (*pax->errorf)(NiL, pax, 0, "%03d %3d %03d:%02x:%04..4u:%03u | %03d:%02x:%04..4u:%03u %03d:%02x:%04..4u:%03u %03d:%02x:%04..4u:%03u %03d:%02x:%04..4u:%03u %03d:%02x:%04..4u:%03u %03d:%02x:%04..4u:%03u",
466 if (pax->warn)
479 (*pax->errorf)(NiL, pax, 2, "%s: overbyte (bits=%d offset=%I*u+%I*u block=%I*u)", ap->name, bits, sizeof(off_t), paxseek(pax, ap, (off_t)0, SEEK_CUR, 0) - ar->bufsize, sizeof(index), index, sizeof(block), block);
490 if (pax->test & 0x04000)
491 (*pax->errorf)(NiL, pax, 1, "part c=%d n=%d k=%d \"%-.*s\"", c, out - outbuf, ar->count & 0x7f, out - outbuf, outbuf);
496 if (pax->test & 0x04000)
497 (*pax->errorf)(NiL, pax, 1, "part c=%d:%d:%d r=%d:%d bits=%d n=%d x=%u \"%-.*s\"", c, &outbuf[ar->linesize] - out, c ^ 64, ar->next - ar->buffer, ar->line, bits, out - outbuf, *ar->next, out - outbuf, outbuf);
514 if (pax->warn && *s == '{') /*'}'*/
515 (*pax->errorf)(NiL, pax, 1, "%s: keyword %s (bits=%d offset=%I*u+%I*u block=%I*u)", ap->name, s, bits, sizeof(off_t), paxseek(pax, ap, (off_t)0, SEEK_CUR, 0) - ar->bufsize, sizeof(index), index, sizeof(block), block);
524 (*pax->errorf)(NiL, pax, 2, "%s: key overbyte (bits=%d offset=%I*u+%I*u block=%I*u)", ap->name, bits, sizeof(off_t), paxseek(pax, ap, (off_t)0, SEEK_CUR, 0) - ar->bufsize, sizeof(index), index, sizeof(block), block);
668 else if (!pax->strict && !(pax->test & 0x01000) && outbuf[0] == '-' && outbuf[1] == 'I' && outbuf[2] == 'N' && outbuf[3] == 'C' && outbuf[4] == ' ')
681 (*pax->errorf)(NiL, pax, 2, "%s: write error", f->name);
688 if (pax->warn)
694 (*pax->errorf)(NiL, pax, 0, "comment %s \"%s\"", error_info.file, strcpy(comment, (char*)b));
705 if (paxseek(pax, ap, n, SEEK_SET, 1) != n)
706 (*pax->errorf)(NiL, pax, 3, "%s: %s format data seek error", ap->name, ap->format->name);
708 if (!(ar->buffer = (unsigned char*)paxget(pax, ap, (off_t)ar->bufsize, NiL)))
709 (*pax->errorf)(NiL, pax, 3, "%s: format member read error (offset=%I*u block=%I*u)", ap->name, sizeof(off_t), paxseek(pax, ap, (off_t)0, SEEK_CUR, 0), sizeof(block), block);
720 (*pax->errorf)(NiL, pax, 2, "%s: write error", f->name);
736 calib_getheader(Pax_t* pax, register Paxarchive_t* ap, register Paxfile_t* f)
753 if (paxseek(pax, ap, n, SEEK_SET, 1) != n)
754 (*pax->errorf)(NiL, pax, 3, "%s: %s format member seek error", ap->name, ap->format->name);
756 if (!(ar->buffer = (unsigned char*)paxget(pax, ap, (off_t)ar->bufsize, NiL)))
757 (*pax->errorf)(NiL, pax, 3, "%s: %s format member read error", ap->name, ap->format->name);
784 if (pax->test & 0x02000)
813 f->name = paxstash(pax, &ap->stash.head, (char*)h, 28);
817 if (pax->test & 0x00800)
818 (*pax->errorf)(NiL, pax, 0, "head %-8s %d %03o %03o %03o %03o %03o %03o %03o", f->name, j, h[32], h[33], h[34], h[35], h[36], h[37], h[38]);
842 f->name = paxstash(pax, &ap->stash.head, (char*)h, 13);
846 if (pax->test & 0x00800)
847 (*pax->errorf)(NiL, pax, 0, "head %-8s %d %03o %03o %03o %03o %03o %03o %03o", f->name, j, h[32], h[33], h[34], h[35], h[36], h[37], h[38]);
895 if (pax->warn)
896 (*pax->errorf)(NiL, pax, 1, "%s: no suffix for type=%02x", f->name, h[38]);
925 calib_getdata(pax, ap, f, -1);
932 if (!(pax->test & 0x01000) && (!strcasecmp(s + 1, "COB") || !strcasecmp(s + 1, "CPY")))
946 f->st->st_uid = pax->uid;
947 f->st->st_gid = pax->gid;