diff options
| author | jdolecek <jdolecek@NetBSD.org> | 2017-04-05 18:34:56 +0000 |
|---|---|---|
| committer | jdolecek <jdolecek@NetBSD.org> | 2017-04-05 18:34:56 +0000 |
| commit | be1b8f2ff6527c5f2847bcdce62371a14d0b2156 (patch) | |
| tree | 208caac83340a6e59d13c0dc2ac99aeadfbb6b5d /sys/dev | |
| parent | b19ec04bf909a5e25dbb6caf1f5f237099e347ec (diff) | |
introduce DKCACHE_COMBINE() macro - it combines the flags in a way that
all common flags are retained, and flags regarding write cache are preserved
if either of the devices has it; callers can thus rely on write cache not
being possible to be used when both flags are missing
use the new macro for ccd(4)
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ccd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ccd.c b/sys/dev/ccd.c index adb9fcbea2b..e1881e4f119 100644 --- a/sys/dev/ccd.c +++ b/sys/dev/ccd.c @@ -1,4 +1,4 @@ -/* $NetBSD: ccd.c,v 1.170 2017/03/30 16:50:32 jdolecek Exp $ */ +/* $NetBSD: ccd.c,v 1.171 2017/04/05 18:34:56 jdolecek Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc. @@ -88,7 +88,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.170 2017/03/30 16:50:32 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ccd.c,v 1.171 2017/04/05 18:34:56 jdolecek Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -1432,7 +1432,7 @@ ccdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l) if (i == 0) dkcache = j; else - dkcache &= j; + dkcache = DKCACHE_COMBINE(dkcache, j); } *((int *)data) = dkcache; |
