summaryrefslogtreecommitdiffstats
path: root/sys/sys/conf.h
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-10-31 10:35:41 +0000
committered <ed@FreeBSD.org>2009-10-31 10:35:41 +0000
commit8bda786eedc7619f1dac0e722db1d4d8ca68fcd5 (patch)
tree67a0430f296d233465090b02d69141fcde8d092e /sys/sys/conf.h
parentc621c3c0b4159f52d9826811dfca312655c09e1d (diff)
downloadFreeBSD-src-8bda786eedc7619f1dac0e722db1d4d8ca68fcd5.zip
FreeBSD-src-8bda786eedc7619f1dac0e722db1d4d8ca68fcd5.tar.gz
Turn unused structure fields of cdevsw into spares.
d_uid, d_gid and d_mode are unused, because permissions are stored in cdevpriv nowadays. d_kind doesn't seem to be used at all. We no longer keep a list of cdevsw's, so d_list is also unused. uid_t and gid_t are 32 bits, but mode_t is 16 bits, Because of alignment constraints of d_kind, we can safely turn it into three 32-bit integers. d_kind and d_list is equal in size to three pointers. Discussed with: kib
Diffstat (limited to 'sys/sys/conf.h')
-rw-r--r--sys/sys/conf.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 3df4284..4d89070 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -210,15 +210,13 @@ struct cdevsw {
d_kqfilter_t *d_kqfilter;
d_purge_t *d_purge;
d_mmap_single_t *d_mmap_single;
- uid_t d_uid;
- gid_t d_gid;
- mode_t d_mode;
- const char *d_kind;
+
+ int32_t d_spare0[3];
+ void *d_spare1[3];
/* These fields should not be messed with by drivers */
- LIST_ENTRY(cdevsw) d_list;
LIST_HEAD(, cdev) d_devs;
- int d_spare3;
+ int d_spare2;
union {
struct cdevsw *gianttrick;
SLIST_ENTRY(cdevsw) postfree_list;
OpenPOWER on IntegriCloud