From b13267a5123f6a14e47d788c4a8a2a8692e2a119 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sun, 10 Sep 2006 01:26:41 +0000 Subject: [PATCH] Change the kernel dev_t, representing a pointer to a specinfo structure, to cdev_t. Change struct specinfo to struct cdev. The name 'cdev' was taken from FreeBSD. Remove the dev_t shim for the kernel. This commit generally removes the overloading of 'dev_t' between userland and the kernel. Also fix a bug in libkvm where a kernel dev_t (now cdev_t) was not being properly converted to a userland dev_t. --- lib/libkvm/kvm_proc.c | 16 ++++- sbin/fsck/fsck.h | 12 +++- sbin/fsck/inode.c | 6 +- sbin/fsck/pass2.c | 14 ++++- sbin/fsck/setup.c | 24 +++++--- sbin/i386/fdisk/fdisk.8 | 10 +++- sbin/i386/fdisk/fdisk.c | 61 ++++++++++++++----- sys/amd64/include/cpu.h | 4 +- sys/boot/common/dinode.h | 4 +- sys/boot/i386/libi386/bioscd.c | 6 +- sys/boot/i386/libi386/biosdisk.c | 4 +- sys/boot/i386/libi386/libi386.h | 6 +- sys/boot/pc32/libi386/bioscd.c | 6 +- sys/boot/pc32/libi386/biosdisk.c | 4 +- sys/boot/pc32/libi386/libi386.h | 6 +- sys/bus/cam/cam_extend.c | 4 +- sys/bus/cam/cam_xpt.c | 8 +-- sys/bus/cam/scsi/scsi_cd.c | 10 ++-- sys/bus/cam/scsi/scsi_ch.c | 8 +-- sys/bus/cam/scsi/scsi_da.c | 12 ++-- sys/bus/cam/scsi/scsi_pass.c | 10 ++-- sys/bus/cam/scsi/scsi_pt.c | 12 ++-- sys/bus/cam/scsi/scsi_sa.c | 14 ++--- sys/bus/cam/scsi/scsi_ses.c | 8 +-- sys/bus/cam/scsi/scsi_target.c | 14 ++--- sys/bus/firewire/firewirereg.h | 6 +- sys/bus/firewire/fwdev.c | 20 +++---- sys/bus/firewire/fwmem.c | 10 ++-- sys/bus/firewire/fwohci.c | 4 +- sys/bus/iicbus/iic.c | 12 ++-- sys/bus/isa/vga_isa.c | 14 ++--- sys/bus/pccard/slot.h | 4 +- sys/bus/smbus/smb.c | 8 +-- sys/bus/usb/usb.c | 12 ++-- sys/conf/nfsswapkernel.c | 6 +- sys/contrib/dev/fla/fla.c | 12 ++-- sys/contrib/ipfilter/netinet/ip_fil.c | 12 ++-- sys/contrib/ipfilter/netinet/ip_fil.h | 86 ++++----------------------- sys/cpu/i386/include/cpu.h | 4 +- sys/ddb/db_command.c | 4 +- sys/ddb/ddb.h | 4 +- sys/dev/acpica5/acpivar.h | 4 +- sys/dev/agp/agp.c | 10 ++-- sys/dev/disk/ata/ata-disk.c | 10 ++-- sys/dev/disk/ata/ata-disk.h | 4 +- sys/dev/disk/ata/ata-raid.c | 6 +- sys/dev/disk/ata/ata-raid.h | 4 +- sys/dev/disk/ata/atapi-cd.c | 14 ++--- sys/dev/disk/ata/atapi-cd.h | 6 +- sys/dev/disk/ata/atapi-fd.c | 12 ++-- sys/dev/disk/ata/atapi-fd.h | 4 +- sys/dev/disk/ata/atapi-tape.c | 12 ++-- sys/dev/disk/ccd/ccd.c | 22 +++---- sys/dev/disk/fd/fd.c | 20 +++---- sys/dev/disk/isp/isp_freebsd.c | 4 +- sys/dev/disk/mcd/mcd.c | 16 ++--- sys/dev/disk/md/md.c | 14 ++--- sys/dev/disk/scd/scd.c | 12 ++-- sys/dev/disk/vn/vn.c | 28 ++++----- sys/dev/disk/wt/wt.c | 10 ++-- sys/dev/drm/drmP.h | 4 +- sys/dev/drm/drm_drv.h | 12 ++-- sys/dev/drm/drm_fops.h | 4 +- sys/dev/drm/drm_os_freebsd.h | 6 +- sys/dev/drm/drm_vm.h | 16 ++--- sys/dev/misc/dcons/dcons_os.c | 12 ++-- sys/dev/misc/gpib/gpib.c | 8 +-- sys/dev/misc/joy/joy.c | 10 ++-- sys/dev/misc/kbd/kbd.c | 20 +++---- sys/dev/misc/labpc/labpc.c | 20 +++---- sys/dev/misc/lpt/lpt.c | 12 ++-- sys/dev/misc/mse/mse.c | 16 ++--- sys/dev/misc/nmdm/nmdm.c | 18 +++--- sys/dev/misc/pcfclock/pcfclock.c | 16 ++--- sys/dev/misc/ppi/ppi.c | 12 ++-- sys/dev/misc/pps/pps.c | 8 +-- sys/dev/misc/psm/psm.c | 12 ++-- sys/dev/misc/snp/snp.c | 24 ++++---- sys/dev/misc/spigot/spigot.c | 8 +-- sys/dev/misc/syscons/syscons.c | 26 ++++---- sys/dev/misc/syscons/syscons.h | 4 +- sys/dev/misc/syscons/sysmouse.c | 10 ++-- sys/dev/misc/tw/tw.c | 12 ++-- sys/dev/misc/xrpu/xrpu.c | 8 +-- sys/dev/netif/cx/cx.c | 8 +-- sys/dev/raid/aac/aac.c | 10 ++-- sys/dev/raid/aac/aac_disk.c | 10 ++-- sys/dev/raid/aac/aacvar.h | 6 +- sys/dev/raid/amr/amr.c | 10 ++-- sys/dev/raid/amr/amr_disk.c | 10 ++-- sys/dev/raid/amr/amrvar.h | 6 +- sys/dev/raid/asr/asr.c | 10 ++-- sys/dev/raid/ciss/ciss.c | 8 +-- sys/dev/raid/ciss/cissvar.h | 4 +- sys/dev/raid/dpt/dpt_control.c | 22 +++---- sys/dev/raid/ida/ida_disk.c | 14 ++--- sys/dev/raid/iir/iir.h | 8 +-- sys/dev/raid/iir/iir_ctrl.c | 10 ++-- sys/dev/raid/ips/ips.c | 8 +-- sys/dev/raid/ips/ips_disk.c | 10 ++-- sys/dev/raid/ips/ips_disk.h | 4 +- sys/dev/raid/mlx/mlx.c | 8 +-- sys/dev/raid/mlx/mlx_disk.c | 10 ++-- sys/dev/raid/mlx/mlxvar.h | 4 +- sys/dev/raid/mly/mly.c | 8 +-- sys/dev/raid/mly/mlyvar.h | 4 +- sys/dev/raid/pst/pst-raid.c | 4 +- sys/dev/raid/twa/twa_freebsd.c | 10 ++-- sys/dev/raid/twe/twe_compat.h | 4 +- sys/dev/raid/twe/twe_freebsd.c | 20 +++---- sys/dev/raid/twe/twevar.h | 4 +- sys/dev/raid/vinum/vinum.c | 8 +-- sys/dev/raid/vinum/vinumdaemon.c | 8 +-- sys/dev/raid/vinum/vinumext.h | 12 ++-- sys/dev/raid/vinum/vinuminterrupt.c | 4 +- sys/dev/raid/vinum/vinumio.c | 4 +- sys/dev/raid/vinum/vinumioctl.c | 4 +- sys/dev/raid/vinum/vinumrequest.c | 22 +++---- sys/dev/raid/vinum/vinumrevive.c | 6 +- sys/dev/raid/vinum/vinumutil.c | 8 +-- sys/dev/raid/vinum/vinumvar.h | 4 +- sys/dev/serial/cy/cy.c | 10 ++-- sys/dev/serial/dgb/dgm.c | 8 +-- sys/dev/serial/digi/digi.c | 12 ++-- sys/dev/serial/digi/digi.h | 6 +- sys/dev/serial/rc/rc.c | 8 +-- sys/dev/serial/rp/rp.c | 10 ++-- sys/dev/serial/si/si.c | 14 ++--- sys/dev/serial/sio/sio.c | 18 +++--- sys/dev/serial/stl/stallion.c | 16 ++--- sys/dev/serial/stli/istallion.c | 24 ++++---- sys/dev/sound/pcm/dsp.c | 36 +++++------ sys/dev/sound/pcm/mixer.c | 30 +++++----- sys/dev/usbmisc/ucom/ucom.c | 14 ++--- sys/dev/usbmisc/ucom/ucomvar.h | 4 +- sys/dev/usbmisc/ufm/ufm.c | 16 ++--- sys/dev/usbmisc/ugen/ugen.c | 20 +++---- sys/dev/usbmisc/uhid/uhid.c | 14 ++--- sys/dev/usbmisc/ulpt/ulpt.c | 8 +-- sys/dev/usbmisc/ums/ums.c | 12 ++-- sys/dev/usbmisc/urio/urio.c | 22 +++---- sys/dev/usbmisc/uscanner/uscanner.c | 12 ++-- sys/dev/video/bktr/bktr_core.c | 4 +- sys/dev/video/bktr/bktr_core.h | 4 +- sys/dev/video/bktr/bktr_os.c | 14 ++--- sys/dev/video/ctx/ctx.c | 12 ++-- sys/dev/video/fb/fb.c | 20 +++---- sys/dev/video/fb/fbreg.h | 6 +- sys/dev/video/fb/vga.c | 14 ++--- sys/dev/video/fb/vgareg.h | 16 ++--- sys/dev/video/gsc/gsc.c | 10 ++-- sys/dev/video/meteor/meteor.c | 14 ++--- sys/emulation/linux/linux_stats.c | 12 ++-- sys/i386/apm/apm.c | 10 ++-- sys/i386/gnu/isa/dgb.c | 8 +-- sys/i386/i386/autoconf.c | 10 ++-- sys/i386/i386/machdep.c | 8 +-- sys/i386/i386/mem.c | 24 ++++---- sys/i386/include/cpu.h | 4 +- sys/i386/isa/asc.c | 12 ++-- sys/kern/kern_conf.c | 52 ++++++++-------- sys/kern/kern_device.c | 40 ++++++------- sys/kern/kern_memio.c | 24 ++++---- sys/kern/kern_nrandom.c | 4 +- sys/kern/kern_physio.c | 4 +- sys/kern/kern_shutdown.c | 10 ++-- sys/kern/subr_disk.c | 28 ++++----- sys/kern/subr_diskmbr.c | 10 ++-- sys/kern/subr_diskslice.c | 16 ++--- sys/kern/sys_generic.c | 4 +- sys/kern/tty.c | 20 +++---- sys/kern/tty_conf.c | 4 +- sys/kern/tty_cons.c | 18 +++--- sys/kern/tty_pty.c | 28 ++++----- sys/kern/tty_tty.c | 4 +- sys/kern/vfs_conf.c | 20 +++---- sys/kern/vfs_subr.c | 26 ++++---- sys/kern/vfs_vnops.c | 10 ++-- sys/net/bpf.c | 14 ++--- sys/net/i4b/driver/i4b_ctl.c | 6 +- sys/net/i4b/driver/i4b_rbch.c | 14 ++--- sys/net/i4b/driver/i4b_tel.c | 14 ++--- sys/net/i4b/driver/i4b_trace.c | 10 ++-- sys/net/i4b/layer4/i4b_i4bdrv.c | 10 ++-- sys/net/pf/pf_ioctl.c | 8 +-- sys/net/ppp_layer/ppp_tty.c | 6 +- sys/net/sl/if_sl.c | 6 +- sys/net/tap/if_tap.c | 18 +++--- sys/net/tap/if_tapvar.h | 4 +- sys/net/tun/if_tun.c | 18 +++--- sys/netgraph/ng_device.c | 16 ++--- sys/netgraph/tty/ng_tty.c | 6 +- sys/netproto/smb/smb_dev.c | 10 ++-- sys/platform/pc32/apm/apm.c | 10 ++-- sys/platform/pc32/gnu/isa/dgb.c | 8 +-- sys/platform/pc32/i386/autoconf.c | 10 ++-- sys/platform/pc32/i386/machdep.c | 8 +-- sys/platform/pc32/i386/mem.c | 24 ++++---- sys/platform/pc32/isa/asc.c | 12 ++-- sys/sys/ccdvar.h | 6 +- sys/sys/conf.h | 32 +++++----- sys/sys/cons.h | 12 ++-- sys/sys/device.h | 72 +++++++++++----------- sys/sys/disk.h | 10 ++-- sys/sys/disklabel.h | 22 +++---- sys/sys/disklabel32.h | 22 +++---- sys/sys/diskslice.h | 16 ++--- sys/sys/mount.h | 4 +- sys/sys/odisklabel.h | 22 +++---- sys/sys/param.h | 8 ++- sys/sys/random.h | 4 +- sys/sys/snoop.h | 11 +++- sys/sys/sysctl.h | 4 +- sys/sys/systm.h | 20 +++---- sys/sys/tty.h | 6 +- sys/sys/types.h | 14 +++-- sys/sys/user.h | 6 +- sys/sys/vnode.h | 10 ++-- sys/vfs/gnu/ext2fs/dinode.h | 4 +- sys/vfs/gnu/ext2fs/ext2_extern.h | 8 +-- sys/vfs/gnu/ext2fs/ext2_ihash.c | 8 +-- sys/vfs/gnu/ext2fs/ext2_vfsops.c | 10 ++-- sys/vfs/gnu/ext2fs/ext2mount.h | 4 +- sys/vfs/gnu/ext2fs/inode.h | 4 +- sys/vfs/hpfs/hpfs.h | 12 ++-- sys/vfs/hpfs/hpfs_hash.c | 6 +- sys/vfs/hpfs/hpfs_vfsops.c | 4 +- sys/vfs/isofs/cd9660/cd9660_node.c | 4 +- sys/vfs/isofs/cd9660/cd9660_node.h | 6 +- sys/vfs/isofs/cd9660/cd9660_vfsops.c | 10 ++-- sys/vfs/isofs/cd9660/iso.h | 4 +- sys/vfs/mfs/mfs_vfsops.c | 8 +-- sys/vfs/mfs/mfsnode.h | 4 +- sys/vfs/msdosfs/denode.h | 4 +- sys/vfs/msdosfs/msdosfs_denode.c | 8 +-- sys/vfs/msdosfs/msdosfs_vfsops.c | 4 +- sys/vfs/msdosfs/msdosfsmount.h | 4 +- sys/vfs/ntfs/ntfs.h | 4 +- sys/vfs/ntfs/ntfs_ihash.c | 4 +- sys/vfs/ntfs/ntfs_ihash.h | 6 +- sys/vfs/ntfs/ntfs_inode.h | 4 +- sys/vfs/ntfs/ntfs_vfsops.c | 4 +- sys/vfs/specfs/spec_vnops.c | 18 +++--- sys/vfs/udf/udf.h | 6 +- sys/vfs/udf/udf_vfsops.c | 4 +- sys/vfs/ufs/dinode.h | 4 +- sys/vfs/ufs/ffs_vfsops.c | 8 +-- sys/vfs/ufs/inode.h | 4 +- sys/vfs/ufs/ufs_extern.h | 8 +-- sys/vfs/ufs/ufs_ihash.c | 8 +-- sys/vfs/ufs/ufsmount.h | 4 +- sys/vm/device_pager.c | 6 +- sys/vm/vm_swap.c | 4 +- test/sysperf/Makefile | 12 +++- 254 files changed, 1479 insertions(+), 1441 deletions(-) diff --git a/lib/libkvm/kvm_proc.c b/lib/libkvm/kvm_proc.c index 35d9362c12..e976211bf5 100644 --- a/lib/libkvm/kvm_proc.c +++ b/lib/libkvm/kvm_proc.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/lib/libkvm/kvm_proc.c,v 1.25.2.3 2002/08/24 07:27:46 kris Exp $ - * $DragonFly: src/lib/libkvm/kvm_proc.c,v 1.7 2004/10/25 19:38:45 drhodus Exp $ + * $DragonFly: src/lib/libkvm/kvm_proc.c,v 1.8 2006/09/10 01:26:26 dillon Exp $ * * @(#)kvm_proc.c 8.3 (Berkeley) 9/23/93 */ @@ -47,8 +47,9 @@ * most other applications are interested only in open/close/read/nlist). */ -#include #include +#include +#include #include #include #include @@ -104,6 +105,7 @@ kvm_proclist(kvm_t *kd, int what, int arg, struct proc *p, struct proc proc; struct thread thread; struct proc pproc; + struct cdev cdev; for (; cnt < maxcnt && p != NULL; p = proc.p_list.le_next) { if (KREAD(kd, (u_long)p, &proc)) { @@ -179,7 +181,15 @@ kvm_proclist(kvm_t *kd, int what, int arg, struct proc *p, "can't read tty at %x", sess.s_ttyp); return (-1); } - eproc.e_tdev = tty.t_dev; + if (tty.t_dev && tty.t_dev != NOCDEV) { + if (KREAD(kd, (u_long)tty.t_dev, &cdev)) { + eproc.e_tdev = cdev.si_udev; + } else { + eproc.e_tdev = NODEV; + } + } else { + eproc.e_tdev = NODEV; + } eproc.e_tsess = tty.t_session; if (tty.t_pgrp != NULL) { if (KREAD(kd, (u_long)tty.t_pgrp, &pgrp)) { diff --git a/sbin/fsck/fsck.h b/sbin/fsck/fsck.h index 9237cdaf86..17252c787f 100644 --- a/sbin/fsck/fsck.h +++ b/sbin/fsck/fsck.h @@ -32,7 +32,7 @@ * * @(#)fsck.h 8.4 (Berkeley) 5/9/95 * $FreeBSD: src/sbin/fsck/fsck.h,v 1.12.2.1 2001/01/23 23:11:07 iedowse Exp $ - * $DragonFly: src/sbin/fsck/fsck.h,v 1.5 2006/04/03 01:58:49 dillon Exp $ + * $DragonFly: src/sbin/fsck/fsck.h,v 1.6 2006/09/10 01:26:27 dillon Exp $ */ #include @@ -183,9 +183,17 @@ struct inoinfo { u_int i_numblks; /* size of block array in bytes */ ufs_daddr_t i_blks[1]; /* actually longer */ } **inphead, **inpsort; -long numdirs, dirhash, listmax, inplast; +long numdirs, dirhash, listmax, inplast, dirhashmask; long countdirs; /* number of directories we actually found */ +/* + * Be careful about cache locality of reference, large filesystems may + * have tens of millions of directories in them and if fsck has to swap + * we want it to swap efficiently. For this reason we try to group + * adjacent inodes together by a reasonable factor. + */ +#define DIRHASH(ino) ((ino >> 3) & dirhashmask) + char *cdevname; /* name of device being checked */ long dev_bsize; /* computed value of DEV_BSIZE */ long secsize; /* actual disk sector size */ diff --git a/sbin/fsck/inode.c b/sbin/fsck/inode.c index 86c5ba9404..63ba34a40e 100644 --- a/sbin/fsck/inode.c +++ b/sbin/fsck/inode.c @@ -32,7 +32,7 @@ * * @(#)inode.c 8.8 (Berkeley) 4/28/95 * $FreeBSD: src/sbin/fsck/inode.c,v 1.20 2000/02/28 20:02:41 mckusick Exp $ - * $DragonFly: src/sbin/fsck/inode.c,v 1.9 2006/04/03 01:58:49 dillon Exp $ + * $DragonFly: src/sbin/fsck/inode.c,v 1.10 2006/09/10 01:26:27 dillon Exp $ */ #include @@ -380,7 +380,7 @@ cacheino(struct ufs1_dinode *dp, ino_t inumber) malloc(sizeof(*inp) + (blks - 1) * sizeof(ufs_daddr_t)); if (inp == NULL) errx(EEXIT, "cannot increase directory list"); - inpp = &inphead[inumber % dirhash]; + inpp = &inphead[DIRHASH(inumber)]; inp->i_nexthash = *inpp; *inpp = inp; inp->i_parent = inumber == ROOTINO ? ROOTINO : (ino_t)0; @@ -407,7 +407,7 @@ getinoinfo(ino_t inumber) { struct inoinfo *inp; - for (inp = inphead[inumber % dirhash]; inp; inp = inp->i_nexthash) { + for (inp = inphead[DIRHASH(inumber)]; inp; inp = inp->i_nexthash) { if (inp->i_number != inumber) continue; return (inp); diff --git a/sbin/fsck/pass2.c b/sbin/fsck/pass2.c index 9a3f87c8fd..3629f8f885 100644 --- a/sbin/fsck/pass2.c +++ b/sbin/fsck/pass2.c @@ -32,7 +32,7 @@ * * @(#)pass2.c 8.9 (Berkeley) 4/28/95 * $FreeBSD: src/sbin/fsck/pass2.c,v 1.10.2.2 2001/11/24 15:14:59 iedowse Exp $ - * $DragonFly: src/sbin/fsck/pass2.c,v 1.9 2006/04/03 01:58:49 dillon Exp $ + * $DragonFly: src/sbin/fsck/pass2.c,v 1.10 2006/09/10 01:26:27 dillon Exp $ */ #include @@ -59,6 +59,7 @@ pass2(void) struct inodesc curino; struct ufs1_dinode dino; char pathbuf[MAXPATHLEN + 1]; + long i, n; switch (inoinfo(ROOTINO)->ino_state) { @@ -118,9 +119,16 @@ pass2(void) inoinfo(WINO)->ino_type = DT_WHT; } /* - * Sort the directory list into disk block order. + * Sort the directory list into disk block order. Do this in blocks + * of 1000 directories in order to maintain locality of reference + * in memory in case fsck is using swap space. */ - qsort((char *)inpsort, (size_t)inplast, sizeof *inpsort, blksort); + for (i = 0; i < inplast; i += 1000) { + if ((n = inplast - i) > 1000) + n = 1000; + qsort(inpsort + i, (size_t)n, sizeof *inpsort, blksort); + } + /* * Check the integrity of each directory. */ diff --git a/sbin/fsck/setup.c b/sbin/fsck/setup.c index a927770add..eaf5eb151b 100644 --- a/sbin/fsck/setup.c +++ b/sbin/fsck/setup.c @@ -32,7 +32,7 @@ * * @(#)setup.c 8.10 (Berkeley) 5/9/95 * $FreeBSD: src/sbin/fsck/setup.c,v 1.17.2.4 2002/06/24 05:10:41 dillon Exp $ - * $DragonFly: src/sbin/fsck/setup.c,v 1.6 2005/11/06 12:13:53 swildner Exp $ + * $DragonFly: src/sbin/fsck/setup.c,v 1.7 2006/09/10 01:26:27 dillon Exp $ */ #define DKTYPENAMES @@ -283,20 +283,28 @@ setup(char *dev) goto badsb; } numdirs = sblock.fs_cstotal.cs_ndir; - dirhash = numdirs; + + /* + * Calculate the directory hash table size. Do not allocate + * a ridiculous amount of memory if we have a lot of directories. + */ + for (dirhash = 16; dirhash < numdirs; dirhash <<= 1) + ; + if (dirhash > 1024*1024) + dirhash /= 8; + dirhashmask = dirhash - 1; + if (numdirs == 0) { printf("numdirs is zero, try using an alternate superblock\n"); goto badsb; } inplast = 0; listmax = numdirs + 10; - inpsort = (struct inoinfo **)calloc((unsigned)listmax, - sizeof(struct inoinfo *)); - inphead = (struct inoinfo **)calloc((unsigned)numdirs, - sizeof(struct inoinfo *)); + inpsort = calloc((unsigned)listmax, sizeof(struct inoinfo *)); + inphead = calloc((unsigned)dirhash, sizeof(struct inoinfo *)); if (inpsort == NULL || inphead == NULL) { - printf("cannot alloc %u bytes for inphead\n", - (unsigned)numdirs * sizeof(struct inoinfo *)); + printf("cannot allocate base structures for %ld directories\n", + numdirs); goto badsb; } bufinit(); diff --git a/sbin/i386/fdisk/fdisk.8 b/sbin/i386/fdisk/fdisk.8 index 2fb44277a5..79a4f1213f 100644 --- a/sbin/i386/fdisk/fdisk.8 +++ b/sbin/i386/fdisk/fdisk.8 @@ -1,5 +1,5 @@ .\" $FreeBSD: src/sbin/i386/fdisk/fdisk.8,v 1.17.2.11 2002/04/25 16:25:12 trhodes Exp $ -.\" $DragonFly: src/sbin/i386/fdisk/fdisk.8,v 1.9 2006/02/28 02:25:10 swildner Exp $ +.\" $DragonFly: src/sbin/i386/fdisk/fdisk.8,v 1.10 2006/09/10 01:26:28 dillon Exp $ .\" .Dd October 4, 1996 .Dt FDISK 8 @@ -9,7 +9,7 @@ .Nd PC slice table maintenance program .Sh SYNOPSIS .Nm -.Op Fl BIaistu +.Op Fl BCIaistu .Op Fl b Ar bootcode .Op Fl p Ar diskimage .Op Fl 1234 @@ -69,6 +69,12 @@ Reinitialize the boot code contained in sector 0 of the disk. Ignored if .Fl f is given. +.It Fl C +Normally if the CHS fields for a partition are set to all 1's if they +would otherwise wrap. This typically causes BIOSes to properly detect +that the disk should be put in Large mode. If this option is specified +the CHS fields will be set to wrapped values instead. This option may +be needed on very old PCs. .It Fl f Ar configfile Set slice values using the file .Ar configfile . diff --git a/sbin/i386/fdisk/fdisk.c b/sbin/i386/fdisk/fdisk.c index 68b5022c7a..d1d353eb8f 100644 --- a/sbin/i386/fdisk/fdisk.c +++ b/sbin/i386/fdisk/fdisk.c @@ -24,7 +24,7 @@ * the rights to redistribute these changes. * * $FreeBSD: /repoman/r/ncvs/src/sbin/i386/fdisk/fdisk.c,v 1.36.2.14 2004/01/30 14:40:47 harti Exp $ - * $DragonFly: src/sbin/i386/fdisk/fdisk.c,v 1.11 2005/11/06 12:19:22 swildner Exp $ + * $DragonFly: src/sbin/i386/fdisk/fdisk.c,v 1.12 2006/09/10 01:26:28 dillon Exp $ */ #include @@ -94,6 +94,7 @@ int dos_cylsecs; #define DOSSECT(s,c) ((s & 0x3f) | ((c >> 2) & 0xc0)) #define DOSCYL(c) (c & 0xff) +#define MAXCYL 1023 static int partition = -1; @@ -117,6 +118,7 @@ typedef struct cmd { static int B_flag = 0; /* replace boot code */ +static int C_flag = 0; /* use wrapped values for CHS */ static int I_flag = 0; /* use entire disk for DragonFly */ static int a_flag = 0; /* set active partition */ static char *b_flag = NULL; /* path to boot code */ @@ -255,11 +257,14 @@ main(int argc, char *argv[]) { int c, i; - while ((c = getopt(argc, argv, "BIab:f:p:istuv1234")) != -1) + while ((c = getopt(argc, argv, "BCIab:f:p:istuv1234")) != -1) switch (c) { case 'B': B_flag = 1; break; + case 'C': + C_flag = 1; + break; case 'I': I_flag = 1; break; @@ -595,9 +600,16 @@ struct dos_partition *partp = ((struct dos_partition *) &mboot.parts) + i - 1; Decimal("beginning cylinder", tcyl, tmp); Decimal("beginning head", thd, tmp); Decimal("beginning sector", tsec, tmp); - partp->dp_scyl = DOSCYL(tcyl); - partp->dp_ssect = DOSSECT(tsec,tcyl); - partp->dp_shd = thd; + if (tcyl > MAXCYL && C_flag == 0) { + printf("Warning: starting cylinder wraps, using all 1's\n"); + partp->dp_scyl = -1; + partp->dp_ssect = -1; + partp->dp_shd = -1; + } else { + partp->dp_scyl = DOSCYL(tcyl); + partp->dp_ssect = DOSSECT(tsec,tcyl); + partp->dp_shd = thd; + } tcyl = DPCYL(partp->dp_ecyl,partp->dp_esect); thd = partp->dp_ehd; @@ -605,9 +617,16 @@ struct dos_partition *partp = ((struct dos_partition *) &mboot.parts) + i - 1; Decimal("ending cylinder", tcyl, tmp); Decimal("ending head", thd, tmp); Decimal("ending sector", tsec, tmp); - partp->dp_ecyl = DOSCYL(tcyl); - partp->dp_esect = DOSSECT(tsec,tcyl); - partp->dp_ehd = thd; + if (tcyl > MAXCYL && C_flag == 0) { + printf("Warning: ending cylinder wraps, using all 1's\n"); + partp->dp_ecyl = -1; + partp->dp_esect = -1; + partp->dp_ehd = -1; + } else { + partp->dp_ecyl = DOSCYL(tcyl); + partp->dp_esect = DOSSECT(tsec,tcyl); + partp->dp_ehd = thd; + } } else dos(partp); @@ -709,19 +728,33 @@ dos(struct dos_partition *partp) } /* Start c/h/s. */ - partp->dp_shd = partp->dp_start % dos_cylsecs / dos_sectors; cy = partp->dp_start / dos_cylsecs; sec = partp->dp_start % dos_sectors + 1; - partp->dp_scyl = DOSCYL(cy); - partp->dp_ssect = DOSSECT(sec, cy); + if (cy > MAXCYL && C_flag == 0) { + printf("Warning: starting cylinder wraps, using all 1's\n"); + partp->dp_shd = -1; + partp->dp_scyl = -1; + partp->dp_ssect = -1; + } else { + partp->dp_shd = partp->dp_start % dos_cylsecs / dos_sectors; + partp->dp_scyl = DOSCYL(cy); + partp->dp_ssect = DOSSECT(sec, cy); + } /* End c/h/s. */ end = partp->dp_start + partp->dp_size - 1; - partp->dp_ehd = end % dos_cylsecs / dos_sectors; cy = end / dos_cylsecs; sec = end % dos_sectors + 1; - partp->dp_ecyl = DOSCYL(cy); - partp->dp_esect = DOSSECT(sec, cy); + if (cy > MAXCYL && C_flag == 0) { + printf("Warning: ending cylinder wraps, using all 1's\n"); + partp->dp_ehd = -1; + partp->dp_ecyl = -1; + partp->dp_esect = -1; + } else { + partp->dp_ehd = end % dos_cylsecs / dos_sectors; + partp->dp_ecyl = DOSCYL(cy); + partp->dp_esect = DOSSECT(sec, cy); + } } int fd; diff --git a/sys/amd64/include/cpu.h b/sys/amd64/include/cpu.h index 96fdf4933c..e6e9aa09e0 100644 --- a/sys/amd64/include/cpu.h +++ b/sys/amd64/include/cpu.h @@ -35,7 +35,7 @@ * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/cpu.h,v 1.43.2.2 2001/06/15 09:37:57 scottl Exp $ - * $DragonFly: src/sys/amd64/include/Attic/cpu.h,v 1.1 2006/07/27 00:42:46 corecode Exp $ + * $DragonFly: src/sys/amd64/include/Attic/cpu.h,v 1.2 2006/09/10 01:26:29 dillon Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -44,7 +44,7 @@ /* * CTL_MACHDEP definitions. */ -#define CPU_CONSDEV 1 /* dev_t: console terminal device */ +#define CPU_CONSDEV 1 /* cdev_t: console terminal device */ #define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */ #define CPU_DISRTCSET 3 /* int: disable resettodr() call */ #define CPU_BOOTINFO 4 /* struct: bootinfo */ diff --git a/sys/boot/common/dinode.h b/sys/boot/common/dinode.h index 07bde9cc5a..e16f215fd3 100644 --- a/sys/boot/common/dinode.h +++ b/sys/boot/common/dinode.h @@ -42,7 +42,7 @@ * * @(#)dinode.h 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/sys/ufs/ufs/dinode.h,v 1.11 2002/07/16 22:36:00 mckusick Exp $ - * $DragonFly: src/sys/boot/common/dinode.h,v 1.1 2003/11/10 06:08:31 dillon Exp $ + * $DragonFly: src/sys/boot/common/dinode.h,v 1.2 2006/09/10 01:26:30 dillon Exp $ */ #ifndef _UFS_UFS_DINODE_H_ @@ -132,7 +132,7 @@ struct ufs2_dinode { * The di_db fields may be overlaid with other information for * file types that do not have associated disk storage. Block * and character devices overlay the first data block with their - * dev_t value. Short symbolic links place their path in the + * cdev_t value. Short symbolic links place their path in the * di_db area. */ #define di_rdev di_db[0] diff --git a/sys/boot/i386/libi386/bioscd.c b/sys/boot/i386/libi386/bioscd.c index 4d35253760..2c3835e55f 100644 --- a/sys/boot/i386/libi386/bioscd.c +++ b/sys/boot/i386/libi386/bioscd.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/boot/i386/libi386/bioscd.c,v 1.5 2003/08/25 23:28:31 obrien Exp $ - * $DragonFly: src/sys/boot/i386/libi386/Attic/bioscd.c,v 1.5 2004/09/09 03:47:08 joerg Exp $ + * $DragonFly: src/sys/boot/i386/libi386/Attic/bioscd.c,v 1.6 2006/09/10 01:26:31 dillon Exp $ */ /* * BIOS CD device handling for CD's that have been booted off of via no @@ -322,7 +322,7 @@ bc_read(int unit, daddr_t dblk, int blks, caddr_t dest) } /* - * Return a suitable dev_t value for (dev). + * Return a suitable cdev_t value for (dev). */ int bc_getdev(struct i386_devdesc *dev) @@ -341,7 +341,7 @@ bc_getdev(struct i386_devdesc *dev) * XXX: Need to examine device spec here to figure out if SCSI or * ATAPI. No idea on how to figure out device number. All we can * really pass to the kernel is what bus and device on which bus we - * were booted from, which dev_t isn't well suited to since those + * were booted from, which cdev_t isn't well suited to since those * number don't match to unit numbers very well. We may just need * to engage in a hack where we pass -C to the boot args if we are * the boot device. diff --git a/sys/boot/i386/libi386/biosdisk.c b/sys/boot/i386/libi386/biosdisk.c index 7a160b7cbe..03ec08cb01 100644 --- a/sys/boot/i386/libi386/biosdisk.c +++ b/sys/boot/i386/libi386/biosdisk.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.45 2004/09/21 06:46:44 wes Exp $ - * $DragonFly: src/sys/boot/i386/libi386/Attic/biosdisk.c,v 1.9 2004/12/20 01:16:14 dillon Exp $ + * $DragonFly: src/sys/boot/i386/libi386/Attic/biosdisk.c,v 1.10 2006/09/10 01:26:31 dillon Exp $ */ /* @@ -1239,7 +1239,7 @@ bd_getbigeom(int bunit) } /* - * Return a suitable dev_t value for (dev). + * Return a suitable cdev_t value for (dev). * * In the case where it looks like (dev) is a SCSI disk, we allow the number of * IDE disks to be specified in $num_ide_disks. There should be a Better Way. diff --git a/sys/boot/i386/libi386/libi386.h b/sys/boot/i386/libi386/libi386.h index 325ce0ae2b..0d14642871 100644 --- a/sys/boot/i386/libi386/libi386.h +++ b/sys/boot/i386/libi386/libi386.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.16 2003/05/01 03:56:29 peter Exp $ - * $DragonFly: src/sys/boot/i386/libi386/Attic/libi386.h,v 1.4 2004/09/09 03:47:08 joerg Exp $ + * $DragonFly: src/sys/boot/i386/libi386/Attic/libi386.h,v 1.5 2006/09/10 01:26:31 dillon Exp $ */ @@ -73,13 +73,13 @@ extern struct devsw pxedisk; extern struct fs_ops pxe_fsops; int bc_add(int biosdev); /* Register CD booted from. */ -int bc_getdev(struct i386_devdesc *dev); /* return dev_t for (dev) */ +int bc_getdev(struct i386_devdesc *dev); /* return cdev_t for (dev) */ int bc_bios2unit(int biosdev); /* xlate BIOS device -> bioscd unit */ int bc_unit2bios(int unit); /* xlate bioscd unit -> BIOS device */ u_int32_t bd_getbigeom(int bunit); /* return geometry in bootinfo format */ int bd_bios2unit(int biosdev); /* xlate BIOS device -> biosdisk unit */ int bd_unit2bios(int unit); /* xlate biosdisk unit -> BIOS device */ -int bd_getdev(struct i386_devdesc *dev); /* return dev_t for (dev) */ +int bd_getdev(struct i386_devdesc *dev); /* return cdev_t for (dev) */ ssize_t i386_copyin(const void *src, vm_offset_t dest, const size_t len); ssize_t i386_copyout(const vm_offset_t src, void *dest, const size_t len); diff --git a/sys/boot/pc32/libi386/bioscd.c b/sys/boot/pc32/libi386/bioscd.c index 4373853e1b..e815781cf8 100644 --- a/sys/boot/pc32/libi386/bioscd.c +++ b/sys/boot/pc32/libi386/bioscd.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/boot/i386/libi386/bioscd.c,v 1.5 2003/08/25 23:28:31 obrien Exp $ - * $DragonFly: src/sys/boot/pc32/libi386/bioscd.c,v 1.5 2004/09/09 03:47:08 joerg Exp $ + * $DragonFly: src/sys/boot/pc32/libi386/bioscd.c,v 1.6 2006/09/10 01:26:31 dillon Exp $ */ /* * BIOS CD device handling for CD's that have been booted off of via no @@ -322,7 +322,7 @@ bc_read(int unit, daddr_t dblk, int blks, caddr_t dest) } /* - * Return a suitable dev_t value for (dev). + * Return a suitable cdev_t value for (dev). */ int bc_getdev(struct i386_devdesc *dev) @@ -341,7 +341,7 @@ bc_getdev(struct i386_devdesc *dev) * XXX: Need to examine device spec here to figure out if SCSI or * ATAPI. No idea on how to figure out device number. All we can * really pass to the kernel is what bus and device on which bus we - * were booted from, which dev_t isn't well suited to since those + * were booted from, which cdev_t isn't well suited to since those * number don't match to unit numbers very well. We may just need * to engage in a hack where we pass -C to the boot args if we are * the boot device. diff --git a/sys/boot/pc32/libi386/biosdisk.c b/sys/boot/pc32/libi386/biosdisk.c index 2694498fb0..229e8118e7 100644 --- a/sys/boot/pc32/libi386/biosdisk.c +++ b/sys/boot/pc32/libi386/biosdisk.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/boot/i386/libi386/biosdisk.c,v 1.45 2004/09/21 06:46:44 wes Exp $ - * $DragonFly: src/sys/boot/pc32/libi386/biosdisk.c,v 1.9 2004/12/20 01:16:14 dillon Exp $ + * $DragonFly: src/sys/boot/pc32/libi386/biosdisk.c,v 1.10 2006/09/10 01:26:31 dillon Exp $ */ /* @@ -1239,7 +1239,7 @@ bd_getbigeom(int bunit) } /* - * Return a suitable dev_t value for (dev). + * Return a suitable cdev_t value for (dev). * * In the case where it looks like (dev) is a SCSI disk, we allow the number of * IDE disks to be specified in $num_ide_disks. There should be a Better Way. diff --git a/sys/boot/pc32/libi386/libi386.h b/sys/boot/pc32/libi386/libi386.h index 6c8ca4723c..9b980dabfc 100644 --- a/sys/boot/pc32/libi386/libi386.h +++ b/sys/boot/pc32/libi386/libi386.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/boot/i386/libi386/libi386.h,v 1.16 2003/05/01 03:56:29 peter Exp $ - * $DragonFly: src/sys/boot/pc32/libi386/libi386.h,v 1.4 2004/09/09 03:47:08 joerg Exp $ + * $DragonFly: src/sys/boot/pc32/libi386/libi386.h,v 1.5 2006/09/10 01:26:31 dillon Exp $ */ @@ -73,13 +73,13 @@ extern struct devsw pxedisk; extern struct fs_ops pxe_fsops; int bc_add(int biosdev); /* Register CD booted from. */ -int bc_getdev(struct i386_devdesc *dev); /* return dev_t for (dev) */ +int bc_getdev(struct i386_devdesc *dev); /* return cdev_t for (dev) */ int bc_bios2unit(int biosdev); /* xlate BIOS device -> bioscd unit */ int bc_unit2bios(int unit); /* xlate bioscd unit -> BIOS device */ u_int32_t bd_getbigeom(int bunit); /* return geometry in bootinfo format */ int bd_bios2unit(int biosdev); /* xlate BIOS device -> biosdisk unit */ int bd_unit2bios(int unit); /* xlate biosdisk unit -> BIOS device */ -int bd_getdev(struct i386_devdesc *dev); /* return dev_t for (dev) */ +int bd_getdev(struct i386_devdesc *dev); /* return cdev_t for (dev) */ ssize_t i386_copyin(const void *src, vm_offset_t dest, const size_t len); ssize_t i386_copyout(const vm_offset_t src, void *dest, const size_t len); diff --git a/sys/bus/cam/cam_extend.c b/sys/bus/cam/cam_extend.c index f262d81f2f..b19ea16d0f 100644 --- a/sys/bus/cam/cam_extend.c +++ b/sys/bus/cam/cam_extend.c @@ -13,12 +13,12 @@ * functioning of this software in any circumstances. * * $FreeBSD: src/sys/cam/cam_extend.c,v 1.3 1999/08/28 00:40:39 peter Exp $ - * $DragonFly: src/sys/bus/cam/cam_extend.c,v 1.6 2006/09/05 00:55:31 dillon Exp $ + * $DragonFly: src/sys/bus/cam/cam_extend.c,v 1.7 2006/09/10 01:26:32 dillon Exp $ */ /* * XXX XXX XXX XXX We should get DEVFS working so that we * don't have to do this, possibly sparse, array based junk. - * XXX: We can do this now with dev_t, that's even better. + * XXX: We can do this now with cdev_t, that's even better. */ /* * Extensible arrays: Use a realloc like implementation to permit diff --git a/sys/bus/cam/cam_xpt.c b/sys/bus/cam/cam_xpt.c index 6e2ce9138f..bfb49af5e4 100644 --- a/sys/bus/cam/cam_xpt.c +++ b/sys/bus/cam/cam_xpt.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/cam_xpt.c,v 1.80.2.18 2002/12/09 17:31:55 gibbs Exp $ - * $DragonFly: src/sys/bus/cam/cam_xpt.c,v 1.30 2006/09/05 00:55:31 dillon Exp $ + * $DragonFly: src/sys/bus/cam/cam_xpt.c,v 1.31 2006/09/10 01:26:32 dillon Exp $ */ #include #include @@ -886,7 +886,7 @@ xptdone(struct cam_periph *periph, union ccb *done_ccb) static int xptopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit; unit = minor(dev) & 0xff; @@ -924,7 +924,7 @@ xptopen(struct dev_open_args *ap) static int xptclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit; unit = minor(dev) & 0xff; @@ -948,7 +948,7 @@ xptclose(struct dev_close_args *ap) static int xptioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit, error; error = 0; diff --git a/sys/bus/cam/scsi/scsi_cd.c b/sys/bus/cam/scsi/scsi_cd.c index 0cee6bc00e..a6bc633df2 100644 --- a/sys/bus/cam/scsi/scsi_cd.c +++ b/sys/bus/cam/scsi/scsi_cd.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/scsi/scsi_cd.c,v 1.31.2.16 2003/10/21 22:26:11 thomas Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_cd.c,v 1.24 2006/09/05 00:55:32 dillon Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_cd.c,v 1.25 2006/09/10 01:26:32 dillon Exp $ */ /* * Portions of this driver taken from the original FreeBSD cd driver. @@ -998,7 +998,7 @@ cdregisterexit: static int cdopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct cd_softc *softc; int unit, error; @@ -1054,7 +1054,7 @@ cdopen(struct dev_open_args *ap) static int cdclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct cd_softc *softc; int unit, error; @@ -1428,7 +1428,7 @@ cdgetccb(struct cam_periph *periph, u_int32_t priority) static int cdstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct cam_periph *periph; @@ -1925,7 +1925,7 @@ cdgetpagesize(int page_num) static int cdioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t addr = ap->a_data; struct cam_periph *periph; struct cd_softc *softc; diff --git a/sys/bus/cam/scsi/scsi_ch.c b/sys/bus/cam/scsi/scsi_ch.c index 59e4dc773a..6a6b42d6ed 100644 --- a/sys/bus/cam/scsi/scsi_ch.c +++ b/sys/bus/cam/scsi/scsi_ch.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/scsi/scsi_ch.c,v 1.20.2.2 2000/10/31 08:09:49 dwmalone Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_ch.c,v 1.16 2006/09/05 03:48:07 dillon Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_ch.c,v 1.17 2006/09/10 01:26:32 dillon Exp $ */ /* * Derived from the NetBSD SCSI changer driver. @@ -412,7 +412,7 @@ chregister(struct cam_periph *periph, void *arg) static int chopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct ch_softc *softc; int unit, error; @@ -462,7 +462,7 @@ chopen(struct dev_open_args *ap) static int chclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct ch_softc *softc; int unit, error; @@ -704,7 +704,7 @@ cherror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) static int chioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t addr = ap->a_data; int flag = ap->a_fflag; struct cam_periph *periph; diff --git a/sys/bus/cam/scsi/scsi_da.c b/sys/bus/cam/scsi/scsi_da.c index 76e413fba2..e25099f10c 100644 --- a/sys/bus/cam/scsi/scsi_da.c +++ b/sys/bus/cam/scsi/scsi_da.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/scsi/scsi_da.c,v 1.42.2.46 2003/10/21 22:18:19 thomas Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_da.c,v 1.31 2006/09/05 00:55:32 dillon Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_da.c,v 1.32 2006/09/10 01:26:32 dillon Exp $ */ #ifdef _KERNEL @@ -515,7 +515,7 @@ static struct extend_array *daperiphs; static int daopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct da_softc *softc; struct disklabel *label; @@ -640,7 +640,7 @@ daopen(struct dev_open_args *ap) static int daclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct da_softc *softc; int unit; @@ -732,7 +732,7 @@ daclose(struct dev_close_args *ap) static int dastrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct cam_periph *periph; @@ -803,7 +803,7 @@ bad: static int daioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct da_softc *softc; int unit; @@ -832,7 +832,7 @@ daioctl(struct dev_ioctl_args *ap) static int dadump(struct dev_dump_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct da_softc *softc; u_int unit; diff --git a/sys/bus/cam/scsi/scsi_pass.c b/sys/bus/cam/scsi/scsi_pass.c index e96c923f18..4084f3910f 100644 --- a/sys/bus/cam/scsi/scsi_pass.c +++ b/sys/bus/cam/scsi/scsi_pass.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/scsi/scsi_pass.c,v 1.19 2000/01/17 06:27:37 mjacob Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_pass.c,v 1.17 2006/09/05 00:55:32 dillon Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_pass.c,v 1.18 2006/09/10 01:26:32 dillon Exp $ */ #include @@ -340,7 +340,7 @@ passregister(struct cam_periph *periph, void *arg) static int passopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct pass_softc *softc; int unit, error; @@ -411,7 +411,7 @@ passopen(struct dev_open_args *ap) static int passclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct pass_softc *softc; int unit, error; @@ -445,7 +445,7 @@ passclose(struct dev_close_args *ap) static int passstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct cam_periph *periph; @@ -631,7 +631,7 @@ passdone(struct cam_periph *periph, union ccb *done_ccb) static int passioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t addr = ap->a_data; struct cam_periph *periph; struct pass_softc *softc; diff --git a/sys/bus/cam/scsi/scsi_pt.c b/sys/bus/cam/scsi/scsi_pt.c index ed1c74d700..6b0da57410 100644 --- a/sys/bus/cam/scsi/scsi_pt.c +++ b/sys/bus/cam/scsi/scsi_pt.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/scsi/scsi_pt.c,v 1.17 2000/01/17 06:27:37 mjacob Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_pt.c,v 1.16 2006/09/05 00:55:32 dillon Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_pt.c,v 1.17 2006/09/10 01:26:32 dillon Exp $ */ #include @@ -86,7 +86,7 @@ struct pt_softc { pt_flags flags; union ccb saved_ccb; int io_timeout; - dev_t dev; + cdev_t dev; }; static d_open_t ptopen; @@ -140,7 +140,7 @@ static struct extend_array *ptperiphs; static int ptopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct pt_softc *softc; int unit; @@ -184,7 +184,7 @@ ptopen(struct dev_open_args *ap) static int ptclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct pt_softc *softc; int unit; @@ -214,7 +214,7 @@ ptclose(struct dev_close_args *ap) static int ptstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct cam_periph *periph; @@ -684,7 +684,7 @@ pterror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) static int ptioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t addr = ap->a_data; struct cam_periph *periph; struct pt_softc *softc; diff --git a/sys/bus/cam/scsi/scsi_sa.c b/sys/bus/cam/scsi/scsi_sa.c index f0cf8cb00c..b65f61131b 100644 --- a/sys/bus/cam/scsi/scsi_sa.c +++ b/sys/bus/cam/scsi/scsi_sa.c @@ -1,6 +1,6 @@ /* * $FreeBSD: src/sys/cam/scsi/scsi_sa.c,v 1.45.2.13 2002/12/17 17:08:50 trhodes Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_sa.c,v 1.19 2006/09/05 00:55:32 dillon Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_sa.c,v 1.20 2006/09/10 01:26:32 dillon Exp $ * * Implementation of SCSI Sequential Access Peripheral driver for CAM. * @@ -398,7 +398,7 @@ static void saprevent(struct cam_periph *periph, int action); static int sarewind(struct cam_periph *periph); static int saspace(struct cam_periph *periph, int count, scsi_space_code code); -static int samount(struct cam_periph *, int, dev_t); +static int samount(struct cam_periph *, int, cdev_t); static int saretension(struct cam_periph *periph); static int sareservereleaseunit(struct cam_periph *periph, int reserve); @@ -440,7 +440,7 @@ static struct extend_array *saperiphs; static int saopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct sa_softc *softc; int unit; @@ -504,7 +504,7 @@ saopen(struct dev_open_args *ap) static int saclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct sa_softc *softc; int unit, mode, error, writing, tmp; @@ -656,7 +656,7 @@ saclose(struct dev_close_args *ap) static int sastrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct cam_periph *periph; @@ -771,7 +771,7 @@ done: static int saioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t addr = ap->a_data; struct cam_periph *periph; struct sa_softc *softc; @@ -1799,7 +1799,7 @@ sadone(struct cam_periph *periph, union ccb *done_ccb) * Mount the tape (make sure it's ready for I/O). */ static int -samount(struct cam_periph *periph, int oflags, dev_t dev) +samount(struct cam_periph *periph, int oflags, cdev_t dev) { struct sa_softc *softc; union ccb *ccb; diff --git a/sys/bus/cam/scsi/scsi_ses.c b/sys/bus/cam/scsi/scsi_ses.c index 98463f5fb7..c5f0488dd9 100644 --- a/sys/bus/cam/scsi/scsi_ses.c +++ b/sys/bus/cam/scsi/scsi_ses.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/cam/scsi/scsi_ses.c,v 1.8.2.2 2000/08/08 23:19:21 mjacob Exp $ */ -/* $DragonFly: src/sys/bus/cam/scsi/scsi_ses.c,v 1.17 2006/09/05 00:55:32 dillon Exp $ */ +/* $DragonFly: src/sys/bus/cam/scsi/scsi_ses.c,v 1.18 2006/09/10 01:26:32 dillon Exp $ */ /* * Copyright (c) 2000 Matthew Jacob * All rights reserved. @@ -410,7 +410,7 @@ sesregister(struct cam_periph *periph, void *arg) static int sesopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct ses_softc *softc; int error; @@ -467,7 +467,7 @@ out: static int sesclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; struct ses_softc *softc; int unit, error; @@ -525,7 +525,7 @@ seserror(union ccb *ccb, u_int32_t cflags, u_int32_t sflags) static int sesioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct cam_periph *periph; ses_encstat tmp; ses_objstat objs; diff --git a/sys/bus/cam/scsi/scsi_target.c b/sys/bus/cam/scsi/scsi_target.c index cf227da5c5..a78dd090ff 100644 --- a/sys/bus/cam/scsi/scsi_target.c +++ b/sys/bus/cam/scsi/scsi_target.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/cam/scsi/scsi_target.c,v 1.22.2.7 2003/02/18 22:07:10 njl Exp $ - * $DragonFly: src/sys/bus/cam/scsi/scsi_target.c,v 1.12 2006/07/28 02:17:32 dillon Exp $ + * $DragonFly: src/sys/bus/cam/scsi/scsi_target.c,v 1.13 2006/09/10 01:26:32 dillon Exp $ */ #include @@ -165,7 +165,7 @@ static MALLOC_DEFINE(M_TARG, "TARG", "TARG data"); /* Create softc and initialize it. Only one proc can open each targ device. */ static int -targopen(dev_t dev, int flags, int fmt, struct proc *p) +targopen(cdev_t dev, int flags, int fmt, struct proc *p) { struct targ_softc *softc; @@ -197,7 +197,7 @@ targopen(dev_t dev, int flags, int fmt, struct proc *p) /* Disable LUN if enabled and teardown softc */ static int -targclose(dev_t dev, int flag, int fmt, struct proc *p) +targclose(cdev_t dev, int flag, int fmt, struct proc *p) { struct targ_softc *softc; int error; @@ -220,7 +220,7 @@ targclose(dev_t dev, int flag, int fmt, struct proc *p) /* Enable/disable LUNs, set debugging level */ static int -targioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) +targioctl(cdev_t dev, u_long cmd, caddr_t addr, int flag, struct proc *p) { struct targ_softc *softc; cam_status status; @@ -312,7 +312,7 @@ targpoll(struct dev_poll_args *ap) } static int -targkqfilter(dev_t dev, struct knote *kn) +targkqfilter(cdev_t dev, struct knote *kn) { struct targ_softc *softc; @@ -516,7 +516,7 @@ targdtor(struct cam_periph *periph) /* Receive CCBs from user mode proc and send them to the HBA */ static int -targwrite(dev_t dev, struct uio *uio, int ioflag) +targwrite(cdev_t dev, struct uio *uio, int ioflag) { union ccb *user_ccb; struct targ_softc *softc; @@ -814,7 +814,7 @@ targdone(struct cam_periph *periph, union ccb *done_ccb) /* Return CCBs to the user from the user queue and abort queue */ static int -targread(dev_t dev, struct uio *uio, int ioflag) +targread(cdev_t dev, struct uio *uio, int ioflag) { struct descr_queue *abort_queue; struct targ_cmd_descr *user_descr; diff --git a/sys/bus/firewire/firewirereg.h b/sys/bus/firewire/firewirereg.h index 4c16891caf..1dececc383 100644 --- a/sys/bus/firewire/firewirereg.h +++ b/sys/bus/firewire/firewirereg.h @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/firewire/firewirereg.h,v 1.33 2004/01/06 14:30:46 simokawa Exp $ - * $DragonFly: src/sys/bus/firewire/firewirereg.h,v 1.11 2006/07/28 02:17:33 dillon Exp $ + * $DragonFly: src/sys/bus/firewire/firewirereg.h,v 1.12 2006/09/10 01:26:32 dillon Exp $ * */ @@ -71,7 +71,7 @@ struct fw_device{ struct firewire_softc { #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 - dev_t dev; + cdev_t dev; #endif struct firewire_comm *fc; }; @@ -302,7 +302,7 @@ struct fw_bind *fw_bindlookup (struct firewire_comm *, u_int16_t, u_int32_t); void fw_drain_txq (struct firewire_comm *); int fwdev_makedev (struct firewire_softc *); int fwdev_destroydev (struct firewire_softc *); -void fwdev_clone (void *, char *, int, dev_t *); +void fwdev_clone (void *, char *, int, cdev_t *); extern int firewire_debug; extern devclass_t firewire_devclass; diff --git a/sys/bus/firewire/fwdev.c b/sys/bus/firewire/fwdev.c index 21b89890f7..6f5243db75 100644 --- a/sys/bus/firewire/fwdev.c +++ b/sys/bus/firewire/fwdev.c @@ -32,7 +32,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/firewire/fwdev.c,v 1.36 2004/01/22 14:41:17 simokawa Exp $ - * $DragonFly: src/sys/bus/firewire/fwdev.c,v 1.15 2006/09/09 19:34:43 dillon Exp $ + * $DragonFly: src/sys/bus/firewire/fwdev.c,v 1.16 2006/09/10 01:26:32 dillon Exp $ * */ @@ -170,7 +170,7 @@ fwdev_freebuf(struct fw_xferq *q) static int fw_open (struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int err = 0; if (DEV_FWMEM(dev)) @@ -198,7 +198,7 @@ fw_open (struct dev_open_args *ap) static int fw_close (struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct firewire_softc *sc; struct firewire_comm *fc; struct fw_drv1 *d; @@ -273,7 +273,7 @@ fw_close (struct dev_close_args *ap) static int fw_read (struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct firewire_softc *sc; struct fw_xferq *ir; @@ -361,7 +361,7 @@ readloop: static int fw_write (struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; int err = 0; struct firewire_softc *sc; @@ -426,7 +426,7 @@ isoloop: int fw_ioctl (struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct firewire_softc *sc; struct firewire_comm *fc; struct fw_drv1 *d; @@ -715,7 +715,7 @@ out: int fw_poll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct firewire_softc *sc; struct fw_xferq *ir; int revents; @@ -747,7 +747,7 @@ fw_poll(struct dev_poll_args *ap) static int fw_mmap (struct dev_mmap_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct firewire_softc *sc; int unit = DEV2UNIT(dev); @@ -761,7 +761,7 @@ fw_mmap (struct dev_mmap_args *ap) static int fw_strategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; @@ -799,7 +799,7 @@ fwdev_destroydev(struct firewire_softc *sc) #if defined(__FreeBSD__) && __FreeBSD_version >= 500000 #define NDEVTYPE 2 void -fwdev_clone(void *arg, char *name, int namelen, dev_t *dev) +fwdev_clone(void *arg, char *name, int namelen, cdev_t *dev) { struct firewire_softc *sc; char *devnames[NDEVTYPE] = {"fw", "fwmem"}; diff --git a/sys/bus/firewire/fwmem.c b/sys/bus/firewire/fwmem.c index 52adcf48bd..1bad1aa5c8 100644 --- a/sys/bus/firewire/fwmem.c +++ b/sys/bus/firewire/fwmem.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/bus/firewire/fwmem.c,v 1.12 2006/09/05 03:48:09 dillon Exp $ + * $DragonFly: src/sys/bus/firewire/fwmem.c,v 1.13 2006/09/10 01:26:32 dillon Exp $ */ #ifndef __DragonFly__ @@ -278,7 +278,7 @@ fwmem_write_block( int fwmem_open (struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct fwmem_softc *fms; if (dev->si_drv1 != NULL) { @@ -305,7 +305,7 @@ fwmem_open (struct dev_open_args *ap) int fwmem_close (struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct fwmem_softc *fms; fms = (struct fwmem_softc *)dev->si_drv1; @@ -344,7 +344,7 @@ fwmem_biodone(struct fw_xfer *xfer) int fwmem_strategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct firewire_softc *sc; @@ -420,7 +420,7 @@ error: int fwmem_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct fwmem_softc *fms; int err = 0; diff --git a/sys/bus/firewire/fwohci.c b/sys/bus/firewire/fwohci.c index 9989ed06c2..0f2054f614 100644 --- a/sys/bus/firewire/fwohci.c +++ b/sys/bus/firewire/fwohci.c @@ -33,7 +33,7 @@ * * $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.72 2004/01/22 14:41:17 simokawa Exp $ * $FreeBSD: src/sys/dev/firewire/fwohci.c,v 1.1.2.19 2003/05/01 06:24:37 simokawa Exp $ - * $DragonFly: src/sys/bus/firewire/fwohci.c,v 1.12 2006/09/05 03:48:09 dillon Exp $ + * $DragonFly: src/sys/bus/firewire/fwohci.c,v 1.13 2006/09/10 01:26:32 dillon Exp $ */ #define ATRQ_CH 0 @@ -350,7 +350,7 @@ again: int fwohci_ioctl (struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct firewire_softc *sc; struct fwohci_softc *fc; int unit = DEV2UNIT(dev); diff --git a/sys/bus/iicbus/iic.c b/sys/bus/iicbus/iic.c index 39e1f64a5a..47ef3d8085 100644 --- a/sys/bus/iicbus/iic.c +++ b/sys/bus/iicbus/iic.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/iicbus/iic.c,v 1.18 1999/11/18 05:43:32 peter Exp $ - * $DragonFly: src/sys/bus/iicbus/iic.c,v 1.9 2006/07/28 02:17:34 dillon Exp $ + * $DragonFly: src/sys/bus/iicbus/iic.c,v 1.10 2006/09/10 01:26:32 dillon Exp $ * */ #include @@ -133,7 +133,7 @@ iic_attach(device_t dev) static int iicopen (struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct iic_softc *sc = IIC_SOFTC(minor(dev)); if (!sc) @@ -150,7 +150,7 @@ iicopen (struct dev_open_args *ap) static int iicclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct iic_softc *sc = IIC_SOFTC(minor(dev)); if (!sc) @@ -170,7 +170,7 @@ iicclose(struct dev_close_args *ap) static int iicwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; device_t iicdev = IIC_DEVICE(minor(dev)); struct iic_softc *sc = IIC_SOFTC(minor(dev)); @@ -199,7 +199,7 @@ iicwrite(struct dev_write_args *ap) static int iicread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; device_t iicdev = IIC_DEVICE(minor(dev)); struct iic_softc *sc = IIC_SOFTC(minor(dev)); @@ -233,7 +233,7 @@ iicread(struct dev_read_args *ap) static int iicioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; device_t iicdev = IIC_DEVICE(minor(dev)); struct iic_softc *sc = IIC_SOFTC(minor(dev)); device_t parent = device_get_parent(iicdev); diff --git a/sys/bus/isa/vga_isa.c b/sys/bus/isa/vga_isa.c index 2edf668555..56babc9abc 100644 --- a/sys/bus/isa/vga_isa.c +++ b/sys/bus/isa/vga_isa.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/isa/vga_isa.c,v 1.17 2000/01/29 15:08:56 peter Exp $ - * $DragonFly: src/sys/bus/isa/vga_isa.c,v 1.11 2006/09/05 00:55:35 dillon Exp $ + * $DragonFly: src/sys/bus/isa/vga_isa.c,v 1.12 2006/09/10 01:26:33 dillon Exp $ */ #include "opt_vga.h" @@ -237,7 +237,7 @@ isavga_resume(device_t dev) static int isavga_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; return vga_open(dev, VGA_SOFTC(VGA_UNIT(dev)), ap->a_oflags, ap->a_devtype, ap->a_cred); @@ -246,7 +246,7 @@ isavga_open(struct dev_open_args *ap) static int isavga_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; return vga_close(dev, VGA_SOFTC(VGA_UNIT(dev)), ap->a_fflag, ap->a_devtype); @@ -255,7 +255,7 @@ isavga_close(struct dev_close_args *ap) static int isavga_read(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; return vga_read(dev, VGA_SOFTC(VGA_UNIT(dev)), ap->a_uio, ap->a_ioflag); } @@ -263,7 +263,7 @@ isavga_read(struct dev_read_args *ap) static int isavga_write(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; return vga_write(dev, VGA_SOFTC(VGA_UNIT(dev)), ap->a_uio, ap->a_ioflag); } @@ -271,7 +271,7 @@ isavga_write(struct dev_write_args *ap) static int isavga_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; return vga_ioctl(dev, VGA_SOFTC(VGA_UNIT(dev)), ap->a_cmd, ap->a_data, ap->a_fflag, ap->a_cred); } @@ -279,7 +279,7 @@ isavga_ioctl(struct dev_ioctl_args *ap) static int isavga_mmap(struct dev_mmap_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; ap->a_result = vga_mmap(dev, VGA_SOFTC(VGA_UNIT(dev)), ap->a_offset, ap->a_nprot); return(0); diff --git a/sys/bus/pccard/slot.h b/sys/bus/pccard/slot.h index f29ac2fb66..8ab87903bc 100644 --- a/sys/bus/pccard/slot.h +++ b/sys/bus/pccard/slot.h @@ -33,7 +33,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/pccard/slot.h,v 1.25.2.5 2002/09/22 20:26:58 imp Exp $ - * $DragonFly: src/sys/bus/pccard/Attic/slot.h,v 1.5 2006/06/10 20:00:14 dillon Exp $ + * $DragonFly: src/sys/bus/pccard/Attic/slot.h,v 1.6 2006/09/10 01:26:33 dillon Exp $ */ #ifndef _PCCARD_SLOT_H @@ -122,7 +122,7 @@ struct slot { void *cdata; /* Controller specific data */ int pwr_off_pending;/* Power status of slot */ device_t dev; /* Config system device. */ - dev_t d; /* fs device */ + cdev_t d; /* fs device */ }; #define PCCARD_DEVICE2SOFTC(d) ((struct slot *) device_get_softc(d)) diff --git a/sys/bus/smbus/smb.c b/sys/bus/smbus/smb.c index d0a9a5d199..681c3858ae 100644 --- a/sys/bus/smbus/smb.c +++ b/sys/bus/smbus/smb.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/smbus/smb.c,v 1.20 1999/11/18 05:44:56 peter Exp $ - * $DragonFly: src/sys/bus/smbus/smb.c,v 1.8 2006/07/28 02:17:34 dillon Exp $ + * $DragonFly: src/sys/bus/smbus/smb.c,v 1.9 2006/09/10 01:26:33 dillon Exp $ * */ #include @@ -134,7 +134,7 @@ smb_attach(device_t dev) static int smbopen (struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct smb_softc *sc = IIC_SOFTC(minor(dev)); if (!sc) @@ -151,7 +151,7 @@ smbopen (struct dev_open_args *ap) static int smbclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct smb_softc *sc = IIC_SOFTC(minor(dev)); if (!sc) @@ -180,7 +180,7 @@ smbread(struct dev_read_args *ap) static int smbioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; device_t smbdev = IIC_DEVICE(minor(dev)); struct smb_softc *sc = IIC_SOFTC(minor(dev)); device_t parent = device_get_parent(smbdev); diff --git a/sys/bus/usb/usb.c b/sys/bus/usb/usb.c index 8634fe17c8..be036e23a8 100644 --- a/sys/bus/usb/usb.c +++ b/sys/bus/usb/usb.c @@ -1,7 +1,7 @@ /* * $NetBSD: usb.c,v 1.68 2002/02/20 20:30:12 christos Exp $ * $FreeBSD: src/sys/dev/usb/usb.c,v 1.95 2003/11/09 23:54:21 joe Exp $ - * $DragonFly: src/sys/bus/usb/usb.c,v 1.20 2006/09/05 00:55:36 dillon Exp $ + * $DragonFly: src/sys/bus/usb/usb.c,v 1.21 2006/09/10 01:26:33 dillon Exp $ */ /* Also already merged from NetBSD: @@ -466,7 +466,7 @@ usbctlprint(void *aux, const char *pnp) int usbopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = USBUNIT(dev); struct usb_softc *sc; @@ -489,7 +489,7 @@ usbopen(struct dev_open_args *ap) int usbread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct usb_event ue; int unit = USBUNIT(dev); @@ -525,7 +525,7 @@ usbread(struct dev_read_args *ap) int usbclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = USBUNIT(dev); if (unit == USB_DEV_MINOR) { @@ -539,7 +539,7 @@ usbclose(struct dev_close_args *ap) int usbioctl(struct dev_ioctl_args *ap) { - dev_t devt = ap->a_head.a_dev; + cdev_t devt = ap->a_head.a_dev; struct usb_softc *sc; int unit = USBUNIT(devt); @@ -658,7 +658,7 @@ usbioctl(struct dev_ioctl_args *ap) int usbpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int revents, mask; int unit = USBUNIT(dev); diff --git a/sys/conf/nfsswapkernel.c b/sys/conf/nfsswapkernel.c index e0a93cbea0..9553f61b99 100644 --- a/sys/conf/nfsswapkernel.c +++ b/sys/conf/nfsswapkernel.c @@ -35,7 +35,7 @@ * * from: @(#)nfsswapvmunix.c 8.1 (Berkeley) 6/10/93 * $FreeBSD: src/sys/conf/nfsswapkernel.c,v 1.6 1999/08/28 00:41:01 peter Exp $ - * $DragonFly: src/sys/conf/nfsswapkernel.c,v 1.3 2006/09/09 19:34:44 dillon Exp $ + * $DragonFly: src/sys/conf/nfsswapkernel.c,v 1.4 2006/09/10 01:26:33 dillon Exp $ */ /* @@ -56,8 +56,8 @@ extern int nfs_mountroot(); int (*mountroot)() = nfs_mountroot; -dev_t rootdev = NOCDEV; -dev_t dumpdev = NOCDEV; +cdev_t rootdev = NOCDEV; +cdev_t dumpdev = NOCDEV; struct nfs_diskless nfs_diskless = { { { 'q', 'e', '0', '\0' }, diff --git a/sys/contrib/dev/fla/fla.c b/sys/contrib/dev/fla/fla.c index fa22046bb6..214386f1a2 100644 --- a/sys/contrib/dev/fla/fla.c +++ b/sys/contrib/dev/fla/fla.c @@ -7,7 +7,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/contrib/dev/fla/fla.c,v 1.16 1999/12/08 04:45:16 ken Exp $ - * $DragonFly: src/sys/contrib/dev/fla/Attic/fla.c,v 1.14 2006/09/05 00:55:36 dillon Exp $ + * $DragonFly: src/sys/contrib/dev/fla/Attic/fla.c,v 1.15 2006/09/10 01:26:33 dillon Exp $ * */ @@ -116,13 +116,13 @@ static struct fla_s { struct bio_queue_head bio_queue; struct devstat stats; struct disk disk; - dev_t dev; + cdev_t dev; } softc[NFLA]; static int flaopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct fla_s *sc; int error; struct disklabel *dl; @@ -153,7 +153,7 @@ flaopen(struct dev_open_args *ap) static int flaclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error; struct fla_s *sc; @@ -174,7 +174,7 @@ flaclose(struct dev_close_args *ap) static int flaioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; if (fla_debug) printf("flaioctl(%s %lx %p %x)\n", @@ -186,7 +186,7 @@ flaioctl(struct dev_ioctl_args *ap) static int flastrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; int unit, error; diff --git a/sys/contrib/ipfilter/netinet/ip_fil.c b/sys/contrib/ipfilter/netinet/ip_fil.c index 327a10734a..9a7e3f8c38 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.c +++ b/sys/contrib/ipfilter/netinet/ip_fil.c @@ -6,7 +6,7 @@ * @(#)ip_fil.c 2.41 6/5/96 (C) 1993-2000 Darren Reed * @(#)$Id: ip_fil.c,v 2.42.2.60 2002/08/28 12:40:39 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.25.2.7 2004/07/04 09:24:38 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.22 2006/07/29 03:49:01 y0netan1 Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_fil.c,v 1.23 2006/09/10 01:26:33 dillon Exp $ */ #ifndef SOLARIS #define SOLARIS (defined(sun) && (defined(__svr4__) || defined(__SVR4))) @@ -670,7 +670,7 @@ int IPL_EXTERN(ioctl)(dev_t dev, int cmd, caddr_t data, int mode # if defined(_KERNEL) int IPL_EXTERN(ioctl)(struct dev_ioctl_args *ap) # else -int IPL_EXTERN(ioctl)(dev_t dev, u_long cmd, caddr_t data, int mode) +int IPL_EXTERN(ioctl)(struct cdev *dev, u_long cmd, caddr_t data, int mode) #endif #else int IPL_EXTERN(ioctl)(dev, cmd, data, mode @@ -698,7 +698,7 @@ int mode; #endif /* __sgi */ { #if (defined(_KERNEL) && defined(__DragonFly__)) - dev_t dev = ap->a_head.a_dev; + struct cdev *dev = ap->a_head.a_dev; u_long cmd = ap->a_cmd; caddr_t data = ap->a_data; int mode = ap->a_fflag; @@ -1171,7 +1171,7 @@ int flags; #endif /* DragonFly */ { #ifdef __DragonFly__ - dev_t dev = ap->a_head.a_dev; + struct cdev *dev = ap->a_head.a_dev; #endif # if defined(__sgi) && defined(_KERNEL) u_int min = geteminor(*pdev); @@ -1212,7 +1212,7 @@ int flags; #endif /* DragonFly */ { #ifdef __DragonFly__ - dev_t dev = ap->a_head.a_dev; + struct cdev *dev = ap->a_head.a_dev; #endif u_int min = GET_MINOR(dev); @@ -1247,7 +1247,7 @@ struct uio *uio; #endif /* DragonFly */ { #ifdef __DragonFly__ - dev_t dev = ap->a_head.a_dev; + struct cdev *dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; #endif # ifdef IPFILTER_LOG diff --git a/sys/contrib/ipfilter/netinet/ip_fil.h b/sys/contrib/ipfilter/netinet/ip_fil.h index 63ca88a2d8..9befc682ab 100644 --- a/sys/contrib/ipfilter/netinet/ip_fil.h +++ b/sys/contrib/ipfilter/netinet/ip_fil.h @@ -6,7 +6,7 @@ * @(#)ip_fil.h 1.35 6/5/96 * $Id: ip_fil.h,v 2.29.2.33 2002/06/04 14:46:28 darrenr Exp $ * $FreeBSD: src/sys/contrib/ipfilter/netinet/ip_fil.h,v 1.18.2.8 2004/07/05 06:02:35 darrenr Exp $ - * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_fil.h,v 1.11 2006/07/29 03:49:01 y0netan1 Exp $ + * $DragonFly: src/sys/contrib/ipfilter/netinet/ip_fil.h,v 1.12 2006/09/10 01:26:33 dillon Exp $ */ #ifndef __IP_FIL_H__ @@ -503,7 +503,10 @@ typedef struct ipflog { #ifndef _KERNEL + struct ifnet; +struct cdev; + extern char *get_ifname (struct ifnet *); extern int fr_check (ip_t *, int, void *, int, mb_t **); extern int (*fr_checkp) (ip_t *, int, void *, int, mb_t **); @@ -512,15 +515,12 @@ extern int send_icmp_err (ip_t *, int, fr_info_t *, int); extern int ipf_log (void); extern struct ifnet *get_unit (char *, int); extern int mbuflen (mb_t *); -# if defined(__DragonFly__) || defined(__NetBSD__) || defined(__OpenBSD__) || \ - (_BSDI_VERSION >= 199701) || (__FreeBSD_version >= 300000) -extern int iplioctl (dev_t, u_long, caddr_t, int); -# else -extern int iplioctl (dev_t, int, caddr_t, int); -# endif -extern int iplopen (dev_t, int); -extern int iplclose (dev_t, int); -#else /* #ifndef _KERNEL */ +extern int iplioctl (struct cdev *, u_long, caddr_t, int); +extern int iplopen (struct cdev *, int); +extern int iplclose (struct cdev *, int); + +#else /* !_KERNEL */ + # if defined(__NetBSD__) && defined(PFIL_HOOKS) extern void ipfilterattach (int); # endif @@ -529,82 +529,18 @@ extern int ipl_enable (void); extern int ipl_disable (void); extern int send_icmp_err (ip_t *, int, fr_info_t *, int); extern int send_reset (ip_t *, fr_info_t *); -# if SOLARIS -extern int fr_check (ip_t *, int, void *, int, qif_t *, mb_t **); -extern int (*fr_checkp) (ip_t *, int, void *, - int, qif_t *, mb_t **); -# if SOLARIS2 >= 7 -extern int iplioctl (dev_t, int, intptr_t, int, cred_t *, int *); -# else -extern int iplioctl (dev_t, int, int *, int, cred_t *, int *); -# endif -extern int iplopen (dev_t *, int, int, cred_t *); -extern int iplclose (dev_t, int, int, cred_t *); -extern int ipfsync (void); -extern int ipfr_fastroute (ip_t *, mblk_t *, mblk_t **, - fr_info_t *, frdest_t *); -extern void copyin_mblk (mblk_t *, size_t, size_t, char *); -extern void copyout_mblk (mblk_t *, size_t, size_t, char *); -extern int fr_qin (queue_t *, mblk_t *); -extern int fr_qout (queue_t *, mblk_t *); -extern int iplread (dev_t, struct uio *, cred_t *); -# else /* SOLARIS */ extern int fr_check (ip_t *, int, void *, int, mb_t **); extern int (*fr_checkp) (ip_t *, int, void *, int, mb_t **); extern int ipfr_fastroute (mb_t *, mb_t **, fr_info_t *, frdest_t *); extern size_t mbufchainlen (mb_t *); -# ifdef __sgi -# include -extern int iplioctl (dev_t, int, caddr_t, int, cred_t *, int *); -extern int iplopen (dev_t *, int, int, cred_t *); -extern int iplclose (dev_t, int, int, cred_t *); -extern int iplread (dev_t, struct uio *, cred_t *); -extern int ipfsync (void); -extern int ipfilter_sgi_attach (void); -extern void ipfilter_sgi_detach (void); -extern void ipfilter_sgi_intfsync (void); -# else # ifdef IPFILTER_LKM extern int iplidentify (char *); # endif -#if defined(__DragonFly__) || defined(__FreeBSD__) extern d_ioctl_t iplioctl; extern d_open_t iplopen; extern d_close_t iplclose; -#else -# if defined(__DragonFly__) || (_BSDI_VERSION >= 199510) || (__FreeBSD_version >= 220000) || \ - (NetBSD >= 199511) || defined(__OpenBSD__) -# if defined(__NetBSD__) || (_BSDI_VERSION >= 199701) || \ - defined(__OpenBSD__) || defined(__DragonFly__) || (__FreeBSD_version >= 300000) -extern int iplioctl (dev_t, u_long, caddr_t, int, struct proc *); -# else -extern int iplioctl (dev_t, int, caddr_t, int, struct proc *); -# endif -extern int iplopen (dev_t, int, int, struct proc *); -extern int iplclose (dev_t, int, int, struct proc *); -# else -# ifndef linux -extern int iplopen (dev_t, int); -extern int iplclose (dev_t, int); -extern int iplioctl (dev_t, int, caddr_t, int); -# else -extern int iplioctl(struct inode *, struct file *, u_int, u_long); -extern int iplopen (struct inode *, struct file *); -extern void iplclose (struct inode *, struct file *); -# endif /* !linux */ -# endif /* (_BSDI_VERSION >= 199510) */ -#endif -# if BSD >= 199306 extern d_read_t iplread; -# else -# ifndef linux -extern int iplread (dev_t, struct uio *); -# else -extern int iplread(struct inode *, struct file *, char *, int); -# endif /* !linux */ -# endif /* BSD >= 199306 */ -# endif /* __ sgi */ -# endif /* SOLARIS */ + #endif /* #ifndef _KERNEL */ extern char *memstr (char *, char *, int, int); diff --git a/sys/cpu/i386/include/cpu.h b/sys/cpu/i386/include/cpu.h index 5ed2a0fb3a..b590a63b47 100644 --- a/sys/cpu/i386/include/cpu.h +++ b/sys/cpu/i386/include/cpu.h @@ -35,7 +35,7 @@ * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/cpu.h,v 1.43.2.2 2001/06/15 09:37:57 scottl Exp $ - * $DragonFly: src/sys/cpu/i386/include/cpu.h,v 1.16 2006/05/20 02:42:06 dillon Exp $ + * $DragonFly: src/sys/cpu/i386/include/cpu.h,v 1.17 2006/09/10 01:26:39 dillon Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -104,7 +104,7 @@ /* * CTL_MACHDEP definitions. */ -#define CPU_CONSDEV 1 /* dev_t: console terminal device */ +#define CPU_CONSDEV 1 /* cdev_t: console terminal device */ #define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */ #define CPU_DISRTCSET 3 /* int: disable resettodr() call */ #define CPU_BOOTINFO 4 /* struct: bootinfo */ diff --git a/sys/ddb/db_command.c b/sys/ddb/db_command.c index 75989389e8..eca1b96e0a 100644 --- a/sys/ddb/db_command.c +++ b/sys/ddb/db_command.c @@ -24,7 +24,7 @@ * rights to redistribute these changes. * * $FreeBSD: src/sys/ddb/db_command.c,v 1.34.2.2 2001/07/29 22:48:36 kris Exp $ - * $DragonFly: src/sys/ddb/db_command.c,v 1.10 2006/09/09 19:34:45 dillon Exp $ + * $DragonFly: src/sys/ddb/db_command.c,v 1.11 2006/09/10 01:26:33 dillon Exp $ */ /* @@ -545,7 +545,7 @@ db_fncall(db_expr_t dummy1, boolean_t dummy2, db_expr_t dummy3, char *dummy4) /* Enter GDB remote protocol debugger on the next trap. */ -dev_t gdbdev = NOCDEV; +cdev_t gdbdev = NOCDEV; cn_getc_t *gdb_getc; cn_putc_t *gdb_putc; diff --git a/sys/ddb/ddb.h b/sys/ddb/ddb.h index 46061e5ea4..b4518208ea 100644 --- a/sys/ddb/ddb.h +++ b/sys/ddb/ddb.h @@ -28,7 +28,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ddb/ddb.h,v 1.24.2.2 2002/08/30 22:27:49 gibbs Exp $ - * $DragonFly: src/sys/ddb/ddb.h,v 1.9 2006/05/20 02:42:01 dillon Exp $ + * $DragonFly: src/sys/ddb/ddb.h,v 1.10 2006/09/10 01:26:33 dillon Exp $ */ /* @@ -163,7 +163,7 @@ struct command { /* * Routines to support GDB on an sio port. */ -extern dev_t gdbdev; +extern cdev_t gdbdev; extern cn_getc_t *gdb_getc; extern cn_putc_t *gdb_putc; #endif diff --git a/sys/dev/acpica5/acpivar.h b/sys/dev/acpica5/acpivar.h index b273f617c2..d26af4a123 100644 --- a/sys/dev/acpica5/acpivar.h +++ b/sys/dev/acpica5/acpivar.h @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/acpica/acpivar.h,v 1.69 2004/05/28 07:15:55 njl Exp $ - * $DragonFly: src/sys/dev/acpica5/acpivar.h,v 1.7 2005/11/01 23:36:32 dillon Exp $ + * $DragonFly: src/sys/dev/acpica5/acpivar.h,v 1.8 2006/09/10 01:26:33 dillon Exp $ */ #include "bus_if.h" @@ -42,7 +42,7 @@ struct acpi_softc { device_t acpi_dev; - dev_t acpi_dev_t; + cdev_t acpi_dev_t; struct callout acpi_sleep_timer; struct resource *acpi_irq; diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index ce82017b07..39ef405070 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/pci/agp.c,v 1.3.2.4 2002/08/11 19:58:12 alc Exp $ - * $DragonFly: src/sys/dev/agp/agp.c,v 1.23 2006/09/05 00:55:36 dillon Exp $ + * $DragonFly: src/sys/dev/agp/agp.c,v 1.24 2006/09/10 01:26:33 dillon Exp $ */ #include "opt_bus.h" @@ -726,7 +726,7 @@ agp_unbind_user(device_t dev, agp_unbind *unbind) static int agp_open(struct dev_open_args *ap) { - dev_t kdev = ap->a_head.a_dev; + cdev_t kdev = ap->a_head.a_dev; device_t dev = KDEV2DEV(kdev); struct agp_softc *sc = device_get_softc(dev); @@ -741,7 +741,7 @@ agp_open(struct dev_open_args *ap) static int agp_close(struct dev_close_args *ap) { - dev_t kdev = ap->a_head.a_dev; + cdev_t kdev = ap->a_head.a_dev; device_t dev = KDEV2DEV(kdev); struct agp_softc *sc = device_get_softc(dev); struct agp_memory *mem; @@ -765,7 +765,7 @@ agp_close(struct dev_close_args *ap) static int agp_ioctl(struct dev_ioctl_args *ap) { - dev_t kdev = ap->a_head.a_dev; + cdev_t kdev = ap->a_head.a_dev; device_t dev = KDEV2DEV(kdev); switch (ap->a_cmd) { @@ -801,7 +801,7 @@ agp_ioctl(struct dev_ioctl_args *ap) static int agp_mmap(struct dev_mmap_args *ap) { - dev_t kdev = ap->a_head.a_dev; + cdev_t kdev = ap->a_head.a_dev; device_t dev = KDEV2DEV(kdev); struct agp_softc *sc = device_get_softc(dev); diff --git a/sys/dev/disk/ata/ata-disk.c b/sys/dev/disk/ata/ata-disk.c index 1537d2b150..6825fa3349 100644 --- a/sys/dev/disk/ata/ata-disk.c +++ b/sys/dev/disk/ata/ata-disk.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-disk.c,v 1.60.2.24 2003/01/30 07:19:59 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/ata-disk.c,v 1.30 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/ata-disk.c,v 1.31 2006/09/10 01:26:33 dillon Exp $ */ #include "opt_ata.h" @@ -106,7 +106,7 @@ void ad_attach(struct ata_device *atadev, int alreadylocked) { struct ad_softc *adp; - dev_t dev; + cdev_t dev; adp = kmalloc(sizeof(struct ad_softc), M_AD, M_WAITOK | M_ZERO); @@ -298,7 +298,7 @@ adclose(struct dev_close_args *ap) static int adstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct ad_softc *adp = dev->si_drv1; @@ -320,7 +320,7 @@ adstrategy(struct dev_strategy_args *ap) int addump(struct dev_dump_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ad_softc *adp = dev->si_drv1; struct ad_request request; vm_paddr_t addr = 0; @@ -630,7 +630,7 @@ ad_interrupt(struct ad_request *request) { struct ad_softc *adp = request->softc; int dma_stat = 0; - dev_t dev; + cdev_t dev; /* finish DMA transfer */ if (request->flags & ADR_F_DMA_USED) diff --git a/sys/dev/disk/ata/ata-disk.h b/sys/dev/disk/ata/ata-disk.h index 499f0aed25..e01ade3222 100644 --- a/sys/dev/disk/ata/ata-disk.h +++ b/sys/dev/disk/ata/ata-disk.h @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-disk.h,v 1.22.2.7 2002/03/18 08:37:33 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/ata-disk.h,v 1.6 2006/02/17 19:17:54 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/ata-disk.h,v 1.7 2006/09/10 01:26:33 dillon Exp $ */ /* structure describing an ATA disk request */ @@ -73,7 +73,7 @@ struct ad_softc { struct bio_queue_head bio_queue; /* head of request queue */ struct devstat stats; /* devstat entry */ struct disk disk; /* disklabel/slice stuff */ - dev_t dev; /* device place holder */ + cdev_t dev; /* device place holder */ }; void ad_attach(struct ata_device *, int); diff --git a/sys/dev/disk/ata/ata-raid.c b/sys/dev/disk/ata/ata-raid.c index c44ce152b6..9211788fe7 100644 --- a/sys/dev/disk/ata/ata-raid.c +++ b/sys/dev/disk/ata/ata-raid.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-raid.c,v 1.3.2.19 2003/01/30 07:19:59 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/ata-raid.c,v 1.22 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/ata-raid.c,v 1.23 2006/09/10 01:26:33 dillon Exp $ */ #include "opt_ata.h" @@ -172,7 +172,7 @@ ata_raid_attach() static void ar_attach_raid(struct ar_softc *rdp, int update) { - dev_t dev; + cdev_t dev; int disk; ar_config_changed(rdp, update); @@ -473,7 +473,7 @@ aropen(struct dev_open_args *ap) static int arstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct ar_softc *rdp = dev->si_drv1; diff --git a/sys/dev/disk/ata/ata-raid.h b/sys/dev/disk/ata/ata-raid.h index e8ceaa119a..3e45423bb6 100644 --- a/sys/dev/disk/ata/ata-raid.h +++ b/sys/dev/disk/ata/ata-raid.h @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/ata-raid.h,v 1.2.2.8 2002/04/11 09:31:57 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/ata-raid.h,v 1.5 2006/02/17 19:17:54 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/ata-raid.h,v 1.6 2006/09/10 01:26:33 dillon Exp $ */ /* misc defines */ @@ -80,7 +80,7 @@ struct ar_softc { u_int64_t lock_end; /* end of locked area for rebuild */ struct disk disk; /* disklabel/slice stuff */ struct proc *pid; - dev_t dev; /* device place holder */ + cdev_t dev; /* device place holder */ }; struct ar_buf { diff --git a/sys/dev/disk/ata/atapi-cd.c b/sys/dev/disk/ata/atapi-cd.c index 45768408e4..3866b83a89 100644 --- a/sys/dev/disk/ata/atapi-cd.c +++ b/sys/dev/disk/ata/atapi-cd.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-cd.c,v 1.48.2.20 2002/11/25 05:30:31 njl Exp $ - * $DragonFly: src/sys/dev/disk/ata/atapi-cd.c,v 1.24 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/atapi-cd.c,v 1.25 2006/09/10 01:26:33 dillon Exp $ */ #include "opt_ata.h" @@ -248,7 +248,7 @@ acd_init_lun(struct ata_device *atadev) static void acd_make_dev(struct acd_softc *cdp) { - dev_t dev; + cdev_t dev; dev_ops_add(&acd_ops, dkunitmask(), dkmakeunit(cdp->lun)); dev = make_dev(&acd_ops, dkmakeminor(cdp->lun, 0, 0), @@ -477,7 +477,7 @@ msf2lba(u_int8_t m, u_int8_t s, u_int8_t f) static int acdopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct acd_softc *cdp = dev->si_drv1; int timeout = 60; @@ -516,7 +516,7 @@ acdopen(struct dev_open_args *ap) static int acdclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct acd_softc *cdp = dev->si_drv1; if (!cdp) @@ -536,7 +536,7 @@ acdclose(struct dev_close_args *ap) static int acdioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct acd_softc *cdp = dev->si_drv1; int error = 0; @@ -1082,7 +1082,7 @@ acdioctl(struct dev_ioctl_args *ap) static int acdstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct acd_softc *cdp = dev->si_drv1; @@ -1118,7 +1118,7 @@ acd_start(struct ata_device *atadev) struct acd_softc *cdp = atadev->driver; struct bio *bio = bioq_first(&cdp->bio_queue); struct buf *bp; - dev_t dev; + cdev_t dev; u_int32_t lba, lastlba, count; int8_t ccb[16]; int track, blocksize; diff --git a/sys/dev/disk/ata/atapi-cd.h b/sys/dev/disk/ata/atapi-cd.h index 5bd1bd0588..7a4b3c0aef 100644 --- a/sys/dev/disk/ata/atapi-cd.h +++ b/sys/dev/disk/ata/atapi-cd.h @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-cd.h,v 1.15.2.9 2002/03/18 08:37:34 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/atapi-cd.h,v 1.3 2006/02/17 19:17:54 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/atapi-cd.h,v 1.4 2006/09/10 01:26:33 dillon Exp $ */ /* CDROM Table Of Contents */ @@ -300,7 +300,7 @@ struct acd_track_info { }; struct acd_devlist { - dev_t dev; + cdev_t dev; TAILQ_ENTRY(acd_devlist) chain; /* list management */ }; @@ -326,5 +326,5 @@ struct acd_softc { int block_size; /* blocksize currently used */ struct disklabel disklabel; /* fake disk label */ struct devstat *stats; /* devstat entry */ - dev_t dev; /* device place holders */ + cdev_t dev; /* device place holders */ }; diff --git a/sys/dev/disk/ata/atapi-fd.c b/sys/dev/disk/ata/atapi-fd.c index 1f03e1ec17..fb35ac1cea 100644 --- a/sys/dev/disk/ata/atapi-fd.c +++ b/sys/dev/disk/ata/atapi-fd.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-fd.c,v 1.44.2.9 2002/07/31 11:19:26 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/atapi-fd.c,v 1.17 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/atapi-fd.c,v 1.18 2006/09/10 01:26:33 dillon Exp $ */ #include @@ -80,7 +80,7 @@ int afdattach(struct ata_device *atadev) { struct afd_softc *fdp; - dev_t dev; + cdev_t dev; fdp = kmalloc(sizeof(struct afd_softc), M_AFD, M_WAITOK | M_ZERO); if (!fdp) { @@ -230,7 +230,7 @@ afd_describe(struct afd_softc *fdp) static int afdopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct afd_softc *fdp = dev->si_drv1; struct disklabel *label = &fdp->disk.d_label; @@ -257,7 +257,7 @@ afdopen(struct dev_open_args *ap) static int afdclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct afd_softc *fdp = dev->si_drv1; if (count_dev(dev) == 1) @@ -268,7 +268,7 @@ afdclose(struct dev_close_args *ap) static int afdioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct afd_softc *fdp = dev->si_drv1; switch (ap->a_cmd) { @@ -290,7 +290,7 @@ afdioctl(struct dev_ioctl_args *ap) static int afdstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct afd_softc *fdp = dev->si_drv1; diff --git a/sys/dev/disk/ata/atapi-fd.h b/sys/dev/disk/ata/atapi-fd.h index ebb103c552..e2151748ad 100644 --- a/sys/dev/disk/ata/atapi-fd.h +++ b/sys/dev/disk/ata/atapi-fd.h @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-fd.h,v 1.10.2.5 2002/07/31 11:19:26 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/atapi-fd.h,v 1.3 2006/02/17 19:17:54 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/atapi-fd.h,v 1.4 2006/09/10 01:26:33 dillon Exp $ */ /* ATAPI Rewriteable drive Capabilities and Mechanical Status Page */ @@ -76,6 +76,6 @@ struct afd_softc { struct afd_cappage cap; /* capabilities page info */ struct disk disk; /* virtual drives */ struct devstat stats; - dev_t dev; /* device place holder */ + cdev_t dev; /* device place holder */ }; diff --git a/sys/dev/disk/ata/atapi-tape.c b/sys/dev/disk/ata/atapi-tape.c index fd2e91f10d..d946d060d4 100644 --- a/sys/dev/disk/ata/atapi-tape.c +++ b/sys/dev/disk/ata/atapi-tape.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ata/atapi-tape.c,v 1.36.2.12 2002/07/31 11:19:26 sos Exp $ - * $DragonFly: src/sys/dev/disk/ata/atapi-tape.c,v 1.17 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/ata/atapi-tape.c,v 1.18 2006/09/10 01:26:33 dillon Exp $ */ #include "opt_ata.h" @@ -90,7 +90,7 @@ astattach(struct ata_device *atadev) { struct ast_softc *stp; struct ast_readposition position; - dev_t dev; + cdev_t dev; stp = kmalloc(sizeof(struct ast_softc), M_AST, M_WAITOK | M_ZERO); if (!stp) { @@ -247,7 +247,7 @@ ast_describe(struct ast_softc *stp) static int astopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ast_softc *stp = dev->si_drv1; if (!stp) @@ -273,7 +273,7 @@ astopen(struct dev_open_args *ap) static int astclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ast_softc *stp = dev->si_drv1; /* flush buffers, some drives fail here, they should report ctl = 0 */ @@ -302,7 +302,7 @@ astclose(struct dev_close_args *ap) static int astioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ast_softc *stp = dev->si_drv1; int error = 0; @@ -415,7 +415,7 @@ astioctl(struct dev_ioctl_args *ap) static int aststrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct ast_softc *stp = dev->si_drv1; diff --git a/sys/dev/disk/ccd/ccd.c b/sys/dev/disk/ccd/ccd.c index 9229483015..8d1b614363 100644 --- a/sys/dev/disk/ccd/ccd.c +++ b/sys/dev/disk/ccd/ccd.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/ccd/ccd.c,v 1.73.2.1 2001/09/11 09:49:52 kris Exp $ */ -/* $DragonFly: src/sys/dev/disk/ccd/ccd.c,v 1.36 2006/09/05 03:48:10 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/ccd/ccd.c,v 1.37 2006/09/10 01:26:33 dillon Exp $ */ /* $NetBSD: ccd.c,v 1.22 1995/12/08 19:13:26 thorpej Exp $ */ @@ -202,7 +202,7 @@ static int ccdinit (struct ccddevice *, char **, struct ucred *); static int ccdlookup (char *, struct vnode **); static void ccdbuffer (struct ccdbuf **ret, struct ccd_softc *, struct bio *, off_t, caddr_t, long); -static void ccdgetdisklabel (dev_t); +static void ccdgetdisklabel (cdev_t); static void ccdmakedisklabel (struct ccd_softc *); static int ccdlock (struct ccd_softc *); static void ccdunlock (struct ccd_softc *); @@ -664,7 +664,7 @@ ccdinterleave(struct ccd_softc *cs, int unit) static int ccdopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = ccdunit(dev); struct ccd_softc *cs; struct disklabel *lp; @@ -711,7 +711,7 @@ ccdopen(struct dev_open_args *ap) static int ccdclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = ccdunit(dev); struct ccd_softc *cs; int error = 0, part; @@ -739,7 +739,7 @@ ccdclose(struct dev_close_args *ap) static int ccdstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; int unit = ccdunit(dev); struct bio *nbio; @@ -836,7 +836,7 @@ ccdstart(struct ccd_softc *cs, struct bio *bio) long bcount, rcount; struct ccdbuf *cbp[4]; struct buf *bp = bio->bio_buf; - dev_t dev = bio->bio_driver_info; + cdev_t dev = bio->bio_driver_info; /* XXX! : 2 reads and 2 writes for RAID 4/5 */ caddr_t addr; off_t doffset; @@ -1259,7 +1259,7 @@ ccdiodone(struct bio *bio) static int ccdioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = ccdunit(dev); int i, j, lookedup = 0, error = 0; int part, pmask; @@ -1482,7 +1482,7 @@ ccdioctl(struct dev_ioctl_args *ap) (struct disklabel *)ap->a_data, 0); if (error == 0) { if (ap->a_cmd == DIOCWDINFO) { - dev_t cdev = CCDLABELDEV(dev); + cdev_t cdev = CCDLABELDEV(dev); error = writedisklabel(cdev, &cs->sc_label); } } @@ -1517,7 +1517,7 @@ ccdioctl(struct dev_ioctl_args *ap) static int ccdsize(struct dev_psize_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ccd_softc *cs; int part, size; @@ -1603,14 +1603,14 @@ done: * up. */ static void -ccdgetdisklabel(dev_t dev) +ccdgetdisklabel(cdev_t dev) { int unit = ccdunit(dev); struct ccd_softc *cs = &ccd_softc[unit]; char *errstring; struct disklabel *lp = &cs->sc_label; struct ccdgeom *ccg = &cs->sc_geom; - dev_t cdev; + cdev_t cdev; bzero(lp, sizeof(*lp)); diff --git a/sys/dev/disk/fd/fd.c b/sys/dev/disk/fd/fd.c index 7d284e5cb9..d09db190cf 100644 --- a/sys/dev/disk/fd/fd.c +++ b/sys/dev/disk/fd/fd.c @@ -51,7 +51,7 @@ * * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 * $FreeBSD: src/sys/isa/fd.c,v 1.176.2.8 2002/05/15 21:56:14 joerg Exp $ - * $DragonFly: src/sys/dev/disk/fd/fd.c,v 1.32 2006/09/05 00:55:37 dillon Exp $ + * $DragonFly: src/sys/dev/disk/fd/fd.c,v 1.33 2006/09/10 01:26:33 dillon Exp $ * */ @@ -234,7 +234,7 @@ static timeout_t fd_iotimeout; static timeout_t fd_pseudointr; static int fdstate(struct fdc_data *); static int retrier(struct fdc_data *); -static int fdformat(dev_t, struct fd_formb *, struct ucred *); +static int fdformat(cdev_t, struct fd_formb *, struct ucred *); static int enable_fifo(fdc_p fdc); @@ -1260,7 +1260,7 @@ out_fdc(struct fdc_data *fdc, int x) int Fdopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; fdu_t fdu = FDUNIT(minor(dev)); int type = FDTYPE(minor(dev)); fd_p fd; @@ -1356,7 +1356,7 @@ Fdopen(struct dev_open_args *ap) int fdclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; fdu_t fdu = FDUNIT(minor(dev)); struct fd_data *fd; @@ -1373,7 +1373,7 @@ fdclose(struct dev_close_args *ap) int fdstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; unsigned nblocks, blknum, cando; @@ -1573,7 +1573,7 @@ fdstate(fdc_p fdc) struct buf *bp; struct fd_formb *finfo = NULL; size_t fdblk; - dev_t dev; + cdev_t dev; bio = fdc->bio; if (bio == NULL) { @@ -2079,7 +2079,7 @@ retrier(struct fdc_data *fdc) struct bio *bio; struct buf *bp; struct fd_data *fd; - dev_t dev; + cdev_t dev; int fdu; bio = fdc->bio; @@ -2114,7 +2114,7 @@ retrier(struct fdc_data *fdc) * note: use the correct device for more * verbose error reporting. */ - dev_t subdev; + cdev_t subdev; subdev = make_sub_dev(dev, (FDUNIT(minor(dev))<<3)|RAW_PART); @@ -2161,7 +2161,7 @@ fdformat_wakeup(struct bio *bio) } static int -fdformat(dev_t dev, struct fd_formb *finfo, struct ucred *cred) +fdformat(cdev_t dev, struct fd_formb *finfo, struct ucred *cred) { fdu_t fdu; fd_p fd; @@ -2224,7 +2224,7 @@ fdformat(dev_t dev, struct fd_formb *finfo, struct ucred *cred) static int fdioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; fdu_t fdu = FDUNIT(minor(dev)); fd_p fd = devclass_get_softc(fd_devclass, fdu); size_t fdblk; diff --git a/sys/dev/disk/isp/isp_freebsd.c b/sys/dev/disk/isp/isp_freebsd.c index 5074736498..bbcebf541b 100644 --- a/sys/dev/disk/isp/isp_freebsd.c +++ b/sys/dev/disk/isp/isp_freebsd.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/isp/isp_freebsd.c,v 1.32.2.20 2002/10/11 18:49:25 mjacob Exp $ */ -/* $DragonFly: src/sys/dev/disk/isp/isp_freebsd.c,v 1.15 2006/09/05 00:55:37 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/isp/isp_freebsd.c,v 1.16 2006/09/10 01:26:33 dillon Exp $ */ /* * Platform (FreeBSD) dependent common attachment code for Qlogic adapters. * @@ -230,7 +230,7 @@ isp_freeze_loopdown(struct ispsoftc *isp, char *msg) static int ispioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ispsoftc *isp; int retval = ENOTTY; diff --git a/sys/dev/disk/mcd/mcd.c b/sys/dev/disk/mcd/mcd.c index 7b68df49f0..6702b00c12 100644 --- a/sys/dev/disk/mcd/mcd.c +++ b/sys/dev/disk/mcd/mcd.c @@ -41,7 +41,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/mcd.c,v 1.115 2000/01/29 16:17:34 peter Exp $ - * $DragonFly: src/sys/dev/disk/mcd/Attic/mcd.c,v 1.19 2006/07/28 02:17:35 dillon Exp $ + * $DragonFly: src/sys/dev/disk/mcd/Attic/mcd.c,v 1.20 2006/09/10 01:26:34 dillon Exp $ */ static const char COPYRIGHT[] = "mcd-driver (C)1993 by H.Veit & B.Moore"; @@ -206,7 +206,7 @@ static d_close_t mcdclose; static d_ioctl_t mcdioctl; static d_strategy_t mcdstrategy; -static int mcdsize(dev_t dev); +static int mcdsize(cdev_t dev); static struct dev_ops mcd_ops = { { "mcd", MCD_CDEV_MAJOR, D_DISK }, @@ -266,7 +266,7 @@ int mcd_attach(struct isa_device *dev) int mcdopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit,part,phys,r,retry; struct mcd_data *cd; @@ -359,7 +359,7 @@ MCD_TRACE("open: partition=%d, disksize = %ld, blksize=%d\n", int mcdclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit,part; struct mcd_data *cd; @@ -385,7 +385,7 @@ int mcdclose(struct dev_close_args *ap) int mcdstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct bio *nbio; struct buf *bp = bio->bio_buf; @@ -465,7 +465,7 @@ static void mcd_start(int unit) struct partition *p; struct bio *bio; struct buf *bp; - dev_t dev; + cdev_t dev; crit_enter(); if (cd->flags & MCDMBXBSY) { @@ -513,7 +513,7 @@ static void mcd_start(int unit) int mcdioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t addr = ap->a_data; struct mcd_data *cd; int unit,part,retry,r; @@ -675,7 +675,7 @@ static int mcd_getdisklabel(int unit) return 0; } -int mcdsize(dev_t dev) +int mcdsize(cdev_t dev) { int size; int unit = mcd_unit(dev); diff --git a/sys/dev/disk/md/md.c b/sys/dev/disk/md/md.c index 21a2c75a2f..9572eb2e29 100644 --- a/sys/dev/disk/md/md.c +++ b/sys/dev/disk/md/md.c @@ -7,7 +7,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/dev/md/md.c,v 1.8.2.2 2002/08/19 17:43:34 jdp Exp $ - * $DragonFly: src/sys/dev/disk/md/md.c,v 1.13 2006/07/28 02:17:35 dillon Exp $ + * $DragonFly: src/sys/dev/disk/md/md.c,v 1.14 2006/09/10 01:26:34 dillon Exp $ * */ @@ -70,7 +70,7 @@ struct md_s { struct devstat stats; struct bio_queue_head bio_queue; struct disk disk; - dev_t dev; + cdev_t dev; int busy; enum {MD_MALLOC, MD_PRELOAD} type; unsigned nsect; @@ -89,7 +89,7 @@ static int mdunits; static int mdopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct md_s *sc; struct disklabel *dl; @@ -115,7 +115,7 @@ mdopen(struct dev_open_args *ap) static int mdioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; if (md_debug) printf("mdioctl(%s %lx %p %x)\n", @@ -127,7 +127,7 @@ mdioctl(struct dev_ioctl_args *ap) static int mdstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct md_s *sc; @@ -151,7 +151,7 @@ mdstrategy(struct dev_strategy_args *ap) static int mdstrategy_malloc(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; unsigned secno, nsec, secval, uc; @@ -294,7 +294,7 @@ mdstrategy_malloc(struct dev_strategy_args *ap) static int mdstrategy_preload(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; devstat_trans_flags dop; diff --git a/sys/dev/disk/scd/scd.c b/sys/dev/disk/scd/scd.c index 8ce5142de4..b799abfcbc 100644 --- a/sys/dev/disk/scd/scd.c +++ b/sys/dev/disk/scd/scd.c @@ -42,7 +42,7 @@ /* $FreeBSD: src/sys/i386/isa/scd.c,v 1.54 2000/01/29 16:00:30 peter Exp $ */ -/* $DragonFly: src/sys/dev/disk/scd/Attic/scd.c,v 1.18 2006/07/28 02:17:35 dillon Exp $ */ +/* $DragonFly: src/sys/dev/disk/scd/Attic/scd.c,v 1.19 2006/09/10 01:26:34 dillon Exp $ */ /* Please send any comments to micke@dynas.se */ @@ -224,7 +224,7 @@ scd_attach(struct isa_device *dev) static int scdopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit,part,phys; int rc; struct scd_data *cd; @@ -279,7 +279,7 @@ scdopen(struct dev_open_args *ap) static int scdclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit,part,phys; struct scd_data *cd; @@ -309,7 +309,7 @@ scdclose(struct dev_close_args *ap) static int scdstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct bio *nbio; @@ -381,7 +381,7 @@ scd_start(int unit) struct scd_data *cd = scd_data + unit; struct bio *bio; struct partition *p; - dev_t dev; + cdev_t dev; crit_enter(); if (cd->flags & SCDMBXBSY) { @@ -416,7 +416,7 @@ scd_start(int unit) static int scdioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t addr = ap->a_data; struct scd_data *cd; int unit,part; diff --git a/sys/dev/disk/vn/vn.c b/sys/dev/disk/vn/vn.c index de4917feef..38229a2a8e 100644 --- a/sys/dev/disk/vn/vn.c +++ b/sys/dev/disk/vn/vn.c @@ -39,7 +39,7 @@ * * from: @(#)vn.c 8.6 (Berkeley) 4/1/94 * $FreeBSD: src/sys/dev/vn/vn.c,v 1.105.2.4 2001/11/18 07:11:00 dillon Exp $ - * $DragonFly: src/sys/dev/disk/vn/vn.c,v 1.27 2006/09/05 00:55:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/vn/vn.c,v 1.28 2006/09/10 01:26:34 dillon Exp $ */ /* @@ -122,7 +122,7 @@ struct vn_softc { int sc_maxactive; /* max # of active requests */ struct buf sc_tab; /* transfer queue */ u_long sc_options; /* options */ - dev_t sc_devlist; /* devices that refer to this unit */ + cdev_t sc_devlist; /* devices that refer to this unit */ SLIST_ENTRY(vn_softc) sc_list; }; @@ -140,13 +140,13 @@ static u_long vn_options; static int vnsetcred (struct vn_softc *vn, struct ucred *cred); static void vnclear (struct vn_softc *vn); static int vn_modevent (module_t, int, void *); -static int vniocattach_file (struct vn_softc *, struct vn_ioctl *, dev_t dev, int flag, struct ucred *cred); -static int vniocattach_swap (struct vn_softc *, struct vn_ioctl *, dev_t dev, int flag, struct ucred *cred); +static int vniocattach_file (struct vn_softc *, struct vn_ioctl *, cdev_t dev, int flag, struct ucred *cred); +static int vniocattach_swap (struct vn_softc *, struct vn_ioctl *, cdev_t dev, int flag, struct ucred *cred); static int vnclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct vn_softc *vn = dev->si_drv1; IFOPT(vn, VN_LABELS) @@ -160,7 +160,7 @@ vnclose(struct dev_close_args *ap) * attach the device to it. */ static struct vn_softc * -vnfindvn(dev_t dev) +vnfindvn(cdev_t dev) { int unit; struct vn_softc *vn; @@ -200,7 +200,7 @@ vnfindvn(dev_t dev) static int vnopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct vn_softc *vn; /* @@ -271,7 +271,7 @@ vnopen(struct dev_open_args *ap) static int vnstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp; struct bio *nbio; @@ -432,7 +432,7 @@ done: static int vnioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct vn_softc *vn; struct vn_ioctl *vio; int error; @@ -538,7 +538,7 @@ vnioctl(struct dev_ioctl_args *ap) */ static int -vniocattach_file(struct vn_softc *vn, struct vn_ioctl *vio, dev_t dev, +vniocattach_file(struct vn_softc *vn, struct vn_ioctl *vio, cdev_t dev, int flag, struct ucred *cred) { struct vattr vattr; @@ -619,7 +619,7 @@ done: */ static int -vniocattach_swap(struct vn_softc *vn, struct vn_ioctl *vio, dev_t dev, +vniocattach_swap(struct vn_softc *vn, struct vn_ioctl *vio, cdev_t dev, int flag, struct ucred *cred) { int error; @@ -755,7 +755,7 @@ vnclear(struct vn_softc *vn) static int vnsize(struct dev_psize_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct vn_softc *vn; vn = dev->si_drv1; @@ -771,7 +771,7 @@ static int vn_modevent(module_t mod, int type, void *data) { struct vn_softc *vn; - dev_t dev; + cdev_t dev; switch (type) { case MOD_LOAD: @@ -784,7 +784,7 @@ vn_modevent(module_t mod, int type, void *data) SLIST_REMOVE_HEAD(&vn_list, sc_list); if (vn->sc_flags & VNF_INITED) vnclear(vn); - /* Cleanup all dev_t's that refer to this unit */ + /* Cleanup all cdev_t's that refer to this unit */ while ((dev = vn->sc_devlist) != NULL) { vn->sc_devlist = dev->si_drv2; dev->si_drv1 = dev->si_drv2 = NULL; diff --git a/sys/dev/disk/wt/wt.c b/sys/dev/disk/wt/wt.c index 0da61258a2..39849cdf16 100644 --- a/sys/dev/disk/wt/wt.c +++ b/sys/dev/disk/wt/wt.c @@ -21,7 +21,7 @@ * * Version 1.3, Thu Nov 11 12:09:13 MSK 1993 * $FreeBSD: src/sys/i386/isa/wt.c,v 1.57.2.1 2000/08/08 19:49:53 peter Exp $ - * $DragonFly: src/sys/dev/disk/wt/wt.c,v 1.17 2006/09/05 00:55:38 dillon Exp $ + * $DragonFly: src/sys/dev/disk/wt/wt.c,v 1.18 2006/09/10 01:26:34 dillon Exp $ * */ @@ -273,7 +273,7 @@ struct isa_driver wtdriver = { wtprobe, wtattach, "wt", }; static int wtopen (struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int u = minor (dev) & T_UNIT; wtinfo_t *t = wttab + u; int error; @@ -356,7 +356,7 @@ wtopen (struct dev_open_args *ap) static int wtclose (struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int u = minor (dev) & T_UNIT; wtinfo_t *t = wttab + u; @@ -406,7 +406,7 @@ done: static int wtioctl (struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t arg = ap->a_data; int u = minor (dev) & T_UNIT; wtinfo_t *t = wttab + u; @@ -506,7 +506,7 @@ wtioctl (struct dev_ioctl_args *ap) static int wtstrategy (struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; int u = minor(dev) & T_UNIT; diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h index ab37c2f0a1..4776f25b03 100644 --- a/sys/dev/drm/drmP.h +++ b/sys/dev/drm/drmP.h @@ -28,7 +28,7 @@ * Rickard E. (Rik) Faith * Gareth Hughes * $FreeBSD: src/sys/dev/drm/drmP.h,v 1.4.2.1 2003/04/26 07:05:27 anholt Exp $ - * $DragonFly: src/sys/dev/drm/drmP.h,v 1.3 2004/02/13 01:23:57 joerg Exp $ + * $DragonFly: src/sys/dev/drm/drmP.h,v 1.4 2006/09/10 01:26:34 dillon Exp $ */ #ifndef _DRM_P_H_ @@ -313,7 +313,7 @@ struct drm_device { #if defined(__DragonFly__) || defined(__FreeBSD__) device_t device; /* Device instance from newbus */ #endif - dev_t devnode; /* Device number for mknod */ + cdev_t devnode; /* Device number for mknod */ int flags; /* Flags to open(2) */ diff --git a/sys/dev/drm/drm_drv.h b/sys/dev/drm/drm_drv.h index d48e099d9e..fb2052a340 100644 --- a/sys/dev/drm/drm_drv.h +++ b/sys/dev/drm/drm_drv.h @@ -29,7 +29,7 @@ * Gareth Hughes * * $FreeBSD: src/sys/dev/drm/drm_drv.h,v 1.13.2.1 2003/04/26 07:05:28 anholt Exp $ - * $DragonFly: src/sys/dev/drm/Attic/drm_drv.h,v 1.14 2006/07/28 02:17:36 dillon Exp $ + * $DragonFly: src/sys/dev/drm/Attic/drm_drv.h,v 1.15 2006/09/10 01:26:34 dillon Exp $ */ /* @@ -288,7 +288,7 @@ static int DRM(lkmhandle)(struct lkm_table *lkmtp, int cmd); int DRM(modprobe)(); int DRM(probe)(struct pci_attach_args *pa); -void DRM(attach)(struct pci_attach_args *pa, dev_t kdev); +void DRM(attach)(struct pci_attach_args *pa, cdev_t kdev); int DRM(lkmentry)(struct lkm_table *lkmtp, int cmd, int ver) { DISPATCH(lkmtp, cmd, ver, DRM(lkmhandle), DRM(lkmhandle), DRM(lkmhandle)); @@ -347,7 +347,7 @@ int DRM(probe)(struct pci_attach_args *pa) return 0; } -void DRM(attach)(struct pci_attach_args *pa, dev_t kdev) +void DRM(attach)(struct pci_attach_args *pa, cdev_t kdev) { int i; drm_device_t *dev; @@ -817,7 +817,7 @@ int DRM(version)( DRM_IOCTL_ARGS ) int DRM(open)(struct dev_open_args *ap) { - dev_t kdev = ap->a_head.a_dev; + cdev_t kdev = ap->a_head.a_dev; drm_device_t *dev = NULL; int retcode = 0; @@ -844,7 +844,7 @@ int DRM(open)(struct dev_open_args *ap) int DRM(close)(struct dev_close_args *ap) { - dev_t kdev = ap->a_head.a_dev; + cdev_t kdev = ap->a_head.a_dev; drm_file_t *priv; DRM_DEVICE; int retcode = 0; @@ -965,7 +965,7 @@ int DRM(close)(struct dev_close_args *ap) */ int DRM(ioctl)(struct dev_ioctl_args *ap) { - dev_t kdev = ap->a_head.a_dev; + cdev_t kdev = ap->a_head.a_dev; DRM_DEVICE; int retcode = 0; drm_ioctl_desc_t *ioctl; diff --git a/sys/dev/drm/drm_fops.h b/sys/dev/drm/drm_fops.h index 4559aa8fa1..381e069112 100644 --- a/sys/dev/drm/drm_fops.h +++ b/sys/dev/drm/drm_fops.h @@ -30,7 +30,7 @@ * Gareth Hughes * * $FreeBSD: src/sys/dev/drm/drm_fops.h,v 1.7.2.1 2003/04/26 07:05:28 anholt Exp $ - * $DragonFly: src/sys/dev/drm/Attic/drm_fops.h,v 1.5 2006/07/28 02:17:36 dillon Exp $ + * $DragonFly: src/sys/dev/drm/Attic/drm_fops.h,v 1.6 2006/09/10 01:26:34 dillon Exp $ */ #include "dev/drm/drmP.h" @@ -54,7 +54,7 @@ drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev, DRM_STRUCTPROC *p) /* DRM(open) is called whenever a process opens /dev/drm. */ -int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p, +int DRM(open_helper)(cdev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p, drm_device_t *dev) { int m = minor(kdev); diff --git a/sys/dev/drm/drm_os_freebsd.h b/sys/dev/drm/drm_os_freebsd.h index cdd1e547e6..bdb76489dd 100644 --- a/sys/dev/drm/drm_os_freebsd.h +++ b/sys/dev/drm/drm_os_freebsd.h @@ -1,6 +1,6 @@ /* * $FreeBSD: src/sys/dev/drm/drm_os_freebsd.h,v 1.10.2.1 2003/04/26 07:05:28 anholt Exp $ - * $DragonFly: src/sys/dev/drm/Attic/drm_os_freebsd.h,v 1.19 2006/09/05 03:48:10 dillon Exp $ + * $DragonFly: src/sys/dev/drm/Attic/drm_os_freebsd.h,v 1.20 2006/09/10 01:26:34 dillon Exp $ */ #include #include @@ -108,7 +108,7 @@ * of the current process. It should be a per-open unique pointer, but * code for that is not yet written */ #define DRMFILE void * -#define DRM_IOCTL_ARGS dev_t kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp +#define DRM_IOCTL_ARGS cdev_t kdev, u_long cmd, caddr_t data, int flags, DRM_STRUCTPROC *p, DRMFILE filp #define DRM_LOCK lockmgr(&dev->dev_lock, LK_EXCLUSIVE | LK_RETRY) #define DRM_UNLOCK lockmgr(&dev->dev_lock, LK_RELEASE) #define DRM_SUSER(td) suser(td) @@ -374,7 +374,7 @@ extern d_close_t DRM(close); extern d_read_t DRM(read); extern d_poll_t DRM(poll); extern d_mmap_t DRM(mmap); -extern int DRM(open_helper)(dev_t kdev, int flags, int fmt, +extern int DRM(open_helper)(cdev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p, drm_device_t *dev); extern drm_file_t *DRM(find_file_by_proc)(drm_device_t *dev, DRM_STRUCTPROC *p); diff --git a/sys/dev/drm/drm_vm.h b/sys/dev/drm/drm_vm.h index b3dde7bab6..09bbd7cd05 100644 --- a/sys/dev/drm/drm_vm.h +++ b/sys/dev/drm/drm_vm.h @@ -1,21 +1,21 @@ /* * $FreeBSD: src/sys/dev/drm/drm_vm.h,v 1.6.2.1 2003/04/26 07:05:29 anholt Exp $ - * $DragonFly: src/sys/dev/drm/Attic/drm_vm.h,v 1.4 2006/07/28 02:17:36 dillon Exp $ + * $DragonFly: src/sys/dev/drm/Attic/drm_vm.h,v 1.5 2006/09/10 01:26:34 dillon Exp $ */ #if defined(__FreeBSD__) && __FreeBSD_version >= 500102 -static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, +static int DRM(dma_mmap)(cdev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) #elif defined(__DragonFly__) static int DRM(dma_mmap)(struct dev_mmap_args *ap) #elif defined(__FreeBSD__) -static int DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot) +static int DRM(dma_mmap)(cdev_t kdev, vm_offset_t offset, int prot) #elif defined(__NetBSD__) -static paddr_t DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot) +static paddr_t DRM(dma_mmap)(cdev_t kdev, vm_offset_t offset, int prot) #endif { #ifdef __DragonFly__ - dev_t kdev = ap->a_head.a_dev; + cdev_t kdev = ap->a_head.a_dev; vm_offset_t offset = ap->a_offset; #endif DRM_DEVICE; @@ -42,15 +42,15 @@ static paddr_t DRM(dma_mmap)(dev_t kdev, vm_offset_t offset, int prot) } #if defined(__FreeBSD__) && __FreeBSD_version >= 500102 -int DRM(mmap)(dev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, +int DRM(mmap)(cdev_t kdev, vm_offset_t offset, vm_paddr_t *paddr, int prot) #elif defined(__DragonFly__) int DRM(mmap)(struct dev_mmap_args *ap) #elif defined(__NetBSD__) -paddr_t DRM(mmap)(dev_t kdev, off_t offset, int prot) +paddr_t DRM(mmap)(cdev_t kdev, off_t offset, int prot) #endif { - dev_t kdev = ap->a_head.a_dev; + cdev_t kdev = ap->a_head.a_dev; DRM_DEVICE; drm_local_map_t *map = NULL; drm_map_list_entry_t *listentry=NULL; diff --git a/sys/dev/misc/dcons/dcons_os.c b/sys/dev/misc/dcons/dcons_os.c index 309965a88f..8f88f24422 100644 --- a/sys/dev/misc/dcons/dcons_os.c +++ b/sys/dev/misc/dcons/dcons_os.c @@ -32,7 +32,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/dcons/dcons_os.c,v 1.4 2004/10/24 12:41:04 simokawa Exp $ - * $DragonFly: src/sys/dev/misc/dcons/dcons_os.c,v 1.5 2006/09/03 17:43:58 dillon Exp $ + * $DragonFly: src/sys/dev/misc/dcons/dcons_os.c,v 1.6 2006/09/10 01:26:34 dillon Exp $ */ #include @@ -135,10 +135,10 @@ static struct callout dcons_callout; struct dcons_buf *dcons_buf; /* for local dconschat */ #ifdef __DragonFly__ -#define DEV dev_t +#define DEV cdev_t #define THREAD d_thread_t #elif __FreeBSD_version < 500000 -#define DEV dev_t +#define DEV cdev_t #define THREAD struct proc #else #define DEV struct cdev * @@ -258,7 +258,7 @@ dcons_os_putc(struct dcons_softc *dc, int c) static int dcons_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; int unit, error; @@ -302,7 +302,7 @@ dcons_open(struct dev_open_args *ap) static int dcons_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit; struct tty *tp; @@ -322,7 +322,7 @@ dcons_close(struct dev_close_args *ap) static int dcons_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit; struct tty *tp; int error; diff --git a/sys/dev/misc/gpib/gpib.c b/sys/dev/misc/gpib/gpib.c index 58506c7018..1a20bd55e1 100644 --- a/sys/dev/misc/gpib/gpib.c +++ b/sys/dev/misc/gpib/gpib.c @@ -17,7 +17,7 @@ * all derivative works or modified versions. * * $FreeBSD: src/sys/i386/isa/gpib.c,v 1.29 2000/01/29 16:17:32 peter Exp $ - * $DragonFly: src/sys/dev/misc/gpib/gpib.c,v 1.12 2006/09/05 00:55:38 dillon Exp $ + * $DragonFly: src/sys/dev/misc/gpib/gpib.c,v 1.13 2006/09/10 01:26:34 dillon Exp $ * */ /*Please read the README file for usage information*/ @@ -141,7 +141,7 @@ gpattach(struct isa_device *isdp) static int gpopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct gpib_softc *sc = &gpib_sc; u_char unit; int status; @@ -216,7 +216,7 @@ enableremote(unit); static int gpclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct gpib_softc *sc = &gpib_sc; unsigned char unit; unsigned char status; @@ -316,7 +316,7 @@ while (!(inb(ISR1)&2)&&(status==EWOULDBLOCK)); static int gpwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; int err,count; diff --git a/sys/dev/misc/joy/joy.c b/sys/dev/misc/joy/joy.c index 97b4a6e57d..a6ed9e5e19 100644 --- a/sys/dev/misc/joy/joy.c +++ b/sys/dev/misc/joy/joy.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/isa/joy.c,v 1.38.2.1 2001/09/01 05:55:31 murray Exp $ - * $DragonFly: src/sys/dev/misc/joy/joy.c,v 1.9 2006/07/28 02:17:36 dillon Exp $ + * $DragonFly: src/sys/dev/misc/joy/joy.c,v 1.10 2006/09/10 01:26:34 dillon Exp $ */ #include @@ -156,7 +156,7 @@ DRIVER_MODULE(joy, isa, joy_isa_driver, joy_devclass, 0, 0); static int joyopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int i = joypart (dev); struct joy_softc *joy = JOY_SOFTC(UNIT(dev)); @@ -170,7 +170,7 @@ joyopen(struct dev_open_args *ap) static int joyclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int i = joypart (dev); struct joy_softc *joy = JOY_SOFTC(UNIT(dev)); @@ -181,7 +181,7 @@ joyclose(struct dev_close_args *ap) static int joyread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct joy_softc *joy = JOY_SOFTC(UNIT(dev)); bus_space_handle_t port = joy->port; @@ -235,7 +235,7 @@ joyread(struct dev_read_args *ap) static int joyioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; struct joy_softc *joy = JOY_SOFTC(UNIT(dev)); int i = joypart (dev); diff --git a/sys/dev/misc/kbd/kbd.c b/sys/dev/misc/kbd/kbd.c index 44d7baae51..506b816772 100644 --- a/sys/dev/misc/kbd/kbd.c +++ b/sys/dev/misc/kbd/kbd.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/kbd/kbd.c,v 1.17.2.2 2001/07/30 16:46:43 yokota Exp $ - * $DragonFly: src/sys/dev/misc/kbd/kbd.c,v 1.20 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/dev/misc/kbd/kbd.c,v 1.21 2006/09/10 01:26:34 dillon Exp $ */ /* * Generic keyboard driver. @@ -459,7 +459,7 @@ static struct dev_ops kbd_ops = { int kbd_attach(keyboard_t *kbd) { - dev_t dev; + cdev_t dev; if (kbd->kb_index >= keyboards) return EINVAL; @@ -481,7 +481,7 @@ kbd_attach(keyboard_t *kbd) int kbd_detach(keyboard_t *kbd) { - dev_t dev; + cdev_t dev; if (kbd->kb_index >= keyboards) return EINVAL; @@ -490,7 +490,7 @@ kbd_detach(keyboard_t *kbd) /* * Deal with refs properly. The KBD driver really ought to have - * recorded the dev_t separately. + * recorded the cdev_t separately. */ if ((dev = make_adhoc_dev(&kbd_ops, kbd->kb_index)) != NOCDEV) { if (dev->si_drv1) { @@ -516,7 +516,7 @@ static kbd_callback_func_t genkbd_event; static int genkbdopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; keyboard_t *kbd; genkbd_softc_t *sc; int i; @@ -556,7 +556,7 @@ genkbdopen(struct dev_open_args *ap) static int genkbdclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; keyboard_t *kbd; genkbd_softc_t *sc; @@ -582,7 +582,7 @@ genkbdclose(struct dev_close_args *ap) static int genkbdread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; keyboard_t *kbd; genkbd_softc_t *sc; @@ -636,7 +636,7 @@ genkbdread(struct dev_read_args *ap) static int genkbdwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; keyboard_t *kbd; kbd = kbd_get_keyboard(KBD_INDEX(dev)); @@ -648,7 +648,7 @@ genkbdwrite(struct dev_write_args *ap) static int genkbdioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; keyboard_t *kbd; int error; @@ -664,7 +664,7 @@ genkbdioctl(struct dev_ioctl_args *ap) static int genkbdpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; keyboard_t *kbd; genkbd_softc_t *sc; int revents; diff --git a/sys/dev/misc/labpc/labpc.c b/sys/dev/misc/labpc/labpc.c index 8c9ba092e7..9870f08277 100644 --- a/sys/dev/misc/labpc/labpc.c +++ b/sys/dev/misc/labpc/labpc.c @@ -39,7 +39,7 @@ * dufault@hda.com * * $FreeBSD: src/sys/i386/isa/labpc.c,v 1.35 1999/09/25 18:24:08 phk Exp $ - * $DragonFly: src/sys/dev/misc/labpc/labpc.c,v 1.18 2006/09/05 00:55:38 dillon Exp $ + * $DragonFly: src/sys/dev/misc/labpc/labpc.c,v 1.19 2006/09/10 01:26:34 dillon Exp $ * */ @@ -135,7 +135,7 @@ struct ctlr int gains[8]; - dev_t dev; /* Copy of device */ + cdev_t dev; /* Copy of device */ void (*starter)(struct ctlr *ctlr, long count); void (*stop)(struct ctlr *ctlr); @@ -695,7 +695,7 @@ labpcintr(void *arg) */ static int -lockout_multiple_open(dev_t current, dev_t next) +lockout_multiple_open(cdev_t current, dev_t next) { return ! (DIGITAL(current) && DIGITAL(next)); } @@ -703,7 +703,7 @@ lockout_multiple_open(dev_t current, dev_t next) static int labpcopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_short unit = UNIT(dev); struct ctlr *ctlr; @@ -741,7 +741,7 @@ labpcopen(struct dev_open_args *ap) static int labpcclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ctlr *ctlr = labpcs[UNIT(dev)]; (*ctlr->stop)(ctlr); @@ -837,7 +837,7 @@ static void da_strategy(struct bio *bio, struct ctlr *ctlr) { struct buf *bp = bio->bio_buf; - dev_t dev = bio->bio_driver_info; + cdev_t dev = bio->bio_driver_info; int len; u_char *data; int port; @@ -920,7 +920,7 @@ static void digital_out_strategy(struct bio *bio, struct ctlr *ctlr) { struct buf *bp = bio->bio_buf; - dev_t dev = bio->bio_driver_info; + cdev_t dev = bio->bio_driver_info; int len; u_char *data; int port; @@ -951,7 +951,7 @@ static void digital_in_strategy(struct bio *bio, struct ctlr *ctlr) { struct buf *bp = bio->bio_buf; - dev_t dev = bio->bio_driver_info; + cdev_t dev = bio->bio_driver_info; int len; u_char *data; int port; @@ -979,7 +979,7 @@ digital_in_strategy(struct bio *bio, struct ctlr *ctlr) static int labpcstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct ctlr *ctlr = labpcs[UNIT(dev)]; @@ -1023,7 +1023,7 @@ labpcstrategy(struct dev_strategy_args *ap) static int labpcioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t arg = ap->a_data; struct ctlr *ctlr = labpcs[UNIT(dev)]; diff --git a/sys/dev/misc/lpt/lpt.c b/sys/dev/misc/lpt/lpt.c index 263bed1886..3786ef1ef4 100644 --- a/sys/dev/misc/lpt/lpt.c +++ b/sys/dev/misc/lpt/lpt.c @@ -49,7 +49,7 @@ * From Id: lpt.c,v 1.55.2.1 1996/11/12 09:08:38 phk Exp * From Id: nlpt.c,v 1.14 1999/02/08 13:55:43 des Exp * $FreeBSD: src/sys/dev/ppbus/lpt.c,v 1.15.2.3 2000/07/07 00:30:40 obrien Exp $ - * $DragonFly: src/sys/dev/misc/lpt/lpt.c,v 1.16 2006/09/05 00:55:38 dillon Exp $ + * $DragonFly: src/sys/dev/misc/lpt/lpt.c,v 1.17 2006/09/10 01:26:34 dillon Exp $ */ /* @@ -451,7 +451,7 @@ lptout(void *arg) static int lptopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int trys, err; u_int unit = LPTUNIT(minor(dev)); struct lpt_data *sc = UNITOSOFTC(unit); @@ -572,7 +572,7 @@ lptopen(struct dev_open_args *ap) static int lptclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_int unit = LPTUNIT(minor(dev)); struct lpt_data *sc = UNITOSOFTC(unit); device_t lptdev = UNITODEVICE(unit); @@ -685,7 +685,7 @@ lpt_pushbytes(device_t dev) static int lptread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; u_int unit = LPTUNIT(minor(dev)); struct lpt_data *sc = UNITOSOFTC(unit); @@ -732,7 +732,7 @@ error: static int lptwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; unsigned n; int err; @@ -901,7 +901,7 @@ lptintr(device_t dev) static int lptioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error = 0; u_int unit = LPTUNIT(minor(dev)); struct lpt_data *sc = UNITOSOFTC(unit); diff --git a/sys/dev/misc/mse/mse.c b/sys/dev/misc/mse/mse.c index ce1eb8e474..bdcf895a02 100644 --- a/sys/dev/misc/mse/mse.c +++ b/sys/dev/misc/mse/mse.c @@ -12,7 +12,7 @@ * without express or implied warranty. * * $FreeBSD: src/sys/i386/isa/mse.c,v 1.49.2.1 2000/03/20 13:58:47 yokota Exp $ - * $DragonFly: src/sys/dev/misc/mse/mse.c,v 1.17 2006/07/28 02:17:36 dillon Exp $ + * $DragonFly: src/sys/dev/misc/mse/mse.c,v 1.18 2006/09/10 01:26:34 dillon Exp $ */ /* * Driver for the Logitech and ATI Inport Bus mice for use with 386bsd and @@ -382,7 +382,7 @@ mse_detach(device_t dev) static int mseopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; mse_softc_t *sc; sc = devclass_get_softc(mse_devclass, MSE_UNIT(dev)); @@ -418,7 +418,7 @@ mseopen(struct dev_open_args *ap) static int mseclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; mse_softc_t *sc = devclass_get_softc(mse_devclass, MSE_UNIT(dev)); crit_enter(); @@ -437,7 +437,7 @@ mseclose(struct dev_close_args *ap) static int mseread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; mse_softc_t *sc = devclass_get_softc(mse_devclass, MSE_UNIT(dev)); int xfer, error; @@ -502,7 +502,7 @@ mseread(struct dev_read_args *ap) static int mseioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t addr = ap->a_data; mse_softc_t *sc = devclass_get_softc(mse_devclass, MSE_UNIT(dev)); mousestatus_t status; @@ -614,7 +614,7 @@ mseioctl(struct dev_ioctl_args *ap) static int msepoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; mse_softc_t *sc = devclass_get_softc(mse_devclass, MSE_UNIT(dev)); int revents = 0; @@ -643,10 +643,10 @@ msepoll(struct dev_poll_args *ap) static void msetimeout(void *arg) { - dev_t dev; + cdev_t dev; mse_softc_t *sc; - dev = (dev_t)arg; + dev = (cdev_t)arg; sc = devclass_get_softc(mse_devclass, MSE_UNIT(dev)); if (sc->sc_watchdog) { if (bootverbose) diff --git a/sys/dev/misc/nmdm/nmdm.c b/sys/dev/misc/nmdm/nmdm.c index 0722c729af..02c4df674a 100644 --- a/sys/dev/misc/nmdm/nmdm.c +++ b/sys/dev/misc/nmdm/nmdm.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/nmdm/nmdm.c,v 1.5.2.1 2001/08/11 00:54:14 mp Exp $ - * $DragonFly: src/sys/dev/misc/nmdm/nmdm.c,v 1.14 2006/09/05 00:55:38 dillon Exp $ + * $DragonFly: src/sys/dev/misc/nmdm/nmdm.c,v 1.15 2006/09/10 01:26:34 dillon Exp $ */ /* @@ -82,7 +82,7 @@ static struct dev_ops nmdm_ops = { struct softpart { struct tty nm_tty; - dev_t dev; + cdev_t dev; int modemsignals; /* bits defined in sys/ttycom.h */ int gotbreak; }; @@ -118,7 +118,7 @@ do { \ static void nmdminit(int n) { - dev_t dev1, dev2; + cdev_t dev1, dev2; struct nm_softc *pt; /* @@ -153,12 +153,12 @@ nmdminit(int n) static int nmdmopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp, *tp2; int error; int minr; #if 0 - dev_t nextdev; + cdev_t nextdev; #endif struct nm_softc *pti; int is_b; @@ -257,7 +257,7 @@ nmdmopen(struct dev_open_args *ap) static int nmdmclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp, *tp2; int err; struct softpart *ourpart, *otherpart; @@ -295,7 +295,7 @@ nmdmclose(struct dev_close_args *ap) static int nmdmread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error = 0; struct tty *tp, *tp2; struct softpart *ourpart, *otherpart; @@ -330,7 +330,7 @@ nmdmread(struct dev_read_args *ap) static int nmdmwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; u_char *cp = 0; int cc = 0; @@ -476,7 +476,7 @@ nmdmstop(struct tty *tp, int flush) static int nmdmioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp = dev->si_tty; struct nm_softc *pti = dev->si_drv1; int error; diff --git a/sys/dev/misc/pcfclock/pcfclock.c b/sys/dev/misc/pcfclock/pcfclock.c index b57ba3575b..8047759527 100644 --- a/sys/dev/misc/pcfclock/pcfclock.c +++ b/sys/dev/misc/pcfclock/pcfclock.c @@ -22,7 +22,7 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ppbus/pcfclock.c,v 1.3.2.1 2000/05/24 00:20:57 n_hibma Exp $ - * $DragonFly: src/sys/dev/misc/pcfclock/pcfclock.c,v 1.9 2006/07/28 02:17:36 dillon Exp $ + * $DragonFly: src/sys/dev/misc/pcfclock/pcfclock.c,v 1.10 2006/09/10 01:26:34 dillon Exp $ * */ @@ -144,7 +144,7 @@ pcfclock_attach(device_t dev) static int pcfclock_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_int unit = minor(dev); struct pcfclock_data *sc = UNITOSOFTC(unit); device_t pcfclockdev = UNITODEVICE(unit); @@ -166,7 +166,7 @@ pcfclock_open(struct dev_open_args *ap) static int pcfclock_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_int unit = minor(dev); struct pcfclock_data *sc = UNITOSOFTC(unit); device_t pcfclockdev = UNITODEVICE(unit); @@ -181,7 +181,7 @@ pcfclock_close(struct dev_close_args *ap) } static void -pcfclock_write_cmd(dev_t dev, unsigned char command) +pcfclock_write_cmd(cdev_t dev, unsigned char command) { u_int unit = minor(dev); device_t ppidev = UNITODEVICE(unit); @@ -201,7 +201,7 @@ pcfclock_write_cmd(dev_t dev, unsigned char command) } static void -pcfclock_display_data(dev_t dev, char buf[18]) +pcfclock_display_data(cdev_t dev, char buf[18]) { u_int unit = minor(dev); #ifdef PCFCLOCK_VERBOSE @@ -224,7 +224,7 @@ pcfclock_display_data(dev_t dev, char buf[18]) } static int -pcfclock_read_data(dev_t dev, char *buf, ssize_t bits) +pcfclock_read_data(cdev_t dev, char *buf, ssize_t bits) { u_int unit = minor(dev); device_t ppidev = UNITODEVICE(unit); @@ -263,7 +263,7 @@ pcfclock_read_data(dev_t dev, char *buf, ssize_t bits) } static int -pcfclock_read_dev(dev_t dev, char *buf, int maxretries) +pcfclock_read_dev(cdev_t dev, char *buf, int maxretries) { u_int unit = minor(dev); device_t ppidev = UNITODEVICE(unit); @@ -295,7 +295,7 @@ pcfclock_read_dev(dev_t dev, char *buf, int maxretries) static int pcfclock_read(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_int unit = minor(dev); char buf[18]; int error = 0; diff --git a/sys/dev/misc/ppi/ppi.c b/sys/dev/misc/ppi/ppi.c index 273d235b58..e8b289a65c 100644 --- a/sys/dev/misc/ppi/ppi.c +++ b/sys/dev/misc/ppi/ppi.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ppbus/ppi.c,v 1.21.2.3 2000/08/07 18:24:43 peter Exp $ - * $DragonFly: src/sys/dev/misc/ppi/ppi.c,v 1.12 2006/07/28 02:17:36 dillon Exp $ + * $DragonFly: src/sys/dev/misc/ppi/ppi.c,v 1.13 2006/09/10 01:26:34 dillon Exp $ * */ #include "opt_ppb_1284.h" @@ -247,7 +247,7 @@ ppiintr(void *arg) static int ppiopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_int unit = minor(dev); struct ppi_data *ppi = UNITOSOFTC(unit); device_t ppidev = UNITODEVICE(unit); @@ -283,7 +283,7 @@ ppiopen(struct dev_open_args *ap) static int ppiclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_int unit = minor(dev); struct ppi_data *ppi = UNITOSOFTC(unit); device_t ppidev = UNITODEVICE(unit); @@ -327,7 +327,7 @@ static int ppiread(struct dev_read_args *ap) { #ifdef PERIPH_1284 - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; u_int unit = minor(dev); struct ppi_data *ppi = UNITOSOFTC(unit); @@ -413,7 +413,7 @@ static int ppiwrite(struct dev_write_args *ap) { #ifdef PERIPH_1284 - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; u_int unit = minor(dev); struct ppi_data *ppi = UNITOSOFTC(unit); @@ -501,7 +501,7 @@ error: static int ppiioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_int unit = minor(dev); device_t ppidev = UNITODEVICE(unit); device_t ppbus = device_get_parent(ppidev); diff --git a/sys/dev/misc/pps/pps.c b/sys/dev/misc/pps/pps.c index 6de37294f0..27384eb412 100644 --- a/sys/dev/misc/pps/pps.c +++ b/sys/dev/misc/pps/pps.c @@ -7,7 +7,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/dev/ppbus/pps.c,v 1.24.2.1 2000/05/24 00:20:57 n_hibma Exp $ - * $DragonFly: src/sys/dev/misc/pps/pps.c,v 1.15 2006/07/28 02:17:36 dillon Exp $ + * $DragonFly: src/sys/dev/misc/pps/pps.c,v 1.16 2006/09/10 01:26:34 dillon Exp $ * * This driver implements a draft-mogul-pps-api-02.txt PPS source. * @@ -114,7 +114,7 @@ ppsattach(device_t ppsdev) static int ppsopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_int unit = minor(dev); struct pps_data *sc = UNITOSOFTC(unit); device_t ppsdev = UNITODEVICE(unit); @@ -144,7 +144,7 @@ ppsopen(struct dev_open_args *ap) static int ppsclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_int unit = minor(dev); struct pps_data *sc = UNITOSOFTC(unit); device_t ppsdev = UNITODEVICE(unit); @@ -182,7 +182,7 @@ ppsintr(void *arg) static int ppsioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_int unit = minor(dev); struct pps_data *sc = UNITOSOFTC(unit); diff --git a/sys/dev/misc/psm/psm.c b/sys/dev/misc/psm/psm.c index cebe8023d4..98d1754316 100644 --- a/sys/dev/misc/psm/psm.c +++ b/sys/dev/misc/psm/psm.c @@ -21,7 +21,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/isa/psm.c,v 1.23.2.7 2003/11/12 04:26:26 mikeh Exp $ - * $DragonFly: src/sys/dev/misc/psm/psm.c,v 1.19 2006/08/03 16:40:47 swildner Exp $ + * $DragonFly: src/sys/dev/misc/psm/psm.c,v 1.20 2006/09/10 01:26:34 dillon Exp $ */ /* @@ -1289,7 +1289,7 @@ psmdetach(device_t dev) static int psmopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = PSM_UNIT(dev); struct psm_softc *sc; int command_byte; @@ -1374,7 +1374,7 @@ psmopen(struct dev_open_args *ap) static int psmclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = PSM_UNIT(dev); struct psm_softc *sc = PSM_SOFTC(unit); int stat[3]; @@ -1515,7 +1515,7 @@ tame_mouse(struct psm_softc *sc, mousestatus_t *status, unsigned char *buf) static int psmread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev)); unsigned char buf[PSM_SMALLBUFSIZE]; @@ -1640,7 +1640,7 @@ unblock_mouse_data(struct psm_softc *sc, int c) static int psmioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t addr= ap->a_data; struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev)); mousemode_t mode; @@ -2378,7 +2378,7 @@ psmintr(void *arg) static int psmpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct psm_softc *sc = PSM_SOFTC(PSM_UNIT(dev)); int revents = 0; diff --git a/sys/dev/misc/snp/snp.c b/sys/dev/misc/snp/snp.c index 869bae2da3..05a0a50097 100644 --- a/sys/dev/misc/snp/snp.c +++ b/sys/dev/misc/snp/snp.c @@ -13,7 +13,7 @@ * Snoop stuff. * * $FreeBSD: src/sys/dev/snp/snp.c,v 1.69.2.2 2002/05/06 07:30:02 dd Exp $ - * $DragonFly: src/sys/dev/misc/snp/snp.c,v 1.16 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/dev/misc/snp/snp.c,v 1.17 2006/09/10 01:26:35 dillon Exp $ */ #include @@ -60,7 +60,7 @@ static struct linesw snpdisc = { */ struct snoop { LIST_ENTRY(snoop) snp_list; /* List glue. */ - dev_t snp_target; /* Target tty device. */ + cdev_t snp_target; /* Target tty device. */ struct tty *snp_tty; /* Target tty pointer. */ u_long snp_len; /* Possible length. */ u_long snp_base; /* Data base. */ @@ -104,7 +104,7 @@ static int snooplinedisc; static LIST_HEAD(, snoop) snp_sclist = LIST_HEAD_INITIALIZER(&snp_sclist); -static struct tty *snpdevtotty (dev_t dev); +static struct tty *snpdevtotty (cdev_t dev); static int snp_detach (struct snoop *snp); static int snp_down (struct snoop *snp); static int snp_in (struct snoop *snp, char *buf, int n); @@ -165,7 +165,7 @@ snplwrite(struct tty *tp, struct uio *uio, int flag) } static struct tty * -snpdevtotty(dev_t dev) +snpdevtotty(cdev_t dev) { if ((dev_dflags(dev) & D_TTY) == 0) return (NULL); @@ -180,7 +180,7 @@ snpdevtotty(dev_t dev) static int snpwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct snoop *snp; struct tty *tp; @@ -218,7 +218,7 @@ tty_input: static int snpread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct snoop *snp; int error, len, n, nblen; @@ -360,7 +360,7 @@ snp_in(struct snoop *snp, char *buf, int n) static int snpopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct snoop *snp; if (dev->si_drv1 == NULL) { @@ -433,7 +433,7 @@ detach_notty: static int snpclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct snoop *snp; snp = dev->si_drv1; @@ -463,10 +463,10 @@ snp_down(struct snoop *snp) static int snpioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct snoop *snp; struct tty *tp, *tpo; - dev_t tdev; + cdev_t tdev; snp = dev->si_drv1; switch (ap->a_cmd) { @@ -511,7 +511,7 @@ snpioctl(struct dev_ioctl_args *ap) * SNPGTTY happy, else we can't know what is device * major/minor for tty. */ - *((dev_t *)ap->a_data) = snp->snp_target; + *((cdev_t *)ap->a_data) = snp->snp_target; break; case FIOASYNC: @@ -546,7 +546,7 @@ snpioctl(struct dev_ioctl_args *ap) static int snppoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct snoop *snp; int revents; diff --git a/sys/dev/misc/spigot/spigot.c b/sys/dev/misc/spigot/spigot.c index 0208f2de54..f859c4b3db 100644 --- a/sys/dev/misc/spigot/spigot.c +++ b/sys/dev/misc/spigot/spigot.c @@ -43,7 +43,7 @@ * Version 1.7, December 1995. * * $FreeBSD: src/sys/i386/isa/spigot.c,v 1.44 2000/01/29 16:17:36 peter Exp $ - * $DragonFly: src/sys/dev/misc/spigot/spigot.c,v 1.13 2006/09/03 18:29:16 dillon Exp $ + * $DragonFly: src/sys/dev/misc/spigot/spigot.c,v 1.14 2006/09/10 01:26:35 dillon Exp $ * */ @@ -147,7 +147,7 @@ spigot_attach(struct isa_device *devp) static int spigot_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error; struct spigot_softc *ss; @@ -183,7 +183,7 @@ spigot_open(struct dev_open_args *ap) static int spigot_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct spigot_softc *ss; ss = (struct spigot_softc *)&spigot_softc[UNIT(dev)]; @@ -212,7 +212,7 @@ spigot_read(struct dev_read_args *ap) static int spigot_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; int error; struct spigot_softc *ss; diff --git a/sys/dev/misc/syscons/syscons.c b/sys/dev/misc/syscons/syscons.c index 71783f4750..78c70c155f 100644 --- a/sys/dev/misc/syscons/syscons.c +++ b/sys/dev/misc/syscons/syscons.c @@ -29,7 +29,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/dev/syscons/syscons.c,v 1.336.2.17 2004/03/25 08:41:09 ru Exp $ - * $DragonFly: src/sys/dev/misc/syscons/syscons.c,v 1.27 2006/09/05 03:48:10 dillon Exp $ + * $DragonFly: src/sys/dev/misc/syscons/syscons.c,v 1.28 2006/09/10 01:26:35 dillon Exp $ */ #include "use_splash.h" @@ -132,7 +132,7 @@ static int debugger; static int scvidprobe(int unit, int flags, int cons); static int sckbdprobe(int unit, int flags, int cons); static void scmeminit(void *arg); -static int scdevtounit(dev_t dev); +static int scdevtounit(cdev_t dev); static kbd_callback_func_t sckbdevent; static int scparam(struct tty *tp, struct termios *t); static void scstart(struct tty *tp); @@ -281,7 +281,7 @@ sc_attach_unit(int unit, int flags) video_info_t info; #endif int vc; - dev_t dev; + cdev_t dev; flags &= ~SC_KERNEL_CONSOLE; @@ -423,7 +423,7 @@ scmeminit(void *arg) SYSINIT(sc_mem, SI_SUB_KMEM, SI_ORDER_ANY, scmeminit, NULL); static int -scdevtounit(dev_t dev) +scdevtounit(cdev_t dev) { int vty = SC_VTY(dev); @@ -438,7 +438,7 @@ scdevtounit(dev_t dev) int scopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = scdevtounit(dev); sc_softc_t *sc; struct tty *tp; @@ -498,7 +498,7 @@ scopen(struct dev_open_args *ap) int scclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp = dev->si_tty; scr_stat *scp; @@ -634,7 +634,7 @@ scparam(struct tty *tp, struct termios *t) int scioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_long cmd = ap->a_cmd; caddr_t data = ap->a_data; int flag = ap->a_fflag; @@ -1369,7 +1369,7 @@ sccnterm(struct consdev *cp) } static void -sccnputc(dev_t dev, int c) +sccnputc(cdev_t dev, int c) { u_char buf[1]; scr_stat *scp = sc_console; @@ -1410,19 +1410,19 @@ sccnputc(dev_t dev, int c) } static int -sccngetc(dev_t dev) +sccngetc(cdev_t dev) { return sccngetch(0); } static int -sccncheckc(dev_t dev) +sccncheckc(cdev_t dev) { return sccngetch(SCGETC_NONBLOCK); } static void -sccndbctl(dev_t dev, int on) +sccndbctl(cdev_t dev, int on) { /* assert(sc_console_unit >= 0) */ /* try to switch to the kernel console screen */ @@ -2441,7 +2441,7 @@ scinit(int unit, int flags) * but is necessry evil for the time being. XXX */ static scr_stat main_console; - static dev_t main_devs[MAXCONS]; + static cdev_t main_devs[MAXCONS]; static struct tty main_tty; static u_short sc_buffer[ROW*COL]; /* XXX */ #ifndef SC_NO_FONT_LOADING @@ -2537,7 +2537,7 @@ scinit(int unit, int flags) kernel_default.rev_color); } else { /* assert(sc_malloc) */ - sc->dev = kmalloc(sizeof(dev_t)*sc->vtys, M_SYSCONS, M_WAITOK | M_ZERO); + sc->dev = kmalloc(sizeof(cdev_t)*sc->vtys, M_SYSCONS, M_WAITOK | M_ZERO); sc->dev[0] = make_dev(&sc_ops, unit*MAXCONS, UID_ROOT, GID_WHEEL, 0600, "ttyv%r", unit*MAXCONS); sc->dev[0]->si_tty = ttymalloc(sc->dev[0]->si_tty); diff --git a/sys/dev/misc/syscons/syscons.h b/sys/dev/misc/syscons/syscons.h index 5043d0709b..f3d0cf9522 100644 --- a/sys/dev/misc/syscons/syscons.h +++ b/sys/dev/misc/syscons/syscons.h @@ -29,7 +29,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/syscons/syscons.h,v 1.60.2.6 2002/09/15 22:30:45 dd Exp $ - * $DragonFly: src/sys/dev/misc/syscons/syscons.h,v 1.16 2006/07/28 02:17:36 dillon Exp $ + * $DragonFly: src/sys/dev/misc/syscons/syscons.h,v 1.17 2006/09/10 01:26:35 dillon Exp $ */ #ifndef _DEV_SYSCONS_SYSCONS_H_ @@ -201,7 +201,7 @@ typedef struct sc_softc { int first_vty; int vtys; - dev_t *dev; + cdev_t *dev; struct scr_stat *cur_scp; struct scr_stat *new_scp; struct scr_stat *old_scp; diff --git a/sys/dev/misc/syscons/sysmouse.c b/sys/dev/misc/syscons/sysmouse.c index f285da1099..a51d17cb67 100644 --- a/sys/dev/misc/syscons/sysmouse.c +++ b/sys/dev/misc/syscons/sysmouse.c @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/syscons/sysmouse.c,v 1.2.2.2 2001/07/16 05:21:24 yokota Exp $ - * $DragonFly: src/sys/dev/misc/syscons/sysmouse.c,v 1.11 2006/07/28 02:17:36 dillon Exp $ + * $DragonFly: src/sys/dev/misc/syscons/sysmouse.c,v 1.12 2006/09/10 01:26:35 dillon Exp $ */ #include "opt_syscons.h" @@ -71,7 +71,7 @@ static int smparam(struct tty *tp, struct termios *t); static int smopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; DPRINTF(5, ("smopen: dev:%d,%d, vty:%d\n", @@ -107,7 +107,7 @@ smopen(struct dev_open_args *ap) static int smclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; tp = dev->si_tty; @@ -150,7 +150,7 @@ smparam(struct tty *tp, struct termios *t) static int smioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; mousehw_t *hw; mousemode_t *mode; @@ -248,7 +248,7 @@ smioctl(struct dev_ioctl_args *ap) static void sm_attach_mouse(void *unused) { - dev_t dev; + cdev_t dev; dev_ops_add(&sm_ops, -1, SC_MOUSE); dev = make_dev(&sm_ops, SC_MOUSE, UID_ROOT, GID_WHEEL, 0600, diff --git a/sys/dev/misc/tw/tw.c b/sys/dev/misc/tw/tw.c index 1e8ce27781..c1e838965c 100644 --- a/sys/dev/misc/tw/tw.c +++ b/sys/dev/misc/tw/tw.c @@ -29,7 +29,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/tw.c,v 1.38 2000/01/29 16:00:32 peter Exp $ - * $DragonFly: src/sys/dev/misc/tw/tw.c,v 1.17 2006/07/28 02:17:37 dillon Exp $ + * $DragonFly: src/sys/dev/misc/tw/tw.c,v 1.18 2006/09/10 01:26:35 dillon Exp $ * */ @@ -405,7 +405,7 @@ twattach(struct isa_device *idp) int twopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tw_sc *sc = &tw_sc[TWUNIT(dev)]; crit_enter(); @@ -422,7 +422,7 @@ twopen(struct dev_open_args *ap) int twclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tw_sc *sc = &tw_sc[TWUNIT(dev)]; crit_enter(); @@ -435,7 +435,7 @@ twclose(struct dev_close_args *ap) int twread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; u_char buf[3]; struct tw_sc *sc = &tw_sc[TWUNIT(dev)]; @@ -453,7 +453,7 @@ twread(struct dev_read_args *ap) int twwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct tw_sc *sc; int house, key, reps; @@ -525,7 +525,7 @@ twwrite(struct dev_write_args *ap) int twpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tw_sc *sc; int revents = 0; diff --git a/sys/dev/misc/xrpu/xrpu.c b/sys/dev/misc/xrpu/xrpu.c index f9be187fe2..7af6b6af71 100644 --- a/sys/dev/misc/xrpu/xrpu.c +++ b/sys/dev/misc/xrpu/xrpu.c @@ -7,7 +7,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/pci/xrpu.c,v 1.19.2.1 2000/08/02 22:19:57 peter Exp $ - * $DragonFly: src/sys/dev/misc/xrpu/Attic/xrpu.c,v 1.10 2006/09/05 00:55:39 dillon Exp $ + * $DragonFly: src/sys/dev/misc/xrpu/Attic/xrpu.c,v 1.11 2006/09/10 01:26:35 dillon Exp $ * * A very simple device driver for PCI cards based on Xilinx 6200 series * FPGA/RPU devices. Current Functionality is to allow you to open and @@ -116,7 +116,7 @@ xrpu_poll_pps(struct timecounter *tc) static int xrpu_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct softc *sc = devclass_get_softc(xrpu_devclass, dev2unit(dev)); if (!sc) @@ -134,7 +134,7 @@ xrpu_close(struct dev_close_args *ap) static int xrpu_mmap(struct dev_mmap_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct softc *sc = dev->si_drv1; if (ap->a_offset >= 0x1000000) @@ -145,7 +145,7 @@ xrpu_mmap(struct dev_mmap_args *ap) static int xrpu_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct softc *sc = dev->si_drv1; int i, error; diff --git a/sys/dev/netif/cx/cx.c b/sys/dev/netif/cx/cx.c index b80bb1741d..4185bfdf15 100644 --- a/sys/dev/netif/cx/cx.c +++ b/sys/dev/netif/cx/cx.c @@ -16,7 +16,7 @@ * Version 1.9, Wed Oct 4 18:58:15 MSK 1995 * * $FreeBSD: src/sys/i386/isa/cx.c,v 1.45.2.1 2001/02/26 04:23:09 jlemon Exp $ - * $DragonFly: src/sys/dev/netif/cx/cx.c,v 1.18 2006/09/03 18:29:16 dillon Exp $ + * $DragonFly: src/sys/dev/netif/cx/cx.c,v 1.19 2006/09/10 01:26:35 dillon Exp $ * */ #undef DEBUG @@ -112,7 +112,7 @@ static int cxparam (struct tty *tp, struct termios *t); int cxopen (struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = UNIT (dev); cx_chan_t *c = cxchan[unit]; unsigned short port; @@ -250,7 +250,7 @@ cxopen (struct dev_open_args *ap) int cxclose (struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = UNIT (dev); cx_chan_t *c = cxchan[unit]; struct tty *tp; @@ -288,7 +288,7 @@ cxclose (struct dev_close_args *ap) int cxioctl (struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; int unit = UNIT (dev); cx_chan_t *c, *m; diff --git a/sys/dev/raid/aac/aac.c b/sys/dev/raid/aac/aac.c index c9aa08e524..82be80d1bc 100644 --- a/sys/dev/raid/aac/aac.c +++ b/sys/dev/raid/aac/aac.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aac/aac.c,v 1.9.2.14 2003/04/08 13:22:08 scottl Exp $ - * $DragonFly: src/sys/dev/raid/aac/aac.c,v 1.25 2006/08/03 16:40:47 swildner Exp $ + * $DragonFly: src/sys/dev/raid/aac/aac.c,v 1.26 2006/09/10 01:26:35 dillon Exp $ */ /* @@ -2341,7 +2341,7 @@ aac_describe_code(struct aac_code_lookup *table, u_int32_t code) static int aac_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct aac_softc *sc; debug_called(2); @@ -2360,7 +2360,7 @@ aac_open(struct dev_open_args *ap) static int aac_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct aac_softc *sc; debug_called(2); @@ -2376,7 +2376,7 @@ aac_close(struct dev_close_args *ap) static int aac_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t arg = ap->a_data; struct aac_softc *sc = dev->si_drv1; int error = 0; @@ -2467,7 +2467,7 @@ aac_ioctl(struct dev_ioctl_args *ap) static int aac_poll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct aac_softc *sc; int revents; diff --git a/sys/dev/raid/aac/aac_disk.c b/sys/dev/raid/aac/aac_disk.c index 1127ec61a0..a3e1fd8a1a 100644 --- a/sys/dev/raid/aac/aac_disk.c +++ b/sys/dev/raid/aac/aac_disk.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aac/aac_disk.c,v 1.3.2.8 2003/01/11 18:39:39 scottl Exp $ - * $DragonFly: src/sys/dev/raid/aac/aac_disk.c,v 1.13 2006/07/28 02:17:37 dillon Exp $ + * $DragonFly: src/sys/dev/raid/aac/aac_disk.c,v 1.14 2006/09/10 01:26:35 dillon Exp $ */ #include "opt_aac.h" @@ -117,7 +117,7 @@ SYSCTL_UINT(_hw_aac, OID_AUTO, iosize_max, CTLFLAG_RD, &aac_iosize_max, 0, static int aac_disk_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct aac_disk *sc; struct disklabel *label; @@ -158,7 +158,7 @@ aac_disk_open(struct dev_open_args *ap) static int aac_disk_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct aac_disk *sc; debug_called(0); @@ -178,7 +178,7 @@ aac_disk_close(struct dev_close_args *ap) static int aac_disk_strategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct aac_disk *sc; @@ -219,7 +219,7 @@ aac_disk_strategy(struct dev_strategy_args *ap) static int aac_disk_dump(struct dev_dump_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct aac_disk *ad; struct aac_softc *sc; vm_offset_t addr; diff --git a/sys/dev/raid/aac/aacvar.h b/sys/dev/raid/aac/aacvar.h index 7d50d1678b..0b24b837db 100644 --- a/sys/dev/raid/aac/aacvar.h +++ b/sys/dev/raid/aac/aacvar.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/aac/aacvar.h,v 1.4.2.7 2003/04/08 13:22:08 scottl Exp $ - * $DragonFly: src/sys/dev/raid/aac/aacvar.h,v 1.13 2006/06/10 20:00:16 dillon Exp $ + * $DragonFly: src/sys/dev/raid/aac/aacvar.h,v 1.14 2006/09/10 01:26:35 dillon Exp $ */ #include @@ -118,7 +118,7 @@ struct aac_container struct aac_disk { device_t ad_dev; - dev_t ad_dev_t; + cdev_t ad_dev_t; struct aac_softc *ad_controller; struct aac_container *ad_container; struct disk ad_disk; @@ -348,7 +348,7 @@ struct aac_softc struct intr_config_hook aac_ich; /* management interface */ - dev_t aac_dev_t; + cdev_t aac_dev_t; aac_lock_t aac_aifq_lock; struct aac_aif_command aac_aifq[AAC_AIFQ_LENGTH]; int aac_aifq_head; diff --git a/sys/dev/raid/amr/amr.c b/sys/dev/raid/amr/amr.c index c193c0d295..05d3ee0c93 100644 --- a/sys/dev/raid/amr/amr.c +++ b/sys/dev/raid/amr/amr.c @@ -53,7 +53,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/amr/amr.c,v 1.7.2.13 2003/01/15 13:41:18 emoore Exp $ - * $DragonFly: src/sys/dev/raid/amr/amr.c,v 1.21 2006/09/05 00:55:41 dillon Exp $ + * $DragonFly: src/sys/dev/raid/amr/amr.c,v 1.22 2006/09/10 01:26:35 dillon Exp $ */ /* @@ -351,7 +351,7 @@ amr_free(struct amr_softc *sc) } /* destroy control device */ - if( sc->amr_dev_t != (dev_t)NULL) + if( sc->amr_dev_t != (cdev_t)NULL) destroy_dev(sc->amr_dev_t); dev_ops_remove(&amr_ops, -1, device_get_unit(sc->amr_dev)); } @@ -376,7 +376,7 @@ amr_submit_bio(struct amr_softc *sc, struct bio *bio) static int amr_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); @@ -392,7 +392,7 @@ amr_open(struct dev_open_args *ap) static int amr_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct amr_softc *sc = devclass_get_softc(devclass_find("amr"), unit); @@ -408,7 +408,7 @@ amr_close(struct dev_close_args *ap) static int amr_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct amr_softc *sc = (struct amr_softc *)dev->si_drv1; int *arg = (int *)ap->a_data; struct amr_user_ioctl *au = (struct amr_user_ioctl *)ap->a_data; diff --git a/sys/dev/raid/amr/amr_disk.c b/sys/dev/raid/amr/amr_disk.c index 24f135ca7a..4663e80d25 100644 --- a/sys/dev/raid/amr/amr_disk.c +++ b/sys/dev/raid/amr/amr_disk.c @@ -54,7 +54,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/amr/amr_disk.c,v 1.5.2.5 2002/12/20 15:12:04 emoore Exp $ - * $DragonFly: src/sys/dev/raid/amr/amr_disk.c,v 1.11 2006/07/28 02:17:37 dillon Exp $ + * $DragonFly: src/sys/dev/raid/amr/amr_disk.c,v 1.12 2006/09/10 01:26:35 dillon Exp $ */ /* @@ -127,7 +127,7 @@ DRIVER_MODULE(amrd, amr, amrd_driver, amrd_devclass, 0, 0); static int amrd_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct amrd_softc *sc = (struct amrd_softc *)dev->si_drv1; #if defined(__DragonFly__) || __FreeBSD_version < 500000 /* old buf style */ struct disklabel *label; @@ -166,7 +166,7 @@ amrd_open(struct dev_open_args *ap) static int amrd_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct amrd_softc *sc = (struct amrd_softc *)dev->si_drv1; debug_called(1); @@ -190,7 +190,7 @@ amrd_ioctl(struct dev_ioctl_args *ap) int amrd_dump(struct dev_dump_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct amrd_softc *amrd_sc = (struct amrd_softc *)dev->si_drv1; struct amr_softc *amr_sc; vm_paddr_t addr = 0; @@ -247,7 +247,7 @@ amrd_dump(struct dev_dump_args *ap) static int amrd_strategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct amrd_softc *sc = (struct amrd_softc *)dev->si_drv1; diff --git a/sys/dev/raid/amr/amrvar.h b/sys/dev/raid/amr/amrvar.h index f4db4465ef..797629eb3d 100644 --- a/sys/dev/raid/amr/amrvar.h +++ b/sys/dev/raid/amr/amrvar.h @@ -53,7 +53,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/amr/amrvar.h,v 1.2.2.5 2002/12/20 15:12:04 emoore Exp $ - * $DragonFly: src/sys/dev/raid/amr/amrvar.h,v 1.7 2006/02/17 19:18:05 dillon Exp $ + * $DragonFly: src/sys/dev/raid/amr/amrvar.h,v 1.8 2006/09/10 01:26:35 dillon Exp $ */ #include @@ -203,7 +203,7 @@ struct amr_softc TAILQ_HEAD(, ccb_hdr) amr_cam_ccbq; /* control device */ - dev_t amr_dev_t; + cdev_t amr_dev_t; /* controller type-specific support */ int amr_type; @@ -252,7 +252,7 @@ extern int amr_cam_command(struct amr_softc *sc, struct amr_command **acp); struct amrd_softc { device_t amrd_dev; - dev_t amrd_dev_t; + cdev_t amrd_dev_t; struct amr_softc *amrd_controller; struct amr_logdrive *amrd_drive; struct disk amrd_disk; diff --git a/sys/dev/raid/asr/asr.c b/sys/dev/raid/asr/asr.c index 3e83462305..7f4d4360e0 100644 --- a/sys/dev/raid/asr/asr.c +++ b/sys/dev/raid/asr/asr.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/asr/asr.c,v 1.3.2.2 2001/08/23 05:21:29 scottl Exp $ */ -/* $DragonFly: src/sys/dev/raid/asr/asr.c,v 1.24 2006/09/05 00:55:41 dillon Exp $ */ +/* $DragonFly: src/sys/dev/raid/asr/asr.c,v 1.25 2006/09/10 01:26:35 dillon Exp $ */ /* * Copyright (c) 1996-2000 Distributed Processing Technology Corporation * Copyright (c) 2000-2001 Adaptec Corporation @@ -397,7 +397,7 @@ STATIC ATTACH_RET domino_attach (ATTACH_ARGS); STATIC PROBE_RET mode0_probe (PROBE_ARGS); STATIC ATTACH_RET mode0_attach (ATTACH_ARGS); -STATIC Asr_softc_t * ASR_get_sc (dev_t dev); +STATIC Asr_softc_t * ASR_get_sc (cdev_t dev); STATIC d_ioctl_t asr_ioctl; STATIC d_open_t asr_open; STATIC d_close_t asr_close; @@ -3254,7 +3254,7 @@ typedef U32 DPT_RTN_T; STATIC INLINE Asr_softc_t * ASR_get_sc ( - IN dev_t dev) + IN cdev_t dev) { int unit = asr_unit(dev); OUT Asr_softc_t * sc = Asr_softc; @@ -3273,7 +3273,7 @@ STATIC u_int8_t ASR_ctlr_held; STATIC int asr_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; OUT int error; if (ASR_get_sc (dev) == (Asr_softc_t *)NULL) { @@ -3780,7 +3780,7 @@ ASR_queue_i( STATIC int asr_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; int i, j; OUT int error = 0; diff --git a/sys/dev/raid/ciss/ciss.c b/sys/dev/raid/ciss/ciss.c index ef7ac6d4b1..75ea5280bf 100644 --- a/sys/dev/raid/ciss/ciss.c +++ b/sys/dev/raid/ciss/ciss.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ciss/ciss.c,v 1.2.2.6 2003/02/18 22:27:41 ps Exp $ - * $DragonFly: src/sys/dev/raid/ciss/ciss.c,v 1.18 2006/09/05 00:55:41 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ciss/ciss.c,v 1.19 2006/09/10 01:26:35 dillon Exp $ */ /* @@ -3368,7 +3368,7 @@ ciss_name_command_status(int status) static int ciss_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ciss_softc *sc; debug_called(1); @@ -3387,7 +3387,7 @@ ciss_open(struct dev_open_args *ap) static int ciss_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ciss_softc *sc; debug_called(1); @@ -3407,7 +3407,7 @@ ciss_close(struct dev_close_args *ap) static int ciss_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ciss_softc *sc; int error; diff --git a/sys/dev/raid/ciss/cissvar.h b/sys/dev/raid/ciss/cissvar.h index 9a83a860fb..b588e60712 100644 --- a/sys/dev/raid/ciss/cissvar.h +++ b/sys/dev/raid/ciss/cissvar.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ciss/cissvar.h,v 1.3.2.2 2003/02/06 21:42:59 ps Exp $ - * $DragonFly: src/sys/dev/raid/ciss/cissvar.h,v 1.5 2005/06/09 20:55:05 swildner Exp $ + * $DragonFly: src/sys/dev/raid/ciss/cissvar.h,v 1.6 2006/09/10 01:26:35 dillon Exp $ */ #include @@ -173,7 +173,7 @@ struct ciss_softc { /* bus connections */ device_t ciss_dev; /* bus attachment */ - dev_t ciss_dev_t; /* control device */ + cdev_t ciss_dev_t; /* control device */ struct resource *ciss_regs_resource; /* register interface window */ int ciss_regs_rid; /* resource ID */ diff --git a/sys/dev/raid/dpt/dpt_control.c b/sys/dev/raid/dpt/dpt_control.c index d38904dd19..81d0235480 100644 --- a/sys/dev/raid/dpt/dpt_control.c +++ b/sys/dev/raid/dpt/dpt_control.c @@ -37,7 +37,7 @@ */ #ident "$FreeBSD: src/sys/dev/dpt/dpt_control.c,v 1.16 1999/09/25 18:23:48 phk Exp $" -#ident "$DragonFly: src/sys/dev/raid/dpt/dpt_control.c,v 1.9 2006/09/05 00:55:41 dillon Exp $" +#ident "$DragonFly: src/sys/dev/raid/dpt/dpt_control.c,v 1.10 2006/09/10 01:26:35 dillon Exp $" #include "opt_dpt.h" @@ -73,11 +73,11 @@ static void dpt_unphysmap(u_int8_t * vaddr, vm_size_t size); static void dpt_get_sysinfo(void); -static int dpt_open(dev_t dev, int flags, int fmt, struct proc * p); -static int dpt_close(dev_t dev, int flags, int fmt, struct proc * p); -static int dpt_write(dev_t dev, struct uio * uio, int ioflag); -static int dpt_read(dev_t dev, struct uio * uio, int ioflag); -static int dpt_ioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct proc * p); +static int dpt_open(cdev_t dev, int flags, int fmt, struct proc * p); +static int dpt_close(cdev_t dev, int flags, int fmt, struct proc * p); +static int dpt_write(cdev_t dev, struct uio * uio, int ioflag); +static int dpt_read(cdev_t dev, struct uio * uio, int ioflag); +static int dpt_ioctl(cdev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct proc * p); /* This has to be modified as the processor and CPU are not known yet */ @@ -408,7 +408,7 @@ dpt_get_sysinfo(void) } static int -dpt_open(dev_t dev, int flags, int fmt, struct proc * p) +dpt_open(cdev_t dev, int flags, int fmt, struct proc * p) { int minor_no; dpt_softc_t *dpt; @@ -446,7 +446,7 @@ dpt_open(dev_t dev, int flags, int fmt, struct proc * p) } static int -dpt_close(dev_t dev, int flags, int fmt, struct proc * p) +dpt_close(cdev_t dev, int flags, int fmt, struct proc * p) { int minor_no; dpt_softc_t *dpt; @@ -464,7 +464,7 @@ dpt_close(dev_t dev, int flags, int fmt, struct proc * p) } static int -dpt_write(dev_t dev, struct uio * uio, int ioflag) +dpt_write(cdev_t dev, struct uio * uio, int ioflag) { int minor_no; int unit; @@ -521,7 +521,7 @@ dpt_write(dev_t dev, struct uio * uio, int ioflag) } static int -dpt_read(dev_t dev, struct uio * uio, int ioflag) +dpt_read(cdev_t dev, struct uio * uio, int ioflag) { dpt_softc_t *dpt; int error; @@ -664,7 +664,7 @@ dpt_read(dev_t dev, struct uio * uio, int ioflag) */ static int -dpt_ioctl(dev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct proc * p) +dpt_ioctl(cdev_t dev, u_long cmd, caddr_t cmdarg, int flags, struct proc * p) { int minor_no; dpt_softc_t *dpt; diff --git a/sys/dev/raid/ida/ida_disk.c b/sys/dev/raid/ida/ida_disk.c index 3ec9db09e1..0753bec27a 100644 --- a/sys/dev/raid/ida/ida_disk.c +++ b/sys/dev/raid/ida/ida_disk.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ida/ida_disk.c,v 1.12.2.6 2001/11/27 20:21:02 ps Exp $ - * $DragonFly: src/sys/dev/raid/ida/ida_disk.c,v 1.12 2006/07/28 02:17:37 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ida/ida_disk.c,v 1.13 2006/09/10 01:26:35 dillon Exp $ */ /* @@ -100,7 +100,7 @@ static driver_t idad_driver = { DRIVER_MODULE(idad, ida, idad_driver, idad_devclass, 0, 0); static __inline struct idad_softc * -idad_getsoftc(dev_t dev) +idad_getsoftc(cdev_t dev) { return ((struct idad_softc *)dev->si_drv1); @@ -109,7 +109,7 @@ idad_getsoftc(dev_t dev) static int idad_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct idad_softc *drv; struct disklabel *label; @@ -133,7 +133,7 @@ idad_open(struct dev_open_args *ap) static int idad_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct idad_softc *drv; drv = idad_getsoftc(dev); @@ -151,7 +151,7 @@ idad_close(struct dev_close_args *ap) static int idad_strategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct idad_softc *drv; @@ -198,7 +198,7 @@ done: static int idad_dump(struct dev_dump_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct idad_softc *drv; long blkcnt; int i, error, dumppages; @@ -269,7 +269,7 @@ idad_attach(device_t dev) struct ida_drive_info dinfo; struct idad_softc *drv; device_t parent; - dev_t dsk; + cdev_t dsk; int error; drv = (struct idad_softc *)device_get_softc(dev); diff --git a/sys/dev/raid/iir/iir.h b/sys/dev/raid/iir/iir.h index 384bd58c13..618c0620b5 100644 --- a/sys/dev/raid/iir/iir.h +++ b/sys/dev/raid/iir/iir.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/iir/iir.h,v 1.3.2.2 2002/05/04 08:49:50 msmith Exp $ */ -/* $DragonFly: src/sys/dev/raid/iir/iir.h,v 1.5 2005/12/11 01:54:09 swildner Exp $ */ +/* $DragonFly: src/sys/dev/raid/iir/iir.h,v 1.6 2006/09/10 01:26:35 dillon Exp $ */ /* * Copyright (c) 2000-01 Intel Corporation * All Rights Reserved @@ -557,7 +557,7 @@ struct gdt_softc { #define GDT_SHUTDOWN 0x02 #define GDT_POLL_WAIT 0x80 struct callout watchdog_timer; - dev_t sc_dev; + cdev_t sc_dev; bus_space_tag_t sc_dpmemt; bus_space_handle_t sc_dpmemh; bus_addr_t sc_dpmembase; @@ -688,8 +688,8 @@ gdt_dec32(u_int8_t *addr) extern TAILQ_HEAD(gdt_softc_list, gdt_softc) gdt_softcs; extern u_int8_t gdt_polling; -dev_t gdt_make_dev(int unit); -void gdt_destroy_dev(dev_t dev); +cdev_t gdt_make_dev(int unit); +void gdt_destroy_dev(cdev_t dev); void gdt_next(struct gdt_softc *gdt); void gdt_free_ccb(struct gdt_softc *gdt, struct gdt_ccb *gccb); diff --git a/sys/dev/raid/iir/iir_ctrl.c b/sys/dev/raid/iir/iir_ctrl.c index 93d0a69fe6..3928532dd9 100644 --- a/sys/dev/raid/iir/iir_ctrl.c +++ b/sys/dev/raid/iir/iir_ctrl.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/iir/iir_ctrl.c,v 1.2.2.4 2002/05/05 08:18:12 asmodai Exp $ */ -/* $DragonFly: src/sys/dev/raid/iir/iir_ctrl.c,v 1.10 2006/07/28 02:17:37 dillon Exp $ */ +/* $DragonFly: src/sys/dev/raid/iir/iir_ctrl.c,v 1.11 2006/09/10 01:26:35 dillon Exp $ */ /* * Copyright (c) 2000-01 Intel Corporation * All Rights Reserved @@ -90,12 +90,12 @@ extern gdt_statist_t gdt_stat; /* * Given a controller number, - * make a special device and return the dev_t + * make a special device and return the cdev_t */ -dev_t +cdev_t gdt_make_dev(int unit) { - dev_t dev; + cdev_t dev; #ifdef SDEV_PER_HBA dev = make_dev(&iir_ops, hba2minor(unit), UID_ROOT, GID_OPERATOR, @@ -112,7 +112,7 @@ gdt_make_dev(int unit) } void -gdt_destroy_dev(dev_t dev) +gdt_destroy_dev(cdev_t dev) { if (dev != NULL) destroy_dev(dev); diff --git a/sys/dev/raid/ips/ips.c b/sys/dev/raid/ips/ips.c index 3a04dc06ed..f2269d2bb6 100644 --- a/sys/dev/raid/ips/ips.c +++ b/sys/dev/raid/ips/ips.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ips/ips.c,v 1.12 2004/05/30 04:01:29 scottl Exp $ - * $DragonFly: src/sys/dev/raid/ips/ips.c,v 1.16 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ips/ips.c,v 1.17 2006/09/10 01:26:35 dillon Exp $ */ #include @@ -70,7 +70,7 @@ static const char *ips_adapter_name[] = { static int ips_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; ips_softc_t *sc = dev->si_drv1; sc->state |= IPS_DEV_OPEN; @@ -80,7 +80,7 @@ ips_open(struct dev_open_args *ap) static int ips_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; ips_softc_t *sc = dev->si_drv1; sc->state &= ~IPS_DEV_OPEN; @@ -372,7 +372,7 @@ int ips_adapter_init(ips_softc_t *sc) { int i; - dev_t dev; + cdev_t dev; DEVICE_PRINTF(1, sc->dev, "initializing\n"); if (bus_dma_tag_create( /* parent */ sc->adapter_dmatag, diff --git a/sys/dev/raid/ips/ips_disk.c b/sys/dev/raid/ips/ips_disk.c index ab64b47c47..09ef3cd5dc 100644 --- a/sys/dev/raid/ips/ips_disk.c +++ b/sys/dev/raid/ips/ips_disk.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ips/ips_disk.c,v 1.4 2003/09/22 04:59:07 njl Exp $ - * $DragonFly: src/sys/dev/raid/ips/ips_disk.c,v 1.9 2006/07/28 02:17:37 dillon Exp $ + * $DragonFly: src/sys/dev/raid/ips/ips_disk.c,v 1.10 2006/09/10 01:26:35 dillon Exp $ */ #include @@ -87,7 +87,7 @@ DRIVER_MODULE(ipsd, ips, ipsd_driver, ipsd_devclass, 0, 0); static int ipsd_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; ipsdisk_softc_t *dsc = dev->si_drv1; if (dsc == NULL) @@ -100,7 +100,7 @@ ipsd_open(struct dev_open_args *ap) static int ipsd_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; ipsdisk_softc_t *dsc = dev->si_drv1; dsc->state &= ~IPS_DEV_OPEN; @@ -130,7 +130,7 @@ ipsd_finish(struct bio *bio) static int ipsd_strategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; ipsdisk_softc_t *dsc; @@ -257,7 +257,7 @@ static int ipsd_dump(void *arg, void *virtual, vm_offset_t physical, off_t offset, size_t length) { - dev_t dev = arg; + cdev_t dev = arg; ips_softc_t *sc; ips_command_t *command; ips_io_cmd *command_struct; diff --git a/sys/dev/raid/ips/ips_disk.h b/sys/dev/raid/ips/ips_disk.h index ff40a6a38a..8b7c271e5a 100644 --- a/sys/dev/raid/ips/ips_disk.h +++ b/sys/dev/raid/ips/ips_disk.h @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/ips/ips_disk.h,v 1.2 2003/08/22 06:00:27 imp Exp $ - * $DragonFly: src/sys/dev/raid/ips/ips_disk.h,v 1.2 2004/10/06 02:12:31 y0netan1 Exp $ + * $DragonFly: src/sys/dev/raid/ips/ips_disk.h,v 1.3 2006/09/10 01:26:35 dillon Exp $ */ @@ -62,7 +62,7 @@ typedef struct ipsdisk_softc { int disk_number; u_int32_t state; struct disk ipsd_disk; - dev_t ipsd_dev_t; + cdev_t ipsd_dev_t; ips_softc_t *sc; struct devstat stats; } ipsdisk_softc_t; diff --git a/sys/dev/raid/mlx/mlx.c b/sys/dev/raid/mlx/mlx.c index 5fbd15c41a..9b688d28d3 100644 --- a/sys/dev/raid/mlx/mlx.c +++ b/sys/dev/raid/mlx/mlx.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mlx/mlx.c,v 1.14.2.5 2001/09/11 09:49:53 kris Exp $ - * $DragonFly: src/sys/dev/raid/mlx/mlx.c,v 1.20 2006/09/05 00:55:42 dillon Exp $ + * $DragonFly: src/sys/dev/raid/mlx/mlx.c,v 1.21 2006/09/10 01:26:36 dillon Exp $ */ /* @@ -709,7 +709,7 @@ mlx_submit_bio(struct mlx_softc *sc, struct bio *bio) int mlx_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct mlx_softc *sc = devclass_get_softc(mlx_devclass, unit); @@ -723,7 +723,7 @@ mlx_open(struct dev_open_args *ap) int mlx_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct mlx_softc *sc = devclass_get_softc(mlx_devclass, unit); @@ -737,7 +737,7 @@ mlx_close(struct dev_close_args *ap) int mlx_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct mlx_softc *sc = devclass_get_softc(mlx_devclass, unit); struct mlx_rebuild_request *rb = (struct mlx_rebuild_request *)ap->a_data; diff --git a/sys/dev/raid/mlx/mlx_disk.c b/sys/dev/raid/mlx/mlx_disk.c index bf210063d2..deb423df4b 100644 --- a/sys/dev/raid/mlx/mlx_disk.c +++ b/sys/dev/raid/mlx/mlx_disk.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mlx/mlx_disk.c,v 1.8.2.4 2001/06/25 04:37:51 msmith Exp $ - * $DragonFly: src/sys/dev/raid/mlx/mlx_disk.c,v 1.9 2006/07/28 02:17:37 dillon Exp $ + * $DragonFly: src/sys/dev/raid/mlx/mlx_disk.c,v 1.10 2006/09/10 01:26:36 dillon Exp $ */ /* @@ -91,7 +91,7 @@ DRIVER_MODULE(mlxd, mlx, mlxd_driver, mlxd_devclass, 0, 0); static int mlxd_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct mlxd_softc *sc = (struct mlxd_softc *)dev->si_drv1; struct disklabel *label; @@ -121,7 +121,7 @@ mlxd_open(struct dev_open_args *ap) static int mlxd_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct mlxd_softc *sc = (struct mlxd_softc *)dev->si_drv1; debug_called(1); @@ -135,7 +135,7 @@ mlxd_close(struct dev_close_args *ap) static int mlxd_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct mlxd_softc *sc = (struct mlxd_softc *)dev->si_drv1; int error; @@ -225,7 +225,7 @@ mlxd_attach(device_t dev) struct mlxd_softc *sc = (struct mlxd_softc *)device_get_softc(dev); device_t parent; char *state; - dev_t dsk; + cdev_t dsk; int s1, s2; debug_called(1); diff --git a/sys/dev/raid/mlx/mlxvar.h b/sys/dev/raid/mlx/mlxvar.h index 73eaf0dfcb..0261626827 100644 --- a/sys/dev/raid/mlx/mlxvar.h +++ b/sys/dev/raid/mlx/mlxvar.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mlx/mlxvar.h,v 1.5.2.3 2001/06/25 04:37:51 msmith Exp $ - * $DragonFly: src/sys/dev/raid/mlx/mlxvar.h,v 1.8 2006/07/28 02:17:37 dillon Exp $ + * $DragonFly: src/sys/dev/raid/mlx/mlxvar.h,v 1.9 2006/09/10 01:26:36 dillon Exp $ */ /* @@ -225,7 +225,7 @@ extern devclass_t mlxd_devclass; struct mlxd_softc { device_t mlxd_dev; - dev_t mlxd_dev_t; + cdev_t mlxd_dev_t; struct mlx_softc *mlxd_controller; struct mlx_sysdrive *mlxd_drive; struct disk mlxd_disk; diff --git a/sys/dev/raid/mly/mly.c b/sys/dev/raid/mly/mly.c index c27e5e3cc8..fa7c4d3d2e 100644 --- a/sys/dev/raid/mly/mly.c +++ b/sys/dev/raid/mly/mly.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mly/mly.c,v 1.3.2.3 2001/03/05 20:17:24 msmith Exp $ - * $DragonFly: src/sys/dev/raid/mly/mly.c,v 1.14 2006/09/05 00:55:42 dillon Exp $ + * $DragonFly: src/sys/dev/raid/mly/mly.c,v 1.15 2006/09/10 01:26:36 dillon Exp $ */ #include @@ -1697,7 +1697,7 @@ mly_print_controller(int controller) static int mly_user_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct mly_softc *sc = devclass_get_softc(devclass_find("mly"), unit); @@ -1711,7 +1711,7 @@ mly_user_open(struct dev_open_args *ap) static int mly_user_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct mly_softc *sc = devclass_get_softc(devclass_find("mly"), unit); @@ -1725,7 +1725,7 @@ mly_user_close(struct dev_close_args *ap) static int mly_user_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct mly_softc *sc = (struct mly_softc *)dev->si_drv1; struct mly_user_command *uc = (struct mly_user_command *)ap->a_data; struct mly_user_health *uh = (struct mly_user_health *)ap->a_data; diff --git a/sys/dev/raid/mly/mlyvar.h b/sys/dev/raid/mly/mlyvar.h index 35a300c9e7..b6de5670f2 100644 --- a/sys/dev/raid/mly/mlyvar.h +++ b/sys/dev/raid/mly/mlyvar.h @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/mly/mlyvar.h,v 1.1.2.2 2001/03/05 20:17:24 msmith Exp $ - * $DragonFly: src/sys/dev/raid/mly/mlyvar.h,v 1.6 2005/06/10 17:10:26 swildner Exp $ + * $DragonFly: src/sys/dev/raid/mly/mlyvar.h,v 1.7 2006/09/10 01:26:36 dillon Exp $ */ #include @@ -158,7 +158,7 @@ struct mly_command { struct mly_softc { /* bus connections */ device_t mly_dev; - dev_t mly_dev_t; + cdev_t mly_dev_t; struct resource *mly_regs_resource; /* register interface window */ int mly_regs_rid; /* resource ID */ bus_space_handle_t mly_bhandle; /* bus space handle */ diff --git a/sys/dev/raid/pst/pst-raid.c b/sys/dev/raid/pst/pst-raid.c index fddff5dd3d..2fbd4d9908 100644 --- a/sys/dev/raid/pst/pst-raid.c +++ b/sys/dev/raid/pst/pst-raid.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/pst/pst-raid.c,v 1.2.2.1 2002/08/18 12:32:36 sos Exp $ - * $DragonFly: src/sys/dev/raid/pst/pst-raid.c,v 1.18 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/dev/raid/pst/pst-raid.c,v 1.19 2006/09/10 01:26:36 dillon Exp $ */ #include @@ -69,7 +69,7 @@ struct pst_softc { struct iop_softc *iop; struct i2o_lct_entry *lct; struct i2o_bsa_device *info; - dev_t device; + cdev_t device; struct devstat stats; struct disk disk; struct bio_queue_head bio_queue; diff --git a/sys/dev/raid/twa/twa_freebsd.c b/sys/dev/raid/twa/twa_freebsd.c index 21db859baf..af5923030c 100644 --- a/sys/dev/raid/twa/twa_freebsd.c +++ b/sys/dev/raid/twa/twa_freebsd.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD$ - * $DragonFly: src/sys/dev/raid/twa/twa_freebsd.c,v 1.12 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/dev/raid/twa/twa_freebsd.c,v 1.13 2006/09/10 01:26:36 dillon Exp $ */ /* @@ -76,7 +76,7 @@ static devclass_t twa_devclass; static int twa_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct twa_softc *sc = devclass_get_softc(twa_devclass, unit); @@ -102,7 +102,7 @@ twa_open(struct dev_open_args *ap) static int twa_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct twa_softc *sc = devclass_get_softc(twa_devclass, unit); @@ -131,7 +131,7 @@ twa_close(struct dev_close_args *ap) static int twa_ioctl_wrapper(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct twa_softc *sc = (struct twa_softc *)(dev->si_drv1); return(twa_ioctl(sc, ap->a_cmd, ap->a_data)); @@ -223,7 +223,7 @@ twa_attach(device_t dev) u_int32_t command; int res_id; int error; - dev_t xdev; + cdev_t xdev; twa_dbg_dprint_enter(3, sc); diff --git a/sys/dev/raid/twe/twe_compat.h b/sys/dev/raid/twe/twe_compat.h index 76ce391c64..2bb5b3af1f 100644 --- a/sys/dev/raid/twe/twe_compat.h +++ b/sys/dev/raid/twe/twe_compat.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/twe/twe_compat.h,v 1.1.2.5 2004/04/07 22:18:00 vkashyap Exp $ - * $DragonFly: src/sys/dev/raid/twe/twe_compat.h,v 1.14 2006/04/30 17:22:17 dillon Exp $ + * $DragonFly: src/sys/dev/raid/twe/twe_compat.h,v 1.15 2006/09/10 01:26:36 dillon Exp $ */ /* * Portability and compatibility interfaces. @@ -125,7 +125,7 @@ */ #define TWE_PLATFORM_SOFTC \ device_t twe_dev; /* bus device */ \ - dev_t twe_dev_t; /* control device */ \ + cdev_t twe_dev_t; /* control device */ \ struct resource *twe_io; /* register interface window */ \ bus_space_handle_t twe_bhandle; /* bus space handle */ \ bus_space_tag_t twe_btag; /* bus space tag */ \ diff --git a/sys/dev/raid/twe/twe_freebsd.c b/sys/dev/raid/twe/twe_freebsd.c index db023ce3ef..4962fd27ef 100644 --- a/sys/dev/raid/twe/twe_freebsd.c +++ b/sys/dev/raid/twe/twe_freebsd.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/twe/twe_freebsd.c,v 1.2.2.9 2004/06/11 18:57:31 vkashyap Exp $ - * $DragonFly: src/sys/dev/raid/twe/twe_freebsd.c,v 1.22 2006/09/05 00:55:42 dillon Exp $ + * $DragonFly: src/sys/dev/raid/twe/twe_freebsd.c,v 1.23 2006/09/10 01:26:36 dillon Exp $ */ /* @@ -75,7 +75,7 @@ static struct dev_ops twe_ops = { static int twe_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct twe_softc *sc = devclass_get_softc(twe_devclass, unit); @@ -89,7 +89,7 @@ twe_open(struct dev_open_args *ap) static int twe_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct twe_softc *sc = devclass_get_softc(twe_devclass, unit); @@ -103,7 +103,7 @@ twe_close(struct dev_close_args *ap) static int twe_ioctl_wrapper(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct twe_softc *sc = (struct twe_softc *)dev->si_drv1; return(twe_ioctl(sc, ap->a_cmd, ap->a_data)); @@ -358,7 +358,7 @@ twe_free(struct twe_softc *sc) dev_ops_remove(&twe_ops, -1, device_get_unit(sc->twe_dev)); /* destroy control device */ - if (sc->twe_dev_t != (dev_t)NULL) + if (sc->twe_dev_t != (cdev_t)NULL) destroy_dev(sc->twe_dev_t); sysctl_ctx_free(&sc->sysctl_ctx); @@ -626,7 +626,7 @@ static int disks_registered = 0; static int twed_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct twed_softc *sc = (struct twed_softc *)dev->si_drv1; struct disklabel *label; @@ -660,7 +660,7 @@ twed_open(struct dev_open_args *ap) static int twed_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct twed_softc *sc = (struct twed_softc *)dev->si_drv1; debug_called(4); @@ -678,7 +678,7 @@ twed_close(struct dev_close_args *ap) static int twed_strategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct twed_softc *sc = dev->si_drv1; struct buf *bp = bio->bio_buf; @@ -716,7 +716,7 @@ twed_strategy(struct dev_strategy_args *ap) static int twed_dump(struct dev_dump_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct twed_softc *twed_sc = (struct twed_softc *)dev->si_drv1; struct twe_softc *twe_sc = (struct twe_softc *)twed_sc->twed_controller; vm_paddr_t addr = 0; @@ -794,7 +794,7 @@ twed_attach(device_t dev) { struct twed_softc *sc; device_t parent; - dev_t dsk; + cdev_t dsk; debug_called(4); diff --git a/sys/dev/raid/twe/twevar.h b/sys/dev/raid/twe/twevar.h index 409e96a27c..d6385617dd 100644 --- a/sys/dev/raid/twe/twevar.h +++ b/sys/dev/raid/twe/twevar.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/twe/twevar.h,v 1.1.2.8 2004/06/11 18:57:32 vkashyap Exp $ - * $DragonFly: src/sys/dev/raid/twe/twevar.h,v 1.6 2006/02/17 19:18:06 dillon Exp $ + * $DragonFly: src/sys/dev/raid/twe/twevar.h,v 1.7 2006/09/10 01:26:36 dillon Exp $ */ #define TWE_DRIVER_VERSION_STRING "1.40.01.002" @@ -78,7 +78,7 @@ struct twe_drive struct twed_softc { device_t twed_dev; - dev_t twed_dev_t; + cdev_t twed_dev_t; struct twe_softc *twed_controller; /* parent device softc */ struct twe_drive *twed_drive; /* drive data in parent softc */ struct disk twed_disk; /* generic disk handle */ diff --git a/sys/dev/raid/vinum/vinum.c b/sys/dev/raid/vinum/vinum.c index 3289f81c6c..a45dd57a04 100644 --- a/sys/dev/raid/vinum/vinum.c +++ b/sys/dev/raid/vinum/vinum.c @@ -37,7 +37,7 @@ * * $Id: vinum.c,v 1.33 2001/01/09 06:19:15 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinum.c,v 1.38.2.3 2003/01/07 12:14:16 joerg Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinum.c,v 1.17 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinum.c,v 1.18 2006/09/10 01:26:36 dillon Exp $ */ #define STATIC static /* nothing while we're testing XXX */ @@ -302,7 +302,7 @@ DECLARE_MODULE(vinum, vinum_mod, SI_SUB_RAID, SI_ORDER_MIDDLE); int vinumopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error; unsigned int index; struct volume *vol; @@ -409,7 +409,7 @@ vinumopen(struct dev_open_args *ap) int vinumclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; unsigned int index; struct volume *vol; int devminor; @@ -488,7 +488,7 @@ vinumclose(struct dev_close_args *ap) int vinumsize(struct dev_psize_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct volume *vol; vol = &VOL[Volno(dev)]; diff --git a/sys/dev/raid/vinum/vinumdaemon.c b/sys/dev/raid/vinum/vinumdaemon.c index 0015e1c7cf..cd9639175c 100644 --- a/sys/dev/raid/vinum/vinumdaemon.c +++ b/sys/dev/raid/vinum/vinumdaemon.c @@ -36,7 +36,7 @@ * * $Id: vinumdaemon.c,v 1.8 2000/01/03 05:22:03 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumdaemon.c,v 1.16 2000/01/05 06:03:56 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumdaemon.c,v 1.10 2006/04/30 17:22:17 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumdaemon.c,v 1.11 2006/09/10 01:26:36 dillon Exp $ */ #include "vinumhdr.h" @@ -107,8 +107,8 @@ vinum_daemon(void) "vinum: recovering I/O request: %p\n%s dev %d.%d, offset 0x%012llx, length %d\n", rq, (rq->bio->bio_buf->b_cmd == BUF_CMD_READ) ? "Read" : "Write", - major((dev_t)rq->bio->bio_driver_info), - minor((dev_t)rq->bio->bio_driver_info), + major((cdev_t)rq->bio->bio_driver_info), + minor((cdev_t)rq->bio->bio_driver_info), rq->bio->bio_offset, rq->bio->bio_buf->b_bcount); } @@ -206,7 +206,7 @@ recover_io(struct request *rq) * Negotiate with phk to get it fixed. * Reissue the command. */ - dev_dstrategy((dev_t)rq->bio->bio_driver_info, rq->bio); + dev_dstrategy((cdev_t)rq->bio->bio_driver_info, rq->bio); } /* Functions called to interface with the daemon */ diff --git a/sys/dev/raid/vinum/vinumext.h b/sys/dev/raid/vinum/vinumext.h index 531c78c218..17c6c9bd84 100644 --- a/sys/dev/raid/vinum/vinumext.h +++ b/sys/dev/raid/vinum/vinumext.h @@ -35,7 +35,7 @@ * * $Id: vinumext.h,v 1.26 2000/05/16 07:38:08 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumext.h,v 1.25.2.3 2001/05/11 02:11:06 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumext.h,v 1.9 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumext.h,v 1.10 2006/09/10 01:26:36 dillon Exp $ */ /* vinumext.h: external definitions */ @@ -140,12 +140,12 @@ d_dump_t vinumdump; d_psize_t vinumsize; d_poll_t vinumpoll; -int vinumstart(dev_t dev, struct bio *bio, int reviveok); +int vinumstart(cdev_t dev, struct bio *bio, int reviveok); int launch_requests(struct request *rq, int reviveok); void sdio(struct bio *bio); /* XXX Do we need this? */ -int vinumpart(dev_t); +int vinumpart(cdev_t); extern jmp_buf command_fail; /* return here if config fails */ extern struct dev_ops vinum_ops; @@ -169,9 +169,9 @@ struct rqgroup *allocrqg(struct request *rq, int elements); void deallocrqg(struct rqgroup *rqg); /* Device number decoding */ -int Volno(dev_t x); -int Plexno(dev_t x); -int Sdno(dev_t x); +int Volno(cdev_t x); +int Plexno(cdev_t x); +int Sdno(cdev_t x); /* State transitions */ int set_drive_state(int driveno, enum drivestate state, enum setstateflags flags); diff --git a/sys/dev/raid/vinum/vinuminterrupt.c b/sys/dev/raid/vinum/vinuminterrupt.c index 19fa3e27bc..4c409e5406 100644 --- a/sys/dev/raid/vinum/vinuminterrupt.c +++ b/sys/dev/raid/vinum/vinuminterrupt.c @@ -41,7 +41,7 @@ * * $Id: vinuminterrupt.c,v 1.12 2000/11/24 03:41:42 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinuminterrupt.c,v 1.25.2.3 2001/05/28 05:56:27 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinuminterrupt.c,v 1.10 2006/05/03 20:44:49 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinuminterrupt.c,v 1.11 2006/09/10 01:26:36 dillon Exp $ */ #include "vinumhdr.h" @@ -305,7 +305,7 @@ complete_raid5_write(struct rqelement *rqe) struct rqgroup *rqg; /* and to the request group */ struct rqelement *prqe; /* point to the parity block */ struct drive *drive; /* drive to access */ - dev_t dev; + cdev_t dev; rqg = rqe->rqg; /* and to our request group */ rq = rqg->rq; /* point to our request */ diff --git a/sys/dev/raid/vinum/vinumio.c b/sys/dev/raid/vinum/vinumio.c index b9221f4d77..f2fb77e245 100644 --- a/sys/dev/raid/vinum/vinumio.c +++ b/sys/dev/raid/vinum/vinumio.c @@ -35,7 +35,7 @@ * * $Id: vinumio.c,v 1.30 2000/05/10 23:23:30 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumio.c,v 1.52.2.6 2002/05/02 08:43:44 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumio.c,v 1.15 2006/07/28 02:17:38 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumio.c,v 1.16 2006/09/10 01:26:36 dillon Exp $ */ #include "vinumhdr.h" @@ -769,7 +769,7 @@ write_volume_label(int volno) struct disklabel *dlp; struct volume *vol; int error; - dev_t dev; + cdev_t dev; lp = (struct disklabel *) Malloc((sizeof(struct disklabel) + (DEV_BSIZE - 1)) & (DEV_BSIZE - 1)); if (lp == 0) diff --git a/sys/dev/raid/vinum/vinumioctl.c b/sys/dev/raid/vinum/vinumioctl.c index ff47693479..d42a778e36 100644 --- a/sys/dev/raid/vinum/vinumioctl.c +++ b/sys/dev/raid/vinum/vinumioctl.c @@ -43,7 +43,7 @@ * * $Id: vinumioctl.c,v 1.14 2000/10/27 03:07:53 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumioctl.c,v 1.25.2.4 2002/02/03 00:44:19 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumioctl.c,v 1.6 2006/07/28 02:17:38 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumioctl.c,v 1.7 2006/09/10 01:26:36 dillon Exp $ */ #include "vinumhdr.h" @@ -65,7 +65,7 @@ jmp_buf command_fail; /* return on a failed command */ int vinumioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_long cmd = ap->a_cmd; caddr_t data = ap->a_data; unsigned int objno; diff --git a/sys/dev/raid/vinum/vinumrequest.c b/sys/dev/raid/vinum/vinumrequest.c index 02450e73de..2d9c7674bd 100644 --- a/sys/dev/raid/vinum/vinumrequest.c +++ b/sys/dev/raid/vinum/vinumrequest.c @@ -39,7 +39,7 @@ * * $Id: vinumrequest.c,v 1.30 2001/01/09 04:20:55 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumrequest.c,v 1.44.2.5 2002/08/28 04:30:56 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumrequest.c,v 1.16 2006/07/28 02:17:38 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumrequest.c,v 1.17 2006/09/10 01:26:36 dillon Exp $ */ #include "vinumhdr.h" @@ -74,7 +74,7 @@ struct rqinfo *rqip = rqinfo; void logrq(enum rqinfo_type type, union rqinfou info, struct bio *ubio) { - dev_t dev; + cdev_t dev; crit_enter(); @@ -125,7 +125,7 @@ logrq(enum rqinfo_type type, union rqinfou info, struct bio *ubio) int vinumstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; struct bio *nbio = bio; @@ -189,7 +189,7 @@ vinumstrategy(struct dev_strategy_args *ap) * a currently active revive operation. */ int -vinumstart(dev_t dev, struct bio *bio, int reviveok) +vinumstart(cdev_t dev, struct bio *bio, int reviveok) { struct buf *bp = bio->bio_buf; int plexno; @@ -349,8 +349,8 @@ launch_requests(struct request *rq, int reviveok) rq->sdno, rq, (rq->bio->bio_buf->b_cmd & BUF_CMD_READ) ? "Read" : "Write", - major(((dev_t)rq->bio->bio_driver_info)), - minor(((dev_t)rq->bio->bio_driver_info)), + major(((cdev_t)rq->bio->bio_driver_info)), + minor(((cdev_t)rq->bio->bio_driver_info)), rq->bio->bio_offset, rq->bio->bio_buf->b_bcount); } @@ -364,8 +364,8 @@ launch_requests(struct request *rq, int reviveok) "Request: %p\n%s dev %d.%d, offset 0x%llx, length %d\n", rq, (rq->bio->bio_buf->b_cmd == BUF_CMD_READ) ? "Read" : "Write", - major(((dev_t)rq->bio->bio_driver_info)), - minor(((dev_t)rq->bio->bio_driver_info)), + major(((cdev_t)rq->bio->bio_driver_info)), + minor(((cdev_t)rq->bio->bio_driver_info)), rq->bio->bio_offset, rq->bio->bio_buf->b_bcount); vinum_conf.lastrq = rq; @@ -401,7 +401,7 @@ launch_requests(struct request *rq, int reviveok) rqg->lock = lockrange(rqg->lockbase, rqg->rq->bio->bio_buf, &PLEX[rqg->plexno]); rcount = rqg->count; for (rqno = 0; rqno < rcount;) { - dev_t dev; + cdev_t dev; rqe = &rqg->rqe[rqno]; @@ -898,8 +898,8 @@ check_range_covered(struct request *rq) void sdio(struct bio *bio) { - dev_t dev; - dev_t sddev; + cdev_t dev; + cdev_t sddev; struct sd *sd; struct sdbuf *sbp; daddr_t endoffset; diff --git a/sys/dev/raid/vinum/vinumrevive.c b/sys/dev/raid/vinum/vinumrevive.c index f111064005..9a9cd24be2 100644 --- a/sys/dev/raid/vinum/vinumrevive.c +++ b/sys/dev/raid/vinum/vinumrevive.c @@ -39,7 +39,7 @@ * * $Id: vinumrevive.c,v 1.14 2000/12/21 01:55:11 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumrevive.c,v 1.22.2.5 2001/03/13 02:59:43 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumrevive.c,v 1.12 2006/07/16 22:39:42 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumrevive.c,v 1.13 2006/09/10 01:26:36 dillon Exp $ */ #include "vinumhdr.h" @@ -61,7 +61,7 @@ revive_block(int sdno) struct plex *plex; struct volume *vol; struct buf *bp; - dev_t dev; + cdev_t dev; int error = EAGAIN; int size; /* size of revive block, bytes */ daddr_t plexblkno; /* lblkno in plex */ @@ -196,7 +196,7 @@ revive_block(int sdno) while (sd->waitlist) { /* we have waiting requests */ #if VINUMDEBUG struct request *rq = sd->waitlist; - dev_t dev; + cdev_t dev; if (debug & DEBUG_REVIVECONFLICT) { dev = rq->bio->bio_driver_info; diff --git a/sys/dev/raid/vinum/vinumutil.c b/sys/dev/raid/vinum/vinumutil.c index 2561370ffb..b9095d5c9c 100644 --- a/sys/dev/raid/vinum/vinumutil.c +++ b/sys/dev/raid/vinum/vinumutil.c @@ -37,7 +37,7 @@ * * $Id: vinumutil.c,v 1.14 1999/12/30 07:04:02 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumutil.c,v 1.15 2000/02/29 06:16:44 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumutil.c,v 1.4 2005/01/25 22:58:42 joerg Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumutil.c,v 1.5 2006/09/10 01:26:36 dillon Exp $ */ /* This file contains utility routines used both in kernel and user context */ @@ -232,7 +232,7 @@ sizespec(char *spec) * Perform no checking. */ int -Volno(dev_t dev) +Volno(cdev_t dev) { return (minor(dev) & MASK(VINUM_VOL_WIDTH)) >> VINUM_VOL_SHIFT; } @@ -243,7 +243,7 @@ Volno(dev_t dev) * type. Return -1 for invalid types. */ int -Plexno(dev_t dev) +Plexno(cdev_t dev) { switch (DEVTYPE(dev)) { case VINUM_VOLUME_TYPE: @@ -271,7 +271,7 @@ Plexno(dev_t dev) * type. Return -1 for invalid types. */ int -Sdno(dev_t dev) +Sdno(cdev_t dev) { switch (DEVTYPE(dev)) { case VINUM_VOLUME_TYPE: diff --git a/sys/dev/raid/vinum/vinumvar.h b/sys/dev/raid/vinum/vinumvar.h index 1c00dd4827..bf6d86a6bf 100644 --- a/sys/dev/raid/vinum/vinumvar.h +++ b/sys/dev/raid/vinum/vinumvar.h @@ -39,7 +39,7 @@ * * $Id: vinumvar.h,v 1.24 2000/03/01 02:34:57 grog Exp grog $ * $FreeBSD: src/sys/dev/vinum/vinumvar.h,v 1.32.2.4 2001/05/28 05:56:27 grog Exp $ - * $DragonFly: src/sys/dev/raid/vinum/vinumvar.h,v 1.8 2006/07/28 02:17:38 dillon Exp $ + * $DragonFly: src/sys/dev/raid/vinum/vinumvar.h,v 1.9 2006/09/10 01:26:36 dillon Exp $ */ #include @@ -433,7 +433,7 @@ struct drive { struct partinfo partinfo; /* partition information */ /* XXX kludge until we get this struct cleaned up */ #if _KERNEL - dev_t dev; /* device information */ + cdev_t dev; /* device information */ #else char dev [sizeof (int *)]; #endif diff --git a/sys/dev/serial/cy/cy.c b/sys/dev/serial/cy/cy.c index a9cdf83a3d..15ee4fd8ee 100644 --- a/sys/dev/serial/cy/cy.c +++ b/sys/dev/serial/cy/cy.c @@ -28,7 +28,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/cy.c,v 1.97.2.2 2001/08/22 13:04:58 bde Exp $ - * $DragonFly: src/sys/dev/serial/cy/cy.c,v 1.21 2006/09/05 00:55:42 dillon Exp $ + * $DragonFly: src/sys/dev/serial/cy/cy.c,v 1.22 2006/09/10 01:26:36 dillon Exp $ */ #include "opt_compat.h" @@ -648,7 +648,7 @@ cyattach_common(cy_iobase, cy_align) static int sioopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct com_s *com; int error; int mynor; @@ -829,7 +829,7 @@ out: static int sioclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct com_s *com; int mynor; struct tty *tp; @@ -937,7 +937,7 @@ comhardclose(com) static int siowrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; int mynor; struct tty *tp; @@ -1555,7 +1555,7 @@ siointr1(com) static int sioioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; u_long cmd = ap->a_cmd; struct com_s *com; diff --git a/sys/dev/serial/dgb/dgm.c b/sys/dev/serial/dgb/dgm.c index 2f480d478a..816f5927cf 100644 --- a/sys/dev/serial/dgb/dgm.c +++ b/sys/dev/serial/dgb/dgm.c @@ -1,6 +1,6 @@ /*- * $FreeBSD: src/sys/dev/dgb/dgm.c,v 1.31.2.3 2001/10/07 09:02:25 brian Exp $ - * $DragonFly: src/sys/dev/serial/dgb/dgm.c,v 1.13 2006/07/28 02:17:38 dillon Exp $ + * $DragonFly: src/sys/dev/serial/dgb/dgm.c,v 1.14 2006/09/10 01:26:36 dillon Exp $ * * This driver and the associated header files support the ISA PC/Xem * Digiboards. Its evolutionary roots are described below. @@ -930,7 +930,7 @@ dgmshutdown(device_t dev) static int dgmopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct dgm_softc *sc; struct tty *tp; int unit; @@ -1111,7 +1111,7 @@ out: static int dgmclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int mynor; struct tty *tp; int unit, pnum; @@ -1482,7 +1482,7 @@ dgmpoll(void *unit_c) static int dgmioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_long cmd = ap->a_cmd; caddr_t data = ap->a_data; struct dgm_softc *sc; diff --git a/sys/dev/serial/digi/digi.c b/sys/dev/serial/digi/digi.c index d361bde4dc..5699988272 100644 --- a/sys/dev/serial/digi/digi.c +++ b/sys/dev/serial/digi/digi.c @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/digi/digi.c,v 1.36 2003/09/26 09:05:57 phk Exp $ - * $DragonFly: src/sys/dev/serial/digi/digi.c,v 1.7 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/dev/serial/digi/digi.c,v 1.8 2006/09/10 01:26:36 dillon Exp $ */ /*- @@ -711,7 +711,7 @@ digi_disc_optim(struct tty *tp, struct termios *t, struct digi_p *port) static int digiopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct digi_softc *sc; struct tty *tp; int unit; @@ -876,7 +876,7 @@ out: static int digiclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int mynor; struct tty *tp; int unit, pnum; @@ -956,7 +956,7 @@ digihardclose(struct digi_p *port) static int digiread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int mynor; struct tty *tp; int error, unit, pnum; @@ -983,7 +983,7 @@ digiread(struct dev_read_args *ap) static int digiwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int mynor; struct tty *tp; int error, unit, pnum; @@ -1054,7 +1054,7 @@ digi_loaddata(struct digi_softc *sc) static int digiioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_long cmd = ap->a_cmd; caddr_t data = ap->a_data; int unit, pnum, mynor, error; diff --git a/sys/dev/serial/digi/digi.h b/sys/dev/serial/digi/digi.h index d1c72c9c37..b19f05efae 100644 --- a/sys/dev/serial/digi/digi.h +++ b/sys/dev/serial/digi/digi.h @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/digi/digi.h,v 1.14 2003/08/07 15:04:24 jhb Exp $ - * $DragonFly: src/sys/dev/serial/digi/digi.h,v 1.1 2004/12/22 08:42:47 joerg Exp $ + * $DragonFly: src/sys/dev/serial/digi/digi.h,v 1.2 2006/09/10 01:26:36 dillon Exp $ */ #define W(p) (*(u_int16_t *)(p)) @@ -74,7 +74,7 @@ struct digi_p { volatile struct board_chan *bc; struct tty *tp; - dev_t dev[6]; + cdev_t dev[6]; u_char *txbuf; u_char *rxbuf; @@ -166,7 +166,7 @@ struct digi_softc { int iorid; void *irqHandler; int unit; - dev_t ctldev; + cdev_t ctldev; } res; u_char *vmem; /* virtual memory address */ diff --git a/sys/dev/serial/rc/rc.c b/sys/dev/serial/rc/rc.c index 79b8056ff1..8841229bfc 100644 --- a/sys/dev/serial/rc/rc.c +++ b/sys/dev/serial/rc/rc.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/rc.c,v 1.53.2.1 2001/02/26 04:23:10 jlemon Exp $ - * $DragonFly: src/sys/dev/serial/rc/rc.c,v 1.17 2006/07/28 02:17:38 dillon Exp $ + * $DragonFly: src/sys/dev/serial/rc/rc.c,v 1.18 2006/09/10 01:26:36 dillon Exp $ * */ @@ -713,7 +713,7 @@ rc_stop(tp, rw) static int rcopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct rc_chans *rc; struct tty *tp; int unit, nec, error = 0; @@ -805,7 +805,7 @@ out: static int rcclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct rc_chans *rc; struct tty *tp; int unit = GET_UNIT(dev); @@ -1058,7 +1058,7 @@ struct rc_softc *rcb; static int rcioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct rc_chans *rc = &rc_chans[GET_UNIT(dev)]; int error; struct tty *tp = rc->rc_tp; diff --git a/sys/dev/serial/rp/rp.c b/sys/dev/serial/rp/rp.c index 014545650f..53e0eedc1f 100644 --- a/sys/dev/serial/rp/rp.c +++ b/sys/dev/serial/rp/rp.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/rp/rp.c,v 1.45.2.2 2002/11/07 22:26:59 tegge Exp $ - * $DragonFly: src/sys/dev/serial/rp/rp.c,v 1.18 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/dev/serial/rp/rp.c,v 1.19 2006/09/10 01:26:36 dillon Exp $ */ /* @@ -933,7 +933,7 @@ rp_releaseresource(CONTROLLER_t *ctlp) int rpopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct rp_port *rp; int unit, port, mynor, umynor, flags; /* SG */ struct tty *tp; @@ -1094,7 +1094,7 @@ out2: int rpclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit, mynor, umynor, port; /* SG */ struct rp_port *rp; struct tty *tp; @@ -1168,7 +1168,7 @@ static int rpwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct rp_port *rp; struct tty *tp; int unit, mynor, port, umynor, error = 0; /* SG */ @@ -1206,7 +1206,7 @@ rpdtrwakeup(void *chan) int rpioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_long cmd = ap->a_cmd; caddr_t data = ap->a_data; struct rp_port *rp; diff --git a/sys/dev/serial/si/si.c b/sys/dev/serial/si/si.c index 992b1714fb..cea9b5e7a2 100644 --- a/sys/dev/serial/si/si.c +++ b/sys/dev/serial/si/si.c @@ -31,7 +31,7 @@ * NO EVENT SHALL THE AUTHORS BE LIABLE. * * $FreeBSD: src/sys/dev/si/si.c,v 1.101.2.1 2001/02/26 04:23:06 jlemon Exp $ - * $DragonFly: src/sys/dev/serial/si/si.c,v 1.19 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/dev/serial/si/si.c,v 1.20 2006/09/10 01:26:36 dillon Exp $ */ #ifndef lint @@ -97,7 +97,7 @@ enum si_mctl { GET, SET, BIS, BIC }; static void si_command(struct si_port *, int, int); static int si_modem(struct si_port *, enum si_mctl, int); static void si_write_enable(struct si_port *, int); -static int si_Sioctl(dev_t, u_long, caddr_t, int, struct ucred *); +static int si_Sioctl(cdev_t, u_long, caddr_t, int, struct ucred *); static void si_start(struct tty *); static void si_stop(struct tty *, int); static timeout_t si_lstart; @@ -619,7 +619,7 @@ try_next2: static int siopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error; int card, port; struct si_softc *sc; @@ -789,7 +789,7 @@ out: static int siclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct si_port *pp; struct tty *tp; int error = 0; @@ -900,7 +900,7 @@ sidtrwakeup(void *chan) static int siwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct si_port *pp; struct tty *tp; int error = 0; @@ -939,7 +939,7 @@ out: static int siioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; u_long cmd = ap->a_cmd; struct si_port *pp; @@ -1112,7 +1112,7 @@ out: * Handle the Specialix ioctls. All MUST be called via the CONTROL device */ static int -si_Sioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct ucred *cred) +si_Sioctl(cdev_t dev, u_long cmd, caddr_t data, int flag, struct ucred *cred) { struct si_softc *xsc; struct si_port *xpp; diff --git a/sys/dev/serial/sio/sio.c b/sys/dev/serial/sio/sio.c index 0ad5ddf5a2..6313c1e5dc 100644 --- a/sys/dev/serial/sio/sio.c +++ b/sys/dev/serial/sio/sio.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/isa/sio.c,v 1.291.2.35 2003/05/18 08:51:15 murray Exp $ - * $DragonFly: src/sys/dev/serial/sio/sio.c,v 1.34 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/dev/serial/sio/sio.c,v 1.35 2006/09/10 01:26:37 dillon Exp $ * from: @(#)com.c 7.5 (Berkeley) 5/16/91 * from: i386/isa sio.c,v 1.234 */ @@ -1245,7 +1245,7 @@ determined_type: ; static int sioopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct com_s *com; int error; int mynor; @@ -1428,7 +1428,7 @@ out: static int sioclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct com_s *com; int mynor; struct tty *tp; @@ -1524,7 +1524,7 @@ comhardclose(com) static int sioread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int mynor; struct com_s *com; @@ -1540,7 +1540,7 @@ sioread(struct dev_read_args *ap) static int siowrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int mynor; struct com_s *com; int unit; @@ -1976,7 +1976,7 @@ cont: static int sioioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; struct com_s *com; int error; @@ -3031,7 +3031,7 @@ siocninit(cp) static int siocncheckc(dev) - dev_t dev; + cdev_t dev; { int c; Port_t iobase; @@ -3055,7 +3055,7 @@ siocncheckc(dev) int siocngetc(dev) - dev_t dev; + cdev_t dev; { int c; Port_t iobase; @@ -3077,7 +3077,7 @@ siocngetc(dev) void siocnputc(dev, c) - dev_t dev; + cdev_t dev; int c; { struct siocnstate sp; diff --git a/sys/dev/serial/stl/stallion.c b/sys/dev/serial/stl/stallion.c index 7a6c953f20..1ade64b418 100644 --- a/sys/dev/serial/stl/stallion.c +++ b/sys/dev/serial/stl/stallion.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/stallion.c,v 1.39.2.2 2001/08/30 12:29:57 murray Exp $ - * $DragonFly: src/sys/dev/serial/stl/stallion.c,v 1.20 2006/09/05 00:55:42 dillon Exp $ + * $DragonFly: src/sys/dev/serial/stl/stallion.c,v 1.21 2006/09/10 01:26:37 dillon Exp $ */ /*****************************************************************************/ @@ -483,7 +483,7 @@ STATIC d_ioctl_t stlioctl; /* * Internal function prototypes. */ -static stlport_t *stl_dev2port(dev_t dev); +static stlport_t *stl_dev2port(cdev_t dev); static int stl_findfreeunit(void); static int stl_rawopen(stlport_t *portp); static int stl_rawclose(stlport_t *portp); @@ -506,7 +506,7 @@ static void stl_echatintr(stlbrd_t *brdp); static void stl_echmcaintr(stlbrd_t *brdp); static void stl_echpciintr(stlbrd_t *brdp); static void stl_echpci64intr(stlbrd_t *brdp); -static int stl_memioctl(dev_t dev, unsigned long cmd, caddr_t data, +static int stl_memioctl(cdev_t dev, unsigned long cmd, caddr_t data, int flag); static int stl_getbrdstats(caddr_t data); static int stl_getportstats(stlport_t *portp, caddr_t data); @@ -1141,7 +1141,7 @@ void stlpciattach(pcici_t tag, int unit) STATIC int stlopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; stlport_t *portp; int error, callout; @@ -1260,7 +1260,7 @@ stlopen_end: STATIC int stlclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; stlport_t *portp; @@ -1319,7 +1319,7 @@ STATIC int stlstop(struct tty *tp, int rw) STATIC int stlioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_long cmd = ap->a_cmd; caddr_t data = ap->a_data; struct termios *newtios, *localtios; @@ -1500,7 +1500,7 @@ STATIC int stlioctl(struct dev_ioctl_args *ap) * pointer. Return NULL if the device number is not a valid port. */ -STATIC stlport_t *stl_dev2port(dev_t dev) +STATIC stlport_t *stl_dev2port(cdev_t dev) { stlbrd_t *brdp; @@ -2701,7 +2701,7 @@ static int stl_clrportstats(stlport_t *portp, caddr_t data) * The "staliomem" device is used for stats collection in this driver. */ -static int stl_memioctl(dev_t dev, unsigned long cmd, caddr_t data, int flag) +static int stl_memioctl(cdev_t dev, unsigned long cmd, caddr_t data, int flag) { int rc; diff --git a/sys/dev/serial/stli/istallion.c b/sys/dev/serial/stli/istallion.c index cbeb94001b..23539d2d4f 100644 --- a/sys/dev/serial/stli/istallion.c +++ b/sys/dev/serial/stli/istallion.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/istallion.c,v 1.36.2.2 2001/08/30 12:29:57 murray Exp $ - * $DragonFly: src/sys/dev/serial/stli/istallion.c,v 1.19 2006/09/05 00:55:43 dillon Exp $ + * $DragonFly: src/sys/dev/serial/stli/istallion.c,v 1.20 2006/09/10 01:26:37 dillon Exp $ */ /*****************************************************************************/ @@ -536,7 +536,7 @@ STATIC d_ioctl_t stliioctl; /* * Internal function prototypes. */ -static stliport_t *stli_dev2port(dev_t dev); +static stliport_t *stli_dev2port(cdev_t dev); static int stli_isaprobe(struct isa_device *idp); static int stli_eisaprobe(struct isa_device *idp); static int stli_brdinit(stlibrd_t *brdp); @@ -571,8 +571,8 @@ static void stli_sendcmd(stlibrd_t *brdp, stliport_t *portp, unsigned long cmd, void *arg, int size, int copyback); static void stli_mkasyport(stliport_t *portp, asyport_t *pp, struct termios *tiosp); -static int stli_memrw(dev_t dev, struct uio *uiop, int flag); -static int stli_memioctl(dev_t dev, unsigned long cmd, caddr_t data, +static int stli_memrw(cdev_t dev, struct uio *uiop, int flag); +static int stli_memioctl(cdev_t dev, unsigned long cmd, caddr_t data, int flag); static int stli_getbrdstats(caddr_t data); static int stli_getportstats(stliport_t *portp, caddr_t data); @@ -857,7 +857,7 @@ static int stliattach(struct isa_device *idp) STATIC int stliopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; stliport_t *portp; int error, callout; @@ -988,7 +988,7 @@ stliopen_end: STATIC int stliclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; stliport_t *portp; @@ -1019,7 +1019,7 @@ STATIC int stliclose(struct dev_close_args *ap) STATIC int stliread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; stliport_t *portp; #if STLDEBUG @@ -1069,7 +1069,7 @@ STATIC int stlistop(struct tty *tp, int rw) STATIC int stliwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; stliport_t *portp; #if STLDEBUG @@ -1091,7 +1091,7 @@ STATIC int stliwrite(struct dev_write_args *ap) STATIC int stliioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_long cmd = ap->a_cmd; caddr_t data = ap->a_data; struct termios *newtios, *localtios; @@ -1302,7 +1302,7 @@ STATIC int stliioctl(struct dev_ioctl_args *ap) * pointer. Return NULL if the device number is not a valid port. */ -STATIC stliport_t *stli_dev2port(dev_t dev) +STATIC stliport_t *stli_dev2port(cdev_t dev) { stlibrd_t *brdp; @@ -3595,7 +3595,7 @@ static int stli_clrportstats(stliport_t *portp, caddr_t data) * loading the slave image (and debugging :-) */ -STATIC int stli_memrw(dev_t dev, struct uio *uiop, int flag) +STATIC int stli_memrw(cdev_t dev, struct uio *uiop, int flag) { stlibrd_t *brdp; void *memptr; @@ -3643,7 +3643,7 @@ STATIC int stli_memrw(dev_t dev, struct uio *uiop, int flag) * reset it, and start/stop it. */ -static int stli_memioctl(dev_t dev, unsigned long cmd, caddr_t data, int flag) +static int stli_memioctl(cdev_t dev, unsigned long cmd, caddr_t data, int flag) { stlibrd_t *brdp; int brdnr, rc; diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 92e337c989..7c12606ec4 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pcm/dsp.c,v 1.15.2.13 2002/08/30 13:53:03 orion Exp $ - * $DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.11 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.12 2006/09/10 01:26:37 dillon Exp $ */ #include @@ -32,7 +32,7 @@ #include -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.11 2006/09/09 19:34:46 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/dsp.c,v 1.12 2006/09/10 01:26:37 dillon Exp $"); #define OLDPCM_IOCTL @@ -60,7 +60,7 @@ static eventhandler_tag dsp_ehtag; #endif static struct snddev_info * -dsp_get_info(dev_t dev) +dsp_get_info(cdev_t dev) { struct snddev_info *d; int unit; @@ -74,7 +74,7 @@ dsp_get_info(dev_t dev) } static u_int32_t -dsp_get_flags(dev_t dev) +dsp_get_flags(cdev_t dev) { device_t bdev; int unit; @@ -88,7 +88,7 @@ dsp_get_flags(dev_t dev) } static void -dsp_set_flags(dev_t dev, u_int32_t flags) +dsp_set_flags(cdev_t dev, u_int32_t flags) { device_t bdev; int unit; @@ -108,7 +108,7 @@ dsp_set_flags(dev_t dev, u_int32_t flags) * lock channels specified. */ static int -getchns(dev_t dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32_t prio) +getchns(cdev_t dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32_t prio) { struct snddev_info *d; u_int32_t flags; @@ -152,7 +152,7 @@ getchns(dev_t dev, struct pcm_channel **rdch, struct pcm_channel **wrch, u_int32 /* unlock specified channels */ static void -relchns(dev_t dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t prio) +relchns(cdev_t dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t prio) { struct snddev_info *d; @@ -169,7 +169,7 @@ relchns(dev_t dev, struct pcm_channel *rdch, struct pcm_channel *wrch, u_int32_t static int dsp_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct pcm_channel *rdch, *wrch; struct snddev_info *d; u_int32_t fmt; @@ -316,7 +316,7 @@ dsp_open(struct dev_open_args *ap) static int dsp_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct pcm_channel *rdch, *wrch; struct snddev_info *d; int exit; @@ -381,7 +381,7 @@ dsp_close(struct dev_close_args *ap) static int dsp_read(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct pcm_channel *rdch, *wrch; int ret; @@ -408,7 +408,7 @@ dsp_read(struct dev_read_args *ap) static int dsp_write(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct pcm_channel *rdch, *wrch; int ret; @@ -435,7 +435,7 @@ dsp_write(struct dev_write_args *ap) static int dsp_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_long cmd = ap->a_cmd; caddr_t arg = ap->a_data; struct pcm_channel *wrch, *rdch; @@ -449,7 +449,7 @@ dsp_ioctl(struct dev_ioctl_args *ap) */ if (IOCGROUP(cmd) == 'M') { - dev_t pdev; + cdev_t pdev; pdev = make_adhoc_dev(&dsp_ops, PCMMKMINOR(PCMUNIT(dev), SND_DEV_CTL, 0)); @@ -554,7 +554,7 @@ dsp_ioctl(struct dev_ioctl_args *ap) { snd_capabilities *p = (snd_capabilities *)arg; struct pcmchan_caps *pcaps = NULL, *rcaps = NULL; - dev_t pdev; + cdev_t pdev; if (rdch) { CHN_LOCK(rdch); @@ -973,7 +973,7 @@ dsp_ioctl(struct dev_ioctl_args *ap) static int dsp_poll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct pcm_channel *wrch = NULL, *rdch = NULL; int ret, e; @@ -1001,7 +1001,7 @@ dsp_poll(struct dev_poll_args *ap) static int dsp_mmap(struct dev_mmap_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct pcm_channel *wrch = NULL, *rdch = NULL, *c; int ret; @@ -1106,9 +1106,9 @@ dsp_unregisterrec(int unit, int channel) #ifdef USING_DEVFS static void -dsp_clone(void *arg, char *name, int namelen, dev_t *dev) +dsp_clone(void *arg, char *name, int namelen, cdev_t *dev) { - dev_t pdev; + cdev_t pdev; int i, cont, unit, devtype; int devtypes[3] = {SND_DEV_DSP, SND_DEV_DSP16, SND_DEV_AUDIO}; char *devnames[3] = {"dsp", "dspW", "audio"}; diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c index b177787837..8e134c2a91 100644 --- a/sys/dev/sound/pcm/mixer.c +++ b/sys/dev/sound/pcm/mixer.c @@ -24,14 +24,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/dev/sound/pcm/mixer.c,v 1.4.2.8 2002/04/22 15:49:36 cg Exp $ - * $DragonFly: src/sys/dev/sound/pcm/mixer.c,v 1.11 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/dev/sound/pcm/mixer.c,v 1.12 2006/09/10 01:26:37 dillon Exp $ */ #include #include "mixer_if.h" -SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/mixer.c,v 1.11 2006/09/09 19:34:46 dillon Exp $"); +SND_DECLARE_FILE("$DragonFly: src/sys/dev/sound/pcm/mixer.c,v 1.12 2006/09/10 01:26:37 dillon Exp $"); MALLOC_DEFINE(M_MIXER, "mixer", "mixer"); @@ -86,10 +86,10 @@ static struct dev_ops mixer_ops = { static eventhandler_tag mixer_ehtag; #endif -static dev_t +static cdev_t mixer_get_devt(device_t dev) { - dev_t pdev; + cdev_t pdev; int unit; unit = device_get_unit(dev); @@ -191,7 +191,7 @@ mixer_init(device_t dev, kobj_class_t cls, void *devinfo) { struct snd_mixer *m; u_int16_t v; - dev_t pdev; + cdev_t pdev; int i, unit; m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_WAITOK | M_ZERO); @@ -233,7 +233,7 @@ mixer_uninit(device_t dev) int i; int unit; struct snd_mixer *m; - dev_t pdev; + cdev_t pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -267,7 +267,7 @@ int mixer_reinit(device_t dev) { struct snd_mixer *m; - dev_t pdev; + cdev_t pdev; int i; pdev = mixer_get_devt(dev); @@ -321,7 +321,7 @@ int mixer_hwvol_init(device_t dev) { struct snd_mixer *m; - dev_t pdev; + cdev_t pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -344,7 +344,7 @@ void mixer_hwvol_mute(device_t dev) { struct snd_mixer *m; - dev_t pdev; + cdev_t pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -365,7 +365,7 @@ mixer_hwvol_step(device_t dev, int left_step, int right_step) { struct snd_mixer *m; int level, left, right; - dev_t pdev; + cdev_t pdev; pdev = mixer_get_devt(dev); m = pdev->si_drv1; @@ -394,7 +394,7 @@ mixer_hwvol_step(device_t dev, int left_step, int right_step) static int mixer_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct snd_mixer *m; m = dev->si_drv1; @@ -411,7 +411,7 @@ mixer_open(struct dev_open_args *ap) static int mixer_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct snd_mixer *m; m = dev->si_drv1; @@ -433,7 +433,7 @@ mixer_close(struct dev_close_args *ap) int mixer_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t arg = ap->a_data; struct snd_mixer *m; int ret, *arg_i = (int *)arg; @@ -486,9 +486,9 @@ mixer_ioctl(struct dev_ioctl_args *ap) #ifdef USING_DEVFS static void -mixer_clone(void *arg, char *name, int namelen, dev_t *dev) +mixer_clone(void *arg, char *name, int namelen, cdev_t *dev) { - dev_t pdev; + cdev_t pdev; if (*dev != NOCDEV) return; diff --git a/sys/dev/usbmisc/ucom/ucom.c b/sys/dev/usbmisc/ucom/ucom.c index e7553781a0..5352aa0fed 100644 --- a/sys/dev/usbmisc/ucom/ucom.c +++ b/sys/dev/usbmisc/ucom/ucom.c @@ -2,7 +2,7 @@ * $NetBSD: ucom.c,v 1.39 2001/08/16 22:31:24 augustss Exp $ * $NetBSD: ucom.c,v 1.40 2001/11/13 06:24:54 lukem Exp $ * $FreeBSD: src/sys/dev/usb/ucom.c,v 1.35 2003/11/16 11:58:21 akiyama Exp $ - * $DragonFly: src/sys/dev/usbmisc/ucom/ucom.c,v 1.20 2006/07/28 02:17:39 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ucom/ucom.c,v 1.21 2006/09/10 01:26:37 dillon Exp $ */ /*- * Copyright (c) 2001-2002, Shunsuke Akiyama . @@ -169,7 +169,7 @@ ucom_attach(struct ucom_softc *sc) { struct tty *tp; int unit; - dev_t dev; + cdev_t dev; unit = device_get_unit(sc->sc_dev); @@ -253,7 +253,7 @@ ucom_shutdown(struct ucom_softc *sc) Static int ucomopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = UCOMUNIT(dev); struct ucom_softc *sc; usbd_status err; @@ -449,7 +449,7 @@ bad: static int ucomclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ucom_softc *sc; struct tty *tp; @@ -499,7 +499,7 @@ quit: static int ucomread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ucom_softc *sc; struct tty *tp; int error; @@ -522,7 +522,7 @@ ucomread(struct dev_read_args *ap) static int ucomwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ucom_softc *sc; struct tty *tp; int error; @@ -545,7 +545,7 @@ ucomwrite(struct dev_write_args *ap) static int ucomioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ucom_softc *sc; struct tty *tp; int error; diff --git a/sys/dev/usbmisc/ucom/ucomvar.h b/sys/dev/usbmisc/ucom/ucomvar.h index 41b4bdf57e..2144590900 100644 --- a/sys/dev/usbmisc/ucom/ucomvar.h +++ b/sys/dev/usbmisc/ucom/ucomvar.h @@ -1,7 +1,7 @@ /* * $NetBSD: ucomvar.h,v 1.9 2001/01/23 21:56:17 augustss Exp $ * $FreeBSD: src/sys/dev/usb/ucomvar.h,v 1.2 2002/07/31 14:34:35 joe Exp $ - * $DragonFly: src/sys/dev/usbmisc/ucom/ucomvar.h,v 1.3 2003/12/30 01:01:46 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ucom/ucomvar.h,v 1.4 2006/09/10 01:26:37 dillon Exp $ */ /*- @@ -176,7 +176,7 @@ struct ucom_softc { int sc_refcnt; u_char sc_dying; /* disconnecting */ - dev_t dev; /* special device node */ + cdev_t dev; /* special device node */ }; extern devclass_t ucom_devclass; diff --git a/sys/dev/usbmisc/ufm/ufm.c b/sys/dev/usbmisc/ufm/ufm.c index 848cba301a..1e74ec6609 100644 --- a/sys/dev/usbmisc/ufm/ufm.c +++ b/sys/dev/usbmisc/ufm/ufm.c @@ -30,7 +30,7 @@ /* * $FreeBSD: src/sys/dev/usb/ufm.c,v 1.16 2003/10/04 21:41:01 joe Exp $ - * $DragonFly: src/sys/dev/usbmisc/ufm/ufm.c,v 1.10 2006/07/28 02:17:39 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ufm/ufm.c,v 1.11 2006/09/10 01:26:37 dillon Exp $ */ #include @@ -81,9 +81,9 @@ SYSCTL_INT(_hw_usb_ufm, OID_AUTO, debug, CTLFLAG_RW, #endif #if defined(__NetBSD__) || defined(__OpenBSD__) -int ufmopen(dev_t, int, int, usb_proc_ptr); -int ufmclose(dev_t, int, int, usb_proc_ptr); -int ufmioctl(dev_t, u_long, caddr_t, int, usb_proc_ptr); +int ufmopen(cdev_t, int, int, usb_proc_ptr); +int ufmclose(cdev_t, int, int, usb_proc_ptr); +int ufmioctl(cdev_t, u_long, caddr_t, int, usb_proc_ptr); cdev_decl(ufm); #elif defined(__FreeBSD__) || defined(__DragonFly__) @@ -204,7 +204,7 @@ USB_ATTACH(ufm) sc->sc_epaddr = edesc->bEndpointAddress; #if defined(__FreeBSD__) || defined(__DragonFly__) - /* XXX no error trapping, no storing of dev_t */ + /* XXX no error trapping, no storing of cdev_t */ dev_ops_add(&ufm_ops, -1, device_get_unit(self)); make_dev(&ufm_ops, device_get_unit(self), UID_ROOT, GID_OPERATOR, @@ -227,7 +227,7 @@ USB_ATTACH(ufm) int ufmopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ufm_softc *sc; int unit = UFMUNIT(dev); @@ -249,7 +249,7 @@ ufmopen(struct dev_open_args *ap) int ufmclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ufm_softc *sc; int unit = UFMUNIT(dev); @@ -373,7 +373,7 @@ ufm_get_stat(struct ufm_softc *sc, caddr_t addr) int ufmioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t addr = ap->a_data; struct ufm_softc *sc; diff --git a/sys/dev/usbmisc/ugen/ugen.c b/sys/dev/usbmisc/ugen/ugen.c index bd6a11b4b7..bef167a7b1 100644 --- a/sys/dev/usbmisc/ugen/ugen.c +++ b/sys/dev/usbmisc/ugen/ugen.c @@ -2,7 +2,7 @@ * $NetBSD: ugen.c,v 1.27 1999/10/28 12:08:38 augustss Exp $ * $NetBSD: ugen.c,v 1.59 2002/07/11 21:14:28 augustss Exp $ * $FreeBSD: src/sys/dev/usb/ugen.c,v 1.81 2003/11/09 09:17:22 tanimura Exp $ - * $DragonFly: src/sys/dev/usbmisc/ugen/ugen.c,v 1.20 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ugen/ugen.c,v 1.21 2006/09/10 01:26:37 dillon Exp $ */ /* @@ -110,7 +110,7 @@ SYSCTL_INT(_hw_usb_ugen, OID_AUTO, bufsize, CTLFLAG_RW, struct ugen_endpoint { struct ugen_softc *sc; #if defined(__FreeBSD__) || defined(__DragonFly__) - dev_t dev; + cdev_t dev; #endif usb_endpoint_descriptor_t *edesc; usbd_interface_handle iface; @@ -259,7 +259,7 @@ Static void ugen_make_devnodes(struct ugen_softc *sc) { int endptno; - dev_t dev; + cdev_t dev; for (endptno = 1; endptno < USB_MAX_ENDPOINTS; endptno++) { if (sc->sc_endpoints[endptno][IN].sc != NULL || @@ -297,7 +297,7 @@ Static void ugen_destroy_devnodes(struct ugen_softc *sc) { int endptno; - dev_t dev; + cdev_t dev; /* destroy all devices for the other (existing) endpoints as well */ for (endptno = 1; endptno < USB_MAX_ENDPOINTS; endptno++) { @@ -401,7 +401,7 @@ ugen_set_config(struct ugen_softc *sc, int configno) int ugenopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ugen_softc *sc; int unit = UGENUNIT(dev); int endpt = UGENENDPOINT(dev); @@ -542,7 +542,7 @@ ugenopen(struct dev_open_args *ap) int ugenclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int endpt = UGENENDPOINT(dev); struct ugen_softc *sc; struct ugen_endpoint *sce; @@ -758,7 +758,7 @@ done: int ugenread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int endpt = UGENENDPOINT(dev); struct ugen_softc *sc; int error; @@ -869,7 +869,7 @@ done: int ugenwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int endpt = UGENENDPOINT(dev); struct ugen_softc *sc; int error; @@ -1430,7 +1430,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd, int ugenioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int endpt = UGENENDPOINT(dev); struct ugen_softc *sc; int error; @@ -1447,7 +1447,7 @@ ugenioctl(struct dev_ioctl_args *ap) int ugenpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ugen_softc *sc; struct ugen_endpoint *sce; int revents = 0; diff --git a/sys/dev/usbmisc/uhid/uhid.c b/sys/dev/usbmisc/uhid/uhid.c index d0c9ae6bf2..7f5812db70 100644 --- a/sys/dev/usbmisc/uhid/uhid.c +++ b/sys/dev/usbmisc/uhid/uhid.c @@ -1,7 +1,7 @@ /* * $NetBSD: uhid.c,v 1.46 2001/11/13 06:24:55 lukem Exp $ * $FreeBSD: src/sys/dev/usb/uhid.c,v 1.65 2003/11/09 09:17:22 tanimura Exp $ - * $DragonFly: src/sys/dev/usbmisc/uhid/uhid.c,v 1.18 2006/09/05 00:55:43 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/uhid/uhid.c,v 1.19 2006/09/10 01:26:37 dillon Exp $ */ /* Also already merged from NetBSD: @@ -384,7 +384,7 @@ uhid_intr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status) int uhidopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uhid_softc *sc; usbd_status err; @@ -432,7 +432,7 @@ uhidopen(struct dev_open_args *ap) int uhidclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uhid_softc *sc; USB_GET_SC(uhid, UHIDUNIT(dev), sc); @@ -522,7 +522,7 @@ uhid_do_read(struct uhid_softc *sc, struct uio *uio, int flag) int uhidread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uhid_softc *sc; int error; @@ -569,7 +569,7 @@ uhid_do_write(struct uhid_softc *sc, struct uio *uio, int flag) int uhidwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uhid_softc *sc; int error; @@ -701,7 +701,7 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, caddr_t addr, int flag) int uhidioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uhid_softc *sc; int error; @@ -717,7 +717,7 @@ uhidioctl(struct dev_ioctl_args *ap) int uhidpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uhid_softc *sc; int revents = 0; diff --git a/sys/dev/usbmisc/ulpt/ulpt.c b/sys/dev/usbmisc/ulpt/ulpt.c index aa83cea473..c9edc201fe 100644 --- a/sys/dev/usbmisc/ulpt/ulpt.c +++ b/sys/dev/usbmisc/ulpt/ulpt.c @@ -1,7 +1,7 @@ /* * $NetBSD: ulpt.c,v 1.55 2002/10/23 09:14:01 jdolecek Exp $ * $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.59 2003/09/28 20:48:13 phk Exp $ - * $DragonFly: src/sys/dev/usbmisc/ulpt/ulpt.c,v 1.13 2006/07/28 02:17:39 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ulpt/ulpt.c,v 1.14 2006/09/10 01:26:37 dillon Exp $ */ /* @@ -491,7 +491,7 @@ int ulptusein = 1; int ulptopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; u_char flags = ULPTFLAGS(dev); struct ulpt_softc *sc; usbd_status err; @@ -627,7 +627,7 @@ ulpt_statusmsg(u_char status, struct ulpt_softc *sc) int ulptclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ulpt_softc *sc; USB_GET_SC(ulpt, ULPTUNIT(dev), sc); @@ -700,7 +700,7 @@ ulpt_do_write(struct ulpt_softc *sc, struct uio *uio, int flags) int ulptwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ulpt_softc *sc; int error; diff --git a/sys/dev/usbmisc/ums/ums.c b/sys/dev/usbmisc/ums/ums.c index b633fbd7b2..1b6d06a32e 100644 --- a/sys/dev/usbmisc/ums/ums.c +++ b/sys/dev/usbmisc/ums/ums.c @@ -1,6 +1,6 @@ /* * $FreeBSD: src/sys/dev/usb/ums.c,v 1.64 2003/11/09 09:17:22 tanimura Exp $ - * $DragonFly: src/sys/dev/usbmisc/ums/ums.c,v 1.19 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/ums/ums.c,v 1.20 2006/09/10 01:26:37 dillon Exp $ */ /* @@ -571,7 +571,7 @@ ums_disable(void *priv) Static int ums_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ums_softc *sc; USB_GET_SC_OPEN(ums, UMSUNIT(dev), sc); @@ -582,7 +582,7 @@ ums_open(struct dev_open_args *ap) Static int ums_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ums_softc *sc; USB_GET_SC(ums, UMSUNIT(dev), sc); @@ -599,7 +599,7 @@ ums_close(struct dev_close_args *ap) Static int ums_read(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct ums_softc *sc; char buf[sizeof(sc->qbuf)]; @@ -669,7 +669,7 @@ ums_read(struct dev_read_args *ap) Static int ums_poll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ums_softc *sc; int revents = 0; @@ -697,7 +697,7 @@ ums_poll(struct dev_poll_args *ap) int ums_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ums_softc *sc; int error = 0; mousemode_t mode; diff --git a/sys/dev/usbmisc/urio/urio.c b/sys/dev/usbmisc/urio/urio.c index 35e404748b..29d3a484f5 100644 --- a/sys/dev/usbmisc/urio/urio.c +++ b/sys/dev/usbmisc/urio/urio.c @@ -30,7 +30,7 @@ /* * $FreeBSD: src/sys/dev/usb/urio.c,v 1.28 2003/08/25 22:01:06 joe Exp $ - * $DragonFly: src/sys/dev/usbmisc/urio/urio.c,v 1.13 2006/09/05 00:55:44 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/urio/urio.c,v 1.14 2006/09/10 01:26:37 dillon Exp $ */ /* @@ -101,11 +101,11 @@ SYSCTL_INT(_hw_usb_urio, OID_AUTO, debug, CTLFLAG_RW, #define RIO_NODIR 2 #if defined(__NetBSD__) -int urioopen(dev_t, int, int, struct proc *); -int urioclose(dev_t, int, int, struct proc *p); -int urioread(dev_t, struct uio *uio, int); -int uriowrite(dev_t, struct uio *uio, int); -int urioioctl(dev_t, u_long, caddr_t, int, struct proc *); +int urioopen(cdev_t, int, int, struct proc *); +int urioclose(cdev_t, int, int, struct proc *p); +int urioread(cdev_t, struct uio *uio, int); +int uriowrite(cdev_t, struct uio *uio, int); +int urioioctl(cdev_t, u_long, caddr_t, int, struct proc *); cdev_decl(urio); #define RIO_UE_GET_DIR(p) ((UE_GET_DIR(p) == UE_DIR_IN) ? RIO_IN :\ @@ -280,7 +280,7 @@ USB_ATTACH(urio) int urioopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; #if (USBDI >= 1) struct urio_softc * sc; #endif @@ -321,7 +321,7 @@ urioopen(struct dev_open_args *ap) int urioclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; #if (USBDI >= 1) struct urio_softc * sc; #endif @@ -346,7 +346,7 @@ urioclose(struct dev_close_args *ap) int urioread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; #if (USBDI >= 1) struct urio_softc * sc; @@ -422,7 +422,7 @@ urioread(struct dev_read_args *ap) int uriowrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; #if (USBDI >= 1) struct urio_softc * sc; @@ -491,7 +491,7 @@ uriowrite(struct dev_write_args *ap) int urioioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; #if (USBDI >= 1) struct urio_softc * sc; #endif diff --git a/sys/dev/usbmisc/uscanner/uscanner.c b/sys/dev/usbmisc/uscanner/uscanner.c index 54d33cfdb0..6b43244f69 100644 --- a/sys/dev/usbmisc/uscanner/uscanner.c +++ b/sys/dev/usbmisc/uscanner/uscanner.c @@ -1,7 +1,7 @@ /* * $NetBSD: uscanner.c,v 1.30 2002/07/11 21:14:36 augustss Exp $ * $FreeBSD: src/sys/dev/usb/uscanner.c,v 1.48 2003/12/22 19:58:27 sanpei Exp $ - * $DragonFly: src/sys/dev/usbmisc/uscanner/uscanner.c,v 1.13 2006/09/05 00:55:44 dillon Exp $ + * $DragonFly: src/sys/dev/usbmisc/uscanner/uscanner.c,v 1.14 2006/09/10 01:26:37 dillon Exp $ */ /* Also already merged from NetBSD: @@ -375,7 +375,7 @@ USB_ATTACH(uscanner) int uscanneropen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uscanner_softc *sc; int unit = USCANNERUNIT(dev); usbd_status err; @@ -439,7 +439,7 @@ uscanneropen(struct dev_open_args *ap) int uscannerclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uscanner_softc *sc; USB_GET_SC(uscanner, USCANNERUNIT(dev), sc); @@ -538,7 +538,7 @@ uscanner_do_read(struct uscanner_softc *sc, struct uio *uio, int flag) int uscannerread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uscanner_softc *sc; int error; @@ -589,7 +589,7 @@ uscanner_do_write(struct uscanner_softc *sc, struct uio *uio, int flag) int uscannerwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uscanner_softc *sc; int error; @@ -672,7 +672,7 @@ USB_DETACH(uscanner) int uscannerpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uscanner_softc *sc; int revents = 0; diff --git a/sys/dev/video/bktr/bktr_core.c b/sys/dev/video/bktr/bktr_core.c index 592af257a5..7bf1ab9ce0 100644 --- a/sys/dev/video/bktr/bktr_core.c +++ b/sys/dev/video/bktr/bktr_core.c @@ -62,7 +62,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.138 2005/01/09 17:42:03 cognet Exp - * $DragonFly: src/sys/dev/video/bktr/bktr_core.c,v 1.17 2006/09/03 18:29:16 dillon Exp $ + * $DragonFly: src/sys/dev/video/bktr/bktr_core.c,v 1.18 2006/09/10 01:26:37 dillon Exp $ */ /* @@ -1085,7 +1085,7 @@ vbi_close( bktr_ptr_t bktr ) * */ int -video_read(bktr_ptr_t bktr, int unit, dev_t dev, struct uio *uio) +video_read(bktr_ptr_t bktr, int unit, cdev_t dev, struct uio *uio) { int status; int count; diff --git a/sys/dev/video/bktr/bktr_core.h b/sys/dev/video/bktr/bktr_core.h index 04fc1bf1c7..8aeb62c42f 100644 --- a/sys/dev/video/bktr/bktr_core.h +++ b/sys/dev/video/bktr/bktr_core.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/dev/bktr/bktr_core.h,v 1.5 2001/09/12 08:37:02 julian Exp $ */ -/* $DragonFly: src/sys/dev/video/bktr/bktr_core.h,v 1.4 2004/05/15 17:54:12 joerg Exp $ */ +/* $DragonFly: src/sys/dev/video/bktr/bktr_core.h,v 1.5 2006/09/10 01:26:37 dillon Exp $ */ /* * This is part of the Driver for Video Capture Cards (Frame grabbers) @@ -81,7 +81,7 @@ int common_bktr_intr( void *arg ); /* Prototypes for open, close, read, mmap and ioctl calls */ int video_open( bktr_ptr_t bktr ); int video_close( bktr_ptr_t bktr ); -int video_read( bktr_ptr_t bktr, int unit, dev_t dev, struct uio *uio ); +int video_read( bktr_ptr_t bktr, int unit, cdev_t dev, struct uio *uio ); int video_ioctl( bktr_ptr_t bktr, int unit, ioctl_cmd_t cmd, caddr_t arg, struct thread* pr ); diff --git a/sys/dev/video/bktr/bktr_os.c b/sys/dev/video/bktr/bktr_os.c index df68ac12ba..2036209f4e 100644 --- a/sys/dev/video/bktr/bktr_os.c +++ b/sys/dev/video/bktr/bktr_os.c @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.45 2004/03/17 17:50:28 njl Exp $ - * $DragonFly: src/sys/dev/video/bktr/bktr_os.c,v 1.14 2006/07/28 02:17:39 dillon Exp $ + * $DragonFly: src/sys/dev/video/bktr/bktr_os.c,v 1.15 2006/09/10 01:26:37 dillon Exp $ */ /* @@ -476,7 +476,7 @@ get_bktr_mem( int unit, unsigned size ) static int bktr_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; bktr_ptr_t bktr; int unit; int result; @@ -577,7 +577,7 @@ bktr_open(struct dev_open_args *ap) static int bktr_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; bktr_ptr_t bktr; int unit; int result; @@ -617,7 +617,7 @@ bktr_close(struct dev_close_args *ap) static int bktr_read(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; bktr_ptr_t bktr; int unit; @@ -656,7 +656,7 @@ bktr_write(struct dev_write_args *ap) static int bktr_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; bktr_ptr_t bktr; int unit; @@ -689,7 +689,7 @@ bktr_ioctl(struct dev_ioctl_args *ap) static int bktr_mmap(struct dev_mmap_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit; bktr_ptr_t bktr; @@ -721,7 +721,7 @@ bktr_mmap(struct dev_mmap_args *ap) static int bktr_poll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit; bktr_ptr_t bktr; int revents = 0; diff --git a/sys/dev/video/ctx/ctx.c b/sys/dev/video/ctx/ctx.c index 238ce21a4d..61402dbdc5 100644 --- a/sys/dev/video/ctx/ctx.c +++ b/sys/dev/video/ctx/ctx.c @@ -9,7 +9,7 @@ * for damages incurred with its use. * * $FreeBSD: src/sys/i386/isa/ctx.c,v 1.36 2000/01/29 16:17:31 peter Exp $ - * $DragonFly: src/sys/dev/video/ctx/ctx.c,v 1.10 2006/09/05 00:55:44 dillon Exp $ + * $DragonFly: src/sys/dev/video/ctx/ctx.c,v 1.11 2006/09/10 01:26:37 dillon Exp $ */ /* @@ -202,7 +202,7 @@ ctxattach(struct isa_device * devp) static int ctxopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ctx_soft_registers *sr; u_char unit; int i; @@ -258,7 +258,7 @@ ctxopen(struct dev_open_args *ap) static int ctxclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit; unit = UNIT(minor(dev)); @@ -271,7 +271,7 @@ ctxclose(struct dev_close_args *ap) static int ctxwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; int unit, status = 0; int page, count, offset; @@ -325,7 +325,7 @@ ctxwrite(struct dev_write_args *ap) static int ctxread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; int unit, status = 0; int page, count, offset; @@ -377,7 +377,7 @@ ctxread(struct dev_read_args *ap) static int ctxioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error; int unit, i; struct ctx_soft_registers *sr; diff --git a/sys/dev/video/fb/fb.c b/sys/dev/video/fb/fb.c index 8c94b8d6c3..2ed9c3b3d9 100644 --- a/sys/dev/video/fb/fb.c +++ b/sys/dev/video/fb/fb.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/fb/fb.c,v 1.11.2.2 2000/08/02 22:35:22 peter Exp $ - * $DragonFly: src/sys/dev/video/fb/fb.c,v 1.15 2006/09/05 00:55:44 dillon Exp $ + * $DragonFly: src/sys/dev/video/fb/fb.c,v 1.16 2006/09/10 01:26:37 dillon Exp $ */ #include "opt_fb.h" @@ -66,8 +66,8 @@ static video_switch_t *vidsw_ini; video_switch_t **vidsw = &vidsw_ini; #ifdef FB_INSTALL_CDEV -static dev_t vidcdevsw_ini; -static dev_t *vidcdevsw = &vidcdevsw_ini; +static cdev_t vidcdevsw_ini; +static cdev_t *vidcdevsw = &vidcdevsw_ini; #endif #define ARRAY_DELTA 4 @@ -78,7 +78,7 @@ vid_realloc_array(void) video_adapter_t **new_adp; video_switch_t **new_vidsw; #ifdef FB_INSTALL_CDEV - dev_t *new_cdevsw; + cdev_t *new_cdevsw; #endif int newsize; @@ -379,7 +379,7 @@ PSEUDO_SET(vfbattach, fb); * Note: dev represents the actual video device, not the frame buffer */ int -fb_attach(dev_t dev, video_adapter_t *adp) +fb_attach(cdev_t dev, video_adapter_t *adp) { if (adp->va_index >= adapters) return EINVAL; @@ -400,7 +400,7 @@ fb_attach(dev_t dev, video_adapter_t *adp) * Note: dev represents the actual video device, not the frame buffer */ int -fb_detach(dev_t dev, video_adapter_t *adp) +fb_detach(cdev_t dev, video_adapter_t *adp) { if (adp->va_index >= adapters) return EINVAL; @@ -419,9 +419,9 @@ fb_detach(dev_t dev, video_adapter_t *adp) static int fbopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit; - dev_t fdev; + cdev_t fdev; unit = FB_UNIT(dev); if (unit < 0 || unit >= adapters) @@ -434,9 +434,9 @@ fbopen(struct dev_open_args *ap) static int fboperate(struct dev_generic_args *ap) { - dev_t dev = ap->a_dev; + cdev_t dev = ap->a_dev; int unit; - dev_t fdev; + cdev_t fdev; unit = FB_UNIT(dev); if ((fdev = vidcdevsw[unit]) == NULL) diff --git a/sys/dev/video/fb/fbreg.h b/sys/dev/video/fb/fbreg.h index f76cb1b9bb..d9b5f72f2b 100644 --- a/sys/dev/video/fb/fbreg.h +++ b/sys/dev/video/fb/fbreg.h @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/fb/fbreg.h,v 1.6 1999/12/29 04:35:36 peter Exp $ - * $DragonFly: src/sys/dev/video/fb/fbreg.h,v 1.7 2006/07/28 02:17:39 dillon Exp $ + * $DragonFly: src/sys/dev/video/fb/fbreg.h,v 1.8 2006/09/10 01:26:37 dillon Exp $ */ #ifndef _DEV_FB_FBREG_H_ @@ -170,8 +170,8 @@ int vid_configure(int flags); #ifdef FB_INSTALL_CDEV /* virtual frame buffer driver functions */ -int fb_attach(dev_t dev, video_adapter_t *adp); -int fb_detach(dev_t dev, video_adapter_t *adp); +int fb_attach(cdev_t dev, video_adapter_t *adp); +int fb_detach(cdev_t dev, video_adapter_t *adp); /* generic frame buffer cdev driver functions */ diff --git a/sys/dev/video/fb/vga.c b/sys/dev/video/fb/vga.c index f2b8cd19ed..e40fd369f3 100644 --- a/sys/dev/video/fb/vga.c +++ b/sys/dev/video/fb/vga.c @@ -27,7 +27,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/fb/vga.c,v 1.9.2.1 2001/08/11 02:58:44 yokota Exp $ - * $DragonFly: src/sys/dev/video/fb/vga.c,v 1.17 2006/09/05 00:55:44 dillon Exp $ + * $DragonFly: src/sys/dev/video/fb/vga.c,v 1.18 2006/09/10 01:26:37 dillon Exp $ */ #include "opt_vga.h" @@ -99,7 +99,7 @@ vga_attach_unit(int unit, vga_softc_t *sc, int flags) struct ucred; int -vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode, struct ucred *cred) +vga_open(cdev_t dev, vga_softc_t *sc, int flag, int mode, struct ucred *cred) { if (sc == NULL) return ENXIO; @@ -110,32 +110,32 @@ vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode, struct ucred *cred) } int -vga_close(dev_t dev, vga_softc_t *sc, int flag, int mode) +vga_close(cdev_t dev, vga_softc_t *sc, int flag, int mode) { return genfbclose(&sc->gensc, sc->adp, flag, mode); } int -vga_read(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag) +vga_read(cdev_t dev, vga_softc_t *sc, struct uio *uio, int flag) { return genfbread(&sc->gensc, sc->adp, uio, flag); } int -vga_write(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag) +vga_write(cdev_t dev, vga_softc_t *sc, struct uio *uio, int flag) { return genfbread(&sc->gensc, sc->adp, uio, flag); } int -vga_ioctl(dev_t dev, vga_softc_t *sc, u_long cmd, caddr_t arg, int flag, +vga_ioctl(cdev_t dev, vga_softc_t *sc, u_long cmd, caddr_t arg, int flag, struct ucred *cred) { return genfbioctl(&sc->gensc, sc->adp, cmd, arg, flag, cred); } int -vga_mmap(dev_t dev, vga_softc_t *sc, vm_offset_t offset, int prot) +vga_mmap(cdev_t dev, vga_softc_t *sc, vm_offset_t offset, int prot) { return genfbmmap(&sc->gensc, sc->adp, offset, prot); } diff --git a/sys/dev/video/fb/vgareg.h b/sys/dev/video/fb/vgareg.h index 780ff45738..17d3895a31 100644 --- a/sys/dev/video/fb/vgareg.h +++ b/sys/dev/video/fb/vgareg.h @@ -24,7 +24,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/dev/fb/vgareg.h,v 1.4 1999/12/29 04:35:37 peter Exp $ - * $DragonFly: src/sys/dev/video/fb/vgareg.h,v 1.7 2006/07/28 02:17:39 dillon Exp $ + * $DragonFly: src/sys/dev/video/fb/vgareg.h,v 1.8 2006/09/10 01:26:37 dillon Exp $ */ #ifndef _DEV_FB_VGAREG_H_ @@ -73,7 +73,7 @@ typedef struct vga_softc { void *state_buf; #ifdef FB_INSTALL_CDEV genfb_softc_t gensc; - dev_t devt; + cdev_t devt; #endif } vga_softc_t; @@ -81,14 +81,14 @@ int vga_probe_unit(int unit, struct video_adapter *adp, int flags); int vga_attach_unit(int unit, vga_softc_t *sc, int flags); #ifdef FB_INSTALL_CDEV -int vga_open(dev_t dev, vga_softc_t *sc, int flag, int mode, +int vga_open(cdev_t dev, vga_softc_t *sc, int flag, int mode, struct ucred *cred); -int vga_close(dev_t dev, vga_softc_t *sc, int flag, int mode); -int vga_read(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag); -int vga_write(dev_t dev, vga_softc_t *sc, struct uio *uio, int flag); -int vga_ioctl(dev_t dev, vga_softc_t *sc, u_long cmd, caddr_t arg, +int vga_close(cdev_t dev, vga_softc_t *sc, int flag, int mode); +int vga_read(cdev_t dev, vga_softc_t *sc, struct uio *uio, int flag); +int vga_write(cdev_t dev, vga_softc_t *sc, struct uio *uio, int flag); +int vga_ioctl(cdev_t dev, vga_softc_t *sc, u_long cmd, caddr_t arg, int flag, struct ucred *cred); -int vga_mmap(dev_t dev, vga_softc_t *sc, vm_offset_t offset, +int vga_mmap(cdev_t dev, vga_softc_t *sc, vm_offset_t offset, int prot); #endif diff --git a/sys/dev/video/gsc/gsc.c b/sys/dev/video/gsc/gsc.c index 60bf673c0a..d029d5d7c0 100644 --- a/sys/dev/video/gsc/gsc.c +++ b/sys/dev/video/gsc/gsc.c @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/gsc.c,v 1.35.2.1 2000/08/08 19:49:53 peter Exp $ - * $DragonFly: src/sys/dev/video/gsc/gsc.c,v 1.12 2006/07/28 02:17:39 dillon Exp $ + * $DragonFly: src/sys/dev/video/gsc/gsc.c,v 1.13 2006/09/10 01:26:38 dillon Exp $ * */ @@ -542,7 +542,7 @@ gscattach(struct isa_device *isdp) static int gscopen (struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct gsc_unit *scu; int unit; @@ -610,7 +610,7 @@ gscopen (struct dev_open_args *ap) static int gscclose (struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = UNIT(minor(dev)); struct gsc_unit *scu = unittab + unit; @@ -644,7 +644,7 @@ gscclose (struct dev_close_args *ap) static int gscread (struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; int unit = UNIT(minor(dev)); struct gsc_unit *scu = unittab + unit; @@ -736,7 +736,7 @@ gscread (struct dev_read_args *ap) static int gscioctl (struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; int unit = UNIT(minor(dev)); struct gsc_unit *scu = unittab + unit; diff --git a/sys/dev/video/meteor/meteor.c b/sys/dev/video/meteor/meteor.c index 647f3aaa2c..4e250bb251 100644 --- a/sys/dev/video/meteor/meteor.c +++ b/sys/dev/video/meteor/meteor.c @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/pci/meteor.c,v 1.49 1999/09/25 18:24:41 phk Exp $ - * $DragonFly: src/sys/dev/video/meteor/meteor.c,v 1.18 2006/09/03 18:29:16 dillon Exp $ + * $DragonFly: src/sys/dev/video/meteor/meteor.c,v 1.19 2006/09/10 01:26:38 dillon Exp $ */ /* Change History: @@ -1113,7 +1113,7 @@ met_attach(pcici_t tag, int unit) #ifdef unused static int -meteor_reset(dev_t dev) +meteor_reset(cdev_t dev) { int unit = UNIT(minor(dev)); struct saa7116_regs *m; @@ -1147,7 +1147,7 @@ struct saa7116_regs *m; int meteor_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; meteor_reg_t *mtr; int unit; int i; @@ -1192,7 +1192,7 @@ meteor_open(struct dev_open_args *ap) int meteor_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; meteor_reg_t *mtr; int unit; #ifdef METEOR_DEALLOC_ABOVE @@ -1273,7 +1273,7 @@ mreg_t *cap = &mtr->base->cap_cntl; int meteor_read(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; meteor_reg_t *mtr; int unit; @@ -1318,7 +1318,7 @@ meteor_write(struct dev_write_args *ap) int meteor_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; int error; int unit; @@ -2096,7 +2096,7 @@ meteor_ioctl(struct dev_ioctl_args *ap) int meteor_mmap(struct dev_mmap_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit; meteor_reg_t *mtr; diff --git a/sys/emulation/linux/linux_stats.c b/sys/emulation/linux/linux_stats.c index c1d2ee8195..6d0f9d6e03 100644 --- a/sys/emulation/linux/linux_stats.c +++ b/sys/emulation/linux/linux_stats.c @@ -26,7 +26,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/compat/linux/linux_stats.c,v 1.22.2.3 2001/11/05 19:08:23 marcel Exp $ - * $DragonFly: src/sys/emulation/linux/linux_stats.c,v 1.22 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/emulation/linux/linux_stats.c,v 1.23 2006/09/10 01:26:38 dillon Exp $ */ #include @@ -55,7 +55,7 @@ static int newstat_copyout(struct stat *buf, void *ubuf) { struct l_newstat tbuf; - dev_t dev; + cdev_t dev; int error; tbuf.st_dev = uminor(buf->st_dev) | (umajor(buf->st_dev) << 8); @@ -296,7 +296,7 @@ int sys_linux_ustat(struct linux_ustat_args *args) { struct l_ustat lu; - dev_t dev; + cdev_t dev; struct vnode *vp; struct statfs *stat; int error; @@ -314,9 +314,9 @@ sys_linux_ustat(struct linux_ustat_args *args) /* * XXX - Don't return an error if we can't find a vnode for the - * device. Our dev_t is 32-bits whereas Linux only has a 16-bits - * dev_t. The dev_t that is used now may as well be a truncated - * dev_t returned from previous syscalls. Just return a bzeroed + * device. Our cdev_t is 32-bits whereas Linux only has a 16-bits + * cdev_t. The dev_t that is used now may as well be a truncated + * cdev_t returned from previous syscalls. Just return a bzeroed * ustat in that case. */ dev = udev2dev(makeudev(args->dev >> 8, args->dev & 0xFF), 0); diff --git a/sys/i386/apm/apm.c b/sys/i386/apm/apm.c index 9d3139862f..0647598742 100644 --- a/sys/i386/apm/apm.c +++ b/sys/i386/apm/apm.c @@ -16,7 +16,7 @@ * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * * $FreeBSD: src/sys/i386/apm/apm.c,v 1.114.2.5 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/i386/apm/Attic/apm.c,v 1.16 2006/09/03 17:43:59 dillon Exp $ + * $DragonFly: src/sys/i386/apm/Attic/apm.c,v 1.17 2006/09/10 01:26:38 dillon Exp $ */ #include @@ -1099,7 +1099,7 @@ apm_attach(device_t dev) static int apmopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct apm_softc *sc = &apm_softc; int ctl = APMDEV(dev); @@ -1128,7 +1128,7 @@ apmopen(struct dev_open_args *ap) static int apmclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct apm_softc *sc = &apm_softc; int ctl = APMDEV(dev); @@ -1152,7 +1152,7 @@ apmclose(struct dev_close_args *ap) static int apmioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct apm_softc *sc = &apm_softc; struct apm_bios_arg *args; int error = 0; @@ -1308,7 +1308,7 @@ apmioctl(struct dev_ioctl_args *ap) static int apmwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct apm_softc *sc = &apm_softc; u_int event_type; diff --git a/sys/i386/gnu/isa/dgb.c b/sys/i386/gnu/isa/dgb.c index 3bd7cac906..4495d29531 100644 --- a/sys/i386/gnu/isa/dgb.c +++ b/sys/i386/gnu/isa/dgb.c @@ -1,6 +1,6 @@ /*- * dgb.c $FreeBSD: src/sys/gnu/i386/isa/dgb.c,v 1.56.2.1 2001/02/26 04:23:09 jlemon Exp $ - * dgb.c $DragonFly: src/sys/i386/gnu/isa/Attic/dgb.c,v 1.17 2006/05/11 08:23:20 swildner Exp $ + * dgb.c $DragonFly: src/sys/i386/gnu/isa/Attic/dgb.c,v 1.18 2006/09/10 01:26:38 dillon Exp $ * * Digiboard driver. * @@ -936,7 +936,7 @@ load_fep: /* ARGSUSED */ static int -dgbopen(dev_t dev, int flag, int mode, struct thread *td) +dgbopen(cdev_t dev, int flag, int mode, struct thread *td) { struct dgb_softc *sc; struct tty *tp; @@ -1110,7 +1110,7 @@ out: /*ARGSUSED*/ static int -dgbclose(dev_t dev, int flag, int mode, struct thread *td) +dgbclose(cdev_t dev, int flag, int mode, struct thread *td) { struct tty *tp; int unit, pnum; @@ -1463,7 +1463,7 @@ dgbpoll(unit_c) } static int -dgbioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +dgbioctl(cdev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct dgb_softc *sc; int unit, pnum; diff --git a/sys/i386/i386/autoconf.c b/sys/i386/i386/autoconf.c index 25a91eaa86..6cc9b4b707 100644 --- a/sys/i386/i386/autoconf.c +++ b/sys/i386/i386/autoconf.c @@ -35,7 +35,7 @@ * * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/i386/autoconf.c,v 1.146.2.2 2001/06/07 06:05:58 dd Exp $ - * $DragonFly: src/sys/i386/i386/Attic/autoconf.c,v 1.26 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/autoconf.c,v 1.27 2006/09/10 01:26:38 dillon Exp $ */ /* @@ -109,8 +109,8 @@ SYSINIT(configure2, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL); /* SI_ORDER_MIDDLE is hookable */ SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL); -dev_t rootdev = NOCDEV; -dev_t dumpdev = NOCDEV; +cdev_t rootdev = NOCDEV; +cdev_t dumpdev = NOCDEV; /* * Determine i/o configuration for a machine. @@ -232,7 +232,7 @@ cpu_rootconf() } SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, cpu_rootconf, NULL) -u_long bootdev = 0; /* not a dev_t - encoding is different */ +u_long bootdev = 0; /* not a cdev_t - encoding is different */ #if defined(FFS) && defined(FFS_ROOT) #define FDMAJOR 2 @@ -270,7 +270,7 @@ static void setroot() { int majdev, mindev, unit, slice, part; - dev_t newrootdev, dev; + cdev_t newrootdev, dev; char partname[2]; char *sname; diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 4192cb5eaa..b4546e0881 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -36,7 +36,7 @@ * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.385.2.30 2003/05/31 08:48:05 alc Exp $ - * $DragonFly: src/sys/i386/i386/Attic/machdep.c,v 1.95 2006/09/03 17:43:59 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/machdep.c,v 1.96 2006/09/10 01:26:39 dillon Exp $ */ #include "use_apm.h" @@ -1002,9 +1002,9 @@ SYSCTL_STRUCT(_machdep, CPU_BOOTINFO, bootinfo, SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, CTLFLAG_RW, &wall_cmos_clock, 0, ""); -extern u_long bootdev; /* not a dev_t - encoding is different */ +extern u_long bootdev; /* not a cdev_t - encoding is different */ SYSCTL_ULONG(_machdep, OID_AUTO, guessed_bootdev, - CTLFLAG_RD, &bootdev, 0, "Boot device (not in dev_t format)"); + CTLFLAG_RD, &bootdev, 0, "Boot device (not in cdev_t format)"); /* * Initialize 386 and configure to run kernel @@ -2522,7 +2522,7 @@ Debugger(const char *msg) * block number, and returned. */ struct bio * -bounds_check_with_label(dev_t dev, struct bio *bio, +bounds_check_with_label(cdev_t dev, struct bio *bio, struct disklabel *lp, int wlabel) { struct bio *nbio; diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index 9f72844437..357e624493 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -39,7 +39,7 @@ * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/i386/mem.c,v 1.79.2.9 2003/01/04 22:58:01 njl Exp $ - * $DragonFly: src/sys/i386/i386/Attic/mem.c,v 1.19 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/i386/i386/Attic/mem.c,v 1.20 2006/09/10 01:26:39 dillon Exp $ */ /* @@ -96,8 +96,8 @@ static int rand_bolt; static caddr_t zbuf; MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); -static int mem_ioctl (dev_t, u_long, caddr_t, int, struct ucred *); -static int random_ioctl (dev_t, u_long, caddr_t, int, struct ucred *); +static int mem_ioctl (cdev_t, u_long, caddr_t, int, struct ucred *); +static int random_ioctl (cdev_t, u_long, caddr_t, int, struct ucred *); struct mem_range_softc mem_range_softc; @@ -105,7 +105,7 @@ struct mem_range_softc mem_range_softc; static int mmopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error; switch (minor(dev)) { @@ -131,7 +131,7 @@ mmopen(struct dev_open_args *ap) static int mmclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; switch (minor(dev)) { case 14: @@ -145,7 +145,7 @@ mmclose(struct dev_close_args *ap) static int -mmrw(dev_t dev, struct uio *uio, int flags) +mmrw(cdev_t dev, struct uio *uio, int flags) { int o; u_int c, v; @@ -323,7 +323,7 @@ mmwrite(struct dev_write_args *ap) static int memmmap(struct dev_mmap_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; switch (minor(dev)) { case 0: @@ -347,7 +347,7 @@ memmmap(struct dev_mmap_args *ap) static int mmioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; switch (minor(dev)) { case 0: @@ -368,7 +368,7 @@ mmioctl(struct dev_ioctl_args *ap) * and mem_range_attr_set. */ static int -mem_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) +mem_ioctl(cdev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) { int nd, error = 0; struct mem_range_op *mo = (struct mem_range_op *)data; @@ -462,7 +462,7 @@ mem_range_AP_init(void) #endif static int -random_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) +random_ioctl(cdev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) { int error; int intr; @@ -517,7 +517,7 @@ random_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) int mmpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int revents; switch (minor(dev)) { @@ -535,7 +535,7 @@ mmpoll(struct dev_poll_args *ap) int iszerodev(dev) - dev_t dev; + cdev_t dev; { return ((major(dev) == mem_ops.head.maj) && minor(dev) == 12); diff --git a/sys/i386/include/cpu.h b/sys/i386/include/cpu.h index 6b1aa2981c..5ef95fc19f 100644 --- a/sys/i386/include/cpu.h +++ b/sys/i386/include/cpu.h @@ -35,7 +35,7 @@ * * from: @(#)cpu.h 5.4 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/include/cpu.h,v 1.43.2.2 2001/06/15 09:37:57 scottl Exp $ - * $DragonFly: src/sys/i386/include/Attic/cpu.h,v 1.16 2006/05/20 02:42:06 dillon Exp $ + * $DragonFly: src/sys/i386/include/Attic/cpu.h,v 1.17 2006/09/10 01:26:39 dillon Exp $ */ #ifndef _MACHINE_CPU_H_ @@ -104,7 +104,7 @@ /* * CTL_MACHDEP definitions. */ -#define CPU_CONSDEV 1 /* dev_t: console terminal device */ +#define CPU_CONSDEV 1 /* cdev_t: console terminal device */ #define CPU_ADJKERNTZ 2 /* int: timezone offset (seconds) */ #define CPU_DISRTCSET 3 /* int: disable resettodr() call */ #define CPU_BOOTINFO 4 /* struct: bootinfo */ diff --git a/sys/i386/isa/asc.c b/sys/i386/isa/asc.c index 849adb0bdc..4cb100472d 100644 --- a/sys/i386/isa/asc.c +++ b/sys/i386/isa/asc.c @@ -35,7 +35,7 @@ */ /* * $FreeBSD: src/sys/i386/isa/asc.c,v 1.42.2.2 2001/03/01 03:22:39 jlemon Exp $ - * $DragonFly: src/sys/i386/isa/Attic/asc.c,v 1.14 2006/07/28 02:17:39 dillon Exp $ + * $DragonFly: src/sys/i386/isa/Attic/asc.c,v 1.15 2006/09/10 01:26:39 dillon Exp $ */ #include "use_asc.h" @@ -535,7 +535,7 @@ ascintr(void *arg) STATIC int ascopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct asc_unit *scu; int unit; @@ -631,7 +631,7 @@ asc_startread(struct asc_unit *scu) STATIC int ascclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = UNIT(minor(dev)); struct asc_unit *scu = unittab + unit; @@ -690,7 +690,7 @@ pbm_init(struct asc_unit *scu) STATIC int ascread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; int unit = UNIT(minor(dev)); struct asc_unit *scu = unittab + unit; @@ -781,7 +781,7 @@ ascread(struct dev_read_args *ap) STATIC int ascioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; int unit = UNIT(minor(dev)); struct asc_unit *scu = unittab + unit; @@ -848,7 +848,7 @@ ascioctl(struct dev_ioctl_args *ap) STATIC int ascpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = UNIT(minor(dev)); struct asc_unit *scu = unittab + unit; struct proc *p1; diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 0f9fed0356..f20dfc06e5 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_conf.c,v 1.73.2.3 2003/03/10 02:18:25 imp Exp $ - * $DragonFly: src/sys/kern/kern_conf.c,v 1.14 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/kern/kern_conf.c,v 1.15 2006/09/10 01:26:39 dillon Exp $ */ #include @@ -48,7 +48,7 @@ #define cdevsw_ALLOCSTART (NUMCDEVSW/2) -MALLOC_DEFINE(M_DEVT, "dev_t", "dev_t storage"); +MALLOC_DEFINE(M_DEVT, "cdev_t", "dev_t storage"); /* * This is the number of hash-buckets. Experiements with 'real-life' @@ -57,7 +57,7 @@ MALLOC_DEFINE(M_DEVT, "dev_t", "dev_t storage"); */ #define DEVT_HASH 83 -/* The number of dev_t's we can create before malloc(9) kick in. */ +/* The number of cdev_t's we can create before malloc(9) kick in. */ #define DEVT_STASH 50 static struct cdev devt_stash[DEVT_STASH]; @@ -70,12 +70,12 @@ int dev_ref_debug = 0; SYSCTL_INT(_debug, OID_AUTO, dev_refs, CTLFLAG_RW, &dev_ref_debug, 0, ""); /* - * dev_t and u_dev_t primitives. Note that the major number is always + * cdev_t and u_dev_t primitives. Note that the major number is always * extracted from si_udev, not from si_devsw, because si_devsw is replaced * when a device is destroyed. */ int -major(dev_t x) +major(cdev_t x) { if (x == NOCDEV) return NOUDEV; @@ -83,7 +83,7 @@ major(dev_t x) } int -minor(dev_t x) +minor(cdev_t x) { if (x == NOCDEV) return NOUDEV; @@ -91,7 +91,7 @@ minor(dev_t x) } int -lminor(dev_t x) +lminor(cdev_t x) { int i; @@ -113,7 +113,7 @@ lminor(dev_t x) * the caller wishes to track additional references. */ static -dev_t +cdev_t hashdev(struct dev_ops *ops, int x, int y) { struct cdev *si; @@ -158,7 +158,7 @@ hashdev(struct dev_ops *ops, int x, int y) * Convert a device pointer to a device number */ udev_t -dev2udev(dev_t x) +dev2udev(cdev_t x) { if (x == NOCDEV) return NOUDEV; @@ -174,10 +174,10 @@ dev2udev(dev_t x) * for the requested major number. NOCDEV is returned if the major number * has not been registered. */ -dev_t +cdev_t udev2dev(udev_t x, int b) { - dev_t dev; + cdev_t dev; struct dev_ops *ops; if (x == NOUDEV || b != 0) @@ -190,7 +190,7 @@ udev2dev(udev_t x, int b) } int -dev_is_good(dev_t dev) +dev_is_good(cdev_t dev) { if (dev != NOCDEV && dev->si_ops != &dead_dev_ops) return(1); @@ -233,11 +233,11 @@ makeudev(int x, int y) * If an entry already exists, this function will set (or override) * its cred requirements and name (XXX DEVFS interface). */ -dev_t +cdev_t make_dev(struct dev_ops *ops, int minor, uid_t uid, gid_t gid, int perms, const char *fmt, ...) { - dev_t dev; + cdev_t dev; __va_list ap; int i; @@ -262,10 +262,10 @@ make_dev(struct dev_ops *ops, int minor, uid_t uid, gid_t gid, * This function is similar to make_dev() but no cred information or name * need be specified. */ -dev_t +cdev_t make_adhoc_dev(struct dev_ops *ops, int minor) { - dev_t dev; + cdev_t dev; dev = hashdev(ops, ops->head.maj, minor); return(dev); @@ -275,10 +275,10 @@ make_adhoc_dev(struct dev_ops *ops, int minor) * This function is similar to make_dev() except the new device is created * using an old device as a template. */ -dev_t -make_sub_dev(dev_t odev, int minor) +cdev_t +make_sub_dev(cdev_t odev, int minor) { - dev_t dev; + cdev_t dev; dev = hashdev(odev->si_ops, umajor(odev->si_udev), minor); @@ -302,7 +302,7 @@ make_sub_dev(dev_t odev, int minor) * a device must have its own reference to it first. */ void -destroy_dev(dev_t dev) +destroy_dev(cdev_t dev) { int hash; @@ -362,8 +362,8 @@ void destroy_all_devs(struct dev_ops *ops, u_int mask, u_int match) { int i; - dev_t dev; - dev_t ndev; + cdev_t dev; + cdev_t ndev; mask = uminor(mask); for (i = 0; i < DEVT_HASH; ++i) { @@ -390,8 +390,8 @@ destroy_all_devs(struct dev_ops *ops, u_int mask, u_int match) * obtain a reference on the device. The ad-hoc reference you get with * make_dev() and friends is NOT sufficient to be able to call destroy_dev(). */ -dev_t -reference_dev(dev_t dev) +cdev_t +reference_dev(cdev_t dev) { if (dev != NOCDEV) { ++dev->si_refs; @@ -412,7 +412,7 @@ reference_dev(dev_t dev) * because si_ops could already be pointing at dead_dev_ops. */ void -release_dev(dev_t dev) +release_dev(cdev_t dev) { if (dev == NOCDEV) return; @@ -468,7 +468,7 @@ release_dev(dev_t dev) } const char * -devtoname(dev_t dev) +devtoname(cdev_t dev) { int mynor; int len; diff --git a/sys/kern/kern_device.c b/sys/kern/kern_device.c index 53b287e9b1..f8b00769ac 100644 --- a/sys/kern/kern_device.c +++ b/sys/kern/kern_device.c @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/kern/kern_device.c,v 1.19 2006/09/05 00:55:45 dillon Exp $ + * $DragonFly: src/sys/kern/kern_device.c,v 1.20 2006/09/10 01:26:39 dillon Exp $ */ #include #include @@ -104,7 +104,7 @@ static struct dev_ops_link *dev_ops_array[NUMCDEVSW]; ************************************************************************/ int -dev_dopen(dev_t dev, int oflags, int devtype, struct ucred *cred) +dev_dopen(cdev_t dev, int oflags, int devtype, struct ucred *cred) { struct dev_open_args ap; @@ -117,7 +117,7 @@ dev_dopen(dev_t dev, int oflags, int devtype, struct ucred *cred) } int -dev_dclose(dev_t dev, int fflag, int devtype) +dev_dclose(cdev_t dev, int fflag, int devtype) { struct dev_close_args ap; @@ -129,7 +129,7 @@ dev_dclose(dev_t dev, int fflag, int devtype) } int -dev_dread(dev_t dev, struct uio *uio, int ioflag) +dev_dread(cdev_t dev, struct uio *uio, int ioflag) { struct dev_read_args ap; int error; @@ -145,7 +145,7 @@ dev_dread(dev_t dev, struct uio *uio, int ioflag) } int -dev_dwrite(dev_t dev, struct uio *uio, int ioflag) +dev_dwrite(cdev_t dev, struct uio *uio, int ioflag) { struct dev_write_args ap; int error; @@ -160,7 +160,7 @@ dev_dwrite(dev_t dev, struct uio *uio, int ioflag) } int -dev_dioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct ucred *cred) +dev_dioctl(cdev_t dev, u_long cmd, caddr_t data, int fflag, struct ucred *cred) { struct dev_ioctl_args ap; @@ -174,7 +174,7 @@ dev_dioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, struct ucred *cred) } int -dev_dpoll(dev_t dev, int events) +dev_dpoll(cdev_t dev, int events) { struct dev_poll_args ap; int error; @@ -189,7 +189,7 @@ dev_dpoll(dev_t dev, int events) } int -dev_dmmap(dev_t dev, vm_offset_t offset, int nprot) +dev_dmmap(cdev_t dev, vm_offset_t offset, int nprot) { struct dev_mmap_args ap; int error; @@ -205,7 +205,7 @@ dev_dmmap(dev_t dev, vm_offset_t offset, int nprot) } int -dev_dclone(dev_t dev) +dev_dclone(cdev_t dev) { struct dev_clone_args ap; @@ -222,7 +222,7 @@ dev_dclone(dev_t dev) * from vn_strategy. XXX this will ultimately have to change. */ void -dev_dstrategy(dev_t dev, struct bio *bio) +dev_dstrategy(cdev_t dev, struct bio *bio) { struct dev_strategy_args ap; struct bio_track *track; @@ -243,7 +243,7 @@ dev_dstrategy(dev_t dev, struct bio *bio) } void -dev_dstrategy_chain(dev_t dev, struct bio *bio) +dev_dstrategy_chain(cdev_t dev, struct bio *bio) { struct dev_strategy_args ap; @@ -259,7 +259,7 @@ dev_dstrategy_chain(dev_t dev, struct bio *bio) * forwarding the message. */ int -dev_ddump(dev_t dev) +dev_ddump(cdev_t dev) { struct dev_dump_args ap; @@ -272,7 +272,7 @@ dev_ddump(dev_t dev) } int -dev_dpsize(dev_t dev) +dev_dpsize(cdev_t dev) { struct dev_psize_args ap; int error; @@ -286,7 +286,7 @@ dev_dpsize(dev_t dev) } int -dev_dkqfilter(dev_t dev, struct knote *kn) +dev_dkqfilter(cdev_t dev, struct knote *kn) { struct dev_kqfilter_args ap; int error; @@ -305,19 +305,19 @@ dev_dkqfilter(dev_t dev, struct knote *kn) ************************************************************************/ const char * -dev_dname(dev_t dev) +dev_dname(cdev_t dev) { return(dev->si_ops->head.name); } int -dev_dflags(dev_t dev) +dev_dflags(cdev_t dev) { return(dev->si_ops->head.flags); } int -dev_dmaj(dev_t dev) +dev_dmaj(cdev_t dev) { return(dev->si_ops->head.maj); } @@ -474,7 +474,7 @@ dev_ops_get(int x, int y) * its major/minor space will no longer be visible to userland. */ struct dev_ops * -dev_ops_add_override(dev_t backing_dev, struct dev_ops *template, +dev_ops_add_override(cdev_t backing_dev, struct dev_ops *template, u_int mask, u_int match) { struct dev_ops *ops; @@ -558,7 +558,7 @@ dev_ops_release(struct dev_ops *ops) } struct dev_ops * -dev_ops_intercept(dev_t dev, struct dev_ops *iops) +dev_ops_intercept(cdev_t dev, struct dev_ops *iops) { struct dev_ops *oops = dev->si_ops; @@ -572,7 +572,7 @@ dev_ops_intercept(dev_t dev, struct dev_ops *iops) } void -dev_ops_restore(dev_t dev, struct dev_ops *oops) +dev_ops_restore(cdev_t dev, struct dev_ops *oops) { struct dev_ops *iops = dev->si_ops; diff --git a/sys/kern/kern_memio.c b/sys/kern/kern_memio.c index afafe32b88..7b83bde6fa 100644 --- a/sys/kern/kern_memio.c +++ b/sys/kern/kern_memio.c @@ -39,7 +39,7 @@ * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/i386/mem.c,v 1.79.2.9 2003/01/04 22:58:01 njl Exp $ - * $DragonFly: src/sys/kern/kern_memio.c,v 1.19 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/kern/kern_memio.c,v 1.20 2006/09/10 01:26:39 dillon Exp $ */ /* @@ -96,8 +96,8 @@ static int rand_bolt; static caddr_t zbuf; MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); -static int mem_ioctl (dev_t, u_long, caddr_t, int, struct ucred *); -static int random_ioctl (dev_t, u_long, caddr_t, int, struct ucred *); +static int mem_ioctl (cdev_t, u_long, caddr_t, int, struct ucred *); +static int random_ioctl (cdev_t, u_long, caddr_t, int, struct ucred *); struct mem_range_softc mem_range_softc; @@ -105,7 +105,7 @@ struct mem_range_softc mem_range_softc; static int mmopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error; switch (minor(dev)) { @@ -131,7 +131,7 @@ mmopen(struct dev_open_args *ap) static int mmclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; switch (minor(dev)) { case 14: @@ -145,7 +145,7 @@ mmclose(struct dev_close_args *ap) static int -mmrw(dev_t dev, struct uio *uio, int flags) +mmrw(cdev_t dev, struct uio *uio, int flags) { int o; u_int c, v; @@ -323,7 +323,7 @@ mmwrite(struct dev_write_args *ap) static int memmmap(struct dev_mmap_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; switch (minor(dev)) { case 0: @@ -347,7 +347,7 @@ memmmap(struct dev_mmap_args *ap) static int mmioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; switch (minor(dev)) { case 0: @@ -368,7 +368,7 @@ mmioctl(struct dev_ioctl_args *ap) * and mem_range_attr_set. */ static int -mem_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) +mem_ioctl(cdev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) { int nd, error = 0; struct mem_range_op *mo = (struct mem_range_op *)data; @@ -462,7 +462,7 @@ mem_range_AP_init(void) #endif static int -random_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) +random_ioctl(cdev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) { int error; int intr; @@ -517,7 +517,7 @@ random_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) int mmpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int revents; switch (minor(dev)) { @@ -535,7 +535,7 @@ mmpoll(struct dev_poll_args *ap) int iszerodev(dev) - dev_t dev; + cdev_t dev; { return ((major(dev) == mem_ops.head.maj) && minor(dev) == 12); diff --git a/sys/kern/kern_nrandom.c b/sys/kern/kern_nrandom.c index ae98af0777..03d23fd63a 100644 --- a/sys/kern/kern_nrandom.c +++ b/sys/kern/kern_nrandom.c @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/kern/kern_nrandom.c,v 1.3 2006/07/28 02:17:40 dillon Exp $ + * $DragonFly: src/sys/kern/kern_nrandom.c,v 1.4 2006/09/10 01:26:39 dillon Exp $ */ /* --- NOTES --- * @@ -490,7 +490,7 @@ add_buffer_randomness(const char *buf, int bytes) * Poll (always succeeds) */ int -random_poll(dev_t dev, int events) +random_poll(cdev_t dev, int events) { int revents = 0; diff --git a/sys/kern/kern_physio.c b/sys/kern/kern_physio.c index 2ced0ce130..2903ec54a3 100644 --- a/sys/kern/kern_physio.c +++ b/sys/kern/kern_physio.c @@ -17,7 +17,7 @@ * are met. * * $FreeBSD: src/sys/kern/kern_physio.c,v 1.46.2.4 2003/11/14 09:51:47 simokawa Exp $ - * $DragonFly: src/sys/kern/kern_physio.c,v 1.22 2006/07/28 02:17:40 dillon Exp $ + * $DragonFly: src/sys/kern/kern_physio.c,v 1.23 2006/09/10 01:26:39 dillon Exp $ */ #include @@ -40,7 +40,7 @@ physwakeup(struct bio *bio) } static int -physio(dev_t dev, struct uio *uio, int ioflag) +physio(cdev_t dev, struct uio *uio, int ioflag) { int i; int error; diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c index 7e23bba31a..cea484e90f 100644 --- a/sys/kern/kern_shutdown.c +++ b/sys/kern/kern_shutdown.c @@ -37,7 +37,7 @@ * * @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/kern_shutdown.c,v 1.72.2.12 2002/02/21 19:15:10 dillon Exp $ - * $DragonFly: src/sys/kern/kern_shutdown.c,v 1.35 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/kern/kern_shutdown.c,v 1.36 2006/09/10 01:26:39 dillon Exp $ */ #include "opt_ddb.h" @@ -136,7 +136,7 @@ globaldata_t panic_cpu_gd; /* which cpu took the panic */ static void boot (int) __dead2; static void dumpsys (void); -static int setdumpdev (dev_t dev); +static int setdumpdev (cdev_t dev); static void poweroff_wait (void *, int); static void print_uptime (void); static void shutdown_halt (void *junk, int howto); @@ -461,7 +461,7 @@ SYSCTL_INT(_machdep, OID_AUTO, do_dump, CTLFLAG_RW, &dodump, 0, static int setdumpdev(dev) - dev_t dev; + cdev_t dev; { int psize; long newdumplo; @@ -492,7 +492,7 @@ dump_conf(dummy) void *dummy; { char *path; - dev_t dev; + cdev_t dev; path = kmalloc(MNAMELEN, M_TEMP, M_WAITOK); if (TUNABLE_STR_FETCH("dumpdev", path, MNAMELEN) != 0) { @@ -521,7 +521,7 @@ sysctl_kern_dumpdev(SYSCTL_HANDLER_ARGS) } SYSCTL_PROC(_kern, KERN_DUMPDEV, dumpdev, CTLTYPE_OPAQUE|CTLFLAG_RW, - 0, sizeof dumpdev, sysctl_kern_dumpdev, "T,dev_t", ""); + 0, sizeof dumpdev, sysctl_kern_dumpdev, "T,cdev_t", ""); /* * Doadump comes here after turning off memory management and diff --git a/sys/kern/subr_disk.c b/sys/kern/subr_disk.c index 3eae883954..ae1739615e 100644 --- a/sys/kern/subr_disk.c +++ b/sys/kern/subr_disk.c @@ -77,7 +77,7 @@ * @(#)ufs_disksubr.c 8.5 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/subr_disk.c,v 1.20.2.6 2001/10/05 07:14:57 peter Exp $ * $FreeBSD: src/sys/ufs/ufs/ufs_disksubr.c,v 1.44.2.3 2001/03/05 05:42:19 obrien Exp $ - * $DragonFly: src/sys/kern/subr_disk.c,v 1.25 2006/07/28 02:17:40 dillon Exp $ + * $DragonFly: src/sys/kern/subr_disk.c,v 1.26 2006/09/10 01:26:39 dillon Exp $ */ #include @@ -135,10 +135,10 @@ static struct dev_ops disk_ops = { * the passed dev_ops. The disk layer not only returns such a raw device, * it also uses it internally when passing (modified) commands through. */ -dev_t +cdev_t disk_create(int unit, struct disk *dp, int flags, struct dev_ops *raw_ops) { - dev_t rawdev; + cdev_t rawdev; struct dev_ops *dev_ops; /* @@ -195,7 +195,7 @@ disk_destroy(struct disk *disk) } int -disk_dumpcheck(dev_t dev, u_int *count, u_int *blkno, u_int *secsize) +disk_dumpcheck(cdev_t dev, u_int *count, u_int *blkno, u_int *secsize) { struct disk *dp; struct disklabel *dl; @@ -274,7 +274,7 @@ static int diskopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct disk *dp; int error; @@ -340,7 +340,7 @@ static int diskclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct disk *dp; int error; @@ -361,7 +361,7 @@ static int diskioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct disk *dp; int error; @@ -383,7 +383,7 @@ static int diskstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct bio *nbio; struct disk *dp; @@ -419,7 +419,7 @@ static int diskpsize(struct dev_psize_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct disk *dp; dp = dev->si_disk; @@ -443,7 +443,7 @@ static int diskclone(struct dev_clone_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct disk *dp; dp = dev->si_ops->head.data; @@ -458,7 +458,7 @@ diskclone(struct dev_clone_args *ap) int diskdump(struct dev_dump_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct disk *dp = dev->si_ops->head.data; int error; @@ -599,7 +599,7 @@ bioqdisksort(struct bio_queue_head *bioq, struct bio *bio) * Returns NULL on success and an error string on failure. */ char * -readdisklabel(dev_t dev, struct disklabel *lp) +readdisklabel(cdev_t dev, struct disklabel *lp) { struct buf *bp; struct disklabel *dlp; @@ -687,7 +687,7 @@ setdisklabel(struct disklabel *olp, struct disklabel *nlp, u_long openmask) * Write disk label back to device after modification. */ int -writedisklabel(dev_t dev, struct disklabel *lp) +writedisklabel(cdev_t dev, struct disklabel *lp) { struct buf *bp; struct disklabel *dlp; @@ -756,7 +756,7 @@ hp0g: hard error reading fsbn 12345 of 12344-12347 (hp0 bn %d cn %d tn %d sn %d) * or addlog, respectively. There is no trailing space. */ void -diskerr(struct bio *bio, dev_t dev, const char *what, int pri, +diskerr(struct bio *bio, cdev_t dev, const char *what, int pri, int donecnt, struct disklabel *lp) { struct buf *bp = bio->bio_buf; diff --git a/sys/kern/subr_diskmbr.c b/sys/kern/subr_diskmbr.c index 5b5ce59941..5525fd47df 100644 --- a/sys/kern/subr_diskmbr.c +++ b/sys/kern/subr_diskmbr.c @@ -36,7 +36,7 @@ * from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91 * from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $ * $FreeBSD: src/sys/kern/subr_diskmbr.c,v 1.45 2000/01/28 10:22:07 bde Exp $ - * $DragonFly: src/sys/kern/subr_diskmbr.c,v 1.14 2006/09/05 00:55:45 dillon Exp $ + * $DragonFly: src/sys/kern/subr_diskmbr.c,v 1.15 2006/09/10 01:26:39 dillon Exp $ */ #include @@ -67,7 +67,7 @@ static struct dos_partition historical_bogus_partition_table[NDOSPART] = { static int check_part (char *sname, struct dos_partition *dp, u_long offset, int nsectors, int ntracks, u_long mbr_offset); -static void mbr_extended (dev_t dev, struct disklabel *lp, +static void mbr_extended (cdev_t dev, struct disklabel *lp, struct diskslices *ssp, u_long ext_offset, u_long ext_size, u_long base_ext_offset, int nsectors, int ntracks, u_long mbr_offset, @@ -152,7 +152,7 @@ check_part(char *sname, struct dos_partition *dp, u_long offset, } int -dsinit(dev_t dev, struct disklabel *lp, struct diskslices **sspp) +dsinit(cdev_t dev, struct disklabel *lp, struct diskslices **sspp) { struct buf *bp; u_char *cp; @@ -170,7 +170,7 @@ dsinit(dev_t dev, struct disklabel *lp, struct diskslices **sspp) char *sname; struct diskslice *sp; struct diskslices *ssp; - dev_t wdev; + cdev_t wdev; mbr_offset = DOSBBSECTOR; reread_mbr: @@ -361,7 +361,7 @@ done: } void -mbr_extended(dev_t dev, struct disklabel *lp, struct diskslices *ssp, +mbr_extended(cdev_t dev, struct disklabel *lp, struct diskslices *ssp, u_long ext_offset, u_long ext_size, u_long base_ext_offset, int nsectors, int ntracks, u_long mbr_offset, int level) { diff --git a/sys/kern/subr_diskslice.c b/sys/kern/subr_diskslice.c index 6b93c884ea..faa2cb9a30 100644 --- a/sys/kern/subr_diskslice.c +++ b/sys/kern/subr_diskslice.c @@ -44,7 +44,7 @@ * from: @(#)ufs_disksubr.c 7.16 (Berkeley) 5/4/91 * from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $ * $FreeBSD: src/sys/kern/subr_diskslice.c,v 1.82.2.6 2001/07/24 09:49:41 dd Exp $ - * $DragonFly: src/sys/kern/subr_diskslice.c,v 1.23 2006/09/05 03:48:12 dillon Exp $ + * $DragonFly: src/sys/kern/subr_diskslice.c,v 1.24 2006/09/10 01:26:39 dillon Exp $ */ #include @@ -140,7 +140,7 @@ clone_label(struct disklabel *lp) * is marked with B_ERROR. */ struct bio * -dscheck(dev_t dev, struct bio *bio, struct diskslices *ssp) +dscheck(cdev_t dev, struct bio *bio, struct diskslices *ssp) { struct buf *bp = bio->bio_buf; struct bio *nbio; @@ -321,7 +321,7 @@ done: } void -dsclose(dev_t dev, int mode, struct diskslices *ssp) +dsclose(cdev_t dev, int mode, struct diskslices *ssp) { u_char mask; struct diskslice *sp; @@ -351,7 +351,7 @@ dsgone(struct diskslices **sspp) * is subject to the same restriction as dsopen(). */ int -dsioctl(dev_t dev, u_long cmd, caddr_t data, +dsioctl(cdev_t dev, u_long cmd, caddr_t data, int flags, struct diskslices **sspp) { int error; @@ -618,7 +618,7 @@ dsmakeslicestruct(int nslices, struct disklabel *lp) } char * -dsname(dev_t dev, int unit, int slice, int part, char *partname) +dsname(cdev_t dev, int unit, int slice, int part, char *partname) { static char name[32]; const char *dname; @@ -645,10 +645,10 @@ dsname(dev_t dev, int unit, int slice, int part, char *partname) * strategy routine must be special to allow activity. */ int -dsopen(dev_t dev, int mode, u_int flags, +dsopen(cdev_t dev, int mode, u_int flags, struct diskslices **sspp, struct disklabel *lp) { - dev_t dev1; + cdev_t dev1; int error; struct disklabel *lp1; char *msg; @@ -809,7 +809,7 @@ dsopen(dev_t dev, int mode, u_int flags, } int -dssize(dev_t dev, struct diskslices **sspp) +dssize(cdev_t dev, struct diskslices **sspp) { struct disklabel *lp; int part; diff --git a/sys/kern/sys_generic.c b/sys/kern/sys_generic.c index 7b784830ed..c3b297fa76 100644 --- a/sys/kern/sys_generic.c +++ b/sys/kern/sys_generic.c @@ -37,7 +37,7 @@ * * @(#)sys_generic.c 8.5 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/sys_generic.c,v 1.55.2.10 2001/03/17 10:39:32 peter Exp $ - * $DragonFly: src/sys/kern/sys_generic.c,v 1.36 2006/09/05 00:55:45 dillon Exp $ + * $DragonFly: src/sys/kern/sys_generic.c,v 1.37 2006/09/10 01:26:39 dillon Exp $ */ #include "opt_ktrace.h" @@ -1059,7 +1059,7 @@ sys_openbsd_poll(struct openbsd_poll_args *uap) /*ARGSUSED*/ int -seltrue(dev_t dev, int events) +seltrue(cdev_t dev, int events) { return (events & (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)); } diff --git a/sys/kern/tty.c b/sys/kern/tty.c index b02f91a05b..65342d23bd 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -37,7 +37,7 @@ * * @(#)tty.c 8.8 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/tty.c,v 1.129.2.5 2002/03/11 01:32:31 dd Exp $ - * $DragonFly: src/sys/kern/tty.c,v 1.29 2006/09/05 00:55:45 dillon Exp $ + * $DragonFly: src/sys/kern/tty.c,v 1.30 2006/09/10 01:26:39 dillon Exp $ */ /*- @@ -216,7 +216,7 @@ static SLIST_HEAD(, tty) tty_list; */ int ttyopen(device, tp) - dev_t device; + cdev_t device; struct tty *tp; { crit_enter(); @@ -1017,7 +1017,7 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) } case TIOCSETD: { /* set line discipline */ int t = *(int *)data; - dev_t device = tp->t_dev; + cdev_t device = tp->t_dev; if ((u_int)t >= nlinesw) return (ENXIO); @@ -1119,7 +1119,7 @@ ttioctl(struct tty *tp, u_long cmd, void *data, int flag) int ttypoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int events = ap->a_events; int revents = 0; struct tty *tp; @@ -1160,7 +1160,7 @@ static struct filterops ttywrite_filtops = int ttykqfilter(struct dev_kqfilter_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct knote *kn = ap->a_kn; struct tty *tp = dev->si_tty; struct klist *klist; @@ -1192,7 +1192,7 @@ ttykqfilter(struct dev_kqfilter_args *ap) static void filt_ttyrdetach(struct knote *kn) { - struct tty *tp = ((dev_t)kn->kn_hook)->si_tty; + struct tty *tp = ((cdev_t)kn->kn_hook)->si_tty; crit_enter(); SLIST_REMOVE(&tp->t_rsel.si_note, kn, knote, kn_selnext); @@ -1202,7 +1202,7 @@ filt_ttyrdetach(struct knote *kn) static int filt_ttyread(struct knote *kn, long hint) { - struct tty *tp = ((dev_t)kn->kn_hook)->si_tty; + struct tty *tp = ((cdev_t)kn->kn_hook)->si_tty; kn->kn_data = ttnread(tp); if (ISSET(tp->t_state, TS_ZOMBIE)) { @@ -1215,7 +1215,7 @@ filt_ttyread(struct knote *kn, long hint) static void filt_ttywdetach(struct knote *kn) { - struct tty *tp = ((dev_t)kn->kn_hook)->si_tty; + struct tty *tp = ((cdev_t)kn->kn_hook)->si_tty; crit_enter(); SLIST_REMOVE(&tp->t_wsel.si_note, kn, knote, kn_selnext); @@ -1227,7 +1227,7 @@ filt_ttywrite(kn, hint) struct knote *kn; long hint; { - struct tty *tp = ((dev_t)kn->kn_hook)->si_tty; + struct tty *tp = ((cdev_t)kn->kn_hook)->si_tty; kn->kn_data = tp->t_outq.c_cc; if (ISSET(tp->t_state, TS_ZOMBIE)) @@ -2613,7 +2613,7 @@ sysctl_kern_ttys(SYSCTL_HANDLER_ARGS) SLIST_FOREACH(tp, &tty_list, t_list) { t = *tp; if (t.t_dev) - t.t_dev = (dev_t)dev2udev(t.t_dev); + t.t_dev = (cdev_t)dev2udev(t.t_dev); error = SYSCTL_OUT(req, (caddr_t)&t, sizeof(t)); if (error) return (error); diff --git a/sys/kern/tty_conf.c b/sys/kern/tty_conf.c index b55f9c8c46..3a9a2184e5 100644 --- a/sys/kern/tty_conf.c +++ b/sys/kern/tty_conf.c @@ -37,7 +37,7 @@ * * @(#)tty_conf.c 8.4 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/tty_conf.c,v 1.16.2.1 2002/03/11 01:14:55 dd Exp $ - * $DragonFly: src/sys/kern/tty_conf.c,v 1.4 2006/07/28 02:17:40 dillon Exp $ + * $DragonFly: src/sys/kern/tty_conf.c,v 1.5 2006/09/10 01:26:39 dillon Exp $ */ #include "opt_compat.h" @@ -141,7 +141,7 @@ ldisc_deregister(discipline) static int l_noopen(dev, tp) - dev_t dev; + cdev_t dev; struct tty *tp; { diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index d8166ad19d..8a5437d6ac 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -37,7 +37,7 @@ * * from: @(#)cons.c 7.2 (Berkeley) 5/9/91 * $FreeBSD: src/sys/kern/tty_cons.c,v 1.81.2.4 2001/12/17 18:44:41 guido Exp $ - * $DragonFly: src/sys/kern/tty_cons.c,v 1.16 2006/07/28 02:17:40 dillon Exp $ + * $DragonFly: src/sys/kern/tty_cons.c,v 1.17 2006/09/10 01:26:39 dillon Exp $ */ #include "opt_ddb.h" @@ -88,10 +88,10 @@ static struct dev_ops cn_iops = { }; static struct dev_ops *cn_fwd_ops; -static dev_t cn_dev; +static cdev_t cn_dev; static udev_t cn_udev; SYSCTL_OPAQUE(_machdep, CPU_CONSDEV, consdev, CTLFLAG_RD, - &cn_udev, sizeof cn_udev, "T,dev_t", ""); + &cn_udev, sizeof cn_udev, "T,cdev_t", ""); static int cn_mute; @@ -102,7 +102,7 @@ int cons_unavail = 0; /* XXX: static u_char cn_is_open; /* nonzero if logical console is open */ static int openmode, openflag; /* how /dev/console was openned */ -static dev_t cn_devfsdev; /* represents the device private info */ +static cdev_t cn_devfsdev; /* represents the device private info */ static u_char cn_phys_is_open; /* nonzero if physical device is open */ struct consdev *cn_tab; /* physical console device info */ static u_char console_pausing; /* pause after each line during probe */ @@ -284,10 +284,10 @@ cnintercept(struct dev_generic_args *ap) static int cnopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int flag = ap->a_oflags; int mode = ap->a_devtype; - dev_t cndev, physdev; + cdev_t cndev, physdev; int retval = 0; if (cn_tab == NULL || cn_fwd_ops == NULL) @@ -339,8 +339,8 @@ cnopen(struct dev_open_args *ap) static int cnclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; - dev_t cndev; + cdev_t dev = ap->a_head.a_dev; + cdev_t cndev; struct tty *cn_tp; if (cn_tab == NULL || cn_fwd_ops == NULL) @@ -397,7 +397,7 @@ static int cnwrite(struct dev_write_args *ap) { struct uio *uio = ap->a_uio; - dev_t dev; + cdev_t dev; if (cn_tab == NULL || cn_fwd_ops == NULL) { uio->uio_resid = 0; /* dump the data */ diff --git a/sys/kern/tty_pty.c b/sys/kern/tty_pty.c index 8cff0fc9ab..afcfee4d4d 100644 --- a/sys/kern/tty_pty.c +++ b/sys/kern/tty_pty.c @@ -32,7 +32,7 @@ * * @(#)tty_pty.c 8.4 (Berkeley) 2/20/95 * $FreeBSD: src/sys/kern/tty_pty.c,v 1.74.2.4 2002/02/20 19:58:13 dillon Exp $ - * $DragonFly: src/sys/kern/tty_pty.c,v 1.16 2006/09/05 00:55:45 dillon Exp $ + * $DragonFly: src/sys/kern/tty_pty.c,v 1.17 2006/09/10 01:26:39 dillon Exp $ */ /* @@ -109,7 +109,7 @@ struct pt_ioctl { u_char pt_send; u_char pt_ucntl; struct tty pt_tty; - dev_t devs, devc; + cdev_t devs, devc; struct prison *pt_prison; }; @@ -132,7 +132,7 @@ static void ptyinit(n) int n; { - dev_t devs, devc; + cdev_t devs, devc; char *names = "pqrsPQRS"; struct pt_ioctl *pt; @@ -157,12 +157,12 @@ ptyinit(n) static int ptsopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; int error; int minr; #if 0 - dev_t nextdev; + cdev_t nextdev; #endif struct pt_ioctl *pti; @@ -216,7 +216,7 @@ ptsopen(struct dev_open_args *ap) static int ptsclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; int err; @@ -230,7 +230,7 @@ ptsclose(struct dev_close_args *ap) static int ptsread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct proc *p = curproc; struct tty *tp = dev->si_tty; struct pt_ioctl *pti = dev->si_drv1; @@ -281,7 +281,7 @@ again: static int ptswrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; tp = dev->si_tty; @@ -329,7 +329,7 @@ ptcwakeup(tp, flag) static int ptcopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; struct pt_ioctl *pti; @@ -355,7 +355,7 @@ ptcopen(struct dev_open_args *ap) static int ptcclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp; tp = dev->si_tty; @@ -382,7 +382,7 @@ ptcclose(struct dev_close_args *ap) static int ptcread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp = dev->si_tty; struct pt_ioctl *pti = dev->si_drv1; char buf[BUFSIZ]; @@ -466,7 +466,7 @@ ptsstop(tp, flush) static int ptcpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp = dev->si_tty; struct pt_ioctl *pti = dev->si_drv1; int revents = 0; @@ -516,7 +516,7 @@ ptcpoll(struct dev_poll_args *ap) static int ptcwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp = dev->si_tty; u_char *cp = 0; int cc = 0; @@ -625,7 +625,7 @@ block: static int ptyioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tty *tp = dev->si_tty; struct pt_ioctl *pti = dev->si_drv1; u_char *cc = tp->t_cc; diff --git a/sys/kern/tty_tty.c b/sys/kern/tty_tty.c index 1d3b3380b9..9f64ea57f1 100644 --- a/sys/kern/tty_tty.c +++ b/sys/kern/tty_tty.c @@ -32,7 +32,7 @@ * * @(#)tty_tty.c 8.2 (Berkeley) 9/23/93 * $FreeBSD: src/sys/kern/tty_tty.c,v 1.30 1999/09/25 18:24:24 phk Exp $ - * $DragonFly: src/sys/kern/tty_tty.c,v 1.17 2006/08/12 00:26:20 dillon Exp $ + * $DragonFly: src/sys/kern/tty_tty.c,v 1.18 2006/09/10 01:26:39 dillon Exp $ */ /* @@ -216,7 +216,7 @@ cttyioctl(struct dev_ioctl_args *ap) static int cttypoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct vnode *ttyvp; struct proc *p = curproc; diff --git a/sys/kern/vfs_conf.c b/sys/kern/vfs_conf.c index 62d65fb930..d9ee84cc7b 100644 --- a/sys/kern/vfs_conf.c +++ b/sys/kern/vfs_conf.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/vfs_conf.c,v 1.49.2.5 2003/01/07 11:56:53 joerg Exp $ - * $DragonFly: src/sys/kern/vfs_conf.c,v 1.19 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/kern/vfs_conf.c,v 1.20 2006/09/10 01:26:39 dillon Exp $ */ /* @@ -105,7 +105,7 @@ static void vfs_mountroot(void *junk) { int i; - dev_t save_rootdev = rootdev; + cdev_t save_rootdev = rootdev; /* * The root filesystem information is compiled in, and we are @@ -265,7 +265,7 @@ vfs_mountroot_ask(void) { char name[128]; int i; - dev_t dev; + cdev_t dev; for(;;) { printf("\nManual root filesystem specification:\n"); @@ -331,17 +331,17 @@ gets(char *cp) } /* - * Convert a given name to the dev_t of the disk-like device + * Convert a given name to the cdev_t of the disk-like device * it refers to. */ -dev_t +cdev_t kgetdiskbyname(const char *name) { char *cp; int nlen; int cd, unit, slice, part; - dev_t dev; - dev_t rdev; + cdev_t dev; + cdev_t rdev; /* * Get the base name of the device @@ -434,7 +434,7 @@ kgetdiskbyname(const char *name) static int setrootbyname(char *name) { - dev_t diskdev; + cdev_t diskdev; diskdev = kgetdiskbyname(name); if (diskdev != NOCDEV) { @@ -448,7 +448,7 @@ setrootbyname(char *name) #ifdef DDB DB_SHOW_COMMAND(disk, db_getdiskbyname) { - dev_t dev; + cdev_t dev; if (modif[0] == '\0') { db_error("usage: show disk/devicename"); @@ -456,7 +456,7 @@ DB_SHOW_COMMAND(disk, db_getdiskbyname) } dev = kgetdiskbyname(modif); if (dev != NOCDEV) - db_printf("dev_t = %p\n", dev); + db_printf("cdev_t = %p\n", dev); else db_printf("No disk device matched.\n"); } diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 5f8ec61b71..6e0a6c98e6 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -37,7 +37,7 @@ * * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95 * $FreeBSD: src/sys/kern/vfs_subr.c,v 1.249.2.30 2003/04/04 20:35:57 tegge Exp $ - * $DragonFly: src/sys/kern/vfs_subr.c,v 1.97 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/kern/vfs_subr.c,v 1.98 2006/09/10 01:26:39 dillon Exp $ */ /* @@ -967,7 +967,7 @@ reassignbuf(struct buf *bp) * Used for mounting the root file system. */ int -bdevvp(dev_t dev, struct vnode **vpp) +bdevvp(cdev_t dev, struct vnode **vpp) { struct vnode *vp; struct vnode *nvp; @@ -991,7 +991,7 @@ bdevvp(dev_t dev, struct vnode **vpp) } int -v_associate_rdev(struct vnode *vp, dev_t dev) +v_associate_rdev(struct vnode *vp, cdev_t dev) { lwkt_tokref ilock; @@ -1013,7 +1013,7 @@ void v_release_rdev(struct vnode *vp) { lwkt_tokref ilock; - dev_t dev; + cdev_t dev; if ((dev = vp->v_rdev) != NULL) { lwkt_gettoken(&ilock, &spechash_token); @@ -1025,7 +1025,7 @@ v_release_rdev(struct vnode *vp) } /* - * Add a vnode to the alias list hung off the dev_t. We only associate + * Add a vnode to the alias list hung off the cdev_t. We only associate * the device number with the vnode. The actual device is not associated * until the vnode is opened (usually in spec_open()), and will be * disassociated on last close. @@ -1164,7 +1164,7 @@ vop_stdrevoke(struct vop_revoke_args *ap) { struct vnode *vp, *vq; lwkt_tokref ilock; - dev_t dev; + cdev_t dev; KASSERT((ap->a_flags & REVOKEALL) != 0, ("vop_revoke")); @@ -1287,7 +1287,7 @@ vgone_interlocked(struct vnode *vp) * Lookup a vnode by device number. */ int -vfinddev(dev_t dev, enum vtype type, struct vnode **vpp) +vfinddev(cdev_t dev, enum vtype type, struct vnode **vpp) { lwkt_tokref ilock; struct vnode *vp; @@ -1311,7 +1311,7 @@ vfinddev(dev_t dev, enum vtype type, struct vnode **vpp) * to check for a NULL v_rdev. */ int -count_dev(dev_t dev) +count_dev(cdev_t dev) { lwkt_tokref ilock; struct vnode *vp; @@ -1330,7 +1330,7 @@ count_dev(dev_t dev) int count_udev(udev_t udev) { - dev_t dev; + cdev_t dev; if ((dev = udev2dev(udev, 0)) == NOCDEV) return(0); @@ -1531,7 +1531,7 @@ sysctl_ovfs_conf(SYSCTL_HANDLER_ARGS) int vfs_mountedon(struct vnode *vp) { - dev_t dev; + cdev_t dev; if ((dev = vp->v_rdev) == NULL) dev = udev2dev(vp->v_udev, (vp->v_type == VBLK)); @@ -1994,10 +1994,10 @@ vn_pollgone(struct vnode *vp) } /* - * extract the dev_t from a VBLK or VCHR. The vnode must have been opened + * extract the cdev_t from a VBLK or VCHR. The vnode must have been opened * (or v_rdev might be NULL). */ -dev_t +cdev_t vn_todev(struct vnode *vp) { if (vp->v_type != VBLK && vp->v_type != VCHR) @@ -2013,7 +2013,7 @@ vn_todev(struct vnode *vp) int vn_isdisk(struct vnode *vp, int *errp) { - dev_t dev; + cdev_t dev; if (vp->v_type != VBLK && vp->v_type != VCHR) { if (errp != NULL) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 7e2251ddf7..774e42d794 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -37,7 +37,7 @@ * * @(#)vfs_vnops.c 8.2 (Berkeley) 1/21/94 * $FreeBSD: src/sys/kern/vfs_vnops.c,v 1.87.2.13 2002/12/29 18:19:53 dillon Exp $ - * $DragonFly: src/sys/kern/vfs_vnops.c,v 1.45 2006/08/23 06:45:39 dillon Exp $ + * $DragonFly: src/sys/kern/vfs_vnops.c,v 1.46 2006/09/10 01:26:39 dillon Exp $ */ #include @@ -549,7 +549,7 @@ svn_read(struct file *fp, struct uio *uio, struct ucred *cred, int flags) struct vnode *vp; int ioflag; int error; - dev_t dev; + cdev_t dev; get_mplock(); KASSERT(uio->uio_td == curthread, @@ -679,7 +679,7 @@ svn_write(struct file *fp, struct uio *uio, struct ucred *cred, int flags) struct vnode *vp; int ioflag; int error; - dev_t dev; + cdev_t dev; get_mplock(); KASSERT(uio->uio_td == curthread, @@ -769,7 +769,7 @@ vn_stat(struct vnode *vp, struct stat *sb, struct ucred *cred) struct vattr *vap; int error; u_short mode; - dev_t dev; + cdev_t dev; vap = &vattr; error = VOP_GETATTR(vp, vap); @@ -865,7 +865,7 @@ vn_stat(struct vnode *vp, struct stat *sb, struct ucred *cred) * stat() call, aka v_rdev == NULL), how are we supposed * to get a valid block size out of it? */ - dev_t dev; + cdev_t dev; if ((dev = vp->v_rdev) == NULL) dev = udev2dev(vp->v_udev, vp->v_type == VBLK); diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 91413c793a..afdd61e550 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -38,7 +38,7 @@ * @(#)bpf.c 8.2 (Berkeley) 3/28/94 * * $FreeBSD: src/sys/net/bpf.c,v 1.59.2.12 2002/04/14 21:41:48 luigi Exp $ - * $DragonFly: src/sys/net/bpf.c,v 1.33 2006/09/05 00:55:46 dillon Exp $ + * $DragonFly: src/sys/net/bpf.c,v 1.34 2006/09/10 01:26:39 dillon Exp $ */ #include "use_bpf.h" @@ -296,7 +296,7 @@ bpf_detachd(struct bpf_d *d) static int bpfopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bpf_d *d; if (ap->a_cred->cr_prison) @@ -327,7 +327,7 @@ bpfopen(struct dev_open_args *ap) static int bpfclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bpf_d *d = dev->si_drv1; funsetown(d->bd_sigio); @@ -362,7 +362,7 @@ bpfclose(struct dev_close_args *ap) static int bpfread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bpf_d *d = dev->si_drv1; int timed_out; int error; @@ -497,7 +497,7 @@ bpf_timed_out(void *arg) static int bpfwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bpf_d *d = dev->si_drv1; struct ifnet *ifp; struct mbuf *m; @@ -579,7 +579,7 @@ reset_d(struct bpf_d *d) static int bpfioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bpf_d *d = dev->si_drv1; int error = 0; @@ -978,7 +978,7 @@ bpf_setif(struct bpf_d *d, struct ifreq *ifr) int bpfpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bpf_d *d; int revents; diff --git a/sys/net/i4b/driver/i4b_ctl.c b/sys/net/i4b/driver/i4b_ctl.c index 14c3015553..f21bb7e354 100644 --- a/sys/net/i4b/driver/i4b_ctl.c +++ b/sys/net/i4b/driver/i4b_ctl.c @@ -30,7 +30,7 @@ * $Id: i4b_ctl.c,v 1.37 2000/05/31 08:04:43 hm Exp $ * * $FreeBSD: src/sys/i4b/driver/i4b_ctl.c,v 1.10.2.3 2001/08/12 16:22:48 hm Exp $ - * $DragonFly: src/sys/net/i4b/driver/i4b_ctl.c,v 1.12 2006/07/28 02:17:40 dillon Exp $ + * $DragonFly: src/sys/net/i4b/driver/i4b_ctl.c,v 1.13 2006/09/10 01:26:39 dillon Exp $ * * last edit-date: [Sat Aug 11 18:06:38 2001] * @@ -113,7 +113,7 @@ i4bctlattach(void *dummy) PDEVSTATIC int i4bctlopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; if(minor(dev)) return (ENXIO); if(openflag) @@ -138,7 +138,7 @@ i4bctlclose(struct dev_close_args *ap) PDEVSTATIC int i4bctlioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; #if DO_I4B_DEBUG ctl_debug_t *cdbg; int error = 0; diff --git a/sys/net/i4b/driver/i4b_rbch.c b/sys/net/i4b/driver/i4b_rbch.c index b731e32189..ad85f5bafa 100644 --- a/sys/net/i4b/driver/i4b_rbch.c +++ b/sys/net/i4b/driver/i4b_rbch.c @@ -28,7 +28,7 @@ * --------------------------------------------------- * * $FreeBSD: src/sys/i4b/driver/i4b_rbch.c,v 1.10.2.3 2001/08/12 16:22:48 hm Exp $ - * $DragonFly: src/sys/net/i4b/driver/i4b_rbch.c,v 1.20 2006/07/28 02:17:40 dillon Exp $ + * $DragonFly: src/sys/net/i4b/driver/i4b_rbch.c,v 1.21 2006/09/10 01:26:39 dillon Exp $ * * last edit-date: [Sat Aug 11 18:06:57 2001] * @@ -190,7 +190,7 @@ i4brbchattach(void *dummy) PDEVSTATIC int i4brbchopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); if(unit >= NI4BRBCH) @@ -216,7 +216,7 @@ i4brbchopen(struct dev_open_args *ap) PDEVSTATIC int i4brbchclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); struct rbch_softc *sc = &rbch_softc[unit]; @@ -238,7 +238,7 @@ i4brbchclose(struct dev_close_args *ap) PDEVSTATIC int i4brbchread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct mbuf *m; int error = 0; @@ -340,7 +340,7 @@ i4brbchread(struct dev_read_args *ap) PDEVSTATIC int i4brbchwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct mbuf *m; int error = 0; @@ -460,7 +460,7 @@ i4brbchwrite(struct dev_write_args *ap) PDEVSTATIC int i4brbchioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error = 0; int unit = minor(dev); struct rbch_softc *sc = &rbch_softc[unit]; @@ -545,7 +545,7 @@ i4brbchioctl(struct dev_ioctl_args *ap) PDEVSTATIC int i4brbchpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int revents = 0; /* Events we found */ int unit = minor(dev); struct rbch_softc *sc = &rbch_softc[unit]; diff --git a/sys/net/i4b/driver/i4b_tel.c b/sys/net/i4b/driver/i4b_tel.c index 8e4d3bd79c..6dce1ecf29 100644 --- a/sys/net/i4b/driver/i4b_tel.c +++ b/sys/net/i4b/driver/i4b_tel.c @@ -28,7 +28,7 @@ * -------------------------------------------- * * $FreeBSD: src/sys/i4b/driver/i4b_tel.c,v 1.10.2.4 2001/12/16 15:12:57 hm Exp $ - * $DragonFly: src/sys/net/i4b/driver/i4b_tel.c,v 1.13 2006/07/28 02:17:40 dillon Exp $ + * $DragonFly: src/sys/net/i4b/driver/i4b_tel.c,v 1.14 2006/09/10 01:26:39 dillon Exp $ * * last edit-date: [Sat Aug 11 18:07:05 2001] * @@ -224,7 +224,7 @@ i4btelattach(void *dummy) PDEVSTATIC int i4btelopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = UNIT(dev); int func = FUNC(dev); @@ -254,7 +254,7 @@ i4btelopen(struct dev_open_args *ap) PDEVSTATIC int i4btelclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = UNIT(dev); int func = FUNC(dev); tel_sc_t *sc; @@ -297,7 +297,7 @@ i4btelclose(struct dev_close_args *ap) PDEVSTATIC int i4btelioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = UNIT(dev); int func = FUNC(dev); int error = 0; @@ -419,7 +419,7 @@ i4btelioctl(struct dev_ioctl_args *ap) PDEVSTATIC int i4btelread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; int unit = UNIT(dev); int func = FUNC(dev); @@ -539,7 +539,7 @@ i4btelread(struct dev_read_args *ap) PDEVSTATIC int i4btelwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; int unit = UNIT(dev); int func = FUNC(dev); @@ -700,7 +700,7 @@ tel_tone(tel_sc_t *sc) PDEVSTATIC int i4btelpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int revents = 0; /* Events we found */ int unit = UNIT(dev); int func = FUNC(dev); diff --git a/sys/net/i4b/driver/i4b_trace.c b/sys/net/i4b/driver/i4b_trace.c index 7c6ce5610a..15a919ee4d 100644 --- a/sys/net/i4b/driver/i4b_trace.c +++ b/sys/net/i4b/driver/i4b_trace.c @@ -30,7 +30,7 @@ * last edit-date: [Sat Aug 11 18:07:15 2001] * * $FreeBSD: src/sys/i4b/driver/i4b_trace.c,v 1.9.2.3 2001/08/12 16:22:48 hm Exp $ - * $DragonFly: src/sys/net/i4b/driver/i4b_trace.c,v 1.15 2006/07/28 02:17:40 dillon Exp $ + * $DragonFly: src/sys/net/i4b/driver/i4b_trace.c,v 1.16 2006/09/10 01:26:39 dillon Exp $ * *---------------------------------------------------------------------------*/ @@ -234,7 +234,7 @@ get_trace_data_from_l1(i4b_trace_hdr_t *hdr, int len, char *buf) PDEVSTATIC int i4btrcopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); if(unit >= NI4BTRC) @@ -261,7 +261,7 @@ i4btrcopen(struct dev_open_args *ap) PDEVSTATIC int i4btrcclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = minor(dev); int i; int cno = -1; @@ -308,7 +308,7 @@ i4btrcclose(struct dev_close_args *ap) PDEVSTATIC int i4btrcread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct mbuf *m; int error = 0; @@ -362,7 +362,7 @@ i4btrcpoll(struct dev_poll_args *ap) PDEVSTATIC int i4btrcioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error = 0; int unit = minor(dev); i4b_trace_setupa_t *tsa; diff --git a/sys/net/i4b/layer4/i4b_i4bdrv.c b/sys/net/i4b/layer4/i4b_i4bdrv.c index 5a372603aa..1c969a7619 100644 --- a/sys/net/i4b/layer4/i4b_i4bdrv.c +++ b/sys/net/i4b/layer4/i4b_i4bdrv.c @@ -28,7 +28,7 @@ * -------------------------------------------- * * $FreeBSD: src/sys/i4b/layer4/i4b_i4bdrv.c,v 1.11.2.5 2001/12/16 15:12:59 hm Exp $ - * $DragonFly: src/sys/net/i4b/layer4/i4b_i4bdrv.c,v 1.17 2006/09/05 03:48:12 dillon Exp $ + * $DragonFly: src/sys/net/i4b/layer4/i4b_i4bdrv.c,v 1.18 2006/09/10 01:26:39 dillon Exp $ * * last edit-date: [Sat Aug 11 18:08:10 2001] * @@ -133,7 +133,7 @@ i4battach(void *dummy) PDEVSTATIC int i4bopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; if (minor(dev)) return(ENXIO); @@ -167,7 +167,7 @@ i4bclose(struct dev_close_args *ap) PDEVSTATIC int i4bread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct mbuf *m; int error = 0; @@ -206,7 +206,7 @@ i4bread(struct dev_read_args *ap) PDEVSTATIC int i4bioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; call_desc_t *cd; int error = 0; @@ -766,7 +766,7 @@ diag_done: PDEVSTATIC int i4bpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int revents; if (minor(dev)) diff --git a/sys/net/pf/pf_ioctl.c b/sys/net/pf/pf_ioctl.c index 00c058d79c..f0b8590a25 100644 --- a/sys/net/pf/pf_ioctl.c +++ b/sys/net/pf/pf_ioctl.c @@ -1,6 +1,6 @@ /* $FreeBSD: src/sys/contrib/pf/net/pf_ioctl.c,v 1.12 2004/08/12 14:15:42 mlaier Exp $ */ /* $OpenBSD: pf_ioctl.c,v 1.112.2.2 2004/07/24 18:28:12 brad Exp $ */ -/* $DragonFly: src/sys/net/pf/pf_ioctl.c,v 1.9 2006/09/05 03:48:12 dillon Exp $ */ +/* $DragonFly: src/sys/net/pf/pf_ioctl.c,v 1.10 2006/09/10 01:26:39 dillon Exp $ */ /* * Copyright (c) 2004 The DragonFly Project. All rights reserved. @@ -123,7 +123,7 @@ static void tag_unref(struct pf_tags *, u_int16_t); #define DPFPRINTF(n, x) if (pf_status.debug >= (n)) printf x -static dev_t pf_dev; +static cdev_t pf_dev; /* * XXX - These are new and need to be checked when moveing to a new version @@ -291,7 +291,7 @@ pfattach(void) int pfopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; if (minor(dev) >= 1) return (ENXIO); return (0); @@ -300,7 +300,7 @@ pfopen(struct dev_open_args *ap) int pfclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; if (minor(dev) >= 1) return (ENXIO); return (0); diff --git a/sys/net/ppp_layer/ppp_tty.c b/sys/net/ppp_layer/ppp_tty.c index 22d84b6671..b0cdf05d1c 100644 --- a/sys/net/ppp_layer/ppp_tty.c +++ b/sys/net/ppp_layer/ppp_tty.c @@ -71,7 +71,7 @@ */ /* $FreeBSD: src/sys/net/ppp_tty.c,v 1.43.2.1 2002/02/13 00:43:11 dillon Exp $ */ -/* $DragonFly: src/sys/net/ppp_layer/ppp_tty.c,v 1.19 2006/09/03 17:31:55 dillon Exp $ */ +/* $DragonFly: src/sys/net/ppp_layer/ppp_tty.c,v 1.20 2006/09/10 01:26:39 dillon Exp $ */ #include "opt_ppp.h" /* XXX for ppp_defs.h */ @@ -103,7 +103,7 @@ #include #include -static int pppopen (dev_t dev, struct tty *tp); +static int pppopen (cdev_t dev, struct tty *tp); static int pppclose (struct tty *tp, int flag); static int pppread (struct tty *tp, struct uio *uio, int flag); static int pppwrite (struct tty *tp, struct uio *uio, int flag); @@ -175,7 +175,7 @@ pppasyncattach(void *dummy) */ /* ARGSUSED */ static int -pppopen(dev_t dev, struct tty *tp) +pppopen(cdev_t dev, struct tty *tp) { struct thread *td = curthread; /* XXX */ struct ppp_softc *sc; diff --git a/sys/net/sl/if_sl.c b/sys/net/sl/if_sl.c index 7d656e6c3b..3a30319cfd 100644 --- a/sys/net/sl/if_sl.c +++ b/sys/net/sl/if_sl.c @@ -32,7 +32,7 @@ * * @(#)if_sl.c 8.6 (Berkeley) 2/1/94 * $FreeBSD: src/sys/net/if_sl.c,v 1.84.2.2 2002/02/13 00:43:10 dillon Exp $ - * $DragonFly: src/sys/net/sl/if_sl.c,v 1.27 2006/09/05 00:55:48 dillon Exp $ + * $DragonFly: src/sys/net/sl/if_sl.c,v 1.28 2006/09/10 01:26:40 dillon Exp $ */ /* @@ -187,7 +187,7 @@ static int slclose (struct tty *,int); static int slinput (int, struct tty *); static int slioctl (struct ifnet *, u_long, caddr_t, struct ucred *); static int sltioctl (struct tty *, u_long, caddr_t, int, struct ucred *); -static int slopen (dev_t, struct tty *); +static int slopen (cdev_t, struct tty *); static int sloutput (struct ifnet *, struct mbuf *, struct sockaddr *, struct rtentry *); static int slstart (struct tty *); @@ -250,7 +250,7 @@ slinit(struct sl_softc *sc) */ /* ARGSUSED */ static int -slopen(dev_t dev, struct tty *tp) +slopen(cdev_t dev, struct tty *tp) { struct sl_softc *sc; int nsl; diff --git a/sys/net/tap/if_tap.c b/sys/net/tap/if_tap.c index 0a0a0bf0be..d4e74f828d 100644 --- a/sys/net/tap/if_tap.c +++ b/sys/net/tap/if_tap.c @@ -32,7 +32,7 @@ /* * $FreeBSD: src/sys/net/if_tap.c,v 1.3.2.3 2002/04/14 21:41:48 luigi Exp $ - * $DragonFly: src/sys/net/tap/if_tap.c,v 1.28 2006/09/05 00:55:48 dillon Exp $ + * $DragonFly: src/sys/net/tap/if_tap.c,v 1.29 2006/09/10 01:26:40 dillon Exp $ * $Id: if_tap.c,v 0.21 2000/07/23 21:46:02 max Exp $ */ @@ -84,7 +84,7 @@ static int tapmodevent (module_t, int, void *); /* device */ -static void tapcreate (dev_t); +static void tapcreate (cdev_t); /* network interface */ static void tapifstart (struct ifnet *); @@ -189,7 +189,7 @@ tapmodevent(module_t mod, int type, void *data) * to create interface */ static void -tapcreate(dev_t dev) +tapcreate(cdev_t dev) { struct ifnet *ifp = NULL; struct tap_softc *tp = NULL; @@ -255,7 +255,7 @@ tapcreate(dev_t dev) static int tapopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tap_softc *tp = NULL; int error; @@ -293,7 +293,7 @@ tapopen(struct dev_open_args *ap) static int tapclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = &tp->tap_if; @@ -484,7 +484,7 @@ tapifstart(struct ifnet *ifp) static int tapioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = &tp->tap_if; @@ -593,7 +593,7 @@ tapioctl(struct dev_ioctl_args *ap) static int tapread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = &tp->tap_if; @@ -663,7 +663,7 @@ tapread(struct dev_read_args *ap) static int tapwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = &tp->tap_if; @@ -739,7 +739,7 @@ tapwrite(struct dev_write_args *ap) static int tappoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tap_softc *tp = dev->si_drv1; struct ifnet *ifp = &tp->tap_if; int revents = 0; diff --git a/sys/net/tap/if_tapvar.h b/sys/net/tap/if_tapvar.h index f957baade6..dd35cb5df3 100644 --- a/sys/net/tap/if_tapvar.h +++ b/sys/net/tap/if_tapvar.h @@ -35,7 +35,7 @@ /* * $FreeBSD: src/sys/net/if_tapvar.h,v 1.3.2.1 2000/07/27 13:57:05 nsayer Exp $ - * $DragonFly: src/sys/net/tap/if_tapvar.h,v 1.3 2003/06/25 03:56:02 dillon Exp $ + * $DragonFly: src/sys/net/tap/if_tapvar.h,v 1.4 2006/09/10 01:26:40 dillon Exp $ * $Id: if_tapvar.h,v 0.6 2000/07/11 02:16:08 max Exp $ */ @@ -45,7 +45,7 @@ struct tap_softc { struct arpcom arpcom; /* ethernet common data */ #define tap_if arpcom.ac_if - dev_t tap_dev; /* device */ + cdev_t tap_dev; /* device */ u_short tap_flags; /* misc flags */ #define TAP_OPEN (1 << 0) diff --git a/sys/net/tun/if_tun.c b/sys/net/tun/if_tun.c index 0b6689762c..7a966e94d4 100644 --- a/sys/net/tun/if_tun.c +++ b/sys/net/tun/if_tun.c @@ -14,7 +14,7 @@ * operation though. * * $FreeBSD: src/sys/net/if_tun.c,v 1.74.2.8 2002/02/13 00:43:11 dillon Exp $ - * $DragonFly: src/sys/net/tun/if_tun.c,v 1.29 2006/07/28 02:17:40 dillon Exp $ + * $DragonFly: src/sys/net/tun/if_tun.c,v 1.30 2006/09/10 01:26:40 dillon Exp $ */ #include "opt_atalk.h" @@ -62,7 +62,7 @@ static MALLOC_DEFINE(M_TUN, "tun", "Tunnel Interface"); static void tunattach (void *); PSEUDO_SET(tunattach, if_tun); -static void tuncreate (dev_t dev); +static void tuncreate (cdev_t dev); #define TUNDEBUG if (tundebug) if_printf static int tundebug = 0; @@ -99,7 +99,7 @@ tunattach(void *dummy) } static void -tuncreate(dev_t dev) +tuncreate(cdev_t dev) { struct tun_softc *sc; struct ifnet *ifp; @@ -134,7 +134,7 @@ tuncreate(dev_t dev) static int tunopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct ifnet *ifp; struct tun_softc *tp; int error; @@ -163,7 +163,7 @@ tunopen(struct dev_open_args *ap) static int tunclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tun_softc *tp; struct ifnet *ifp; @@ -389,7 +389,7 @@ tunoutput(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst, static int tunioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tun_softc *tp = dev->si_drv1; struct tuninfo *tunp; @@ -497,7 +497,7 @@ tunioctl(struct dev_ioctl_args *ap) static int tunread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct tun_softc *tp = dev->si_drv1; struct ifnet *ifp = &tp->tun_if; @@ -548,7 +548,7 @@ tunread(struct dev_read_args *ap) static int tunwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct tun_softc *tp = dev->si_drv1; struct ifnet *ifp = &tp->tun_if; @@ -675,7 +675,7 @@ tunwrite(struct dev_write_args *ap) static int tunpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct tun_softc *tp = dev->si_drv1; struct ifnet *ifp = &tp->tun_if; int revents = 0; diff --git a/sys/netgraph/ng_device.c b/sys/netgraph/ng_device.c index 29efd6fea5..4053645ce0 100644 --- a/sys/netgraph/ng_device.c +++ b/sys/netgraph/ng_device.c @@ -29,7 +29,7 @@ * netgraph node. * * $FreeBSD: src/sys/netgraph/ng_device.c,v 1.1.2.1 2002/08/23 07:15:44 julian Exp $ - * $DragonFly: src/sys/netgraph/ng_device.c,v 1.7 2006/09/05 00:55:48 dillon Exp $ + * $DragonFly: src/sys/netgraph/ng_device.c,v 1.8 2006/09/10 01:26:40 dillon Exp $ * */ @@ -86,7 +86,7 @@ NETGRAPH_INIT(device, &typestruct); struct ngd_connection { SLIST_ENTRY(ngd_connection) links; - dev_t ngddev; + cdev_t ngddev; struct ng_hook *active_hook; char *readq; int loc; @@ -418,7 +418,7 @@ ng_device_disconnect(hook_p hook) * the device is opened */ static int -ngdopen(dev_t dev, int flag, int mode, struct thread *td) +ngdopen(cdev_t dev, int flag, int mode, struct thread *td) { #ifdef NGD_DEBUG @@ -432,7 +432,7 @@ ngdopen(dev_t dev, int flag, int mode, struct thread *td) * the device is closed */ static int -ngdclose(dev_t dev, int flag, int mode, struct thread *td) +ngdclose(cdev_t dev, int flag, int mode, struct thread *td) { #ifdef NGD_DEBUG @@ -450,7 +450,7 @@ ngdclose(dev_t dev, int flag, int mode, struct thread *td) * */ static int -ngdioctl(dev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) +ngdioctl(cdev_t dev, u_long cmd, caddr_t addr, int flag, struct thread *td) { struct ngd_softc *sc = &ngd_softc; struct ngd_connection * connection = NULL; @@ -505,7 +505,7 @@ nomsg: * uiomove. */ static int -ngdread(dev_t dev, struct uio *uio, int flag) +ngdread(cdev_t dev, struct uio *uio, int flag) { int ret = 0, amnt; char buffer[uio->uio_resid+1]; @@ -556,7 +556,7 @@ error: * */ static int -ngdwrite(dev_t dev, struct uio *uio, int flag) +ngdwrite(cdev_t dev, struct uio *uio, int flag) { int ret; int error = 0; @@ -606,7 +606,7 @@ error: * check if there is data available for read */ static int -ngdpoll(dev_t dev, int events, struct thread *td) +ngdpoll(cdev_t dev, int events, struct thread *td) { int revents = 0; struct ngd_softc *sc = &ngd_softc; diff --git a/sys/netgraph/tty/ng_tty.c b/sys/netgraph/tty/ng_tty.c index 52a488ad70..b22f866852 100644 --- a/sys/netgraph/tty/ng_tty.c +++ b/sys/netgraph/tty/ng_tty.c @@ -37,7 +37,7 @@ * Author: Archie Cobbs * * $FreeBSD: src/sys/netgraph/ng_tty.c,v 1.7.2.3 2002/02/13 00:43:12 dillon Exp $ - * $DragonFly: src/sys/netgraph/tty/ng_tty.c,v 1.12 2006/07/28 02:17:40 dillon Exp $ + * $DragonFly: src/sys/netgraph/tty/ng_tty.c,v 1.13 2006/09/10 01:26:40 dillon Exp $ * $Whistle: ng_tty.c,v 1.21 1999/11/01 09:24:52 julian Exp $ */ @@ -123,7 +123,7 @@ typedef struct ngt_sc *sc_p; #endif /* Line discipline methods */ -static int ngt_open(dev_t dev, struct tty *tp); +static int ngt_open(cdev_t dev, struct tty *tp); static int ngt_close(struct tty *tp, int flag); static int ngt_read(struct tty *tp, struct uio *uio, int flag); static int ngt_write(struct tty *tp, struct uio *uio, int flag); @@ -190,7 +190,7 @@ static int ngt_ldisc; * Called from device open routine or ttioctl() at >= splsofttty() */ static int -ngt_open(dev_t dev, struct tty *tp) +ngt_open(cdev_t dev, struct tty *tp) { struct thread *td = curthread; /* XXX */ char name[sizeof(NG_TTY_NODE_TYPE) + 8]; diff --git a/sys/netproto/smb/smb_dev.c b/sys/netproto/smb/smb_dev.c index 0f4730fc73..761507e0bf 100644 --- a/sys/netproto/smb/smb_dev.c +++ b/sys/netproto/smb/smb_dev.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/netsmb/smb_dev.c,v 1.2.2.1 2001/05/22 08:32:33 bp Exp $ - * $DragonFly: src/sys/netproto/smb/smb_dev.c,v 1.15 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/netproto/smb/smb_dev.c,v 1.16 2006/09/10 01:26:40 dillon Exp $ */ #include #include @@ -102,7 +102,7 @@ static struct dev_ops nsmb_ops = { static int nsmb_dev_open(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct smb_dev *sdp; sdp = SMB_GETDEV(dev); @@ -137,7 +137,7 @@ nsmb_dev_open(struct dev_open_args *ap) static int nsmb_dev_close(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct smb_dev *sdp; struct smb_vc *vcp; struct smb_share *ssp; @@ -170,7 +170,7 @@ nsmb_dev_close(struct dev_close_args *ap) static int nsmb_dev_ioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; struct smb_dev *sdp; struct smb_vc *vcp; @@ -373,7 +373,7 @@ smb_dev2share(int fd, int mode, struct smb_cred *scred, struct vnode *vp; struct smb_dev *sdp; struct smb_share *ssp; - dev_t dev; + cdev_t dev; int error; KKASSERT(scred->scr_td->td_proc); diff --git a/sys/platform/pc32/apm/apm.c b/sys/platform/pc32/apm/apm.c index 4dfa44a004..767b228f53 100644 --- a/sys/platform/pc32/apm/apm.c +++ b/sys/platform/pc32/apm/apm.c @@ -16,7 +16,7 @@ * Sep, 1994 Implemented on FreeBSD 1.1.5.1R (Toshiba AVS001WD) * * $FreeBSD: src/sys/i386/apm/apm.c,v 1.114.2.5 2002/11/02 04:41:50 iwasaki Exp $ - * $DragonFly: src/sys/platform/pc32/apm/apm.c,v 1.16 2006/09/03 17:43:59 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/apm/apm.c,v 1.17 2006/09/10 01:26:38 dillon Exp $ */ #include @@ -1099,7 +1099,7 @@ apm_attach(device_t dev) static int apmopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct apm_softc *sc = &apm_softc; int ctl = APMDEV(dev); @@ -1128,7 +1128,7 @@ apmopen(struct dev_open_args *ap) static int apmclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct apm_softc *sc = &apm_softc; int ctl = APMDEV(dev); @@ -1152,7 +1152,7 @@ apmclose(struct dev_close_args *ap) static int apmioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct apm_softc *sc = &apm_softc; struct apm_bios_arg *args; int error = 0; @@ -1308,7 +1308,7 @@ apmioctl(struct dev_ioctl_args *ap) static int apmwrite(struct dev_write_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; struct apm_softc *sc = &apm_softc; u_int event_type; diff --git a/sys/platform/pc32/gnu/isa/dgb.c b/sys/platform/pc32/gnu/isa/dgb.c index 1fe9766918..72b2220af1 100644 --- a/sys/platform/pc32/gnu/isa/dgb.c +++ b/sys/platform/pc32/gnu/isa/dgb.c @@ -1,6 +1,6 @@ /*- * dgb.c $FreeBSD: src/sys/gnu/i386/isa/dgb.c,v 1.56.2.1 2001/02/26 04:23:09 jlemon Exp $ - * dgb.c $DragonFly: src/sys/platform/pc32/gnu/isa/dgb.c,v 1.17 2006/05/11 08:23:20 swildner Exp $ + * dgb.c $DragonFly: src/sys/platform/pc32/gnu/isa/dgb.c,v 1.18 2006/09/10 01:26:38 dillon Exp $ * * Digiboard driver. * @@ -936,7 +936,7 @@ load_fep: /* ARGSUSED */ static int -dgbopen(dev_t dev, int flag, int mode, struct thread *td) +dgbopen(cdev_t dev, int flag, int mode, struct thread *td) { struct dgb_softc *sc; struct tty *tp; @@ -1110,7 +1110,7 @@ out: /*ARGSUSED*/ static int -dgbclose(dev_t dev, int flag, int mode, struct thread *td) +dgbclose(cdev_t dev, int flag, int mode, struct thread *td) { struct tty *tp; int unit, pnum; @@ -1463,7 +1463,7 @@ dgbpoll(unit_c) } static int -dgbioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) +dgbioctl(cdev_t dev, u_long cmd, caddr_t data, int flag, struct thread *td) { struct dgb_softc *sc; int unit, pnum; diff --git a/sys/platform/pc32/i386/autoconf.c b/sys/platform/pc32/i386/autoconf.c index 9198887e82..3db106840d 100644 --- a/sys/platform/pc32/i386/autoconf.c +++ b/sys/platform/pc32/i386/autoconf.c @@ -35,7 +35,7 @@ * * from: @(#)autoconf.c 7.1 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/i386/autoconf.c,v 1.146.2.2 2001/06/07 06:05:58 dd Exp $ - * $DragonFly: src/sys/platform/pc32/i386/autoconf.c,v 1.26 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/autoconf.c,v 1.27 2006/09/10 01:26:38 dillon Exp $ */ /* @@ -109,8 +109,8 @@ SYSINIT(configure2, SI_SUB_CONFIGURE, SI_ORDER_THIRD, configure, NULL); /* SI_ORDER_MIDDLE is hookable */ SYSINIT(configure3, SI_SUB_CONFIGURE, SI_ORDER_ANY, configure_final, NULL); -dev_t rootdev = NOCDEV; -dev_t dumpdev = NOCDEV; +cdev_t rootdev = NOCDEV; +cdev_t dumpdev = NOCDEV; /* * Determine i/o configuration for a machine. @@ -232,7 +232,7 @@ cpu_rootconf() } SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, cpu_rootconf, NULL) -u_long bootdev = 0; /* not a dev_t - encoding is different */ +u_long bootdev = 0; /* not a cdev_t - encoding is different */ #if defined(FFS) && defined(FFS_ROOT) #define FDMAJOR 2 @@ -270,7 +270,7 @@ static void setroot() { int majdev, mindev, unit, slice, part; - dev_t newrootdev, dev; + cdev_t newrootdev, dev; char partname[2]; char *sname; diff --git a/sys/platform/pc32/i386/machdep.c b/sys/platform/pc32/i386/machdep.c index 7cefde6d0c..d7bec2082a 100644 --- a/sys/platform/pc32/i386/machdep.c +++ b/sys/platform/pc32/i386/machdep.c @@ -36,7 +36,7 @@ * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 * $FreeBSD: src/sys/i386/i386/machdep.c,v 1.385.2.30 2003/05/31 08:48:05 alc Exp $ - * $DragonFly: src/sys/platform/pc32/i386/machdep.c,v 1.95 2006/09/03 17:43:59 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/machdep.c,v 1.96 2006/09/10 01:26:39 dillon Exp $ */ #include "use_apm.h" @@ -1002,9 +1002,9 @@ SYSCTL_STRUCT(_machdep, CPU_BOOTINFO, bootinfo, SYSCTL_INT(_machdep, CPU_WALLCLOCK, wall_cmos_clock, CTLFLAG_RW, &wall_cmos_clock, 0, ""); -extern u_long bootdev; /* not a dev_t - encoding is different */ +extern u_long bootdev; /* not a cdev_t - encoding is different */ SYSCTL_ULONG(_machdep, OID_AUTO, guessed_bootdev, - CTLFLAG_RD, &bootdev, 0, "Boot device (not in dev_t format)"); + CTLFLAG_RD, &bootdev, 0, "Boot device (not in cdev_t format)"); /* * Initialize 386 and configure to run kernel @@ -2522,7 +2522,7 @@ Debugger(const char *msg) * block number, and returned. */ struct bio * -bounds_check_with_label(dev_t dev, struct bio *bio, +bounds_check_with_label(cdev_t dev, struct bio *bio, struct disklabel *lp, int wlabel) { struct bio *nbio; diff --git a/sys/platform/pc32/i386/mem.c b/sys/platform/pc32/i386/mem.c index aaf9eb0b59..c47b90c10b 100644 --- a/sys/platform/pc32/i386/mem.c +++ b/sys/platform/pc32/i386/mem.c @@ -39,7 +39,7 @@ * from: Utah $Hdr: mem.c 1.13 89/10/08$ * from: @(#)mem.c 7.2 (Berkeley) 5/9/91 * $FreeBSD: src/sys/i386/i386/mem.c,v 1.79.2.9 2003/01/04 22:58:01 njl Exp $ - * $DragonFly: src/sys/platform/pc32/i386/Attic/mem.c,v 1.19 2006/09/05 03:48:11 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/i386/Attic/mem.c,v 1.20 2006/09/10 01:26:39 dillon Exp $ */ /* @@ -96,8 +96,8 @@ static int rand_bolt; static caddr_t zbuf; MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); -static int mem_ioctl (dev_t, u_long, caddr_t, int, struct ucred *); -static int random_ioctl (dev_t, u_long, caddr_t, int, struct ucred *); +static int mem_ioctl (cdev_t, u_long, caddr_t, int, struct ucred *); +static int random_ioctl (cdev_t, u_long, caddr_t, int, struct ucred *); struct mem_range_softc mem_range_softc; @@ -105,7 +105,7 @@ struct mem_range_softc mem_range_softc; static int mmopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int error; switch (minor(dev)) { @@ -131,7 +131,7 @@ mmopen(struct dev_open_args *ap) static int mmclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; switch (minor(dev)) { case 14: @@ -145,7 +145,7 @@ mmclose(struct dev_close_args *ap) static int -mmrw(dev_t dev, struct uio *uio, int flags) +mmrw(cdev_t dev, struct uio *uio, int flags) { int o; u_int c, v; @@ -323,7 +323,7 @@ mmwrite(struct dev_write_args *ap) static int memmmap(struct dev_mmap_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; switch (minor(dev)) { case 0: @@ -347,7 +347,7 @@ memmmap(struct dev_mmap_args *ap) static int mmioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; switch (minor(dev)) { case 0: @@ -368,7 +368,7 @@ mmioctl(struct dev_ioctl_args *ap) * and mem_range_attr_set. */ static int -mem_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) +mem_ioctl(cdev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) { int nd, error = 0; struct mem_range_op *mo = (struct mem_range_op *)data; @@ -462,7 +462,7 @@ mem_range_AP_init(void) #endif static int -random_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) +random_ioctl(cdev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) { int error; int intr; @@ -517,7 +517,7 @@ random_ioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct ucred *cred) int mmpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int revents; switch (minor(dev)) { @@ -535,7 +535,7 @@ mmpoll(struct dev_poll_args *ap) int iszerodev(dev) - dev_t dev; + cdev_t dev; { return ((major(dev) == mem_ops.head.maj) && minor(dev) == 12); diff --git a/sys/platform/pc32/isa/asc.c b/sys/platform/pc32/isa/asc.c index ab8c62e01e..84bfb4cbf7 100644 --- a/sys/platform/pc32/isa/asc.c +++ b/sys/platform/pc32/isa/asc.c @@ -35,7 +35,7 @@ */ /* * $FreeBSD: src/sys/i386/isa/asc.c,v 1.42.2.2 2001/03/01 03:22:39 jlemon Exp $ - * $DragonFly: src/sys/platform/pc32/isa/asc.c,v 1.14 2006/07/28 02:17:39 dillon Exp $ + * $DragonFly: src/sys/platform/pc32/isa/asc.c,v 1.15 2006/09/10 01:26:39 dillon Exp $ */ #include "use_asc.h" @@ -535,7 +535,7 @@ ascintr(void *arg) STATIC int ascopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct asc_unit *scu; int unit; @@ -631,7 +631,7 @@ asc_startread(struct asc_unit *scu) STATIC int ascclose(struct dev_close_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = UNIT(minor(dev)); struct asc_unit *scu = unittab + unit; @@ -690,7 +690,7 @@ pbm_init(struct asc_unit *scu) STATIC int ascread(struct dev_read_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct uio *uio = ap->a_uio; int unit = UNIT(minor(dev)); struct asc_unit *scu = unittab + unit; @@ -781,7 +781,7 @@ ascread(struct dev_read_args *ap) STATIC int ascioctl(struct dev_ioctl_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; caddr_t data = ap->a_data; int unit = UNIT(minor(dev)); struct asc_unit *scu = unittab + unit; @@ -848,7 +848,7 @@ ascioctl(struct dev_ioctl_args *ap) STATIC int ascpoll(struct dev_poll_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; int unit = UNIT(minor(dev)); struct asc_unit *scu = unittab + unit; struct proc *p1; diff --git a/sys/sys/ccdvar.h b/sys/sys/ccdvar.h index d6653151ad..57d74366eb 100644 --- a/sys/sys/ccdvar.h +++ b/sys/sys/ccdvar.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/sys/ccdvar.h,v 1.11.2.1 2001/09/11 09:49:54 kris Exp $ */ -/* $DragonFly: src/sys/sys/ccdvar.h,v 1.4 2006/05/20 02:42:13 dillon Exp $ */ +/* $DragonFly: src/sys/sys/ccdvar.h,v 1.5 2006/09/10 01:26:40 dillon Exp $ */ /* $NetBSD: ccdvar.h,v 1.7.2.1 1995/10/12 21:30:18 thorpej Exp $ */ @@ -137,9 +137,11 @@ struct ccd_ioctl { * Component info table. * Describes a single component of a concatenated disk. */ +struct cdev; + struct ccdcinfo { struct vnode *ci_vp; /* device's vnode */ - dev_t ci_dev; /* XXX: device's dev_t */ + struct cdev *ci_dev; /* XXX: device's dev_t */ size_t ci_size; /* size */ char *ci_path; /* path to component */ size_t ci_pathlen; /* length of component path */ diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 1f3766963d..980c1f9857 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -37,7 +37,7 @@ * * @(#)conf.h 8.5 (Berkeley) 1/9/95 * $FreeBSD: src/sys/sys/conf.h,v 1.103.2.6 2002/03/11 01:14:55 dd Exp $ - * $DragonFly: src/sys/sys/conf.h,v 1.13 2006/09/09 19:07:29 dillon Exp $ + * $DragonFly: src/sys/sys/conf.h,v 1.14 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_CONF_H_ @@ -113,7 +113,7 @@ struct ucred; struct thread; -typedef int l_open_t (dev_t dev, struct tty *tp); +typedef int l_open_t (struct cdev *dev, struct tty *tp); typedef int l_close_t (struct tty *tp, int flag); typedef int l_read_t (struct tty *tp, struct uio *uio, int flag); typedef int l_write_t (struct tty *tp, struct uio *uio, int flag); @@ -155,7 +155,7 @@ struct swdevt { int sw_flags; int sw_nblks; struct vnode *sw_vp; - dev_t sw_device; + struct cdev *sw_device; }; #define SW_FREED 0x01 #define SW_SEQUENTIAL 0x02 @@ -185,21 +185,21 @@ static moduledata_t name##_mod = { \ }; \ DECLARE_MODULE(name, name##_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE) -int count_dev (dev_t dev); +int count_dev (cdev_t dev); int count_udev (udev_t dev); -void destroy_dev (dev_t dev); -void release_dev (dev_t dev); -dev_t reference_dev (dev_t dev); -struct dev_ops *devsw (dev_t dev); -const char *devtoname (dev_t dev); -void freedev (dev_t dev); -int iszerodev (dev_t dev); - -dev_t make_sub_dev (dev_t dev, int minor); -int lminor (dev_t dev); +void destroy_dev (cdev_t dev); +void release_dev (cdev_t dev); +cdev_t reference_dev (cdev_t dev); +struct dev_ops *devsw (cdev_t dev); +const char *devtoname (cdev_t dev); +void freedev (cdev_t dev); +int iszerodev (cdev_t dev); + +cdev_t make_sub_dev (cdev_t dev, int minor); +int lminor (cdev_t dev); void setconf (void); -dev_t kgetdiskbyname(const char *name); -int dev_is_good(dev_t dev); +cdev_t kgetdiskbyname(const char *name); +int dev_is_good(cdev_t dev); /* * XXX: This included for when DEVFS resurfaces diff --git a/sys/sys/cons.h b/sys/sys/cons.h index b2813198e1..6b31668e81 100644 --- a/sys/sys/cons.h +++ b/sys/sys/cons.h @@ -37,7 +37,7 @@ * * from: @(#)cons.h 7.2 (Berkeley) 5/9/91 * $FreeBSD: src/sys/sys/cons.h,v 1.24 2000/01/11 14:54:01 yokota Exp $ - * $DragonFly: src/sys/sys/cons.h,v 1.5 2006/05/20 02:42:13 dillon Exp $ + * $DragonFly: src/sys/sys/cons.h,v 1.6 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _MACHINE_CONS_H_ @@ -52,10 +52,10 @@ struct consdev; typedef void cn_probe_t (struct consdev *); typedef void cn_init_t (struct consdev *); typedef void cn_term_t (struct consdev *); -typedef int cn_getc_t (dev_t); -typedef int cn_checkc_t (dev_t); -typedef void cn_putc_t (dev_t, int); -typedef void cn_dbctl_t (dev_t, int); +typedef int cn_getc_t (cdev_t); +typedef int cn_checkc_t (cdev_t); +typedef void cn_putc_t (cdev_t, int); +typedef void cn_dbctl_t (cdev_t, int); struct consdev { cn_probe_t *cn_probe; @@ -73,7 +73,7 @@ struct consdev { cn_dbctl_t *cn_dbctl; /* debugger control interface */ struct tty *cn_tp; /* tty structure for console device */ - dev_t cn_dev; /* major/minor of device */ + cdev_t cn_dev; /* major/minor of device */ short cn_pri; /* pecking order; the higher the better */ }; diff --git a/sys/sys/device.h b/sys/sys/device.h index 5a1478efd5..27f49f496e 100644 --- a/sys/sys/device.h +++ b/sys/sys/device.h @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/sys/sys/device.h,v 1.6 2006/07/28 02:17:41 dillon Exp $ + * $DragonFly: src/sys/sys/device.h,v 1.7 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_DEVICE_H_ @@ -44,18 +44,20 @@ #include #endif +struct cdev; + /* * This structure is at the base of every device args structure */ struct dev_generic_args { struct syslink_desc *a_desc; - dev_t a_dev; + struct cdev *a_dev; }; typedef struct dev_generic_args dev_default_args; /* - * int d_open(dev_t dev, int oflags, int devtype, struct ucred *cred) + * int d_open(cdev_t dev, int oflags, int devtype, struct ucred *cred) */ struct dev_open_args { struct dev_generic_args a_head; @@ -65,7 +67,7 @@ struct dev_open_args { }; /* - * int d_close(dev_t dev, int fflag, int devtype) + * int d_close(cdev_t dev, int fflag, int devtype) */ struct dev_close_args { struct dev_generic_args a_head; @@ -74,7 +76,7 @@ struct dev_close_args { }; /* - * int d_read(dev_t dev, struct uio *uio, int ioflag) + * int d_read(cdev_t dev, struct uio *uio, int ioflag) */ struct dev_read_args { struct dev_generic_args a_head; @@ -83,7 +85,7 @@ struct dev_read_args { }; /* - * int d_write(dev_t dev, struct uio *uio, int ioflag) + * int d_write(cdev_t dev, struct uio *uio, int ioflag) */ struct dev_write_args { struct dev_generic_args a_head; @@ -92,7 +94,7 @@ struct dev_write_args { }; /* - * int d_ioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, + * int d_ioctl(cdev_t dev, u_long cmd, caddr_t data, int fflag, * struct ucred *cred) */ struct dev_ioctl_args { @@ -104,7 +106,7 @@ struct dev_ioctl_args { }; /* - * int d_poll(dev_t dev, int events) + * int d_poll(cdev_t dev, int events) */ struct dev_poll_args { struct dev_generic_args a_head; @@ -112,7 +114,7 @@ struct dev_poll_args { }; /* - * int d_mmap(dev_t dev, vm_offset_t offset, int nprot) + * int d_mmap(cdev_t dev, vm_offset_t offset, int nprot) */ struct dev_mmap_args { struct dev_generic_args a_head; @@ -122,7 +124,7 @@ struct dev_mmap_args { }; /* - * void d_strategy(dev_t dev, struct bio *bio) + * void d_strategy(cdev_t dev, struct bio *bio) */ struct dev_strategy_args { struct dev_generic_args a_head; @@ -130,7 +132,7 @@ struct dev_strategy_args { }; /* - * void d_dump(dev_t dev) + * void d_dump(cdev_t dev) */ struct dev_dump_args { struct dev_generic_args a_head; @@ -140,7 +142,7 @@ struct dev_dump_args { }; /* - * int d_psize(dev_t dev) + * int d_psize(cdev_t dev) */ struct dev_psize_args { struct dev_generic_args a_head; @@ -148,7 +150,7 @@ struct dev_psize_args { }; /* - * int d_kqfilter(dev_t dev, struct knote *kn) + * int d_kqfilter(cdev_t dev, struct knote *kn) */ struct dev_kqfilter_args { struct dev_generic_args a_head; @@ -263,24 +265,24 @@ extern struct dev_ops dead_dev_ops; struct disk; -int dev_dopen(dev_t dev, int oflags, int devtype, struct ucred *cred); -int dev_dclose(dev_t dev, int fflag, int devtype); -void dev_dstrategy(dev_t dev, struct bio *bio); -void dev_dstrategy_chain(dev_t dev, struct bio *bio); -int dev_dioctl(dev_t dev, u_long cmd, caddr_t data, int fflag, +int dev_dopen(cdev_t dev, int oflags, int devtype, struct ucred *cred); +int dev_dclose(cdev_t dev, int fflag, int devtype); +void dev_dstrategy(cdev_t dev, struct bio *bio); +void dev_dstrategy_chain(cdev_t dev, struct bio *bio); +int dev_dioctl(cdev_t dev, u_long cmd, caddr_t data, int fflag, struct ucred *cred); -int dev_ddump(dev_t dev); -int dev_dpsize(dev_t dev); -int dev_dread(dev_t dev, struct uio *uio, int ioflag); -int dev_dwrite(dev_t dev, struct uio *uio, int ioflag); -int dev_dpoll(dev_t dev, int events); -int dev_dkqfilter(dev_t dev, struct knote *kn); -int dev_dmmap(dev_t dev, vm_offset_t offset, int nprot); -int dev_dclone(dev_t dev); - -const char *dev_dname(dev_t dev); -int dev_dmaj(dev_t dev); -int dev_dflags(dev_t dev); +int dev_ddump(cdev_t dev); +int dev_dpsize(cdev_t dev); +int dev_dread(cdev_t dev, struct uio *uio, int ioflag); +int dev_dwrite(cdev_t dev, struct uio *uio, int ioflag); +int dev_dpoll(cdev_t dev, int events); +int dev_dkqfilter(cdev_t dev, struct knote *kn); +int dev_dmmap(cdev_t dev, vm_offset_t offset, int nprot); +int dev_dclone(cdev_t dev); + +const char *dev_dname(cdev_t dev); +int dev_dmaj(cdev_t dev); +int dev_dflags(cdev_t dev); int dev_doperate(struct dev_generic_args *ap); int dev_doperate_ops(struct dev_ops *, struct dev_generic_args *ap); @@ -319,16 +321,16 @@ void compile_dev_ops(struct dev_ops *); int dev_ops_add(struct dev_ops *, u_int mask, u_int match); int dev_ops_remove(struct dev_ops *, u_int mask, u_int match); void dev_ops_release(struct dev_ops *); -struct dev_ops *dev_ops_add_override(dev_t, struct dev_ops *, u_int, u_int); +struct dev_ops *dev_ops_add_override(cdev_t, struct dev_ops *, u_int, u_int); -struct dev_ops *dev_ops_intercept(dev_t, struct dev_ops *); -void dev_ops_restore(dev_t, struct dev_ops *); +struct dev_ops *dev_ops_intercept(cdev_t, struct dev_ops *); +void dev_ops_restore(cdev_t, struct dev_ops *); struct dev_ops *dev_ops_get(int x, int y); void destroy_all_devs(struct dev_ops *, u_int mask, u_int match); -dev_t make_dev(struct dev_ops *ops, int minor, uid_t uid, gid_t gid, +cdev_t make_dev(struct dev_ops *ops, int minor, uid_t uid, gid_t gid, int perms, const char *fmt, ...) __printflike(6, 7); -dev_t make_adhoc_dev (struct dev_ops *ops, int minor); +cdev_t make_adhoc_dev (struct dev_ops *ops, int minor); #endif diff --git a/sys/sys/disk.h b/sys/sys/disk.h index 671fe882ef..7c116f0b71 100644 --- a/sys/sys/disk.h +++ b/sys/sys/disk.h @@ -39,7 +39,7 @@ * ---------------------------------------------------------------------------- * * $FreeBSD: src/sys/sys/disk.h,v 1.16.2.3 2001/06/20 16:11:01 scottl Exp $ - * $DragonFly: src/sys/sys/disk.h,v 1.9 2006/07/30 16:49:34 dillon Exp $ + * $DragonFly: src/sys/sys/disk.h,v 1.10 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_DISK_H_ @@ -62,8 +62,8 @@ struct disk { struct dev_ops *d_raw_ops; /* the raw device switch */ u_int d_flags; u_int d_dsflags; - dev_t d_rawdev; /* backing raw device */ - dev_t d_cdev; /* special whole-disk part */ + cdev_t d_rawdev; /* backing raw device */ + cdev_t d_cdev; /* special whole-disk part */ struct diskslices *d_slice; struct disklabel d_label; LIST_ENTRY(disk) d_list; @@ -73,9 +73,9 @@ struct disk { #define DISKFLAG_WANTED 0x2 #ifdef _KERNEL -dev_t disk_create (int unit, struct disk *disk, int flags, struct dev_ops *raw_ops); +cdev_t disk_create (int unit, struct disk *disk, int flags, struct dev_ops *raw_ops); void disk_destroy (struct disk *disk); -int disk_dumpcheck (dev_t dev, u_int *count, u_int *blkno, u_int *secsize); +int disk_dumpcheck (cdev_t dev, u_int *count, u_int *blkno, u_int *secsize); struct disk *disk_enumerate (struct disk *disk); void disk_invalidate (struct disk *disk); #endif /* _KERNEL */ diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h index 07320dfdfa..69cd3fe2a0 100644 --- a/sys/sys/disklabel.h +++ b/sys/sys/disklabel.h @@ -32,7 +32,7 @@ * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 * $FreeBSD: src/sys/sys/disklabel.h,v 1.49.2.7 2001/05/27 05:58:26 jkh Exp $ - * $DragonFly: src/sys/sys/disklabel.h,v 1.14 2006/05/20 02:42:13 dillon Exp $ + * $DragonFly: src/sys/sys/disklabel.h,v 1.15 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_DISKLABEL_H_ @@ -396,8 +396,8 @@ dkmakeunit(int unit) return(dkmakeminor(unit, 0, 0)); } -static __inline dev_t -dkmodpart(dev_t dev, int part) +static __inline cdev_t +dkmodpart(cdev_t dev, int part) { int val; @@ -408,14 +408,14 @@ dkmodpart(dev_t dev, int part) return (make_sub_dev(dev, (minor(dev) & ~0x100007) | val)); } -static __inline dev_t -dkmodslice(dev_t dev, int slice) +static __inline cdev_t +dkmodslice(cdev_t dev, int slice) { return (make_sub_dev(dev, (minor(dev) & ~0x0f0000) | (slice << 16))); } static __inline int -dkpart(dev_t dev) +dkpart(cdev_t dev) { return (((minor(dev) >> 17) & 0x08) | (minor(dev) & 7)); } @@ -424,7 +424,7 @@ dkpart(dev_t dev) #define dktype(dev) ((minor(dev) >> 25) & 0x7f) static __inline u_int -dkunit(dev_t dev) +dkunit(cdev_t dev) { return (((minor(dev) >> 16) & 0x1e0) | ((minor(dev) >> 3) & 0x1f)); } @@ -433,16 +433,16 @@ struct buf; struct bio; struct bio_queue_head; -struct bio *bounds_check_with_label (dev_t dev, struct bio *bio, +struct bio *bounds_check_with_label (cdev_t dev, struct bio *bio, struct disklabel *lp, int wlabel); -void diskerr (struct bio *bio, dev_t dev, const char *what, int pri, +void diskerr (struct bio *bio, cdev_t dev, const char *what, int pri, int donecnt, struct disklabel *lp); void disksort (struct buf *ap, struct buf *bp); -char *readdisklabel (dev_t dev, struct disklabel *lp); +char *readdisklabel (cdev_t dev, struct disklabel *lp); void bioqdisksort (struct bio_queue_head *ap, struct bio *bio); int setdisklabel (struct disklabel *olp, struct disklabel *nlp, u_long openmask); -int writedisklabel (dev_t dev, struct disklabel *lp); +int writedisklabel (cdev_t dev, struct disklabel *lp); #endif /* _KERNEL */ diff --git a/sys/sys/disklabel32.h b/sys/sys/disklabel32.h index e0fc35ea3b..4d5b5e2802 100644 --- a/sys/sys/disklabel32.h +++ b/sys/sys/disklabel32.h @@ -32,7 +32,7 @@ * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 * $FreeBSD: src/sys/sys/disklabel.h,v 1.49.2.7 2001/05/27 05:58:26 jkh Exp $ - * $DragonFly: src/sys/sys/disklabel32.h,v 1.14 2006/05/20 02:42:13 dillon Exp $ + * $DragonFly: src/sys/sys/disklabel32.h,v 1.15 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_DISKLABEL_H_ @@ -396,8 +396,8 @@ dkmakeunit(int unit) return(dkmakeminor(unit, 0, 0)); } -static __inline dev_t -dkmodpart(dev_t dev, int part) +static __inline cdev_t +dkmodpart(cdev_t dev, int part) { int val; @@ -408,14 +408,14 @@ dkmodpart(dev_t dev, int part) return (make_sub_dev(dev, (minor(dev) & ~0x100007) | val)); } -static __inline dev_t -dkmodslice(dev_t dev, int slice) +static __inline cdev_t +dkmodslice(cdev_t dev, int slice) { return (make_sub_dev(dev, (minor(dev) & ~0x0f0000) | (slice << 16))); } static __inline int -dkpart(dev_t dev) +dkpart(cdev_t dev) { return (((minor(dev) >> 17) & 0x08) | (minor(dev) & 7)); } @@ -424,7 +424,7 @@ dkpart(dev_t dev) #define dktype(dev) ((minor(dev) >> 25) & 0x7f) static __inline u_int -dkunit(dev_t dev) +dkunit(cdev_t dev) { return (((minor(dev) >> 16) & 0x1e0) | ((minor(dev) >> 3) & 0x1f)); } @@ -433,16 +433,16 @@ struct buf; struct bio; struct bio_queue_head; -struct bio *bounds_check_with_label (dev_t dev, struct bio *bio, +struct bio *bounds_check_with_label (cdev_t dev, struct bio *bio, struct disklabel *lp, int wlabel); -void diskerr (struct bio *bio, dev_t dev, const char *what, int pri, +void diskerr (struct bio *bio, cdev_t dev, const char *what, int pri, int donecnt, struct disklabel *lp); void disksort (struct buf *ap, struct buf *bp); -char *readdisklabel (dev_t dev, struct disklabel *lp); +char *readdisklabel (cdev_t dev, struct disklabel *lp); void bioqdisksort (struct bio_queue_head *ap, struct bio *bio); int setdisklabel (struct disklabel *olp, struct disklabel *nlp, u_long openmask); -int writedisklabel (dev_t dev, struct disklabel *lp); +int writedisklabel (cdev_t dev, struct disklabel *lp); #endif /* _KERNEL */ diff --git a/sys/sys/diskslice.h b/sys/sys/diskslice.h index 7078b14d70..83ef039631 100644 --- a/sys/sys/diskslice.h +++ b/sys/sys/diskslice.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/diskslice.h,v 1.36.2.1 2001/01/29 01:50:50 ken Exp $ - * $DragonFly: src/sys/sys/diskslice.h,v 1.7 2006/05/20 02:42:13 dillon Exp $ + * $DragonFly: src/sys/sys/diskslice.h,v 1.8 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_DISKSLICE_H_ @@ -87,20 +87,20 @@ struct buf; struct bio; struct disklabel; -struct bio *dscheck (dev_t dev, struct bio *bio, struct diskslices *ssp); -void dsclose (dev_t dev, int mode, struct diskslices *ssp); +struct bio *dscheck (cdev_t dev, struct bio *bio, struct diskslices *ssp); +void dsclose (cdev_t dev, int mode, struct diskslices *ssp); void dsgone (struct diskslices **sspp); -int dsinit (dev_t dev, struct disklabel *lp, +int dsinit (cdev_t dev, struct disklabel *lp, struct diskslices **sspp); -int dsioctl (dev_t dev, u_long cmd, caddr_t data, +int dsioctl (cdev_t dev, u_long cmd, caddr_t data, int flags, struct diskslices **sspp); int dsisopen (struct diskslices *ssp); struct diskslices *dsmakeslicestruct (int nslices, struct disklabel *lp); -char *dsname (dev_t dev, int unit, int slice, int part, +char *dsname (cdev_t dev, int unit, int slice, int part, char *partname); -int dsopen (dev_t dev, int mode, u_int flags, +int dsopen (cdev_t dev, int mode, u_int flags, struct diskslices **sspp, struct disklabel *lp); -int dssize (dev_t dev, struct diskslices **sspp); +int dssize (cdev_t dev, struct diskslices **sspp); #endif /* _KERNEL */ diff --git a/sys/sys/mount.h b/sys/sys/mount.h index 1fac2becf7..5dbf5149e3 100644 --- a/sys/sys/mount.h +++ b/sys/sys/mount.h @@ -32,7 +32,7 @@ * * @(#)mount.h 8.21 (Berkeley) 5/20/95 * $FreeBSD: src/sys/sys/mount.h,v 1.89.2.7 2003/04/04 20:35:57 tegge Exp $ - * $DragonFly: src/sys/sys/mount.h,v 1.27 2006/07/18 22:22:15 dillon Exp $ + * $DragonFly: src/sys/sys/mount.h,v 1.28 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_MOUNT_H_ @@ -499,7 +499,7 @@ struct netcred *vfs_export_lookup /* lookup host in fs export list */ (struct mount *, struct netexport *, struct sockaddr *); int vfs_allocate_syncvnode (struct mount *); void vfs_getnewfsid (struct mount *); -dev_t vfs_getrootfsid (struct mount *); +cdev_t vfs_getrootfsid (struct mount *); struct mount *vfs_getvfs (fsid_t *); /* return vfs given fsid */ int vfs_modevent (module_t, int, void *); int vfs_mountedon (struct vnode *); /* is a vfs mounted on vp */ diff --git a/sys/sys/odisklabel.h b/sys/sys/odisklabel.h index 94d08f8ac4..f4b811c227 100644 --- a/sys/sys/odisklabel.h +++ b/sys/sys/odisklabel.h @@ -32,7 +32,7 @@ * * @(#)disklabel.h 8.2 (Berkeley) 7/10/94 * $FreeBSD: src/sys/sys/disklabel.h,v 1.49.2.7 2001/05/27 05:58:26 jkh Exp $ - * $DragonFly: src/sys/sys/Attic/odisklabel.h,v 1.14 2006/05/20 02:42:13 dillon Exp $ + * $DragonFly: src/sys/sys/Attic/odisklabel.h,v 1.15 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_DISKLABEL_H_ @@ -396,8 +396,8 @@ dkmakeunit(int unit) return(dkmakeminor(unit, 0, 0)); } -static __inline dev_t -dkmodpart(dev_t dev, int part) +static __inline cdev_t +dkmodpart(cdev_t dev, int part) { int val; @@ -408,14 +408,14 @@ dkmodpart(dev_t dev, int part) return (make_sub_dev(dev, (minor(dev) & ~0x100007) | val)); } -static __inline dev_t -dkmodslice(dev_t dev, int slice) +static __inline cdev_t +dkmodslice(cdev_t dev, int slice) { return (make_sub_dev(dev, (minor(dev) & ~0x0f0000) | (slice << 16))); } static __inline int -dkpart(dev_t dev) +dkpart(cdev_t dev) { return (((minor(dev) >> 17) & 0x08) | (minor(dev) & 7)); } @@ -424,7 +424,7 @@ dkpart(dev_t dev) #define dktype(dev) ((minor(dev) >> 25) & 0x7f) static __inline u_int -dkunit(dev_t dev) +dkunit(cdev_t dev) { return (((minor(dev) >> 16) & 0x1e0) | ((minor(dev) >> 3) & 0x1f)); } @@ -433,16 +433,16 @@ struct buf; struct bio; struct bio_queue_head; -struct bio *bounds_check_with_label (dev_t dev, struct bio *bio, +struct bio *bounds_check_with_label (cdev_t dev, struct bio *bio, struct disklabel *lp, int wlabel); -void diskerr (struct bio *bio, dev_t dev, const char *what, int pri, +void diskerr (struct bio *bio, cdev_t dev, const char *what, int pri, int donecnt, struct disklabel *lp); void disksort (struct buf *ap, struct buf *bp); -char *readdisklabel (dev_t dev, struct disklabel *lp); +char *readdisklabel (cdev_t dev, struct disklabel *lp); void bioqdisksort (struct bio_queue_head *ap, struct bio *bio); int setdisklabel (struct disklabel *olp, struct disklabel *nlp, u_long openmask); -int writedisklabel (dev_t dev, struct disklabel *lp); +int writedisklabel (cdev_t dev, struct disklabel *lp); #endif /* _KERNEL */ diff --git a/sys/sys/param.h b/sys/sys/param.h index 1baa54ca76..705f916bb9 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -37,7 +37,7 @@ * * @(#)param.h 8.3 (Berkeley) 4/4/95 * $FreeBSD: src/sys/sys/param.h,v 1.61.2.38 2003/05/22 17:12:01 fjoe Exp $ - * $DragonFly: src/sys/sys/param.h,v 1.36 2006/09/09 19:34:46 dillon Exp $ + * $DragonFly: src/sys/sys/param.h,v 1.37 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_PARAM_H_ @@ -133,11 +133,13 @@ #define NBPW sizeof(int) /* number of bytes per word (integer) */ #define CMASK 022 /* default file mask: S_IWGRP|S_IWOTH */ -#ifdef _KERNEL +#if defined(_KERNEL) || defined(_KERNEL_STRUCTURES) #define NOCDEV (cdev_t)(-1) /* non-existent device */ #define NOUDEV (udev_t)(-1) /* non-existent device */ #define NOMAJ 256 /* non-existent device */ -#else +#endif + +#ifndef _KERNEL #define NODEV (dev_t)(-1) /* non-existent device */ #endif diff --git a/sys/sys/random.h b/sys/sys/random.h index a4f27586f6..c53817dc4e 100644 --- a/sys/sys/random.h +++ b/sys/sys/random.h @@ -2,7 +2,7 @@ * random.h -- A strong random number generator * * $FreeBSD: src/sys/sys/random.h,v 1.19.2.2 2002/09/17 17:11:54 sam Exp $ - * $DragonFly: src/sys/sys/random.h,v 1.9 2006/07/28 02:17:41 dillon Exp $ + * $DragonFly: src/sys/sys/random.h,v 1.10 2006/09/10 01:26:40 dillon Exp $ * * Version 0.95, last modified 18-Oct-95 * @@ -95,7 +95,7 @@ u_int read_random_unlimited(void *buf, u_int size); u_int write_random(const char *buf, u_int nbytes); #endif struct thread; -int random_poll(dev_t dev, int events); +int random_poll(cdev_t dev, int events); #endif /* _KERNEL */ diff --git a/sys/sys/snoop.h b/sys/sys/snoop.h index 41ce72bce3..6691313777 100644 --- a/sys/sys/snoop.h +++ b/sys/sys/snoop.h @@ -13,7 +13,7 @@ * Snoop stuff. * * $FreeBSD: src/sys/sys/snoop.h,v 1.14.2.1 2002/03/11 01:23:05 dd Exp $ - * $DragonFly: src/sys/sys/snoop.h,v 1.2 2003/06/17 04:28:58 dillon Exp $ + * $DragonFly: src/sys/sys/snoop.h,v 1.3 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_SNOOP_H_ @@ -28,9 +28,18 @@ * detached from its current tty. */ +#ifdef _KERNEL + +#define SNPSTTY _IOW('T', 90, udev_t) +#define SNPGTTY _IOR('T', 89, udev_t) + +#else + #define SNPSTTY _IOW('T', 90, dev_t) #define SNPGTTY _IOR('T', 89, dev_t) +#endif + /* * Theese values would be returned by FIONREAD ioctl * instead of number of characters in buffer in case diff --git a/sys/sys/sysctl.h b/sys/sys/sysctl.h index 5db276360f..fc1b572760 100644 --- a/sys/sys/sysctl.h +++ b/sys/sys/sysctl.h @@ -35,7 +35,7 @@ * * @(#)sysctl.h 8.1 (Berkeley) 6/2/93 * $FreeBSD: src/sys/sys/sysctl.h,v 1.81.2.10 2003/05/01 22:48:09 trhodes Exp $ - * $DragonFly: src/sys/sys/sysctl.h,v 1.17 2006/05/20 02:42:13 dillon Exp $ + * $DragonFly: src/sys/sys/sysctl.h,v 1.18 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_SYSCTL_H_ @@ -362,7 +362,7 @@ TAILQ_HEAD(sysctl_ctx_list, sysctl_ctx_entry); #define KERN_BOOTFILE 26 /* string: name of booted kernel */ #define KERN_MAXFILESPERPROC 27 /* int: max open files per proc */ #define KERN_MAXPROCPERUID 28 /* int: max processes per uid */ -#define KERN_DUMPDEV 29 /* dev_t: device to dump on */ +#define KERN_DUMPDEV 29 /* udev_t: device to dump on */ #define KERN_IPC 30 /* node: anything related to IPC */ #define KERN_DUMMY 31 /* unused */ #define KERN_PS_STRINGS 32 /* int: address of PS_STRINGS */ diff --git a/sys/sys/systm.h b/sys/sys/systm.h index c05a6738f0..acd5244c84 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -37,7 +37,7 @@ * * @(#)systm.h 8.7 (Berkeley) 3/29/95 * $FreeBSD: src/sys/sys/systm.h,v 1.111.2.18 2002/12/17 18:04:02 sam Exp $ - * $DragonFly: src/sys/sys/systm.h,v 1.40 2006/09/03 17:43:59 dillon Exp $ + * $DragonFly: src/sys/sys/systm.h,v 1.41 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_SYSTM_H_ @@ -74,11 +74,11 @@ extern u_char curpriority; /* priority of current process */ extern int physmem; /* physical memory */ -extern dev_t dumpdev; /* dump device */ +extern cdev_t dumpdev; /* dump device */ extern long dumplo; /* offset into dumpdev */ -extern dev_t rootdev; /* root device */ -extern dev_t rootdevs[2]; /* possible root devices */ +extern cdev_t rootdev; /* root device */ +extern cdev_t rootdevs[2]; /* possible root devices */ extern char *rootdevnames[2]; /* names of possible root devices */ extern int boothowto; /* reboot flags, from console subsystem */ @@ -124,7 +124,7 @@ void backtrace(void); void mi_gdinit (struct globaldata *gd, int cpu); int dumpstatus (vm_offset_t addr, off_t count); int nullop (void); -int seltrue (dev_t dev, int which); +int seltrue (cdev_t dev, int which); int ureadc (int, struct uio *); void *hashinit (int count, struct malloc_type *type, u_long *hashmask); void *phashinit (int count, struct malloc_type *type, u_long *nentries); @@ -309,13 +309,13 @@ void wakeup_domain (void *chan, int domain); void wakeup_domain_one (void *chan, int domain); /* - * Common `dev_t' stuff are declared here to avoid #include poisoning + * Common `cdev_t' stuff are declared here to avoid #include poisoning */ -int major(dev_t x); -int minor(dev_t x); -udev_t dev2udev(dev_t x); -dev_t udev2dev(udev_t x, int b); +int major(cdev_t x); +int minor(cdev_t x); +udev_t dev2udev(cdev_t x); +cdev_t udev2dev(udev_t x, int b); int uminor(udev_t dev); int umajor(udev_t dev); udev_t makeudev(int x, int y); diff --git a/sys/sys/tty.h b/sys/sys/tty.h index a7c5def8d2..cdbf794328 100644 --- a/sys/sys/tty.h +++ b/sys/sys/tty.h @@ -37,7 +37,7 @@ * * @(#)tty.h 8.6 (Berkeley) 1/21/94 * $FreeBSD: src/sys/sys/tty.h,v 1.53.2.1 2001/02/26 04:23:21 jlemon Exp $ - * $DragonFly: src/sys/sys/tty.h,v 1.11 2006/09/03 17:31:55 dillon Exp $ + * $DragonFly: src/sys/sys/tty.h,v 1.12 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_TTY_H_ @@ -87,7 +87,7 @@ struct tty { struct clist t_outq; /* Device output queue. */ long t_outcc; /* Output queue statistics. */ int t_line; /* Interface to device drivers. */ - dev_t t_dev; /* Device. */ + struct cdev *t_dev; /* Device. */ int t_state; /* Device and driver (TS*) state. */ int t_flags; /* Tty flags. */ int t_timeout; /* Timeout for ttywait() */ @@ -280,7 +280,7 @@ int ttyinput (int c, struct tty *tp); int ttylclose (struct tty *tp, int flag); struct tty *ttymalloc (struct tty *tp); int ttymodem (struct tty *tp, int flag); -int ttyopen (dev_t device, struct tty *tp); +int ttyopen (cdev_t device, struct tty *tp); int ttypoll (struct dev_poll_args *); int ttykqfilter (struct dev_kqfilter_args *); int ttyread (struct dev_read_args *); diff --git a/sys/sys/types.h b/sys/sys/types.h index 0dec91c38a..3060f2677d 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -37,7 +37,7 @@ * * @(#)types.h 8.6 (Berkeley) 2/19/95 * $FreeBSD: src/sys/sys/types.h,v 1.40.2.2 2001/04/21 14:53:06 ume Exp $ - * $DragonFly: src/sys/sys/types.h,v 1.15 2006/09/09 19:07:29 dillon Exp $ + * $DragonFly: src/sys/sys/types.h,v 1.16 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_TYPES_H_ @@ -118,21 +118,25 @@ typedef u_int64_t uoff_t; #endif /* - * XXX dev_t has different meanings for userland vs kernel compiles. What + * XXX cdev_t has different meanings for userland vs kernel compiles. What * do we do for _KERNEL_STRUCTURES ? For the moment stick with the userland * meaning as being the more compatible solution. */ -#ifdef _KERNEL + +#if defined(_KERNEL) || defined(_KERNEL_STRUCTURES) struct cdev; typedef u_int32_t udev_t; /* device number */ -typedef struct cdev *dev_t; /* obsolete */ typedef struct cdev *cdev_t; +#endif + +#ifdef _KERNEL + #define offsetof(type, field) __offsetof(type, field) -#else /* !_KERNEL */ +#else typedef u_int32_t dev_t; /* device number */ #define udev_t dev_t diff --git a/sys/sys/user.h b/sys/sys/user.h index 7525cd2d53..113f0538ce 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -32,7 +32,7 @@ * * @(#)user.h 8.2 (Berkeley) 9/23/93 * $FreeBSD: src/sys/sys/user.h,v 1.24.2.1 2001/10/11 08:20:18 peter Exp $ - * $DragonFly: src/sys/sys/user.h,v 1.14 2006/05/20 02:42:13 dillon Exp $ + * $DragonFly: src/sys/sys/user.h,v 1.15 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_USER_H_ @@ -119,7 +119,11 @@ struct kinfo_proc { pid_t e_ppid; /* parent process id */ pid_t e_pgid; /* process group id */ short e_jobc; /* job control counter */ +#ifdef _KERNEL udev_t e_tdev; /* controlling tty dev */ +#else + dev_t e_tdev; /* controlling tty dev */ +#endif pid_t e_tpgid; /* tty process group id */ struct session *e_tsess; /* tty session pointer */ #define WMESGLEN 7 diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 55352e01e9..64cb7631b7 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -32,7 +32,7 @@ * * @(#)vnode.h 8.7 (Berkeley) 2/4/94 * $FreeBSD: src/sys/sys/vnode.h,v 1.111.2.19 2002/12/29 18:19:53 dillon Exp $ - * $DragonFly: src/sys/sys/vnode.h,v 1.67 2006/09/09 19:07:29 dillon Exp $ + * $DragonFly: src/sys/sys/vnode.h,v 1.68 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _SYS_VNODE_H_ @@ -444,9 +444,9 @@ struct vattr; struct vnode; void addaliasu (struct vnode *vp, udev_t nvp_udev); -int v_associate_rdev(struct vnode *vp, dev_t dev); +int v_associate_rdev(struct vnode *vp, cdev_t dev); void v_release_rdev(struct vnode *vp); -int bdevvp (dev_t dev, struct vnode **vpp); +int bdevvp (cdev_t dev, struct vnode **vpp); struct vnode *allocvnode(int lktimeout, int lkflags); int getnewvnode (enum vtagtype tag, struct mount *mp, struct vnode **vpp, int timo, int lkflags); @@ -457,7 +457,7 @@ int spec_vnoperate (struct vop_generic_args *); int speedup_syncer (void); void vattr_null (struct vattr *vap); int vcount (struct vnode *vp); -int vfinddev (dev_t dev, enum vtype type, struct vnode **vpp); +int vfinddev (cdev_t dev, enum vtype type, struct vnode **vpp); void vfs_nadd_vnodeops_sysinit (void *); void vfs_nrm_vnodeops_sysinit (void *); void vfs_add_vnodeops(struct mount *, struct vop_ops *, struct vop_ops **); @@ -507,7 +507,7 @@ int vn_rdwr_inchunks (enum uio_rw rw, struct vnode *vp, caddr_t base, int len, off_t offset, enum uio_seg segflg, int ioflg, struct ucred *cred, int *aresid); int vn_stat (struct vnode *vp, struct stat *sb, struct ucred *cred); -dev_t vn_todev (struct vnode *vp); +cdev_t vn_todev (struct vnode *vp); void vfs_timestamp (struct timespec *); int vn_writechk (struct vnode *vp); int vop_stdopen (struct vop_open_args *ap); diff --git a/sys/vfs/gnu/ext2fs/dinode.h b/sys/vfs/gnu/ext2fs/dinode.h index 69a6b20d1c..e9e04df2b3 100644 --- a/sys/vfs/gnu/ext2fs/dinode.h +++ b/sys/vfs/gnu/ext2fs/dinode.h @@ -37,7 +37,7 @@ * * @(#)dinode.h 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/sys/ufs/ufs/dinode.h,v 1.7 1999/08/28 00:52:27 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/dinode.h,v 1.2 2006/04/05 21:06:22 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/dinode.h,v 1.3 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _VFS_GNU_EXT2FS_DINODE_H_ @@ -101,7 +101,7 @@ struct ext2_dinode { * The di_db fields may be overlaid with other information for * file types that do not have associated disk storage. Block * and character devices overlay the first data block with their - * dev_t value. Short symbolic links place their path in the + * cdev_t value. Short symbolic links place their path in the * di_db area. */ #define di_inumber di_u.inumber diff --git a/sys/vfs/gnu/ext2fs/ext2_extern.h b/sys/vfs/gnu/ext2fs/ext2_extern.h index a09e7b7535..fbc4b2ac71 100644 --- a/sys/vfs/gnu/ext2fs/ext2_extern.h +++ b/sys/vfs/gnu/ext2fs/ext2_extern.h @@ -38,7 +38,7 @@ * * @(#)ffs_extern.h 8.3 (Berkeley) 4/16/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_extern.h,v 1.22.6.1 2000/11/05 19:17:40 bde Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_extern.h,v 1.11 2006/05/06 02:43:13 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_extern.h,v 1.12 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _VFS_GNU_EXT2FS_EXT2_EXTERN_H_ @@ -97,7 +97,7 @@ void mark_buffer_dirty (struct buf *bh); int ext2_getlbns(struct vnode *, ext2_daddr_t, struct indir *, int *); void ext2_itimes(struct vnode *vp); -struct vnode *ext2_ihashget(dev_t, ino_t); +struct vnode *ext2_ihashget(cdev_t, ino_t); int ext2_ihashins(struct inode *); void ext2_ihashrem(struct inode *); void ext2_dirbad(struct inode *, doff_t, char *); @@ -109,8 +109,8 @@ int ext2_vnoperatefifo(struct vop_generic_args *); int ext2_vnoperatespec(struct vop_generic_args *); int ext2_uninit(struct vfsconf *); void ext2_ihashinit(void); -struct vnode *ext2_ihashlookup(dev_t dev, ino_t inum); -int ext2_ihashcheck(dev_t dev, ino_t inum); +struct vnode *ext2_ihashlookup(cdev_t dev, ino_t inum); +int ext2_ihashcheck(cdev_t dev, ino_t inum); /* * This macro allows the ufs code to distinguish between an EXT2 and a diff --git a/sys/vfs/gnu/ext2fs/ext2_ihash.c b/sys/vfs/gnu/ext2fs/ext2_ihash.c index ee761e9db7..f97849ba3c 100644 --- a/sys/vfs/gnu/ext2fs/ext2_ihash.c +++ b/sys/vfs/gnu/ext2fs/ext2_ihash.c @@ -32,7 +32,7 @@ * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 * $FreeBSD: src/sys/ufs/ufs/ufs_ihash.c,v 1.20 1999/08/28 00:52:29 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_ihash.c,v 1.3 2006/09/05 00:55:50 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_ihash.c,v 1.4 2006/09/10 01:26:40 dillon Exp $ */ #include @@ -89,7 +89,7 @@ ext2_uninit(struct vfsconf *vfc) * to it. If it is in core, return it, even if it is locked. */ struct vnode * -ext2_ihashlookup(dev_t dev, ino_t inum) +ext2_ihashlookup(cdev_t dev, ino_t inum) { struct inode *ip; lwkt_tokref ilock; @@ -115,7 +115,7 @@ ext2_ihashlookup(dev_t dev, ino_t inum) * play with the protected data structure. */ struct vnode * -ext2_ihashget(dev_t dev, ino_t inum) +ext2_ihashget(cdev_t dev, ino_t inum) { lwkt_tokref ilock; struct inode *ip; @@ -154,7 +154,7 @@ loop: * reallocate of its inode number before we have had a chance to recycle it. */ int -ext2_ihashcheck(dev_t dev, ino_t inum) +ext2_ihashcheck(cdev_t dev, ino_t inum) { lwkt_tokref ilock; struct inode *ip; diff --git a/sys/vfs/gnu/ext2fs/ext2_vfsops.c b/sys/vfs/gnu/ext2fs/ext2_vfsops.c index 096eb02579..bfd2b9cd4e 100644 --- a/sys/vfs/gnu/ext2fs/ext2_vfsops.c +++ b/sys/vfs/gnu/ext2fs/ext2_vfsops.c @@ -38,7 +38,7 @@ * * @(#)ffs_vfsops.c 8.8 (Berkeley) 4/18/94 * $FreeBSD: src/sys/gnu/ext2fs/ext2_vfsops.c,v 1.63.2.7 2002/07/01 00:18:51 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vfsops.c,v 1.49 2006/09/05 03:48:13 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2_vfsops.c,v 1.50 2006/09/10 01:26:40 dillon Exp $ */ #include "opt_quota.h" @@ -114,7 +114,7 @@ VFS_SET(ext2fs_vfsops, ext2fs, 0); static int ext2fs_inode_hash_lock; static int ext2_check_sb_compat (struct ext2_super_block *es, - dev_t dev, int ronly); + cdev_t dev, int ronly); static int compute_sb_data (struct vnode * devvp, struct ext2_super_block * es, struct ext2_sb_info * fs); @@ -443,7 +443,7 @@ ext2_check_descriptors(struct ext2_sb_info *sb) } static int -ext2_check_sb_compat(struct ext2_super_block *es, dev_t dev, int ronly) +ext2_check_sb_compat(struct ext2_super_block *es, cdev_t dev, int ronly) { if (es->s_magic != EXT2_SUPER_MAGIC) { printf("ext2fs: %s: wrong magic number %#x (expected %#x)\n", @@ -697,7 +697,7 @@ ext2_mountfs(struct vnode *devvp, struct mount *mp, struct ucred *cred) struct buf *bp; struct ext2_sb_info *fs; struct ext2_super_block * es; - dev_t dev; + cdev_t dev; struct partinfo dpart; int havepart = 0; int error, i, size; @@ -1060,7 +1060,7 @@ ext2_vget(struct mount *mp, ino_t ino, struct vnode **vpp) struct ext2mount *ump; struct buf *bp; struct vnode *vp; - dev_t dev; + cdev_t dev; int i, error; int used_blocks; diff --git a/sys/vfs/gnu/ext2fs/ext2mount.h b/sys/vfs/gnu/ext2fs/ext2mount.h index dca1081d3e..0c3a198888 100644 --- a/sys/vfs/gnu/ext2fs/ext2mount.h +++ b/sys/vfs/gnu/ext2fs/ext2mount.h @@ -32,7 +32,7 @@ * * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95 * $FreeBSD: src/sys/ufs/ufs/ufsmount.h,v 1.17 1999/12/29 04:55:06 peter Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2mount.h,v 1.3 2006/05/06 02:43:13 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/ext2mount.h,v 1.4 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _VFS_GNU_EXT2FS_EXT2MOUNT_H_ @@ -73,7 +73,7 @@ struct netexport; /* This structure describes the UFS specific mount structure data. */ struct ext2mount { struct mount *um_mountp; /* filesystem vfs structure */ - dev_t um_dev; /* device mounted */ + cdev_t um_dev; /* device mounted */ struct vnode *um_devvp; /* block device mounted vnode */ struct ext2_sb_info *um_e2fs; diff --git a/sys/vfs/gnu/ext2fs/inode.h b/sys/vfs/gnu/ext2fs/inode.h index 5e00fcee91..130404c007 100644 --- a/sys/vfs/gnu/ext2fs/inode.h +++ b/sys/vfs/gnu/ext2fs/inode.h @@ -37,7 +37,7 @@ * * @(#)inode.h 8.9 (Berkeley) 5/14/95 * $FreeBSD: src/sys/ufs/ufs/inode.h,v 1.28.2.2 2001/09/29 12:52:52 iedowse Exp $ - * $DragonFly: src/sys/vfs/gnu/ext2fs/inode.h,v 1.2 2006/04/05 21:06:22 dillon Exp $ + * $DragonFly: src/sys/vfs/gnu/ext2fs/inode.h,v 1.3 2006/09/10 01:26:40 dillon Exp $ */ #ifndef _VFS_GNU_EXT2FS_INODE_H_ @@ -80,7 +80,7 @@ struct inode { struct vnode *i_vnode;/* Vnode associated with this inode. */ struct vnode *i_devvp;/* Vnode for block I/O. */ uint32_t i_flag; /* flags, see below */ - dev_t i_dev; /* Device associated with the inode. */ + cdev_t i_dev; /* Device associated with the inode. */ ino_t i_number; /* The identity of the inode. */ int i_effnlink; /* i_nlink when I/O completes */ diff --git a/sys/vfs/hpfs/hpfs.h b/sys/vfs/hpfs/hpfs.h index 44cdcd218a..84d665856b 100644 --- a/sys/vfs/hpfs/hpfs.h +++ b/sys/vfs/hpfs/hpfs.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/hpfs/hpfs.h,v 1.1 1999/12/09 19:09:58 semenu Exp $ - * $DragonFly: src/sys/vfs/hpfs/hpfs.h,v 1.21 2006/08/12 00:26:20 dillon Exp $ + * $DragonFly: src/sys/vfs/hpfs/hpfs.h,v 1.22 2006/09/10 01:26:40 dillon Exp $ */ /*#define HPFS_DEBUG 10*/ @@ -314,7 +314,7 @@ struct hpfsmount { struct netexport hpm_export; struct mount * hpm_mp; struct vnode * hpm_devvp; - dev_t hpm_dev; + cdev_t hpm_dev; uid_t hpm_uid; gid_t hpm_gid; mode_t hpm_mode; @@ -343,7 +343,7 @@ struct hpfsnode { struct fnode h_fn; struct vnode * h_vp; struct vnode * h_devvp; - dev_t h_dev; + cdev_t h_dev; lsn_t h_no; uid_t h_uid; gid_t h_gid; @@ -397,9 +397,9 @@ struct vfsconf; /* Hash routines, too small to be separate header */ void hpfs_hphashinit (void); int hpfs_hphash_uninit (struct vfsconf *); -struct hpfsnode *hpfs_hphashlookup (dev_t, lsn_t); -struct hpfsnode *hpfs_hphashget (dev_t, lsn_t); -struct vnode *hpfs_hphashvget (dev_t, lsn_t); +struct hpfsnode *hpfs_hphashlookup (cdev_t, lsn_t); +struct hpfsnode *hpfs_hphashget (cdev_t, lsn_t); +struct vnode *hpfs_hphashvget (cdev_t, lsn_t); void hpfs_hphashins (struct hpfsnode *); void hpfs_hphashrem (struct hpfsnode *); extern struct lock hpfs_hphash_lock; diff --git a/sys/vfs/hpfs/hpfs_hash.c b/sys/vfs/hpfs/hpfs_hash.c index 330cb5f4b8..ee71b5e68d 100644 --- a/sys/vfs/hpfs/hpfs_hash.c +++ b/sys/vfs/hpfs/hpfs_hash.c @@ -32,7 +32,7 @@ * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 * $FreeBSD: src/sys/fs/hpfs/hpfs_hash.c,v 1.1 1999/12/09 19:09:58 semenu Exp $ - * $DragonFly: src/sys/vfs/hpfs/hpfs_hash.c,v 1.15 2006/09/05 00:55:50 dillon Exp $ + * $DragonFly: src/sys/vfs/hpfs/hpfs_hash.c,v 1.16 2006/09/10 01:26:40 dillon Exp $ */ #include @@ -93,7 +93,7 @@ hpfs_hphash_uninit(struct vfsconf *vfc) * to it. If it is in core, return it, even if it is locked. */ struct hpfsnode * -hpfs_hphashlookup(dev_t dev, lsn_t ino) +hpfs_hphashlookup(cdev_t dev, lsn_t ino) { struct hpfsnode *hp; lwkt_tokref ilock; @@ -109,7 +109,7 @@ hpfs_hphashlookup(dev_t dev, lsn_t ino) } struct vnode * -hpfs_hphashvget(dev_t dev, lsn_t ino) +hpfs_hphashvget(cdev_t dev, lsn_t ino) { struct hpfsnode *hp; lwkt_tokref ilock; diff --git a/sys/vfs/hpfs/hpfs_vfsops.c b/sys/vfs/hpfs/hpfs_vfsops.c index 6bccad0fb3..5b330790f6 100644 --- a/sys/vfs/hpfs/hpfs_vfsops.c +++ b/sys/vfs/hpfs/hpfs_vfsops.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/hpfs/hpfs_vfsops.c,v 1.3.2.2 2001/12/25 01:44:45 dillon Exp $ - * $DragonFly: src/sys/vfs/hpfs/hpfs_vfsops.c,v 1.37 2006/09/05 00:55:50 dillon Exp $ + * $DragonFly: src/sys/vfs/hpfs/hpfs_vfsops.c,v 1.38 2006/09/10 01:26:40 dillon Exp $ */ @@ -226,7 +226,7 @@ hpfs_mountfs(struct vnode *devvp, struct mount *mp, struct hpfs_args *argsp) struct hpfsmount *hpmp; struct buf *bp = NULL; struct vnode *vp; - dev_t dev; + cdev_t dev; dprintf(("hpfs_mountfs():\n")); /* diff --git a/sys/vfs/isofs/cd9660/cd9660_node.c b/sys/vfs/isofs/cd9660/cd9660_node.c index 15c6fe5219..5344752109 100644 --- a/sys/vfs/isofs/cd9660/cd9660_node.c +++ b/sys/vfs/isofs/cd9660/cd9660_node.c @@ -37,7 +37,7 @@ * * @(#)cd9660_node.c 8.2 (Berkeley) 1/23/94 * $FreeBSD: src/sys/isofs/cd9660/cd9660_node.c,v 1.29.2.1 2000/07/08 14:35:56 bp Exp $ - * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_node.c,v 1.19 2006/09/05 03:48:13 dillon Exp $ + * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_node.c,v 1.20 2006/09/10 01:26:40 dillon Exp $ */ #include @@ -106,7 +106,7 @@ cd9660_uninit(struct vfsconf *vfsp) * to it. If it is in core, but locked, wait for it. */ struct vnode * -cd9660_ihashget(dev_t dev, ino_t inum) +cd9660_ihashget(cdev_t dev, ino_t inum) { struct iso_node *ip; lwkt_tokref ilock; diff --git a/sys/vfs/isofs/cd9660/cd9660_node.h b/sys/vfs/isofs/cd9660/cd9660_node.h index 3eae541c8f..2b240dedbf 100644 --- a/sys/vfs/isofs/cd9660/cd9660_node.h +++ b/sys/vfs/isofs/cd9660/cd9660_node.h @@ -37,7 +37,7 @@ * * @(#)cd9660_node.h 8.6 (Berkeley) 5/14/95 * $FreeBSD: src/sys/isofs/cd9660/cd9660_node.h,v 1.20 1999/12/29 04:54:37 peter Exp $ - * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_node.h,v 1.9 2006/04/01 21:55:13 dillon Exp $ + * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_node.h,v 1.10 2006/09/10 01:26:40 dillon Exp $ */ #include @@ -68,7 +68,7 @@ struct iso_node { struct vnode *i_vnode; /* vnode associated with this inode */ struct vnode *i_devvp; /* vnode for block I/O */ u_long i_flag; /* see below */ - dev_t i_dev; /* device where inode resides */ + cdev_t i_dev; /* device where inode resides */ ino_t i_number; /* the identity of the inode */ /* we use the actual starting block of the file */ struct iso_mnt *i_mnt; /* filesystem associated with this inode */ @@ -121,7 +121,7 @@ void cd9660_defattr (struct iso_directory_record *, struct iso_node *, struct buf *, enum ISO_FTYPE); void cd9660_deftstamp (struct iso_directory_record *, struct iso_node *, struct buf *, enum ISO_FTYPE); -struct vnode *cd9660_ihashget (dev_t, ino_t); +struct vnode *cd9660_ihashget (cdev_t, ino_t); int cd9660_ihashins (struct iso_node *); int cd9660_tstamp_conv7 (u_char *, struct timespec *, enum ISO_FTYPE); int cd9660_tstamp_conv17 (u_char *, struct timespec *); diff --git a/sys/vfs/isofs/cd9660/cd9660_vfsops.c b/sys/vfs/isofs/cd9660/cd9660_vfsops.c index 6d09f206d5..b675380676 100644 --- a/sys/vfs/isofs/cd9660/cd9660_vfsops.c +++ b/sys/vfs/isofs/cd9660/cd9660_vfsops.c @@ -37,7 +37,7 @@ * * @(#)cd9660_vfsops.c 8.18 (Berkeley) 5/22/95 * $FreeBSD: src/sys/isofs/cd9660/cd9660_vfsops.c,v 1.74.2.7 2002/04/08 09:39:29 bde Exp $ - * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_vfsops.c,v 1.40 2006/09/05 00:55:50 dillon Exp $ + * $DragonFly: src/sys/vfs/isofs/cd9660/cd9660_vfsops.c,v 1.41 2006/09/10 01:26:41 dillon Exp $ */ #include @@ -100,7 +100,7 @@ MODULE_VERSION(cd9660, 1); * Called by vfs_mountroot when iso is going to be mounted as root. */ -static int iso_get_ssector (dev_t dev); +static int iso_get_ssector (cdev_t dev); static int iso_mountfs (struct vnode *devvp, struct mount *mp, struct iso_args *argp); @@ -110,7 +110,7 @@ static int iso_mountfs (struct vnode *devvp, struct mount *mp, * and return 0 if we fail, this is always a safe bet. */ static int -iso_get_ssector(dev_t dev) +iso_get_ssector(cdev_t dev) { struct ioc_toc_header h; struct ioc_read_toc_single_entry t; @@ -266,7 +266,7 @@ iso_mountfs(struct vnode *devvp, struct mount *mp, struct iso_args *argp) struct iso_mnt *isomp = NULL; struct buf *bp = NULL; struct buf *pribp = NULL, *supbp = NULL; - dev_t dev; + cdev_t dev; int error = EINVAL; int needclose = 0; int high_sierra = 0; @@ -690,7 +690,7 @@ cd9660_vget_internal(struct mount *mp, ino_t ino, struct vnode **vpp, struct iso_node *ip; struct buf *bp; struct vnode *vp; - dev_t dev; + cdev_t dev; int error; imp = VFSTOISOFS(mp); diff --git a/sys/vfs/isofs/cd9660/iso.h b/sys/vfs/isofs/cd9660/iso.h index 5c3a315ad0..8407bdbff0 100644 --- a/sys/vfs/isofs/cd9660/iso.h +++ b/sys/vfs/isofs/cd9660/iso.h @@ -37,7 +37,7 @@ * * @(#)iso.h 8.6 (Berkeley) 5/10/95 * $FreeBSD: src/sys/isofs/cd9660/iso.h,v 1.19.2.1 2000/07/08 14:35:56 bp Exp $ - * $DragonFly: src/sys/vfs/isofs/cd9660/iso.h,v 1.7 2006/03/24 18:35:33 dillon Exp $ + * $DragonFly: src/sys/vfs/isofs/cd9660/iso.h,v 1.8 2006/09/10 01:26:41 dillon Exp $ */ #define ISODCL(from, to) (to - from + 1) @@ -228,7 +228,7 @@ struct iso_mnt { int im_flags; struct mount *im_mountp; - dev_t im_dev; + cdev_t im_dev; struct vnode *im_devvp; int logical_block_size; diff --git a/sys/vfs/mfs/mfs_vfsops.c b/sys/vfs/mfs/mfs_vfsops.c index c8e61b5b33..3f9ec17af4 100644 --- a/sys/vfs/mfs/mfs_vfsops.c +++ b/sys/vfs/mfs/mfs_vfsops.c @@ -32,7 +32,7 @@ * * @(#)mfs_vfsops.c 8.11 (Berkeley) 6/19/95 * $FreeBSD: src/sys/ufs/mfs/mfs_vfsops.c,v 1.81.2.3 2001/07/04 17:35:21 tegge Exp $ - * $DragonFly: src/sys/vfs/mfs/mfs_vfsops.c,v 1.34 2006/07/28 02:17:41 dillon Exp $ + * $DragonFly: src/sys/vfs/mfs/mfs_vfsops.c,v 1.35 2006/09/10 01:26:41 dillon Exp $ */ @@ -121,7 +121,7 @@ VFS_SET(mfs_vfsops, mfs, 0); int mfsopen(struct dev_open_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; if (ap->a_oflags & FWRITE) return(EROFS); @@ -139,7 +139,7 @@ mfsclose(struct dev_close_args *ap) int mfsstrategy(struct dev_strategy_args *ap) { - dev_t dev = ap->a_head.a_dev; + cdev_t dev = ap->a_head.a_dev; struct bio *bio = ap->a_bio; struct buf *bp = bio->bio_buf; off_t boff = bio->bio_offset; @@ -236,7 +236,7 @@ mfs_mount(struct mount *mp, char *path, caddr_t data, struct ucred *cred) size_t size; int flags, err; int minnum; - dev_t dev; + cdev_t dev; /* * Use NULL path to flag a root mount diff --git a/sys/vfs/mfs/mfsnode.h b/sys/vfs/mfs/mfsnode.h index f7557a2266..742a206041 100644 --- a/sys/vfs/mfs/mfsnode.h +++ b/sys/vfs/mfs/mfsnode.h @@ -32,7 +32,7 @@ * * @(#)mfsnode.h 8.3 (Berkeley) 5/19/95 * $FreeBSD: src/sys/ufs/mfs/mfsnode.h,v 1.12.2.2 2001/07/04 17:35:21 tegge Exp $ - * $DragonFly: src/sys/vfs/mfs/mfsnode.h,v 1.5 2006/02/17 19:18:07 dillon Exp $ + * $DragonFly: src/sys/vfs/mfs/mfsnode.h,v 1.6 2006/09/10 01:26:41 dillon Exp $ */ #ifndef _UFS_MFS_MFSNODE_H_ @@ -48,7 +48,7 @@ struct mfsnode { long mfs_size; /* size of memory file system */ struct thread *mfs_td; /* supporting thread */ struct bio_queue_head bio_queue; /* list of I/O requests */ - dev_t mfs_dev; /* underlying device */ + cdev_t mfs_dev; /* underlying device */ int mfs_active; long mfs_spare[1]; }; diff --git a/sys/vfs/msdosfs/denode.h b/sys/vfs/msdosfs/denode.h index 5f1bf71d01..d8ab227e4e 100644 --- a/sys/vfs/msdosfs/denode.h +++ b/sys/vfs/msdosfs/denode.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/msdosfs/denode.h,v 1.20 1999/12/29 04:54:52 peter Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/denode.h,v 1.11 2006/05/06 02:43:14 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/denode.h,v 1.12 2006/09/10 01:26:41 dillon Exp $ */ /* $NetBSD: denode.h,v 1.25 1997/11/17 15:36:28 ws Exp $ */ /*- @@ -140,7 +140,7 @@ struct denode { struct vnode *de_vnode; /* addr of vnode we are part of */ struct vnode *de_devvp; /* vnode of blk dev we live on */ u_long de_flag; /* flag bits */ - dev_t de_dev; /* device where direntry lives */ + cdev_t de_dev; /* device where direntry lives */ u_long de_dirclust; /* cluster of the directory file containing this entry */ u_long de_diroffset; /* offset of this entry in the directory cluster */ u_long de_fndoffset; /* offset of found dir entry */ diff --git a/sys/vfs/msdosfs/msdosfs_denode.c b/sys/vfs/msdosfs/msdosfs_denode.c index 18a9de5566..7208b50822 100644 --- a/sys/vfs/msdosfs/msdosfs_denode.c +++ b/sys/vfs/msdosfs/msdosfs_denode.c @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/msdosfs/msdosfs_denode.c,v 1.47.2.3 2002/08/22 16:20:15 trhodes Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_denode.c,v 1.25 2006/09/05 00:55:50 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_denode.c,v 1.26 2006/09/10 01:26:41 dillon Exp $ */ /* $NetBSD: msdosfs_denode.c,v 1.28 1998/02/10 14:10:00 mrg Exp $ */ /*- @@ -96,7 +96,7 @@ union _qcvt { } static struct denode * - msdosfs_hashget (dev_t dev, u_long dirclust, u_long diroff); + msdosfs_hashget (cdev_t dev, u_long dirclust, u_long diroff); /*ARGSUSED*/ int @@ -122,7 +122,7 @@ msdosfs_uninit(struct vfsconf *vfsp) } static struct denode * -msdosfs_hashget(dev_t dev, u_long dirclust, u_long diroff) +msdosfs_hashget(cdev_t dev, u_long dirclust, u_long diroff) { struct denode *dep; lwkt_tokref ilock; @@ -240,7 +240,7 @@ deget(struct msdosfsmount *pmp, /* so we know the maj/min number */ struct denode **depp) /* returns the addr of the gotten denode */ { int error; - dev_t dev = pmp->pm_dev; + cdev_t dev = pmp->pm_dev; struct mount *mntp = pmp->pm_mountp; struct direntry *direntptr; struct denode *ldep; diff --git a/sys/vfs/msdosfs/msdosfs_vfsops.c b/sys/vfs/msdosfs/msdosfs_vfsops.c index 7696228dbd..4760775771 100644 --- a/sys/vfs/msdosfs/msdosfs_vfsops.c +++ b/sys/vfs/msdosfs/msdosfs_vfsops.c @@ -1,5 +1,5 @@ /* $FreeBSD: /usr/local/www/cvsroot/FreeBSD/src/sys/msdosfs/Attic/msdosfs_vfsops.c,v 1.60.2.8 2004/03/02 09:43:04 tjr Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vfsops.c,v 1.39 2006/09/05 03:48:13 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfs_vfsops.c,v 1.40 2006/09/10 01:26:41 dillon Exp $ */ /* $NetBSD: msdosfs_vfsops.c,v 1.51 1997/11/17 15:36:58 ws Exp $ */ /*- @@ -297,7 +297,7 @@ mountmsdosfs(struct vnode *devvp, struct mount *mp, struct msdosfs_args *argp) { struct msdosfsmount *pmp; struct buf *bp; - dev_t dev; + cdev_t dev; #ifndef __DragonFly__ struct partinfo dpart; int bsize = 0, dtype = 0, tmp; diff --git a/sys/vfs/msdosfs/msdosfsmount.h b/sys/vfs/msdosfs/msdosfsmount.h index afc6321e4c..b411258051 100644 --- a/sys/vfs/msdosfs/msdosfsmount.h +++ b/sys/vfs/msdosfs/msdosfsmount.h @@ -1,5 +1,5 @@ /* $FreeBSD: src/sys/msdosfs/msdosfsmount.h,v 1.20.2.2 2000/10/27 09:45:07 bde Exp $ */ -/* $DragonFly: src/sys/vfs/msdosfs/msdosfsmount.h,v 1.7 2006/03/24 22:39:22 dillon Exp $ */ +/* $DragonFly: src/sys/vfs/msdosfs/msdosfsmount.h,v 1.8 2006/09/10 01:26:41 dillon Exp $ */ /* $NetBSD: msdosfsmount.h,v 1.17 1997/11/17 15:37:07 ws Exp $ */ /*- @@ -65,7 +65,7 @@ MALLOC_DECLARE(M_MSDOSFSMNT); */ struct msdosfsmount { struct mount *pm_mountp;/* vfs mount struct for this fs */ - dev_t pm_dev; /* block special device mounted */ + cdev_t pm_dev; /* block special device mounted */ uid_t pm_uid; /* uid to set as owner of the files */ gid_t pm_gid; /* gid to set as owner of the files */ mode_t pm_mask; /* mask to and with file protection bits */ diff --git a/sys/vfs/ntfs/ntfs.h b/sys/vfs/ntfs/ntfs.h index b743f91fca..b31213cb78 100644 --- a/sys/vfs/ntfs/ntfs.h +++ b/sys/vfs/ntfs/ntfs.h @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ntfs/ntfs.h,v 1.8.2.2 2001/10/12 22:08:49 semenu Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs.h,v 1.14 2006/08/12 00:26:21 dillon Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs.h,v 1.15 2006/09/10 01:26:41 dillon Exp $ */ /*#define NTFS_DEBUG 1*/ @@ -248,7 +248,7 @@ struct bootfile { struct ntfsmount { struct mount *ntm_mountp; /* filesystem vfs structure */ struct bootfile ntm_bootfile; - dev_t ntm_dev; /* device mounted */ + cdev_t ntm_dev; /* device mounted */ struct vnode *ntm_devvp; /* block device mounted vnode */ struct vnode *ntm_sysvn[NTFS_SYSNODESNUM]; u_int32_t ntm_bpmftrec; diff --git a/sys/vfs/ntfs/ntfs_ihash.c b/sys/vfs/ntfs/ntfs_ihash.c index 9eddcdd1a9..bc26e2e478 100644 --- a/sys/vfs/ntfs/ntfs_ihash.c +++ b/sys/vfs/ntfs/ntfs_ihash.c @@ -34,7 +34,7 @@ * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 * $FreeBSD: src/sys/ntfs/ntfs_ihash.c,v 1.7 1999/12/03 20:37:39 semenu Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs_ihash.c,v 1.11 2006/09/05 00:55:50 dillon Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs_ihash.c,v 1.12 2006/09/10 01:26:41 dillon Exp $ */ #include @@ -94,7 +94,7 @@ ntfs_nthash_uninit(struct vfsconf *vfc) * to it. If it is in core, return it, even if it is locked. */ struct ntnode * -ntfs_nthashlookup(dev_t dev, ino_t inum) +ntfs_nthashlookup(cdev_t dev, ino_t inum) { struct ntnode *ip; lwkt_tokref ilock; diff --git a/sys/vfs/ntfs/ntfs_ihash.h b/sys/vfs/ntfs/ntfs_ihash.h index b4b7dc3f8a..a0e643fcaa 100644 --- a/sys/vfs/ntfs/ntfs_ihash.h +++ b/sys/vfs/ntfs/ntfs_ihash.h @@ -26,14 +26,14 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ntfs/ntfs_ihash.h,v 1.5 1999/12/03 20:37:39 semenu Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs_ihash.h,v 1.4 2003/10/19 18:11:37 hmp Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs_ihash.h,v 1.5 2006/09/10 01:26:41 dillon Exp $ */ struct vfsconf; extern struct lock ntfs_hashlock; void ntfs_nthashinit (void); int ntfs_nthash_uninit (struct vfsconf *); -struct ntnode *ntfs_nthashlookup (dev_t, ino_t); -struct ntnode *ntfs_nthashget (dev_t, ino_t); +struct ntnode *ntfs_nthashlookup (cdev_t, ino_t); +struct ntnode *ntfs_nthashget (cdev_t, ino_t); void ntfs_nthashins (struct ntnode *); void ntfs_nthashrem (register struct ntnode *); diff --git a/sys/vfs/ntfs/ntfs_inode.h b/sys/vfs/ntfs/ntfs_inode.h index d6d18a117d..237a485f20 100644 --- a/sys/vfs/ntfs/ntfs_inode.h +++ b/sys/vfs/ntfs/ntfs_inode.h @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ntfs/ntfs_inode.h,v 1.6 1999/12/03 20:37:39 semenu Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs_inode.h,v 1.6 2005/11/19 17:19:50 dillon Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs_inode.h,v 1.7 2006/09/10 01:26:41 dillon Exp $ */ /* These flags are kept in i_flag. */ @@ -59,7 +59,7 @@ struct ntnode { struct vnode *i_devvp; /* vnode of blk dev we live on */ - dev_t i_dev; /* Device associated with the inode. */ + cdev_t i_dev; /* Device associated with the inode. */ LIST_ENTRY(ntnode) i_hash; struct ntnode *i_next; diff --git a/sys/vfs/ntfs/ntfs_vfsops.c b/sys/vfs/ntfs/ntfs_vfsops.c index 20b844c774..4fcb25e0ae 100644 --- a/sys/vfs/ntfs/ntfs_vfsops.c +++ b/sys/vfs/ntfs/ntfs_vfsops.c @@ -26,7 +26,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/ntfs/ntfs_vfsops.c,v 1.20.2.5 2001/12/25 01:44:45 dillon Exp $ - * $DragonFly: src/sys/vfs/ntfs/ntfs_vfsops.c,v 1.41 2006/09/09 19:07:29 dillon Exp $ + * $DragonFly: src/sys/vfs/ntfs/ntfs_vfsops.c,v 1.42 2006/09/10 01:26:41 dillon Exp $ */ @@ -393,7 +393,7 @@ ntfs_mountfs(struct vnode *devvp, struct mount *mp, struct ntfs_args *argsp, { struct buf *bp; struct ntfsmount *ntmp; - dev_t dev; + cdev_t dev; int error, ronly, ncount, i; struct vnode *vp; diff --git a/sys/vfs/specfs/spec_vnops.c b/sys/vfs/specfs/spec_vnops.c index b31011a3a8..878fd73d02 100644 --- a/sys/vfs/specfs/spec_vnops.c +++ b/sys/vfs/specfs/spec_vnops.c @@ -32,7 +32,7 @@ * * @(#)spec_vnops.c 8.14 (Berkeley) 5/21/95 * $FreeBSD: src/sys/miscfs/specfs/spec_vnops.c,v 1.131.2.4 2001/02/26 04:23:20 jlemon Exp $ - * $DragonFly: src/sys/vfs/specfs/spec_vnops.c,v 1.48 2006/08/12 00:26:21 dillon Exp $ + * $DragonFly: src/sys/vfs/specfs/spec_vnops.c,v 1.49 2006/09/10 01:26:41 dillon Exp $ */ #include @@ -138,7 +138,7 @@ static int spec_open(struct vop_open_args *ap) { struct vnode *vp = ap->a_vp; - dev_t dev; + cdev_t dev; int error; int isblk = (vp->v_type == VBLK) ? 1 : 0; const char *cp; @@ -269,7 +269,7 @@ spec_open(struct vop_open_args *ap) if ((dev_dflags(dev) & D_DISK) == 0) { cp = devtoname(dev); if (*cp == '#') { - printf("WARNING: driver %s should register devices with make_dev() (dev_t = \"%s\")\n", + printf("WARNING: driver %s should register devices with make_dev() (cdev_t = \"%s\")\n", dev_dname(dev), cp); } } @@ -308,7 +308,7 @@ spec_read(struct vop_read_args *ap) struct vnode *vp; struct thread *td; struct uio *uio; - dev_t dev; + cdev_t dev; int error; vp = ap->a_vp; @@ -340,7 +340,7 @@ spec_write(struct vop_write_args *ap) struct vnode *vp; struct thread *td; struct uio *uio; - dev_t dev; + cdev_t dev; int error; vp = ap->a_vp; @@ -367,7 +367,7 @@ spec_write(struct vop_write_args *ap) static int spec_ioctl(struct vop_ioctl_args *ap) { - dev_t dev; + cdev_t dev; if ((dev = ap->a_vp->v_rdev) == NULL) return (EBADF); /* device was revoked */ @@ -383,7 +383,7 @@ spec_ioctl(struct vop_ioctl_args *ap) static int spec_poll(struct vop_poll_args *ap) { - dev_t dev; + cdev_t dev; if ((dev = ap->a_vp->v_rdev) == NULL) return (EBADF); /* device was revoked */ @@ -397,7 +397,7 @@ spec_poll(struct vop_poll_args *ap) static int spec_kqfilter(struct vop_kqfilter_args *ap) { - dev_t dev; + cdev_t dev; if ((dev = ap->a_vp->v_rdev) == NULL) return (EBADF); /* device was revoked */ @@ -542,7 +542,7 @@ spec_close(struct vop_close_args *ap) { struct proc *p = curproc; struct vnode *vp = ap->a_vp; - dev_t dev = vp->v_rdev; + cdev_t dev = vp->v_rdev; int error; int needrelock; diff --git a/sys/vfs/udf/udf.h b/sys/vfs/udf/udf.h index b797b81bd5..ee6338af3c 100644 --- a/sys/vfs/udf/udf.h +++ b/sys/vfs/udf/udf.h @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/udf/udf.h,v 1.6 2003/11/05 06:56:08 scottl Exp $ - * $DragonFly: src/sys/vfs/udf/udf.h,v 1.2 2006/03/24 18:35:34 dillon Exp $ + * $DragonFly: src/sys/vfs/udf/udf.h,v 1.3 2006/09/10 01:26:41 dillon Exp $ */ #define UDF_HASHTBLSIZE 100 @@ -34,7 +34,7 @@ struct udf_node { struct vnode *i_vnode; struct vnode *i_devvp; struct udf_mnt *udfmp; - dev_t i_dev; + cdev_t i_dev; ino_t hash_id; long diroff; struct file_entry *fentry; @@ -43,7 +43,7 @@ struct udf_node { struct udf_mnt { int im_flags; struct mount *im_mountp; - dev_t im_dev; + cdev_t im_dev; struct vnode *im_devvp; struct netexport im_export; int bsize; diff --git a/sys/vfs/udf/udf_vfsops.c b/sys/vfs/udf/udf_vfsops.c index 2951e69a92..c02ab3aa49 100644 --- a/sys/vfs/udf/udf_vfsops.c +++ b/sys/vfs/udf/udf_vfsops.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/fs/udf/udf_vfsops.c,v 1.16 2003/11/05 06:56:08 scottl Exp $ - * $DragonFly: src/sys/vfs/udf/udf_vfsops.c,v 1.22 2006/09/05 00:55:51 dillon Exp $ + * $DragonFly: src/sys/vfs/udf/udf_vfsops.c,v 1.23 2006/09/10 01:26:41 dillon Exp $ */ /* udf_vfsops.c */ @@ -230,7 +230,7 @@ udf_mountfs(struct vnode *devvp, struct mount *mp) struct logvol_desc *lvd; struct fileset_desc *fsd; struct file_entry *root_fentry; - dev_t dev; + cdev_t dev; uint32_t sector, size, mvds_start, mvds_end; uint32_t fsd_offset = 0; uint16_t part_num = 0, fsd_part = 0; diff --git a/sys/vfs/ufs/dinode.h b/sys/vfs/ufs/dinode.h index b2dff96568..5752ec3aa3 100644 --- a/sys/vfs/ufs/dinode.h +++ b/sys/vfs/ufs/dinode.h @@ -37,7 +37,7 @@ * * @(#)dinode.h 8.3 (Berkeley) 1/21/94 * $FreeBSD: src/sys/ufs/ufs/dinode.h,v 1.7 1999/08/28 00:52:27 peter Exp $ - * $DragonFly: src/sys/vfs/ufs/dinode.h,v 1.6 2006/04/03 02:02:37 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/dinode.h,v 1.7 2006/09/10 01:26:41 dillon Exp $ */ #ifndef _VFS_UFS_DINODE_H_ @@ -104,7 +104,7 @@ struct ufs1_dinode { * The di_db fields may be overlaid with other information for * file types that do not have associated disk storage. Block * and character devices overlay the first data block with their - * dev_t value. Short symbolic links place their path in the + * cdev_t value. Short symbolic links place their path in the * di_db area. */ #define di_inumber di_u.inumber diff --git a/sys/vfs/ufs/ffs_vfsops.c b/sys/vfs/ufs/ffs_vfsops.c index 3da3ccb1ef..4a5f65e142 100644 --- a/sys/vfs/ufs/ffs_vfsops.c +++ b/sys/vfs/ufs/ffs_vfsops.c @@ -32,7 +32,7 @@ * * @(#)ffs_vfsops.c 8.31 (Berkeley) 5/20/95 * $FreeBSD: src/sys/ufs/ffs/ffs_vfsops.c,v 1.117.2.10 2002/06/23 22:34:52 iedowse Exp $ - * $DragonFly: src/sys/vfs/ufs/ffs_vfsops.c,v 1.49 2006/09/05 00:55:51 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ffs_vfsops.c,v 1.50 2006/09/10 01:26:41 dillon Exp $ */ #include "opt_quota.h" @@ -441,7 +441,7 @@ ffs_reload(struct mount *mp, struct ucred *cred) struct buf *bp; struct fs *fs, *newfs; struct partinfo dpart; - dev_t dev; + cdev_t dev; int i, blks, size, error; struct scaninfo scaninfo; int32_t *lp; @@ -588,7 +588,7 @@ ffs_mountfs(struct vnode *devvp, struct mount *mp, struct malloc_type *mtype) struct ufsmount *ump; struct buf *bp; struct fs *fs; - dev_t dev; + cdev_t dev; struct partinfo dpart; void *space; int error, i, blks, size, ronly; @@ -1060,7 +1060,7 @@ ffs_vget(struct mount *mp, ino_t ino, struct vnode **vpp) struct ufsmount *ump; struct buf *bp; struct vnode *vp; - dev_t dev; + cdev_t dev; int error; ump = VFSTOUFS(mp); diff --git a/sys/vfs/ufs/inode.h b/sys/vfs/ufs/inode.h index 02e292cd3e..98de003e74 100644 --- a/sys/vfs/ufs/inode.h +++ b/sys/vfs/ufs/inode.h @@ -37,7 +37,7 @@ * * @(#)inode.h 8.9 (Berkeley) 5/14/95 * $FreeBSD: src/sys/ufs/ufs/inode.h,v 1.28.2.2 2001/09/29 12:52:52 iedowse Exp $ - * $DragonFly: src/sys/vfs/ufs/inode.h,v 1.11 2006/04/03 02:02:37 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/inode.h,v 1.12 2006/09/10 01:26:41 dillon Exp $ */ #ifndef _UFS_UFS_INODE_H_ @@ -85,7 +85,7 @@ struct inode { struct vnode *i_vnode;/* Vnode associated with this inode. */ struct vnode *i_devvp;/* Vnode for block I/O. */ uint32_t i_flag; /* flags, see below */ - dev_t i_dev; /* Device associated with the inode. */ + cdev_t i_dev; /* Device associated with the inode. */ ino_t i_number; /* The identity of the inode. */ int i_effnlink; /* i_nlink when I/O completes */ struct fs *i_fs; /* Associated filesystem */ diff --git a/sys/vfs/ufs/ufs_extern.h b/sys/vfs/ufs/ufs_extern.h index 8558dd407c..79489107d2 100644 --- a/sys/vfs/ufs/ufs_extern.h +++ b/sys/vfs/ufs/ufs_extern.h @@ -32,7 +32,7 @@ * * @(#)ufs_extern.h 8.10 (Berkeley) 5/14/95 * $FreeBSD: src/sys/ufs/ufs/ufs_extern.h,v 1.27.2.1 2000/12/28 11:01:46 ps Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_extern.h,v 1.14 2006/04/03 02:02:37 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_extern.h,v 1.15 2006/09/10 01:26:41 dillon Exp $ */ #ifndef _VFS_UFS_EXTERN_H_ @@ -77,12 +77,12 @@ int ufs_dirremove(struct vnode *, struct inode *, int, int); int ufs_dirrewrite(struct inode *, struct inode *, ino_t, int, int); int ufs_getlbns(struct vnode *, ufs_daddr_t, struct indir *, int *); struct vnode * - ufs_ihashget(dev_t, ino_t); -int ufs_ihashcheck(dev_t, ino_t); + ufs_ihashget(cdev_t, ino_t); +int ufs_ihashcheck(cdev_t, ino_t); void ufs_ihashinit(void); int ufs_ihashins(struct inode *); struct vnode * - ufs_ihashlookup(dev_t, ino_t); + ufs_ihashlookup(cdev_t, ino_t); void ufs_ihashrem(struct inode *); int ufs_inactive(struct vop_inactive_args *); int ufs_init(struct vfsconf *); diff --git a/sys/vfs/ufs/ufs_ihash.c b/sys/vfs/ufs/ufs_ihash.c index 2ac0205f58..a25b266a5a 100644 --- a/sys/vfs/ufs/ufs_ihash.c +++ b/sys/vfs/ufs/ufs_ihash.c @@ -32,7 +32,7 @@ * * @(#)ufs_ihash.c 8.7 (Berkeley) 5/17/95 * $FreeBSD: src/sys/ufs/ufs/ufs_ihash.c,v 1.20 1999/08/28 00:52:29 peter Exp $ - * $DragonFly: src/sys/vfs/ufs/ufs_ihash.c,v 1.18 2006/09/05 00:55:51 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufs_ihash.c,v 1.19 2006/09/10 01:26:41 dillon Exp $ */ #include @@ -88,7 +88,7 @@ ufs_uninit(struct vfsconf *vfc) * to it. If it is in core, return it, even if it is locked. */ struct vnode * -ufs_ihashlookup(dev_t dev, ino_t inum) +ufs_ihashlookup(cdev_t dev, ino_t inum) { struct inode *ip; lwkt_tokref ilock; @@ -114,7 +114,7 @@ ufs_ihashlookup(dev_t dev, ino_t inum) * play with the protected data structure. */ struct vnode * -ufs_ihashget(dev_t dev, ino_t inum) +ufs_ihashget(cdev_t dev, ino_t inum) { lwkt_tokref ilock; struct inode *ip; @@ -153,7 +153,7 @@ loop: * reallocate of its inode number before we have had a chance to recycle it. */ int -ufs_ihashcheck(dev_t dev, ino_t inum) +ufs_ihashcheck(cdev_t dev, ino_t inum) { lwkt_tokref ilock; struct inode *ip; diff --git a/sys/vfs/ufs/ufsmount.h b/sys/vfs/ufs/ufsmount.h index b7eff46bf5..7415eb05a6 100644 --- a/sys/vfs/ufs/ufsmount.h +++ b/sys/vfs/ufs/ufsmount.h @@ -32,7 +32,7 @@ * * @(#)ufsmount.h 8.6 (Berkeley) 3/30/95 * $FreeBSD: src/sys/ufs/ufs/ufsmount.h,v 1.17 1999/12/29 04:55:06 peter Exp $ - * $DragonFly: src/sys/vfs/ufs/ufsmount.h,v 1.9 2006/05/26 17:07:48 dillon Exp $ + * $DragonFly: src/sys/vfs/ufs/ufsmount.h,v 1.10 2006/09/10 01:26:41 dillon Exp $ */ #ifndef _VFS_UFS_UFSMOUNT_H_ @@ -73,7 +73,7 @@ struct netexport; /* This structure describes the UFS specific mount structure data. */ struct ufsmount { struct mount *um_mountp; /* filesystem vfs structure */ - dev_t um_dev; /* device mounted */ + cdev_t um_dev; /* device mounted */ struct vnode *um_devvp; /* block device mounted vnode */ union { /* pointer to superblock */ diff --git a/sys/vm/device_pager.c b/sys/vm/device_pager.c index 61115373b4..0c97a2e121 100644 --- a/sys/vm/device_pager.c +++ b/sys/vm/device_pager.c @@ -37,7 +37,7 @@ * * @(#)device_pager.c 8.1 (Berkeley) 6/11/93 * $FreeBSD: src/sys/vm/device_pager.c,v 1.46.2.1 2000/08/02 21:54:37 peter Exp $ - * $DragonFly: src/sys/vm/device_pager.c,v 1.10 2006/03/27 01:54:18 dillon Exp $ + * $DragonFly: src/sys/vm/device_pager.c,v 1.11 2006/09/10 01:26:41 dillon Exp $ */ #include @@ -94,7 +94,7 @@ dev_pager_init(void) static vm_object_t dev_pager_alloc(void *handle, off_t size, vm_prot_t prot, off_t foff) { - dev_t dev; + cdev_t dev; vm_object_t object; unsigned int npages; vm_offset_t off; @@ -184,7 +184,7 @@ dev_pager_getpages(vm_object_t object, vm_page_t *m, int count, int reqpage) vm_offset_t offset; vm_paddr_t paddr; vm_page_t page; - dev_t dev; + cdev_t dev; int prot; int i; diff --git a/sys/vm/vm_swap.c b/sys/vm/vm_swap.c index d040079c56..6ee24bf222 100644 --- a/sys/vm/vm_swap.c +++ b/sys/vm/vm_swap.c @@ -32,7 +32,7 @@ * * @(#)vm_swap.c 8.5 (Berkeley) 2/17/94 * $FreeBSD: src/sys/vm/vm_swap.c,v 1.96.2.2 2001/10/14 18:46:47 iedowse Exp $ - * $DragonFly: src/sys/vm/vm_swap.c,v 1.29 2006/09/09 19:34:47 dillon Exp $ + * $DragonFly: src/sys/vm/vm_swap.c,v 1.30 2006/09/10 01:26:41 dillon Exp $ */ #include "opt_swap.h" @@ -232,7 +232,7 @@ swaponvp(struct thread *td, struct vnode *vp, u_long nblks) struct swdevt *sp; swblk_t vsbase; swblk_t dvbase; - dev_t dev; + cdev_t dev; int index; int error; long blk; diff --git a/test/sysperf/Makefile b/test/sysperf/Makefile index 10677e7baf..760f923828 100644 --- a/test/sysperf/Makefile +++ b/test/sysperf/Makefile @@ -1,11 +1,11 @@ # -# $DragonFly: src/test/sysperf/Makefile,v 1.15 2006/05/18 02:22:46 dillon Exp $ +# $DragonFly: src/test/sysperf/Makefile,v 1.16 2006/09/10 01:26:41 dillon Exp $ # TARGETS=/tmp/sc1 /tmp/sc2 /tmp/sc3 /tmp/sc4 /tmp/sc5 \ - /tmp/loop1 /tmp/loop2 /tmp/loop3 \ + /tmp/loop1 /tmp/loop2 /tmp/loop3 /tmp/loop4 \ /tmp/call1 /tmp/call2 /tmp/call3 /tmp/cmp \ - /tmp/mt2 /tmp/mt3 \ + /tmp/mt2 /tmp/mt3 /tmp/mt4 \ /tmp/fork1 /tmp/pipe1 /tmp/pipe2 \ /tmp/sw1 /tmp/sw2 /tmp/sw3 \ /tmp/mbw1 \ @@ -55,6 +55,9 @@ all: $(TARGETS) /tmp/loop3: loop3.c blib.c $(CC) $(CFLAGS) loop3.c blib.c -o /tmp/loop3 +/tmp/loop4: loop4.c blib.c + $(CC) $(CFLAGS) loop4.c blib.c -o /tmp/loop4 + /tmp/call1: call1.c blib.c $(CC) $(CFLAGS) call1.c blib.c -o /tmp/call1 @@ -79,6 +82,9 @@ all: $(TARGETS) /tmp/mt3: mutex3.c blib.c mtx.s $(CC) $(CFLAGS) mutex3.c blib.c mtx.s -o /tmp/mt3 +/tmp/mt4: mutex4.c blib.c mtx.s + $(CC) $(CFLAGS) mutex4.c blib.c mtx.s -o /tmp/mt4 + /tmp/sw1: quicksw1.c blib.c sw.S $(CC) $(CFLAGS) -DUSE_ALL quicksw1.c blib.c sw.S -o /tmp/sw1 -- 2.41.0