diff options
author | phk <phk@FreeBSD.org> | 2003-01-17 19:36:14 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-01-17 19:36:14 +0000 |
commit | 1870d97a25c3060866e2718c533913b780beb318 (patch) | |
tree | 7c3c9dcb15e53f1629ae7a707ff465b595e57dac | |
parent | 0e609c0eb346eb08870a935b835b72959318a344 (diff) | |
download | FreeBSD-src-1870d97a25c3060866e2718c533913b780beb318.zip FreeBSD-src-1870d97a25c3060866e2718c533913b780beb318.tar.gz |
Remove the unused DSO_* options.
-rw-r--r-- | sys/kern/subr_diskslice.c | 37 | ||||
-rw-r--r-- | sys/sys/diskslice.h | 5 |
2 files changed, 6 insertions, 36 deletions
diff --git a/sys/kern/subr_diskslice.c b/sys/kern/subr_diskslice.c index fc27545..bf515fe 100644 --- a/sys/kern/subr_diskslice.c +++ b/sys/kern/subr_diskslice.c @@ -658,13 +658,11 @@ dsopen(dev, mode, flags, sspp, lp) */ *sspp = dsmakeslicestruct(BASE_SLICE, lp); - if (!(flags & DSO_ONESLICE)) { - TRACE(("dsinit\n")); - error = dsinit(dev, lp, sspp); - if (error != 0) { - dsgone(sspp); - return (error); - } + TRACE(("dsinit\n")); + error = dsinit(dev, lp, sspp); + if (error != 0) { + dsgone(sspp); + return (error); } ssp = *sspp; ssp->dss_oflags = flags; @@ -719,30 +717,7 @@ dsopen(dev, mode, flags, sspp, lp) set_ds_wlabel(ssp, slice, TRUE); /* XXX invert */ lp1 = clone_label(lp); TRACE(("readdisklabel\n")); - if (flags & DSO_NOLABELS) - msg = NULL; - else { - msg = readdisklabel(dev1, lp1); - - /* - * readdisklabel() returns NULL for success, and an - * error string for failure. - * - * If there isn't a label on the disk, and if the - * DSO_COMPATLABEL is set, we want to use the - * faked-up label provided by the caller. - * - * So we set msg to NULL to indicate that there is - * no failure (since we have a faked-up label), - * free lp1, and then clone it again from lp. - * (In case readdisklabel() modified lp1.) - */ - if (msg != NULL && (flags & DSO_COMPATLABEL)) { - msg = NULL; - free(lp1, M_DEVBUF); - lp1 = clone_label(lp); - } - } + msg = readdisklabel(dev1, lp1); if (msg == NULL) msg = fixlabel(sname, sp, lp1, FALSE); if (msg == NULL && lp1->d_secsize != ssp->dss_secsize) diff --git a/sys/sys/diskslice.h b/sys/sys/diskslice.h index 277070a..99b59a1 100644 --- a/sys/sys/diskslice.h +++ b/sys/sys/diskslice.h @@ -68,11 +68,6 @@ struct diskslices { #ifdef _KERNEL -/* Flags for dsopen(). */ -#define DSO_NOLABELS 1 -#define DSO_ONESLICE 2 -#define DSO_COMPATLABEL 4 - #define dsgetlabel(dev, ssp) (ssp->dss_slices[dkslice(dev)].ds_label) struct bio; |