From 422db29b3198eb16bfaecf8b68dc5f1fb963f4e3 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 15 Mar 2005 11:33:28 +0000 Subject: [PATCH] Rename cdev->si_udev to cdev->si_drv0 to reflect the new nature of the field. --- sys/kern/kern_conf.c | 12 ++++++------ sys/sys/conf.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index dc2d3d480c10..d4b311e904c8 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -239,7 +239,7 @@ major(struct cdev *x) { if (x == NULL) return NODEV; - return((x->si_udev >> 8) & 0xff); + return((x->si_drv0 >> 8) & 0xff); } int @@ -247,7 +247,7 @@ minor(struct cdev *x) { if (x == NULL) return NODEV; - return(x->si_udev & MAXMINOR); + return(x->si_drv0 & MAXMINOR); } int @@ -300,12 +300,12 @@ newdev(int x, int y, struct cdev *si) udev = (x << 8) | y; hash = udev % DEVT_HASH; LIST_FOREACH(si2, &dev_hash[hash], si_hash) { - if (si2->si_udev == udev) { + if (si2->si_drv0 == udev) { freedev(si); return (si2); } } - si->si_udev = udev; + si->si_drv0 = udev; LIST_INSERT_HEAD(&dev_hash[hash], si, si_hash); return (si); } @@ -329,7 +329,7 @@ findcdev(dev_t udev) dev_lock(); hash = udev % DEVT_HASH; LIST_FOREACH(si, &dev_hash[hash], si_hash) { - if (si->si_udev == udev) + if (si->si_drv0 == udev) break; } dev_unlock(); @@ -777,7 +777,7 @@ clone_cleanup(struct clonedevs **cdp) KASSERT(dev->si_flags & SI_CLONELIST, ("Dev %p(%s) should be on clonelist", dev, dev->si_name)); KASSERT(dev->si_flags & SI_NAMED, - ("Driver has goofed in cloning underways udev %x", dev->si_udev)); + ("Driver has goofed in cloning underways udev %x", dev->si_drv0)); destroy_devl(dev); } dev_unlock(); diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 70eac5449c27..29efd67ef8df 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -65,7 +65,7 @@ struct cdev { struct timespec si_atime; struct timespec si_ctime; struct timespec si_mtime; - dev_t si_udev; + u_int si_drv0; int si_refcount; LIST_ENTRY(cdev) si_list; LIST_ENTRY(cdev) si_clone;