Lines Matching defs:pufbuf
113 readfd(struct puffs_framebuf *pufbuf, int fd, int *done)
144 puffs_framebuf_putdata_atoff(pufbuf, 0, &error, sizeof(int));
149 puffs_framebuf_putdata_atoff(pufbuf, sizeof(int),
165 readdata(struct puffs_framebuf *pufbuf, int fd, int *done)
173 if (puffs_framebuf_telloff(pufbuf) == 0)
174 puffs_framebuf_seekset(pufbuf, METADATASIZE);
175 puffs_framebuf_getdata_atoff(pufbuf, sizeof(int), &max, sizeof(size_t));
176 moved = puffs_framebuf_tellsize(pufbuf) - METADATASIZE;
205 puffs_framebuf_putdata(pufbuf, buf, n);
216 portal_frame_rf(struct puffs_usermount *pu, struct puffs_framebuf *pufbuf,
221 if (puffs_framebuf_getdata_atoff(pufbuf, 0, &type, sizeof(int)) == -1)
225 return readfd(pufbuf, fd, done);
227 return readdata(pufbuf, fd, done);
233 portal_frame_wf(struct puffs_usermount *pu, struct puffs_framebuf *pufbuf,
241 pboff = puffs_framebuf_telloff(pufbuf);
242 pbsize = puffs_framebuf_tellsize(pufbuf);
248 if (puffs_framebuf_getwindow(pufbuf, pboff, &win, &winlen)==-1)
267 puffs_framebuf_seekset(pufbuf, pboff);
271 puffs_framebuf_putdata_atoff(pufbuf, 0, &pboff, sizeof(size_t));
329 struct puffs_framebuf *pufbuf;
334 pufbuf = puffs_framebuf_make();
335 if (pufbuf == NULL)
339 if (puffs_framebuf_putdata(pufbuf, &data, sizeof(int)) == -1)
357 puffs_framev_enqueue_directreceive(pcc, s[0], pufbuf, 0);
361 if (puffs_framebuf_tellsize(pufbuf) < sizeof(int)) {
365 puffs_framebuf_getdata_atoff(pufbuf, 0, &error, sizeof(int));
371 if (puffs_framebuf_tellsize(pufbuf) != 2*sizeof(int)) {
376 puffs_framebuf_getdata_atoff(pufbuf, sizeof(int),
378 puffs_framebuf_destroy(pufbuf);
392 puffs_framebuf_destroy(pufbuf);
661 struct puffs_framebuf *pufbuf;
675 pufbuf = puffs_framebuf_make();
677 puffs_framebuf_putdata(pufbuf, &data, sizeof(int));
678 puffs_framebuf_putdata(pufbuf, resid, sizeof(size_t));
682 rv = readdata(pufbuf, portn->fd, &dummy);
689 portn->fd, pufbuf, 0);
697 xfersize = puffs_framebuf_tellsize(pufbuf) - METADATASIZE;
708 rv = puffs_framebuf_getwindow(pufbuf, METADATASIZE,
720 puffs_framebuf_destroy(pufbuf);
735 struct puffs_framebuf *pufbuf;
741 pufbuf = puffs_framebuf_make();
742 puffs_framebuf_putdata(pufbuf, buf, *resid);
746 pufbuf, portn->fd, &dummy);
752 rv = puffs_framev_enqueue_directsend(pcc, portn->fd, pufbuf, 0);
759 rv = puffs_framebuf_getdata_atoff(pufbuf, 0, &written, sizeof(size_t));
765 puffs_framebuf_destroy(pufbuf);