Lines Matching refs:toybuf
115 if (!(size =readall(afd, toybuf, 110))) break;
116 if (size != 110 || memcmp(toybuf, "070701", 6)) error_exit("bad header");
117 tofree = name = strpad(afd, x8u(toybuf+94), 110);
127 size = x8u(toybuf+54);
128 mode = x8u(toybuf+14);
129 uid = x8u(toybuf+22);
130 gid = x8u(toybuf+30);
131 timestamp = x8u(toybuf+46); // unsigned 32 bit, so year 2100 problem
162 data = toybuf;
164 if (size < sizeof(toybuf)) data = strpad(afd, size, 0);
165 else xreadall(afd, toybuf, sizeof(toybuf));
166 if (!test) xwrite(fd, data, data == toybuf ? sizeof(toybuf) : size);
167 if (data != toybuf) {
171 size -= sizeof(toybuf);
183 err = mknod(name, mode, dev_makedev(x8u(toybuf+78), x8u(toybuf+86)));
243 llen = sprintf(toybuf,
249 xwrite(afd, toybuf, llen);
259 if (readlink(name, toybuf, sizeof(toybuf)-1) == llen)
260 xwrite(afd, toybuf, llen);
263 nlen = llen > sizeof(toybuf) ? sizeof(toybuf) : llen;
266 if (nlen != readall(fd, toybuf, nlen))
268 xwrite(afd, toybuf, nlen);
278 memset(toybuf, 0, sizeof(toybuf));
279 xwrite(afd, toybuf,
280 sprintf(toybuf, "070701%040X%056X%08XTRAILER!!!", 1, 0x0b, 0)+4);