Lines Matching refs:pufbuf

112 readfd(struct puffs_framebuf *pufbuf, int fd, int *done)
143 puffs_framebuf_putdata_atoff(pufbuf, 0, &error, sizeof(int));
148 puffs_framebuf_putdata_atoff(pufbuf, sizeof(int),
164 readdata(struct puffs_framebuf *pufbuf, int fd, int *done)
172 if (puffs_framebuf_telloff(pufbuf) == 0)
173 puffs_framebuf_seekset(pufbuf, METADATASIZE);
174 puffs_framebuf_getdata_atoff(pufbuf, sizeof(int), &max, sizeof(size_t));
175 moved = puffs_framebuf_tellsize(pufbuf) - METADATASIZE;
197 puffs_framebuf_putdata(pufbuf, buf, n);
208 portal_frame_rf(struct puffs_usermount *pu, struct puffs_framebuf *pufbuf,
213 if (puffs_framebuf_getdata_atoff(pufbuf, 0, &type, sizeof(int)) == -1)
217 return readfd(pufbuf, fd, done);
219 return readdata(pufbuf, fd, done);
225 portal_frame_wf(struct puffs_usermount *pu, struct puffs_framebuf *pufbuf,
233 pboff = puffs_framebuf_telloff(pufbuf);
234 pbsize = puffs_framebuf_tellsize(pufbuf);
240 if (puffs_framebuf_getwindow(pufbuf, pboff, &win, &winlen)==-1)
259 puffs_framebuf_seekset(pufbuf, pboff);
263 puffs_framebuf_putdata_atoff(pufbuf, 0, &pboff, sizeof(size_t));
321 struct puffs_framebuf *pufbuf;
326 pufbuf = puffs_framebuf_make();
327 if (pufbuf == NULL)
331 if (puffs_framebuf_putdata(pufbuf, &data, sizeof(int)) == -1)
346 puffs_framev_enqueue_directreceive(pcc, s[0], pufbuf, 0);
351 if (puffs_framebuf_tellsize(pufbuf) < sizeof(int)) {
355 puffs_framebuf_getdata_atoff(pufbuf, 0, &error, sizeof(int));
361 if (puffs_framebuf_tellsize(pufbuf) != 2*sizeof(int)) {
366 puffs_framebuf_getdata_atoff(pufbuf, sizeof(int),
368 puffs_framebuf_destroy(pufbuf);
382 puffs_framebuf_destroy(pufbuf);
602 struct puffs_framebuf *pufbuf;
616 pufbuf = puffs_framebuf_make();
618 puffs_framebuf_putdata(pufbuf, &data, sizeof(int));
619 puffs_framebuf_putdata(pufbuf, resid, sizeof(size_t));
623 rv = readdata(pufbuf, portn->fd, &dummy);
630 portn->fd, pufbuf, 0);
638 xfersize = puffs_framebuf_tellsize(pufbuf) - METADATASIZE;
649 rv = puffs_framebuf_getwindow(pufbuf, METADATASIZE,
661 puffs_framebuf_destroy(pufbuf);
676 struct puffs_framebuf *pufbuf;
682 pufbuf = puffs_framebuf_make();
683 puffs_framebuf_putdata(pufbuf, buf, *resid);
687 rv = portal_frame_wf(pu, pufbuf, portn->fd, &dummy);
693 rv = puffs_framev_enqueue_directsend(pcc, portn->fd, pufbuf, 0);
700 rv = puffs_framebuf_getdata_atoff(pufbuf, 0, &written, sizeof(size_t));
706 puffs_framebuf_destroy(pufbuf);