-/* $OpenBSD: control.c,v 1.5 2014/04/07 19:55:46 claudio Exp $ */
+/* $OpenBSD: control.c,v 1.6 2014/04/19 18:31:33 claudio Exp $ */
/*
* Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org>
n = sizeof(*cmh);
cmh = pdu_alloc(n);
- bcopy(buf, cmh, n);
+ memcpy(cmh, buf, n);
buf += n;
len -= n;
goto fail;
if (!(data = pdu_alloc(n)))
goto fail;
- bcopy(buf, data, n);
+ memcpy(data, buf, n);
if (pdu_addbuf(p, data, n, i + 1)) {
free(data);
goto fail;
if (len > 0) {
if ((ptr = pdu_alloc(len)) == NULL)
goto fail;
- bcopy(buf, ptr, len);
+ memcpy(ptr, buf, len);
pdu_addbuf(pdu, ptr, len, 1);
}
-/* $OpenBSD: initiator.c,v 1.10 2014/04/19 18:19:57 claudio Exp $ */
+/* $OpenBSD: initiator.c,v 1.11 2014/04/19 18:31:33 claudio Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
}
n = htonl(n);
/* copy 32bit value over ahslen and datalen */
- bcopy(&n, &lreq->ahslen, sizeof(n));
+ memcpy(&lreq->ahslen, &n, sizeof(n));
return p;
}
if ((n = text_to_pdu(kvp, p)) == -1)
return NULL;
n = htonl(n);
- bcopy(&n, &lreq->ahslen, sizeof(n));
+ memcpy(&lreq->ahslen, &n, sizeof(n));
return p;
}
-/* $OpenBSD: log.c,v 1.5 2011/08/20 19:03:39 sthen Exp $ */
+/* $OpenBSD: log.c,v 1.6 2014/04/19 18:31:33 claudio Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
for (i = 0; i < len; i += l) {
fprintf(stderr, "%4zi:", i);
l = sizeof(b) < len - i ? sizeof(b) : len - i;
- bcopy((char *)buf + i, b, l);
+ memcpy(b, (char *)buf + i, l);
for (j = 0; j < sizeof(b); j++) {
if (j % 2 == 0)
-/* $OpenBSD: pdu.c,v 1.6 2011/05/04 21:00:04 claudio Exp $ */
+/* $OpenBSD: pdu.c,v 1.7 2014/04/19 18:31:33 claudio Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
return (0);
} else if (rb->rpos < rb->wpos) {
l = PDU_MIN(rb->wpos - rb->rpos, len);
- bcopy(rb->buf + rb->rpos, ptr, l);
+ memcpy(ptr, rb->buf + rb->rpos, l);
rb->rpos += l;
return l;
} else {
l = PDU_MIN(rb->size - rb->rpos, len);
- bcopy(rb->buf + rb->rpos, ptr, l);
+ memcpy(ptr, rb->buf + rb->rpos, l);
rb->rpos += l;
if (rb->rpos == rb->size)
rb->rpos = 0;
-/* $OpenBSD: util.c,v 1.2 2010/09/25 16:20:06 sobrado Exp $ */
+/* $OpenBSD: util.c,v 1.3 2014/04/19 18:31:33 claudio Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
void *p;
if ((p = malloc(PDU_LEN(len))))
- bcopy(data, p, len);
+ memcpy(p, data, len);
return p;
}
-/* $OpenBSD: vscsi.c,v 1.8 2011/05/04 21:00:04 claudio Exp $ */
+/* $OpenBSD: vscsi.c,v 1.9 2014/04/19 18:31:33 claudio Exp $ */
/*
* Copyright (c) 2009 Claudio Jeker <claudio@openbsd.org>
"I'm afraid I can't do that.");
sreq->lun[1] = t->lun;
- bcopy(&i2t.cmd, sreq->cdb, i2t.cmdlen);
+ memcpy(sreq->cdb, &i2t.cmd, i2t.cmdlen);
#if 0
if (i2t.direction == VSCSI_DIR_WRITE) {
if (!(buf = pdu_alloc(i2t.datalen)))
fatal("vscsi_dispatch");
t32 = htonl(i2t.datalen);
- bcopy(&t32, &sreq->ahslen, sizeof(t32));
+ memcpy(&sreq->ahslen, &t32, sizeof(t32));
vscsi_data(VSCSI_DATA_WRITE, i2t.tag, buf, i2t.datalen);
pdu_addbuf(p, buf, i2t.datalen, PDU_DATA);
}
if (buf) {
if (len > sizeof(t2i.sense))
len = sizeof(t2i.sense);
- bcopy(buf, &t2i.sense, len);
+ memcpy(&t2i.sense, buf, len);
}
if (ioctl(v.fd, VSCSI_T2I, &t2i) == -1)
dout->ttt = ttt;
dout->datasn = htonl(dsn++);
t32 = htonl(size);
- bcopy(&t32, &dout->ahslen, sizeof(t32));
+ memcpy(&dout->ahslen, &t32, sizeof(t32));
dout->buffer_offs = htonl(off);
if (!(buf = pdu_alloc(size)))