diff options
author | Bruce Evans <bde@FreeBSD.org> | 1996-01-27 04:18:15 +0000 |
---|---|---|
committer | Bruce Evans <bde@FreeBSD.org> | 1996-01-27 04:18:15 +0000 |
commit | c8f2fe8db8376f68a0670c9e73d23329361c335f (patch) | |
tree | f93e309637079217e5820d51bef98f295ccb958a /sys/sys/diskslice.h | |
parent | dd87702a5125d2916c0da0575f40dceeb5f3970d (diff) | |
download | src-c8f2fe8db8376f68a0670c9e73d23329361c335f.tar.gz src-c8f2fe8db8376f68a0670c9e73d23329361c335f.zip |
First attempt at creating devfs entries for sliced devices. Doesn't
quite work yet, so the heart of it is disabled.
Added bdev and cdev args to dsopen().
drivers:
Fixed device names, links, minor numbers and modes.
wd.c:
Started actually supporting devfs.
diskslice.h:
Added devfs tokens to structs (currently 576 of them per disk! :-().
subr_diskslice.c:
Create devfs entries in dsopen() and (unsuccessfully) attempt to make
them go away at the right times. DEVFS is #undefed at the start so
that this shouldn't cause problems.
Notes
Notes:
svn path=/head/; revision=13647
Diffstat (limited to 'sys/sys/diskslice.h')
-rw-r--r-- | sys/sys/diskslice.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/sys/diskslice.h b/sys/sys/diskslice.h index 6721e339d767..f766c9d3dd0a 100644 --- a/sys/sys/diskslice.h +++ b/sys/sys/diskslice.h @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: diskslice.h,v 1.9 1995/05/08 16:27:10 bde Exp $ + * $Id: diskslice.h,v 1.10 1995/05/30 08:14:19 rgrimes Exp $ */ #ifndef _SYS_DISKSLICE_H_ @@ -46,6 +46,17 @@ struct diskslice { int ds_type; /* (foreign) slice type */ struct dkbad_intern *ds_bad; /* bad sector table, if any */ struct disklabel *ds_label; /* BSD label, if any */ + void *ds_bdev; /* devfs token for whole slice */ + void *ds_cdev; /* devfs token for raw whole slice */ +#ifdef MAXPARTITIONS /* XXX don't depend on dislabel.h */ +#if MAXPARTITIONS != 8 /* but check consistency if possible */ +#error "inconsistent MAXPARTITIONS" +#endif +#else +#define MAXPARTITIONS 8 +#endif + void *ds_bdevs[MAXPARTITIONS]; /* XXX s.b. in label */ + void *ds_cdevs[MAXPARTITIONS]; /* XXX s.b. in label */ u_char ds_bopenmask; /* bdevs open */ u_char ds_copenmask; /* cdevs open */ u_char ds_openmask; /* [bc]devs open */ @@ -81,6 +92,8 @@ struct diskslice { #endif struct diskslices { + struct bdevsw *dss_bdevsw; /* for containing device */ + struct cdevsw *dss_cdevsw; /* for containing device */ int dss_first_bsd_slice; /* COMPATIBILTY_SLICE is mapped here */ u_int dss_nslices; /* actual dimension of dss_slices[] */ struct diskslice @@ -112,7 +125,8 @@ char *dsname __P((char *dname, int unit, int slice, int part, char *partname)); int dsopen __P((char *dname, dev_t dev, int mode, struct diskslices **sspp, struct disklabel *lp, d_strategy_t *strat, - ds_setgeom_t *setgeom)); + ds_setgeom_t *setgeom, struct bdevsw *bdevsw, + struct cdevsw *cdevsw)); int dssize __P((dev_t dev, struct diskslices **sspp, d_open_t dopen, d_close_t dclose)); |