diff options
| author | Poul-Henning Kamp <phk@FreeBSD.org> | 2001-05-26 08:27:58 +0000 |
|---|---|---|
| committer | Poul-Henning Kamp <phk@FreeBSD.org> | 2001-05-26 08:27:58 +0000 |
| commit | 3344c5a17e9322ec55ad4e3026e2a1e547b89938 (patch) | |
| tree | d64002caeb72adbdfba8967693335078ae1cb1ff /sys/kern/subr_diskslice.c | |
| parent | caff01c2764f056e427ef4cd20a37357c7d4b3f2 (diff) | |
Notes
Diffstat (limited to 'sys/kern/subr_diskslice.c')
| -rw-r--r-- | sys/kern/subr_diskslice.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/kern/subr_diskslice.c b/sys/kern/subr_diskslice.c index 9d9c705f6f3a..0e20032de10d 100644 --- a/sys/kern/subr_diskslice.c +++ b/sys/kern/subr_diskslice.c @@ -648,7 +648,6 @@ dsopen(dev, mode, flags, sspp, lp) struct disklabel *lp1; char *msg; u_char mask; - bool_t need_init; int part; char partname[2]; int slice; @@ -671,10 +670,9 @@ dsopen(dev, mode, flags, sspp, lp) * on the unit. This should only be done if the media has changed. */ ssp = *sspp; - need_init = !dsisopen(ssp); - if (ssp != NULL && need_init) - dsgone(sspp); - if (need_init) { + if (!dsisopen(ssp)) { + if (ssp != NULL) + dsgone(sspp); /* * Allocate a minimal slices "struct". This will become * the final slices "struct" if we don't want real slices @@ -730,9 +728,12 @@ dsopen(dev, mode, flags, sspp, lp) ) continue; dev1 = dkmodslice(dkmodpart(dev, RAW_PART), slice); - if (dev1->si_devsw == NULL) - dev1->si_devsw = dev->si_devsw; +#if 0 sname = dsname(dev, unit, slice, RAW_PART, partname); +#else + *partname='\0'; + sname = dev1->si_name; +#endif /* * XXX this should probably only be done for the need_init * case, but there may be a problem with DIOCSYNCSLICEINFO. |
