Lines Matching refs:count
349 ssize_t count = 0; /* Number of bytes put in buf so far */
358 count = nbytes;
359 if ((bfp->bf_offset + count) > bfp->bf_buffilled)
360 count = bfp->bf_buffilled - bfp->bf_offset;
362 memcpy(buf, bfp->bf_buf + bfp->bf_offset, count);
385 bfp->bf_offset + count, SEEK_SET) < 0)
400 while (count < nbytes)
403 buf + count,
404 nbytes - count);
413 count += retval;
418 bfp->bf_offset += count;
419 return count;
494 ssize_t count = 0; /* Number of bytes written so far */
518 count = write(bfp->bf_disk_fd, buf, nbytes);
519 if (count < 0)
530 count = nbytes;
531 if ((bfp->bf_offset + count) > bfp->bf_bufsize)
532 count = bfp->bf_bufsize - bfp->bf_offset;
534 memcpy(bfp->bf_buf + bfp->bf_offset, buf, count);
535 if ((bfp->bf_offset + count) > bfp->bf_buffilled)
536 bfp->bf_buffilled = bfp->bf_offset + count;
589 bfp->bf_offset + count, SEEK_SET) < 0)
604 while (count < nbytes)
606 retval = write(bfp->bf_disk_fd, buf + count,
607 nbytes - count);
614 count += retval;
619 bfp->bf_offset += count;
622 return count;