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