Lines Matching refs:count
347 ssize_t count = 0; /* Number of bytes put in buf so far */
356 count = nbytes;
357 if ((bfp->bf_offset + count) > bfp->bf_buffilled)
358 count = bfp->bf_buffilled - bfp->bf_offset;
360 memcpy(buf, bfp->bf_buf + bfp->bf_offset, count);
383 bfp->bf_offset + count, SEEK_SET) < 0)
398 while (count < nbytes)
401 buf + count,
402 nbytes - count);
411 count += retval;
416 bfp->bf_offset += count;
417 return count;
492 ssize_t count = 0; /* Number of bytes written so far */
516 count = write(bfp->bf_disk_fd, buf, nbytes);
517 if (count < 0)
528 count = nbytes;
529 if ((bfp->bf_offset + count) > bfp->bf_bufsize)
530 count = bfp->bf_bufsize - bfp->bf_offset;
532 memcpy(bfp->bf_buf + bfp->bf_offset, buf, count);
533 if ((bfp->bf_offset + count) > bfp->bf_buffilled)
534 bfp->bf_buffilled = bfp->bf_offset + count;
587 bfp->bf_offset + count, SEEK_SET) < 0)
602 while (count < nbytes)
604 retval = write(bfp->bf_disk_fd, buf + count,
605 nbytes - count);
612 count += retval;
617 bfp->bf_offset += count;
620 return count;