Lines Matching defs:buf

113     hp_byte_t	buf[HP_SCSI_BUFSIZ];
524 new->bufp = new->buf + HP_SCSI_CMD_LEN;
645 new->bufp = new->buf + HP_SCSI_CMD_LEN;
691 static char buf[9];
692 memcpy(buf, sanei_hp_scsi_inq(this) + 8, 8);
693 buf[8] = '\0';
694 return buf;
701 static char buf[17];
702 memcpy(buf, sanei_hp_scsi_inq(this) + 16, 16);
703 buf[16] = '\0';
704 return buf;
823 hp_byte_t * data = this->buf + HP_SCSI_CMD_LEN;
831 this->bufp = this->buf;
845 return sanei_scsi_cmd (this->fd, this->buf, HP_SCSI_CMD_LEN + len, 0, 0);
847 return hp_nonscsi_write (this, this->buf+HP_SCSI_CMD_LEN, len, connect);
853 return this->buf + HP_SCSI_BUFSIZ - this->bufp;
909 assert(count > 0 && this->bufp < this->buf + HP_SCSI_BUFSIZ);
1513 } buf[2], *req = NULL;
1602 req = buf + (reqs_issued++ % 2);
1635 req = buf + (reqs_completed++ % 2);
1717 req = buf + (reqs_completed++ % 2);
1749 char * buf = alloca(bufsize);
1754 if (!buf)
1764 status = hp_scsi_read(scsi, buf, &bufsize, 1);
1777 if (memcmp(buf, expect, count) != 0)
1780 expect, count, buf);
1783 buf += count;
1785 if (buf[0] == 'N')
1791 if (sscanf(buf, "%d%n", &val, &count) != 1)
1793 DBG(1, "scl_inq: malformed response: expected int, got '%.8s'\n", buf);
1796 buf += count;
1799 if (*buf++ != expect_char)
1802 expect_char, buf - 1);
1817 memcpy(valp, buf , *lengthp); /* Get binary data */
1829 char * buf = alloca(bufsize);
1830 char * bufstart = buf;
1836 if (!buf)
1847 status = hp_scsi_read(scsi, buf, &bufsize, 0);
1856 if (memcmp(buf, expect, count) != 0)
1859 expect, count, buf);
1862 buf += count;
1864 if (buf[0] == 'N')
1870 if (sscanf(buf, "%d%n", &val, &count) != 1)
1872 DBG(1, "scl_inq: malformed response: expected int, got '%.8s'\n", buf);
1875 buf += count;
1878 if (*buf++ != expect_char)
1881 expect_char, buf - 1);
1890 if (buf < bufstart + bufsize)
1892 n = bufsize - (buf - bufstart);
1894 memcpy (hpdata, buf, n);