diff options
author | dfr <dfr@FreeBSD.org> | 1999-05-09 11:27:41 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1999-05-09 11:27:41 +0000 |
commit | 94c48499c77c22afb20f9d550f5a0fca5e77de74 (patch) | |
tree | f526b976cab91fa64a49b3c516c98763852059f0 /sys/kern/subr_diskslice.c | |
parent | e8f4fc4a1d3555ba5d3ce423b41c82b7fce94a63 (diff) | |
download | FreeBSD-src-94c48499c77c22afb20f9d550f5a0fca5e77de74.zip FreeBSD-src-94c48499c77c22afb20f9d550f5a0fca5e77de74.tar.gz |
Hack the diskslice stuff so that it allows the alpha sysinstall to
manipulate the disklabel. This is almost certainly not the right way
to do it but I'm desperate.
Diffstat (limited to 'sys/kern/subr_diskslice.c')
-rw-r--r-- | sys/kern/subr_diskslice.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/kern/subr_diskslice.c b/sys/kern/subr_diskslice.c index d03cf34..b9cf0c0 100644 --- a/sys/kern/subr_diskslice.c +++ b/sys/kern/subr_diskslice.c @@ -43,7 +43,7 @@ * from: wd.c,v 1.55 1994/10/22 01:57:12 phk Exp $ * 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 $ - * $Id: subr_diskslice.c,v 1.61 1998/12/10 19:57:00 eivind Exp $ + * $Id: subr_diskslice.c,v 1.62 1999/05/07 09:10:10 phk Exp $ */ #include "opt_devfs.h" @@ -585,8 +585,10 @@ dsioctl(dname, dev, cmd, data, flags, sspp, strat, setgeom) return (error); case DIOCWLABEL: +#ifndef __alpha__ if (slice == WHOLE_DISK_SLICE) return (ENODEV); +#endif if (!(flags & FWRITE)) return (EBADF); set_ds_wlabel(ssp, slice, *(int *)data != 0); @@ -802,7 +804,11 @@ dsopen(dname, dev, mode, flags, sspp, lp, strat, setgeom, cdevsw) */ for (slice = 0; slice < ssp->dss_nslices; slice++) { sp = &ssp->dss_slices[slice]; - if (sp->ds_label != NULL) + if (sp->ds_label != NULL +#ifdef __alpha__ + && slice != WHOLE_DISK_SLICE +#endif + ) continue; dev1 = dkmodslice(dkmodpart(dev, RAW_PART), slice); sname = dsname(dname, unit, slice, RAW_PART, partname); |