summaryrefslogtreecommitdiffstats
path: root/sys/opencrypto
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>2003-01-12 01:37:13 +0000
committerdillon <dillon@FreeBSD.org>2003-01-12 01:37:13 +0000
commitddf9ef103e0a611c9a01425a28baf8a612b0d114 (patch)
tree19da0d56c468b8e0f6d0361d7d39157f561aa69f /sys/opencrypto
parent07cbccc353d7afbe8948b6025965ca36739d7373 (diff)
downloadFreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.zip
FreeBSD-src-ddf9ef103e0a611c9a01425a28baf8a612b0d114.tar.gz
Change struct file f_data to un_data, a union of the correct struct
pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit.
Diffstat (limited to 'sys/opencrypto')
-rw-r--r--sys/opencrypto/cryptodev.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/opencrypto/cryptodev.c b/sys/opencrypto/cryptodev.c
index 2cc3df4..07ea04f 100644
--- a/sys/opencrypto/cryptodev.c
+++ b/sys/opencrypto/cryptodev.c
@@ -134,7 +134,7 @@ cryptof_ioctl(
struct thread *td)
{
struct cryptoini cria, crie;
- struct fcrypt *fcr = (struct fcrypt *)fp->f_data;
+ struct fcrypt *fcr = fp->un_data.fcrypt;
struct csession *cse;
struct session_op *sop;
struct crypt_op *cop;
@@ -608,7 +608,7 @@ cryptof_stat(
static int
cryptof_close(struct file *fp, struct thread *td)
{
- struct fcrypt *fcr = (struct fcrypt *)fp->f_data;
+ struct fcrypt *fcr = fp->un_data.fcrypt;
struct csession *cse;
while ((cse = TAILQ_FIRST(&fcr->csessions))) {
@@ -616,7 +616,7 @@ cryptof_close(struct file *fp, struct thread *td)
(void)csefree(cse);
}
FREE(fcr, M_XDATA);
- fp->f_data = NULL;
+ fp->un_data.fcrypt = NULL;
return 0;
}
@@ -733,7 +733,7 @@ cryptoioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td)
f->f_flag = FREAD | FWRITE;
f->f_type = DTYPE_CRYPTO;
f->f_ops = &cryptofops;
- f->f_data = (caddr_t) fcr;
+ f->un_data.fcrypt = fcr;
*(u_int32_t *)data = fd;
fdrop(f, td);
break;
OpenPOWER on IntegriCloud