kern/116536: [fdc] [patch] fdc(4) does not respect hint.fd.0.flags from device.hints

Bruce Evans brde at optusnet.com.au
Mon Sep 24 10:20:10 PDT 2007


The following reply was made to PR kern/116536; it has been noted by GNATS.

From: Bruce Evans <brde at optusnet.com.au>
To: Eugene Grosbein <eugen at grosbein.pp.ru>
Cc: bug-followup at freebsd.org, Bruce Evans <brde at optusnet.com.au>
Subject: Re: kern/116536: [fdc] [patch] fdc(4) does not respect hint.fd.0.flags
 from device.hints
Date: Tue, 25 Sep 2007 03:15:19 +1000 (EST)

 On Tue, 25 Sep 2007, Eugene Grosbein wrote:
 
 > On Sat, 22 Sep 2007, Bruce Evans wrote:
 >
 >> fd->flags has nothing to do with the device flags.  This copy of the device
 >> flags gets clobbered later when fd->flags is used for more-dynamic flags.
 >
 > int has (at least) 32 bits, why not use them?
 
 It's simpler to use another variable for unrelated flags.
 
 > It's possible to move values for user-settable flags
 > (that are broken anyway for now) so that they do not globber
 > with more-dynamic flags. What's the point in calls to device_get_flags()
 > all the way?
 
 It is to keep the device flags in the variable (struct member) where
 they belong.  They could be cached in a driver variable (struct member),
 but there is no point.  device_get_flags() is just "return (dev->dev_flags);"
 and its speed is so unimportant that it is not inline.
 
 Bruce


More information about the freebsd-bugs mailing list