From 6e72f1605953ebfa6f4f3d6d32435f3477d298cb Mon Sep 17 00:00:00 2001 From: pooka Date: Tue, 6 Jul 2010 12:28:40 +0000 Subject: [PATCH] ctassert size of some key structures does not change --- sys/fs/puffs/puffs_vfsops.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/sys/fs/puffs/puffs_vfsops.c b/sys/fs/puffs/puffs_vfsops.c index 8edf03d0ea4b..6949ecb840e1 100644 --- a/sys/fs/puffs/puffs_vfsops.c +++ b/sys/fs/puffs/puffs_vfsops.c @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vfsops.c,v 1.91 2010/07/06 12:05:18 pooka Exp $ */ +/* $NetBSD: puffs_vfsops.c,v 1.92 2010/07/06 12:28:40 pooka Exp $ */ /* * Copyright (c) 2005, 2006 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.91 2010/07/06 12:05:18 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: puffs_vfsops.c,v 1.92 2010/07/06 12:28:40 pooka Exp $"); #include #include @@ -78,6 +78,16 @@ static struct putter_ops puffs_putter = { .pop_close = puffs_msgif_close, }; +/* + * Try to ensure data structures used by the puffs protocol + * do not unexpectedly change. + */ +#ifdef __i386__ +CTASSERT(sizeof(struct puffs_kargs) == 3928); +CTASSERT(sizeof(struct vattr) == 136); +CTASSERT(sizeof(struct puffs_req) == 44); +#endif + int puffs_vfsop_mount(struct mount *mp, const char *path, void *data, size_t *data_len)