summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-05-08 06:40:31 +0000
committerphk <phk@FreeBSD.org>1999-05-08 06:40:31 +0000
commit500e41bd7127ee03db75cd2a3704b8025c24e345 (patch)
tree8dc80d7dc8cd7f629dab45bcd87aa448cb9a4ca0 /sys/i386/linux
parented809a974db9e6d86dabb993b9b0c6c49e1bbf32 (diff)
downloadFreeBSD-src-500e41bd7127ee03db75cd2a3704b8025c24e345.zip
FreeBSD-src-500e41bd7127ee03db75cd2a3704b8025c24e345.tar.gz
I got tired of seeing all the cdevsw[major(foo)] all over the place.
Made a new (inline) function devsw(dev_t dev) and substituted it. Changed to the BDEV variant to this format as well: bdevsw(dev_t dev) DEVFS will eventually benefit from this change too.
Diffstat (limited to 'sys/i386/linux')
-rw-r--r--sys/i386/linux/linux_file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/i386/linux/linux_file.c b/sys/i386/linux/linux_file.c
index 907e6b8..e357e15 100644
--- a/sys/i386/linux/linux_file.c
+++ b/sys/i386/linux/linux_file.c
@@ -25,7 +25,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: linux_file.c,v 1.23 1999/01/10 23:15:35 eivind Exp $
+ * $Id: linux_file.c,v 1.24 1999/05/06 18:44:20 peter Exp $
*/
#include "opt_compat.h"
@@ -306,7 +306,7 @@ linux_fcntl(struct proc *p, struct linux_fcntl_args *args)
if ((error = VOP_GETATTR(vp, &va, p->p_ucred, p)))
return error;
- d_tty = cdevsw[major(va.va_rdev)]->d_devtotty;
+ d_tty = devsw(va.va_rdev)->d_devtotty;
if (!d_tty || (!(tp = (*d_tty)(va.va_rdev))))
return EINVAL;
if (args->cmd == LINUX_F_GETOWN) {
OpenPOWER on IntegriCloud