Module Name:    src
Committed By:   riastradh
Date:           Sat Jun 13 22:15:58 UTC 2020

Modified Files:
        src/sys/dev: cgd.c cgdvar.h

Log Message:
Constify.


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.133 src/sys/dev/cgd.c
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/cgdvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/cgd.c
diff -u src/sys/dev/cgd.c:1.132 src/sys/dev/cgd.c:1.133
--- src/sys/dev/cgd.c:1.132	Sat Jun 13 22:15:06 2020
+++ src/sys/dev/cgd.c	Sat Jun 13 22:15:57 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cgd.c,v 1.132 2020/06/13 22:15:06 riastradh Exp $ */
+/* $NetBSD: cgd.c,v 1.133 2020/06/13 22:15:57 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.132 2020/06/13 22:15:06 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cgd.c,v 1.133 2020/06/13 22:15:57 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -386,7 +386,7 @@ static int	cgd_ioctl_clr(struct cgd_soft
 static int	cgd_ioctl_get(dev_t, void *, struct lwp *);
 static int	cgdinit(struct cgd_softc *, const char *, struct vnode *,
 			struct lwp *);
-static void	cgd_cipher(struct cgd_softc *, void *, void *,
+static void	cgd_cipher(struct cgd_softc *, void *, const void *,
 			   size_t, daddr_t, size_t, int);
 
 static void	cgd_selftest(void);
@@ -1535,11 +1535,11 @@ cgd_process(struct work *wk, void *arg)
 }
 
 static void
-cgd_cipher(struct cgd_softc *sc, void *dstv, void *srcv,
+cgd_cipher(struct cgd_softc *sc, void *dstv, const void *srcv,
     size_t len, daddr_t blkno, size_t secsize, int dir)
 {
 	char		*dst = dstv;
-	char		*src = srcv;
+	const char	*src = srcv;
 	cfunc_cipher	*cipher = sc->sc_cfuncs->cf_cipher;
 	size_t		blocksize = sc->sc_cdata.cf_blocksize;
 	size_t		todo;

Index: src/sys/dev/cgdvar.h
diff -u src/sys/dev/cgdvar.h:1.20 src/sys/dev/cgdvar.h:1.21
--- src/sys/dev/cgdvar.h:1.20	Sat Jun 13 18:38:33 2020
+++ src/sys/dev/cgdvar.h	Sat Jun 13 22:15:58 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cgdvar.h,v 1.20 2020/06/13 18:38:33 riastradh Exp $ */
+/* $NetBSD: cgdvar.h,v 1.21 2020/06/13 22:15:58 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -87,7 +87,7 @@ struct cgd_xfer {
 	struct buf		*cx_obp;
 	struct buf		*cx_nbp;
 	void			*cx_dstv;
-	void			*cx_srcv;
+	const void		*cx_srcv;
 	size_t			 cx_len;
 	daddr_t			 cx_blkno;
 	size_t			 cx_secsize;

Reply via email to