-/* $OpenBSD: cd.c,v 1.215 2014/09/14 14:17:26 jsg Exp $ */
+/* $OpenBSD: cd.c,v 1.216 2014/12/15 02:11:57 tedu Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
case DIOCRLDINFO:
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
cdgetdisklabel(dev, sc, lp, 0);
- bcopy(lp, sc->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP, 0);
+ memcpy(sc->sc_dk.dk_label, lp, sizeof(*lp));
+ free(lp, M_TEMP, sizeof(*lp));
break;
case DIOCGPDINFO:
else
th->len = betoh16(th->len);
if (th->len > 0)
- bcopy(th, addr, sizeof(*th));
+ memcpy(addr, th, sizeof(*th));
else
error = EIO;
dma_free(th, sizeof(*th));
return ENXIO;
}
-#define dvd_copy_key(dst, src) bcopy((src), (dst), DVD_KEY_SIZE)
-#define dvd_copy_challenge(dst, src) bcopy((src), (dst), DVD_CHALLENGE_SIZE)
+#define dvd_copy_key(dst, src) memcpy((dst), (src), DVD_KEY_SIZE)
+#define dvd_copy_challenge(dst, src) memcpy((dst), (src), DVD_CHALLENGE_SIZE)
#define DVD_AUTH_BUFSIZE 20
scsi_xs_put(xs);
if (error == 0)
- bcopy(buf->data, s->disckey.value, sizeof(s->disckey.value));
+ memcpy(s->disckey.value, buf->data, sizeof(s->disckey.value));
done:
dma_free(buf, sizeof(*buf));
return (error);
s->bca.len = _2btol(&buf[0]);
if (s->bca.len < 12 || s->bca.len > 188)
return (EIO);
- bcopy(&buf[4], s->bca.value, s->bca.len);
+ memcpy(s->bca.value, &buf[4], s->bca.len);
}
done:
dma_free(buf, DVD_READ_BCA_BUFLEN);
if (error == 0) {
s->manufact.len = _2btol(buf->len);
if (s->manufact.len >= 0 && s->manufact.len <= 2048)
- bcopy(buf->data, s->manufact.value, s->manufact.len);
+ memcpy(s->manufact.value, buf->data, s->manufact.len);
else
error = EIO;
}
-/* $OpenBSD: scsi_ioctl.c,v 1.48 2011/06/21 22:36:42 matthew Exp $ */
+/* $OpenBSD: scsi_ioctl.c,v 1.49 2014/12/15 02:11:57 tedu Exp $ */
/* $NetBSD: scsi_ioctl.c,v 1.23 1996/10/12 23:23:17 christos Exp $ */
/*
#endif
screq->senselen_used = min(sizeof(xs->sense),
sizeof(screq->sense));
- bcopy(&xs->sense, screq->sense, screq->senselen_used);
+ memcpy(screq->sense, &xs->sense, screq->senselen_used);
screq->retsts = SCCMD_SENSE;
break;
case XS_SHORTSENSE:
printf("XS_SHORTSENSE\n");
screq->senselen_used = min(sizeof(xs->sense),
sizeof(screq->sense));
- bcopy(&xs->sense, screq->sense, screq->senselen_used);
+ memcpy(screq->sense, &xs->sense, screq->senselen_used);
screq->retsts = SCCMD_UNKNOWN;
break;
case XS_DRIVER_STUFFUP:
-/* $OpenBSD: scsiconf.c,v 1.188 2014/07/12 18:50:25 tedu Exp $ */
+/* $OpenBSD: scsiconf.c,v 1.189 2014/12/15 02:11:57 tedu Exp $ */
/* $NetBSD: scsiconf.c,v 1.57 1996/05/02 01:09:01 neil Exp $ */
/*
}
rslt = scsi_inquire(sc_link, inqbuf, scsi_autoconf | SCSI_SILENT);
- bcopy(inqbuf, &sc_link->inqdata, sizeof(sc_link->inqdata));
+ memcpy(&sc_link->inqdata, inqbuf, sizeof(sc_link->inqdata));
dma_free(inqbuf, sizeof(*inqbuf));
if (rslt != 0) {
-/* $OpenBSD: sd.c,v 1.257 2014/09/18 18:47:29 kettenis Exp $ */
+/* $OpenBSD: sd.c,v 1.258 2014/12/15 02:11:57 tedu Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
case DIOCRLDINFO:
lp = malloc(sizeof(*lp), M_TEMP, M_WAITOK);
sdgetdisklabel(dev, sc, lp, 0);
- bcopy(lp, sc->sc_dk.dk_label, sizeof(*lp));
- free(lp, M_TEMP, 0);
+ memcpy(sc->sc_dk.dk_label, lp, sizeof(*lp));
+ free(lp, M_TEMP, sizeof(*lp));
goto exit;
case DIOCGPDINFO:
* always null terminated and len does not count the terminating null.
* d_packname is not a null terminated string.
*/
- bcopy(packname, lp->d_packname, len);
+ memcpy(lp->d_packname, packname, len);
DL_SETDSIZE(lp, sc->params.disksize);
lp->d_version = 1;