aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-09-27 18:27:10 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-09-27 18:27:10 +0000
commitca916247cdab4aa84a7f00de7c39b9e8c933e581 (patch)
treeb0967d8a8cefb34751a29b420ac0574c8e7496f7
parentc5e827ebc87c3eadec0212fc543177485b607c53 (diff)
downloadsrc-ca916247cdab4aa84a7f00de7c39b9e8c933e581.tar.gz
src-ca916247cdab4aa84a7f00de7c39b9e8c933e581.zip
Rename struct specinfo to the more appropriate struct cdev.
Agreed on: jake, rwatson, jhb
Notes
Notes: svn path=/head/; revision=104043
-rw-r--r--sys/fs/ntfs/ntfs_vfsops.c2
-rw-r--r--sys/kern/kern_conf.c12
-rw-r--r--sys/kern/kern_mib.c4
-rw-r--r--sys/sys/conf.h8
-rw-r--r--sys/sys/linedisc.h8
-rw-r--r--sys/sys/types.h4
-rw-r--r--sys/sys/vnode.h4
-rw-r--r--usr.bin/fstat/fstat.c4
8 files changed, 23 insertions, 23 deletions
diff --git a/sys/fs/ntfs/ntfs_vfsops.c b/sys/fs/ntfs/ntfs_vfsops.c
index e91791a3c714..239a2c8aa0ef 100644
--- a/sys/fs/ntfs/ntfs_vfsops.c
+++ b/sys/fs/ntfs/ntfs_vfsops.c
@@ -500,7 +500,7 @@ ntfs_unmount(
printf("ntfs_unmount: vflush failed(sysnodes): %d\n",error);
/* Check if the type of device node isn't VBAD before
- * touching v_specinfo. If the device vnode is revoked, the
+ * touching v_cdev. If the device vnode is revoked, the
* field is NULL and touching it causes null pointer derefercence.
*/
if (ntmp->ntm_devvp->v_type != VBAD)
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c
index 1fbe8130622b..05fc62b177ec 100644
--- a/sys/kern/kern_conf.c
+++ b/sys/kern/kern_conf.c
@@ -56,11 +56,11 @@ static MALLOC_DEFINE(M_DEVT, "dev_t", "dev_t storage");
/* The number of dev_t's we can create before malloc(9) kick in. */
#define DEVT_STASH 50
-static struct specinfo devt_stash[DEVT_STASH];
+static struct cdev devt_stash[DEVT_STASH];
-static LIST_HEAD(, specinfo) dev_hash[DEVT_HASH];
+static LIST_HEAD(, cdev) dev_hash[DEVT_HASH];
-static LIST_HEAD(, specinfo) dev_free;
+static LIST_HEAD(, cdev) dev_free;
devfs_create_t *devfs_create_hook;
devfs_destroy_t *devfs_destroy_hook;
@@ -173,13 +173,13 @@ static dev_t
allocdev(void)
{
static int stashed;
- struct specinfo *si;
+ struct cdev *si;
if (LIST_FIRST(&dev_free)) {
si = LIST_FIRST(&dev_free);
LIST_REMOVE(si, si_hash);
} else if (stashed >= DEVT_STASH) {
- MALLOC(si, struct specinfo *, sizeof(*si), M_DEVT,
+ MALLOC(si, struct cdev *, sizeof(*si), M_DEVT,
M_USE_RESERVE | M_ZERO);
} else {
si = devt_stash + stashed++;
@@ -194,7 +194,7 @@ allocdev(void)
dev_t
makedev(int x, int y)
{
- struct specinfo *si;
+ struct cdev *si;
udev_t udev;
int hash;
diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c
index ebcba9463ec2..b739a17ddd99 100644
--- a/sys/kern/kern_mib.c
+++ b/sys/kern/kern_mib.c
@@ -321,8 +321,8 @@ SYSCTL_INT(_debug_sizeof, OID_AUTO, proc, CTLFLAG_RD,
0, sizeof(struct proc), "sizeof(struct proc)");
#include <sys/conf.h>
-SYSCTL_INT(_debug_sizeof, OID_AUTO, specinfo, CTLFLAG_RD,
- 0, sizeof(struct specinfo), "sizeof(struct specinfo)");
+SYSCTL_INT(_debug_sizeof, OID_AUTO, cdev, CTLFLAG_RD,
+ 0, sizeof(struct cdev), "sizeof(struct cdev)");
#include <sys/bio.h>
#include <sys/buf.h>
diff --git a/sys/sys/conf.h b/sys/sys/conf.h
index 97fa2729fec8..35ac4c2afdba 100644
--- a/sys/sys/conf.h
+++ b/sys/sys/conf.h
@@ -53,7 +53,7 @@ struct vnode;
struct buf;
TAILQ_HEAD(snaphead, inode);
-struct specinfo {
+struct cdev {
u_int si_flags;
#define SI_STASHED 0x0001 /* created in stashed storage */
#define SI_ALIAS 0x0002 /* carrier of alias name */
@@ -67,10 +67,10 @@ struct specinfo {
struct timespec si_ctime;
struct timespec si_mtime;
udev_t si_udev;
- LIST_ENTRY(specinfo) si_hash;
+ LIST_ENTRY(cdev) si_hash;
SLIST_HEAD(, vnode) si_hlist;
- LIST_HEAD(, specinfo) si_children;
- LIST_ENTRY(specinfo) si_siblings;
+ LIST_HEAD(, cdev) si_children;
+ LIST_ENTRY(cdev) si_siblings;
dev_t si_parent;
struct snaphead si_snapshots;
int (*si_copyonwrite)(struct vnode *, struct buf *);
diff --git a/sys/sys/linedisc.h b/sys/sys/linedisc.h
index 97fa2729fec8..35ac4c2afdba 100644
--- a/sys/sys/linedisc.h
+++ b/sys/sys/linedisc.h
@@ -53,7 +53,7 @@ struct vnode;
struct buf;
TAILQ_HEAD(snaphead, inode);
-struct specinfo {
+struct cdev {
u_int si_flags;
#define SI_STASHED 0x0001 /* created in stashed storage */
#define SI_ALIAS 0x0002 /* carrier of alias name */
@@ -67,10 +67,10 @@ struct specinfo {
struct timespec si_ctime;
struct timespec si_mtime;
udev_t si_udev;
- LIST_ENTRY(specinfo) si_hash;
+ LIST_ENTRY(cdev) si_hash;
SLIST_HEAD(, vnode) si_hlist;
- LIST_HEAD(, specinfo) si_children;
- LIST_ENTRY(specinfo) si_siblings;
+ LIST_HEAD(, cdev) si_children;
+ LIST_ENTRY(cdev) si_siblings;
dev_t si_parent;
struct snaphead si_snapshots;
int (*si_copyonwrite)(struct vnode *, struct buf *);
diff --git a/sys/sys/types.h b/sys/sys/types.h
index a669c1338cf3..ad891b0cc4d4 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -187,10 +187,10 @@ typedef __uintfptr_t uintfptr_t;
typedef u_int64_t uoff_t;
typedef struct vm_page *vm_page_t;
-struct specinfo;
+struct cdev;
typedef u_int32_t udev_t; /* device number */
-typedef struct specinfo *dev_t;
+typedef struct cdev *dev_t;
#define offsetof(type, field) __offsetof(type, field)
diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h
index 747c12cfa904..b6e8e843705e 100644
--- a/sys/sys/vnode.h
+++ b/sys/sys/vnode.h
@@ -121,7 +121,7 @@ struct vnode {
struct mount *vu_mountedhere;/* v ptr to mounted vfs (VDIR) */
struct socket *vu_socket; /* v unix ipc (VSOCK) */
struct {
- struct specinfo *vu_specinfo; /* v device (VCHR, VBLK) */
+ struct cdev *vu_cdev; /* v device (VCHR, VBLK) */
SLIST_ENTRY(vnode) vu_specnext; /* s device aliases */
} vu_spec;
struct fifoinfo *vu_fifoinfo; /* v fifo (VFIFO) */
@@ -152,7 +152,7 @@ struct vnode {
};
#define v_mountedhere v_un.vu_mountedhere
#define v_socket v_un.vu_socket
-#define v_rdev v_un.vu_spec.vu_specinfo
+#define v_rdev v_un.vu_spec.vu_cdev
#define v_specnext v_un.vu_spec.vu_specnext
#define v_fifoinfo v_un.vu_fifoinfo
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index 38736ff53d88..eb81388e69bb 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -872,14 +872,14 @@ bad:
/*
- * Read the specinfo structure in the kernel (as pointed to by a dev_t)
+ * Read the cdev structure in the kernel (as pointed to by a dev_t)
* in order to work out the associated udev_t
*/
udev_t
dev2udev(dev)
dev_t dev;
{
- struct specinfo si;
+ struct cdev si;
if (KVM_READ(dev, &si, sizeof si)) {
return si.si_udev;